@expofp/loader 1.0.60 → 1.0.63

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.
Files changed (35) hide show
  1. package/dist/bundle/bundle.js +134 -123
  2. package/dist/bundle/bundle.js.map +1 -1
  3. package/dist/bundle/{downloadZip-CohB2rQN.js → downloadOfflineZip-RIzZSzeG.js} +1001 -995
  4. package/dist/bundle/downloadOfflineZip-RIzZSzeG.js.map +1 -0
  5. package/dist/bundle/{makeOffline-DuRXI_Dd.js → makeOffline-Doxc2dX7.js} +35 -34
  6. package/dist/bundle/makeOffline-Doxc2dX7.js.map +1 -0
  7. package/dist/bundle/makeOfflineBundle-BoEPc05D.js +60 -0
  8. package/dist/bundle/makeOfflineBundle-BoEPc05D.js.map +1 -0
  9. package/dist/bundle/saveOfflineZip.browser-BTQeRUY_.js +7 -0
  10. package/dist/bundle/saveOfflineZip.browser-BTQeRUY_.js.map +1 -0
  11. package/dist/esm/importJson.js +4 -0
  12. package/dist/esm/index.d.ts +1 -1
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/offline/downloadOfflineZip.d.ts +4 -0
  15. package/dist/esm/offline/downloadOfflineZip.js +15 -0
  16. package/dist/esm/offline/generateZip.d.ts +4 -0
  17. package/dist/esm/offline/{downloadZip.js → generateZip.js} +9 -8
  18. package/dist/esm/offline/index.d.ts +9 -1
  19. package/dist/esm/offline/index.js +12 -4
  20. package/dist/esm/offline/makeOffline.js +3 -2
  21. package/dist/esm/offline/makeOfflineBundle.js +14 -7
  22. package/dist/esm/offline/saveOfflineZip.browser.d.ts +1 -0
  23. package/dist/esm/offline/saveOfflineZip.browser.js +3 -0
  24. package/dist/esm/offline/saveOfflineZip.d.ts +1 -0
  25. package/dist/esm/offline/saveOfflineZip.js +16 -0
  26. package/dist/esm/resolve.d.ts +11 -4
  27. package/dist/esm/resolve.js +6 -34
  28. package/dist/esm/resolvers/expoRuntimeBranchResolver.js +1 -1
  29. package/dist/esm/resolvers/legacyAssetUrlsResolver.js +2 -1
  30. package/package.json +8 -2
  31. package/dist/bundle/downloadZip-CohB2rQN.js.map +0 -1
  32. package/dist/bundle/makeOffline-DuRXI_Dd.js.map +0 -1
  33. package/dist/bundle/makeOfflineBundle-XjvmvDQE.js +0 -58
  34. package/dist/bundle/makeOfflineBundle-XjvmvDQE.js.map +0 -1
  35. package/dist/esm/offline/downloadZip.d.ts +0 -1
@@ -1,9 +1,9 @@
1
- window.__efpLoaderBuildInfo = ["1.0.60", "2025-12-13T12:09:38.327Z"];
1
+ window.__efpLoaderBuildInfo = ["1.0.63", "2025-12-15T13:25:02.328Z"];
2
2
  var Me = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
3
  function Q(r) {
4
4
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
5
5
  }
6
- var O = { exports: {} }, L, U;
6
+ var _ = { exports: {} }, L, U;
7
7
  function X() {
8
8
  if (U) return L;
9
9
  U = 1;
@@ -14,7 +14,7 @@ function X() {
14
14
  if (i === "string" && f.length > 0)
15
15
  return a(f);
16
16
  if (i === "number" && isFinite(f))
17
- return s.long ? c(f) : w(f);
17
+ return s.long ? c(f) : h(f);
18
18
  throw new Error(
19
19
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(f)
20
20
  );
@@ -71,15 +71,15 @@ function X() {
71
71
  }
72
72
  }
73
73
  }
