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