@expofp/loader 1.0.32 → 1.0.33
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/{downloadZip-DwDnK9eb.js → downloadZip-CKCMYGtc.js} +2 -2
- package/dist/{downloadZip-DwDnK9eb.js.map → downloadZip-CKCMYGtc.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +287 -215
- package/dist/index.js.map +1 -1
- package/dist/makeOffline-CttQujH7.js +154 -0
- package/dist/makeOffline-CttQujH7.js.map +1 -0
- package/dist/{makeOfflineBundle-CDWAdTIW.js → makeOfflineBundle-BXfViegK.js} +2 -2
- package/dist/{makeOfflineBundle-CDWAdTIW.js.map → makeOfflineBundle-BXfViegK.js.map} +1 -1
- package/dist/mutateManifest.d.ts +2 -0
- package/dist/offline/makeOffline.d.ts +1 -2
- package/dist/resolve.d.ts +24 -2
- package/dist/resolvers/httpResolver.d.ts +1 -1
- package/dist/resolvers/legacyDataResolver.d.ts +2 -1
- package/dist/shared.d.ts +1 -0
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/dist/makeOffline-bamiAsgC.js +0 -155
- package/dist/makeOffline-bamiAsgC.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
1
|
+
function k(e) {
|
|
2
|
+
return l("assetResolver resolveRef:", e), m(e);
|
|
3
3
|
}
|
|
4
4
|
const _ = {
|
|
5
5
|
schema: "asset",
|
|
6
|
-
resolveRef: async (e) =>
|
|
6
|
+
resolveRef: async (e) => k(e),
|
|
7
7
|
offlineMethod: "localizeRef"
|
|
8
|
-
},
|
|
8
|
+
}, j = {
|
|
9
9
|
schema: "bundle-assets",
|
|
10
10
|
// canResolve(ref: string) {
|
|
11
11
|
// return canResolveRefSchema(ref, SCHEMA_PREFIX_BASE);
|
|
12
12
|
// },
|
|
13
|
-
async resolveRef(e) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
async resolveRef(e, t) {
|
|
14
|
+
var o, a;
|
|
15
|
+
if (l("bundleAssetsResolver resolveRef:", e), (o = t.refCache) != null && o.has(e))
|
|
16
|
+
return t.refCache.get(e);
|
|
17
|
+
const r = m(e), n = fetch(r).then(async (s) => {
|
|
18
|
+
var f;
|
|
19
|
+
if (!s.ok)
|
|
18
20
|
throw new Error(`Failed to fetch ref from ${e}`);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
(f = t.fetchCallback) == null || f.call(t, r);
|
|
22
|
+
const i = await s.json(), w = r.substring(0, r.lastIndexOf("/") + 1), c = i.map((u) => ({
|
|
23
|
+
$ref: `asset+${w}${u}`
|
|
21
24
|
}));
|
|
22
|
-
return
|
|
25
|
+
return d(c), c;
|
|
23
26
|
});
|
|
24
|
-
return
|
|
27
|
+
return (a = t.refCache) == null || a.set(e, n), n;
|
|
25
28
|
},
|
|
26
29
|
// async *makeOfflineRef(ref: string) {
|
|
27
30
|
// log('bundleAssetsResolver makeOfflineRef:', ref);
|
|
@@ -52,37 +55,39 @@ const _ = {
|
|
|
52
55
|
// yield { data, targetFilePath };
|
|
53
56
|
// return { $ref: targetFilePath, [STOP_RESOLVING]: true };
|
|
54
57
|
// },
|
|
55
|
-
},
|
|
58
|
+
}, F = "https://efp-runtime.expofp.com/", M = {
|
|
56
59
|
schema: "expo-runtime-branch",
|
|
57
60
|
// canResolve(ref: string) {
|
|
58
61
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
59
62
|
// },
|
|
60
|
-
async resolveRef(e) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
async resolveRef(e, t) {
|
|
64
|
+
var o, a;
|
|
65
|
+
if (l("expoRuntimeBranchResolver resolveRef:", e), (o = t.refCache) != null && o.has(e))
|
|
66
|
+
return t.refCache.get(e);
|
|
67
|
+
const r = m(e), n = new Promise(async (s, i) => {
|
|
68
|
+
var w;
|
|
64
69
|
try {
|
|
65
|
-
const
|
|
66
|
-
let
|
|
67
|
-
for (const
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
|
|
70
|
+
const c = [`${F}branches/${r}.json`];
|
|
71
|
+
let f;
|
|
72
|
+
for (const p of c) {
|
|
73
|
+
l("Fetching HTTP:", p);
|
|
74
|
+
const h = await fetch(p);
|
|
75
|
+
if (h.ok) {
|
|
76
|
+
(w = t.fetchCallback) == null || w.call(t, p), f = await h.json();
|
|
72
77
|
break;
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
|
-
if (!
|
|
80
|
+
if (!f)
|
|
76
81
|
throw new Error(`Failed to fetch release from ${e}`);
|
|
77
|
-
const
|
|
78
|
-
$ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${
|
|
82
|
+
const u = {
|
|
83
|
+
$ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${f}/`
|
|
79
84
|
};
|
|
80
|
-
|
|
81
|
-
} catch (
|
|
82
|
-
|
|
85
|
+
d(u), s(u);
|
|
86
|
+
} catch (c) {
|
|
87
|
+
i(c);
|
|
83
88
|
}
|
|
84
89
|
});
|
|
85
|
-
return
|
|
90
|
+
return (a = t.refCache) == null || a.set(e, n), n;
|
|
86
91
|
},
|
|
87
92
|
// async *makeOfflineRef(ref: string) {
|
|
88
93
|
// log('expoRuntimeBranchResolver makeOfflineRef:', ref);
|
|
@@ -102,26 +107,29 @@ const _ = {
|
|
|
102
107
|
// return targetFilePath;
|
|
103
108
|
// },
|
|
104
109
|
offlineMethod: "resolveRef"
|
|
105
|
-
},
|
|
110
|
+
}, A = {
|
|
106
111
|
schema: "expo-runtime-get-branch",
|
|
107
112
|
// canResolve(ref: string) {
|
|
108
113
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
109
114
|
// },
|
|
110
|
-
async resolveRef(e) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
async resolveRef(e, t) {
|
|
116
|
+
var a, s;
|
|
117
|
+
if (l("expoRuntimeGetBranchResolver resolveRef:", e), (a = t.refCache) != null && a.has(e))
|
|
118
|
+
return t.refCache.get(e);
|
|
119
|
+
const r = m(e), n = `https://${r}.expofp.com/get-branch`;
|
|
120
|
+
l("Fetching HTTP:", n);
|
|
121
|
+
const o = fetch(n).then(async (i) => {
|
|
122
|
+
var u;
|
|
123
|
+
if (!i.ok)
|
|
117
124
|
throw new Error(`Failed to fetch ref from ${e}`);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
(u = t.fetchCallback) == null || u.call(t, n);
|
|
126
|
+
const c = (await i.json()).branch;
|
|
127
|
+
if (!c)
|
|
128
|
+
throw new Error(`Invalid response when fetching branch for expo ${r}`);
|
|
129
|
+
const f = { $ref: `expo-runtime-branch:${c}` };
|
|
130
|
+
return d(f), f;
|
|
123
131
|
});
|
|
124
|
-
return
|
|
132
|
+
return (s = t.refCache) == null || s.set(e, o), o;
|
|
125
133
|
},
|
|
126
134
|
// async *makeOfflineRef(ref: string) {
|
|
127
135
|
// log('expoRuntimeBranchResolver makeOfflineRef:', ref);
|
|
@@ -141,18 +149,18 @@ const _ = {
|
|
|
141
149
|
// return targetFilePath;
|
|
142
150
|
// },
|
|
143
151
|
offlineMethod: "resolveRef"
|
|
144
|
-
},
|
|
152
|
+
}, T = {
|
|
145
153
|
schema: "expo-runtime",
|
|
146
154
|
// canResolve(ref: string) {
|
|
147
155
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
148
156
|
// },
|
|
149
157
|
async resolveRef(e) {
|
|
150
|
-
|
|
151
|
-
const t =
|
|
158
|
+
l("expoRuntimeResolver resolveRef:", e);
|
|
159
|
+
const t = m(e), r = {
|
|
152
160
|
entry: { $ref: `asset+${t}expofp.js` },
|
|
153
161
|
assets: { $ref: `bundle-assets+${t}bundle.json` }
|
|
154
162
|
};
|
|
155
|
-
return
|
|
163
|
+
return d(r), r;
|
|
156
164
|
},
|
|
157
165
|
// async *makeOfflineRef(ref: string) {
|
|
158
166
|
// log('expoRuntimeResolver makeOfflineRef:', ref);
|
|
@@ -172,22 +180,25 @@ const _ = {
|
|
|
172
180
|
// return targetFilePath;
|
|
173
181
|
// },
|
|
174
182
|
offlineMethod: "resolveRef"
|
|
175
|
-
},
|
|
183
|
+
}, B = {
|
|
176
184
|
canResolve(e) {
|
|
177
185
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("./");
|
|
178
186
|
},
|
|
179
|
-
async resolveRef(e) {
|
|
180
|
-
|
|
181
|
-
if (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
async resolveRef(e, t) {
|
|
188
|
+
var n, o;
|
|
189
|
+
if (l("httpResolver resolveRef:", e), !this.canResolve(e)) throw new Error(`Unexpected ref in httpResolver: ${e}`);
|
|
190
|
+
if ((n = t.refCache) != null && n.has(e))
|
|
191
|
+
return t.refCache.get(e);
|
|
192
|
+
l("Fetching HTTP ref:", e);
|
|
193
|
+
const r = fetch(e).then(async (a) => {
|
|
194
|
+
var i;
|
|
195
|
+
if (!a.ok)
|
|
186
196
|
throw new Error(`Failed to fetch ref from ${e}`);
|
|
187
|
-
|
|
188
|
-
|
|
197
|
+
(i = t.fetchCallback) == null || i.call(t, e);
|
|
198
|
+
const s = await a.json();
|
|
199
|
+
return d(s), s;
|
|
189
200
|
});
|
|
190
|
-
return
|
|
201
|
+
return (o = t.refCache) == null || o.set(e, r), r;
|
|
191
202
|
},
|
|
192
203
|
// async *makeOfflineRef(ref) {
|
|
193
204
|
// log('httpResolver makeOfflineRef:', ref);
|
|
@@ -208,33 +219,33 @@ const _ = {
|
|
|
208
219
|
// },
|
|
209
220
|
offlineMethod: "resolveRef"
|
|
210
221
|
};
|
|
211
|
-
async function
|
|
212
|
-
const { globalVar:
|
|
213
|
-
|
|
214
|
-
() => globalThis[
|
|
222
|
+
async function g(e, t = {}) {
|
|
223
|
+
const { globalVar: r, timeoutMs: n = 1e4, pollIntervalMs: o = 10 } = t;
|
|
224
|
+
N() ? (await P(e), r && await R(() => window[r], r, n, o)) : (await S(e), r && await R(
|
|
225
|
+
() => globalThis[r],
|
|
226
|
+
r,
|
|
215
227
|
n,
|
|
216
|
-
o
|
|
217
|
-
r
|
|
228
|
+
o
|
|
218
229
|
));
|
|
219
230
|
}
|
|
220
|
-
function
|
|
231
|
+
function N() {
|
|
221
232
|
return typeof window < "u" && typeof document < "u";
|
|
222
233
|
}
|
|
223
|
-
function
|
|
224
|
-
return new Promise((t,
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
|
|
234
|
+
function P(e) {
|
|
235
|
+
return new Promise((t, r) => {
|
|
236
|
+
const n = document.createElement("script");
|
|
237
|
+
n.src = e, n.async = !0;
|
|
238
|
+
const o = () => {
|
|
239
|
+
n.onload = null, n.onerror = null;
|
|
229
240
|
};
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
}, document.head.appendChild(
|
|
241
|
+
n.onload = () => {
|
|
242
|
+
o(), t();
|
|
243
|
+
}, n.onerror = () => {
|
|
244
|
+
o(), r(new Error(`Failed to load script: ${e}`));
|
|
245
|
+
}, document.head.appendChild(n);
|
|
235
246
|
});
|
|
236
247
|
}
|
|
237
|
-
async function
|
|
248
|
+
async function S(e) {
|
|
238
249
|
if (typeof fetch != "function")
|
|
239
250
|
throw new Error(
|
|
240
251
|
"loadAndWaitGlobal: fetch is not available. Use Node 18+ or provide a global fetch."
|
|
@@ -242,251 +253,312 @@ async function N(e) {
|
|
|
242
253
|
const t = await fetch(e);
|
|
243
254
|
if (!t.ok)
|
|
244
255
|
throw new Error(`Failed to load script in Node (HTTP ${t.status}): ${e}`);
|
|
245
|
-
const
|
|
246
|
-
(0, eval)(
|
|
256
|
+
const r = await t.text();
|
|
257
|
+
(0, eval)(r);
|
|
247
258
|
}
|
|
248
|
-
function
|
|
249
|
-
return new Promise((
|
|
250
|
-
const
|
|
259
|
+
function R(e, t, r, n) {
|
|
260
|
+
return new Promise((o, a) => {
|
|
261
|
+
const s = performance.now(), i = () => {
|
|
251
262
|
try {
|
|
252
263
|
if (e() !== void 0)
|
|
253
|
-
return
|
|
264
|
+
return o();
|
|
254
265
|
} catch {
|
|
255
266
|
}
|
|
256
|
-
if (performance.now() -
|
|
257
|
-
return
|
|
258
|
-
setTimeout(
|
|
267
|
+
if (performance.now() - s >= r)
|
|
268
|
+
return a(new Error(`Timed out after ${r} ms waiting for global "${t}"`));
|
|
269
|
+
setTimeout(i, n);
|
|
259
270
|
};
|
|
260
|
-
|
|
271
|
+
i();
|
|
261
272
|
});
|
|
262
273
|
}
|
|
263
|
-
const
|
|
274
|
+
const W = {
|
|
264
275
|
schema: "legacy-data",
|
|
265
276
|
// canResolve: (ref: string) => canResolveRefSchema(ref, 'legacy-data-js'),
|
|
266
|
-
async resolveRef(e) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
277
|
+
async resolveRef(e, t) {
|
|
278
|
+
var n, o;
|
|
279
|
+
if (l("legacyDataResolver resolveRef:", e), (n = t.refCache) != null && n.has(e))
|
|
280
|
+
return t.refCache.get(e);
|
|
281
|
+
const r = (async () => {
|
|
282
|
+
const a = m(e);
|
|
271
283
|
try {
|
|
272
|
-
await
|
|
284
|
+
await g(`${a}version.js`);
|
|
273
285
|
} catch {
|
|
274
286
|
console.warn("Could not load version.js, proceeding without it");
|
|
275
287
|
}
|
|
276
|
-
const
|
|
277
|
-
let
|
|
288
|
+
const s = globalThis.__fpDataVersion || (+/* @__PURE__ */ new Date()).toString();
|
|
289
|
+
let i = [];
|
|
278
290
|
await Promise.all([
|
|
279
291
|
(async function() {
|
|
280
|
-
const h = await fetch(`${
|
|
281
|
-
if (h.ok)
|
|
292
|
+
const h = await fetch(`${a}files.json?v=${s}`);
|
|
293
|
+
if (h.ok) i = await h.json();
|
|
282
294
|
else
|
|
283
|
-
throw new Error(`Could not load files.json from ${
|
|
295
|
+
throw new Error(`Could not load files.json from ${a}files.json?v=${s}`);
|
|
284
296
|
})(),
|
|
285
|
-
|
|
297
|
+
g(`${a}data.js?v=${s}`, { globalVar: "__data" })
|
|
286
298
|
// injectAndWaitForGlobal(`${dataUrlBase}data.js?v=${version}`, '__data'),
|
|
287
299
|
// injectAndWaitForGlobal(`${dataUrlBase}fp.svg.js?v=${version}`, '__fp'),
|
|
288
300
|
]);
|
|
289
|
-
const
|
|
290
|
-
_to_remove_for_offline_to_work_dataUrlBase:
|
|
301
|
+
const w = globalThis.__data || {}, f = [...i, "data.js"].reduce((p, h) => (p[h] = { $ref: `asset+${a}${h}?v=${s}` }, p), {}), u = {
|
|
302
|
+
_to_remove_for_offline_to_work_dataUrlBase: a,
|
|
291
303
|
// dataFiles: dataFiles.reduce((map, file) => {
|
|
292
304
|
// map[file] = { $ref: `asset+${dataUrlBase}${file}?v=${version}` };
|
|
293
305
|
// return map;
|
|
294
306
|
// }, {} as Record<string, { $ref: string }>),
|
|
295
|
-
legacyAssetUrls: { ...
|
|
307
|
+
legacyAssetUrls: { ...f, ...D(a, w) }
|
|
296
308
|
};
|
|
297
|
-
return
|
|
309
|
+
return d(u), u;
|
|
298
310
|
})();
|
|
299
|
-
return
|
|
311
|
+
return (o = t.refCache) == null || o.set(e, r), r;
|
|
300
312
|
},
|
|
301
313
|
offlineMethod: "resolveRef"
|
|
302
314
|
};
|
|
303
|
-
function
|
|
304
|
-
const
|
|
305
|
-
function o
|
|
306
|
-
typeof
|
|
315
|
+
function D(e, t) {
|
|
316
|
+
const r = /* @__PURE__ */ new Set();
|
|
317
|
+
function n(o) {
|
|
318
|
+
typeof o == "string" && o.length > 0 && r.add(o);
|
|
307
319
|
}
|
|
308
|
-
return
|
|
309
|
-
var
|
|
310
|
-
o
|
|
311
|
-
}), t.events.forEach((
|
|
312
|
-
var
|
|
313
|
-
o
|
|
314
|
-
|
|
320
|
+
return n(t.logo), t.exhibitors.forEach((o) => {
|
|
321
|
+
var a;
|
|
322
|
+
n(o.logo), (a = o.gallery) == null || a.forEach((s) => n(s));
|
|
323
|
+
}), t.events.forEach((o) => {
|
|
324
|
+
var a;
|
|
325
|
+
n(o.logoFile), (a = o.speakers) == null || a.forEach((s) => {
|
|
326
|
+
n(s.photoFile);
|
|
315
327
|
});
|
|
316
|
-
}), Array.from(
|
|
328
|
+
}), Array.from(r).reduce((o, a) => (o[a] = { $ref: `asset+${e}${a}` }, o), {});
|
|
317
329
|
}
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
|
|
330
|
+
const I = [
|
|
331
|
+
B,
|
|
332
|
+
j,
|
|
321
333
|
_,
|
|
322
|
-
A,
|
|
323
334
|
T,
|
|
324
|
-
|
|
335
|
+
M,
|
|
336
|
+
A,
|
|
325
337
|
// expoResolver,
|
|
326
|
-
|
|
327
|
-
];
|
|
328
|
-
async function
|
|
329
|
-
|
|
338
|
+
W
|
|
339
|
+
], U = /* @__PURE__ */ new Map();
|
|
340
|
+
async function b(e, t, r) {
|
|
341
|
+
l("Resolving:", t), typeof window < "u" && (window.__lastResolveObject = e);
|
|
342
|
+
let n;
|
|
343
|
+
!r || r.refCache === "global" ? n = U : (r == null ? void 0 : r.refCache) === "temp" ? n = /* @__PURE__ */ new Map() : (r == null ? void 0 : r.refCache) === "disable" ? n = void 0 : n = r == null ? void 0 : r.refCache;
|
|
344
|
+
const o = {
|
|
345
|
+
refCache: n,
|
|
346
|
+
fetchCallback: r == null ? void 0 : r.fetchCallback
|
|
347
|
+
};
|
|
348
|
+
if (typeof t != "string")
|
|
330
349
|
throw new Error(`Invalid JSON Pointer (not a string): ${t}`);
|
|
331
350
|
if (!t.startsWith("/"))
|
|
332
351
|
throw new Error(`Invalid JSON Pointer: ${t}`);
|
|
333
352
|
if (t.length > 1 && t.endsWith("/"))
|
|
334
353
|
throw new Error(`Invalid JSON Pointer: ${t}`);
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const n = t.substring(1).split("/");
|
|
338
|
-
if (n.some((r) => r.length === 0))
|
|
354
|
+
let a;
|
|
355
|
+
if (t === "/" ? a = [] : a = t.substring(1).split("/"), a.some((s) => s.length === 0))
|
|
339
356
|
throw new Error(`Invalid JSON Pointer (empty part): ${t}`);
|
|
340
|
-
|
|
341
|
-
|
|
357
|
+
if (r != null && r.mutate) {
|
|
358
|
+
a.unshift("root");
|
|
359
|
+
const s = { root: e };
|
|
360
|
+
await E(
|
|
361
|
+
s,
|
|
362
|
+
// 'root',
|
|
363
|
+
a,
|
|
364
|
+
0,
|
|
365
|
+
o
|
|
366
|
+
), V(e, s.root);
|
|
367
|
+
} else
|
|
368
|
+
return await C(e, a, 0, o);
|
|
342
369
|
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
const r = t[n];
|
|
348
|
-
if (typeof o != "object" || o === null)
|
|
370
|
+
async function E(e, t, r, n) {
|
|
371
|
+
const o = t[r];
|
|
372
|
+
if (await z(e, o, n), r != t.length - 1) {
|
|
373
|
+
if (e[o] === null || typeof e[o] != "object")
|
|
349
374
|
throw new Error(
|
|
350
375
|
`Cannot resolve path, encountered non-object at part '${t.join(
|
|
351
376
|
"/"
|
|
352
|
-
)}, index ${
|
|
377
|
+
)}', index ${r}'`
|
|
353
378
|
);
|
|
354
|
-
|
|
355
|
-
o = await g(s), n++;
|
|
379
|
+
return await E(e[o], t, r + 1, n);
|
|
356
380
|
}
|
|
357
|
-
return o;
|
|
358
381
|
}
|
|
359
|
-
async function
|
|
360
|
-
|
|
361
|
-
let
|
|
382
|
+
async function z(e, t, r) {
|
|
383
|
+
l("resolveObjectMutate:", e, t);
|
|
384
|
+
let n = e[t];
|
|
385
|
+
const o = await y(n, r);
|
|
386
|
+
o !== void 0 && (e[t] = o);
|
|
387
|
+
}
|
|
388
|
+
async function C(e, t, r, n) {
|
|
389
|
+
if (r === t.length)
|
|
390
|
+
return await y(e, n);
|
|
391
|
+
if (e === null || typeof e != "object")
|
|
392
|
+
throw new Error(
|
|
393
|
+
`Cannot resolve path, encountered non-object at part '${t.join("/")}', index ${r}'`
|
|
394
|
+
);
|
|
395
|
+
const o = t[r];
|
|
396
|
+
let a = e[o];
|
|
397
|
+
return a === void 0 && (a = (await y(e, n))[o]), await C(a, t, r + 1, n);
|
|
398
|
+
}
|
|
399
|
+
async function y(e, t) {
|
|
400
|
+
l("resolveObject:", e);
|
|
401
|
+
let r = e;
|
|
362
402
|
do {
|
|
363
|
-
if (typeof
|
|
364
|
-
return
|
|
365
|
-
const n =
|
|
403
|
+
if (typeof r != "object" || r === null || !("$ref" in r))
|
|
404
|
+
return r;
|
|
405
|
+
const n = I.filter((a) => O(a, r.$ref));
|
|
366
406
|
if (n.length === 0) {
|
|
367
|
-
if (
|
|
368
|
-
throw new Error(`No resolver found for ref: ${
|
|
369
|
-
return
|
|
407
|
+
if (r.$ref)
|
|
408
|
+
throw new Error(`No resolver found for ref: ${r.$ref}`);
|
|
409
|
+
return d(r), r;
|
|
370
410
|
}
|
|
371
411
|
if (n.length > 1)
|
|
372
|
-
throw new Error(`Multiple resolvers can resolve ref: ${
|
|
373
|
-
const o = await
|
|
374
|
-
|
|
412
|
+
throw new Error(`Multiple resolvers can resolve ref: ${r.$ref}`);
|
|
413
|
+
const o = await J(n[0], r.$ref, t);
|
|
414
|
+
r = L(o, r);
|
|
375
415
|
} while (!0);
|
|
376
416
|
}
|
|
377
|
-
async function
|
|
417
|
+
async function J(e, t, r) {
|
|
378
418
|
if (!O(e, t))
|
|
379
419
|
throw new Error(`Unexpected ref: ${t}`);
|
|
380
|
-
return e.resolveRef(t);
|
|
420
|
+
return e.resolveRef(t, r);
|
|
381
421
|
}
|
|
382
422
|
function O(e, t) {
|
|
383
423
|
if (e.canResolve)
|
|
384
424
|
return e.canResolve(t);
|
|
385
425
|
if (e.schema)
|
|
386
|
-
return
|
|
426
|
+
return H(t, e.schema);
|
|
387
427
|
throw new Error("Resolver is missing canResolve method and schema property");
|
|
388
428
|
}
|
|
389
|
-
function
|
|
390
|
-
const
|
|
391
|
-
for (const
|
|
392
|
-
if (e.startsWith(
|
|
429
|
+
function H(e, t) {
|
|
430
|
+
const r = [`${t}+`, `${t}:`];
|
|
431
|
+
for (const n of r)
|
|
432
|
+
if (e.startsWith(n))
|
|
393
433
|
return !0;
|
|
394
434
|
return !1;
|
|
395
435
|
}
|
|
396
|
-
function
|
|
436
|
+
function m(e) {
|
|
397
437
|
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
398
438
|
return e;
|
|
399
|
-
const t = e.indexOf("+http://"),
|
|
439
|
+
const t = e.indexOf("+http://"), r = e.indexOf("+https://");
|
|
400
440
|
if (t !== -1)
|
|
401
441
|
return e.substring(t + 1);
|
|
442
|
+
if (r !== -1)
|
|
443
|
+
return e.substring(r + 1);
|
|
444
|
+
const n = e.indexOf(":");
|
|
402
445
|
if (n !== -1)
|
|
403
446
|
return e.substring(n + 1);
|
|
404
|
-
const o = e.indexOf(":");
|
|
405
|
-
if (o !== -1)
|
|
406
|
-
return e.substring(o + 1);
|
|
407
447
|
throw new Error(`Error getting URL from: ${e}, no valid prefix found`);
|
|
408
448
|
}
|
|
409
|
-
function
|
|
410
|
-
|
|
449
|
+
typeof window < "u" && (window.__debugResolve = async function(t, r, n) {
|
|
450
|
+
let o, a, s;
|
|
451
|
+
return typeof t == "string" ? (o = window.__lastResolveObject, a = t, s = r) : (o = t, a = r, s = n), await b(o, a, s);
|
|
452
|
+
});
|
|
453
|
+
function v(e) {
|
|
454
|
+
return async (t, ...r) => {
|
|
411
455
|
try {
|
|
412
|
-
const
|
|
413
|
-
return
|
|
414
|
-
} catch (
|
|
415
|
-
throw console.error("efp-loader", `Error when trying to import and call "${e}":`,
|
|
456
|
+
const a = (await import(await b(t, "/runtime/entry")))[e];
|
|
457
|
+
return a(t, ...r);
|
|
458
|
+
} catch (n) {
|
|
459
|
+
throw console.error("efp-loader", `Error when trying to import and call "${e}":`, n), n;
|
|
416
460
|
}
|
|
417
461
|
};
|
|
418
462
|
}
|
|
419
|
-
function
|
|
463
|
+
function l(...e) {
|
|
420
464
|
console.debug("efp-loader", ...e);
|
|
421
465
|
}
|
|
422
|
-
function
|
|
466
|
+
function d(e) {
|
|
423
467
|
if (e === null || typeof e != "object") return e;
|
|
424
468
|
Object.freeze(e);
|
|
425
469
|
for (const t of Object.keys(e)) {
|
|
426
|
-
const
|
|
427
|
-
typeof
|
|
470
|
+
const r = e[t];
|
|
471
|
+
typeof r == "object" && r !== null && !Object.isFrozen(r) && d(r);
|
|
428
472
|
}
|
|
429
473
|
return e;
|
|
430
474
|
}
|
|
431
|
-
function
|
|
475
|
+
function $(e) {
|
|
432
476
|
return "structuredClone" in globalThis ? globalThis.structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
433
477
|
}
|
|
434
|
-
function
|
|
478
|
+
function G(e) {
|
|
435
479
|
if (typeof document > "u") return;
|
|
436
480
|
const t = document.createElement("link");
|
|
437
481
|
t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
438
482
|
}
|
|
439
|
-
function
|
|
483
|
+
function L(e, t) {
|
|
440
484
|
if (e === t) return;
|
|
441
485
|
if (t === null || typeof t != "object")
|
|
442
486
|
throw new Error("Cannot merge non-object source");
|
|
443
487
|
if (Array.isArray(t))
|
|
444
488
|
throw new Error("Cannot merge arrays");
|
|
445
|
-
const
|
|
446
|
-
if (
|
|
489
|
+
const r = Object.keys(t).filter((o) => o !== "$ref");
|
|
490
|
+
if (r.length === 0) return $(e);
|
|
447
491
|
if (Array.isArray(e))
|
|
448
492
|
throw new Error("Cannot merge into arrays");
|
|
449
493
|
if (e === null || typeof e != "object")
|
|
450
494
|
throw new Error("Cannot merge into non-object target");
|
|
451
|
-
const
|
|
452
|
-
for (const
|
|
453
|
-
o
|
|
454
|
-
return
|
|
495
|
+
const n = $({ ...e });
|
|
496
|
+
for (const o of r)
|
|
497
|
+
n[o] = t[o];
|
|
498
|
+
return n;
|
|
499
|
+
}
|
|
500
|
+
function V(e, t) {
|
|
501
|
+
if (e !== t) {
|
|
502
|
+
if (t === null || typeof t != "object")
|
|
503
|
+
throw new Error("Cannot replace with non-object source");
|
|
504
|
+
if (e === null || typeof e != "object")
|
|
505
|
+
throw new Error("Cannot replace non-object target");
|
|
506
|
+
if (Array.isArray(e)) {
|
|
507
|
+
if (!Array.isArray(t))
|
|
508
|
+
throw new Error("replaceObjectFields does not support mixing arrays and objects");
|
|
509
|
+
e.length = 0;
|
|
510
|
+
for (const r of t)
|
|
511
|
+
e.push(r);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
for (const r of Object.keys(e))
|
|
515
|
+
r in t || delete e[r];
|
|
516
|
+
for (const r of Object.keys(t))
|
|
517
|
+
e[r] = t[r];
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
async function Z(e, t, r) {
|
|
521
|
+
if (r || (r = { refCache: /* @__PURE__ */ new Map(), mutate: !0 }), !r.mutate)
|
|
522
|
+
throw new Error("resolveContext.mutate must be true for mutateManifest");
|
|
523
|
+
for (const n of t)
|
|
524
|
+
await b(e, n, r);
|
|
455
525
|
}
|
|
456
|
-
|
|
457
|
-
|
|
526
|
+
typeof window < "u" && (window.__debugMutateManifest = Z);
|
|
527
|
+
async function K(e) {
|
|
528
|
+
const { makeOfflineBundle: t } = await import("./makeOfflineBundle-BXfViegK.js");
|
|
458
529
|
return await t(e);
|
|
459
530
|
}
|
|
460
|
-
async function
|
|
461
|
-
const { downloadZip: t } = await import("./downloadZip-
|
|
531
|
+
async function q(e) {
|
|
532
|
+
const { downloadZip: t } = await import("./downloadZip-CKCMYGtc.js");
|
|
462
533
|
return await t(e);
|
|
463
534
|
}
|
|
464
|
-
async function
|
|
465
|
-
const { makeOffline: t } = await import("./makeOffline-
|
|
466
|
-
for await (const
|
|
467
|
-
"data" in
|
|
468
|
-
console.info("Offline data: ",
|
|
535
|
+
async function Q(e) {
|
|
536
|
+
const { makeOffline: t } = await import("./makeOffline-CttQujH7.js"), r = await t(e);
|
|
537
|
+
for await (const n of (await r).files)
|
|
538
|
+
"data" in n ? console.info(`🗳️ Put ${n.targetFilePath} <=`, n.data) : "url" in n && console.info(`🗳️ Download ${n.targetFilePath} <= ${n.url}`);
|
|
539
|
+
console.info("Offline data: ", r.manifest);
|
|
469
540
|
}
|
|
470
|
-
typeof window < "u" && (window.__debugDownloadZip =
|
|
471
|
-
const
|
|
472
|
-
async function
|
|
473
|
-
return await
|
|
541
|
+
typeof window < "u" && (window.__debugDownloadZip = q, window.__debugMakeOfflineBundle = K, window.__debugLogOfflineManifestFiles = Q);
|
|
542
|
+
const X = v("mount"), Y = v("load"), x = v("initialize");
|
|
543
|
+
async function ee(e, t, ...r) {
|
|
544
|
+
return await v(e)(t, ...r);
|
|
474
545
|
}
|
|
475
|
-
|
|
546
|
+
G("https://efp-runtime.expofp.com/");
|
|
476
547
|
export {
|
|
477
|
-
|
|
478
|
-
|
|
548
|
+
L as a,
|
|
549
|
+
J as b,
|
|
479
550
|
O as c,
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
551
|
+
ee as callFunction_Experimental,
|
|
552
|
+
$ as d,
|
|
553
|
+
q as downloadZip,
|
|
554
|
+
x as initialize,
|
|
555
|
+
l,
|
|
556
|
+
Y as load,
|
|
557
|
+
K as makeOfflineBundle,
|
|
558
|
+
X as mount,
|
|
559
|
+
Z as mutateManifest,
|
|
560
|
+
m as p,
|
|
561
|
+
I as r,
|
|
562
|
+
b as resolve
|
|
491
563
|
};
|
|
492
564
|
//# sourceMappingURL=index.js.map
|