74
- function w(f) {
74
+ function h(f) {
75
75
  var s = Math.abs(f);
76
76
  return s >= n ? Math.round(f / n) + "d" : s >= t ? Math.round(f / t) + "h" : s >= e ? Math.round(f / e) + "m" : s >= r ? Math.round(f / r) + "s" : f + "ms";
77
77
  }
78
78
  function c(f) {
79
79
  var s = Math.abs(f);
80
- return s >= n ? h(f, s, n, "day") : s >= t ? h(f, s, t, "hour") : s >= e ? h(f, s, e, "minute") : s >= r ? h(f, s, r, "second") : f + " ms";
80
+ return s >= n ? w(f, s, n, "day") : s >= t ? w(f, s, t, "hour") : s >= e ? w(f, s, e, "minute") : s >= r ? w(f, s, r, "second") : f + " ms";
81
81
  }
82
- function h(f, s, i, u) {
82
+ function w(f, s, i, u) {
83
83
  var d = s >= i * 1.5;
84
84
  return Math.round(f / i) + " " + u + (d ? "s" : "");
85
85
  }
@@ -90,7 +90,7 @@ function Y() {
90
90
  if (W) return T;
91
91
  W = 1;
92
92
  function r(e) {
93
- n.debug = n, n.default = n, n.coerce = h, n.disable = w, n.enable = l, n.enabled = c, n.humanize = X(), n.destroy = f, Object.keys(e).forEach((s) => {
93
+ n.debug = n, n.default = n, n.coerce = w, n.disable = h, n.enable = l, n.enabled = c, n.humanize = X(), n.destroy = f, Object.keys(e).forEach((s) => {
94
94
  n[s] = e[s];
95
95
  }), n.names = [], n.skips = [], n.formatters = {};
96
96
  function t(s) {
@@ -102,32 +102,32 @@ function Y() {
102
102
  n.selectColor = t;
103
103
  function n(s) {
104
104
  let i, u = null, d, g;
105
- function p(...m) {
106
- if (!p.enabled)
105
+ function m(...y) {
106
+ if (!m.enabled)
107
107
  return;
108
- const C = p, F = Number(/* @__PURE__ */ new Date()), _ = F - (i || F);
109
- C.diff = _, C.prev = i, C.curr = F, i = F, m[0] = n.coerce(m[0]), typeof m[0] != "string" && m.unshift("%O");
108
+ const v = m, F = Number(/* @__PURE__ */ new Date()), O = F - (i || F);
109
+ v.diff = O, v.prev = i, v.curr = F, i = F, y[0] = n.coerce(y[0]), typeof y[0] != "string" && y.unshift("%O");
110
110
  let R = 0;
111
- m[0] = m[0].replace(/%([a-zA-Z%])/g, (b, H) => {
111
+ y[0] = y[0].replace(/%([a-zA-Z%])/g, (b, H) => {
112
112
  if (b === "%%")
113
113
  return "%";
114
114
  R++;
115
115
  const N = n.formatters[H];
116
116
  if (typeof N == "function") {
117
- const K = m[R];
118
- b = N.call(C, K), m.splice(R, 1), R--;
117
+ const K = y[R];
118
+ b = N.call(v, K), y.splice(R, 1), R--;
119
119
  }
120
120
  return b;
121
- }), n.formatArgs.call(C, m), (C.log || n.log).apply(C, m);
121
+ }), n.formatArgs.call(v, y), (v.log || n.log).apply(v, y);
122
122
  }
123
- return p.namespace = s, p.useColors = n.useColors(), p.color = n.selectColor(s), p.extend = o, p.destroy = n.destroy, Object.defineProperty(p, "enabled", {
123
+ return m.namespace = s, m.useColors = n.useColors(), m.color = n.selectColor(s), m.extend = o, m.destroy = n.destroy, Object.defineProperty(m, "enabled", {
124
124
  enumerable: !0,
125
125
  configurable: !1,
126
126
  get: () => u !== null ? u : (d !== n.namespaces && (d = n.namespaces, g = n.enabled(s)), g),
127
- set: (m) => {
128
- u = m;
127
+ set: (y) => {
128
+ u = y;
129
129
  }
130
- }), typeof n.init == "function" && n.init(p), p;
130
+ }), typeof n.init == "function" && n.init(m), m;
131
131
  }
132
132
  function o(s, i) {
133
133
  const u = n(this.namespace + (typeof i > "u" ? ":" : i) + s);
@@ -140,19 +140,19 @@ function Y() {
140
140
  u[0] === "-" ? n.skips.push(u.slice(1)) : n.names.push(u);
141
141
  }
142
142
  function a(s, i) {
143
- let u = 0, d = 0, g = -1, p = 0;
143
+ let u = 0, d = 0, g = -1, m = 0;
144
144
  for (; u < s.length; )
145
145
  if (d < i.length && (i[d] === s[u] || i[d] === "*"))
146
- i[d] === "*" ? (g = d, p = u, d++) : (u++, d++);
146
+ i[d] === "*" ? (g = d, m = u, d++) : (u++, d++);
147
147
  else if (g !== -1)
148
- d = g + 1, p++, u = p;
148
+ d = g + 1, m++, u = m;
149
149
  else
150
150
  return !1;
151
151
  for (; d < i.length && i[d] === "*"; )
152
152
  d++;
153
153
  return d === i.length;
154
154
  }
155
- function w() {
155
+ function h() {
156
156
  const s = [
157
157
  ...n.names,
158
158
  ...n.skips.map((i) => "-" + i)
@@ -168,7 +168,7 @@ function Y() {
168
168
  return !0;
169
169
  return !1;
170
170
  }
171
- function h(s) {
171
+ function w(s) {
172
172
  return s instanceof Error ? s.stack || s.message : s;
173
173
  }
174
174
  function f() {
@@ -279,12 +279,12 @@ function x() {
279
279
  function n(c) {
280
280
  if (c[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + c[0] + (this.useColors ? "%c " : " ") + "+" + r.exports.humanize(this.diff), !this.useColors)
281
281
  return;
282
- const h = "color: " + this.color;
283
- c.splice(1, 0, h, "color: inherit");
282
+ const w = "color: " + this.color;
283
+ c.splice(1, 0, w, "color: inherit");
284
284
  let f = 0, s = 0;
285
285
  c[0].replace(/%[a-zA-Z%]/g, (i) => {
286
286
  i !== "%%" && (f++, i === "%c" && (s = f));
287
- }), c.splice(s, 0, h);
287
+ }), c.splice(s, 0, w);
288
288
  }
289
289
  e.log = console.debug || console.log || (() => {
290
290
  });
@@ -309,23 +309,23 @@ function x() {
309
309
  }
310
310
  }
311
311
  r.exports = Y()(e);
312
- const { formatters: w } = r.exports;
313
- w.j = function(c) {
312
+ const { formatters: h } = r.exports;
313
+ h.j = function(c) {
314
314
  try {
315
315
  return JSON.stringify(c);
316
- } catch (h) {
317
- return "[UnexpectedJSONParseError]: " + h.message;
316
+ } catch (w) {
317
+ return "[UnexpectedJSONParseError]: " + w.message;
318
318
  }
319
319
  };
320
- })(O, O.exports)), O.exports;
320
+ })(_, _.exports)), _.exports;
321
321
  }
322
322
  var ee = x();
323
323
  const re = /* @__PURE__ */ Q(ee), te = re("efp:loader");
324
- function y(...r) {
324
+ function p(...r) {
325
325
  te(...r);
326
326
  }
327
327
  function ne(r) {
328
- return y("assetResolver resolveRef:", r), $(r);
328
+ return p("assetResolver resolveRef:", r), $(r);
329
329
  }
330
330
  const oe = {
331
331
  schema: "asset",
@@ -335,15 +335,17 @@ const oe = {
335
335
  let A;
336
336
  const se = /* @__PURE__ */ new WeakSet(), P = new Function("url", 'return import(url, { with: { type: "json" } });');
337
337
  async function M(r, e) {
338
- var n, o;
338
+ var n, o, l;
339
+ if ((n = e.preResolvedRefs) != null && n.has(r))
340
+ return p("importJson: using preResolvedRefs for", r), e.preResolvedRefs.get(r);
339
341
  if (A === void 0 && !e.forceFetch)
340
342
  try {
341
343
  await P(r), A = !1;
342
344
  } catch {
343
- y("importJson: dynamic import not available, falling back to fetch"), A = !0;
345
+ p("importJson: dynamic import not available, falling back to fetch"), A = !0;
344
346
  }
345
347
  let t;
346
- return !A && !e.forceFetch ? (t = (await P(r)).default, (n = e.importCallback) == null || n.call(e, r, "json")) : (y("importJson: fetch", r), t = await ae(r, e.refCache, e.signal || null), (o = e.importCallback) == null || o.call(e, r, "json")), se.has(t) || E(t), t;
348
+ return !A && !e.forceFetch ? (t = (await P(r)).default, (o = e.importCallback) == null || o.call(e, r, "json")) : (p("importJson: fetch", r), t = await ae(r, e.refCache, e.signal || null), (l = e.importCallback) == null || l.call(e, r, "json")), se.has(t) || E(t), t;
347
349
  }
348
350
  async function ae(r, e, t) {
349
351
  const n = "__loadJson__" + r;
@@ -366,7 +368,7 @@ async function j(r, e, t) {
366
368
  const ie = {
367
369
  schema: "bundle-assets",
368
370
  async resolveRef(r, e) {
369
- y("bundleAssetsResolver resolveRef:", r);
371
+ p("bundleAssetsResolver resolveRef:", r);
370
372
  const t = $(r);
371
373
  return j(r, e.refCache, async () => {
372
374
  const n = await M(t, e), o = t.substring(0, t.lastIndexOf("/") + 1);
@@ -379,17 +381,20 @@ const ie = {
379
381
  }, le = "https://efp-runtime.expofp.com/", ce = {
380
382
  schema: "expo-runtime-branch",
381
383
  async resolveRef(r, e) {
382
- y("expoRuntimeBranchResolver resolveRef:", r);
384
+ p("expoRuntimeBranchResolver resolveRef:", r);
383
385
  const t = $(r), n = `${le}branches/${t}.json`;
384
- return j(r, e.refCache, async () => ({
385
- $ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${await M(n, e)}/`
386
- }));
386
+ return j(r, e.refCache, async () => {
387
+ const { release: o } = await M(n, e);
388
+ return {
389
+ $ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${o}/`
390
+ };
391
+ });
387
392
  },
388
393
  offlineMethod: "resolveRef"
389
394
  }, fe = {
390
395
  schema: "expo-runtime-get-branch",
391
396
  async resolveRef(r, e) {
392
- y("expoRuntimeGetBranchResolver resolveRef:", r);
397
+ p("expoRuntimeGetBranchResolver resolveRef:", r);
393
398
  const n = `https://${$(r)}.expofp.com/get-branch`;
394
399
  return M(n, e);
395
400
  },
@@ -400,7 +405,7 @@ const ie = {
400
405
  // return canResolveRefSchema(ref, SCHEMA);
401
406
  // },
402
407
  async resolveRef(r) {
403
- y("expoRuntimeResolver resolveRef:", r);
408
+ p("expoRuntimeResolver resolveRef:", r);
404
409
  const e = $(r), t = {
405
410
  entry: { $ref: `asset+${e}expofp.js` },
406
411
  assets: { $ref: `bundle-assets+${e}bundle.json` }
@@ -430,20 +435,20 @@ const ie = {
430
435
  return r.startsWith("http://") || r.startsWith("https://") || r.startsWith("./");
431
436
  },
432
437
  resolveRef(r, e) {
433
- if (y("httpResolver resolveRef:", r), !this.canResolve(r)) throw new Error(`Unexpected ref in httpResolver: ${r}`);
438
+ if (p("httpResolver resolveRef:", r), !this.canResolve(r)) throw new Error(`Unexpected ref in httpResolver: ${r}`);
434
439
  return M(r, e);
435
440
  },
436
441
  offlineMethod: "resolveRef"
437
442
  };
438
443
  async function k(r, e) {
439
444
  const { globalVar: t, timeoutMs: n = 1e4, pollIntervalMs: o = 10 } = e;
440
- we() ? (t && window[t] !== void 0 && delete window[t], await he(r, e.signal), t && await V(
445
+ he() ? (t && window[t] !== void 0 && delete window[t], await we(r, e.signal), t && await Z(
441
446
  () => window[t],
442
447
  t,
443
448
  n,
444
449
  o,
445
450
  e.signal
446
- )) : (t && globalThis[t] !== void 0 && delete globalThis[t], await pe(r, e.signal), t && await V(
451
+ )) : (t && globalThis[t] !== void 0 && delete globalThis[t], await pe(r, e.signal), t && await Z(
447
452
  () => globalThis[t],
448
453
  t,
449
454
  n,
@@ -451,10 +456,10 @@ async function k(r, e) {
451
456
  e.signal
452
457
  ));
453
458
  }
454
- function we() {
459
+ function he() {
455
460
  return typeof window < "u" && typeof document < "u";
456
461
  }
457
- function he(r, e) {
462
+ function we(r, e) {
458
463
  return new Promise((t, n) => {
459
464
  const o = document.createElement("script");
460
465
  o.src = r, o.async = !0;
@@ -505,9 +510,9 @@ async function pe(r, e) {
505
510
  l === void 0 ? delete o.window : o.window = l;
506
511
  }
507
512
  }
508
- function V(r, e, t, n, o) {
513
+ function Z(r, e, t, n, o) {
509
514
  return new Promise((l, a) => {
510
- const w = Date.now(), c = () => {
515
+ const h = Date.now(), c = () => {
511
516
  a(new Error("Wait for global aborted"));
512
517
  };
513
518
  if (o != null && o.aborted) {
@@ -515,7 +520,7 @@ function V(r, e, t, n, o) {
515
520
  return;
516
521
  }
517
522
  o == null || o.addEventListener("abort", c, { once: !0 });
518
- const h = () => {
523
+ const w = () => {
519
524
  if (o != null && o.aborted)
520
525
  return a(new Error("Wait for global aborted"));
521
526
  try {
@@ -523,41 +528,41 @@ function V(r, e, t, n, o) {
523
528
  return o == null || o.removeEventListener("abort", c), l();
524
529
  } catch {
525
530
  }
526
- if (Date.now() - w >= t)
531
+ if (Date.now() - h >= t)
527
532
  return o == null || o.removeEventListener("abort", c), a(new Error(`Timed out after ${t} ms waiting for global "${e}"`));
528
- setTimeout(h, n);
533
+ setTimeout(w, n);
529
534
  };
530
- h();
535
+ w();
531
536
  });
532
537
  }
533
538
  const me = {
534
539
  schema: "legacy-asset-urls",
535
540
  resolveRef(r, e) {
536
- y("legacyAssetUrlsResolver resolveRef:", r);
541
+ p("legacyAssetUrlsResolver resolveRef:", r);
537
542
  const t = e.signal;
538
543
  return j(r, e.refCache, async () => {
539
- var m, C, F, _, R;
544
+ var y, v, F, O, R;
540
545
  const n = $(r), o = `${n}version.js`;
541
546
  try {
542
547
  await k(o, {
543
548
  globalVar: "__fpDataVersion",
544
549
  timeoutMs: 3e4,
545
550
  signal: t
546
- }), (m = e.importCallback) == null || m.call(e, o, "script");
551
+ }), (y = e.importCallback) == null || y.call(e, o, "script");
547
552
  } catch {
548
553
  console.warn(`Could not load version.js at ${o}, proceeding without it`);
549
554
  }
550
- const l = globalThis.__fpDataVersion || (+/* @__PURE__ */ new Date()).toString(), a = `${n}data.js?v=${l}`, w = k(a, {
555
+ const l = globalThis.__fpDataVersion || (+/* @__PURE__ */ new Date()).toString(), a = `${n}data.js?v=${l}`, h = k(a, {
551
556
  globalVar: "__data",
552
557
  signal: t
553
558
  });
554
- (C = e.importCallback) == null || C.call(e, a, "script");
555
- const c = `${n}wf.data.js?v=${l}`, h = k(c, {
559
+ (v = e.importCallback) == null || v.call(e, a, "script");
560
+ const c = `${n}wf.data.js?v=${l}`, w = k(c, {
556
561
  globalVar: "__wfData",
557
562
  signal: t
558
563
  }).then(() => {
559
- var v;
560
- (v = e.importCallback) == null || v.call(e, c, "script");
564
+ var C;
565
+ (C = e.importCallback) == null || C.call(e, c, "script");
561
566
  }).catch(() => {
562
567
  console.warn(`Could not load wf.data.js at ${c}, proceeding without it`);
563
568
  });
@@ -566,14 +571,14 @@ const me = {
566
571
  globalVar: "__fp",
567
572
  signal: t
568
573
  });
569
- (F = e.importCallback) == null || F.call(e, f, "script"), await Promise.all([w, h, s]);
570
- const u = ((_ = globalThis.__fpLayers) != null ? _ : []).map((v) => `fp.svg.${v.name}.js`);
571
- for (const v of u) {
572
- const b = `${n}${v}?v=${l}`;
574
+ (F = e.importCallback) == null || F.call(e, f, "script"), await Promise.all([h, w, s]);
575
+ const u = ((O = globalThis.__fpLayers) != null ? O : []).map((C) => `fp.svg.${C.name}.js`);
576
+ for (const C of u) {
577
+ const b = `${n}${C}?v=${l}`;
573
578
  (R = e.importCallback) == null || R.call(e, b, "script");
574
579
  }
575
580
  const d = globalThis.__data || {};
576
- return { ...["data.js", "wf.data.js", "fp.svg.js", ...u].reduce((v, b) => (v[b] = { $ref: `asset+${n}${b}?v=${l}` }, v), {}), ...ye(n, d) };
581
+ return { ...["data.js", "wf.data.js", "fp.svg.js", ...u].reduce((C, b) => (C[b] = { $ref: `asset+${n}${b}?v=${l}` }, C), {}), ...ye(n, d) };
577
582
  });
578
583
  },
579
584
  offlineMethod: "resolveRef"
@@ -585,19 +590,19 @@ function ye(r, e) {
585
590
  typeof a == "string" && a.length > 0 && t.add(a);
586
591
  }
587
592
  return n(e.logo), (o = e.exhibitors) == null || o.forEach((a) => {
588
- var w;
589
- n(a.logo), (w = a.gallery) == null || w.forEach((c) => n(c));
593
+ var h;
594
+ n(a.logo), (h = a.gallery) == null || h.forEach((c) => n(c));
590
595
  }), (l = e.events) == null || l.forEach((a) => {
591
- var w;
592
- n(a.logoFile), (w = a.speakers) == null || w.forEach((c) => {
596
+ var h;
597
+ n(a.logoFile), (h = a.speakers) == null || h.forEach((c) => {
593
598
  n(c.photoFile);
594
599
  });
595
- }), Array.from(t).reduce((a, w) => (a[w] = { $ref: `asset+${r}${w}` }, a), {});
600
+ }), Array.from(t).reduce((a, h) => (a[h] = { $ref: `asset+${r}${h}` }, a), {});
596
601
  }
597
- const Ce = {
602
+ const ve = {
598
603
  schema: "legacy-data",
599
604
  resolveRef(r, e) {
600
- return y("legacyDataResolver resolveRef:", r), j(r, e.refCache, async () => {
605
+ return p("legacyDataResolver resolveRef:", r), j(r, e.refCache, async () => {
601
606
  const t = $(r);
602
607
  return {
603
608
  _to_remove_for_offline_to_work_dataUrlBase: t,
@@ -606,23 +611,24 @@ const Ce = {
606
611
  });
607
612
  },
608
613
  offlineMethod: "resolveRef"
609
- }, ve = [
614
+ }, Ce = [
610
615
  de,
611
616
  ie,
612
617
  oe,
613
618
  ue,
614
619
  ce,
615
620
  fe,
616
- Ce,
621
+ ve,
617
622
  me
618
623
  ], be = /* @__PURE__ */ new Map();
619
- async function J(r, e, t) {
620
- y("Resolving:", e, "of", r, t), typeof window < "u" && (window.__lastResolveObject = r);
624
+ async function D(r, e, t) {
625
+ p("Resolving:", e, "of", r, t);
621
626
  const n = {
622
627
  importCallback: t == null ? void 0 : t.importCallback,
623
628
  refCache: (t == null ? void 0 : t.refCache) || be,
624
629
  forceFetch: !!(t != null && t.forceFetch),
625
- signal: (t == null ? void 0 : t.signal) || null
630
+ signal: (t == null ? void 0 : t.signal) || null,
631
+ preResolvedRefs: t == null ? void 0 : t.preResolvedRefs
626
632
  };
627
633
  if (typeof e != "string")
628
634
  throw new Error(`Invalid JSON Pointer (not a string): ${e}`);
@@ -636,44 +642,44 @@ async function J(r, e, t) {
636
642
  if (t != null && t.mutate) {
637
643
  o.unshift("root");
638
644
  const l = { root: r };
639
- await Z(l, o, 0, n), Ee(r, l.root);
645
+ await G(l, o, 0, n), Ee(r, l.root);
640
646
  } else
641
647
  return await q(r, o, 0, n);
642
648
  }
643
- async function Z(r, e, t, n) {
649
+ async function G(r, e, t, n) {
644
650
  const o = e[t];
645
651
  if (await ge(r, o, n), t != e.length - 1) {
646
652
  if (r[o] === null || typeof r[o] != "object")
647
653
  throw new Error(
648
654
  `Cannot resolve path, encountered non-object at part '${e.slice(1).join("/")}', index ${t - 1}'`
649
655
  );
650
- return await Z(r[o], e, t + 1, n);
656
+ return await G(r[o], e, t + 1, n);
651
657
  }
652
658
  }
653
659
  async function ge(r, e, t) {
654
- y("resolveObjectMutate:", r, e);
660
+ p("resolveObjectMutate:", r, e);
655
661
  let n = r[e];
656
- const o = await D(n, t);
662
+ const o = await J(n, t);
657
663
  o !== void 0 && (r[e] = o);
658
664
  }
659
665
  async function q(r, e, t, n) {
660
666
  if (t === e.length)
661
- return await D(r, n);
667
+ return await J(r, n);
662
668
  if (r === null || typeof r != "object")
663
669
  throw new Error(
664
670
  `Cannot resolve path, encountered non-object at part '${e.join("/")}', index ${t}'`
665
671
  );
666
672
  const o = e[t];
667
673
  let l = r[o];
668
- return l === void 0 && (l = (await D(r, n))[o]), await q(l, e, t + 1, n);
674
+ return l === void 0 && (l = (await J(r, n))[o]), await q(l, e, t + 1, n);
669
675
  }
670
- async function D(r, e) {
671
- y("resolveObject:", r);
676
+ async function J(r, e) {
677
+ p("resolveObject:", r);
672
678
  let t = r;
673
679
  do {
674
680
  if (typeof t != "object" || t === null || !("$ref" in t))
675
681
  return t;
676
- const n = ve.filter((l) => S(l, t.$ref));
682
+ const n = Ce.filter((l) => S(l, t.$ref));
677
683
  if (n.length === 0) {
678
684
  if (t.$ref)
679
685
  throw new Error(`No resolver found for ref: ${t.$ref}`);
@@ -718,13 +724,12 @@ function $(r) {
718
724
  throw new Error(`Error getting URL from: ${r}, no valid prefix found`);
719
725
  }
720
726
  typeof window < "u" && (window.__debugResolve = async function(e, t, n) {
721
- let o, l, a;
722
- return typeof e == "string" ? (o = window.__lastResolveObject, l = e, a = t) : (o = e, l = t, a = n), await J(o, l, a);
727
+ return await D(e, t, n);
723
728
  });
724
729
  function I(r) {
725
730
  return async (e, ...t) => {
726
731
  try {
727
- const l = (await import(await J(e, "/runtime/entry")))[r];
732
+ const l = (await import(await D(e, "/runtime/entry")))[r];
728
733
  return l(e, ...t);
729
734
  } catch (n) {
730
735
  throw console.error("efp-loader", `Error when trying to import and call "${r}":`, n), n;
@@ -740,7 +745,7 @@ function E(r) {
740
745
  }
741
746
  return r;
742
747
  }
743
- function G(r) {
748
+ function V(r) {
744
749
  return "structuredClone" in globalThis ? globalThis.structuredClone(r) : JSON.parse(JSON.stringify(r));
745
750
  }
746
751
  function $e(r, e) {
@@ -750,12 +755,12 @@ function $e(r, e) {
750
755
  if (Array.isArray(e))
751
756
  throw new Error("Cannot merge arrays");
752
757
  const t = Object.keys(e).filter((o) => o !== "$ref");
753
- if (t.length === 0) return G(r);
758
+ if (t.length === 0) return V(r);
754
759
  if (Array.isArray(r))
755
760
  throw new Error("Cannot merge into arrays");
756
761
  if (r === null || typeof r != "object")
757
762
  throw new Error("Cannot merge into non-object target");
758
- const n = G({ ...r });
763
+ const n = V({ ...r });
759
764
  for (const o of t)
760
765
  n[o] = e[o];
761
766
  return n;
@@ -780,50 +785,56 @@ function Ee(r, e) {
780
785
  r[t] = e[t];
781
786
  }
782
787
  }
783
- async function _e(r, e, t) {
788
+ async function Oe(r, e, t) {
784
789
  t = t || {};
785
790
  for (const n of e)
786
- await J(r, n, { ...t, mutate: !0 });
791
+ await D(r, n, { ...t, mutate: !0 });
787
792
  }
788
- typeof window < "u" && (window.__debugMutateManifest = _e);
789
- async function Oe(r) {
790
- const { makeOfflineBundle: e } = await import("./makeOfflineBundle-XjvmvDQE.js");
793
+ typeof window < "u" && (window.__debugMutateManifest = Oe);
794
+ async function _e(r) {
795
+ const { makeOfflineBundle: e } = await import("./makeOfflineBundle-BoEPc05D.js");
791
796
  return await e(r);
792
797
  }
793
- async function Ae(r) {
794
- const { downloadZip: e } = await import("./downloadZip-CohB2rQN.js");
795
- return await e(r);
798
+ async function Ae(r, e) {
799
+ const { downloadOfflineZip: t } = await import("./downloadOfflineZip-RIzZSzeG.js");
800
+ return await t(r, e);
801
+ }
802
+ async function je(r, e) {
803
+ const { saveOfflineZip: t } = await import("./saveOfflineZip.browser-BTQeRUY_.js");
804
+ return await t(r, e);
796
805
  }
797
806
  async function ke(r) {
798
- const { makeOffline: e } = await import("./makeOffline-DuRXI_Dd.js"), t = await e(r);
807
+ const { makeOffline: e } = await import("./makeOffline-Doxc2dX7.js"), t = await e(r);
799
808
  for await (const n of (await t).files)
800
809
  "data" in n ? console.info(`🗳️ Put ${n.targetFilePath} <=`, n.data) : "url" in n && console.info(`🗳️ Download ${n.targetFilePath} <= ${n.url}`);
801
810
  console.info("Offline data: ", t.manifest);
802
811
  }
803
- typeof window < "u" && (window.__debugDownloadZip = Ae, window.__debugMakeOfflineBundle = Oe, window.__debugLogOfflineManifestFiles = ke);
812
+ typeof window < "u" && (window.__debugDownloadOfflineZip = Ae, window.__debugMakeOfflineBundle = _e, window.__debugLogOfflineManifestFiles = ke);
804
813
  const B = globalThis.__efpLoaderBuildInfo;
805
- B ? y("Initialized", { version: B[0], builtAt: B[1] }) : y("Initialized");
806
- const je = I("mount"), Ie = I("load"), Le = I("initialize");
807
- async function Te(r, e, ...t) {
814
+ B ? p("Initialized", { version: B[0], builtAt: B[1] }) : p("Initialized");
815
+ const Ie = I("mount"), Le = I("load"), Te = I("initialize");
816
+ async function Be(r, e, ...t) {
808
817
  return await I(r)(e, ...t);
809
818
  }
810
819
  export {
811
- S as a,
812
- $e as b,
820
+ E as a,
821
+ S as b,
813
822
  Me as c,
814
- Te as callFunction_Experimental,
815
- G as d,
816
- Ae as downloadZip,
817
- Fe as e,
823
+ Be as callFunction_Experimental,
824
+ re as d,
825
+ Ae as downloadOfflineZip,
826
+ $e as e,
827
+ V as f,
818
828
  Q as g,
819
- Le as initialize,
820
- y as l,
821
- Ie as load,
822
- Oe as makeOfflineBundle,
823
- je as mount,
824
- _e as mutateManifest,
829
+ Fe as h,
830
+ Te as initialize,
831
+ Le as load,
832
+ _e as makeOfflineBundle,
833
+ Ie as mount,
834
+ Oe as mutateManifest,
825
835
  $ as p,
826
- ve as r,
827
- J as resolve
836
+ Ce as r,
837
+ D as resolve,
838
+ je as saveOfflineZip
828
839
  };
829
840
  //# sourceMappingURL=bundle.js.map