@milaboratories/pl-middle-layer 1.31.9 → 1.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var As = Object.defineProperty;
1
+ var Ls = Object.defineProperty;
2
2
  var qt = (s, e) => (e = Symbol[s]) ? e : Symbol.for("Symbol." + s), Yt = (s) => {
3
3
  throw TypeError(s);
4
4
  };
5
- var Ts = (s, e, t) => e in s ? As(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
- var w = (s, e, t) => Ts(s, typeof e != "symbol" ? e + "" : e, t);
5
+ var Ds = (s, e, t) => e in s ? Ls(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
6
+ var w = (s, e, t) => Ds(s, typeof e != "symbol" ? e + "" : e, t);
7
7
  var je = (s, e, t) => {
8
8
  if (e != null) {
9
9
  typeof e != "object" && typeof e != "function" && Yt("Object expected");
@@ -26,75 +26,75 @@ var je = (s, e, t) => {
26
26
  };
27
27
  return n();
28
28
  };
29
- import { mapValueInVOE as _r, executePSpecPredicate as Ls, mapPObjectData as le, mapPTableDef as St, JsRenderInternal as Ds, extractConfig as Kr, isConfigLambda as Hr, DefaultNavigationState as Ns, extractAllColumns as Bs } from "@platforma-sdk/model";
29
+ import { mapValueInVOE as _r, executePSpecPredicate as Ns, mapPObjectData as le, mapPTableDef as St, isDataInfo as Kr, mapDataInfo as Hr, JsRenderInternal as Bs, extractConfig as Wr, isConfigLambda as zr, DefaultNavigationState as xs, extractAllColumns as js } from "@platforma-sdk/model";
30
30
  export * from "@platforma-sdk/model";
31
- import { AnyChannel as $e, StableChannel as Fe, InitialBlockSettings as Qt, blockPackIdToString as xs } from "@milaboratories/pl-model-middle-layer";
31
+ import { AnyChannel as $e, StableChannel as Ie, InitialBlockSettings as Qt, blockPackIdToString as Vs } from "@milaboratories/pl-model-middle-layer";
32
32
  export * from "@milaboratories/pl-model-middle-layer";
33
33
  export * from "@milaboratories/pl-deployments";
34
- import { request as Lt, RetryAgent as js } from "undici";
35
- import { RegistryV1 as de, tryLoadPackDescription as bt, BlockPackMetaEmbedAbsoluteBytes as Vs, RegistryV2Reader as Us, folderReaderByUrl as Js, loadPackDescription as Zt } from "@platforma-sdk/block-tools";
34
+ import { request as Lt, RetryAgent as Us } from "undici";
35
+ import { RegistryV1 as de, tryLoadPackDescription as bt, BlockPackMetaEmbedAbsoluteBytes as Js, RegistryV2Reader as Gs, folderReaderByUrl as Ms, loadPackDescription as Zt } from "@platforma-sdk/block-tools";
36
36
  import Y from "node:fs";
37
37
  import _ from "node:path";
38
- import Gs from "yaml";
39
- import { assertNever as K, notEmpty as B, ConsoleLoggerAdapter as Ms, ConcurrencyLimitingExecutor as _s, HmacSha256Signer as Wr } from "@milaboratories/ts-helpers";
40
- import * as zr from "node:fs/promises";
38
+ import _s from "yaml";
39
+ import { assertNever as K, notEmpty as B, ConsoleLoggerAdapter as Ks, ConcurrencyLimitingExecutor as Hs, HmacSha256Signer as Xr } from "@milaboratories/ts-helpers";
40
+ import * as qr from "node:fs/promises";
41
41
  import er from "node:fs/promises";
42
- import { tryResolve as Ks } from "@milaboratories/resolve-helper";
43
- import { resourceTypesEqual as ce, field as x, Pl as A, PlClient as Hs, isNullResourceId as Ze, ensureResourceIdNotNull as Rt, isResource as Ws, isResourceRef as zs, isNotNullResourceId as tr, resourceType as Ne, resourceTypeToString as Xs, stringifyWithResourceId as Ue, resourceIdToString as we, isNotFoundError as qs, isTimeoutOrCancelError as Ys, toGlobalResourceId as Qs, plAddressToConfig as Zs, UnauthenticatedPlClient as rr } from "@milaboratories/pl-client";
42
+ import { tryResolve as Ws } from "@milaboratories/resolve-helper";
43
+ import { resourceTypesEqual as ce, field as x, Pl as A, PlClient as zs, isNullResourceId as Ze, ensureResourceIdNotNull as Rt, isResource as Xs, isResourceRef as qs, isNotNullResourceId as tr, resourceType as Ne, resourceTypeToString as Ys, stringifyWithResourceId as Ue, resourceIdToString as we, isNotFoundError as Qs, isTimeoutOrCancelError as Zs, toGlobalResourceId as eo, plAddressToConfig as to, UnauthenticatedPlClient as rr } from "@milaboratories/pl-client";
44
44
  export * from "@milaboratories/pl-client";
45
- import { SynchronizedTreeState as Xr, treeDumpStats as eo, isPlTreeNodeAccessor as to } from "@milaboratories/pl-tree";
46
- import { Computable as J, ChangeSource as sr, PollComputablePool as ro, WatchableValue as so } from "@milaboratories/computable";
45
+ import { SynchronizedTreeState as Yr, treeDumpStats as ro, isPlTreeNodeAccessor as so } from "@milaboratories/pl-tree";
46
+ import { Computable as J, ChangeSource as sr, PollComputablePool as oo, WatchableValue as no } from "@milaboratories/computable";
47
47
  import { randomUUID as Se, createHash as Be } from "node:crypto";
48
- import { parseTemplate as oo, PlTemplateV1 as ae, PlTemplateOverrideV1 as ut, PlTemplateLibV1 as Je, PlTemplateSoftwareV1 as Ee } from "@milaboratories/pl-model-backend";
49
- import { LRUCache as qr } from "lru-cache";
50
- import Yr from "denque";
51
- import { Templates as no } from "@platforma-sdk/workflow-tengo";
48
+ import { parseTemplate as io, PlTemplateV1 as ae, PlTemplateOverrideV1 as ut, PlTemplateLibV1 as Je, PlTemplateSoftwareV1 as Ee } from "@milaboratories/pl-model-backend";
49
+ import { LRUCache as Qr } from "lru-cache";
50
+ import Zr from "denque";
51
+ import { Templates as ao } from "@platforma-sdk/workflow-tengo";
52
52
  import Z from "canonicalize";
53
- import { parsePlError as io } from "@milaboratories/pl-errors";
54
- import ao from "node:assert";
55
- import { Scope as Et, errors as co, getQuickJS as lo } from "quickjs-emscripten";
56
- import { setTimeout as Qr } from "node:timers/promises";
57
- import { createDownloadClient as uo, createLogsClient as po, createUploadBlobClient as ho, createUploadProgressClient as fo, DownloadDriver as go, DownloadBlobToURLDriver as mo, UploadDriver as vo, LogsStreamDriver as yo, LogsDriver as wo, LsDriver as So, DownloadUrlDriver as bo } from "@milaboratories/pl-drivers";
53
+ import { parsePlError as co } from "@milaboratories/pl-errors";
54
+ import lo from "node:assert";
55
+ import { Scope as Et, errors as uo, getQuickJS as po } from "quickjs-emscripten";
56
+ import { setTimeout as es } from "node:timers/promises";
57
+ import { createDownloadClient as ho, createLogsClient as fo, createUploadBlobClient as go, createUploadProgressClient as mo, DownloadDriver as vo, DownloadBlobToURLDriver as yo, UploadDriver as wo, LogsStreamDriver as So, LogsDriver as bo, LsDriver as Ro, DownloadUrlDriver as Eo } from "@milaboratories/pl-drivers";
58
58
  import { PFrame as or } from "@milaboratories/pframes-node";
59
- import { PFrame as Ro } from "@milaboratories/pframes-rs-node";
60
- import { channel as Eo } from "node:diagnostics_channel";
59
+ import { PFrame as Co } from "@milaboratories/pframes-rs-node";
60
+ import { channel as Po } from "node:diagnostics_channel";
61
61
  async function nr(s) {
62
62
  try {
63
- return await zr.stat(s, { bigint: !0 });
63
+ return await qr.stat(s, { bigint: !0 });
64
64
  } catch (e) {
65
65
  if (e.code === "ENOENT")
66
66
  return;
67
67
  throw e;
68
68
  }
69
69
  }
70
- const Co = [de.PlPackageYamlConfigFile], Po = [de.PlPackageJsonConfigFile], Dt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Nt = ["config", "dist", "config.json"], Zr = ["frontend", "dist"], ir = "block-model/dist/config.json", ko = "block-ui/package.json", Oo = [
70
+ const ko = [de.PlPackageYamlConfigFile], Oo = [de.PlPackageJsonConfigFile], Dt = ["backend", "dist", "tengo", "tpl", "main.plj.gz"], Nt = ["config", "dist", "config.json"], ts = ["frontend", "dist"], ir = "block-model/dist/config.json", $o = "block-ui/package.json", Io = [
71
71
  Dt,
72
72
  Nt,
73
- Co,
74
- Po,
75
- Zr
73
+ ko,
74
+ Oo,
75
+ ts
76
76
  ];
77
- async function $o(s) {
77
+ async function Fo(s) {
78
78
  return await nr(_.join(s, ...Nt)) !== void 0 || await nr(_.join(s, ...Dt)) !== void 0;
79
79
  }
80
80
  function dt(s, e) {
81
- const t = Ks(s, e);
81
+ const t = Ws(s, e);
82
82
  if (t === void 0) throw new Error(`Can't resolve ${e} against ${s}`);
83
83
  return t;
84
84
  }
85
85
  async function ar(s, e) {
86
- if (_.isAbsolute(s) || (s = _.resolve(s)), await $o(s))
86
+ if (_.isAbsolute(s) || (s = _.resolve(s)), await Fo(s))
87
87
  return {
88
88
  workflow: _.join(s, ...Dt),
89
89
  config: _.join(s, ...Nt),
90
- ui: _.join(s, ...Zr)
90
+ ui: _.join(s, ...ts)
91
91
  };
92
92
  {
93
- const t = dt(s, ir), r = dt(s, ir), o = dt(s, ko);
93
+ const t = dt(s, ir), r = dt(s, ir), o = dt(s, $o);
94
94
  return { workflow: t, config: r, ui: _.resolve(o, "..", "dist") };
95
95
  }
96
96
  }
97
- async function Fo(s) {
97
+ async function Ao(s) {
98
98
  try {
99
99
  return await Y.promises.readFile(s, "utf8");
100
100
  } catch (e) {
@@ -103,7 +103,7 @@ async function Fo(s) {
103
103
  throw e;
104
104
  }
105
105
  }
106
- async function Io(s) {
106
+ async function To(s) {
107
107
  try {
108
108
  return await Y.promises.stat(s, { bigint: !0 });
109
109
  } catch (e) {
@@ -112,10 +112,10 @@ async function Io(s) {
112
112
  throw e;
113
113
  }
114
114
  }
115
- async function es(s) {
115
+ async function rs(s) {
116
116
  let e = 0n;
117
- for (const t of Oo) {
118
- const r = _.join(s, ...t), o = await Io(r);
117
+ for (const t of Io) {
118
+ const r = _.join(s, ...t), o = await To(r);
119
119
  o !== void 0 && e < o.mtimeNs && (e = o.mtimeNs);
120
120
  }
121
121
  return e.toString();
@@ -126,7 +126,7 @@ async function Bt(s) {
126
126
  }), t = await Y.promises.stat(s.components.model.file, { bigint: !0 });
127
127
  return (e.mtimeNs > t.mtimeNs ? e.mtimeNs : t.mtimeNs).toString();
128
128
  }
129
- class cu {
129
+ class uu {
130
130
  constructor(e, t, r) {
131
131
  this.v2Provider = e, this.registries = t, this.http = r;
132
132
  }
@@ -164,7 +164,7 @@ class cu {
164
164
  id: f,
165
165
  latestByChannel: {
166
166
  [$e]: h,
167
- [Fe]: h
167
+ [Ie]: h
168
168
  },
169
169
  allVersions: a.allVersions.map((E) => ({ version: E, channels: [] }))
170
170
  });
@@ -176,11 +176,11 @@ class cu {
176
176
  case "local-dev":
177
177
  for (const o of await Y.promises.readdir(r.path, { withFileTypes: !0 })) {
178
178
  if (!o.isDirectory()) continue;
179
- const n = _.join(r.path, o.name), i = await Fo(
179
+ const n = _.join(r.path, o.name), i = await Ao(
180
180
  _.join(n, de.PlPackageYamlConfigFile)
181
181
  );
182
182
  if (i !== void 0) {
183
- const a = de.PlPackageConfigData.parse(Gs.parse(i)), c = await es(n), u = {
183
+ const a = de.PlPackageConfigData.parse(_s.parse(i)), c = await rs(n), u = {
184
184
  organization: a.organization,
185
185
  name: a.package,
186
186
  version: "DEV"
@@ -205,7 +205,7 @@ class cu {
205
205
  id: u,
206
206
  latestByChannel: {
207
207
  [$e]: l,
208
- [Fe]: l
208
+ [Ie]: l
209
209
  },
210
210
  allVersions: []
211
211
  });
@@ -218,7 +218,7 @@ class cu {
218
218
  if (c !== void 0) {
219
219
  const u = await Bt(c), l = {
220
220
  id: c.id,
221
- meta: await Vs.parseAsync(c.meta),
221
+ meta: await Js.parseAsync(c.meta),
222
222
  spec: {
223
223
  type: "dev-v2",
224
224
  folder: a,
@@ -230,7 +230,7 @@ class cu {
230
230
  id: c.id,
231
231
  latestByChannel: {
232
232
  [$e]: l,
233
- [Fe]: l
233
+ [Ie]: l
234
234
  },
235
235
  allVersions: []
236
236
  });
@@ -259,7 +259,7 @@ class cu {
259
259
  return await this.v2Provider.getRegistry(o.url).getSpecificOverview(t, r);
260
260
  }
261
261
  }
262
- class Ao {
262
+ class Lo {
263
263
  constructor(e) {
264
264
  w(this, "registries", /* @__PURE__ */ new Map());
265
265
  this.http = e;
@@ -267,62 +267,62 @@ class Ao {
267
267
  getRegistry(e) {
268
268
  const t = this.registries.get(e);
269
269
  if (t) return t;
270
- const r = new Us(Js(e, this.http));
270
+ const r = new Gs(Ms(e, this.http));
271
271
  return this.registries.set(e, r), r;
272
272
  }
273
273
  }
274
- const lu = {
274
+ const du = {
275
275
  type: "remote-v2",
276
276
  url: "https://blocks.pl-open.science/"
277
- }, uu = {
277
+ }, pu = {
278
278
  type: "remote-v1",
279
279
  url: "https://block.registry.platforma.bio/releases"
280
- }, du = {
280
+ }, hu = {
281
281
  type: "remote-v1",
282
282
  url: "https://block.registry.platforma.bio/dev"
283
- }, To = {
283
+ }, Do = {
284
284
  groups: [{ id: "default", label: "Default", blocks: [] }]
285
- }, Lo = {
285
+ }, No = {
286
286
  stagingRefreshTimestamp: 0,
287
287
  blocksInLimbo: []
288
- }, Do = {
288
+ }, Bo = {
289
289
  label: "New Project"
290
- }, No = { name: "UserProject", version: "2" }, ts = "SchemaVersion", rs = "1", xt = "ProjectCreated", Le = "ProjectLastModified", De = "ProjectMeta", pe = "ProjectStructure", et = "BlockRenderingState", Bo = "BlockFrontendState/", xo = /^BlockFrontendState\/(?<blockid>.*)$/;
290
+ }, xo = { name: "UserProject", version: "2" }, ss = "SchemaVersion", os = "1", xt = "ProjectCreated", Le = "ProjectLastModified", De = "ProjectMeta", pe = "ProjectStructure", et = "BlockRenderingState", jo = "BlockFrontendState/", Vo = /^BlockFrontendState\/(?<blockid>.*)$/;
291
291
  function Ct(s) {
292
- return `${Bo}${s}`;
292
+ return `${jo}${s}`;
293
293
  }
294
- const jo = "BlockArgsAuthor/";
294
+ const Uo = "BlockArgsAuthor/";
295
295
  function Pt(s) {
296
- return `${jo}${s}`;
296
+ return `${Uo}${s}`;
297
297
  }
298
298
  const kt = "ProjectStructureAuthor";
299
- function Vo(s) {
300
- const e = s.match(xo);
299
+ function Jo(s) {
300
+ const e = s.match(Vo);
301
301
  if (e !== null)
302
302
  return e.groups.blockid;
303
303
  }
304
- const Uo = "__serviceTemplate_";
304
+ const Go = "__serviceTemplate_";
305
305
  function Ot(s) {
306
- return `${Uo}${s}`;
306
+ return `${Go}${s}`;
307
307
  }
308
308
  function U(s, e) {
309
309
  return `${s}-${e}`;
310
310
  }
311
- const Jo = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
312
- function Go(s) {
313
- const e = s.match(Jo);
311
+ const Mo = /^(?<blockId>.*)-(?<fieldName>blockPack|blockSettings|prodArgs|currentArgs|prodCtx|prodUiCtx|prodOutput|prodCtxPrevious|prodUiCtxPrevious|prodOutputPrevious|stagingCtx|stagingUiCtx|stagingOutput|stagingCtxPrevious|stagingUiCtxPrevious|stagingOutputPrevious)$/;
312
+ function _o(s) {
313
+ const e = s.match(Mo);
314
314
  if (e === null) return;
315
315
  const { blockId: t, fieldName: r } = e.groups;
316
316
  return { blockId: t, fieldName: r };
317
317
  }
318
- const Mo = "projects", ss = { name: "Projects", version: "1" }, _o = (s) => ce(s.type, ss) ? s.fields : [];
319
- async function Ko(s, e, t, r) {
320
- const o = await Xr.init(
318
+ const Ko = "projects", ns = { name: "Projects", version: "1" }, Ho = (s) => ce(s.type, ns) ? s.fields : [];
319
+ async function Wo(s, e, t, r) {
320
+ const o = await Yr.init(
321
321
  s,
322
322
  e,
323
323
  {
324
324
  ...r.ops.defaultTreeOptions,
325
- pruning: _o
325
+ pruning: Ho
326
326
  },
327
327
  r.logger
328
328
  );
@@ -346,40 +346,40 @@ async function Ko(s, e, t, r) {
346
346
  return u.sort((l) => -l.lastModified.valueOf()), u;
347
347
  }).withStableType(), tree: o };
348
348
  }
349
- const Ho = {
349
+ const zo = {
350
350
  name: "EphRenderTemplate",
351
351
  version: "1"
352
- }, Wo = {
352
+ }, Xo = {
353
353
  name: "RenderTemplate",
354
354
  version: "1"
355
355
  };
356
- function os(s, e, t, r, o) {
356
+ function is(s, e, t, r, o) {
357
357
  if (o.length === 0) throw new Error("Zero output names provided");
358
- const n = t ? s.createEphemeral(Ho) : s.createStruct(Wo), i = x(n, "template"), a = x(n, "inputs");
358
+ const n = t ? s.createEphemeral(zo) : s.createStruct(Xo), i = x(n, "template"), a = x(n, "inputs");
359
359
  return s.createField(i, "Input", e), s.createField(a, "Input", A.createPlMap(s, r, t)), s.lockInputs(n), A.futureRecord(s, n, o, "Output", "outputs/");
360
360
  }
361
- const zo = { name: "BContextEnd", version: "1" }, Xo = { name: "BContext", version: "1" }, qo = "id", Yo = "parent/", Qo = ["context", "result"];
361
+ const qo = { name: "BContextEnd", version: "1" }, Yo = { name: "BContext", version: "1" }, Qo = "id", Zo = "parent/", en = ["context", "result"];
362
362
  function cr(s, e, t) {
363
- return os(s, e, !0, t, Qo);
363
+ return is(s, e, !0, t, en);
364
364
  }
365
- function Zo(s) {
366
- const e = s.createEphemeral(zo);
365
+ function tn(s) {
366
+ const e = s.createEphemeral(qo);
367
367
  return s.lock(e), e;
368
368
  }
369
369
  function lr(s, e) {
370
- if (e.length === 0) return Zo(s);
370
+ if (e.length === 0) return tn(s);
371
371
  if (e.length === 1) return e[0];
372
- const t = s.createEphemeral(Xo);
373
- s.createField(x(t, qo), "Input", A.createPlString(s, Se()));
372
+ const t = s.createEphemeral(Yo);
373
+ s.createField(x(t, Qo), "Input", A.createPlString(s, Se()));
374
374
  for (let r = 0; r < e.length; r++)
375
- s.createField(x(t, `${Yo}${r}`), "Input", e[r]);
375
+ s.createField(x(t, `${Zo}${r}`), "Input", e[r]);
376
376
  return s.lock(t), t;
377
377
  }
378
- function en(s, e) {
379
- const t = oo(e.content), r = t.type;
378
+ function rn(s, e) {
379
+ const t = io(e.content), r = t.type;
380
380
  switch (r) {
381
381
  case "pl.tengo-template.v2":
382
- return tn(s, t);
382
+ return sn(s, t);
383
383
  default:
384
384
  K(r);
385
385
  }
@@ -402,7 +402,7 @@ const ur = {
402
402
  const r = Ee.fromV2Data(s), o = e.createStruct(Ee.type, r.data);
403
403
  return e.setKValue(o, Ee.metaNameKey, JSON.stringify(r.name)), e.lock(o), o;
404
404
  }
405
- }, ns = {
405
+ }, as = {
406
406
  hash(s, e) {
407
407
  e.update(ae.type.name).update(ae.type.version).update(s.hashOverride ?? "no-override").update(s.name).update(s.version).update(s.src);
408
408
  const t = (r) => (r.sort((o, n) => o[0] === n[0] ? 0 : o[0] < n[0] ? -1 : 1), r);
@@ -434,7 +434,7 @@ const ur = {
434
434
  }
435
435
  for (const [i, a] of Object.entries(s.templates ?? {})) {
436
436
  const c = ae.tplField(r, i);
437
- e.createField(c, "Input"), e.setField(c, t(a, ns));
437
+ e.createField(c, "Input"), e.setField(c, t(a, as));
438
438
  }
439
439
  if (e.lock(r), !s.hashOverride) return r;
440
440
  const o = e.createStruct(
@@ -444,7 +444,7 @@ const ur = {
444
444
  return e.createField(n, "Service"), e.setField(n, r), e.lock(o), o;
445
445
  }
446
446
  };
447
- function tn(s, e) {
447
+ function sn(s, e) {
448
448
  const t = /* @__PURE__ */ new Map(), r = (o, n) => {
449
449
  const i = Be("sha256");
450
450
  n.hash(o, i);
@@ -455,13 +455,13 @@ function tn(s, e) {
455
455
  }
456
456
  return t.get(a);
457
457
  };
458
- return r(e, ns);
458
+ return r(e, as);
459
459
  }
460
- const rn = { name: "TengoTemplateGet", version: "1" }, sn = "registry", on = "templateURI", nn = "template", pu = { name: "TengoTemplatePack", version: "1" }, hu = {
460
+ const on = { name: "TengoTemplateGet", version: "1" }, nn = "registry", an = "templateURI", cn = "template", fu = { name: "TengoTemplatePack", version: "1" }, gu = {
461
461
  name: "TengoTemplatePackConvert",
462
462
  version: "1"
463
- }, fu = "templatePack", gu = "template";
464
- async function an(s) {
463
+ }, mu = "templatePack", vu = "template";
464
+ async function ln(s) {
465
465
  switch (s.type) {
466
466
  case "from-file":
467
467
  return {
@@ -475,34 +475,34 @@ async function an(s) {
475
475
  return K(s);
476
476
  }
477
477
  }
478
- function cn(s, e) {
479
- const t = s.createStruct(rn), r = x(t, sn), o = x(t, on), n = x(t, nn);
478
+ function un(s, e) {
479
+ const t = s.createStruct(on), r = x(t, nn), o = x(t, an), n = x(t, cn);
480
480
  return s.setField(r, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.registry)))), s.setField(o, s.createValue(A.JsonString, Buffer.from(JSON.stringify(e.path)))), n;
481
481
  }
482
482
  function jt(s, e) {
483
483
  switch (e.type) {
484
484
  case "from-registry":
485
- return cn(s, e);
485
+ return un(s, e);
486
486
  case "explicit":
487
- return en(s, e);
487
+ return rn(s, e);
488
488
  default:
489
489
  return K(e);
490
490
  }
491
491
  }
492
- const is = { name: "Frontend/FromUrl", version: "1" }, as = {
492
+ const cs = { name: "Frontend/FromUrl", version: "1" }, ls = {
493
493
  name: "Frontend/FromFolder",
494
494
  version: "1"
495
495
  };
496
- function ln(s, e) {
496
+ function dn(s, e) {
497
497
  switch (e.type) {
498
498
  case "url":
499
499
  return s.createValue(
500
- is,
500
+ cs,
501
501
  JSON.stringify({ url: e.url })
502
502
  );
503
503
  case "local":
504
504
  return s.createValue(
505
- as,
505
+ ls,
506
506
  JSON.stringify({
507
507
  path: e.path,
508
508
  signature: e.signature
@@ -512,19 +512,19 @@ function ln(s, e) {
512
512
  return K(e);
513
513
  }
514
514
  }
515
- const un = { name: "BlockPackCustom", version: "1" }, cs = "template", ls = "frontend";
515
+ const pn = { name: "BlockPackCustom", version: "1" }, us = "template", ds = "frontend";
516
516
  function dr(s) {
517
517
  return s.endsWith("/") ? s : `${s}/`;
518
518
  }
519
- function dn(s) {
519
+ function hn(s) {
520
520
  return Buffer.from(s).toString("utf8");
521
521
  }
522
522
  function Me(s) {
523
- return JSON.parse(dn(s));
523
+ return JSON.parse(hn(s));
524
524
  }
525
- class pn {
525
+ class fn {
526
526
  constructor(e, t, r) {
527
- w(this, "remoteContentCache", new qr({
527
+ w(this, "remoteContentCache", new Qr({
528
528
  max: 500,
529
529
  maxSize: 128 * 1024 * 1024,
530
530
  fetchMethod: async (e) => {
@@ -644,14 +644,14 @@ class pn {
644
644
  }
645
645
  }
646
646
  }
647
- function hn(s, e) {
648
- const t = { config: e.config, source: e.source }, r = s.createStruct(un, JSON.stringify(t));
649
- return s.createField(x(r, cs), "Input", jt(s, e.template)), s.createField(x(r, ls), "Input", ln(s, e.frontend)), s.lock(r), r;
647
+ function gn(s, e) {
648
+ const t = { config: e.config, source: e.source }, r = s.createStruct(pn, JSON.stringify(t));
649
+ return s.createField(x(r, us), "Input", jt(s, e.template)), s.createField(x(r, ds), "Input", dn(s, e.frontend)), s.lock(r), r;
650
650
  }
651
651
  function pr(s, e) {
652
652
  switch (e.type) {
653
653
  case "explicit":
654
- return hn(s, e);
654
+ return gn(s, e);
655
655
  default:
656
656
  return K(e.type);
657
657
  }
@@ -659,7 +659,7 @@ function pr(s, e) {
659
659
  function _e(s, e) {
660
660
  return { __isRef: !0, blockId: s, name: e };
661
661
  }
662
- function fn(s) {
662
+ function mn(s) {
663
663
  return typeof s == "object" && s !== null && "__isRef" in s && s.__isRef === !0 && "blockId" in s && "name" in s;
664
664
  }
665
665
  function $t(s, e, t) {
@@ -675,7 +675,7 @@ function $t(s, e, t) {
675
675
  return;
676
676
  case "object":
677
677
  if (e === null) return;
678
- if (fn(e))
678
+ if (mn(e))
679
679
  t === void 0 || t.has(e.blockId) ? s.upstreams.add(e.blockId) : s.missingReferences = !0;
680
680
  else if (Array.isArray(e))
681
681
  for (const o of e) $t(s, o, t);
@@ -687,7 +687,7 @@ function $t(s, e, t) {
687
687
  K(r);
688
688
  }
689
689
  }
690
- function gn(s, e) {
690
+ function vn(s, e) {
691
691
  const t = { upstreams: /* @__PURE__ */ new Set(), missingReferences: !1 };
692
692
  return $t(t, s, e), t;
693
693
  }
@@ -698,7 +698,7 @@ function oe(s) {
698
698
  }
699
699
  };
700
700
  }
701
- class us {
701
+ class ps {
702
702
  constructor(e) {
703
703
  /** Nodes are stored in the map in topological order */
704
704
  w(this, "nodes");
@@ -728,7 +728,7 @@ class us {
728
728
  }
729
729
  }
730
730
  }
731
- function Ft(s) {
731
+ function It(s) {
732
732
  const e = /* @__PURE__ */ new Map();
733
733
  let t;
734
734
  for (const { id: r } of oe(s)) {
@@ -738,14 +738,14 @@ function Ft(s) {
738
738
  };
739
739
  e.set(r, o), t === void 0 ? o.upstream = /* @__PURE__ */ new Set() : (o.upstream = /* @__PURE__ */ new Set([t.id]), t.downstream = /* @__PURE__ */ new Set([o.id])), t = o;
740
740
  }
741
- return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new us(e);
741
+ return t !== void 0 && (t.downstream = /* @__PURE__ */ new Set()), new ps(e);
742
742
  }
743
743
  function Qe(s, e) {
744
744
  const t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set();
745
745
  for (const { id: o } of oe(s)) {
746
746
  const n = e(o);
747
747
  if (n === void 0) continue;
748
- const i = gn(n, r), a = {
748
+ const i = vn(n, r), a = {
749
749
  id: o,
750
750
  missingReferences: i.missingReferences,
751
751
  upstream: i.upstreams,
@@ -754,15 +754,15 @@ function Qe(s, e) {
754
754
  };
755
755
  t.set(o, a), i.upstreams.forEach((c) => t.get(c).downstream.add(o)), r.add(o);
756
756
  }
757
- return new us(t);
757
+ return new ps(t);
758
758
  }
759
- function mn(s, e) {
759
+ function yn(s, e) {
760
760
  if (s.size !== e.size) return !1;
761
761
  for (const t of s) if (!e.has(t)) return !1;
762
762
  return !0;
763
763
  }
764
- function It(s, e) {
765
- if (s.size > e.size) return It(e, s);
764
+ function Ft(s, e) {
765
+ if (s.size > e.size) return Ft(e, s);
766
766
  for (const t of s) if (e.has(t)) return !0;
767
767
  return !1;
768
768
  }
@@ -770,23 +770,23 @@ function hr(s, e) {
770
770
  const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
771
771
  return s.nodes.forEach((n) => {
772
772
  const i = e.nodes.get(n.id);
773
- i === void 0 ? t.add(n.id) : (!mn(n.upstream, i.upstream) || It(n.upstream, o)) && o.add(n.id);
773
+ i === void 0 ? t.add(n.id) : (!yn(n.upstream, i.upstream) || Ft(n.upstream, o)) && o.add(n.id);
774
774
  }), e.nodes.forEach((n) => {
775
- s.nodes.has(n.id) ? It(n.upstream, o) && o.add(n.id) : r.add(n.id);
775
+ s.nodes.has(n.id) ? Ft(n.upstream, o) && o.add(n.id) : r.add(n.id);
776
776
  }), { onlyInA: t, onlyInB: r, different: o };
777
777
  }
778
778
  let pt;
779
- async function ds() {
779
+ async function hs() {
780
780
  if (pt === void 0) {
781
- const s = await an(no["pframes.export-pframe-for-ui"]);
781
+ const s = await ln(ao["pframes.export-pframe-for-ui"]);
782
782
  if (s.type !== "explicit") throw new Error("Unexpected prepared template type.");
783
783
  const e = Be("sha256").update(s.content).digest("hex");
784
784
  pt = { spec: s, hash: e };
785
785
  }
786
786
  return pt;
787
787
  }
788
- function vn(s, e, t) {
789
- return os(s, e, !0, { pf: t }, ["result"]).result;
788
+ function wn(s, e, t) {
789
+ return is(s, e, !0, { pf: t }, ["result"]).result;
790
790
  }
791
791
  function ht(s, e) {
792
792
  let t = !1, r, o;
@@ -861,12 +861,12 @@ class fr {
861
861
  getTemplate(e) {
862
862
  return e.getFutureFieldValue(
863
863
  A.unwrapHolder(e, this.fields.blockPack.ref),
864
- cs,
864
+ us,
865
865
  "Input"
866
866
  );
867
867
  }
868
868
  }
869
- const yn = (s) => {
869
+ const Sn = (s) => {
870
870
  throw new Error(`No new block info for ${s}`);
871
871
  };
872
872
  class tt {
@@ -907,7 +907,7 @@ class tt {
907
907
  return JSON.parse(JSON.stringify(this.struct));
908
908
  }
909
909
  getStagingGraph() {
910
- return this.stagingGraph === void 0 && (this.stagingGraph = Ft(this.struct)), this.stagingGraph;
910
+ return this.stagingGraph === void 0 && (this.stagingGraph = It(this.struct)), this.stagingGraph;
911
911
  }
912
912
  getPendingProductionGraph() {
913
913
  return this.pendingProductionGraph === void 0 && (this.pendingProductionGraph = Qe(
@@ -1027,7 +1027,7 @@ class tt {
1027
1027
  }), lr(this.tx, t);
1028
1028
  }
1029
1029
  exportCtx(e) {
1030
- return vn(this.tx, A.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1030
+ return wn(this.tx, A.unwrapHolder(this.tx, this.ctxExportTplHolder), e);
1031
1031
  }
1032
1032
  renderStagingFor(e) {
1033
1033
  this.resetStaging(e);
@@ -1068,8 +1068,8 @@ class tt {
1068
1068
  // Structure changes
1069
1069
  //
1070
1070
  /** Very generic method, better check for more specialized case-specific methods first. */
1071
- updateStructure(e, t = yn) {
1072
- const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = Ft(e), i = Qe(
1071
+ updateStructure(e, t = Sn) {
1072
+ const r = this.getStagingGraph(), o = this.getActualProductionGraph(), n = It(e), i = Qe(
1073
1073
  e,
1074
1074
  (u) => {
1075
1075
  var l;
@@ -1188,7 +1188,7 @@ class tt {
1188
1188
  * accordingly */
1189
1189
  stopProduction(...e) {
1190
1190
  var i, a;
1191
- const t = this.getActualProductionGraph(), r = new Yr(e), o = new Set(e), n = [];
1191
+ const t = this.getActualProductionGraph(), r = new Zr(e), o = new Set(e), n = [];
1192
1192
  for (; !r.isEmpty(); ) {
1193
1193
  const c = r.shift(), u = this.getBlockInfo(c).fields;
1194
1194
  if (!(((i = u.prodOutput) == null ? void 0 : i.status) === "Ready" && ((a = u.prodCtx) == null ? void 0 : a.status) === "Ready") && this.deleteBlockFields(c, "prodOutput", "prodCtx", "prodUiCtx", "prodArgs")) {
@@ -1269,7 +1269,7 @@ class tt {
1269
1269
  }
1270
1270
  }
1271
1271
  static async load(e, t, r) {
1272
- const o = e.getResourceData(t, !0), n = e.getKValueJson(t, ts), i = e.getKValueJson(t, Le), a = e.getKValueJson(t, De), c = e.getKValueJson(t, pe), u = e.getKValueJson(t, et), l = e.listKeyValuesString(t), [
1272
+ const o = e.getResourceData(t, !0), n = e.getKValueJson(t, ss), i = e.getKValueJson(t, Le), a = e.getKValueJson(t, De), c = e.getKValueJson(t, pe), u = e.getKValueJson(t, et), l = e.listKeyValuesString(t), [
1273
1273
  d,
1274
1274
  f,
1275
1275
  h,
@@ -1286,13 +1286,13 @@ class tt {
1286
1286
  u,
1287
1287
  l
1288
1288
  ]);
1289
- if (f !== rs)
1289
+ if (f !== os)
1290
1290
  throw new Error(
1291
1291
  `Can't act on this project resource because it has a wrong schema version: ${f}`
1292
1292
  );
1293
1293
  const $ = /* @__PURE__ */ new Map();
1294
1294
  for (const p of d.fields) {
1295
- const m = Go(p.name);
1295
+ const m = _o(p.name);
1296
1296
  if (m === void 0) continue;
1297
1297
  let y = $.get(m.blockId);
1298
1298
  y === void 0 && (y = {
@@ -1300,7 +1300,7 @@ class tt {
1300
1300
  fields: {}
1301
1301
  }, $.set(m.blockId, y)), y.fields[m.fieldName] = Ze(p.value) ? { modCount: 0 } : { modCount: 0, ref: p.value };
1302
1302
  }
1303
- const G = await ds(), he = Ot(G.hash), L = d.fields.find(
1303
+ const G = await hs(), he = Ot(G.hash), L = d.fields.find(
1304
1304
  (p) => p.name === he
1305
1305
  );
1306
1306
  let X;
@@ -1311,14 +1311,14 @@ class tt {
1311
1311
  ));
1312
1312
  const ie = { stagingRefreshTimestamp: D }, W = new Set(T), M = /* @__PURE__ */ new Map();
1313
1313
  for (const p of j) {
1314
- const m = Vo(p.key);
1314
+ const m = Jo(p.key);
1315
1315
  m !== void 0 && M.set(m, p.value);
1316
1316
  }
1317
1317
  const V = [];
1318
1318
  $.forEach(({ fields: p }) => {
1319
1319
  for (const [, m] of Object.entries(p))
1320
1320
  if (m.ref !== void 0) {
1321
- if (!Ws(m.ref) || zs(m.ref))
1321
+ if (!Xs(m.ref) || qs(m.ref))
1322
1322
  throw new Error("unexpected behaviour");
1323
1323
  V.push([m, e.getResourceData(m.ref, !1)]);
1324
1324
  }
@@ -1357,12 +1357,12 @@ class tt {
1357
1357
  return v.fixProblemsAndMigrate(), v;
1358
1358
  }
1359
1359
  }
1360
- async function wn(s, e = Do) {
1361
- const t = s.createEphemeral(No);
1360
+ async function bn(s, e = Bo) {
1361
+ const t = s.createEphemeral(xo);
1362
1362
  s.lock(t);
1363
1363
  const r = String(Date.now());
1364
- s.setKValue(t, ts, JSON.stringify(rs)), s.setKValue(t, xt, r), s.setKValue(t, Le, r), s.setKValue(t, De, JSON.stringify(e)), s.setKValue(t, pe, JSON.stringify(To)), s.setKValue(t, et, JSON.stringify(Lo));
1365
- const o = await ds();
1364
+ s.setKValue(t, ss, JSON.stringify(os)), s.setKValue(t, xt, r), s.setKValue(t, Le, r), s.setKValue(t, De, JSON.stringify(e)), s.setKValue(t, pe, JSON.stringify(Do)), s.setKValue(t, et, JSON.stringify(No));
1365
+ const o = await hs();
1366
1366
  return s.createField(
1367
1367
  x(t, Ot(o.hash)),
1368
1368
  "Dynamic",
@@ -1373,7 +1373,7 @@ async function Ke(s, e, t) {
1373
1373
  return Q(s, e, void 0, t);
1374
1374
  }
1375
1375
  async function Q(s, e, t, r) {
1376
- if (s instanceof Hs)
1376
+ if (s instanceof zs)
1377
1377
  return await s.withWriteTx("ProjectAction", async (o) => {
1378
1378
  const n = await tt.load(o, e, t), i = await r(n);
1379
1379
  return n.wasModified && (n.save(), await o.commit()), i;
@@ -1383,7 +1383,7 @@ async function Q(s, e, t, r) {
1383
1383
  return o.save(), n;
1384
1384
  }
1385
1385
  }
1386
- function* Sn(s) {
1386
+ function* Rn(s) {
1387
1387
  switch (s.type) {
1388
1388
  case "Json":
1389
1389
  return;
@@ -1403,7 +1403,7 @@ function gr(s, e) {
1403
1403
  Object.entries(s).map(([t, r]) => [t, e(r, t)])
1404
1404
  );
1405
1405
  }
1406
- function bn(s, e) {
1406
+ function En(s, e) {
1407
1407
  switch (s.type) {
1408
1408
  case "Json":
1409
1409
  return { ...s };
@@ -1421,26 +1421,26 @@ function bn(s, e) {
1421
1421
  K(s);
1422
1422
  }
1423
1423
  }
1424
- const Rn = Ne("PColumnData/JsonPartitioned", "1"), En = Ne(
1424
+ const Cn = Ne("PColumnData/JsonPartitioned", "1"), Pn = Ne(
1425
1425
  "PColumnData/Partitioned/JsonPartitioned",
1426
1426
  "1"
1427
- ), Cn = Ne("PColumnData/BinaryPartitioned", "1"), Pn = Ne(
1427
+ ), kn = Ne("PColumnData/BinaryPartitioned", "1"), On = Ne(
1428
1428
  "PColumnData/Partitioned/BinaryPartitioned",
1429
1429
  "1"
1430
- ), kn = Ne("PColumnData/Json", "1");
1431
- function On(s) {
1430
+ ), $n = Ne("PColumnData/Json", "1");
1431
+ function In(s) {
1432
1432
  if (!s.getIsReadyOrError()) throw new Error("Data not ready.");
1433
1433
  const e = s.getDataAsJson();
1434
1434
  if (e === void 0)
1435
1435
  throw new Error("unexpected data info structure, no resource data");
1436
- if (ce(s.resourceType, kn)) {
1436
+ if (ce(s.resourceType, $n)) {
1437
1437
  const t = e;
1438
1438
  return {
1439
1439
  type: "Json",
1440
1440
  keyLength: t.keyLength,
1441
1441
  data: t.data
1442
1442
  };
1443
- } else if (ce(s.resourceType, Rn)) {
1443
+ } else if (ce(s.resourceType, Cn)) {
1444
1444
  const t = e, r = Object.fromEntries(
1445
1445
  s.listInputFields().map((o) => [o, s.traverse({ field: o, errorIfFieldNotSet: !0 }).resourceInfo])
1446
1446
  );
@@ -1449,7 +1449,7 @@ function On(s) {
1449
1449
  partitionKeyLength: t.partitionKeyLength,
1450
1450
  parts: r
1451
1451
  };
1452
- } else if (ce(s.resourceType, En)) {
1452
+ } else if (ce(s.resourceType, Pn)) {
1453
1453
  const t = e, r = {};
1454
1454
  for (const o of s.listInputFields()) {
1455
1455
  const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
@@ -1467,7 +1467,7 @@ function On(s) {
1467
1467
  partitionKeyLength: t.superPartitionKeyLength + t.partitionKeyLength,
1468
1468
  parts: r
1469
1469
  };
1470
- } else if (ce(s.resourceType, Cn)) {
1470
+ } else if (ce(s.resourceType, kn)) {
1471
1471
  const t = e, r = {};
1472
1472
  for (const o of s.listInputFields())
1473
1473
  if (o.endsWith(".index")) {
@@ -1488,7 +1488,7 @@ function On(s) {
1488
1488
  partitionKeyLength: t.partitionKeyLength,
1489
1489
  parts: r
1490
1490
  };
1491
- } else if (ce(s.resourceType, Pn)) {
1491
+ } else if (ce(s.resourceType, On)) {
1492
1492
  const t = e, r = {};
1493
1493
  for (const o of s.listInputFields()) {
1494
1494
  const n = s.traverse({ field: o, errorIfFieldNotSet: !0 }), i = n.listInputFields();
@@ -1522,9 +1522,9 @@ function On(s) {
1522
1522
  parts: r
1523
1523
  };
1524
1524
  }
1525
- throw new Error(`unsupported resource type: ${Xs(s.resourceType)}`);
1525
+ throw new Error(`unsupported resource type: ${Ys(s.resourceType)}`);
1526
1526
  }
1527
- function $n(s, e) {
1527
+ function Fn(s, e) {
1528
1528
  const t = s.axesSpec.length, r = {};
1529
1529
  for (const { key: o, val: n } of e) {
1530
1530
  if (o.length !== t)
@@ -1537,17 +1537,17 @@ function $n(s, e) {
1537
1537
  data: r
1538
1538
  };
1539
1539
  }
1540
- function Fn(s, e) {
1540
+ function An(s, e) {
1541
1541
  const t = Be("sha256");
1542
1542
  return t.update(Z(s)), t.update(String(Ze(e.originalId) ? e.id : e.originalId)), t.digest().toString("hex");
1543
1543
  }
1544
1544
  function mr(s, e) {
1545
1545
  return Z({ __isRef: !0, blockId: s, name: e });
1546
1546
  }
1547
- function In(s, e) {
1547
+ function Tn(s, e) {
1548
1548
  return Z({ resolvePath: s, name: e });
1549
1549
  }
1550
- function ps(s, e = !0, t = !1, r = "") {
1550
+ function fs(s, e = !0, t = !1, r = "") {
1551
1551
  var a, c, u;
1552
1552
  const o = /^(?<name>.*)\.(?<type>spec|data)$/, n = /* @__PURE__ */ new Map();
1553
1553
  for (const l of s.listInputFields()) {
@@ -1585,10 +1585,10 @@ function ps(s, e = !0, t = !1, r = "") {
1585
1585
  for (const [, l] of n) l.data === void 0 && (l.hasData = !1);
1586
1586
  return { locked: i, results: n };
1587
1587
  }
1588
- function An(s, e = !0, t = "", r) {
1588
+ function Ln(s, e = !0, t = "", r) {
1589
1589
  if (!s.getIsReadyOrError()) throw new Error("resource is not ready");
1590
- const o = ps(s, e, !1, t);
1591
- ao(o.locked);
1590
+ const o = fs(s, e, !1, t);
1591
+ lo(o.locked);
1592
1592
  const n = {};
1593
1593
  for (const [i, a] of o.results) {
1594
1594
  if (a.spec === void 0) throw new Error(`no spec for key ${i}`);
@@ -1596,9 +1596,9 @@ function An(s, e = !0, t = "", r) {
1596
1596
  throw new Error(`no data for key ${i}`);
1597
1597
  const c = a.data();
1598
1598
  if (c === void 0) throw new Error(`no data for key ${i}`);
1599
- if (!c.ok) throw io(c.error);
1599
+ if (!c.ok) throw co(c.error);
1600
1600
  n[i] = {
1601
- id: r.length === 0 ? Fn(a.spec, c.value) : In(r, i),
1601
+ id: r.length === 0 ? An(a.spec, c.value) : Tn(r, i),
1602
1602
  spec: a.spec,
1603
1603
  data: c.value
1604
1604
  };
@@ -1733,7 +1733,7 @@ class Vt {
1733
1733
  for (const r of this.blocks.values()) {
1734
1734
  const o = /* @__PURE__ */ new Set(), n = (i) => {
1735
1735
  for (const [a, c] of i.results)
1736
- o.has(a) || c.spec === void 0 || (o.add(a), Ls(e, c.spec) && t.push({
1736
+ o.has(a) || c.spec === void 0 || (o.add(a), Ns(e, c.spec) && t.push({
1737
1737
  label: r.info.label + " / " + a,
1738
1738
  ref: _e(r.info.id, a),
1739
1739
  spec: c.spec
@@ -1744,7 +1744,7 @@ class Vt {
1744
1744
  return t;
1745
1745
  }
1746
1746
  static create(e, t, r) {
1747
- const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(pe)), a = Ft(n).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
1747
+ const o = e.accessor(t).node(), n = B(o.getKeyValueAsJson(pe)), a = It(n).traverseIds("upstream", r), c = /* @__PURE__ */ new Map();
1748
1748
  for (const u of oe(n)) {
1749
1749
  if (!a.has(u.id)) continue;
1750
1750
  const l = vr(
@@ -1776,7 +1776,7 @@ class Vt {
1776
1776
  function vr(s, e) {
1777
1777
  if (e === void 0)
1778
1778
  return s ? { locked: !1, results: /* @__PURE__ */ new Map() } : void 0;
1779
- if (e.ok) return ps(e.value, !1, !0);
1779
+ if (e.ok) return fs(e.value, !1, !0);
1780
1780
  }
1781
1781
  function Ut(s, e) {
1782
1782
  return {
@@ -1802,7 +1802,7 @@ function Ut(s, e) {
1802
1802
  }
1803
1803
  };
1804
1804
  }
1805
- function hs(s, e) {
1805
+ function gs(s, e) {
1806
1806
  return {
1807
1807
  ...Ut(s, e),
1808
1808
  prod: (t) => {
@@ -1876,15 +1876,15 @@ function* z(s, e) {
1876
1876
  K(s);
1877
1877
  }
1878
1878
  }
1879
- function Tn(s, e) {
1879
+ function Dn(s, e) {
1880
1880
  const t = {};
1881
1881
  for (const [r, o] of Object.entries(s)) t[r] = e(o);
1882
1882
  return t;
1883
1883
  }
1884
- function Ie(s, e) {
1884
+ function Fe(s, e) {
1885
1885
  return s === void 0 ? void 0 : e(s);
1886
1886
  }
1887
- function Ln(s) {
1887
+ function Nn(s) {
1888
1888
  switch (s.type) {
1889
1889
  case "GetImportProgress":
1890
1890
  return !0;
@@ -1892,8 +1892,8 @@ function Ln(s) {
1892
1892
  return !1;
1893
1893
  }
1894
1894
  }
1895
- function Dn(s) {
1896
- for (const e of z(s)) if (Ln(e)) return !0;
1895
+ function Bn(s) {
1896
+ for (const e of z(s)) if (Nn(e)) return !0;
1897
1897
  return !1;
1898
1898
  }
1899
1899
  function st(s) {
@@ -1905,47 +1905,47 @@ function st(s) {
1905
1905
  function P(s) {
1906
1906
  return () => st(s);
1907
1907
  }
1908
- const Nn = (s) => {
1908
+ const xn = (s) => {
1909
1909
  const e = {};
1910
1910
  for (const [t, r] of Object.entries(s)) e[t] = r;
1911
1911
  return P(e);
1912
- }, Bn = (s) => {
1912
+ }, jn = (s) => {
1913
1913
  const e = s.source;
1914
1914
  if (e === void 0) return P(void 0);
1915
1915
  const t = [];
1916
1916
  for (const r of e)
1917
1917
  r instanceof Array ? t.push(...r) : t.push(r);
1918
1918
  return P(t);
1919
- }, xn = (s) => {
1919
+ }, Vn = (s) => {
1920
1920
  const e = s.source, t = s.field;
1921
1921
  return e === void 0 || t === void 0 ? P(void 0) : ({ cCtx: r }) => {
1922
1922
  var o;
1923
1923
  return st((o = r.accessor(e).node().traverse(t)) == null ? void 0 : o.persist());
1924
1924
  };
1925
1925
  };
1926
- function fs(s, e) {
1926
+ function ms(s, e) {
1927
1927
  const t = {}, r = s.length;
1928
1928
  for (let o = 0; o < r; o++) t[String(o)] = e(s[o]);
1929
1929
  return t;
1930
1930
  }
1931
- function jn(s, e) {
1931
+ function Un(s, e) {
1932
1932
  return (t) => {
1933
1933
  const r = t.source;
1934
1934
  return r === void 0 ? P(void 0) : () => ({
1935
1935
  type: "ScheduleSubroutine",
1936
- subroutine: gs(r.length),
1937
- args: fs(r, (o) => k({ ...s, [e.itVar]: o }, e.mapping))
1936
+ subroutine: vs(r.length),
1937
+ args: ms(r, (o) => k({ ...s, [e.itVar]: o }, e.mapping))
1938
1938
  });
1939
1939
  };
1940
1940
  }
1941
- function gs(s) {
1941
+ function vs(s) {
1942
1942
  return (e) => {
1943
1943
  const t = [];
1944
1944
  for (let r = 0; r < s; r++) t.push(e[String(r)]);
1945
1945
  return P(t);
1946
1946
  };
1947
1947
  }
1948
- function Vn(s, e) {
1948
+ function Jn(s, e) {
1949
1949
  return (t) => {
1950
1950
  const r = t.source;
1951
1951
  if (r === void 0) return P(void 0);
@@ -1956,34 +1956,34 @@ function Vn(s, e) {
1956
1956
  }
1957
1957
  return () => ({
1958
1958
  type: "ScheduleSubroutine",
1959
- subroutine: Un,
1959
+ subroutine: Gn,
1960
1960
  args: o
1961
1961
  });
1962
1962
  };
1963
1963
  }
1964
- const Un = (s) => P(s), Jn = (s) => {
1964
+ const Gn = (s) => P(s), Mn = (s) => {
1965
1965
  const e = s.arg;
1966
1966
  return P(e === void 0 ? void 0 : e.length === 0);
1967
- }, Gn = (s) => {
1967
+ }, _n = (s) => {
1968
1968
  const e = s.operand;
1969
1969
  return P(e === void 0 ? void 0 : !e);
1970
- }, Mn = (s) => {
1970
+ }, Kn = (s) => {
1971
1971
  const e = s.operand1, t = s.operand2;
1972
1972
  return P(e === void 0 || t === void 0 ? void 0 : e && t);
1973
- }, _n = (s) => {
1973
+ }, Hn = (s) => {
1974
1974
  const e = s.operand1, t = s.operand2;
1975
1975
  return P(e === void 0 || t === void 0 ? void 0 : e || t);
1976
- }, Kn = (s) => {
1976
+ }, Wn = (s) => {
1977
1977
  const e = s.source;
1978
1978
  return e === void 0 ? P(void 0) : ({ cCtx: t }) => {
1979
1979
  var r;
1980
1980
  return st((r = t.accessor(e).node()) == null ? void 0 : r.getDataAsJson());
1981
1981
  };
1982
- }, Hn = (s) => {
1982
+ }, zn = (s) => {
1983
1983
  const e = s.source, t = s.field;
1984
1984
  return P(e === void 0 || t === void 0 ? void 0 : e[t]);
1985
1985
  };
1986
- function Wn(s, e) {
1986
+ function Xn(s, e) {
1987
1987
  return (t) => {
1988
1988
  const r = t.source;
1989
1989
  return r === void 0 ? P(void 0) : ({ cCtx: o }) => {
@@ -1998,13 +1998,13 @@ function Wn(s, e) {
1998
1998
  }
1999
1999
  return {
2000
2000
  type: "ScheduleSubroutine",
2001
- subroutine: zn,
2001
+ subroutine: qn,
2002
2002
  args: i
2003
2003
  };
2004
2004
  };
2005
2005
  };
2006
2006
  }
2007
- const zn = (s) => P(s), Xn = (s) => {
2007
+ const qn = (s) => P(s), Yn = (s) => {
2008
2008
  const e = s.source;
2009
2009
  return e === void 0 ? P(void 0) : ({ drivers: t }) => ({
2010
2010
  type: "ScheduleComputable",
@@ -2018,7 +2018,7 @@ const zn = (s) => P(s), Xn = (s) => {
2018
2018
  }
2019
2019
  )
2020
2020
  });
2021
- }, qn = (s) => {
2021
+ }, Qn = (s) => {
2022
2022
  const e = s.source;
2023
2023
  return e === void 0 ? P(void 0) : ({ cCtx: t, drivers: r }) => {
2024
2024
  const o = t.accessor(e).node().resourceInfo;
@@ -2029,7 +2029,7 @@ const zn = (s) => P(s), Xn = (s) => {
2029
2029
  })
2030
2030
  };
2031
2031
  };
2032
- }, Yn = (s) => {
2032
+ }, Zn = (s) => {
2033
2033
  const e = s.source;
2034
2034
  return e === void 0 ? P(void 0) : ({ drivers: t }) => ({
2035
2035
  type: "ScheduleComputable",
@@ -2045,49 +2045,49 @@ const zn = (s) => P(s), Xn = (s) => {
2045
2045
  }
2046
2046
  )
2047
2047
  });
2048
- }, Qn = (s) => {
2048
+ }, ei = (s) => {
2049
2049
  const e = s.source;
2050
2050
  return e === void 0 ? P(void 0) : ({ drivers: t }) => ({
2051
2051
  type: "ScheduleComputable",
2052
2052
  computable: t.blobDriver.getDownloadedBlob(e)
2053
2053
  });
2054
- }, Zn = (s) => {
2054
+ }, ti = (s) => {
2055
2055
  const e = s.source;
2056
2056
  return e === void 0 ? P(void 0) : ({ drivers: t }) => ({
2057
2057
  type: "ScheduleComputable",
2058
2058
  computable: t.blobDriver.getOnDemandBlob(e)
2059
2059
  });
2060
- }, ei = (s) => (e) => {
2060
+ }, ri = (s) => (e) => {
2061
2061
  const t = e.source;
2062
2062
  return t === void 0 ? P(void 0) : ({ drivers: r }) => ({
2063
2063
  type: "ScheduleComputable",
2064
2064
  computable: r.blobToURLDriver.extractArchiveAndGetURL(t, s)
2065
2065
  });
2066
- }, ti = (s) => {
2066
+ }, si = (s) => {
2067
2067
  const e = s.source;
2068
2068
  return e === void 0 ? P(void 0) : ({ drivers: t }) => ({
2069
2069
  type: "ScheduleComputable",
2070
2070
  computable: t.uploadDriver.getProgressId(e)
2071
2071
  });
2072
- }, ri = (s) => (e) => {
2072
+ }, oi = (s) => (e) => {
2073
2073
  const t = e.source;
2074
2074
  return t === void 0 ? P(void 0) : ({ drivers: r }) => ({
2075
2075
  type: "ScheduleComputable",
2076
2076
  computable: r.logDriver.getLastLogs(t, s)
2077
2077
  });
2078
- }, si = (s) => (e) => {
2078
+ }, ni = (s) => (e) => {
2079
2079
  const t = e.source;
2080
2080
  return t === void 0 ? P(void 0) : ({ drivers: r }) => ({
2081
2081
  type: "ScheduleComputable",
2082
2082
  computable: r.logDriver.getProgressLog(t, s)
2083
2083
  });
2084
- }, oi = (s) => (e) => {
2084
+ }, ii = (s) => (e) => {
2085
2085
  const t = e.source;
2086
2086
  return t === void 0 ? P(void 0) : ({ drivers: r }) => ({
2087
2087
  type: "ScheduleComputable",
2088
2088
  computable: r.logDriver.getProgressLogWithInfo(t, s)
2089
2089
  });
2090
- }, ni = (s) => {
2090
+ }, ai = (s) => {
2091
2091
  const e = s.source;
2092
2092
  return e === void 0 ? P(void 0) : ({ drivers: t }) => ({
2093
2093
  type: "ScheduleComputable",
@@ -2103,14 +2103,14 @@ function k(s, e) {
2103
2103
  case "Isolate":
2104
2104
  return ({ drivers: t }) => ({
2105
2105
  type: "ScheduleComputable",
2106
- computable: ys(t, s, e.cfg)
2106
+ computable: Ss(t, s, e.cfg)
2107
2107
  });
2108
2108
  case "Immediate":
2109
2109
  return P(e.value);
2110
2110
  case "GetJsonField":
2111
2111
  return () => ({
2112
2112
  type: "ScheduleSubroutine",
2113
- subroutine: Hn,
2113
+ subroutine: zn,
2114
2114
  args: {
2115
2115
  source: k(s, e.source),
2116
2116
  field: k(s, e.field)
@@ -2119,7 +2119,7 @@ function k(s, e) {
2119
2119
  case "MapArrayValues":
2120
2120
  return () => ({
2121
2121
  type: "ScheduleSubroutine",
2122
- subroutine: jn(s, e),
2122
+ subroutine: Un(s, e),
2123
2123
  args: {
2124
2124
  source: k(s, e.source)
2125
2125
  }
@@ -2127,7 +2127,7 @@ function k(s, e) {
2127
2127
  case "MapRecordValues":
2128
2128
  return () => ({
2129
2129
  type: "ScheduleSubroutine",
2130
- subroutine: Vn(s, e),
2130
+ subroutine: Jn(s, e),
2131
2131
  args: {
2132
2132
  source: k(s, e.source)
2133
2133
  }
@@ -2135,19 +2135,19 @@ function k(s, e) {
2135
2135
  case "MakeObject":
2136
2136
  return () => ({
2137
2137
  type: "ScheduleSubroutine",
2138
- subroutine: Nn,
2139
- args: Tn(e.template, (t) => k(s, t))
2138
+ subroutine: xn,
2139
+ args: Dn(e.template, (t) => k(s, t))
2140
2140
  });
2141
2141
  case "MakeArray":
2142
2142
  return () => ({
2143
2143
  type: "ScheduleSubroutine",
2144
- subroutine: gs(e.template.length),
2145
- args: fs(e.template, (t) => k(s, t))
2144
+ subroutine: vs(e.template.length),
2145
+ args: ms(e.template, (t) => k(s, t))
2146
2146
  });
2147
2147
  case "Flatten":
2148
2148
  return () => ({
2149
2149
  type: "ScheduleSubroutine",
2150
- subroutine: Bn,
2150
+ subroutine: jn,
2151
2151
  args: {
2152
2152
  source: k(s, e.source)
2153
2153
  }
@@ -2155,7 +2155,7 @@ function k(s, e) {
2155
2155
  case "IsEmpty":
2156
2156
  return () => ({
2157
2157
  type: "ScheduleSubroutine",
2158
- subroutine: Jn,
2158
+ subroutine: Mn,
2159
2159
  args: {
2160
2160
  arg: k(s, e.arg)
2161
2161
  }
@@ -2163,7 +2163,7 @@ function k(s, e) {
2163
2163
  case "Not":
2164
2164
  return () => ({
2165
2165
  type: "ScheduleSubroutine",
2166
- subroutine: Gn,
2166
+ subroutine: _n,
2167
2167
  args: {
2168
2168
  operand: k(s, e.operand)
2169
2169
  }
@@ -2171,7 +2171,7 @@ function k(s, e) {
2171
2171
  case "And":
2172
2172
  return () => ({
2173
2173
  type: "ScheduleSubroutine",
2174
- subroutine: Mn,
2174
+ subroutine: Kn,
2175
2175
  args: {
2176
2176
  operand1: k(s, e.operand1),
2177
2177
  operand2: k(s, e.operand2)
@@ -2180,7 +2180,7 @@ function k(s, e) {
2180
2180
  case "Or":
2181
2181
  return () => ({
2182
2182
  type: "ScheduleSubroutine",
2183
- subroutine: _n,
2183
+ subroutine: Hn,
2184
2184
  args: {
2185
2185
  operand1: k(s, e.operand1),
2186
2186
  operand2: k(s, e.operand2)
@@ -2189,7 +2189,7 @@ function k(s, e) {
2189
2189
  case "MapResourceFields":
2190
2190
  return () => ({
2191
2191
  type: "ScheduleSubroutine",
2192
- subroutine: Wn(s, e),
2192
+ subroutine: Xn(s, e),
2193
2193
  args: {
2194
2194
  source: k(s, e.source)
2195
2195
  }
@@ -2197,7 +2197,7 @@ function k(s, e) {
2197
2197
  case "GetResourceField":
2198
2198
  return () => ({
2199
2199
  type: "ScheduleSubroutine",
2200
- subroutine: xn,
2200
+ subroutine: Vn,
2201
2201
  args: {
2202
2202
  source: k(s, e.source),
2203
2203
  field: k(s, e.field)
@@ -2206,7 +2206,7 @@ function k(s, e) {
2206
2206
  case "GetResourceValueAsJson":
2207
2207
  return () => ({
2208
2208
  type: "ScheduleSubroutine",
2209
- subroutine: Kn,
2209
+ subroutine: Wn,
2210
2210
  args: {
2211
2211
  source: k(s, e.source)
2212
2212
  }
@@ -2214,7 +2214,7 @@ function k(s, e) {
2214
2214
  case "GetBlobContent":
2215
2215
  return () => ({
2216
2216
  type: "ScheduleSubroutine",
2217
- subroutine: Xn,
2217
+ subroutine: Yn,
2218
2218
  args: {
2219
2219
  source: k(s, e.source)
2220
2220
  }
@@ -2222,7 +2222,7 @@ function k(s, e) {
2222
2222
  case "GetBlobContentAsString":
2223
2223
  return () => ({
2224
2224
  type: "ScheduleSubroutine",
2225
- subroutine: qn,
2225
+ subroutine: Qn,
2226
2226
  args: {
2227
2227
  source: k(s, e.source)
2228
2228
  }
@@ -2230,7 +2230,7 @@ function k(s, e) {
2230
2230
  case "GetBlobContentAsJson":
2231
2231
  return () => ({
2232
2232
  type: "ScheduleSubroutine",
2233
- subroutine: Yn,
2233
+ subroutine: Zn,
2234
2234
  args: {
2235
2235
  source: k(s, e.source)
2236
2236
  }
@@ -2238,7 +2238,7 @@ function k(s, e) {
2238
2238
  case "GetDownloadedBlobContent":
2239
2239
  return () => ({
2240
2240
  type: "ScheduleSubroutine",
2241
- subroutine: Qn,
2241
+ subroutine: ei,
2242
2242
  args: {
2243
2243
  source: k(s, e.source)
2244
2244
  }
@@ -2246,7 +2246,7 @@ function k(s, e) {
2246
2246
  case "GetOnDemandBlobContent":
2247
2247
  return () => ({
2248
2248
  type: "ScheduleSubroutine",
2249
- subroutine: Zn,
2249
+ subroutine: ti,
2250
2250
  args: {
2251
2251
  source: k(s, e.source)
2252
2252
  }
@@ -2254,7 +2254,7 @@ function k(s, e) {
2254
2254
  case "ExtractArchiveAndGetURL":
2255
2255
  return () => ({
2256
2256
  type: "ScheduleSubroutine",
2257
- subroutine: ei(e.format),
2257
+ subroutine: ri(e.format),
2258
2258
  args: {
2259
2259
  source: k(s, e.source)
2260
2260
  }
@@ -2262,7 +2262,7 @@ function k(s, e) {
2262
2262
  case "GetImportProgress":
2263
2263
  return () => ({
2264
2264
  type: "ScheduleSubroutine",
2265
- subroutine: ti,
2265
+ subroutine: si,
2266
2266
  args: {
2267
2267
  source: k(s, e.source)
2268
2268
  }
@@ -2270,7 +2270,7 @@ function k(s, e) {
2270
2270
  case "GetLastLogs":
2271
2271
  return () => ({
2272
2272
  type: "ScheduleSubroutine",
2273
- subroutine: ri(e.lines),
2273
+ subroutine: oi(e.lines),
2274
2274
  args: {
2275
2275
  source: k(s, e.source)
2276
2276
  }
@@ -2278,7 +2278,7 @@ function k(s, e) {
2278
2278
  case "GetProgressLog":
2279
2279
  return () => ({
2280
2280
  type: "ScheduleSubroutine",
2281
- subroutine: si(e.patternToSearch),
2281
+ subroutine: ni(e.patternToSearch),
2282
2282
  args: {
2283
2283
  source: k(s, e.source)
2284
2284
  }
@@ -2286,7 +2286,7 @@ function k(s, e) {
2286
2286
  case "GetProgressLogWithInfo":
2287
2287
  return () => ({
2288
2288
  type: "ScheduleSubroutine",
2289
- subroutine: oi(e.patternToSearch),
2289
+ subroutine: ii(e.patternToSearch),
2290
2290
  args: {
2291
2291
  source: k(s, e.source)
2292
2292
  }
@@ -2294,7 +2294,7 @@ function k(s, e) {
2294
2294
  case "GetLogHandle":
2295
2295
  return () => ({
2296
2296
  type: "ScheduleSubroutine",
2297
- subroutine: ni,
2297
+ subroutine: ai,
2298
2298
  args: {
2299
2299
  source: k(s, e.source)
2300
2300
  }
@@ -2303,8 +2303,8 @@ function k(s, e) {
2303
2303
  return K(e);
2304
2304
  }
2305
2305
  }
2306
- const ii = ["$prod", "$staging"];
2307
- function ai(s) {
2306
+ const ci = ["$prod", "$staging"];
2307
+ function li(s) {
2308
2308
  return {
2309
2309
  $blockId: s.blockId,
2310
2310
  $args: (e) => JSON.parse(s.args(e)),
@@ -2316,16 +2316,16 @@ function ai(s) {
2316
2316
  $staging: s.staging
2317
2317
  };
2318
2318
  }
2319
- const ms = Symbol(), vs = "return", ci = { op: ms, arg: vs };
2320
- function li(s) {
2321
- return s.op == ms && s.arg == vs;
2319
+ const ys = Symbol(), ws = "return", ui = { op: ys, arg: ws };
2320
+ function di(s) {
2321
+ return s.op == ys && s.arg == ws;
2322
2322
  }
2323
- function ui() {
2323
+ function pi() {
2324
2324
  return { pendingSubroutines: /* @__PURE__ */ new Map() };
2325
2325
  }
2326
2326
  function yr(s, e, t, r) {
2327
- const o = new Yr(t), n = (a, c) => {
2328
- if (li(a))
2327
+ const o = new Zr(t), n = (a, c) => {
2328
+ if (di(a))
2329
2329
  return e.result = c, !1;
2330
2330
  const u = B(e.pendingSubroutines.get(a.op));
2331
2331
  if (a.arg in u.args) throw new Error("argument already set");
@@ -2377,26 +2377,26 @@ function yr(s, e, t, r) {
2377
2377
  }
2378
2378
  return i;
2379
2379
  }
2380
- function di(s, e, t, r = {}) {
2381
- return ys(s, ai(e), t, r);
2380
+ function hi(s, e, t, r = {}) {
2381
+ return Ss(s, li(e), t, r);
2382
2382
  }
2383
- function ys(s, e, t, r = {}) {
2383
+ function Ss(s, e, t, r = {}) {
2384
2384
  const o = `${e.blockId}#` + Z({
2385
2385
  ctx: Object.fromEntries(
2386
- Object.entries(e).filter(([n]) => ii.indexOf(n) === -1)
2386
+ Object.entries(e).filter(([n]) => ci.indexOf(n) === -1)
2387
2387
  ),
2388
2388
  cfg: t
2389
2389
  });
2390
2390
  return J.makeRaw(
2391
2391
  (n) => {
2392
- const i = { drivers: s, cCtx: n }, a = ui();
2392
+ const i = { drivers: s, cCtx: n }, a = pi();
2393
2393
  return {
2394
2394
  ir: yr(
2395
2395
  i,
2396
2396
  a,
2397
2397
  [
2398
2398
  {
2399
- destination: ci,
2399
+ destination: ui,
2400
2400
  operation: k(e, t)
2401
2401
  }
2402
2402
  ],
@@ -2427,7 +2427,7 @@ function ys(s, e, t, r = {}) {
2427
2427
  { ...r, key: o }
2428
2428
  );
2429
2429
  }
2430
- function pi(s) {
2430
+ function fi(s) {
2431
2431
  return s instanceof ArrayBuffer || ArrayBuffer.isView(s);
2432
2432
  }
2433
2433
  function wr(s) {
@@ -2442,7 +2442,7 @@ class rt {
2442
2442
  w(this, "computableCtx");
2443
2443
  w(this, "accessors", /* @__PURE__ */ new Map());
2444
2444
  w(this, "meta");
2445
- w(this, "errorRepo", new hi());
2445
+ w(this, "errorRepo", new gi());
2446
2446
  //
2447
2447
  // Result Pool
2448
2448
  //
@@ -2558,7 +2558,7 @@ class rt {
2558
2558
  parsePObjectCollection(e, t, r, ...o) {
2559
2559
  const n = this.getAccessor(e);
2560
2560
  if (!n.getIsReadyOrError()) return;
2561
- const i = An(n, t, r, o), a = {};
2561
+ const i = Ln(n, t, r, o), a = {};
2562
2562
  for (const [c, u] of Object.entries(i))
2563
2563
  a[c] = le(u, (l) => this.wrapAccessor(l));
2564
2564
  return a;
@@ -2733,7 +2733,7 @@ class rt {
2733
2733
  "can't instantiate PFrames from this context (most porbably called from the future mapper)"
2734
2734
  );
2735
2735
  return this.env.driverKit.pFrameDriver.createPFrame(
2736
- e.map((t) => le(t, (r) => typeof r == "string" ? this.getAccessor(r) : r)),
2736
+ e.map((t) => le(t, (r) => this.transformInputPData(r))),
2737
2737
  this.computableCtx
2738
2738
  );
2739
2739
  }
@@ -2745,11 +2745,20 @@ class rt {
2745
2745
  return this.env.driverKit.pFrameDriver.createPTable(
2746
2746
  St(
2747
2747
  e,
2748
- (t) => le(t, (r) => typeof r == "string" ? this.getAccessor(r) : r)
2748
+ (t) => le(t, (r) => this.transformInputPData(r))
2749
2749
  ),
2750
2750
  this.computableCtx
2751
2751
  );
2752
2752
  }
2753
+ /**
2754
+ * Transforms input data for PFrame/PTable creation
2755
+ * - Converts string handles to accessors
2756
+ * - Maps accessors in DataInfo objects
2757
+ * - Passes through other values
2758
+ */
2759
+ transformInputPData(e) {
2760
+ return typeof e == "string" ? this.getAccessor(e) : Kr(e) ? Hr(e, (t) => this.getAccessor(t)) : e;
2761
+ }
2753
2762
  //
2754
2763
  // Computable
2755
2764
  //
@@ -2800,7 +2809,7 @@ class rt {
2800
2809
  r = this.vm.null;
2801
2810
  break;
2802
2811
  }
2803
- if (pi(e)) {
2812
+ if (fi(e)) {
2804
2813
  r = this.vm.newArrayBuffer(e), o = !0;
2805
2814
  break;
2806
2815
  }
@@ -2841,7 +2850,7 @@ class rt {
2841
2850
  this.vm.setProp(t, "args", e.manage(this.vm.newString(r))), n !== void 0 && this.vm.setProp(t, "uiState", e.manage(this.vm.newString(n))), o !== void 0 && this.vm.setProp(t, "activeArgs", e.manage(this.vm.newString(o))), this.vm.setProp(t, "callbackRegistry", this.callbackRegistry), this.vm.setProp(
2842
2851
  t,
2843
2852
  "featureFlags",
2844
- this.exportObjectUniversal(Ds.GlobalCfgRenderCtxFeatureFlags, e)
2853
+ this.exportObjectUniversal(Bs.GlobalCfgRenderCtxFeatureFlags, e)
2845
2854
  );
2846
2855
  const i = (a, c) => {
2847
2856
  const u = (...l) => {
@@ -2934,7 +2943,7 @@ class rt {
2934
2943
  });
2935
2944
  }
2936
2945
  }
2937
- class hi {
2946
+ class gi {
2938
2947
  constructor() {
2939
2948
  w(this, "errorIdToError", /* @__PURE__ */ new Map());
2940
2949
  }
@@ -2951,7 +2960,7 @@ class hi {
2951
2960
  }
2952
2961
  /** Returns the original error that was stored by parsing uuid of mimicrated error. */
2953
2962
  getOriginal(e) {
2954
- if (!(e instanceof co.QuickJSUnwrapError))
2963
+ if (!(e instanceof uo.QuickJSUnwrapError))
2955
2964
  return console.warn("ErrorRepo: quickJSError is not a QuickJSUnwrapError", Ue(e)), e;
2956
2965
  if (!("name" in e.cause))
2957
2966
  return console.warn("ErrorRepo: quickJSError.cause is not an Error", Ue(e)), e;
@@ -2961,10 +2970,10 @@ class hi {
2961
2970
  const o = this.errorIdToError.get(r);
2962
2971
  if (o === void 0)
2963
2972
  throw new Error(`ErrorRepo: errorId not found: ${r}, ${Ue(e)}`);
2964
- return new fi(e, o);
2973
+ return new mi(e, o);
2965
2974
  }
2966
2975
  }
2967
- class fi extends Error {
2976
+ class mi extends Error {
2968
2977
  constructor(t, r) {
2969
2978
  var o;
2970
2979
  super("", { cause: r });
@@ -2980,7 +2989,7 @@ ${this.stack}
2980
2989
  }
2981
2990
  }
2982
2991
  function ot(s, e) {
2983
- return Ie(
2992
+ return Fe(
2984
2993
  s.traverse(
2985
2994
  {
2986
2995
  field: U(e, "blockPack"),
@@ -2990,13 +2999,13 @@ function ot(s, e) {
2990
2999
  { field: A.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 }
2991
3000
  ),
2992
3001
  (t) => {
2993
- const r = t.getDataAsJson(), o = Kr(r.config);
3002
+ const r = t.getDataAsJson(), o = Wr(r.config);
2994
3003
  return { bpId: t.resourceInfo.id.toString(), info: r, cfg: o };
2995
3004
  }
2996
3005
  );
2997
3006
  }
2998
3007
  const He = process.env.MI_LOG_OUTPUT_STATUS;
2999
- function gi(s, e, t, r, o, n = {}) {
3008
+ function vi(s, e, t, r, o, n = {}) {
3000
3009
  const i = `${e.blockId}#lambda#${o}#${t.handle}`;
3001
3010
  return n = { ...n, key: i }, n.mode === void 0 && t.retentive === !0 && (n.mode = "StableOnlyRetentive"), J.makeRaw((a) => {
3002
3011
  const c = new Et();
@@ -3020,16 +3029,16 @@ function gi(s, e, t, r, o, n = {}) {
3020
3029
  };
3021
3030
  }, n);
3022
3031
  }
3023
- function mi(s) {
3024
- return Hr(s) ? s.isActive === !0 : Dn(s);
3032
+ function yi(s) {
3033
+ return zr(s) ? s.isActive === !0 : Bn(s);
3025
3034
  }
3026
3035
  function Ae(s, e, t, r, o, n = {}) {
3027
- if (Hr(t)) {
3036
+ if (zr(t)) {
3028
3037
  if (r === void 0) throw new Error("No code bundle.");
3029
- return gi(s, e, t, r, o, n);
3030
- } else return di(s.driverKit, e, t, n);
3038
+ return vi(s, e, t, r, o, n);
3039
+ } else return hi(s.driverKit, e, t, n);
3031
3040
  }
3032
- function vi(s, e, t) {
3041
+ function wi(s, e, t) {
3033
3042
  return J.make(
3034
3043
  (r) => {
3035
3044
  var E, g, D, T, j, $, G, he;
@@ -3070,50 +3079,50 @@ function vi(s, e, t) {
3070
3079
  l.set(L, { currentArguments: X.getDataAsJson(), prod: ie });
3071
3080
  }
3072
3081
  const d = Qe(c, (L) => l.get(L).currentArguments), f = new Set(u.blocksInLimbo), h = [...oe(c)].map(({ id: L, label: X, renderingMode: ie }) => {
3073
- var S, R, O, C, I;
3082
+ var S, R, O, C, F;
3074
3083
  const W = B(l.get(L)), M = B(d.nodes.get(L));
3075
3084
  let V = "NotCalculated";
3076
3085
  W.prod !== void 0 && (f.has(L) ? V = "Limbo" : V = W.prod.finished ? "Done" : "Running");
3077
- const q = ot(o, L), { sections: fe, title: v, inputsValid: p, sdkVersion: m } = Ie(q, ({ bpId: N, cfg: F }) => {
3086
+ const q = ot(o, L), { sections: fe, title: v, inputsValid: p, sdkVersion: m } = Fe(q, ({ bpId: N, cfg: I }) => {
3078
3087
  const ne = Ut(s, L);
3079
3088
  return {
3080
3089
  sections: Ae(
3081
3090
  t,
3082
3091
  ne,
3083
- F.sections,
3084
- F.code,
3092
+ I.sections,
3093
+ I.code,
3085
3094
  N
3086
3095
  ).wrap({
3087
3096
  recover: (Re) => (t.logger.error("Error in block model sections"), t.logger.error(Re), [])
3088
3097
  }),
3089
- title: Ie(
3090
- F.title,
3098
+ title: Fe(
3099
+ I.title,
3091
3100
  (Re) => Ae(
3092
3101
  t,
3093
3102
  ne,
3094
3103
  Re,
3095
- F.code,
3104
+ I.code,
3096
3105
  N
3097
3106
  ).wrap({
3098
- recover: (Is) => (t.logger.error("Error in block model title"), t.logger.error(Is), "Invalid title")
3107
+ recover: (Ts) => (t.logger.error("Error in block model title"), t.logger.error(Ts), "Invalid title")
3099
3108
  })
3100
3109
  ),
3101
3110
  inputsValid: Ae(
3102
3111
  t,
3103
3112
  ne,
3104
- F.inputsValid,
3105
- F.code,
3113
+ I.inputsValid,
3114
+ I.code,
3106
3115
  N
3107
3116
  ).wrap({
3108
3117
  recover: (Re) => (t.logger.error("Error in block model argsValid"), t.logger.error(Re), !1)
3109
3118
  }),
3110
- sdkVersion: F.sdkVersion
3119
+ sdkVersion: I.sdkVersion
3111
3120
  };
3112
3121
  }) || {}, y = o.traverse({
3113
3122
  field: U(L, "blockSettings"),
3114
3123
  assertFieldType: "Dynamic",
3115
3124
  errorIfFieldNotSet: !0
3116
- }).getDataAsJson(), b = Ie(
3125
+ }).getDataAsJson(), b = Fe(
3117
3126
  q,
3118
3127
  ({ info: N }) => t.blockUpdateWatcher.get({ currentSpec: N.source, settings: y })
3119
3128
  );
@@ -3135,7 +3144,7 @@ function vi(s, e, t) {
3135
3144
  sections: fe,
3136
3145
  inputsValid: p,
3137
3146
  updateInfo: {},
3138
- currentBlockPack: (I = q == null ? void 0 : q.info) == null ? void 0 : I.source,
3147
+ currentBlockPack: (F = q == null ? void 0 : q.info) == null ? void 0 : F.source,
3139
3148
  updates: b,
3140
3149
  sdkVersion: m,
3141
3150
  navigationState: e.getState(L)
@@ -3171,13 +3180,13 @@ function vi(s, e, t) {
3171
3180
  }
3172
3181
  ).withStableType();
3173
3182
  }
3174
- function yi(s, e) {
3183
+ function Si(s, e) {
3175
3184
  const t = s.node();
3176
- if (ce(t.resourceType, is)) {
3185
+ if (ce(t.resourceType, cs)) {
3177
3186
  const r = t.getDataAsJson();
3178
3187
  if (r === void 0) throw new Error("No resource data.");
3179
3188
  return e.frontendDownloadDriver.getPath(new URL(r.url)).withStableType();
3180
- } else if (ce(t.resourceType, as)) {
3189
+ } else if (ce(t.resourceType, ls)) {
3181
3190
  const r = t.getDataAsJson();
3182
3191
  if (r === void 0) throw new Error("No resource data.");
3183
3192
  return e.signer.verify(
@@ -3188,10 +3197,10 @@ function yi(s, e) {
3188
3197
  } else
3189
3198
  throw new Error(`Unsupported resource type: ${JSON.stringify(t.resourceType)}`);
3190
3199
  }
3191
- function wi(s, e) {
3200
+ function bi(s, e) {
3192
3201
  if (s !== void 0)
3193
3202
  return J.make(
3194
- (t) => yi(t.accessor(s), e),
3203
+ (t) => Si(t.accessor(s), e),
3195
3204
  {
3196
3205
  postprocessValue: (t) => {
3197
3206
  if (t !== void 0) {
@@ -3203,7 +3212,7 @@ function wi(s, e) {
3203
3212
  }
3204
3213
  ).withStableType();
3205
3214
  }
3206
- function Si(s, e, t) {
3215
+ function Ri(s, e, t) {
3207
3216
  return J.make(
3208
3217
  (r) => {
3209
3218
  var a;
@@ -3213,19 +3222,19 @@ function Si(s, e, t) {
3213
3222
  assertFieldType: "Dynamic"
3214
3223
  },
3215
3224
  { field: A.HolderRefField, assertFieldType: "Input", errorIfFieldNotFound: !0 },
3216
- { field: ls, assertFieldType: "Input" }
3225
+ { field: ds, assertFieldType: "Input" }
3217
3226
  )) == null ? void 0 : a.persist();
3218
3227
  return {
3219
- path: wi(i, t),
3228
+ path: bi(i, t),
3220
3229
  sdkVersion: n == null ? void 0 : n.cfg.sdkVersion
3221
3230
  };
3222
3231
  },
3223
3232
  { mode: "StableOnlyLive" }
3224
3233
  );
3225
3234
  }
3226
- function ws(s, e, t) {
3235
+ function bs(s, e, t) {
3227
3236
  if (t === void 0)
3228
- return J.make((i) => ws(s, e, i), {
3237
+ return J.make((i) => bs(s, e, i), {
3229
3238
  key: `inputs#${we(s.rid)}#${e}`
3230
3239
  });
3231
3240
  const r = t.accessor(s).node(), o = Ut(s, e), n = o.uiState(t);
@@ -3235,11 +3244,11 @@ function ws(s, e, t) {
3235
3244
  ui: n !== void 0 ? JSON.parse(n) : void 0
3236
3245
  };
3237
3246
  }
3238
- function bi(s, e, t) {
3247
+ function Ei(s, e, t) {
3239
3248
  return J.make(
3240
3249
  (r) => {
3241
- const o = r.accessor(s).node(), n = hs(s, e);
3242
- return Ie(ot(o, e), ({ cfg: i, bpId: a }) => {
3250
+ const o = r.accessor(s).node(), n = gs(s, e);
3251
+ return Fe(ot(o, e), ({ cfg: i, bpId: a }) => {
3243
3252
  const c = {};
3244
3253
  for (const [u, l] of Object.entries(i.outputs)) {
3245
3254
  const d = Ae(t, n, l, i.code, a);
@@ -3251,15 +3260,15 @@ function bi(s, e, t) {
3251
3260
  { key: "outputs#" + we(s.rid) + "#" + e }
3252
3261
  ).withStableType();
3253
3262
  }
3254
- function Ri(s, e) {
3263
+ function Ci(s, e) {
3255
3264
  return J.make((t) => {
3256
3265
  const r = t.accessor(s).node(), o = B(r.getKeyValueAsJson(pe)), n = [];
3257
3266
  for (const { id: i } of oe(o)) {
3258
3267
  const a = ot(r, i);
3259
3268
  if (a === void 0) continue;
3260
- const c = Object.entries(a.cfg.outputs).map(([, l]) => l).filter((l) => mi(l)).map((l) => l);
3269
+ const c = Object.entries(a.cfg.outputs).map(([, l]) => l).filter((l) => yi(l)).map((l) => l);
3261
3270
  if (c.length === 0) continue;
3262
- const u = hs(r.persist(), i);
3271
+ const u = gs(r.persist(), i);
3263
3272
  for (const l of c)
3264
3273
  n.push(
3265
3274
  J.wrapError(Ae(e, u, l, a.cfg.code, a.bpId))
@@ -3268,7 +3277,7 @@ function Ri(s, e) {
3268
3277
  return n;
3269
3278
  });
3270
3279
  }
3271
- class Ei {
3280
+ class Pi {
3272
3281
  constructor() {
3273
3282
  w(this, "states", /* @__PURE__ */ new Map());
3274
3283
  }
@@ -3282,7 +3291,7 @@ class Ei {
3282
3291
  }
3283
3292
  readState(e, t) {
3284
3293
  let r = this.states.get(t);
3285
- return r === void 0 && (r = { state: { ...Ns }, change: new sr() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3294
+ return r === void 0 && (r = { state: { ...xs }, change: new sr() }, this.states.set(t, r)), r.change.attachWatcher(e.watcher), r.state;
3286
3295
  }
3287
3296
  getState(e) {
3288
3297
  return J.make(
@@ -3304,32 +3313,32 @@ class Jt {
3304
3313
  w(this, "rid");
3305
3314
  /** Data for the left panel, contain basic information about block status. */
3306
3315
  w(this, "overview");
3307
- w(this, "navigationStates", new Ei());
3316
+ w(this, "navigationStates", new Pi());
3308
3317
  w(this, "blockComputables", /* @__PURE__ */ new Map());
3309
3318
  w(this, "blockFrontends", /* @__PURE__ */ new Map());
3310
3319
  w(this, "activeConfigs");
3311
3320
  w(this, "refreshLoopResult");
3312
3321
  w(this, "abortController", new AbortController());
3313
3322
  w(this, "destroyed", !1);
3314
- this.env = e, this.projectTree = r, this.overview = vi(
3323
+ this.env = e, this.projectTree = r, this.overview = wi(
3315
3324
  r.entry(),
3316
3325
  this.navigationStates,
3317
3326
  e
3318
- ).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = Ri(r.entry(), e);
3327
+ ).withPreCalculatedValueTree(), this.rid = t, this.refreshLoopResult = this.refreshLoop(), this.activeConfigs = Ci(r.entry(), e);
3319
3328
  }
3320
3329
  async refreshLoop() {
3321
3330
  for (; !this.destroyed; )
3322
3331
  try {
3323
3332
  await Ke(this.env.pl, this.rid, (e) => {
3324
3333
  e.doRefresh(this.env.ops.stagingRenderingRate);
3325
- }), await this.activeConfigs.getValue(), await Qr(this.env.ops.projectRefreshInterval, this.abortController.signal);
3334
+ }), await this.activeConfigs.getValue(), await es(this.env.ops.projectRefreshInterval, this.abortController.signal);
3326
3335
  } catch (e) {
3327
- if (qs(e)) {
3336
+ if (Qs(e)) {
3328
3337
  console.warn(
3329
3338
  "project refresh routine terminated, because project was externally deleted"
3330
3339
  );
3331
3340
  break;
3332
- } else if (!Ys(e))
3341
+ } else if (!Zs(e))
3333
3342
  throw new Error("Unexpected exception", { cause: e });
3334
3343
  }
3335
3344
  }
@@ -3345,7 +3354,7 @@ class Jt {
3345
3354
  * @return returns newly created block id
3346
3355
  * */
3347
3356
  async addBlock(e, t, r, o = void 0, n = Se()) {
3348
- const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = Kr(a);
3357
+ const i = await this.env.bpPreparer.prepare(t), a = await this.env.bpPreparer.getBlockConfigContainer(t), c = Wr(a);
3349
3358
  return await Q(
3350
3359
  this.env.pl,
3351
3360
  this.rid,
@@ -3510,10 +3519,10 @@ class Jt {
3510
3519
  getBlockComputables(e) {
3511
3520
  const t = this.blockComputables.get(e);
3512
3521
  if (t === void 0) {
3513
- const r = bi(this.projectTree.entry(), e, this.env), n = {
3522
+ const r = Ei(this.projectTree.entry(), e, this.env), n = {
3514
3523
  fullState: J.make(
3515
3524
  (i) => ({
3516
- argsAndUiState: ws(this.projectTree.entry(), e, i),
3525
+ argsAndUiState: bs(this.projectTree.entry(), e, i),
3517
3526
  outputs: r,
3518
3527
  navigationState: this.navigationStates.getState(e)
3519
3528
  }),
@@ -3544,7 +3553,7 @@ class Jt {
3544
3553
  getBlockFrontend(e) {
3545
3554
  const t = this.blockFrontends.get(e);
3546
3555
  if (t === void 0) {
3547
- const r = Si(
3556
+ const r = Ri(
3548
3557
  this.projectTree.entry(),
3549
3558
  e,
3550
3559
  this.env
@@ -3566,12 +3575,12 @@ class Jt {
3566
3575
  static async init(e, t) {
3567
3576
  await Ke(e.pl, t, (o) => {
3568
3577
  });
3569
- const r = await Xr.init(
3578
+ const r = await Yr.init(
3570
3579
  e.pl,
3571
3580
  t,
3572
3581
  {
3573
3582
  ...e.ops.defaultTreeOptions,
3574
- pruning: Ci
3583
+ pruning: ki
3575
3584
  },
3576
3585
  e.logger
3577
3586
  );
@@ -3581,13 +3590,13 @@ class Jt {
3581
3590
  var c, u;
3582
3591
  return (((c = a.data) == null ? void 0 : c.byteLength) ?? 0) - (((u = i.data) == null ? void 0 : u.byteLength) ?? 0);
3583
3592
  });
3584
- const n = eo(o);
3593
+ const n = ro(o);
3585
3594
  await er.writeFile(`${we(t)}.json`, Sr(o)), await er.writeFile(`${we(t)}.stats.json`, Sr(n));
3586
3595
  }
3587
3596
  return new Jt(e, t, r);
3588
3597
  }
3589
3598
  }
3590
- function Ci(s) {
3599
+ function ki(s) {
3591
3600
  switch (s.type.name) {
3592
3601
  case "BlockPackCustom":
3593
3602
  return s.fields.filter((e) => e.name !== "template");
@@ -3599,8 +3608,8 @@ function Ci(s) {
3599
3608
  return s.fields;
3600
3609
  }
3601
3610
  }
3602
- const Ss = {
3603
- logger: new Ms(),
3611
+ const Rs = {
3612
+ logger: new Ks(),
3604
3613
  blobDriverOps: {
3605
3614
  cacheSoftSizeBytes: 8 * 1024 * 1024 * 1024,
3606
3615
  // 8 GB
@@ -3623,14 +3632,14 @@ const Ss = {
3623
3632
  stopPollingDelay: 1e3
3624
3633
  }
3625
3634
  };
3626
- function bs(s) {
3635
+ function Es(s) {
3627
3636
  return {
3628
3637
  blobDownloadPath: _.join(s, "download"),
3629
3638
  downloadBlobToURLPath: _.join(s, "downloadToURL")
3630
3639
  };
3631
3640
  }
3632
- const Pi = {
3633
- ...Ss,
3641
+ const Oi = {
3642
+ ...Rs,
3634
3643
  defaultTreeOptions: {
3635
3644
  pollingInterval: 350,
3636
3645
  stopPollingDelay: 2500,
@@ -3644,18 +3653,18 @@ const Pi = {
3644
3653
  projectRefreshInterval: 700,
3645
3654
  stagingRenderingRate: 5
3646
3655
  };
3647
- function ki(s) {
3656
+ function $i(s) {
3648
3657
  return {
3649
- ...bs(s),
3658
+ ...Es(s),
3650
3659
  frontendDownloadPath: _.join(s, "frontend")
3651
3660
  };
3652
3661
  }
3653
- function Oi(s) {
3662
+ function Ii(s) {
3654
3663
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
3655
3664
  }
3656
3665
  var At = { exports: {} };
3657
- const $i = "2.0.0", Rs = 256, Fi = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
3658
- 9007199254740991, Ii = 16, Ai = Rs - 6, Ti = [
3666
+ const Fi = "2.0.0", Cs = 256, Ai = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
3667
+ 9007199254740991, Ti = 16, Li = Cs - 6, Di = [
3659
3668
  "major",
3660
3669
  "premajor",
3661
3670
  "minor",
@@ -3665,18 +3674,18 @@ const $i = "2.0.0", Rs = 256, Fi = Number.MAX_SAFE_INTEGER || /* istanbul ignore
3665
3674
  "prerelease"
3666
3675
  ];
3667
3676
  var nt = {
3668
- MAX_LENGTH: Rs,
3669
- MAX_SAFE_COMPONENT_LENGTH: Ii,
3670
- MAX_SAFE_BUILD_LENGTH: Ai,
3671
- MAX_SAFE_INTEGER: Fi,
3672
- RELEASE_TYPES: Ti,
3673
- SEMVER_SPEC_VERSION: $i,
3677
+ MAX_LENGTH: Cs,
3678
+ MAX_SAFE_COMPONENT_LENGTH: Ti,
3679
+ MAX_SAFE_BUILD_LENGTH: Li,
3680
+ MAX_SAFE_INTEGER: Ai,
3681
+ RELEASE_TYPES: Di,
3682
+ SEMVER_SPEC_VERSION: Fi,
3674
3683
  FLAG_INCLUDE_PRERELEASE: 1,
3675
3684
  FLAG_LOOSE: 2
3676
3685
  };
3677
- const Li = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
3686
+ const Ni = typeof process == "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...s) => console.error("SEMVER", ...s) : () => {
3678
3687
  };
3679
- var it = Li;
3688
+ var it = Ni;
3680
3689
  (function(s, e) {
3681
3690
  const {
3682
3691
  MAX_SAFE_COMPONENT_LENGTH: t,
@@ -3701,20 +3710,20 @@ var it = Li;
3701
3710
  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*$");
3702
3711
  })(At, At.exports);
3703
3712
  var xe = At.exports;
3704
- const Di = Object.freeze({ loose: !0 }), Ni = Object.freeze({}), Bi = (s) => s ? typeof s != "object" ? Di : s : Ni;
3705
- var Gt = Bi;
3706
- const br = /^[0-9]+$/, Es = (s, e) => {
3713
+ const Bi = Object.freeze({ loose: !0 }), xi = Object.freeze({}), ji = (s) => s ? typeof s != "object" ? Bi : s : xi;
3714
+ var Gt = ji;
3715
+ const br = /^[0-9]+$/, Ps = (s, e) => {
3707
3716
  const t = br.test(s), r = br.test(e);
3708
3717
  return t && r && (s = +s, e = +e), s === e ? 0 : t && !r ? -1 : r && !t ? 1 : s < e ? -1 : 1;
3709
- }, xi = (s, e) => Es(e, s);
3710
- var Cs = {
3711
- compareIdentifiers: Es,
3712
- rcompareIdentifiers: xi
3718
+ }, Vi = (s, e) => Ps(e, s);
3719
+ var ks = {
3720
+ compareIdentifiers: Ps,
3721
+ rcompareIdentifiers: Vi
3713
3722
  };
3714
- const We = it, { MAX_LENGTH: Rr, MAX_SAFE_INTEGER: ze } = nt, { safeRe: Er, safeSrc: Cr, t: Xe } = xe, ji = Gt, { compareIdentifiers: ge } = Cs;
3715
- let Vi = class re {
3723
+ const We = it, { MAX_LENGTH: Rr, MAX_SAFE_INTEGER: ze } = nt, { safeRe: Er, safeSrc: Cr, t: Xe } = xe, Ui = Gt, { compareIdentifiers: ge } = ks;
3724
+ let Ji = class re {
3716
3725
  constructor(e, t) {
3717
- if (t = ji(t), e instanceof re) {
3726
+ if (t = Ui(t), e instanceof re) {
3718
3727
  if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease)
3719
3728
  return e;
3720
3729
  e = e.version;
@@ -3862,8 +3871,8 @@ let Vi = class re {
3862
3871
  return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
3863
3872
  }
3864
3873
  };
3865
- var H = Vi;
3866
- const Pr = H, Ui = (s, e, t = !1) => {
3874
+ var H = Ji;
3875
+ const Pr = H, Gi = (s, e, t = !1) => {
3867
3876
  if (s instanceof Pr)
3868
3877
  return s;
3869
3878
  try {
@@ -3874,18 +3883,18 @@ const Pr = H, Ui = (s, e, t = !1) => {
3874
3883
  throw r;
3875
3884
  }
3876
3885
  };
3877
- var be = Ui;
3878
- const Ji = be, Gi = (s, e) => {
3879
- const t = Ji(s, e);
3886
+ var be = Gi;
3887
+ const Mi = be, _i = (s, e) => {
3888
+ const t = Mi(s, e);
3880
3889
  return t ? t.version : null;
3881
3890
  };
3882
- var Mi = Gi;
3883
- const _i = be, Ki = (s, e) => {
3884
- const t = _i(s.trim().replace(/^[=v]+/, ""), e);
3891
+ var Ki = _i;
3892
+ const Hi = be, Wi = (s, e) => {
3893
+ const t = Hi(s.trim().replace(/^[=v]+/, ""), e);
3885
3894
  return t ? t.version : null;
3886
3895
  };
3887
- var Hi = Ki;
3888
- const kr = H, Wi = (s, e, t, r, o) => {
3896
+ var zi = Wi;
3897
+ const kr = H, Xi = (s, e, t, r, o) => {
3889
3898
  typeof t == "string" && (o = r, r = t, t = void 0);
3890
3899
  try {
3891
3900
  return new kr(
@@ -3896,8 +3905,8 @@ const kr = H, Wi = (s, e, t, r, o) => {
3896
3905
  return null;
3897
3906
  }
3898
3907
  };
3899
- var zi = Wi;
3900
- const Or = be, Xi = (s, e) => {
3908
+ var qi = Xi;
3909
+ const Or = be, Yi = (s, e) => {
3901
3910
  const t = Or(s, null, !0), r = Or(e, null, !0), o = t.compare(r);
3902
3911
  if (o === 0)
3903
3912
  return null;
@@ -3911,46 +3920,46 @@ const Or = be, Xi = (s, e) => {
3911
3920
  const l = c ? "pre" : "";
3912
3921
  return t.major !== r.major ? l + "major" : t.minor !== r.minor ? l + "minor" : t.patch !== r.patch ? l + "patch" : "prerelease";
3913
3922
  };
3914
- var qi = Xi;
3915
- const Yi = H, Qi = (s, e) => new Yi(s, e).major;
3916
- var Zi = Qi;
3917
- const ea = H, ta = (s, e) => new ea(s, e).minor;
3918
- var ra = ta;
3919
- const sa = H, oa = (s, e) => new sa(s, e).patch;
3920
- var na = oa;
3921
- const ia = be, aa = (s, e) => {
3922
- const t = ia(s, e);
3923
+ var Qi = Yi;
3924
+ const Zi = H, ea = (s, e) => new Zi(s, e).major;
3925
+ var ta = ea;
3926
+ const ra = H, sa = (s, e) => new ra(s, e).minor;
3927
+ var oa = sa;
3928
+ const na = H, ia = (s, e) => new na(s, e).patch;
3929
+ var aa = ia;
3930
+ const ca = be, la = (s, e) => {
3931
+ const t = ca(s, e);
3923
3932
  return t && t.prerelease.length ? t.prerelease : null;
3924
3933
  };
3925
- var ca = aa;
3926
- const $r = H, la = (s, e, t) => new $r(s, t).compare(new $r(e, t));
3927
- var ee = la;
3928
- const ua = ee, da = (s, e, t) => ua(e, s, t);
3929
- var pa = da;
3930
- const ha = ee, fa = (s, e) => ha(s, e, !0);
3931
- var ga = fa;
3932
- const Fr = H, ma = (s, e, t) => {
3933
- const r = new Fr(s, t), o = new Fr(e, t);
3934
+ var ua = la;
3935
+ const $r = H, da = (s, e, t) => new $r(s, t).compare(new $r(e, t));
3936
+ var ee = da;
3937
+ const pa = ee, ha = (s, e, t) => pa(e, s, t);
3938
+ var fa = ha;
3939
+ const ga = ee, ma = (s, e) => ga(s, e, !0);
3940
+ var va = ma;
3941
+ const Ir = H, ya = (s, e, t) => {
3942
+ const r = new Ir(s, t), o = new Ir(e, t);
3934
3943
  return r.compare(o) || r.compareBuild(o);
3935
3944
  };
3936
- var Mt = ma;
3937
- const va = Mt, ya = (s, e) => s.sort((t, r) => va(t, r, e));
3938
- var wa = ya;
3939
- const Sa = Mt, ba = (s, e) => s.sort((t, r) => Sa(r, t, e));
3940
- var Ra = ba;
3941
- const Ea = ee, Ca = (s, e, t) => Ea(s, e, t) > 0;
3942
- var at = Ca;
3943
- const Pa = ee, ka = (s, e, t) => Pa(s, e, t) < 0;
3944
- var _t = ka;
3945
- const Oa = ee, $a = (s, e, t) => Oa(s, e, t) === 0;
3946
- var Ps = $a;
3947
- const Fa = ee, Ia = (s, e, t) => Fa(s, e, t) !== 0;
3948
- var ks = Ia;
3949
- const Aa = ee, Ta = (s, e, t) => Aa(s, e, t) >= 0;
3950
- var Kt = Ta;
3951
- const La = ee, Da = (s, e, t) => La(s, e, t) <= 0;
3952
- var Ht = Da;
3953
- const Na = Ps, Ba = ks, xa = at, ja = Kt, Va = _t, Ua = Ht, Ja = (s, e, t, r) => {
3945
+ var Mt = ya;
3946
+ const wa = Mt, Sa = (s, e) => s.sort((t, r) => wa(t, r, e));
3947
+ var ba = Sa;
3948
+ const Ra = Mt, Ea = (s, e) => s.sort((t, r) => Ra(r, t, e));
3949
+ var Ca = Ea;
3950
+ const Pa = ee, ka = (s, e, t) => Pa(s, e, t) > 0;
3951
+ var at = ka;
3952
+ const Oa = ee, $a = (s, e, t) => Oa(s, e, t) < 0;
3953
+ var _t = $a;
3954
+ const Ia = ee, Fa = (s, e, t) => Ia(s, e, t) === 0;
3955
+ var Os = Fa;
3956
+ const Aa = ee, Ta = (s, e, t) => Aa(s, e, t) !== 0;
3957
+ var $s = Ta;
3958
+ const La = ee, Da = (s, e, t) => La(s, e, t) >= 0;
3959
+ var Kt = Da;
3960
+ const Na = ee, Ba = (s, e, t) => Na(s, e, t) <= 0;
3961
+ var Ht = Ba;
3962
+ const xa = Os, ja = $s, Va = at, Ua = Kt, Ja = _t, Ga = Ht, Ma = (s, e, t, r) => {
3954
3963
  switch (e) {
3955
3964
  case "===":
3956
3965
  return typeof s == "object" && (s = s.version), typeof t == "object" && (t = t.version), s === t;
@@ -3959,24 +3968,24 @@ const Na = Ps, Ba = ks, xa = at, ja = Kt, Va = _t, Ua = Ht, Ja = (s, e, t, r) =>
3959
3968
  case "":
3960
3969
  case "=":
3961
3970
  case "==":
3962
- return Na(s, t, r);
3971
+ return xa(s, t, r);
3963
3972
  case "!=":
3964
- return Ba(s, t, r);
3973
+ return ja(s, t, r);
3965
3974
  case ">":
3966
- return xa(s, t, r);
3975
+ return Va(s, t, r);
3967
3976
  case ">=":
3968
- return ja(s, t, r);
3977
+ return Ua(s, t, r);
3969
3978
  case "<":
3970
- return Va(s, t, r);
3979
+ return Ja(s, t, r);
3971
3980
  case "<=":
3972
- return Ua(s, t, r);
3981
+ return Ga(s, t, r);
3973
3982
  default:
3974
3983
  throw new TypeError(`Invalid operator: ${e}`);
3975
3984
  }
3976
3985
  };
3977
- var Os = Ja;
3978
- const Ga = H, Ma = be, { safeRe: qe, t: Ye } = xe, _a = (s, e) => {
3979
- if (s instanceof Ga)
3986
+ var Is = Ma;
3987
+ const _a = H, Ka = be, { safeRe: qe, t: Ye } = xe, Ha = (s, e) => {
3988
+ if (s instanceof _a)
3980
3989
  return s;
3981
3990
  if (typeof s == "number" && (s = String(s)), typeof s != "string")
3982
3991
  return null;
@@ -3994,10 +4003,10 @@ const Ga = H, Ma = be, { safeRe: qe, t: Ye } = xe, _a = (s, e) => {
3994
4003
  if (t === null)
3995
4004
  return null;
3996
4005
  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]}` : "";
3997
- return Ma(`${r}.${o}.${n}${i}${a}`, e);
4006
+ return Ka(`${r}.${o}.${n}${i}${a}`, e);
3998
4007
  };
3999
- var Ka = _a;
4000
- class Ha {
4008
+ var Wa = Ha;
4009
+ class za {
4001
4010
  constructor() {
4002
4011
  this.max = 1e3, this.map = /* @__PURE__ */ new Map();
4003
4012
  }
@@ -4020,10 +4029,10 @@ class Ha {
4020
4029
  return this;
4021
4030
  }
4022
4031
  }
4023
- var Wa = Ha, ft, Ir;
4032
+ var Xa = za, ft, Fr;
4024
4033
  function te() {
4025
- if (Ir) return ft;
4026
- Ir = 1;
4034
+ if (Fr) return ft;
4035
+ Fr = 1;
4027
4036
  const s = /\s+/g;
4028
4037
  class e {
4029
4038
  constructor(p, m) {
@@ -4071,13 +4080,13 @@ function te() {
4071
4080
  return b;
4072
4081
  const S = this.options.loose, R = S ? c[u.HYPHENRANGELOOSE] : c[u.HYPHENRANGE];
4073
4082
  p = p.replace(R, q(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);
4074
- let O = p.split(" ").map((F) => j(F, this.options)).join(" ").split(/\s+/).map((F) => V(F, this.options));
4075
- S && (O = O.filter((F) => (i("loose invalid filter", F, this.options), !!F.match(c[u.COMPARATORLOOSE])))), i("range list", O);
4076
- const C = /* @__PURE__ */ new Map(), I = O.map((F) => new n(F, this.options));
4077
- for (const F of I) {
4078
- if (g(F))
4079
- return [F];
4080
- C.set(F.value, F);
4083
+ let O = p.split(" ").map((I) => j(I, this.options)).join(" ").split(/\s+/).map((I) => V(I, this.options));
4084
+ S && (O = O.filter((I) => (i("loose invalid filter", I, this.options), !!I.match(c[u.COMPARATORLOOSE])))), i("range list", O);
4085
+ const C = /* @__PURE__ */ new Map(), F = O.map((I) => new n(I, this.options));
4086
+ for (const I of F) {
4087
+ if (g(I))
4088
+ return [I];
4089
+ C.set(I.value, I);
4081
4090
  }
4082
4091
  C.size > 1 && C.has("") && C.delete("");
4083
4092
  const N = [...C.values()];
@@ -4105,7 +4114,7 @@ function te() {
4105
4114
  }
4106
4115
  }
4107
4116
  ft = e;
4108
- const t = Wa, r = new t(), o = Gt, n = ct(), i = it, a = H, {
4117
+ const t = Xa, r = new t(), o = Gt, n = ct(), i = it, a = H, {
4109
4118
  safeRe: c,
4110
4119
  t: u,
4111
4120
  comparatorTrimReplace: l,
@@ -4130,18 +4139,18 @@ function te() {
4130
4139
  const m = p.loose ? c[u.CARETLOOSE] : c[u.CARET], y = p.includePrerelease ? "-0" : "";
4131
4140
  return v.replace(m, (b, S, R, O, C) => {
4132
4141
  i("caret", v, b, S, R, O, C);
4133
- let I;
4134
- return $(S) ? I = "" : $(R) ? I = `>=${S}.0.0${y} <${+S + 1}.0.0-0` : $(O) ? S === "0" ? I = `>=${S}.${R}.0${y} <${S}.${+R + 1}.0-0` : I = `>=${S}.${R}.0${y} <${+S + 1}.0.0-0` : C ? (i("replaceCaret pr", C), S === "0" ? R === "0" ? I = `>=${S}.${R}.${O}-${C} <${S}.${R}.${+O + 1}-0` : I = `>=${S}.${R}.${O}-${C} <${S}.${+R + 1}.0-0` : I = `>=${S}.${R}.${O}-${C} <${+S + 1}.0.0-0`) : (i("no pr"), S === "0" ? R === "0" ? I = `>=${S}.${R}.${O}${y} <${S}.${R}.${+O + 1}-0` : I = `>=${S}.${R}.${O}${y} <${S}.${+R + 1}.0-0` : I = `>=${S}.${R}.${O} <${+S + 1}.0.0-0`), i("caret return", I), I;
4142
+ let F;
4143
+ return $(S) ? F = "" : $(R) ? F = `>=${S}.0.0${y} <${+S + 1}.0.0-0` : $(O) ? S === "0" ? F = `>=${S}.${R}.0${y} <${S}.${+R + 1}.0-0` : F = `>=${S}.${R}.0${y} <${+S + 1}.0.0-0` : C ? (i("replaceCaret pr", C), S === "0" ? R === "0" ? F = `>=${S}.${R}.${O}-${C} <${S}.${R}.${+O + 1}-0` : F = `>=${S}.${R}.${O}-${C} <${S}.${+R + 1}.0-0` : F = `>=${S}.${R}.${O}-${C} <${+S + 1}.0.0-0`) : (i("no pr"), S === "0" ? R === "0" ? F = `>=${S}.${R}.${O}${y} <${S}.${R}.${+O + 1}-0` : F = `>=${S}.${R}.${O}${y} <${S}.${+R + 1}.0-0` : F = `>=${S}.${R}.${O} <${+S + 1}.0.0-0`), i("caret return", F), F;
4135
4144
  });
4136
4145
  }, ie = (v, p) => (i("replaceXRanges", v, p), v.split(/\s+/).map((m) => W(m, p)).join(" ")), W = (v, p) => {
4137
4146
  v = v.trim();
4138
4147
  const m = p.loose ? c[u.XRANGELOOSE] : c[u.XRANGE];
4139
4148
  return v.replace(m, (y, b, S, R, O, C) => {
4140
4149
  i("xRange", v, y, b, S, R, O, C);
4141
- const I = $(S), N = I || $(R), F = N || $(O), ne = F;
4142
- return b === "=" && ne && (b = ""), C = p.includePrerelease ? "-0" : "", I ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && ne ? (N && (R = 0), O = 0, b === ">" ? (b = ">=", N ? (S = +S + 1, R = 0, O = 0) : (R = +R + 1, O = 0)) : b === "<=" && (b = "<", N ? S = +S + 1 : R = +R + 1), b === "<" && (C = "-0"), y = `${b + S}.${R}.${O}${C}`) : N ? y = `>=${S}.0.0${C} <${+S + 1}.0.0-0` : F && (y = `>=${S}.${R}.0${C} <${S}.${+R + 1}.0-0`), i("xRange return", y), y;
4150
+ const F = $(S), N = F || $(R), I = N || $(O), ne = I;
4151
+ return b === "=" && ne && (b = ""), C = p.includePrerelease ? "-0" : "", F ? b === ">" || b === "<" ? y = "<0.0.0-0" : y = "*" : b && ne ? (N && (R = 0), O = 0, b === ">" ? (b = ">=", N ? (S = +S + 1, R = 0, O = 0) : (R = +R + 1, O = 0)) : b === "<=" && (b = "<", N ? S = +S + 1 : R = +R + 1), b === "<" && (C = "-0"), y = `${b + S}.${R}.${O}${C}`) : N ? y = `>=${S}.0.0${C} <${+S + 1}.0.0-0` : I && (y = `>=${S}.${R}.0${C} <${S}.${+R + 1}.0-0`), i("xRange return", y), y;
4143
4152
  });
4144
- }, M = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), V = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), q = (v) => (p, m, y, b, S, R, O, C, I, N, F, ne) => ($(y) ? m = "" : $(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : $(S) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : R ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, $(I) ? C = "" : $(N) ? C = `<${+I + 1}.0.0-0` : $(F) ? C = `<${I}.${+N + 1}.0-0` : ne ? C = `<=${I}.${N}.${F}-${ne}` : v ? C = `<${I}.${N}.${+F + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), fe = (v, p, m) => {
4153
+ }, M = (v, p) => (i("replaceStars", v, p), v.trim().replace(c[u.STAR], "")), V = (v, p) => (i("replaceGTE0", v, p), v.trim().replace(c[p.includePrerelease ? u.GTE0PRE : u.GTE0], "")), q = (v) => (p, m, y, b, S, R, O, C, F, N, I, ne) => ($(y) ? m = "" : $(b) ? m = `>=${y}.0.0${v ? "-0" : ""}` : $(S) ? m = `>=${y}.${b}.0${v ? "-0" : ""}` : R ? m = `>=${m}` : m = `>=${m}${v ? "-0" : ""}`, $(F) ? C = "" : $(N) ? C = `<${+F + 1}.0.0-0` : $(I) ? C = `<${F}.${+N + 1}.0-0` : ne ? C = `<=${F}.${N}.${I}-${ne}` : v ? C = `<${F}.${N}.${+I + 1}-0` : C = `<=${C}`, `${m} ${C}`.trim()), fe = (v, p, m) => {
4145
4154
  for (let y = 0; y < v.length; y++)
4146
4155
  if (!v[y].test(p))
4147
4156
  return !1;
@@ -4202,46 +4211,46 @@ function ct() {
4202
4211
  }
4203
4212
  }
4204
4213
  gt = e;
4205
- const t = Gt, { safeRe: r, t: o } = xe, n = Os, i = it, a = H, c = te();
4214
+ const t = Gt, { safeRe: r, t: o } = xe, n = Is, i = it, a = H, c = te();
4206
4215
  return gt;
4207
4216
  }
4208
- const za = te(), Xa = (s, e, t) => {
4217
+ const qa = te(), Ya = (s, e, t) => {
4209
4218
  try {
4210
- e = new za(e, t);
4219
+ e = new qa(e, t);
4211
4220
  } catch {
4212
4221
  return !1;
4213
4222
  }
4214
4223
  return e.test(s);
4215
4224
  };
4216
- var lt = Xa;
4217
- const qa = te(), Ya = (s, e) => new qa(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
4218
- var Qa = Ya;
4219
- const Za = H, ec = te(), tc = (s, e, t) => {
4225
+ var lt = Ya;
4226
+ const Qa = te(), Za = (s, e) => new Qa(s, e).set.map((t) => t.map((r) => r.value).join(" ").trim().split(" "));
4227
+ var ec = Za;
4228
+ const tc = H, rc = te(), sc = (s, e, t) => {
4220
4229
  let r = null, o = null, n = null;
4221
4230
  try {
4222
- n = new ec(e, t);
4231
+ n = new rc(e, t);
4223
4232
  } catch {
4224
4233
  return null;
4225
4234
  }
4226
4235
  return s.forEach((i) => {
4227
- n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new Za(r, t));
4236
+ n.test(i) && (!r || o.compare(i) === -1) && (r = i, o = new tc(r, t));
4228
4237
  }), r;
4229
4238
  };
4230
- var rc = tc;
4231
- const sc = H, oc = te(), nc = (s, e, t) => {
4239
+ var oc = sc;
4240
+ const nc = H, ic = te(), ac = (s, e, t) => {
4232
4241
  let r = null, o = null, n = null;
4233
4242
  try {
4234
- n = new oc(e, t);
4243
+ n = new ic(e, t);
4235
4244
  } catch {
4236
4245
  return null;
4237
4246
  }
4238
4247
  return s.forEach((i) => {
4239
- n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new sc(r, t));
4248
+ n.test(i) && (!r || o.compare(i) === 1) && (r = i, o = new nc(r, t));
4240
4249
  }), r;
4241
4250
  };
4242
- var ic = nc;
4243
- const mt = H, ac = te(), Tr = at, cc = (s, e) => {
4244
- s = new ac(s, e);
4251
+ var cc = ac;
4252
+ const mt = H, lc = te(), Tr = at, uc = (s, e) => {
4253
+ s = new lc(s, e);
4245
4254
  let t = new mt("0.0.0");
4246
4255
  if (s.test(t) || (t = new mt("0.0.0-0"), s.test(t)))
4247
4256
  return t;
@@ -4268,35 +4277,35 @@ const mt = H, ac = te(), Tr = at, cc = (s, e) => {
4268
4277
  }
4269
4278
  return t && s.test(t) ? t : null;
4270
4279
  };
4271
- var lc = cc;
4272
- const uc = te(), dc = (s, e) => {
4280
+ var dc = uc;
4281
+ const pc = te(), hc = (s, e) => {
4273
4282
  try {
4274
- return new uc(s, e).range || "*";
4283
+ return new pc(s, e).range || "*";
4275
4284
  } catch {
4276
4285
  return null;
4277
4286
  }
4278
4287
  };
4279
- var pc = dc;
4280
- const hc = H, $s = ct(), { ANY: fc } = $s, gc = te(), mc = lt, Lr = at, Dr = _t, vc = Ht, yc = Kt, wc = (s, e, t, r) => {
4281
- s = new hc(s, r), e = new gc(e, r);
4288
+ var fc = hc;
4289
+ const gc = H, Fs = ct(), { ANY: mc } = Fs, vc = te(), yc = lt, Lr = at, Dr = _t, wc = Ht, Sc = Kt, bc = (s, e, t, r) => {
4290
+ s = new gc(s, r), e = new vc(e, r);
4282
4291
  let o, n, i, a, c;
4283
4292
  switch (t) {
4284
4293
  case ">":
4285
- o = Lr, n = vc, i = Dr, a = ">", c = ">=";
4294
+ o = Lr, n = wc, i = Dr, a = ">", c = ">=";
4286
4295
  break;
4287
4296
  case "<":
4288
- o = Dr, n = yc, i = Lr, a = "<", c = "<=";
4297
+ o = Dr, n = Sc, i = Lr, a = "<", c = "<=";
4289
4298
  break;
4290
4299
  default:
4291
4300
  throw new TypeError('Must provide a hilo val of "<" or ">"');
4292
4301
  }
4293
- if (mc(s, e, r))
4302
+ if (yc(s, e, r))
4294
4303
  return !1;
4295
4304
  for (let u = 0; u < e.set.length; ++u) {
4296
4305
  const l = e.set[u];
4297
4306
  let d = null, f = null;
4298
4307
  if (l.forEach((h) => {
4299
- h.semver === fc && (h = new $s(">=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);
4308
+ h.semver === mc && (h = new Fs(">=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);
4300
4309
  }), d.operator === a || d.operator === c || (!f.operator || f.operator === a) && n(s, f.semver))
4301
4310
  return !1;
4302
4311
  if (f.operator === c && i(s, f.semver))
@@ -4304,20 +4313,20 @@ const hc = H, $s = ct(), { ANY: fc } = $s, gc = te(), mc = lt, Lr = at, Dr = _t,
4304
4313
  }
4305
4314
  return !0;
4306
4315
  };
4307
- var Wt = wc;
4308
- const Sc = Wt, bc = (s, e, t) => Sc(s, e, ">", t);
4309
- var Rc = bc;
4310
- const Ec = Wt, Cc = (s, e, t) => Ec(s, e, "<", t);
4311
- var Pc = Cc;
4312
- const Nr = te(), kc = (s, e, t) => (s = new Nr(s, t), e = new Nr(e, t), s.intersects(e, t));
4316
+ var Wt = bc;
4317
+ const Rc = Wt, Ec = (s, e, t) => Rc(s, e, ">", t);
4318
+ var Cc = Ec;
4319
+ const Pc = Wt, kc = (s, e, t) => Pc(s, e, "<", t);
4313
4320
  var Oc = kc;
4314
- const $c = lt, Fc = ee;
4315
- var Ic = (s, e, t) => {
4321
+ const Nr = te(), $c = (s, e, t) => (s = new Nr(s, t), e = new Nr(e, t), s.intersects(e, t));
4322
+ var Ic = $c;
4323
+ const Fc = lt, Ac = ee;
4324
+ var Tc = (s, e, t) => {
4316
4325
  const r = [];
4317
4326
  let o = null, n = null;
4318
- const i = s.sort((l, d) => Fc(l, d, t));
4327
+ const i = s.sort((l, d) => Ac(l, d, t));
4319
4328
  for (const l of i)
4320
- $c(l, e, t) ? (n = l, o || (o = l)) : (n && r.push([o, n]), n = null, o = null);
4329
+ Fc(l, e, t) ? (n = l, o || (o = l)) : (n && r.push([o, n]), n = null, o = null);
4321
4330
  o && r.push([o, null]);
4322
4331
  const a = [];
4323
4332
  for (const [l, d] of r)
@@ -4325,14 +4334,14 @@ var Ic = (s, e, t) => {
4325
4334
  const c = a.join(" || "), u = typeof e.raw == "string" ? e.raw : String(e);
4326
4335
  return c.length < u.length ? c : e;
4327
4336
  };
4328
- const Br = te(), zt = ct(), { ANY: vt } = zt, Ce = lt, Xt = ee, Ac = (s, e, t = {}) => {
4337
+ const Br = te(), zt = ct(), { ANY: vt } = zt, Ce = lt, Xt = ee, Lc = (s, e, t = {}) => {
4329
4338
  if (s === e)
4330
4339
  return !0;
4331
4340
  s = new Br(s, t), e = new Br(e, t);
4332
4341
  let r = !1;
4333
4342
  e: for (const o of s.set) {
4334
4343
  for (const n of e.set) {
4335
- const i = Lc(o, n, t);
4344
+ const i = Nc(o, n, t);
4336
4345
  if (r = r || i !== null, i)
4337
4346
  continue e;
4338
4347
  }
@@ -4340,13 +4349,13 @@ const Br = te(), zt = ct(), { ANY: vt } = zt, Ce = lt, Xt = ee, Ac = (s, e, t =
4340
4349
  return !1;
4341
4350
  }
4342
4351
  return !0;
4343
- }, Tc = [new zt(">=0.0.0-0")], xr = [new zt(">=0.0.0")], Lc = (s, e, t) => {
4352
+ }, Dc = [new zt(">=0.0.0-0")], xr = [new zt(">=0.0.0")], Nc = (s, e, t) => {
4344
4353
  if (s === e)
4345
4354
  return !0;
4346
4355
  if (s.length === 1 && s[0].semver === vt) {
4347
4356
  if (e.length === 1 && e[0].semver === vt)
4348
4357
  return !0;
4349
- t.includePrerelease ? s = Tc : s = xr;
4358
+ t.includePrerelease ? s = Dc : s = xr;
4350
4359
  }
4351
4360
  if (e.length === 1 && e[0].semver === vt) {
4352
4361
  if (t.includePrerelease)
@@ -4406,47 +4415,47 @@ const Br = te(), zt = ct(), { ANY: vt } = zt, Ce = lt, Xt = ee, Ac = (s, e, t =
4406
4415
  const r = Xt(s.semver, e.semver, t);
4407
4416
  return r < 0 ? s : r > 0 || e.operator === "<" && s.operator === "<=" ? e : s;
4408
4417
  };
4409
- var Dc = Ac;
4410
- const yt = xe, Ur = nt, Nc = H, Jr = Cs, Bc = be, xc = Mi, jc = Hi, Vc = zi, Uc = qi, Jc = Zi, Gc = ra, Mc = na, _c = ca, Kc = ee, Hc = pa, Wc = ga, zc = Mt, Xc = wa, qc = Ra, Yc = at, Qc = _t, Zc = Ps, el = ks, tl = Kt, rl = Ht, sl = Os, ol = Ka, nl = ct(), il = te(), al = lt, cl = Qa, ll = rc, ul = ic, dl = lc, pl = pc, hl = Wt, fl = Rc, gl = Pc, ml = Oc, vl = Ic, yl = Dc;
4411
- var wl = {
4412
- parse: Bc,
4413
- valid: xc,
4414
- clean: jc,
4415
- inc: Vc,
4416
- diff: Uc,
4417
- major: Jc,
4418
- minor: Gc,
4419
- patch: Mc,
4420
- prerelease: _c,
4421
- compare: Kc,
4422
- rcompare: Hc,
4423
- compareLoose: Wc,
4424
- compareBuild: zc,
4425
- sort: Xc,
4426
- rsort: qc,
4427
- gt: Yc,
4428
- lt: Qc,
4429
- eq: Zc,
4430
- neq: el,
4431
- gte: tl,
4432
- lte: rl,
4433
- cmp: sl,
4434
- coerce: ol,
4435
- Comparator: nl,
4436
- Range: il,
4437
- satisfies: al,
4438
- toComparators: cl,
4439
- maxSatisfying: ll,
4440
- minSatisfying: ul,
4441
- minVersion: dl,
4442
- validRange: pl,
4443
- outside: hl,
4444
- gtr: fl,
4445
- ltr: gl,
4446
- intersects: ml,
4447
- simplifyRange: vl,
4448
- subset: yl,
4449
- SemVer: Nc,
4418
+ var Bc = Lc;
4419
+ const yt = xe, Ur = nt, xc = H, Jr = ks, jc = be, Vc = Ki, Uc = zi, Jc = qi, Gc = Qi, Mc = ta, _c = oa, Kc = aa, Hc = ua, Wc = ee, zc = fa, Xc = va, qc = Mt, Yc = ba, Qc = Ca, Zc = at, el = _t, tl = Os, rl = $s, sl = Kt, ol = Ht, nl = Is, il = Wa, al = ct(), cl = te(), ll = lt, ul = ec, dl = oc, pl = cc, hl = dc, fl = fc, gl = Wt, ml = Cc, vl = Oc, yl = Ic, wl = Tc, Sl = Bc;
4420
+ var bl = {
4421
+ parse: jc,
4422
+ valid: Vc,
4423
+ clean: Uc,
4424
+ inc: Jc,
4425
+ diff: Gc,
4426
+ major: Mc,
4427
+ minor: _c,
4428
+ patch: Kc,
4429
+ prerelease: Hc,
4430
+ compare: Wc,
4431
+ rcompare: zc,
4432
+ compareLoose: Xc,
4433
+ compareBuild: qc,
4434
+ sort: Yc,
4435
+ rsort: Qc,
4436
+ gt: Zc,
4437
+ lt: el,
4438
+ eq: tl,
4439
+ neq: rl,
4440
+ gte: sl,
4441
+ lte: ol,
4442
+ cmp: nl,
4443
+ coerce: il,
4444
+ Comparator: al,
4445
+ Range: cl,
4446
+ satisfies: ll,
4447
+ toComparators: ul,
4448
+ maxSatisfying: dl,
4449
+ minSatisfying: pl,
4450
+ minVersion: hl,
4451
+ validRange: fl,
4452
+ outside: gl,
4453
+ gtr: ml,
4454
+ ltr: vl,
4455
+ intersects: yl,
4456
+ simplifyRange: wl,
4457
+ subset: Sl,
4458
+ SemVer: xc,
4450
4459
  re: yt.re,
4451
4460
  src: yt.src,
4452
4461
  tokens: yt.t,
@@ -4455,12 +4464,12 @@ var wl = {
4455
4464
  compareIdentifiers: Jr.compareIdentifiers,
4456
4465
  rcompareIdentifiers: Jr.rcompareIdentifiers
4457
4466
  };
4458
- const Sl = /* @__PURE__ */ Oi(wl), bl = {
4467
+ const Rl = /* @__PURE__ */ Ii(bl), El = {
4459
4468
  minDelay: 1500
4460
- }, Rl = "__no_updates__";
4461
- class El extends ro {
4469
+ }, Cl = "__no_updates__";
4470
+ class Pl extends oo {
4462
4471
  constructor(t, r, o = {}) {
4463
- super({ ...o, ...bl }, r);
4472
+ super({ ...o, ...El }, r);
4464
4473
  w(this, "http");
4465
4474
  w(this, "preferredUpdateChannel");
4466
4475
  this.registryProvider = t, this.http = o.http, this.preferredUpdateChannel = o.preferredUpdateChannel;
@@ -4474,7 +4483,7 @@ class El extends ro {
4474
4483
  case "from-registry-v2":
4475
4484
  return `from_registry_v2_${Z(t)}`;
4476
4485
  default:
4477
- return Rl;
4486
+ return Cl;
4478
4487
  }
4479
4488
  }
4480
4489
  async readValue(t) {
@@ -4484,7 +4493,7 @@ class El extends ro {
4484
4493
  switch (n.type) {
4485
4494
  case "dev-v1":
4486
4495
  try {
4487
- const i = await es(n.folder);
4496
+ const i = await rs(n.folder);
4488
4497
  return i === n.mtime ? { suggestions: [] } : { mainSuggestion: { ...n, mtime: i }, suggestions: [] };
4489
4498
  } catch (i) {
4490
4499
  return this.logger.warn(i), { suggestions: [] };
@@ -4506,11 +4515,11 @@ class El extends ro {
4506
4515
  let u = this.preferredUpdateChannel;
4507
4516
  if (u === void 0)
4508
4517
  if (n.channel === void 0)
4509
- if (await c.getLatestOverview(n.id, Fe)) u = Fe;
4518
+ if (await c.getLatestOverview(n.id, Ie)) u = Ie;
4510
4519
  else {
4511
4520
  if (await c.getLatestOverview(n.id, $e) === void 0)
4512
4521
  return this.logger.error(
4513
- `No "any" channel record for ${xs(n.id)}`
4522
+ `No "any" channel record for ${Vs(n.id)}`
4514
4523
  ), { suggestions: [] };
4515
4524
  u = $e;
4516
4525
  }
@@ -4535,7 +4544,7 @@ class El extends ro {
4535
4544
  update: { ...n, id: { ...n.id, version: g } }
4536
4545
  }));
4537
4546
  if (d === void 0) return { suggestions: f };
4538
- if (a !== void 0 && Sl.lte(d, a))
4547
+ if (a !== void 0 && Rl.lte(d, a))
4539
4548
  return { suggestions: f };
4540
4549
  const h = {
4541
4550
  ...n,
@@ -4604,7 +4613,7 @@ function se() {
4604
4613
  function Te(s) {
4605
4614
  return String(s.id);
4606
4615
  }
4607
- const Cl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
4616
+ const kl = ["Int", "Long", "Float", "Double", "String", "Bytes"];
4608
4617
  function me(s) {
4609
4618
  const e = [], t = [];
4610
4619
  for (const r of s)
@@ -4629,7 +4638,7 @@ function wt(s) {
4629
4638
  });
4630
4639
  }
4631
4640
  const ke = (s, e) => typeof e == "bigint" ? e.toString() : e;
4632
- class Pl {
4641
+ class Ol {
4633
4642
  constructor(e, t, r, o) {
4634
4643
  w(this, "rustPFrame");
4635
4644
  w(this, "blobIdToResource", /* @__PURE__ */ new Map());
@@ -4665,19 +4674,19 @@ class Pl {
4665
4674
  }
4666
4675
  };
4667
4676
  for (const a of o)
4668
- for (const c of Sn(a.data))
4677
+ for (const c of Rn(a.data))
4669
4678
  this.blobIdToResource.set(Te(c), c);
4670
4679
  const i = [
4671
4680
  ...new Map(o.map((a) => ({
4672
4681
  ...a,
4673
- data: bn(a.data, Te)
4682
+ data: En(a.data, Te)
4674
4683
  })).map(
4675
4684
  (a) => [Z(a), a]
4676
4685
  )).values()
4677
4686
  ];
4678
4687
  this.rustPFrame = (() => {
4679
4688
  try {
4680
- const a = new Ro(se().logPFrameRequests ? n : void 0);
4689
+ const a = new Co(se().logPFrameRequests ? n : void 0);
4681
4690
  a.setDataSource(this);
4682
4691
  for (const c of i)
4683
4692
  a.addColumnSpec(c.id, c.spec), a.setColumnData(c.id, c.data);
@@ -4728,7 +4737,7 @@ class Pl {
4728
4737
  this.rustPFrame.dispose();
4729
4738
  }
4730
4739
  }
4731
- class kl {
4740
+ class $l {
4732
4741
  constructor(e) {
4733
4742
  this.table = e;
4734
4743
  }
@@ -4736,7 +4745,7 @@ class kl {
4736
4745
  this.table.then((e) => e.dispose());
4737
4746
  }
4738
4747
  }
4739
- class Ol {
4748
+ class Il {
4740
4749
  constructor(e, t) {
4741
4750
  w(this, "pFrames");
4742
4751
  w(this, "pTables");
@@ -4744,14 +4753,14 @@ class Ol {
4744
4753
  /** Limits concurrent requests to PFrame API to prevent deadlock with Node's IO threads */
4745
4754
  w(this, "concurrencyLimiter");
4746
4755
  this.blobDriver = e, this.logger = t;
4747
- const r = new qr({
4756
+ const r = new Qr({
4748
4757
  maxSize: 1e9,
4749
4758
  // 1Gb
4750
- fetchMethod: async (n) => await zr.readFile(n),
4759
+ fetchMethod: async (n) => await qr.readFile(n),
4751
4760
  sizeCalculation: (n) => n.length
4752
4761
  });
4753
4762
  this.blobContentCache = r;
4754
- const o = new _s(1);
4763
+ const o = new Hs(1);
4755
4764
  this.concurrencyLimiter = o, this.pFrames = new class extends Gr {
4756
4765
  constructor(n, i) {
4757
4766
  super(), this.blobDriver = n, this.logger = i;
@@ -4759,10 +4768,10 @@ class Ol {
4759
4768
  createNewResource(n) {
4760
4769
  return se().logPFrameRequests && t.info(
4761
4770
  `PFrame creation (pFrameHandle = ${this.calculateParamsKey(n)}): ${JSON.stringify(n, ke)}`
4762
- ), new Pl(this.blobDriver, this.logger, r, n);
4771
+ ), new Ol(this.blobDriver, this.logger, r, n);
4763
4772
  }
4764
4773
  calculateParamsKey(n) {
4765
- return Fl(n);
4774
+ return Al(n);
4766
4775
  }
4767
4776
  }(this.blobDriver, this.logger), this.pTables = new class extends Gr {
4768
4777
  constructor(n) {
@@ -4810,10 +4819,10 @@ class Ol {
4810
4819
  filters: n.def.filters,
4811
4820
  signal: n.signal
4812
4821
  });
4813
- return new kl(a);
4822
+ return new $l(a);
4814
4823
  }
4815
4824
  calculateParamsKey(n) {
4816
- return $l(n);
4825
+ return Fl(n);
4817
4826
  }
4818
4827
  }(this.pFrames);
4819
4828
  }
@@ -4821,16 +4830,16 @@ class Ol {
4821
4830
  // Internal / Config API Methods
4822
4831
  //
4823
4832
  createPFrame(e, t) {
4824
- const r = e.filter((n) => Cl.find((i) => i === n.spec.valueType)).map(
4833
+ const r = e.filter((n) => kl.find((i) => i === n.spec.valueType)).map(
4825
4834
  (n) => le(
4826
4835
  n,
4827
- (i) => to(i) ? On(i) : $n(n.spec, i)
4836
+ (i) => so(i) ? In(i) : Kr(i) ? Hr(i, (a) => a.resourceInfo) : Fn(n.spec, i)
4828
4837
  )
4829
4838
  ), o = this.pFrames.acquire(r);
4830
4839
  return t.addOnDestroy(o.unref), o.key;
4831
4840
  }
4832
4841
  createPTable(e, t, r) {
4833
- const o = this.createPFrame(Bs(e.src), t), n = St(e, (a) => a.id), i = this.pTables.acquire({ def: n, pFrameHandle: o, signal: r });
4842
+ const o = this.createPFrame(js(e.src), t), n = St(e, (a) => a.id), i = this.pTables.acquire({ def: n, pFrameHandle: o, signal: r });
4834
4843
  return se().logPFrameRequests && this.logger.info(
4835
4844
  `Create PTable call (pFrameHandle = ${o}; pTableHandle = ${JSON.stringify(i)}): ${JSON.stringify(
4836
4845
  St(e, (a) => a.spec),
@@ -4996,11 +5005,11 @@ function ue(s) {
4996
5005
  K(s);
4997
5006
  }
4998
5007
  }
4999
- function $l(s) {
5008
+ function Fl(s) {
5000
5009
  const e = Be("sha256");
5001
5010
  return e.update(Z(s)), e.digest().toString("hex");
5002
5011
  }
5003
- function Fl(s) {
5012
+ function Al(s) {
5004
5013
  const e = [...s].map(
5005
5014
  (r) => le(r, (o) => {
5006
5015
  let n;
@@ -5046,38 +5055,38 @@ function Fl(s) {
5046
5055
  const t = Be("sha256");
5047
5056
  return t.update(Z(e)), t.digest().toString("hex");
5048
5057
  }
5049
- async function Il(s, e, t) {
5058
+ async function Tl(s, e, t) {
5050
5059
  const r = {
5051
- ...Ss,
5052
- ...bs(e),
5060
+ ...Rs,
5061
+ ...Es(e),
5053
5062
  ...t
5054
- }, o = new Wr(r.localSecret), n = uo(r.logger, s, r.localProjections), i = po(s, r.logger), a = ho(s, r.logger), c = fo(s, r.logger), u = new go(
5063
+ }, o = new Xr(r.localSecret), n = ho(r.logger, s, r.localProjections), i = fo(s, r.logger), a = go(s, r.logger), c = mo(s, r.logger), u = new vo(
5055
5064
  r.logger,
5056
5065
  n,
5057
5066
  i,
5058
5067
  r.blobDownloadPath,
5059
5068
  o,
5060
5069
  r.blobDriverOps
5061
- ), l = new mo(
5070
+ ), l = new yo(
5062
5071
  r.logger,
5063
5072
  o,
5064
5073
  n,
5065
5074
  r.downloadBlobToURLPath,
5066
5075
  r.downloadBlobToURLDriverOps
5067
- ), d = new vo(
5076
+ ), d = new wo(
5068
5077
  r.logger,
5069
5078
  o,
5070
5079
  a,
5071
5080
  c,
5072
5081
  r.uploadDriverOps
5073
- ), f = new yo(r.logger, i, r.logStreamDriverOps), h = new wo(r.logger, f, u), E = await So.init(
5082
+ ), f = new So(r.logger, i, r.logStreamDriverOps), h = new bo(r.logger, f, u), E = await Ro.init(
5074
5083
  r.logger,
5075
5084
  s,
5076
5085
  o,
5077
5086
  r.localProjections,
5078
5087
  r.openFileDialogCallback,
5079
5088
  r.virtualLocalStoragesOverride
5080
- ), g = new Ol(u, r.logger);
5089
+ ), g = new Il(u, r.logger);
5081
5090
  return {
5082
5091
  blobDriver: u,
5083
5092
  blobToURLDriver: l,
@@ -5088,7 +5097,7 @@ async function Il(s, e, t) {
5088
5097
  pFrameDriver: g
5089
5098
  };
5090
5099
  }
5091
- class Fs {
5100
+ class As {
5092
5101
  constructor(e, t, r, o, n, i, a, c) {
5093
5102
  w(this, "pl");
5094
5103
  /** Contains a reactive list of projects along with their meta information. */
@@ -5109,8 +5118,8 @@ class Fs {
5109
5118
  /** Creates a project with initial state and adds it to project list. */
5110
5119
  async createProject(e, t = Se()) {
5111
5120
  const r = await this.pl.withWriteTx("MLCreateProject", async (o) => {
5112
- const n = await wn(o, e);
5113
- return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await Qs(n);
5121
+ const n = await bn(o, e);
5122
+ return o.createField(x(this.projectListResourceId, t), "Dynamic", n), await o.commit(), await eo(n);
5114
5123
  });
5115
5124
  return await this.projectListTree.refreshState(), r;
5116
5125
  }
@@ -5169,33 +5178,33 @@ class Fs {
5169
5178
  /** Generates sufficiently random string to be used as local secret for the
5170
5179
  * middle layer */
5171
5180
  static generateLocalSecret() {
5172
- return Wr.generateSecret();
5181
+ return Xr.generateSecret();
5173
5182
  }
5174
5183
  /** Initialize middle layer */
5175
5184
  static async init(e, t, r) {
5176
5185
  const o = {
5177
- ...Pi,
5178
- ...ki(t),
5186
+ ...Oi,
5187
+ ...$i(t),
5179
5188
  ...r
5180
5189
  };
5181
5190
  o.defaultTreeOptions.logStat = se().logTreeStats, o.debugOps.dumpInitialTreeState = se().dumpInitialTreeState;
5182
5191
  const n = await e.withWriteTx("MLInitialization", async (g) => {
5183
- const D = x(g.clientRoot, Mo);
5192
+ const D = x(g.clientRoot, Ko);
5184
5193
  g.createField(D, "Dynamic");
5185
5194
  const T = await g.getField(D);
5186
5195
  if (Ze(T.value)) {
5187
- const j = g.createEphemeral(ss);
5196
+ const j = g.createEphemeral(ns);
5188
5197
  return g.lock(j), g.setField(D, j), await g.commit(), await j.globalId;
5189
5198
  } else
5190
5199
  return T.value;
5191
- }), i = o.logger, a = await Il(e, t, o), c = new js(e.httpDispatcher, {
5200
+ }), i = o.logger, a = await Tl(e, t, o), c = new Us(e.httpDispatcher, {
5192
5201
  minTimeout: 250,
5193
5202
  maxRetries: 4
5194
- }), u = new Ao(c), l = new pn(
5203
+ }), u = new Lo(c), l = new fn(
5195
5204
  u,
5196
5205
  a.signer,
5197
5206
  c
5198
- ), d = new bo(
5207
+ ), d = new Eo(
5199
5208
  i,
5200
5209
  e.httpDispatcher,
5201
5210
  o.frontendDownloadPath
@@ -5209,14 +5218,14 @@ class Fs {
5209
5218
  bpPreparer: l,
5210
5219
  frontendDownloadDriver: d,
5211
5220
  driverKit: a,
5212
- blockUpdateWatcher: new El(u, i, {
5221
+ blockUpdateWatcher: new Pl(u, i, {
5213
5222
  minDelay: o.devBlockUpdateRecheckInterval,
5214
5223
  http: c,
5215
5224
  preferredUpdateChannel: o.preferredUpdateChannel
5216
5225
  }),
5217
- quickJs: await lo()
5218
- }, h = new so([]), E = await Ko(e, n, h, f);
5219
- return new Fs(
5226
+ quickJs: await po()
5227
+ }, h = new no([]), E = await Wo(e, n, h, f);
5228
+ return new As(
5220
5229
  f,
5221
5230
  a,
5222
5231
  a.signer,
@@ -5228,7 +5237,7 @@ class Fs {
5228
5237
  );
5229
5238
  }
5230
5239
  }
5231
- const Al = [
5240
+ const Ll = [
5232
5241
  "undici:request:create",
5233
5242
  // When a new request is created
5234
5243
  "undici:request:bodySent",
@@ -5266,7 +5275,7 @@ const Al = [
5266
5275
  "undici:dispatcher:retry"
5267
5276
  // When a dispatcher retries a request
5268
5277
  ];
5269
- async function mu(s, e = {}) {
5278
+ async function yu(s, e = {}) {
5270
5279
  const t = {
5271
5280
  pingCheckDurationMs: 1e4,
5272
5281
  pingTimeoutMs: 3e3,
@@ -5284,8 +5293,8 @@ async function mu(s, e = {}) {
5284
5293
  bodyLimit: 300,
5285
5294
  ...e
5286
5295
  }, r = [];
5287
- Al.forEach((c) => {
5288
- Eo(c).subscribe((l) => {
5296
+ Ll.forEach((c) => {
5297
+ Po(c).subscribe((l) => {
5289
5298
  var f;
5290
5299
  const d = (/* @__PURE__ */ new Date()).toISOString();
5291
5300
  (f = l == null ? void 0 : l.response) != null && f.headers && (l.response.headers = l.response.headers.map((h) => h.toString())), r.push(
@@ -5304,7 +5313,7 @@ async function mu(s, e = {}) {
5304
5313
  blockRegistryUiChecks: [],
5305
5314
  blockGARegistryUiChecks: [],
5306
5315
  autoUpdateCdnChecks: []
5307
- }, n = Zs(s, { defaultRequestTimeout: t.pingTimeoutMs });
5316
+ }, n = to(s, { defaultRequestTimeout: t.pingTimeoutMs });
5308
5317
  o.plPings = await ve(t.pingCheckDurationMs, t.maxPingsPerSecond, async () => {
5309
5318
  const u = await new rr(n).ping();
5310
5319
  return JSON.stringify(u).slice(0, t.bodyLimit) + "...";
@@ -5330,7 +5339,7 @@ async function mu(s, e = {}) {
5330
5339
  t.autoUpdateCdnDurationMs,
5331
5340
  t.maxAutoUpdateCdnChecksPerSecond,
5332
5341
  async () => await Oe(t.autoUpdateCdnUrl, t, a)
5333
- ), Tl(o, s, t, r);
5342
+ ), Dl(o, s, t, r);
5334
5343
  }
5335
5344
  async function ve(s, e, t) {
5336
5345
  const r = Tt(), o = [];
@@ -5348,7 +5357,7 @@ async function ve(s, e, t) {
5348
5357
  response: i
5349
5358
  });
5350
5359
  const c = 1e3 / e - a;
5351
- c > 0 && await Qr(c);
5360
+ c > 0 && await es(c);
5352
5361
  }
5353
5362
  return o;
5354
5363
  }
@@ -5363,7 +5372,7 @@ async function Oe(s, e, t) {
5363
5372
  beginningOfBody: n.slice(0, e.bodyLimit) + "..."
5364
5373
  };
5365
5374
  }
5366
- function Tl(s, e, t, r) {
5375
+ function Dl(s, e, t, r) {
5367
5376
  const o = s.plPings.filter((a) => a.response.ok), n = s.plPings.filter((a) => !a.response.ok), i = [
5368
5377
  ...new Set(o.map((a) => JSON.stringify(a.response.value)))
5369
5378
  ];
@@ -5411,7 +5420,7 @@ ${r.join(`
5411
5420
  `;
5412
5421
  }
5413
5422
  function ye(s) {
5414
- const e = s.filter((o) => o.response.ok), { mean: t, median: r } = Ll(s);
5423
+ const e = s.filter((o) => o.response.ok), { mean: t, median: r } = Nl(s);
5415
5424
  return `
5416
5425
  total: ${s.length};
5417
5426
  successes: ${e.length};
@@ -5420,7 +5429,7 @@ mean in ms: ${t};
5420
5429
  median in ms: ${r};
5421
5430
  `;
5422
5431
  }
5423
- function Ll(s) {
5432
+ function Nl(s) {
5424
5433
  const e = s.map((o) => o.elapsedMs), t = e.reduce((o, n) => o + n) / e.length;
5425
5434
  let r;
5426
5435
  if (e.length > 0) {
@@ -5436,33 +5445,33 @@ function Mr(s) {
5436
5445
  return Tt() - s;
5437
5446
  }
5438
5447
  export {
5439
- cu as BlockPackRegistry,
5440
- lu as CentralBlockRegistry,
5441
- bs as DefaultDriverKitOpsPaths,
5442
- Ss as DefaultDriverKitOpsSettings,
5443
- ki as DefaultMiddleLayerOpsPaths,
5444
- Pi as DefaultMiddleLayerOpsSettings,
5445
- as as FrontendFromFolderResourceType,
5446
- is as FrontendFromUrlResourceType,
5447
- Fs as MiddleLayer,
5448
+ uu as BlockPackRegistry,
5449
+ du as CentralBlockRegistry,
5450
+ Es as DefaultDriverKitOpsPaths,
5451
+ Rs as DefaultDriverKitOpsSettings,
5452
+ $i as DefaultMiddleLayerOpsPaths,
5453
+ Oi as DefaultMiddleLayerOpsSettings,
5454
+ ls as FrontendFromFolderResourceType,
5455
+ cs as FrontendFromUrlResourceType,
5456
+ As as MiddleLayer,
5448
5457
  Jt as Project,
5449
- rn as TengoTemplateGet,
5450
- sn as TengoTemplateGetRegistry,
5451
- nn as TengoTemplateGetTemplate,
5452
- on as TengoTemplateGetTemplateURI,
5453
- pu as TengoTemplatePack,
5454
- hu as TengoTemplatePackConvert,
5455
- gu as TengoTemplatePackConvertTemplate,
5456
- fu as TengoTemplatePackConvertTemplatePack,
5457
- du as V1CentralDevSnapshotRegistry,
5458
- uu as V1CentralRegistry,
5459
- Ao as V2RegistryProvider,
5460
- mu as checkNetwork,
5461
- os as createRenderTemplate,
5462
- es as getDevV1PacketMtime,
5458
+ on as TengoTemplateGet,
5459
+ nn as TengoTemplateGetRegistry,
5460
+ cn as TengoTemplateGetTemplate,
5461
+ an as TengoTemplateGetTemplateURI,
5462
+ fu as TengoTemplatePack,
5463
+ gu as TengoTemplatePackConvert,
5464
+ vu as TengoTemplatePackConvertTemplate,
5465
+ mu as TengoTemplatePackConvertTemplatePack,
5466
+ hu as V1CentralDevSnapshotRegistry,
5467
+ pu as V1CentralRegistry,
5468
+ Lo as V2RegistryProvider,
5469
+ yu as checkNetwork,
5470
+ is as createRenderTemplate,
5471
+ rs as getDevV1PacketMtime,
5463
5472
  Bt as getDevV2PacketMtime,
5464
- Il as initDriverKit,
5473
+ Tl as initDriverKit,
5465
5474
  jt as loadTemplate,
5466
- an as prepareTemplateSpec
5475
+ ln as prepareTemplateSpec
5467
5476
  };
5468
5477
  //# sourceMappingURL=index.mjs.map