@module-federation/bridge-vue3 2.3.3 → 2.4.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.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as Ft from "vue";
2
- import { defineComponent as Ht, ref as Ee, useAttrs as Gt, watch as xt, onMounted as Ut, onBeforeUnmount as Bt, createVNode as Vt, mergeProps as Wt, defineAsyncComponent as jt, h as qt } from "vue";
3
- import * as ae from "vue-router";
2
+ import { defineComponent as Ht, ref as ge, useAttrs as Gt, watch as xt, onMounted as Ut, onBeforeUnmount as Bt, createVNode as Vt, mergeProps as Wt, defineAsyncComponent as jt, h as qt } from "vue";
3
+ import * as ie from "vue-router";
4
4
  import { useRoute as Ke } from "vue-router";
5
5
  const Kt = ".json", zt = "FEDERATION_DEBUG", Jt = ":";
6
6
  let we = /* @__PURE__ */ function(e) {
@@ -26,7 +26,7 @@ function Ne() {
26
26
  }
27
27
  const Yt = "[ Federation Runtime ]", Xe = function(...e) {
28
28
  return e.length ? e.reduce((t, r) => r ? t ? `${t}${Jt}${r}` : r : t, "") : "";
29
- }, Ie = (e, t) => {
29
+ }, Te = (e, t) => {
30
30
  if ("getPublicPath" in e) {
31
31
  let r;
32
32
  return e.getPublicPath.startsWith("function") ? r = new Function("return " + e.getPublicPath)()() : r = new Function(e.getPublicPath)(), `${r}${t}`;
@@ -41,7 +41,7 @@ function Ze(e) {
41
41
  return "";
42
42
  }
43
43
  }
44
- const ne = (e, t) => {
44
+ const Ee = (e, t) => {
45
45
  if (!e) return t;
46
46
  const n = ((o) => {
47
47
  if (o === ".") return "";
@@ -58,68 +58,53 @@ function Zt(e) {
58
58
  return e.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
59
59
  }
60
60
  function Qt(e, t = {}) {
61
- var _, b, R;
61
+ var _;
62
62
  const { remotes: r = {}, overrides: n = {}, version: o } = t;
63
63
  let s;
64
64
  const i = () => "publicPath" in e.metaData ? (e.metaData.publicPath === "auto" || e.metaData.publicPath === "") && o ? Zt(o) : e.metaData.publicPath : e.metaData.getPublicPath, a = Object.keys(n);
65
65
  let l = {};
66
- Object.keys(r).length || (l = ((_ = e.remotes) == null ? void 0 : _.reduce((E, w) => {
66
+ Object.keys(r).length || (l = ((_ = e.remotes) == null ? void 0 : _.reduce((y, b) => {
67
67
  let S;
68
- const N = w.federationContainerName;
69
- return a.includes(N) ? S = n[N] : "version" in w ? S = w.version : S = w.entry, E[N] = { matchedVersion: S }, E;
70
- }, {})) || {}), Object.keys(r).forEach((E) => l[E] = { matchedVersion: a.includes(E) ? n[E] : r[E] });
68
+ const $ = b.federationContainerName;
69
+ return a.includes($) ? S = n[$] : "version" in b ? S = b.version : S = b.entry, y[$] = { matchedVersion: S }, y;
70
+ }, {})) || {}), Object.keys(r).forEach((y) => l[y] = { matchedVersion: a.includes(y) ? n[y] : r[y] });
71
71
  const { remoteEntry: { path: c, name: u, type: d }, types: h = {
72
72
  path: "",
73
73
  name: "",
74
74
  zip: "",
75
75
  api: ""
76
76
  }, buildInfo: { buildVersion: f }, globalName: p, ssrRemoteEntry: m } = e.metaData, { exposes: g } = e;
77
- let y = {
77
+ let E = {
78
78
  version: o || "",
79
79
  buildVersion: f,
80
80
  globalName: p,
81
- remoteEntry: ne(c, u),
81
+ remoteEntry: Ee(c, u),
82
82
  remoteEntryType: d,
83
- remoteTypes: ne(h.path, h.name),
83
+ remoteTypes: Ee(h.path, h.name),
84
84
  remoteTypesZip: h.zip || "",
85
85
  remoteTypesAPI: h.api || "",
86
86
  remotesInfo: l,
87
- shared: e == null ? void 0 : e.shared.map((E) => ({
88
- assets: E.assets,
89
- sharedName: E.name,
90
- version: E.version,
91
- usedExports: E.referenceExports || []
87
+ shared: e == null ? void 0 : e.shared.map((y) => ({
88
+ assets: y.assets,
89
+ sharedName: y.name,
90
+ version: y.version,
91
+ usedExports: y.referenceExports || []
92
92
  })),
93
- modules: g == null ? void 0 : g.map((E) => ({
94
- moduleName: E.name,
95
- modulePath: E.path,
96
- assets: E.assets
93
+ modules: g == null ? void 0 : g.map((y) => ({
94
+ moduleName: y.name,
95
+ modulePath: y.path,
96
+ assets: y.assets
97
97
  }))
98
98
  };
99
- if ((b = e.metaData) != null && b.prefetchInterface) {
100
- const E = e.metaData.prefetchInterface;
101
- y = {
102
- ...y,
103
- prefetchInterface: E
104
- };
105
- }
106
- if ((R = e.metaData) != null && R.prefetchEntry) {
107
- const { path: E, name: w, type: S } = e.metaData.prefetchEntry;
108
- y = {
109
- ...y,
110
- prefetchEntry: ne(E, w),
111
- prefetchEntryType: S
112
- };
113
- }
114
99
  if ("publicPath" in e.metaData ? (s = {
115
- ...y,
100
+ ...E,
116
101
  publicPath: i()
117
102
  }, typeof e.metaData.ssrPublicPath == "string" && (s.ssrPublicPath = e.metaData.ssrPublicPath)) : s = {
118
- ...y,
103
+ ...E,
119
104
  getPublicPath: i()
120
105
  }, m) {
121
- const E = ne(m.path, m.name);
122
- s.ssrRemoteEntry = E, s.ssrRemoteEntryType = m.type || "commonjs-module";
106
+ const y = Ee(m.path, m.name);
107
+ s.ssrRemoteEntry = y, s.ssrRemoteEntryType = m.type || "commonjs-module";
123
108
  }
124
109
  return s;
125
110
  }
@@ -240,7 +225,7 @@ async function rt(e, t) {
240
225
  return;
241
226
  }
242
227
  }
243
- function Te(e, t) {
228
+ function Ie(e, t) {
244
229
  const r = /^(https?:)?\/\//i;
245
230
  return e.replace(r, "").replace(/\/$/, "") === t.replace(r, "").replace(/\/$/, "");
246
231
  }
@@ -249,7 +234,7 @@ function nt(e) {
249
234
  const s = document.getElementsByTagName("script");
250
235
  for (let c = 0; c < s.length; c++) {
251
236
  const u = s[c], d = u.getAttribute("src");
252
- if (d && Te(d, e.url)) {
237
+ if (d && Ie(d, e.url)) {
253
238
  t = u, r = !1;
254
239
  break;
255
240
  }
@@ -264,7 +249,7 @@ function nt(e) {
264
249
  }
265
250
  let i = null;
266
251
  const a = typeof window < "u" ? (c) => {
267
- if (c.filename && Te(c.filename, e.url)) {
252
+ if (c.filename && Ie(c.filename, e.url)) {
268
253
  const u = /* @__PURE__ */ new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${c.message} (${c.filename}:${c.lineno}:${c.colno})`);
269
254
  u.name = "ScriptExecutionError", i = u;
270
255
  }
@@ -306,7 +291,7 @@ function _e(e) {
306
291
  const n = document.getElementsByTagName("link");
307
292
  for (let s = 0; s < n.length; s++) {
308
293
  const i = n[s], a = i.getAttribute("href"), l = i.getAttribute("rel");
309
- if (a && Te(a, e.url) && l === e.attrs.rel) {
294
+ if (a && Ie(a, e.url) && l === e.attrs.rel) {
310
295
  t = i, r = !1;
311
296
  break;
312
297
  }
@@ -354,14 +339,14 @@ function or(e, t) {
354
339
  a && document.head.appendChild(i);
355
340
  });
356
341
  }
357
- const oe = /* @__PURE__ */ new Map();
342
+ const ne = /* @__PURE__ */ new Map();
358
343
  function B(e) {
359
344
  if (!e) throw new Error("import specifier is required");
360
- if (oe.has(e)) return oe.get(e);
345
+ if (ne.has(e)) return ne.get(e);
361
346
  const t = new Function("name", "return import(name)")(e).then((r) => r).catch((r) => {
362
- throw console.error(`Error importing module ${e}:`, r), oe.delete(e), r;
347
+ throw console.error(`Error importing module ${e}:`, r), ne.delete(e), r;
363
348
  });
364
- return oe.set(e, t), t;
349
+ return ne.set(e, t), t;
365
350
  }
366
351
  const ot = async () => {
367
352
  const e = await B("node-fetch");
@@ -387,19 +372,19 @@ const ot = async () => {
387
372
  const d = await (await a(l.href)).text(), [h, f] = await Promise.all([B("path"), B("vm")]), p = {
388
373
  exports: {},
389
374
  module: { exports: {} }
390
- }, m = l.pathname.split("/").slice(0, -1).join("/"), g = h.basename(l.pathname), y = new f.Script(`(function(exports, module, require, __dirname, __filename) {${d}
375
+ }, m = l.pathname.split("/").slice(0, -1).join("/"), g = h.basename(l.pathname), E = new f.Script(`(function(exports, module, require, __dirname, __filename) {${d}
391
376
  })`, {
392
377
  filename: g,
393
378
  importModuleDynamically: ((c = f.constants) == null ? void 0 : c.USE_MAIN_CONTEXT_DEFAULT_LOADER) ?? B
394
379
  });
395
380
  let _;
396
- _ = (await B("node:module")).createRequire(l.protocol === "file:" || l.protocol === "node:" ? l.href : h.join(process.cwd(), "__mf_require_base__.js")), y.runInThisContext()(p.exports, p.module, _, m, g);
397
- const b = p.module.exports || p.exports;
398
- if (r && b && r.globalName) {
399
- t(void 0, b[r.globalName] || b);
381
+ _ = (await B("node:module")).createRequire(l.protocol === "file:" || l.protocol === "node:" ? l.href : h.join(process.cwd(), "__mf_require_base__.js")), E.runInThisContext()(p.exports, p.module, _, m, g);
382
+ const y = p.module.exports || p.exports;
383
+ if (r && y && r.globalName) {
384
+ t(void 0, y[r.globalName] || y);
400
385
  return;
401
386
  }
402
- t(void 0, b);
387
+ t(void 0, y);
403
388
  } catch (u) {
404
389
  t(u instanceof Error ? u : /* @__PURE__ */ new Error(`Script execution error: ${u}`));
405
390
  }
@@ -453,9 +438,9 @@ function lr(e, t, r, n, o, s) {
453
438
  }
454
439
  const H = "[ Federation Runtime ]", Ae = tt(H);
455
440
  function P(e, t, r, n, o) {
456
- e || $(t);
441
+ e || R(t);
457
442
  }
458
- function $(e, t, r, n, o) {
443
+ function R(e, t, r, n, o) {
459
444
  if (t !== void 0) return lr(e, t, r ?? {}, (i) => {
460
445
  throw new Error(`${H}: ${i}`);
461
446
  }, n);
@@ -506,40 +491,40 @@ function ct(e) {
506
491
  const dr = (e, t) => {
507
492
  let r;
508
493
  return e.endsWith("/") ? r = e.slice(0, -1) : r = e, t.startsWith(".") && (t = t.slice(1)), r = r + t, r;
509
- }, I = typeof globalThis == "object" ? globalThis : window, k = (() => {
494
+ }, N = typeof globalThis == "object" ? globalThis : window, k = (() => {
510
495
  try {
511
496
  return document.defaultView;
512
497
  } catch {
513
- return I;
498
+ return N;
514
499
  }
515
500
  })(), Q = k;
516
- function ce(e, t, r) {
501
+ function ae(e, t, r) {
517
502
  Object.defineProperty(e, t, {
518
503
  value: r,
519
504
  configurable: !1,
520
505
  writable: !0
521
506
  });
522
507
  }
523
- function le(e, t) {
508
+ function ce(e, t) {
524
509
  return Object.hasOwnProperty.call(e, t);
525
510
  }
526
- le(I, "__GLOBAL_LOADING_REMOTE_ENTRY__") || ce(I, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
527
- const V = I.__GLOBAL_LOADING_REMOTE_ENTRY__;
511
+ ce(N, "__GLOBAL_LOADING_REMOTE_ENTRY__") || ae(N, "__GLOBAL_LOADING_REMOTE_ENTRY__", {});
512
+ const V = N.__GLOBAL_LOADING_REMOTE_ENTRY__;
528
513
  function lt(e) {
529
514
  var t, r, n, o, s, i;
530
- le(e, "__VMOK__") && !le(e, "__FEDERATION__") && ce(e, "__FEDERATION__", e.__VMOK__), le(e, "__FEDERATION__") || (ce(e, "__FEDERATION__", {
515
+ ce(e, "__VMOK__") && !ce(e, "__FEDERATION__") && ae(e, "__FEDERATION__", e.__VMOK__), ce(e, "__FEDERATION__") || (ae(e, "__FEDERATION__", {
531
516
  __GLOBAL_PLUGIN__: [],
532
517
  __INSTANCES__: [],
533
518
  moduleInfo: {},
534
519
  __SHARE__: {},
535
520
  __MANIFEST_LOADING__: {},
536
521
  __PRELOADED_MAP__: /* @__PURE__ */ new Map()
537
- }), ce(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (n = e.__FEDERATION__).moduleInfo ?? (n.moduleInfo = {}), (o = e.__FEDERATION__).__SHARE__ ?? (o.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (i = e.__FEDERATION__).__PRELOADED_MAP__ ?? (i.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
522
+ }), ae(e, "__VMOK__", e.__FEDERATION__)), (t = e.__FEDERATION__).__GLOBAL_PLUGIN__ ?? (t.__GLOBAL_PLUGIN__ = []), (r = e.__FEDERATION__).__INSTANCES__ ?? (r.__INSTANCES__ = []), (n = e.__FEDERATION__).moduleInfo ?? (n.moduleInfo = {}), (o = e.__FEDERATION__).__SHARE__ ?? (o.__SHARE__ = {}), (s = e.__FEDERATION__).__MANIFEST_LOADING__ ?? (s.__MANIFEST_LOADING__ = {}), (i = e.__FEDERATION__).__PRELOADED_MAP__ ?? (i.__PRELOADED_MAP__ = /* @__PURE__ */ new Map());
538
523
  }
539
- lt(I);
524
+ lt(N);
540
525
  lt(k);
541
526
  function pr(e, t = Ne()) {
542
- t && (I.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, I.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.3.3");
527
+ t && (N.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.4.0");
543
528
  }
544
529
  function q(e, t) {
545
530
  if (typeof t == "string") {
@@ -561,7 +546,7 @@ function q(e, t) {
561
546
  key: t
562
547
  };
563
548
  }
564
- } else $(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
549
+ } else R(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`);
565
550
  }
566
551
  const Ge = () => k.__FEDERATION__.moduleInfo, mr = (e, t) => {
567
552
  const r = q(t, Z(e)).value;
@@ -570,7 +555,7 @@ const Ge = () => k.__FEDERATION__.moduleInfo, mr = (e, t) => {
570
555
  const { version: n, ...o } = e, s = Z(o), i = q(k.__FEDERATION__.moduleInfo, s).value;
571
556
  if ((i == null ? void 0 : i.version) === n) return i;
572
557
  }
573
- }, ue = (e) => mr(e, k.__FEDERATION__.moduleInfo), xe = (e, t) => {
558
+ }, le = (e) => mr(e, k.__FEDERATION__.moduleInfo), xe = (e, t) => {
574
559
  const r = Z(e);
575
560
  return k.__FEDERATION__.moduleInfo[r] = t, k.__FEDERATION__.moduleInfo;
576
561
  }, yr = (e) => (k.__FEDERATION__.moduleInfo = {
@@ -583,9 +568,9 @@ const Ge = () => k.__FEDERATION__.moduleInfo, mr = (e, t) => {
583
568
  const r = t || `__FEDERATION_${e}:custom__`;
584
569
  return {
585
570
  remoteEntryKey: r,
586
- entryExports: I[r]
571
+ entryExports: N[r]
587
572
  };
588
- }, gr = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, Er = (e) => I.__FEDERATION__.__PRELOADED_MAP__.get(e), _r = (e) => I.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), Ue = "[0-9A-Za-z-]+", De = `(?:\\+(${Ue}(?:\\.${Ue})*))`, Y = "0|[1-9]\\d*", fe = "[0-9]+", ut = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Be = `(?:${fe}|${ut})`, br = `(?:-?(${Be}(?:\\.${Be})*))`, Ve = `(?:${Y}|${ut})`, ft = `(?:-(${Ve}(?:\\.${Ve})*))`, Re = `${Y}|x|X|\\*`, K = `[v=\\s]*(${Re})(?:\\.(${Re})(?:\\.(${Re})(?:${ft})?${De}?)?)?`, Rr = `^\\s*(${K})\\s+-\\s+(${K})\\s*$`, Sr = `[v=\\s]*${`(${fe})\\.(${fe})\\.(${fe})`}${br}?${De}?`, Fe = "((?:<|>)?=?)", $r = `(\\s*)${Fe}\\s*(${Sr}|${K})`, ht = "(?:~>?)", wr = `(\\s*)${ht}\\s+`, dt = "(?:\\^)", Nr = `(\\s*)${dt}\\s+`, Ir = "(<|>)?=?\\s*\\*", Tr = `^${dt}${K}$`, vr = `v?${`(${Y})\\.(${Y})\\.(${Y})`}${ft}?${De}?`, Ar = `^${ht}${K}$`, Pr = `^${Fe}\\s*${K}$`, kr = `^${Fe}\\s*(${vr})$|^$`, Or = "^\\s*>=\\s*0.0.0\\s*$";
573
+ }, gr = () => k.__FEDERATION__.__GLOBAL_PLUGIN__, Er = (e) => N.__FEDERATION__.__PRELOADED_MAP__.get(e), _r = (e) => N.__FEDERATION__.__PRELOADED_MAP__.set(e, !0), Ue = "[0-9A-Za-z-]+", De = `(?:\\+(${Ue}(?:\\.${Ue})*))`, Y = "0|[1-9]\\d*", ue = "[0-9]+", ut = "\\d*[a-zA-Z-][a-zA-Z0-9-]*", Be = `(?:${ue}|${ut})`, br = `(?:-?(${Be}(?:\\.${Be})*))`, Ve = `(?:${Y}|${ut})`, ft = `(?:-(${Ve}(?:\\.${Ve})*))`, Re = `${Y}|x|X|\\*`, K = `[v=\\s]*(${Re})(?:\\.(${Re})(?:\\.(${Re})(?:${ft})?${De}?)?)?`, Rr = `^\\s*(${K})\\s+-\\s+(${K})\\s*$`, Sr = `[v=\\s]*${`(${ue})\\.(${ue})\\.(${ue})`}${br}?${De}?`, Fe = "((?:<|>)?=?)", $r = `(\\s*)${Fe}\\s*(${Sr}|${K})`, ht = "(?:~>?)", wr = `(\\s*)${ht}\\s+`, dt = "(?:\\^)", Nr = `(\\s*)${dt}\\s+`, Tr = "(<|>)?=?\\s*\\*", Ir = `^${dt}${K}$`, vr = `v?${`(${Y})\\.(${Y})\\.(${Y})`}${ft}?${De}?`, Ar = `^${ht}${K}$`, Pr = `^${Fe}\\s*${K}$`, kr = `^${Fe}\\s*(${vr})$|^$`, Or = "^\\s*>=\\s*0.0.0\\s*$";
589
574
  function M(e) {
590
575
  return new RegExp(e);
591
576
  }
@@ -615,7 +600,7 @@ function Dr(e) {
615
600
  return e.replace(M(Nr), "$1^");
616
601
  }
617
602
  function Fr(e) {
618
- return e.trim().split(/\s+/).map((t) => t.replace(M(Tr), (r, n, o, s, i) => T(n) ? "" : T(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : T(s) ? n === "0" ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.0 <${Number(n) + 1}.0.0-0` : i ? n === "0" ? o === "0" ? `>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s}-${i} <${Number(n) + 1}.0.0-0` : n === "0" ? o === "0" ? `>=${n}.${o}.${s} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${Number(n) + 1}.0.0-0`)).join(" ");
603
+ return e.trim().split(/\s+/).map((t) => t.replace(M(Ir), (r, n, o, s, i) => T(n) ? "" : T(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : T(s) ? n === "0" ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.0 <${Number(n) + 1}.0.0-0` : i ? n === "0" ? o === "0" ? `>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s}-${i} <${Number(n) + 1}.0.0-0` : n === "0" ? o === "0" ? `>=${n}.${o}.${s} <${n}.${o}.${Number(s) + 1}-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${Number(n) + 1}.0.0-0`)).join(" ");
619
604
  }
620
605
  function Hr(e) {
621
606
  return e.trim().split(/\s+/).map((t) => t.replace(M(Ar), (r, n, o, s, i) => T(n) ? "" : T(o) ? `>=${n}.0.0 <${Number(n) + 1}.0.0-0` : T(s) ? `>=${n}.${o}.0 <${n}.${Number(o) + 1}.0-0` : i ? `>=${n}.${o}.${s}-${i} <${n}.${Number(o) + 1}.0-0` : `>=${n}.${o}.${s} <${n}.${Number(o) + 1}.0-0`)).join(" ");
@@ -627,12 +612,12 @@ function Gr(e) {
627
612
  })).join(" ");
628
613
  }
629
614
  function xr(e) {
630
- return e.trim().replace(M(Ir), "");
615
+ return e.trim().replace(M(Tr), "");
631
616
  }
632
617
  function Ur(e) {
633
618
  return e.trim().replace(M(Or), "");
634
619
  }
635
- function he(e, t) {
620
+ function fe(e, t) {
636
621
  return e = Number(e) || e, t = Number(t) || t, e > t ? 1 : e === t ? 0 : -1;
637
622
  }
638
623
  function Br(e, t) {
@@ -643,12 +628,12 @@ function Br(e, t) {
643
628
  for (let o = 0, s = r.length; o <= s; o++) {
644
629
  const i = r[o], a = n[o];
645
630
  if (i !== a)
646
- return i === void 0 && a === void 0 ? 0 : i ? a ? he(i, a) : -1 : 1;
631
+ return i === void 0 && a === void 0 ? 0 : i ? a ? fe(i, a) : -1 : 1;
647
632
  }
648
633
  return 0;
649
634
  }
650
- function se(e, t) {
651
- return he(e.major, t.major) || he(e.minor, t.minor) || he(e.patch, t.patch) || Br(e, t);
635
+ function oe(e, t) {
636
+ return fe(e.major, t.major) || fe(e.minor, t.minor) || fe(e.patch, t.patch) || Br(e, t);
652
637
  }
653
638
  function Se(e, t) {
654
639
  return e.version === t.version;
@@ -659,13 +644,13 @@ function Vr(e, t) {
659
644
  case "=":
660
645
  return Se(e, t);
661
646
  case ">":
662
- return se(e, t) < 0;
647
+ return oe(e, t) < 0;
663
648
  case ">=":
664
- return Se(e, t) || se(e, t) < 0;
649
+ return Se(e, t) || oe(e, t) < 0;
665
650
  case "<":
666
- return se(e, t) > 0;
651
+ return oe(e, t) > 0;
667
652
  case "<=":
668
- return Se(e, t) || se(e, t) > 0;
653
+ return Se(e, t) || oe(e, t) > 0;
669
654
  case void 0:
670
655
  return !0;
671
656
  default:
@@ -702,19 +687,19 @@ function X(e, t) {
702
687
  if (p.length === 0) continue;
703
688
  let m = !0;
704
689
  for (const g of p) {
705
- const y = We(g);
706
- if (!y) {
690
+ const E = We(g);
691
+ if (!E) {
707
692
  m = !1;
708
693
  break;
709
694
  }
710
- const [, _, , b, R, E, w] = y;
695
+ const [, _, , y, b, S, $] = E;
711
696
  if (!Vr({
712
697
  operator: _,
713
- version: je(b, R, E, w),
714
- major: b,
715
- minor: R,
716
- patch: E,
717
- preRelease: w == null ? void 0 : w.split(".")
698
+ version: je(y, b, S, $),
699
+ major: y,
700
+ minor: b,
701
+ patch: S,
702
+ preRelease: $ == null ? void 0 : $.split(".")
718
703
  }, l)) {
719
704
  m = !1;
720
705
  break;
@@ -733,8 +718,8 @@ function qr(e, t, r, n) {
733
718
  var s, i;
734
719
  let o;
735
720
  return "get" in e ? o = e.get : "lib" in e ? o = () => Promise.resolve(e.lib) : o = () => Promise.resolve(() => {
736
- $(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
737
- }), (s = e.shareConfig) != null && s.eager && ((i = e.treeShaking) != null && i.mode) && $(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
721
+ R(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`);
722
+ }), (s = e.shareConfig) != null && s.eager && ((i = e.treeShaking) != null && i.mode) && R(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`), {
738
723
  deps: [],
739
724
  useIn: [],
740
725
  from: t,
@@ -798,7 +783,7 @@ const te = (e, t) => {
798
783
  return G(n, o);
799
784
  };
800
785
  return Object.keys(e).reduce((n, o) => !n || r(n, o) || n === "0" ? o : n, 0);
801
- }, pe = (e) => !!e.loaded || typeof e.lib == "function", Kr = (e) => !!e.loading, zr = (e, t) => {
786
+ }, de = (e) => !!e.loaded || typeof e.lib == "function", Kr = (e) => !!e.loading, zr = (e, t) => {
802
787
  if (!e || !t) return !1;
803
788
  const { usedExports: r } = e;
804
789
  return r ? !!t.every((n) => r.includes(n)) : !1;
@@ -807,7 +792,7 @@ function Jr(e, t, r, n) {
807
792
  const o = e[t][r];
808
793
  let s = "", i = ee(n);
809
794
  const a = function(l, c) {
810
- return i ? o[l].treeShaking ? o[c].treeShaking ? !pe(o[l].treeShaking) && G(l, c) : !1 : !0 : !pe(o[l]) && G(l, c);
795
+ return i ? o[l].treeShaking ? o[c].treeShaking ? !de(o[l].treeShaking) && G(l, c) : !1 : !0 : !de(o[l]) && G(l, c);
811
796
  };
812
797
  if (i) {
813
798
  if (s = te(e[t][r], a), s) return {
@@ -821,7 +806,7 @@ function Jr(e, t, r, n) {
821
806
  useTreesShaking: i
822
807
  };
823
808
  }
824
- const x = (e) => pe(e) || Kr(e);
809
+ const x = (e) => de(e) || Kr(e);
825
810
  function Xr(e, t, r, n) {
826
811
  const o = e[t][r];
827
812
  let s = "", i = ee(n);
@@ -849,7 +834,7 @@ function Xr(e, t, r, n) {
849
834
  function Yr(e) {
850
835
  return e === "loaded-first" ? Xr : Jr;
851
836
  }
852
- function de(e, t, r, n) {
837
+ function he(e, t, r, n) {
853
838
  if (!e) return;
854
839
  const { shareConfig: o, scope: s = re, strategy: i, treeShaking: a } = r, l = Array.isArray(s) ? s : [s];
855
840
  for (const c of l) if (o && e[c] && e[c][t]) {
@@ -858,7 +843,7 @@ function de(e, t, r, n) {
858
843
  if (o.singleton) {
859
844
  if (typeof u == "string" && !X(d, u)) {
860
845
  const g = `Version ${d} from ${d && m.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;
861
- o.strictVersion ? $(g) : Oe(g);
846
+ o.strictVersion ? R(g) : Oe(g);
862
847
  }
863
848
  return {
864
849
  shared: m,
@@ -875,14 +860,14 @@ function de(e, t, r, n) {
875
860
  };
876
861
  const g = ee(a);
877
862
  if (g) {
878
- for (const [y, _] of Object.entries(e[c][t]))
879
- if (ee(_.treeShaking, a == null ? void 0 : a.usedExports) && X(y, u))
863
+ for (const [E, _] of Object.entries(e[c][t]))
864
+ if (ee(_.treeShaking, a == null ? void 0 : a.usedExports) && X(E, u))
880
865
  return {
881
866
  shared: _,
882
867
  useTreesShaking: g
883
868
  };
884
869
  }
885
- for (const [y, _] of Object.entries(e[c][t])) if (X(y, u)) return {
870
+ for (const [E, _] of Object.entries(e[c][t])) if (X(E, u)) return {
886
871
  shared: _,
887
872
  useTreesShaking: !1
888
873
  };
@@ -909,7 +894,7 @@ function qe(e) {
909
894
  return l.forEach((d) => {
910
895
  c[d.version] = d;
911
896
  }), c[te(c, function(d, h) {
912
- return !pe(c[d]) && G(d, h);
897
+ return !de(c[d]) && G(d, h);
913
898
  })];
914
899
  }, s = (r == null ? void 0 : r.resolver) ?? o, i = (l) => l !== null && typeof l == "object" && !Array.isArray(l), a = (...l) => {
915
900
  const c = {};
@@ -926,7 +911,7 @@ function qe(e) {
926
911
  const U = (e, t) => {
927
912
  e.useIn || (e.useIn = []), ur(e.useIn, t);
928
913
  };
929
- function ie(e, t) {
914
+ function se(e, t) {
930
915
  return t && e.treeShaking ? e.treeShaking : e;
931
916
  }
932
917
  function Zr(e, t) {
@@ -986,32 +971,32 @@ const Et = "RUNTIME-001", _t = "RUNTIME-002", bt = "RUNTIME-003", Rt = "RUNTIME-
986
971
  ({
987
972
  ...O
988
973
  });
989
- const It = ".then(callbacks[0]).catch(callbacks[1])";
974
+ const Tt = ".then(callbacks[0]).catch(callbacks[1])";
990
975
  async function rn({ entry: e, remoteEntryExports: t }) {
991
976
  return new Promise((r, n) => {
992
977
  try {
993
- t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${It}`)([r, n]) : import(
978
+ t ? r(t) : typeof FEDERATION_ALLOW_NEW_FUNCTION < "u" ? new Function("callbacks", `import("${e}")${Tt}`)([r, n]) : import(
994
979
  /* webpackIgnore: true */
995
980
  /* @vite-ignore */
996
981
  e
997
982
  ).then(r).catch(n);
998
983
  } catch (o) {
999
- $(`Failed to load ESM entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
984
+ R(`Failed to load ESM entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1000
985
  }
1001
986
  });
1002
987
  }
1003
988
  async function nn({ entry: e, remoteEntryExports: t }) {
1004
989
  return new Promise((r, n) => {
1005
990
  try {
1006
- t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(n) : new Function("callbacks", `System.import("${e}")${It}`)([r, n]);
991
+ t ? r(t) : typeof __system_context__ > "u" ? System.import(e).then(r).catch(n) : new Function("callbacks", `System.import("${e}")${Tt}`)([r, n]);
1007
992
  } catch (o) {
1008
- $(`Failed to load SystemJS entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
993
+ R(`Failed to load SystemJS entry from "${e}". ${o instanceof Error ? o.message : String(o)}`);
1009
994
  }
1010
995
  });
1011
996
  }
1012
- function Tt(e, t, r) {
997
+ function It(e, t, r) {
1013
998
  const { remoteEntryKey: n, entryExports: o } = Ce(e, t);
1014
- return o || $(Et, O, {
999
+ return o || R(Et, O, {
1015
1000
  remoteName: e,
1016
1001
  remoteEntryUrl: r,
1017
1002
  remoteEntryKey: n
@@ -1032,9 +1017,9 @@ async function on({ name: e, globalName: t, entry: r, remoteInfo: n, loaderHook:
1032
1017
  if (u && (u instanceof HTMLScriptElement || "script" in u || "timeout" in u))
1033
1018
  return u;
1034
1019
  }
1035
- }).then(() => Tt(e, t, r), (l) => {
1020
+ }).then(() => It(e, t, r), (l) => {
1036
1021
  const c = l instanceof Error ? l.message : String(l);
1037
- $(He, O, {
1022
+ R(He, O, {
1038
1023
  remoteName: e,
1039
1024
  resourceUrl: a
1040
1025
  }, c);
@@ -1082,15 +1067,15 @@ async function an({ remoteInfo: e, loaderHook: t }) {
1082
1067
  if (c && "url" in c)
1083
1068
  return c;
1084
1069
  } }
1085
- }).then(() => Tt(o, n, r)).catch((a) => {
1086
- $(`Failed to load Node.js entry for remote "${o}" from "${r}". ${a instanceof Error ? a.message : String(a)}`);
1070
+ }).then(() => It(o, n, r)).catch((a) => {
1071
+ R(`Failed to load Node.js entry for remote "${o}" from "${r}". ${a instanceof Error ? a.message : String(a)}`);
1087
1072
  });
1088
1073
  }
1089
1074
  function ke(e) {
1090
1075
  const { entry: t, name: r } = e;
1091
1076
  return Xe(r, t);
1092
1077
  }
1093
- async function me(e) {
1078
+ async function pe(e) {
1094
1079
  const { origin: t, remoteEntryExports: r, remoteInfo: n, getEntryUrl: o, _inErrorHandling: s = !1 } = e, i = ke(n);
1095
1080
  if (r) return r;
1096
1081
  if (!V[i]) {
@@ -1110,7 +1095,7 @@ async function me(e) {
1110
1095
  }))).catch(async (c) => {
1111
1096
  const u = ke(n), d = c instanceof Error && c.message.includes("ScriptExecutionError");
1112
1097
  if (c instanceof Error && c.message.includes(He) && !d && !s) {
1113
- const h = (p) => me({
1098
+ const h = (p) => pe({
1114
1099
  ...p,
1115
1100
  _inErrorHandling: !0
1116
1101
  }), f = await t.loaderHook.lifecycle.loadEntryError.emit({
@@ -1128,7 +1113,7 @@ async function me(e) {
1128
1113
  }
1129
1114
  return V[i];
1130
1115
  }
1131
- function ye(e) {
1116
+ function me(e) {
1132
1117
  return {
1133
1118
  ...e,
1134
1119
  entry: "entry" in e ? e.entry : "",
@@ -1198,7 +1183,6 @@ function vt(e) {
1198
1183
  resourceCategory: "sync",
1199
1184
  share: !0,
1200
1185
  depsRemote: !0,
1201
- prefetchInterface: !1,
1202
1186
  ...e
1203
1187
  };
1204
1188
  }
@@ -1222,7 +1206,7 @@ function At(e, t, r, n = !0) {
1222
1206
  if (t.options.inBrowser) {
1223
1207
  if (i.forEach((a) => {
1224
1208
  const { moduleInfo: l } = a, c = t.moduleCache.get(e.name);
1225
- me(c ? {
1209
+ pe(c ? {
1226
1210
  origin: t,
1227
1211
  remoteInfo: l,
1228
1212
  remoteEntryExports: c.remoteEntryExports
@@ -1349,7 +1333,7 @@ var Pt = class {
1349
1333
  }
1350
1334
  async getEntry() {
1351
1335
  if (this.remoteEntryExports) return this.remoteEntryExports;
1352
- const e = await me({
1336
+ const e = await pe({
1353
1337
  origin: this.host,
1354
1338
  remoteInfo: this.remoteInfo,
1355
1339
  remoteEntryExports: this.remoteEntryExports
@@ -1370,7 +1354,7 @@ var Pt = class {
1370
1354
  remoteInfo: this.remoteInfo,
1371
1355
  origin: this.host
1372
1356
  });
1373
- typeof (n == null ? void 0 : n.init) > "u" && $(_t, O, {
1357
+ typeof (n == null ? void 0 : n.init) > "u" && R(_t, O, {
1374
1358
  hostName: this.host.name,
1375
1359
  remoteName: this.remoteInfo.name,
1376
1360
  remoteEntryUrl: this.remoteInfo.entry,
@@ -1462,10 +1446,10 @@ function kt(e, t) {
1462
1446
  }
1463
1447
  var W = class extends v {
1464
1448
  constructor(e) {
1465
- super(), this.onerror = $, this.type = e;
1449
+ super(), this.onerror = R, this.type = e;
1466
1450
  }
1467
1451
  emit(e) {
1468
- Me(e) || $(`The data for the "${this.type}" hook should be an object.`);
1452
+ Me(e) || R(`The data for the "${this.type}" hook should be an object.`);
1469
1453
  for (const t of this.listeners) try {
1470
1454
  const r = t(e);
1471
1455
  if (kt(e, r)) e = r;
@@ -1480,10 +1464,10 @@ var W = class extends v {
1480
1464
  }
1481
1465
  }, D = class extends v {
1482
1466
  constructor(e) {
1483
- super(), this.onerror = $, this.type = e;
1467
+ super(), this.onerror = R, this.type = e;
1484
1468
  }
1485
1469
  emit(e) {
1486
- Me(e) || $(`The response data for the "${this.type}" hook must be an object.`);
1470
+ Me(e) || R(`The response data for the "${this.type}" hook must be an object.`);
1487
1471
  const t = Array.from(this.listeners);
1488
1472
  if (t.length > 0) {
1489
1473
  let r = 0;
@@ -1524,8 +1508,8 @@ var W = class extends v {
1524
1508
  };
1525
1509
  function Ot(e, t) {
1526
1510
  const r = ct(t);
1527
- r.url || $(Nt, O, { remoteName: e.name });
1528
- let n = Ie(t, r.url);
1511
+ r.url || R(Nt, O, { remoteName: e.name });
1512
+ let n = Te(t, r.url);
1529
1513
  !F && !n.startsWith("http") && (n = `https:${n}`), e.type = r.type, e.entryGlobalName = r.globalName, e.entry = n, e.version = t.version, e.buildVersion = t.buildVersion;
1530
1514
  }
1531
1515
  function pn() {
@@ -1597,16 +1581,16 @@ const $e = (e, t) => document.querySelector(`${e}[${e === "link" ? "href" : "src
1597
1581
  function yn(e, t, r, n, o) {
1598
1582
  const s = [], i = [], a = [], l = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), { options: u } = e, { preloadConfig: d } = t, { depsRemote: h } = d;
1599
1583
  if (Lt(n, r, (p, m, g) => {
1600
- var w;
1601
- let y;
1602
- if (g) y = d;
1584
+ var $;
1585
+ let E;
1586
+ if (g) E = d;
1603
1587
  else if (Array.isArray(h)) {
1604
- const S = h.find((N) => N.nameOrAlias === m.name || N.nameOrAlias === m.alias);
1605
- if (!S) return;
1606
- y = vt(S);
1607
- } else if (h === !0) y = d;
1588
+ const w = h.find((I) => I.nameOrAlias === m.name || I.nameOrAlias === m.alias);
1589
+ if (!w) return;
1590
+ E = vt(w);
1591
+ } else if (h === !0) E = d;
1608
1592
  else return;
1609
- const _ = Ie(p, ct(p).url);
1593
+ const _ = Te(p, ct(p).url);
1610
1594
  _ && a.push({
1611
1595
  name: m.name,
1612
1596
  moduleInfo: {
@@ -1619,31 +1603,31 @@ function yn(e, t, r, n, o) {
1619
1603
  },
1620
1604
  url: _
1621
1605
  });
1622
- let b = "modules" in p ? p.modules : [];
1623
- const R = hn(y.exposes);
1624
- R.length && "modules" in p && (b = (w = p == null ? void 0 : p.modules) == null ? void 0 : w.reduce((S, N) => ((R == null ? void 0 : R.indexOf(N.moduleName)) !== -1 && S.push(N), S), []));
1625
- function E(S) {
1626
- const N = S.map((L) => Ie(p, L));
1627
- return y.filter ? N.filter(y.filter) : N;
1606
+ let y = "modules" in p ? p.modules : [];
1607
+ const b = hn(E.exposes);
1608
+ b.length && "modules" in p && (y = ($ = p == null ? void 0 : p.modules) == null ? void 0 : $.reduce((w, I) => ((b == null ? void 0 : b.indexOf(I.moduleName)) !== -1 && w.push(I), w), []));
1609
+ function S(w) {
1610
+ const I = w.map((L) => Te(p, L));
1611
+ return E.filter ? I.filter(E.filter) : I;
1628
1612
  }
1629
- if (b) {
1630
- const S = b.length;
1631
- for (let N = 0; N < S; N++) {
1632
- const L = b[N], ge = `${m.name}/${L.moduleName}`;
1613
+ if (y) {
1614
+ const w = y.length;
1615
+ for (let I = 0; I < w; I++) {
1616
+ const L = y[I], ye = `${m.name}/${L.moduleName}`;
1633
1617
  e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({
1634
- id: L.moduleName === "." ? m.name : ge,
1618
+ id: L.moduleName === "." ? m.name : ye,
1635
1619
  name: m.name,
1636
1620
  remoteSnapshot: p,
1637
- preloadConfig: y,
1621
+ preloadConfig: E,
1638
1622
  remote: m,
1639
1623
  origin: e
1640
- }), !Er(ge) && (y.resourceCategory === "all" ? (s.push(...E(L.assets.css.async)), s.push(...E(L.assets.css.sync)), i.push(...E(L.assets.js.async)), i.push(...E(L.assets.js.sync))) : y.resourceCategory === "sync" && (s.push(...E(L.assets.css.sync)), i.push(...E(L.assets.js.sync))), _r(ge));
1624
+ }), !Er(ye) && (E.resourceCategory === "all" ? (s.push(...S(L.assets.css.async)), s.push(...S(L.assets.css.sync)), i.push(...S(L.assets.js.async)), i.push(...S(L.assets.js.sync))) : E.resourceCategory === "sync" && (s.push(...S(L.assets.css.sync)), i.push(...S(L.assets.js.sync))), _r(ye));
1641
1625
  }
1642
1626
  }
1643
1627
  }, !0, {}, o), o.shared && o.shared.length > 0) {
1644
1628
  const p = (m, g) => {
1645
- const { shared: y } = de(e.shareScopeMap, g.sharedName, m, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1646
- y && typeof y.lib == "function" && (g.assets.js.sync.forEach((_) => {
1629
+ const { shared: E } = he(e.shareScopeMap, g.sharedName, m, e.sharedHandler.hooks.lifecycle.resolveShare) || {};
1630
+ E && typeof E.lib == "function" && (g.assets.js.sync.forEach((_) => {
1647
1631
  l.add(_);
1648
1632
  }), g.assets.css.sync.forEach((_) => {
1649
1633
  c.add(_);
@@ -1653,9 +1637,9 @@ function yn(e, t, r, n, o) {
1653
1637
  var _;
1654
1638
  const g = (_ = u.shared) == null ? void 0 : _[m.sharedName];
1655
1639
  if (!g) return;
1656
- const y = m.version ? g.find((b) => b.version === m.version) : g;
1657
- y && at(y).forEach((b) => {
1658
- p(b, m);
1640
+ const E = m.version ? g.find((y) => y.version === m.version) : g;
1641
+ E && at(E).forEach((y) => {
1642
+ p(y, m);
1659
1643
  });
1660
1644
  });
1661
1645
  }
@@ -1694,21 +1678,21 @@ const gn = function() {
1694
1678
  };
1695
1679
  };
1696
1680
  function Mt(e, t) {
1697
- const r = ue({
1681
+ const r = le({
1698
1682
  name: t.name,
1699
1683
  version: t.options.version
1700
1684
  }), n = r && "remotesInfo" in r && r.remotesInfo && q(r.remotesInfo, e.name).value;
1701
1685
  return n && n.matchedVersion ? {
1702
1686
  hostGlobalSnapshot: r,
1703
1687
  globalSnapshot: Ge(),
1704
- remoteSnapshot: ue({
1688
+ remoteSnapshot: le({
1705
1689
  name: e.name,
1706
1690
  version: n.matchedVersion
1707
1691
  })
1708
1692
  } : {
1709
1693
  hostGlobalSnapshot: void 0,
1710
1694
  globalSnapshot: Ge(),
1711
- remoteSnapshot: ue({
1695
+ remoteSnapshot: le({
1712
1696
  name: e.name,
1713
1697
  version: "version" in e ? e.version : void 0
1714
1698
  })
@@ -1729,7 +1713,7 @@ var En = class {
1729
1713
  options: n,
1730
1714
  moduleInfo: e
1731
1715
  });
1732
- let o = ue({
1716
+ let o = le({
1733
1717
  name: this.HostInstance.options.name,
1734
1718
  version: this.HostInstance.options.version
1735
1719
  });
@@ -1772,7 +1756,7 @@ var En = class {
1772
1756
  from: "global"
1773
1757
  });
1774
1758
  u = p, d = f;
1775
- } else $($t, O, {
1759
+ } else R($t, O, {
1776
1760
  remoteName: e.name,
1777
1761
  remoteVersion: e.version,
1778
1762
  hostName: this.HostInstance.options.name,
@@ -1797,7 +1781,7 @@ var En = class {
1797
1781
  let s = this.manifestCache.get(e);
1798
1782
  if (s) return s;
1799
1783
  try {
1800
- let i = await this.loaderHook.lifecycle.fetch.emit(e, {}, ye(t));
1784
+ let i = await this.loaderHook.lifecycle.fetch.emit(e, {}, me(t));
1801
1785
  (!i || !(i instanceof Response)) && (i = await fetch(e, {})), s = await i.json();
1802
1786
  } catch (i) {
1803
1787
  s = await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({
@@ -1806,7 +1790,7 @@ var En = class {
1806
1790
  from: "runtime",
1807
1791
  lifecycle: "afterResolve",
1808
1792
  origin: this.HostInstance
1809
- }), s || (delete this.manifestLoading[e], $(bt, O, {
1793
+ }), s || (delete this.manifestLoading[e], R(bt, O, {
1810
1794
  manifestUrl: e,
1811
1795
  moduleName: t.name,
1812
1796
  hostName: this.HostInstance.options.name
@@ -1882,9 +1866,9 @@ var En = class {
1882
1866
  origin: r
1883
1867
  });
1884
1868
  P(o, `Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);
1885
- const { shared: s, useTreesShaking: i } = de(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
1869
+ const { shared: s, useTreesShaking: i } = he(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
1886
1870
  if (s) {
1887
- const a = ie(s, i);
1871
+ const a = se(s, i);
1888
1872
  if (a.lib)
1889
1873
  return U(a, r.options.name), a.lib;
1890
1874
  if (a.loading && !a.loaded) {
@@ -1907,12 +1891,12 @@ var En = class {
1907
1891
  }
1908
1892
  } else {
1909
1893
  if (t != null && t.customShareInfo) return !1;
1910
- const a = ee(o.treeShaking), l = ie(o, a), u = (async () => {
1894
+ const a = ee(o.treeShaking), l = se(o, a), u = (async () => {
1911
1895
  const d = await l.get();
1912
1896
  l.lib = d, l.loaded = !0, U(l, r.options.name);
1913
- const { shared: h, useTreesShaking: f } = de(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
1897
+ const { shared: h, useTreesShaking: f } = he(this.shareScopeMap, e, o, this.hooks.lifecycle.resolveShare) || {};
1914
1898
  if (h) {
1915
- const p = ie(h, f);
1899
+ const p = se(h, f);
1916
1900
  p.lib = d, p.loaded = !0, h.from = o.from;
1917
1901
  }
1918
1902
  return d;
@@ -1947,11 +1931,11 @@ var En = class {
1947
1931
  const a = this.shareScopeMap, l = r.options.name;
1948
1932
  a[e] || (a[e] = {});
1949
1933
  const c = a[e], u = (h, f) => {
1950
- var b;
1934
+ var y;
1951
1935
  const { version: p, eager: m } = f;
1952
1936
  c[h] = c[h] || {};
1953
- const g = c[h], y = g[p] && ie(g[p]), _ = !!(y && ("eager" in y && y.eager || "shareConfig" in y && ((b = y.shareConfig) != null && b.eager)));
1954
- (!y || y.strategy !== "loaded-first" && !y.loaded && (!m != !_ ? m : l > g[p].from)) && (g[p] = f);
1937
+ const g = c[h], E = g[p] && se(g[p]), _ = !!(E && ("eager" in E && E.eager || "shareConfig" in E && ((y = E.shareConfig) != null && y.eager)));
1938
+ (!E || E.strategy !== "loaded-first" && !E.loaded && (!m != !_ ? m : l > g[p].from)) && (g[p] = f);
1955
1939
  }, d = async (h) => {
1956
1940
  const { module: f } = await r.remoteHandler.getRemoteModuleAndOptions({ id: h });
1957
1941
  let p;
@@ -1986,7 +1970,7 @@ var En = class {
1986
1970
  n != null && n.scope && n.scope.forEach((i) => {
1987
1971
  this.initializeSharing(i, { strategy: n.strategy });
1988
1972
  });
1989
- const { shared: o, useTreesShaking: s } = de(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
1973
+ const { shared: o, useTreesShaking: s } = he(this.shareScopeMap, e, n, this.hooks.lifecycle.resolveShare) || {};
1990
1974
  if (o) {
1991
1975
  if (typeof o.lib == "function")
1992
1976
  return U(o, r.options.name), o.loaded || (o.loaded = !0, o.from === r.options.name && (n.loaded = !0)), o.lib;
@@ -2006,7 +1990,7 @@ var En = class {
2006
1990
  return n.loaded || (n.loaded = !0), n.lib;
2007
1991
  if (n.get) {
2008
1992
  const i = n.get();
2009
- return i instanceof Promise && $((t == null ? void 0 : t.from) === "build" ? St : Pe, O, {
1993
+ return i instanceof Promise && R((t == null ? void 0 : t.from) === "build" ? St : Pe, O, {
2010
1994
  hostName: r.options.name,
2011
1995
  sharedPkgName: e
2012
1996
  }, void 0, z(r.options)), n.lib = i, this.setShared({
@@ -2017,7 +2001,7 @@ var En = class {
2017
2001
  shared: n
2018
2002
  }), n.lib;
2019
2003
  }
2020
- $(Pe, O, {
2004
+ R(Pe, O, {
2021
2005
  hostName: r.options.name,
2022
2006
  sharedPkgName: e
2023
2007
  }, void 0, z(r.options));
@@ -2034,8 +2018,8 @@ var En = class {
2034
2018
  }
2035
2019
  setShared({ pkgName: e, shared: t, from: r, lib: n, loading: o, loaded: s, get: i, treeShaking: a }) {
2036
2020
  const { version: l, scope: c = "default", ...u } = t, d = Array.isArray(c) ? c : [c], h = (f) => {
2037
- const p = (g, y, _) => {
2038
- _ && !g[y] && (g[y] = _);
2021
+ const p = (g, E, _) => {
2022
+ _ && !g[E] && (g[E] = _);
2039
2023
  }, m = a ? f.treeShaking : f;
2040
2024
  p(m, "loaded", s), p(m, "loading", o), p(m, "get", i);
2041
2025
  };
@@ -2129,7 +2113,7 @@ var En = class {
2129
2113
  });
2130
2114
  const r = fn(t.options.remotes, e);
2131
2115
  await Promise.all(r.map(async (n) => {
2132
- const { remote: o } = n, s = ye(o), { globalSnapshot: i, remoteSnapshot: a } = await t.snapshotHandler.loadRemoteSnapshotInfo({ moduleInfo: o }), l = await this.hooks.lifecycle.generatePreloadAssets.emit({
2116
+ const { remote: o } = n, s = me(o), { globalSnapshot: i, remoteSnapshot: a } = await t.snapshotHandler.loadRemoteSnapshotInfo({ moduleInfo: o }), l = await this.hooks.lifecycle.generatePreloadAssets.emit({
2133
2117
  origin: t,
2134
2118
  preloadOptions: n,
2135
2119
  remote: o,
@@ -2166,11 +2150,11 @@ var En = class {
2166
2150
  }), !n) throw f;
2167
2151
  }
2168
2152
  const { id: o } = n, s = Zr(t.options.remotes, o);
2169
- s || $(Rt, O, {
2153
+ s || R(Rt, O, {
2170
2154
  hostName: t.options.name,
2171
2155
  requestId: o
2172
2156
  }, void 0, z(t.options));
2173
- const { remote: i } = s, a = ye(i), l = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2157
+ const { remote: i } = s, a = me(i), l = await t.sharedHandler.hooks.lifecycle.afterResolve.emit({
2174
2158
  id: o,
2175
2159
  ...s,
2176
2160
  options: t.options,
@@ -2226,43 +2210,43 @@ var En = class {
2226
2210
  const s = r.moduleCache.get(e.name);
2227
2211
  if (s) {
2228
2212
  const i = s.remoteInfo, a = i.entryGlobalName;
2229
- I[a] && ((t = Object.getOwnPropertyDescriptor(I, a)) != null && t.configurable ? delete I[a] : I[a] = void 0);
2213
+ N[a] && ((t = Object.getOwnPropertyDescriptor(N, a)) != null && t.configurable ? delete N[a] : N[a] = void 0);
2230
2214
  const l = ke(s.remoteInfo);
2231
2215
  V[l] && delete V[l], r.snapshotHandler.manifestCache.delete(i.entry);
2232
2216
  let c = i.buildVersion ? Xe(i.name, i.buildVersion) : i.name;
2233
- const u = I.__FEDERATION__.__INSTANCES__.findIndex((h) => i.buildVersion ? h.options.id === c : h.name === c);
2217
+ const u = N.__FEDERATION__.__INSTANCES__.findIndex((h) => i.buildVersion ? h.options.id === c : h.name === c);
2234
2218
  if (u !== -1) {
2235
- const h = I.__FEDERATION__.__INSTANCES__[u];
2219
+ const h = N.__FEDERATION__.__INSTANCES__[u];
2236
2220
  c = h.options.id || c;
2237
2221
  const f = gt();
2238
2222
  let p = !0;
2239
2223
  const m = [];
2240
2224
  Object.keys(f).forEach((g) => {
2241
- const y = f[g];
2242
- y && Object.keys(y).forEach((_) => {
2243
- const b = y[_];
2244
- b && Object.keys(b).forEach((R) => {
2245
- const E = b[R];
2246
- E && Object.keys(E).forEach((w) => {
2247
- const S = E[w];
2248
- S && typeof S == "object" && S.from === i.name && (S.loaded || S.loading ? (S.useIn = S.useIn.filter((N) => N !== i.name), S.useIn.length ? p = !1 : m.push([
2225
+ const E = f[g];
2226
+ E && Object.keys(E).forEach((_) => {
2227
+ const y = E[_];
2228
+ y && Object.keys(y).forEach((b) => {
2229
+ const S = y[b];
2230
+ S && Object.keys(S).forEach(($) => {
2231
+ const w = S[$];
2232
+ w && typeof w == "object" && w.from === i.name && (w.loaded || w.loading ? (w.useIn = w.useIn.filter((I) => I !== i.name), w.useIn.length ? p = !1 : m.push([
2249
2233
  g,
2250
2234
  _,
2251
- R,
2252
- w
2235
+ b,
2236
+ $
2253
2237
  ])) : m.push([
2254
2238
  g,
2255
2239
  _,
2256
- R,
2257
- w
2240
+ b,
2241
+ $
2258
2242
  ]));
2259
2243
  });
2260
2244
  });
2261
2245
  });
2262
- }), p && (h.shareScopeMap = {}, delete f[c]), m.forEach(([g, y, _, b]) => {
2263
- var R, E, w;
2264
- (w = (E = (R = f[g]) == null ? void 0 : R[y]) == null ? void 0 : E[_]) == null || delete w[b];
2265
- }), I.__FEDERATION__.__INSTANCES__.splice(u, 1);
2246
+ }), p && (h.shareScopeMap = {}, delete f[c]), m.forEach(([g, E, _, y]) => {
2247
+ var b, S, $;
2248
+ ($ = (S = (b = f[g]) == null ? void 0 : b[E]) == null ? void 0 : S[_]) == null || delete $[y];
2249
+ }), N.__FEDERATION__.__INSTANCES__.splice(u, 1);
2266
2250
  }
2267
2251
  const { hostGlobalSnapshot: d } = Mt(e, r);
2268
2252
  if (d) {
@@ -2284,7 +2268,7 @@ var Sn = class {
2284
2268
  init: new v(),
2285
2269
  beforeInitContainer: new D("beforeInitContainer"),
2286
2270
  initContainer: new D("initContainer")
2287
- }), this.version = "2.3.3", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new j({
2271
+ }), this.version = "2.4.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new j({
2288
2272
  getModuleInfo: new v(),
2289
2273
  createScript: new v(),
2290
2274
  createLink: new v(),
@@ -2308,7 +2292,7 @@ var Sn = class {
2308
2292
  this.name = e.name, this.options = r, this.snapshotHandler = new En(this), this.sharedHandler = new _n(this), this.remoteHandler = new bn(this), this.shareScopeMap = this.sharedHandler.shareScopeMap, this.registerPlugins([...r.plugins, ...e.plugins || []]), this.options = this.formatOptions(r, e);
2309
2293
  }
2310
2294
  initOptions(e) {
2311
- e.name && e.name !== this.options.name && $(st(wt, O)), this.registerPlugins(e.plugins);
2295
+ e.name && e.name !== this.options.name && R(st(wt, O)), this.registerPlugins(e.plugins);
2312
2296
  const t = this.formatOptions(this.options, e);
2313
2297
  return this.options = t, t;
2314
2298
  }
@@ -2322,7 +2306,7 @@ var Sn = class {
2322
2306
  return this.sharedHandler.initializeSharing(e, t);
2323
2307
  }
2324
2308
  initRawContainer(e, t, r) {
2325
- const n = ye({
2309
+ const n = me({
2326
2310
  name: e,
2327
2311
  entry: t
2328
2312
  }), o = new Pt({
@@ -2355,7 +2339,8 @@ var Sn = class {
2355
2339
  ...t,
2356
2340
  plugins: a,
2357
2341
  remotes: s,
2358
- shared: i
2342
+ shared: i,
2343
+ id: n.id || e.id
2359
2344
  };
2360
2345
  return this.hooks.lifecycle.init.emit({
2361
2346
  origin: this,
@@ -2420,16 +2405,16 @@ function Nn(e) {
2420
2405
  if (!f.children || f.children.length === 0)
2421
2406
  return f;
2422
2407
  for (let m = 0; m < f.children.length; m++) {
2423
- const g = f.children[m], y = l(p, g.path), b = (i.get(y) || []).find(
2424
- (R) => !a.has(R) && R !== f && (g.name == null || R.name === g.name)
2408
+ const g = f.children[m], E = l(p, g.path), y = (i.get(E) || []).find(
2409
+ (b) => !a.has(b) && b !== f && (g.name == null || b.name === g.name)
2425
2410
  );
2426
- if (b) {
2427
- const R = {
2428
- ...b,
2411
+ if (y) {
2412
+ const b = {
2413
+ ...y,
2429
2414
  path: g.path
2430
2415
  // Keep the original relative path from static route
2431
2416
  };
2432
- f.children[m] = R, a.add(b), c(R, y);
2417
+ f.children[m] = b, a.add(y), c(b, E);
2433
2418
  }
2434
2419
  }
2435
2420
  return f;
@@ -2441,12 +2426,12 @@ function Nn(e) {
2441
2426
  a.add(f), u.push(p);
2442
2427
  }
2443
2428
  let d, h;
2444
- return n ? d = ae.createMemoryHistory(r) : o ? (d = ae.createWebHashHistory(), r && (u = Dt(u, r), h = wn(r))) : d = ae.createWebHistory(r), { history: d, routes: u, patchRouter: h };
2429
+ return n ? d = ie.createMemoryHistory(r) : o ? (d = ie.createWebHashHistory(), r && (u = Dt(u, r), h = wn(r))) : d = ie.createWebHistory(r), { history: d, routes: u, patchRouter: h };
2445
2430
  }
2446
2431
  function kn(e) {
2447
2432
  const t = /* @__PURE__ */ new Map(), r = Ct();
2448
2433
  return () => ({
2449
- __APP_VERSION__: "2.3.3",
2434
+ __APP_VERSION__: "2.4.0",
2450
2435
  async render(n) {
2451
2436
  var p, m, g;
2452
2437
  C.debug("createBridgeComponent render Info", n);
@@ -2468,20 +2453,20 @@ function kn(e) {
2468
2453
  ...h
2469
2454
  });
2470
2455
  if (f != null && f.router) {
2471
- const { history: y, routes: _, patchRouter: b } = Nn({
2456
+ const { history: E, routes: _, patchRouter: y } = Nn({
2472
2457
  router: f.router,
2473
2458
  basename: n.basename,
2474
2459
  memoryRoute: n.memoryRoute,
2475
2460
  hashRoute: n.hashRoute
2476
- }), R = ae.createRouter({
2461
+ }), b = ie.createRouter({
2477
2462
  ...f.router.options,
2478
- history: y,
2463
+ history: E,
2479
2464
  routes: _
2480
2465
  });
2481
- b && b(R), f.afterRouterCreate && f.afterRouterCreate(R), C.debug("createBridgeComponent render router info>>>", {
2466
+ y && y(b), f.afterRouterCreate && f.afterRouterCreate(b), C.debug("createBridgeComponent render router info>>>", {
2482
2467
  moduleName: o,
2483
- router: R
2484
- }), a && await R.push(a.entryPath), u.use(R);
2468
+ router: b
2469
+ }), a && await b.push(a.entryPath), u.use(b);
2485
2470
  }
2486
2471
  u.mount(s);
2487
2472
  },
@@ -2492,11 +2477,11 @@ function kn(e) {
2492
2477
  }
2493
2478
  });
2494
2479
  }
2495
- function In() {
2480
+ function Tn() {
2496
2481
  const e = new PopStateEvent("popstate", { state: window.history.state });
2497
2482
  window.dispatchEvent(e);
2498
2483
  }
2499
- const Tn = /* @__PURE__ */ Ht({
2484
+ const In = /* @__PURE__ */ Ht({
2500
2485
  name: "RemoteApp",
2501
2486
  props: {
2502
2487
  moduleName: String,
@@ -2508,7 +2493,7 @@ const Tn = /* @__PURE__ */ Ht({
2508
2493
  },
2509
2494
  inheritAttrs: !1,
2510
2495
  setup(e) {
2511
- const t = Ee(null), r = Ee(null), n = Ee(""), o = Ke(), s = Ct(), i = Gt(), a = async () => {
2496
+ const t = ge(null), r = ge(null), n = ge(""), o = Ke(), s = Ct(), i = Gt(), a = async () => {
2512
2497
  var h, f, p, m;
2513
2498
  const c = (h = e.providerInfo) == null ? void 0 : h.call(e);
2514
2499
  r.value = c;
@@ -2530,7 +2515,7 @@ const Tn = /* @__PURE__ */ Ht({
2530
2515
  c !== o.path && a(), n.value !== "" && n.value !== c && (C.debug("createRemoteAppComponent dispatchPopstateEnv >>>", {
2531
2516
  ...e,
2532
2517
  pathname: o.path
2533
- }), In()), n.value = c;
2518
+ }), Tn()), n.value = c;
2534
2519
  });
2535
2520
  return Ut(() => {
2536
2521
  a();
@@ -2548,7 +2533,7 @@ const Tn = /* @__PURE__ */ Ht({
2548
2533
  });
2549
2534
  function vn(e) {
2550
2535
  return jt({
2551
- __APP_VERSION__: "2.3.3",
2536
+ __APP_VERSION__: "2.4.0",
2552
2537
  ...e.asyncComponentOptions,
2553
2538
  //@ts-ignore
2554
2539
  loader: async () => {
@@ -2572,7 +2557,7 @@ function vn(e) {
2572
2557
  ), o in s && typeof a == "function")
2573
2558
  return {
2574
2559
  render() {
2575
- return qt(Tn, {
2560
+ return qt(In, {
2576
2561
  moduleName: i,
2577
2562
  providerInfo: a,
2578
2563
  basename: r,