@module-federation/bridge-vue3 2.8.0 → 2.8.2

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.cjs CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("vue"),Ce=require("vue-router");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Yt=ot(v),he=ot(Ce),Qt=".json",er="FEDERATION_DEBUG",tr=":";let Ne=function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e}({});const U=typeof ENV_TARGET<"u"?ENV_TARGET==="web":typeof window<"u"&&typeof window.document<"u";function nt(){return U}function st(){return typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"}function rr(){try{if(nt()&&window.localStorage)return!!localStorage.getItem(er)}catch{return!1}return!1}function Ae(){return typeof process<"u"&&process.env&&process.env.FEDERATION_DEBUG?!!process.env.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:rr()}const or="[ Federation Runtime ]",it=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${tr}${r}`:r:t,""):""},Me=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!nt()&&!st()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},at=e=>{console.warn(`${or}: ${e}`)};function ct(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Se=(e,t)=>{if(!e)return t;const o=(n=>{if(n===".")return"";if(n.startsWith("./"))return n.replace("./","");if(n.startsWith("/")){const s=n.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return n})(e);return o?o.endsWith("/")?`${o}${t}`:`${o}/${t}`:t};function nr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function sr(e,t={}){var R;const{remotes:r={},overrides:o={},version:n}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&n?nr(n):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(o);let a={};Object.keys(r).length||(a=((R=e.remotes)==null?void 0:R.reduce((g,_)=>{let b;const I=_.federationContainerName;return c.includes(I)?b=o[I]:"version"in _?b=_.version:b=_.entry,g[I]={matchedVersion:b},g},{}))||{}),Object.keys(r).forEach(g=>a[g]={matchedVersion:c.includes(g)?o[g]:r[g]});const{remoteEntry:{path:l,name:u,type:f},types:m={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:d,ssrRemoteEntry:p}=e.metaData,{exposes:E}=e;let y={version:n||"",buildVersion:h,globalName:d,remoteEntry:Se(l,u),remoteEntryType:f,remoteTypes:Se(m.path,m.name),remoteTypesZip:m.zip||"",remoteTypesAPI:m.api||"",remotesInfo:a,shared:e==null?void 0:e.shared.map(g=>({assets:g.assets,sharedName:g.name,version:g.version,usedExports:g.referenceExports||[]})),modules:E==null?void 0:E.map(g=>({moduleName:g.name,modulePath:g.path,assets:g.assets}))};if("publicPath"in e.metaData?(s={...y,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...y,getPublicPath:i()},p){const g=Se(p.path,p.name);s.ssrRemoteEntry=g,s.ssrRemoteEntryType=p.type||"commonjs-module"}return s}function lt(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(Qt))}const ir="[ Module Federation ]",Q=console,ar=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function cr(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
2
- `),r=t.filter(o=>!ar.some(n=>o.includes(n)));return r.length?`Stack trace:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("vue"),Fe=require("vue-router");function ot(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Qt=ot(v),de=ot(Fe),er=".json",tr="FEDERATION_DEBUG",rr=":";let Ae=function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e}({});const U=typeof ENV_TARGET<"u"?ENV_TARGET==="web":typeof window<"u"&&typeof window.document<"u";function nt(){return U}function st(){return typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"}function or(){try{if(nt()&&window.localStorage)return!!localStorage.getItem(tr)}catch{return!1}return!1}function Me(){return typeof process<"u"&&process.env&&process.env.FEDERATION_DEBUG?!!process.env.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:or()}const nr="[ Federation Runtime ]",it=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${rr}${r}`:r:t,""):""};function Pe(e,t){if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!nt()&&!st()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")}const at=e=>{console.warn(`${nr}: ${e}`)};function ct(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Ie=(e,t)=>{if(!e)return t;const o=(n=>{if(n===".")return"";if(n.startsWith("./"))return n.replace("./","");if(n.startsWith("/")){const s=n.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return n})(e);return o?o.endsWith("/")?`${o}${t}`:`${o}/${t}`:t};function sr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function ir(e,t={}){var R;const{remotes:r={},overrides:o={},version:n}=t;let s;const a=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&n?sr(n):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(o);let i={};Object.keys(r).length||(i=((R=e.remotes)==null?void 0:R.reduce((g,_)=>{let b;const I=_.federationContainerName;return c.includes(I)?b=o[I]:"version"in _?b=_.version:b=_.entry,g[I]={matchedVersion:b},g},{}))||{}),Object.keys(r).forEach(g=>i[g]={matchedVersion:c.includes(g)?o[g]:r[g]});const{remoteEntry:{path:l,name:u,type:f},types:m={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:d,ssrRemoteEntry:p}=e.metaData,{exposes:E}=e;let y={version:n||"",buildVersion:h,globalName:d,remoteEntry:Ie(l,u),remoteEntryType:f,remoteTypes:Ie(m.path,m.name),remoteTypesZip:m.zip||"",remoteTypesAPI:m.api||"",remotesInfo:i,shared:e==null?void 0:e.shared.map(g=>({assets:g.assets,sharedName:g.name,version:g.version,usedExports:g.referenceExports||[]})),modules:E==null?void 0:E.map(g=>({moduleName:g.name,modulePath:g.path,assets:g.assets}))};if("publicPath"in e.metaData?(s={...y,publicPath:a()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...y,getPublicPath:a()},p){const g=Ie(p.path,p.name);s.ssrRemoteEntry=g,s.ssrRemoteEntryType=p.type||"commonjs-module"}return s}function lt(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(er))}const ar="[ Module Federation ]",Q=console,cr=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function lr(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
2
+ `),r=t.filter(o=>!cr.some(n=>o.includes(n)));return r.length?`Stack trace:
3
3
  ${r.slice(0,5).join(`
4
- `)}`:void 0}catch{return}}var ut=class{constructor(e,t=Q){this.prefix=e,this.delegate=t??Q}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??Q}emit(e,t){const r=this.delegate,o=Ae()?cr():void 0,n=o?[...t,o]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const i of s){const c=r[i];if(typeof c=="function"){c.call(r,this.prefix,...n);return}}for(const i of s){const c=Q[i];if(typeof c=="function"){c.call(Q,this.prefix,...n);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){Ae()&&this.emit("debug",e)}};function ft(e){return new ut(e)}function lr(e){const t=new ut(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}lr(ir);async function ht(e,t){try{return await e()}catch(r){at(r);return}}function Pe(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function dt(e){let t=null,r=!0,o=2e4,n;const s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){const u=s[l],f=u.getAttribute("src");if(f&&Pe(f,e.url)){t=u,r=!1;break}}if(!t){const l=e.attrs;t=document.createElement("script"),t.type=(l==null?void 0:l.type)==="module"?"module":"text/javascript";let u;e.createScriptHook&&(u=e.createScriptHook(e.url,e.attrs),u instanceof HTMLScriptElement?t=u:typeof u=="object"&&("script"in u&&u.script&&(t=u.script),"timeout"in u&&u.timeout&&(o=u.timeout))),t.src||(t.src=e.url),l&&!u&&Object.keys(l).forEach(f=>{t&&(f==="async"||f==="defer"?t[f]=l[f]:t.getAttribute(f)||t.setAttribute(f,l[f]))})}let i=null;const c=typeof window<"u"?l=>{if(l.filename&&Pe(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",i=u}}:null;c&&window.addEventListener("error",c);const a=async(l,u)=>{clearTimeout(n),c&&window.removeEventListener("error",c);const f=()=>{if((u==null?void 0:u.type)==="error"){const m=new Error(u!=null&&u.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);m.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(m))}else i?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,ht(()=>{const{needDeleteScript:m=!0}=e;m&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const m=l(u);if(m instanceof Promise){const h=await m;return f(),h}return f(),m}f()};return t.onerror=a.bind(null,t.onerror),t.onload=a.bind(null,t.onload),n=setTimeout(()=>{a(null,{type:"error",isTimeout:!0})},o),{script:t,needAttach:r}}function ur(e){let t=null,r=!0,o=2e4,n;const s=document.getElementsByTagName("link");for(let c=0;c<s.length;c++){const a=s[c],l=a.getAttribute("href"),u=a.getAttribute("rel");if(l&&Pe(l,e.url)&&u===e.attrs.rel){t=a,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let c,a=!0;const l=e.attrs;e.createLinkHook&&(c=e.createLinkHook(e.url,l),c instanceof HTMLLinkElement?(t=c,a=!1):typeof c=="object"&&("link"in c&&c.link&&(t=c.link,a=!1),"timeout"in c&&c.timeout&&(o=c.timeout))),l&&a&&Object.keys(l).forEach(u=>{t&&!t.getAttribute(u)&&t.setAttribute(u,l[u])})}if(!r)return Promise.resolve().then(()=>{e!=null&&e.cb&&(e==null||e.cb())}),{link:t,needAttach:r};const i=(c,a)=>{n&&clearTimeout(n);const l=()=>{if((a==null?void 0:a.type)==="error"){const u=new Error(a!=null&&a.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);u.name="LinkNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(u))}else e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,ht(()=>{const{needDeleteLink:u=!0}=e;u&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),c)){const u=c(a);return l(),u}l()};return t.onerror=i.bind(null,t.onerror),t.onload=i.bind(null,t.onload),n=setTimeout(()=>{i(null,{type:"error",isTimeout:!0})},o),{link:t,needAttach:r}}function fr(e,t){const{attrs:r={},createScriptHook:o}=t;return new Promise((n,s)=>{const{script:i,needAttach:c}=dt({url:e,cb:n,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:o,needDeleteScript:!0});c&&document.head.appendChild(i)})}const le=new Map;function G(e){if(!e)throw new Error("import specifier is required");if(le.has(e))return le.get(e);const t=new Function("name","return import(name)")(e).then(r=>r).catch(r=>{throw console.error(`Error importing module ${e}:`,r),le.delete(e),r});return le.set(e,t),t}const hr=async(e,t,r)=>{const n=await((s,i)=>r.lifecycle.fetch.emit(s,i))(e,t||{});return!n||!(n instanceof Response)?fetch(e,t||{}):n},dr=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t,r,o)=>{if(o!=null&&o.createScriptHook){const c=o.createScriptHook(e);c&&typeof c=="object"&&"url"in c&&(e=c.url)}let n;try{n=new URL(e)}catch(c){console.error("Error constructing URL:",c),t(new Error(`Invalid URL: ${c}`));return}const s=async()=>o!=null&&o.fetch?(c,a)=>hr(c,a,o):fetch,i=async(c,a)=>{var l;try{const f=await(await c(a.href)).text(),[m,h]=await Promise.all([G("path"),G("vm")]),d={exports:{},module:{exports:{}}},p=a.pathname.split("/").slice(0,-1).join("/"),E=m.basename(a.pathname),y=new h.Script(`(function(exports, module, require, __dirname, __filename) {${f}
5
- })`,{filename:E,importModuleDynamically:((l=h.constants)==null?void 0:l.USE_MAIN_CONTEXT_DEFAULT_LOADER)??G});let R;R=(await G("node:module")).createRequire(a.protocol==="file:"||a.protocol==="node:"?a.href:m.join(process.cwd(),"__mf_require_base__.js")),y.runInThisContext()(d.exports,d.module,R,p,E);const g=d.module.exports||d.exports;if(r&&g&&r.globalName){t(void 0,g[r.globalName]||g);return}t(void 0,g)}catch(u){t(u instanceof Error?u:new Error(`Script execution error: ${u}`))}};s().then(async c=>{if((r==null?void 0:r.type)==="esm"||(r==null?void 0:r.type)==="module")return yt(n.href,{fetch:c,vm:await G("vm")}).then(async a=>{await a.evaluate(),t(void 0,a.namespace)}).catch(a=>{t(a instanceof Error?a:new Error(`Script execution error: ${a}`))});i(c,n)}).catch(c=>{t(c)})}:(e,t,r,o)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},mr=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t)=>new Promise((r,o)=>{dr(e,(n,s)=>{var i,c;if(n)o(n);else{const a=((i=t==null?void 0:t.attrs)==null?void 0:i.globalName)||`__FEDERATION_${(c=t==null?void 0:t.attrs)==null?void 0:c.name}:custom__`;r(globalThis[a]=s)}},t.attrs,t.loaderHook)}):(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},Z=new Map,mt=e=>e.startsWith("http:")||e.startsWith("https:"),pt=e=>!e.startsWith("./")&&!e.startsWith("../")&&!e.startsWith("/")&&!e.includes(":");function pr(e){const t=new URL(e),r=encodeURIComponent(t.protocol.slice(0,-1)),o=encodeURIComponent(t.host),n=t.pathname.split("/").map(i=>encodeURIComponent(i)).join("/"),s=encodeURIComponent(`${t.search}${t.hash}`);return`/${r}/${o}${n}${s?`/${s}`:""}`}function yr(e,t){const r=t.endsWith("/")?t:`${t}/`;return new URL(`__module_federation_remote__${pr(e)}`,r).href}async function Er(e){return e.startsWith("node:")?!0:pt(e)?(await G("node:module")).builtinModules.includes(e):!1}function gr(e){const t=e&&(typeof e=="object"||typeof e=="function")?e:{default:e},r={...t};return Object.prototype.hasOwnProperty.call(r,"default")||(r.default=t),r}async function Rr(e,t,r){if(typeof r.SyntheticModule!="function")throw new Error("vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.");const o=gr(t),n=Object.keys(o),s=new r.SyntheticModule(n,function(){for(const c of n)this.setExport(c,o[c])},{identifier:e});return Z.set(e,s),await s.link(async()=>{throw new Error(`Node.js built-in module "${e}" should not request child modules.`)}),await s.evaluate(),s}async function _r(e,t){const r=`node-builtin:${e}`;return Z.has(r)?Z.get(r):Rr(r,await G(e),t)}async function We(e,t,r){if(await Er(e))return _r(e,r.vm);if(pt(e))throw new Error(`Unsupported ESM module specifier "${e}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);const o=new URL(e,t).href;if(!mt(o))throw new Error(`Unsupported ESM module specifier "${e}" resolved to "${o}". Only http(s) remote modules and Node.js built-in modules are supported.`);return yt(o,r)}async function br(e){if(e.status==="linked"&&await e.evaluate(),e.status==="errored")throw e.error;return e}async function yt(e,t){if(Z.has(e))return Z.get(e);const{fetch:r,vm:o}=t;if(!mt(e))throw new Error(`Unsupported ESM module URL "${e}". Only http(s) remote modules and Node.js built-in modules are supported.`);const n=await(await r(e)).text(),s=(await G("node:url")).pathToFileURL(process.cwd()).href,i=new o.SourceTextModule(n,{identifier:e,initializeImportMeta:c=>{c.url=yr(e,s)},importModuleDynamically:async c=>br(await We(c,e,t))});return Z.set(e,i),await i.link(async c=>We(c,e,t)),i}const D=ft("[ Module Federation Bridge Vue3 ]"),Sr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,Et=(e,t,r,o)=>{const n=[`${[t[e]]} #${e}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(Sr(e)),o&&n.push(`Original Error Message:
4
+ `)}`:void 0}catch{return}}var ut=class{constructor(e,t=Q){this.prefix=e,this.delegate=t??Q}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??Q}emit(e,t){const r=this.delegate,o=Me()?lr():void 0,n=o?[...t,o]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(const a of s){const c=r[a];if(typeof c=="function"){c.call(r,this.prefix,...n);return}}for(const a of s){const c=Q[a];if(typeof c=="function"){c.call(Q,this.prefix,...n);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){Me()&&this.emit("debug",e)}};function ft(e){return new ut(e)}function ur(e){const t=new ut(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ur(ar);async function ht(e,t){try{return await e()}catch(r){at(r);return}}function ke(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function dt(e){let t=null,r=!0,o=2e4,n;const s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){const u=s[l],f=u.getAttribute("src");if(f&&ke(f,e.url)){t=u,r=!1;break}}if(!t){const l=e.attrs;t=document.createElement("script"),t.type=(l==null?void 0:l.type)==="module"?"module":"text/javascript";let u;e.createScriptHook&&(u=e.createScriptHook(e.url,e.attrs),u instanceof HTMLScriptElement?t=u:typeof u=="object"&&("script"in u&&u.script&&(t=u.script),"timeout"in u&&u.timeout&&(o=u.timeout))),t.src||(t.src=e.url),l&&!u&&Object.keys(l).forEach(f=>{t&&(f==="async"||f==="defer"?t[f]=l[f]:t.getAttribute(f)||t.setAttribute(f,l[f]))})}let a=null;const c=typeof window<"u"?l=>{if(l.filename&&ke(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",a=u}}:null;c&&window.addEventListener("error",c);const i=async(l,u)=>{clearTimeout(n),c&&window.removeEventListener("error",c);const f=()=>{if((u==null?void 0:u.type)==="error"){const m=new Error(u!=null&&u.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);m.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(m))}else a?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(a)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,ht(()=>{const{needDeleteScript:m=!0}=e;m&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const m=l(u);if(m instanceof Promise){const h=await m;return f(),h}return f(),m}f()};return t.onerror=i.bind(null,t.onerror),t.onload=i.bind(null,t.onload),n=setTimeout(()=>{i(null,{type:"error",isTimeout:!0})},o),{script:t,needAttach:r}}function fr(e){let t=null,r=!0,o=2e4,n;const s=document.getElementsByTagName("link");for(let c=0;c<s.length;c++){const i=s[c],l=i.getAttribute("href"),u=i.getAttribute("rel");if(l&&ke(l,e.url)&&u===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let c,i=!0;const l=e.attrs;e.createLinkHook&&(c=e.createLinkHook(e.url,l),c instanceof HTMLLinkElement?(t=c,i=!1):typeof c=="object"&&("link"in c&&c.link&&(t=c.link,i=!1),"timeout"in c&&c.timeout&&(o=c.timeout))),l&&i&&Object.keys(l).forEach(u=>{t&&!t.getAttribute(u)&&t.setAttribute(u,l[u])})}if(!r)return Promise.resolve().then(()=>{e!=null&&e.cb&&(e==null||e.cb())}),{link:t,needAttach:r};const a=(c,i)=>{n&&clearTimeout(n);const l=()=>{if((i==null?void 0:i.type)==="error"){const u=new Error(i!=null&&i.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);u.name="LinkNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(u))}else e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,ht(()=>{const{needDeleteLink:u=!0}=e;u&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),c)){const u=c(i);return l(),u}l()};return t.onerror=a.bind(null,t.onerror),t.onload=a.bind(null,t.onload),n=setTimeout(()=>{a(null,{type:"error",isTimeout:!0})},o),{link:t,needAttach:r}}function hr(e,t){const{attrs:r={},createScriptHook:o}=t;return new Promise((n,s)=>{const{script:a,needAttach:c}=dt({url:e,cb:n,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:o,needDeleteScript:!0});c&&document.head.appendChild(a)})}const ce=new Map;function G(e){if(!e)throw new Error("import specifier is required");if(ce.has(e))return ce.get(e);const t=new Function("name","return import(name)")(e).then(r=>r).catch(r=>{throw console.error(`Error importing module ${e}:`,r),ce.delete(e),r});return ce.set(e,t),t}const dr=async(e,t,r)=>{const n=await((s,a)=>r.lifecycle.fetch.emit(s,a))(e,t||{});return!n||!(n instanceof Response)?fetch(e,t||{}):n},mr=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t,r,o)=>{if(o!=null&&o.createScriptHook){const c=o.createScriptHook(e);c&&typeof c=="object"&&"url"in c&&(e=c.url)}let n;try{n=new URL(e)}catch(c){console.error("Error constructing URL:",c),t(new Error(`Invalid URL: ${c}`));return}const s=async()=>o!=null&&o.fetch?(c,i)=>dr(c,i,o):fetch,a=async(c,i)=>{var l;try{const f=await(await c(i.href)).text(),[m,h]=await Promise.all([G("path"),G("vm")]),d={exports:{},module:{exports:{}}},p=i.pathname.split("/").slice(0,-1).join("/"),E=m.basename(i.pathname),y=new h.Script(`(function(exports, module, require, __dirname, __filename) {${f}
5
+ })`,{filename:E,importModuleDynamically:((l=h.constants)==null?void 0:l.USE_MAIN_CONTEXT_DEFAULT_LOADER)??G});let R;R=(await G("node:module")).createRequire(i.protocol==="file:"||i.protocol==="node:"?i.href:m.join(process.cwd(),"__mf_require_base__.js")),y.runInThisContext()(d.exports,d.module,R,p,E);const g=d.module.exports||d.exports;if(r&&g&&r.globalName){t(void 0,g[r.globalName]||g);return}t(void 0,g)}catch(u){t(u instanceof Error?u:new Error(`Script execution error: ${u}`))}};s().then(async c=>{if((r==null?void 0:r.type)==="esm"||(r==null?void 0:r.type)==="module")return yt(n.href,{fetch:c,vm:await G("vm")}).then(async i=>{await i.evaluate(),t(void 0,i.namespace)}).catch(i=>{t(i instanceof Error?i:new Error(`Script execution error: ${i}`))});a(c,n)}).catch(c=>{t(c)})}:(e,t,r,o)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},pr=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t)=>new Promise((r,o)=>{mr(e,(n,s)=>{var a,c;if(n)o(n);else{const i=((a=t==null?void 0:t.attrs)==null?void 0:a.globalName)||`__FEDERATION_${(c=t==null?void 0:t.attrs)==null?void 0:c.name}:custom__`;r(globalThis[i]=s)}},t.attrs,t.loaderHook)}):(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},Z=new Map,mt=e=>e.startsWith("http:")||e.startsWith("https:"),pt=e=>!e.startsWith("./")&&!e.startsWith("../")&&!e.startsWith("/")&&!e.includes(":");function yr(e){const t=new URL(e),r=encodeURIComponent(t.protocol.slice(0,-1)),o=encodeURIComponent(t.host),n=t.pathname.split("/").map(a=>encodeURIComponent(a)).join("/"),s=encodeURIComponent(`${t.search}${t.hash}`);return`/${r}/${o}${n}${s?`/${s}`:""}`}function Er(e,t){const r=t.endsWith("/")?t:`${t}/`;return new URL(`__module_federation_remote__${yr(e)}`,r).href}async function gr(e){return e.startsWith("node:")?!0:pt(e)?(await G("node:module")).builtinModules.includes(e):!1}function Rr(e){const t=e&&(typeof e=="object"||typeof e=="function")?e:{default:e},r={...t};return Object.prototype.hasOwnProperty.call(r,"default")||(r.default=t),r}async function _r(e,t,r){if(typeof r.SyntheticModule!="function")throw new Error("vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.");const o=Rr(t),n=Object.keys(o),s=new r.SyntheticModule(n,function(){for(const c of n)this.setExport(c,o[c])},{identifier:e});return Z.set(e,s),await s.link(async()=>{throw new Error(`Node.js built-in module "${e}" should not request child modules.`)}),await s.evaluate(),s}async function br(e,t){const r=`node-builtin:${e}`;return Z.has(r)?Z.get(r):_r(r,await G(e),t)}async function We(e,t,r){if(await gr(e))return br(e,r.vm);if(pt(e))throw new Error(`Unsupported ESM module specifier "${e}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);const o=new URL(e,t).href;if(!mt(o))throw new Error(`Unsupported ESM module specifier "${e}" resolved to "${o}". Only http(s) remote modules and Node.js built-in modules are supported.`);return yt(o,r)}async function Sr(e){if(e.status==="linked"&&await e.evaluate(),e.status==="errored")throw e.error;return e}async function yt(e,t){if(Z.has(e))return Z.get(e);const{fetch:r,vm:o}=t;if(!mt(e))throw new Error(`Unsupported ESM module URL "${e}". Only http(s) remote modules and Node.js built-in modules are supported.`);const n=await(await r(e)).text(),s=(await G("node:url")).pathToFileURL(process.cwd()).href,a=new o.SourceTextModule(n,{identifier:e,initializeImportMeta:c=>{c.url=Er(e,s)},importModuleDynamically:async c=>Sr(await We(c,e,t))});return Z.set(e,a),await a.link(async c=>We(c,e,t)),a}const F=ft("[ Module Federation Bridge Vue3 ]"),wr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,Et=(e,t,r,o)=>{const n=[`${[t[e]]} #${e}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(wr(e)),o&&n.push(`Original Error Message:
6
6
  ${o}`),n.join(`
7
- `)};function wr(e,t,r,o,n,s){return o(Et(e,t,r,n))}const B="[ Federation Runtime ]",ke=ft(B);function C(e,t,r,o,n){e||w(t)}function w(e,t,r,o,n){if(t!==void 0)return wr(e,t,r??{},i=>{throw new Error(`${B}: ${i}`)},o);const s=e;throw s instanceof Error?(s.message.startsWith(B)||(s.message=`${B}: ${s.message}`),s):new Error(`${B}: ${s}`)}function ne(e){e instanceof Error&&(e.message.startsWith(B)||(e.message=`${B}: ${e.message}`)),ke.warn(e)}function Ir(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function se(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function De(e){return typeof e.entry<"u"}function gt(e){return!e.entry.includes(".json")}function Fe(e){return e&&typeof e=="object"}const $r=Object.prototype.toString;function Tr(e){return $r.call(e)==="[object Object]"}function Rt(e){return Array.isArray(e)?e:[e]}function _t(e){const t={url:"",type:"global",globalName:""};return U||st()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const vr=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r},N=typeof globalThis=="object"?globalThis:window,O=(()=>{try{return document.defaultView}catch{return N}})(),_e=O;function de(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function me(e,t){return Object.hasOwnProperty.call(e,t)}me(N,"__GLOBAL_LOADING_REMOTE_ENTRY__")||de(N,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const J=N.__GLOBAL_LOADING_REMOTE_ENTRY__;function bt(e){var t,r,o,n,s,i;me(e,"__VMOK__")&&!me(e,"__FEDERATION__")&&de(e,"__FEDERATION__",e.__VMOK__),me(e,"__FEDERATION__")||(de(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),de(e,"__VMOK__",e.__FEDERATION__)),(t=e.__FEDERATION__).__GLOBAL_PLUGIN__??(t.__GLOBAL_PLUGIN__=[]),(r=e.__FEDERATION__).__INSTANCES__??(r.__INSTANCES__=[]),(o=e.__FEDERATION__).moduleInfo??(o.moduleInfo={}),(n=e.__FEDERATION__).__SHARE__??(n.__SHARE__={}),(s=e.__FEDERATION__).__MANIFEST_LOADING__??(s.__MANIFEST_LOADING__={}),(i=e.__FEDERATION__).__PRELOADED_MAP__??(i.__PRELOADED_MAP__=new Map)}bt(N);bt(O);function Nr(e,t=Ae()){t&&(N.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.8.0")}function W(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const o of r){const[n,s]=o.split(":"),i=`${n}:${t}`,c=e[i];if(c)return{value:c,key:i}}return{value:void 0,key:t}}}else w(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const qe=()=>O.__FEDERATION__.moduleInfo,Ar=(e,t)=>{const r=W(t,se(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:o,...n}=e,s=se(n),i=W(O.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===o)return i}},pe=e=>Ar(e,O.__FEDERATION__.moduleInfo),ze=(e,t)=>{const r=se(e);return O.__FEDERATION__.moduleInfo[r]=t,O.__FEDERATION__.moduleInfo},Mr=e=>(O.__FEDERATION__.moduleInfo={...O.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete O.__FEDERATION__.moduleInfo[r]}),He=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:N[r]}},Pr=()=>O.__FEDERATION__.__GLOBAL_PLUGIN__,kr=e=>N.__FEDERATION__.__PRELOADED_MAP__.get(e),Or=e=>N.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Ke="[0-9A-Za-z-]+",xe=`(?:\\+(${Ke}(?:\\.${Ke})*))`,oe="0|[1-9]\\d*",ye="[0-9]+",St="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Je=`(?:${ye}|${St})`,Lr=`(?:-?(${Je}(?:\\.${Je})*))`,Ze=`(?:${oe}|${St})`,wt=`(?:-(${Ze}(?:\\.${Ze})*))`,we=`${oe}|x|X|\\*`,Y=`[v=\\s]*(${we})(?:\\.(${we})(?:\\.(${we})(?:${wt})?${xe}?)?)?`,Cr=`^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`,Dr=`[v=\\s]*${`(${ye})\\.(${ye})\\.(${ye})`}${Lr}?${xe}?`,Ge="((?:<|>)?=?)",Fr=`(\\s*)${Ge}\\s*(${Dr}|${Y})`,It="(?:~>?)",Hr=`(\\s*)${It}\\s+`,$t="(?:\\^)",xr=`(\\s*)${$t}\\s+`,Gr="(<|>)?=?\\s*\\*",Ur=`^${$t}${Y}$`,Br=`v?${`(${oe})\\.(${oe})\\.(${oe})`}${wt}?${xe}?`,jr=`^${It}${Y}$`,Vr=`^${Ge}\\s*${Y}$`,Wr=`^${Ge}\\s*(${Br})$|^$`,qr="^\\s*>=\\s*0.0.0\\s*$";function L(e){return new RegExp(e)}function A(e){return!e||e.toLowerCase()==="x"||e==="*"}function Tt(...e){return t=>e.reduce((r,o)=>o(r),t)}function Xe(e){return e.match(L(Wr))}function Ye(e,t,r,o){const n=`${e}.${t}.${r}`;return o?`${n}-${o}`:n}function zr(e){return e.replace(L(Cr),(t,r,o,n,s,i,c,a,l,u,f,m)=>(A(o)?r="":A(n)?r=`>=${o}.0.0`:A(s)?r=`>=${o}.${n}.0`:r=`>=${r}`,A(l)?a="":A(u)?a=`<${Number(l)+1}.0.0-0`:A(f)?a=`<${l}.${Number(u)+1}.0-0`:m?a=`<=${l}.${u}.${f}-${m}`:a=`<=${a}`,`${r} ${a}`.trim()))}function Kr(e){return e.replace(L(Fr),"$1$2$3")}function Jr(e){return e.replace(L(Hr),"$1~")}function Zr(e){return e.replace(L(xr),"$1^")}function Xr(e){return e.trim().split(/\s+/).map(t=>t.replace(L(Ur),(r,o,n,s,i)=>A(o)?"":A(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:A(s)?o==="0"?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.0 <${Number(o)+1}.0.0-0`:i?o==="0"?n==="0"?`>=${o}.${n}.${s}-${i} <${o}.${n}.${Number(s)+1}-0`:`>=${o}.${n}.${s}-${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s}-${i} <${Number(o)+1}.0.0-0`:o==="0"?n==="0"?`>=${o}.${n}.${s} <${o}.${n}.${Number(s)+1}-0`:`>=${o}.${n}.${s} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s} <${Number(o)+1}.0.0-0`)).join(" ")}function Yr(e){return e.trim().split(/\s+/).map(t=>t.replace(L(jr),(r,o,n,s,i)=>A(o)?"":A(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:A(s)?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:i?`>=${o}.${n}.${s}-${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s} <${o}.${Number(n)+1}.0-0`)).join(" ")}function Qr(e){return e.split(/\s+/).map(t=>t.trim().replace(L(Vr),(r,o,n,s,i,c)=>{const a=A(n),l=a||A(s),u=l||A(i);return o==="="&&u&&(o=""),c="",a?o===">"||o==="<"?"<0.0.0-0":"*":o&&u?(l&&(s=0),i=0,o===">"?(o=">=",l?(n=Number(n)+1,s=0,i=0):(s=Number(s)+1,i=0)):o==="<="&&(o="<",l?n=Number(n)+1:s=Number(s)+1),o==="<"&&(c="-0"),`${o+n}.${s}.${i}${c}`):l?`>=${n}.0.0${c} <${Number(n)+1}.0.0-0`:u?`>=${n}.${s}.0${c} <${n}.${Number(s)+1}.0-0`:r})).join(" ")}function eo(e){return e.trim().replace(L(Gr),"")}function to(e){return e.trim().replace(L(qr),"")}function Ee(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function ro(e,t){const{preRelease:r}=e,{preRelease:o}=t;if(r===void 0&&o)return 1;if(r&&o===void 0)return-1;if(r===void 0&&o===void 0)return 0;for(let n=0,s=r.length;n<=s;n++){const i=r[n],c=o[n];if(i!==c)return i===void 0&&c===void 0?0:i?c?Ee(i,c):-1:1}return 0}function ue(e,t){return Ee(e.major,t.major)||Ee(e.minor,t.minor)||Ee(e.patch,t.patch)||ro(e,t)}function Ie(e,t){return e.version===t.version}function oo(e,t){switch(e.operator){case"":case"=":return Ie(e,t);case">":return ue(e,t)<0;case">=":return Ie(e,t)||ue(e,t)<0;case"<":return ue(e,t)>0;case"<=":return Ie(e,t)||ue(e,t)>0;case void 0:return!0;default:return!1}}function no(e){return Tt(Xr,Yr,Qr,eo)(e)}function so(e){return Tt(zr,Kr,Jr,Zr)(e.trim()).split(/\s+/).join(" ")}function re(e,t){if(!e)return!1;const r=Xe(e);if(!r)return!1;const[,o,,n,s,i,c]=r,a={operator:o,version:Ye(n,s,i,c),major:n,minor:s,patch:i,preRelease:c==null?void 0:c.split(".")},l=t.split("||");for(const u of l){const f=u.trim();if(!f||f==="*"||f==="x")return!0;try{const m=so(f);if(!m.trim())return!0;const h=m.split(" ").map(E=>no(E)).join(" ");if(!h.trim())return!0;const d=h.split(/\s+/).map(E=>to(E)).filter(Boolean);if(d.length===0)continue;let p=!0;for(const E of d){const y=Xe(E);if(!y){p=!1;break}const[,R,,g,_,b,I]=y;if(!oo({operator:R,version:Ye(g,_,b,I),major:g,minor:_,patch:b,preRelease:I==null?void 0:I.split(".")},a)){p=!1;break}}if(p)return!0}catch(m){console.error(`[semver] Error processing range part "${f}":`,m);continue}}return!1}const ce="default",vt="global";function io(e,t,r,o){var s,i;let n;return"get"in e?n=e.get:"lib"in e?n=()=>Promise.resolve(e.lib):n=()=>Promise.resolve(()=>{w(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((i=e.treeShaking)!=null&&i.mode)&&w(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:n,loaded:e!=null&&e.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??o)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??Ne.UNKNOWN,useIn:[]}:void 0}}function Nt(e,t){const r=t.shared||{},o=t.name,n=Object.keys(r).reduce((i,c)=>{const a=Rt(r[c]);return i[c]=i[c]||[],a.forEach(l=>{i[c].push(io(l,o,c,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(n).forEach(i=>{s[i]?n[i].forEach(c=>{s[i].find(a=>a.version===c.version)||s[i].push(c)}):s[i]=n[i]}),{allShareInfos:s,newShareInfos:n}}function ie(e,t){if(!e)return!1;const{status:r,mode:o}=e;return r===Ne.NO_USE?!1:r===Ne.CALCULATED?!0:o==="runtime-infer"?t?co(e,t):!0:!1}function j(e,t){const r=o=>{if(!Number.isNaN(Number(o))){const n=o.split(".");let s=o;for(let i=0;i<3-n.length;i++)s+=".0";return s}return o};return!!re(r(e),`<=${r(t)}`)}const ae=(e,t)=>{const r=t||function(o,n){return j(o,n)};return Object.keys(e).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},Re=e=>!!e.loaded||typeof e.lib=="function",ao=e=>!!e.loading,co=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(o=>r.includes(o)):!1};function lo(e,t,r,o){const n=e[t][r];let s="",i=ie(o);const c=function(a,l){return i?n[a].treeShaking?n[l].treeShaking?!Re(n[a].treeShaking)&&j(a,l):!1:!0:!Re(n[a])&&j(a,l)};if(i){if(s=ae(e[t][r],c),s)return{version:s,useTreesShaking:i};i=!1}return{version:ae(e[t][r],c),useTreesShaking:i}}const q=e=>Re(e)||ao(e);function uo(e,t,r,o){const n=e[t][r];let s="",i=ie(o);const c=function(a,l){if(i){if(!n[a].treeShaking)return!0;if(!n[l].treeShaking)return!1;if(q(n[l].treeShaking))return q(n[a].treeShaking)?!!j(a,l):!0;if(q(n[a].treeShaking))return!1}return q(n[l])?q(n[a])?!!j(a,l):!0:q(n[a])?!1:j(a,l)};if(i){if(s=ae(e[t][r],c),s)return{version:s,useTreesShaking:i};i=!1}return{version:ae(e[t][r],c),useTreesShaking:i}}function fo(e){return e==="loaded-first"?uo:lo}function ge(e,t,r,o){if(!e)return;const{shareConfig:n,scope:s=ce,strategy:i,treeShaking:c}=r,a=Array.isArray(s)?s:[s];for(const l of a)if(n&&e[l]&&e[l][t]){const{requiredVersion:u}=n,{version:f,useTreesShaking:m}=fo(i)(e,l,t,c),h=()=>{const p=e[l][t][f];if(n.singleton){if(typeof u=="string"&&!re(f,u)){const E=`Version ${f} from ${f&&p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;n.strictVersion?w(E):ne(E)}return{shared:p,useTreesShaking:m}}else{if(u===!1||u==="*")return{shared:p,useTreesShaking:m};if(re(f,u))return{shared:p,useTreesShaking:m};const E=ie(c);if(E){for(const[y,R]of Object.entries(e[l][t]))if(ie(R.treeShaking,c==null?void 0:c.usedExports)&&re(y,u))return{shared:R,useTreesShaking:E}}for(const[y,R]of Object.entries(e[l][t]))if(re(y,u))return{shared:R,useTreesShaking:!1}}},d={shareScopeMap:e,scope:l,pkgName:t,version:f,GlobalFederation:_e.__FEDERATION__,shareInfo:r,resolver:h};return(o.emit(d)||d).resolver()}}function At(){return _e.__FEDERATION__.__SHARE__}function Qe(e){const{pkgName:t,extraOptions:r,shareInfos:o}=e,n=a=>{if(!a)return;const l={};return a.forEach(f=>{l[f.version]=f}),l[ae(l,function(f,m){return!Re(l[f])&&j(f,m)})]},s=(r==null?void 0:r.resolver)??n,i=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),c=(...a)=>{const l={};for(const u of a)if(u)for(const[f,m]of Object.entries(u)){const h=l[f];i(h)&&i(m)?l[f]=c(h,m):m!==void 0&&(l[f]=m)}return l};return c(s(o[t]),r==null?void 0:r.customShareInfo)}const z=(e,t)=>{e.useIn||(e.useIn=[]),Ir(e.useIn,t)};function fe(e,t){return t&&e.treeShaking?e.treeShaking:e}function Ue(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function et(e,t){for(const r of e){const o=t.startsWith(r.name);let n=t.replace(r.name,"");if(o){if(n.startsWith("/")){const c=r.name;return n=`.${n}`,{pkgNameOrAlias:c,expose:n,remote:r}}else if(n==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const c=r.alias;return i=`.${i}`,{pkgNameOrAlias:c,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function ho(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}const Mt="RUNTIME-001",Pt="RUNTIME-002",kt="RUNTIME-003",Ot="RUNTIME-004",Lt="RUNTIME-005",Oe="RUNTIME-006",Ct="RUNTIME-007",Be="RUNTIME-008",mo="RUNTIME-009",Dt="RUNTIME-010",Ft="RUNTIME-011",po="RUNTIME-012",Ht="RUNTIME-013",xt="RUNTIME-014",Gt="RUNTIME-015",P={[Mt]:"Failed to get remoteEntry exports.",[Pt]:'The remote entry interface does not contain "init"',[kt]:"Failed to get manifest.",[Ot]:"Failed to locate remote.",[Lt]:"Invalid loadShareSync function call from bundler runtime",[Oe]:"Invalid loadShareSync function call from runtime",[Ct]:"Failed to get remote snapshot.",[Be]:"Failed to load script resources.",[mo]:"Please call createInstance first.",[Dt]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[Ft]:"The remoteEntry URL is missing from the remote snapshot.",[po]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',[Ht]:"The manifest is not a valid Module Federation manifest.",[xt]:"The remote does not expose the requested module.",[Gt]:"Remote container initialization failed."};({...P});const Ut=".then(callbacks[0]).catch(callbacks[1])";async function yo({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Ut}`)([r,o]):import(e).then(r).catch(o)}catch(n){w(`Failed to load ESM entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}async function Eo({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(o):new Function("callbacks",`System.import("${e}")${Ut}`)([r,o])}catch(n){w(`Failed to load SystemJS entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}function Bt(e,t,r){const{remoteEntryKey:o,entryExports:n}=He(e,t);return n||w(Mt,P,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:o}),n}async function go({name:e,globalName:t,entry:r,remoteInfo:o,loaderHook:n,getEntryUrl:s,resourceContext:i}){const{entryExports:c}=He(e,t);if(c)return c;const a=s?s(r):r;return fr(a,{attrs:{},createScriptHook:(l,u)=>{const f=n.lifecycle.createScript.emit({url:l,attrs:u,remoteInfo:o,resourceContext:i?{...i,url:l}:void 0});if(f&&(f instanceof HTMLScriptElement||"script"in f||"timeout"in f))return f}}).then(()=>Bt(e,t,r),l=>{const u=l instanceof Error?l.message:String(l);w(Be,P,{remoteName:e,resourceUrl:a},u)})}async function Ro({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:o,resourceContext:n}){const{entry:s,entryGlobalName:i,name:c,type:a}=e;switch(a){case"esm":case"module":return yo({entry:s,remoteEntryExports:t});case"system":return Eo({entry:s,remoteEntryExports:t});default:return go({entry:s,globalName:i,name:c,remoteInfo:e,loaderHook:r,getEntryUrl:o,resourceContext:n})}}async function _o({remoteInfo:e,loaderHook:t,resourceContext:r}){const{entry:o,entryGlobalName:n,name:s,type:i}=e,{entryExports:c}=He(s,n);return c||mr(o,{attrs:{name:s,globalName:n,type:i},loaderHook:{createScriptHook:(a,l={})=>{const u=t.lifecycle.createScript.emit({url:a,attrs:l,remoteInfo:e,resourceContext:r?{...r,url:a}:void 0});if(u&&"url"in u)return u}}}).then(()=>Bt(s,n,o)).catch(a=>{w(`Failed to load Node.js entry for remote "${s}" from "${o}". ${a instanceof Error?a.message:String(a)}`)})}function Le(e){const{entry:t,name:r}=e;return it(r,t)}async function je(e){const{origin:t,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,resourceContext:s,_inErrorHandling:i=!1}=e,c=Le(o);if(r)return r;if(!J[c]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;J[c]=a.emit({origin:t,loaderHook:l,remoteInfo:o,remoteEntryExports:r}).then(u=>u||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":U)?Ro({remoteInfo:o,remoteEntryExports:r,loaderHook:l,getEntryUrl:n,resourceContext:s}):_o({remoteInfo:o,loaderHook:l,resourceContext:s}))).then(async u=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:u}),u)).catch(async u=>{const f=Le(o),m=u instanceof Error&&u.message.includes("ScriptExecutionError");if(u instanceof Error&&u.message.includes(Be)&&!m&&!i){const h=p=>je({...p,_inErrorHandling:!0}),d=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:h,origin:t,remoteInfo:o,remoteEntryExports:r,globalLoading:J,uniqueKey:f});if(d)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:d,recovered:!0}),d}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,error:u}),u})}return J[c]}function K(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||vt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ce}}function bo(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function So(e,t){const r=Pr(),o=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(n=>{e!=null&&e.find(s=>s.name!==n.name)&&e.push(n)}),e&&e.length>0&&e.forEach(n=>{o.forEach(s=>{s.applyPlugin(n,t)})}),e}function wo(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function F(e){var r,o,n,s,i,c;const t={};for(const[a,l]of Object.entries(e.shared)){const u=l[0];u&&(t[a]={version:u.version,singleton:(r=u.shareConfig)==null?void 0:r.singleton,requiredVersion:((o=u.shareConfig)==null?void 0:o.requiredVersion)===!1?!1:(n=u.shareConfig)==null?void 0:n.requiredVersion,eager:u.eager,strictVersion:(s=u.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((i=e.remotes)==null?void 0:i.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((c=e.remotes)==null?void 0:c.map(wo))??[],shared:t}}}function jt(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function Io(e,t){return t.map(r=>{const o=ho(e,r.nameOrAlias);return C(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&ct({remoteInfo:o,remotes:e})}`),{remote:o,preloadConfig:jt(r)}})}function $o(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function Ve(e){return e instanceof Error?e.message.includes("timed out")||e.name.includes("Timeout"):!1}function V(e,t,r,o){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:o}}async function To(e,t,r,o){const n=e.moduleCache.get(r.name),s=r.entry;if(n!=null&&n.remoteEntryExports)return V(o,s,"cached");try{if(!await je({origin:e,remoteInfo:r,remoteEntryExports:n==null?void 0:n.remoteEntryExports,resourceContext:{...o,url:s}}))throw new Error(`Failed to load remoteEntry "${s}".`);return V(o,s,"success")}catch(i){return V(o,s,Ve(i)?"timeout":"error",i)}}function $e({host:e,remoteInfo:t,url:r,attrs:o,context:n,needDeleteLink:s}){return new Promise(i=>{const{link:c,needAttach:a}=ur({url:r,cb:()=>{i(V(n,r,a?"success":"cached"))},onErrorCallback:l=>{i(V(n,r,Ve(l)?"timeout":"error",l))},attrs:o,createLinkHook:(l,u)=>{const f=e.loaderHook.lifecycle.createLink.emit({url:l,attrs:u,remoteInfo:t,resourceContext:{...n,url:l}});return f instanceof HTMLLinkElement,f},needDeleteLink:s});a&&document.head.appendChild(c)})}function vo({host:e,remoteInfo:t,url:r,attrs:o,context:n}){return new Promise(s=>{const{script:i,needAttach:c}=dt({url:r,cb:()=>{s(V(n,r,c?"success":"cached"))},onErrorCallback:a=>{s(V(n,r,Ve(a)?"timeout":"error",a))},attrs:o,createScriptHook:(a,l)=>{const u=e.loaderHook.lifecycle.createScript.emit({url:a,attrs:l,remoteInfo:t,resourceContext:{...n,url:a}});return u instanceof HTMLScriptElement,u},needDeleteScript:!0});c&&document.head.appendChild(i)})}function ee(e,t){return{...e,resourceType:t}}function Vt(e,t,r,o=!0,n={initiator:"preloadRemote",id:e.name}){const{cssAssets:s,jsAssetsWithoutEntry:i,entryAssets:c}=r,a=[];if(t.options.inBrowser){if(c.forEach(l=>{const{moduleInfo:u}=l;a.push(To(t,e,u,ee(n,"remoteEntry")))}),o){const l={rel:"preload",as:"style"};s.forEach(u=>{a.push($e({host:t,remoteInfo:e,url:u,attrs:l,context:ee(n,"css")}))})}else{const l={rel:"stylesheet",type:"text/css"};s.forEach(u=>{a.push($e({host:t,remoteInfo:e,url:u,attrs:l,needDeleteLink:!1,context:ee(n,"css")}))})}if(o){const l={rel:"preload",as:"script"};i.forEach(u=>{a.push($e({host:t,remoteInfo:e,url:u,attrs:l,context:ee(n,"js")}))})}else{const l={fetchpriority:"high",type:(e==null?void 0:e.type)==="module"?"module":"text/javascript"};i.forEach(u=>{a.push(vo({host:t,remoteInfo:e,url:u,attrs:l,context:ee(n,"js")}))})}}return Promise.all(a)}function No(e){if(!e||!("modules"in e)||!Array.isArray(e.modules))return;const t=e.modules.map(r=>r.moduleName).filter(Boolean);return t.length?t.join(","):void 0}function Ao(e,t,r){const o=t,n=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];n.length||n.push("default"),n.forEach(i=>{o[i]||(o[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?n:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:o,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:o[n[0]],initScope:r??[]}}var tt=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;const t=await je({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:"loadRemote",id:Ue(this.remoteInfo.name,e),resourceType:"remoteEntry"}});return C(t,`remoteEntryExports is undefined
8
- ${ct(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,r,o){const n=await this.getEntry(o);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host}),n;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host})}catch(s){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:s,cached:!0,origin:this.host}),s}return n}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});const{remoteEntryInitOptions:s,shareScope:i,initScope:c}=Ao(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:s,initScope:c,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&w(Pt,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,F(this.host.options));try{await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions)}catch(l){w(Gt,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${l}`,F(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,origin:this.host})}catch(s){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:s,origin:this.host}),s}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,o){const{loadFactory:n=!0}=r||{loadFactory:!0},s=await this.init(e,o,void 0,t);this.lib=s,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,origin:this.host});let i;try{const l=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo});i=typeof l=="function"?l:void 0,i||(i=await s.get(t)),i||w(xt,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:No(o)},void 0,F(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,moduleFactory:i,origin:this.host})}catch(l){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,error:l,origin:this.host}),l}const c=vr(this.remoteInfo.name,t),a=this.wraperFactory(i,c);if(!n)return a;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,origin:this.host});try{const l=await a();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,exposeModule:l,origin:this.host}),l}catch(l){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,error:l,origin:this.host}),l}}wraperFactory(e,t){function r(o,n){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:n,enumerable:!1})}return()=>{const o=e();return o instanceof Promise?o.then(n=>(r(n,t),n)):(r(o,t),o)}}},H=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var o;C(Tr(e),"Plugin configuration is invalid.");const r=e.name;C(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,(o=e.apply)==null||o.call(e,t),Object.keys(this.lifecycle).forEach(n=>{const s=e[n];s&&this.lifecycle[n].on(s)}))}removePlugin(e){C(e,"A name is required.");const t=this.registerPlugins[e];C(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}},M=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...o){return t.remove(r),e.apply(null,o)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{const o=r(...e);o!==void 0&&(t=o)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},T=class extends M{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let o=0;const n=s=>s===!1?!1:o<r.length?Promise.resolve(r[o++].apply(null,e)).then(i=>i===void 0||e.length===1&&i===e[0]?n(s):n(i)):s;t=n()}return Promise.resolve(t)}};function Wt(e,t){if(!Fe(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var X=class extends M{constructor(e){super(),this.onerror=w,this.type=e}emit(e){Fe(e)||w(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(r===void 0)continue;if(Wt(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){ne(r),this.onerror(r)}return e}},x=class extends M{constructor(e){super(),this.onerror=w,this.type=e}emit(e){Fe(e)||w(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const o=s=>(ne(s),this.onerror(s),e),n=s=>{if(s!==void 0&&Wt(e,s))e=s;else if(s!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(r<t.length)try{return Promise.resolve(t[r++](e)).then(n,o)}catch(i){return o(i)}return e};return Promise.resolve(n(e))}return Promise.resolve(e)}};const te="Remote loading is disabled by experiments.optimization.disableRemote.";var Mo=class{constructor(){this.hooks=new H({})}formatAndRegisterRemote(){return[]}loadRemote(){throw new Error(te)}preloadRemote(){throw new Error(te)}registerRemotes(){throw new Error(te)}getRemoteModuleAndOptions(){throw new Error(te)}initRawContainer(){throw new Error(te)}};function qt(e,t){const r=_t(t);r.url||w(Ft,P,{remoteName:e.name});let o=Me(t,r.url);!U&&!o.startsWith("http")&&(o=`https:${o}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=o,e.version=t.version,e.buildVersion=t.buildVersion}function Po(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:s,id:i}=e;if(!De(t)||!gt(t)){const{remoteSnapshot:c,globalSnapshot:a}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Ue(t.name,o)});qt(s,c);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await n.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:c,globalSnapshot:a});return u&&Vt(s,n,u,!1,{initiator:"loadRemote",id:i}).catch(()=>{}),{...e,remoteSnapshot:c}}return e}}}function ko(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function zt(e,t,r,o,n={},s){const{value:i}=W(e,se(t)),c=s||i;if(c&&!lt(c)&&(r(c,t,o),c.remotesInfo)){const a=Object.keys(c.remotesInfo);for(const l of a){if(n[l])continue;n[l]=!0;const u=ko(l),f=c.remotesInfo[l];zt(e,{name:u.name,version:f.matchedVersion},r,!1,n,void 0)}}}const Te=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Oo(e,t,r,o,n){const s=[],i=[],c=[],a=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:m}=f;if(zt(o,r,(d,p,E)=>{var I;let y;if(E)y=f;else if(Array.isArray(m)){const S=m.find($=>$.nameOrAlias===p.name||$.nameOrAlias===p.alias);if(!S)return;y=jt(S)}else if(m===!0)y=f;else return;const R=Me(d,_t(d).url);R&&c.push({name:p.name,moduleInfo:{name:p.name,entry:R,type:"remoteEntryType"in d?d.remoteEntryType:"global",entryGlobalName:"globalName"in d?d.globalName:p.name,shareScope:"",version:"version"in d?d.version:void 0},url:R});let g="modules"in d?d.modules:[];const _=$o(y.exposes);_.length&&"modules"in d&&(g=(I=d==null?void 0:d.modules)==null?void 0:I.reduce((S,$)=>((_==null?void 0:_.indexOf($.moduleName))!==-1&&S.push($),S),[]));function b(S){const $=S.map(k=>Me(d,k));return y.filter?$.filter(y.filter):$}if(g){const S=g.length;for(let $=0;$<S;$++){const k=g[$],be=`${p.name}/${k.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:k.moduleName==="."?p.name:be,name:p.name,remoteSnapshot:d,preloadConfig:y,remote:p,origin:e}),!kr(be)&&(y.resourceCategory==="all"?(s.push(...b(k.assets.css.async)),s.push(...b(k.assets.css.sync)),i.push(...b(k.assets.js.async)),i.push(...b(k.assets.js.sync))):y.resourceCategory==="sync"&&(s.push(...b(k.assets.css.sync)),i.push(...b(k.assets.js.sync))),Or(be))}}},!0,{},n),n.shared&&n.shared.length>0){const d=(p,E)=>{const{shared:y}=ge(e.shareScopeMap,E.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};y&&typeof y.lib=="function"&&(E.assets.js.sync.forEach(R=>{a.add(R)}),E.assets.css.sync.forEach(R=>{l.add(R)}))};n.shared.forEach(p=>{var R;const E=(R=u.shared)==null?void 0:R[p.sharedName];if(!E)return;const y=p.version?E.find(g=>g.version===p.version):E;y&&Rt(y).forEach(g=>{d(g,p)})})}const h=i.filter(d=>!a.has(d)&&!Te("script",d));return{cssAssets:s.filter(d=>!l.has(d)&&!Te("link",d)),jsAssetsWithoutEntry:h,entryAssets:c.filter(d=>!Te("script",d.url))}}const Lo=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:o,remote:n,globalSnapshot:s,remoteSnapshot:i}=e;return U?De(n)&&gt(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(qt(o,i),Oo(t,r,o,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Kt(e,t){const r=pe({name:t.name,version:t.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&W(r.remotesInfo,e.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:qe(),remoteSnapshot:pe({name:e.name,version:o.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:qe(),remoteSnapshot:pe({name:e.name,version:"version"in e?e.version:void 0})}}var Co=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new H({beforeLoadRemoteSnapshot:new T("beforeLoadRemoteSnapshot"),loadSnapshot:new x("loadGlobalSnapshot"),loadRemoteSnapshot:new x("loadRemoteSnapshot"),afterLoadSnapshot:new x("afterLoadSnapshot")}),this.manifestLoading=_e.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:r="loadRemote"}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e,origin:this.HostInstance});let n=pe({name:this.HostInstance.options.name,version:this.HostInstance.options.version});n||(n={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},Mr({[this.HostInstance.options.name]:n})),n&&"remotesInfo"in n&&!W(n.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(n.remotesInfo={...n==null?void 0:n.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:c}=this.getGlobalRemoteInfo(e),{remoteSnapshot:a,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:c});let u,f;if(a)if(lt(a)){const m=U?a.remoteEntry:a.ssrRemoteEntry||a.remoteEntry||"",h=await this.loadManifestSnapshot(m,e,{},{initiator:r,id:t||e.name}),d=ze({...e,entry:m},h);u=h,f=d}else{const{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:a,from:"global"});u=m,f=l}else if(De(e)){const m=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),h=ze(e,m);u=m,f=h}else w(Ct,P,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,F(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:f}}getGlobalRemoteInfo(e){return Kt(e,this.HostInstance)}async getManifestJson(e,t,r,o){return(async()=>{const s=K(t);let i=this.manifestCache.get(e);if(i)return i;try{let a=await this.loaderHook.lifecycle.fetch.emit(e,{},s,o?{...o,url:e,resourceType:"manifest"}:void 0);(!a||!(a instanceof Response))&&(a=await fetch(e,{})),i=await a.json()}catch(a){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:a,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),i||(delete this.manifestLoading[e],w(kt,P,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${a}`,F(this.HostInstance.options)))}const c=[!i.metaData&&"metaData",!i.exposes&&"exposes",!i.shared&&"shared"].filter(Boolean);return c.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:new Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(", ")}.`),from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),c.length>0&&w(Ht,P,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(",")},void 0,F(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,r,o){const n=async()=>{const s=await this.getManifestJson(e,t,r,o),i=sr(s,{version:e}),{remoteSnapshot:c}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return c};return this.manifestLoading[e]||(this.manifestLoading[e]=n().then(s=>s)),this.manifestLoading[e]}},Do=class{constructor(){this.hooks=new H({})}},Fo=class{constructor(e){this.hooks=new H({beforeRegisterShare:new X("beforeRegisterShare"),afterResolve:new x("afterResolve"),beforeLoadShare:new x("beforeLoadShare"),loadShare:new T,afterLoadShare:new M("afterLoadShare"),errorLoadShare:new M("errorLoadShare"),resolveShare:new X("resolveShare"),initContainerShareScopeMap:new X("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:r,selectedShared:o}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:r,selectedShared:o,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(n){ne(n)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:r,error:o,recovered:n}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:o,recovered:n})}catch(s){ne(s)}}registerShared(e,t){const{newShareInfos:r,allShareInfos:o}=Nt(e,t);return Object.keys(r).forEach(n=>{r[n].forEach(s=>{s.scope.forEach(i=>{var c;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:n,shared:s}),(c=this.shareScopeMap[i])!=null&&c[n]||this.setShared({pkgName:n,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:o}}async loadShare(e,t){const{host:r}=this,o=Qe({pkgName:e,extraOptions:t,shareInfos:r.options.shared});let n=o;try{o!=null&&o.scope&&await Promise.all(o.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:o.strategy}))})),n=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r})).shareInfo,C(n,`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.`);const s=n,{shared:i,useTreesShaking:c}=ge(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(i){const a=fe(i,c);if(a.lib)return z(a,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),a.lib;if(a.loading&&!a.loaded){const l=await a.loading;return a.loaded=!0,a.lib||(a.lib=l),z(a,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),l}else{const u=(async()=>{const m=await a.get();return z(a,r.options.name),a.loaded=!0,a.lib=m,m})();this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:u,treeShaking:c?a:void 0});const f=await u;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),f}}else{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,recovered:!0}),!1;const a=ie(s.treeShaking),l=fe(s,a),f=(async()=>{const h=await l.get();l.lib=h,l.loaded=!0,z(l,r.options.name);const{shared:d,useTreesShaking:p}=ge(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare)||{};if(d){const E=fe(d,p);E.lib=h,E.loaded=!0,d.from=s.from}return h})();this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:f,treeShaking:a?l:void 0});const m=await f;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:s}),m}}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:n,error:s}),s}}initializeSharing(e=ce,t){const{host:r}=this,o=t==null?void 0:t.from,n=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(o!=="build"){const{initTokens:m}=this;s||(s=[]);let h=m[e];if(h||(h=m[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const c=this.shareScopeMap,a=r.options.name;c[e]||(c[e]={});const l=c[e],u=(m,h)=>{var g;const{version:d,eager:p}=h;l[m]=l[m]||{};const E=l[m],y=E[d]&&fe(E[d]),R=!!(y&&("eager"in y&&y.eager||"shareConfig"in y&&((g=y.shareConfig)!=null&&g.eager)));(!y||y.strategy!=="loaded-first"&&!y.loaded&&(!p!=!R?p:a>E[d].from))&&(E[d]=h)},f=async m=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:m});let d;try{d=await h.getEntry()}catch(p){if(d=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:m,error:p,from:"runtime",lifecycle:"beforeLoadShare",remote:h.remoteInfo,origin:r}),!d)return}finally{d!=null&&d.init&&!h.initing&&(h.remoteEntryExports=d,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(m=>{r.options.shared[m].forEach(h=>{h.scope.includes(e)&&u(m,h)})}),(r.options.shareStrategy==="version-first"||n==="version-first")&&r.options.remotes.forEach(m=>{m.shareScope===e&&i.push(f(m.name))}),i}loadShareSync(e,t){const{host:r}=this,o=Qe({pkgName:e,extraOptions:t,shareInfos:r.options.shared});try{o!=null&&o.scope&&o.scope.forEach(s=>{this.initializeSharing(s,{strategy:o.strategy})});const{shared:n}=ge(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(n){if(typeof n.lib=="function")return z(n,r.options.name),n.loaded||(n.loaded=!0,n.from===r.options.name&&(o.loaded=!0)),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),n.lib;if(typeof n.get=="function"){const s=n.get();if(!(s instanceof Promise))return z(n,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:s,shared:n}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),s}}if(o.lib)return o.loaded||(o.loaded=!0),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib;if(o.get){const s=o.get();return s instanceof Promise&&w((t==null?void 0:t.from)==="build"?Lt:Oe,P,{hostName:r.options.name,sharedPkgName:e},void 0,F(r.options)),o.lib=s,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib}w(Oe,P,{hostName:r.options.name,sharedPkgName:e},void 0,F(r.options))}catch(n){throw this.emitErrorLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,error:n}),n}}initShareScopeMap(e,t,r={}){const{host:o}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:o.options,origin:o,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:o,loading:n,loaded:s,get:i,treeShaking:c}){const{version:a,scope:l="default",...u}=t,f=Array.isArray(l)?l:[l],m=h=>{const d=(E,y,R)=>{R&&!E[y]&&(E[y]=R)},p=c?h.treeShaking:h;d(p,"loaded",s),d(p,"loading",n),d(p,"get",i)};f.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][a]||(this.shareScopeMap[h][e][a]={version:a,scope:[h],...u,lib:o});const d=this.shareScopeMap[h][e][a];m(d),r&&d.from!==r&&(d.from=r)})}_setGlobalShareScopeMap(e){const t=At(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},Ho=class{constructor(){this.shareScopeMap={},this.hooks=new H({afterResolve:new x("afterResolve")})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}loadShareSync(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},xo=class{constructor(e){this.hooks=new H({beforeRegisterRemote:new X("beforeRegisterRemote"),registerRemote:new X("registerRemote"),beforeRequest:new x("beforeRequest"),afterMatchRemote:new T("afterMatchRemote"),onLoad:new T("onLoad"),afterLoadRemote:new T("afterLoadRemote"),handlePreloadModule:new M("handlePreloadModule"),errorLoadRemote:new T("errorLoadRemote"),beforePreloadRemote:new T("beforePreloadRemote"),generatePreloadAssets:new T("generatePreloadAssets"),afterPreloadRemote:new T("afterPreloadRemote"),loadEntry:new T}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,o)=>(this.registerRemote(o,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:o}=t,{name:n,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:o},s&&e.startsWith(n)){const i=e.replace(n,s);this.idToRemoteMap[i]={name:r.name,expose:o};return}if(s&&e.startsWith(s)){const i=e.replace(s,n);this.idToRemoteMap[i]={name:r.name,expose:o}}}async loadRemote(e,t){const{host:r}=this,o=et(r.options.remotes,e);let n=e,s=o==null?void 0:o.expose,i=o?K(o.remote):void 0,c;try{const{loadFactory:a=!0}=t||{loadFactory:!0},{module:l,moduleOptions:u,remoteMatchInfo:f}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:m,remote:h,expose:d,id:p,remoteSnapshot:E}=f;n=p,s=d,i=K(h);const y=await l.get(p,d,t,E),R=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:m,expose:d,exposeModule:a?y:void 0,exposeModuleFactory:a?void 0:y,remote:h,options:u,moduleInstance:l,origin:r});return this.setIdToRemoteMap(e,f),c={id:n,expose:s,remote:i,options:t,origin:r},typeof R=="function"?R:y}catch(a){const{from:l="runtime"}=t||{from:"runtime"};let u;try{u=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:a,from:l,lifecycle:"onLoad",expose:s,remote:i,origin:r})}catch(f){throw c={id:n,expose:s,remote:i,options:t,error:f,origin:r},f}if(!u)throw c={id:n,expose:s,remote:i,options:t,error:a,origin:r},a;return c={id:n,expose:s,remote:i,options:t,error:a,origin:r,recovered:!0},u}finally{c&&await this.hooks.lifecycle.afterLoadRemote.emit(c)}}async preloadRemote(e){const{host:t}=this,r=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const o=Io(t.options.remotes,e),n=c=>{const{preloadConfig:a,remote:l}=c,u=a.exposes||[];return u.length?u.map(f=>({ops:{...c,preloadConfig:{...a,exposes:[f]}},id:Ue(l.name,f)})):[{ops:c,id:`${l.name}/*`}]};let s;await Promise.all(o.flatMap(n).map(async c=>{const{ops:a,id:l}=c,{remote:u,preloadConfig:f}=a,m=K(u);try{const{globalSnapshot:h,remoteSnapshot:d}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:u,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:a,remote:u,remoteInfo:m,globalSnapshot:h,remoteSnapshot:d});if(!p)return;const E=await Vt(m,t,p,!0,{initiator:"preloadRemote",id:l});r.push({remote:u,remoteInfo:m,preloadConfig:f,id:l,results:E})}catch(h){r.push({remote:u,remoteInfo:m,preloadConfig:f,id:l,results:[{url:m.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(m.entry)?"manifest":"remoteEntry",initiator:"preloadRemote",id:l,error:h}]})}}));const i=r.flatMap(c=>c.results.filter(a=>a.status==="error"||a.status==="timeout"));if(i.length>0&&(s=new Error(`preloadRemote failed to load ${i.length} resource(s).`),Object.assign(s,{results:r,failedResults:i})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:r,error:s}),s)throw s}registerRemotes(e,t){const{host:r}=this;e.forEach(o=>{this.registerRemote(o,r.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,r){const{host:o}=this,n=new tt({host:o,remoteInfo:K({name:e,entry:t})});return n.remoteEntryExports=r,o.moduleCache.set(e,n),n}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!o)throw h}const{id:n}=o,s=et(t.options.remotes,n);if(!s)try{w(Ot,P,{hostName:t.options.name,requestId:n},void 0,F(t.options))}catch(h){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:n,options:t.options,error:h,origin:t}),h}const{remote:i}=s,c=K(i);await this.hooks.lifecycle.afterMatchRemote.emit({id:n,...s,options:t.options,remoteInfo:c,origin:t});const a=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:n,...s,options:t.options,origin:t,remoteInfo:c}),{remote:l,expose:u}=a;C(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);let f=t.moduleCache.get(l.name);const m={host:t,remoteInfo:c};return f||(f=new tt(m),t.moduleCache.set(l.name,f)),{module:f,moduleOptions:m,remoteMatchInfo:a}}registerRemote(e,t,r){const{host:o}=this,n=()=>{if(e.alias){const i=t.find(c=>{var a;return e.alias&&(c.name.startsWith(e.alias)||((a=c.alias)==null?void 0:a.startsWith(e.alias)))});C(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&&U&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ce),e.type||(e.type=vt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const s=t.find(i=>i.name===e.name);if(!s)n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),at(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:o}=e,n=r.options.remotes.findIndex(a=>a.name===o);n!==-1&&r.options.remotes.splice(n,1);const s=W(N.__FEDERATION__.moduleInfo,se(e)).key;delete N.__FEDERATION__.moduleInfo[s],"entry"in e&&(r.snapshotHandler.manifestCache.delete(e.entry),delete _e.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);const{hostGlobalSnapshot:i}=Kt(e,r);if(i){const a=i&&"remotesInfo"in i&&i.remotesInfo&&W(i.remotesInfo,e.name).key;a&&delete i.remotesInfo[a]}const c=r.moduleCache.get(e.name);if(c){const a=c.remoteInfo,l=a.entryGlobalName;N[l]&&((t=Object.getOwnPropertyDescriptor(N,l))!=null&&t.configurable?delete N[l]:N[l]=void 0);const u=Le(c.remoteInfo);J[u]&&delete J[u];let f=a.buildVersion?it(a.name,a.buildVersion):a.name;const m=N.__FEDERATION__.__INSTANCES__.findIndex(h=>a.buildVersion?h.options.id===f:h.name===f);if(m!==-1){const h=N.__FEDERATION__.__INSTANCES__[m];f=h.options.id||f;const d=At();let p=!0;const E=[];Object.keys(d).forEach(y=>{const R=d[y];R&&Object.keys(R).forEach(g=>{const _=R[g];_&&Object.keys(_).forEach(b=>{const I=_[b];I&&Object.keys(I).forEach(S=>{const $=I[S];$&&typeof $=="object"&&$.from===a.name&&($.loaded||$.loading?($.useIn=$.useIn.filter(k=>k!==a.name),$.useIn.length?p=!1:E.push([y,g,b,S])):E.push([y,g,b,S]))})})})}),p&&(h.shareScopeMap={},delete d[f]),E.forEach(([y,R,g,_])=>{var b,I,S;(S=(I=(b=d[y])==null?void 0:b[R])==null?void 0:I[g])==null||delete S[_]}),N.__FEDERATION__.__INSTANCES__.splice(m,1)}r.moduleCache.delete(e.name)}}catch(r){ke.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};const Go=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,ve=typeof FEDERATION_OPTIMIZE_NO_REMOTE=="boolean"?!FEDERATION_OPTIMIZE_NO_REMOTE:!0,rt=typeof FEDERATION_OPTIMIZE_NO_SHARED=="boolean"?!FEDERATION_OPTIMIZE_NO_SHARED:!0;var Uo=class{constructor(e){this.hooks=new H({beforeInit:new X("beforeInit"),init:new M,beforeInitContainer:new x("beforeInitContainer"),initContainer:new x("initContainer")}),this.version="2.8.0",this.moduleCache=new Map,this.loaderHook=new H({getModuleInfo:new M,createScript:new M,createLink:new M,fetch:new T,loadEntryError:new T,afterLoadEntry:new T("afterLoadEntry"),beforeInitRemote:new T("beforeInitRemote"),afterInitRemote:new T("afterInitRemote"),beforeGetExpose:new T("beforeGetExpose"),afterGetExpose:new T("afterGetExpose"),beforeExecuteFactory:new T("beforeExecuteFactory"),afterExecuteFactory:new T("afterExecuteFactory"),getModuleFactory:new T}),this.bridgeHook=new H({beforeBridgeRender:new M,afterBridgeRender:new M,beforeBridgeDestroy:new M,afterBridgeDestroy:new M});const t=ve&&Go?[Po(),Lo()]:[],r={id:bo(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:U};this.name=e.name,this.options=r,this.snapshotHandler=ve?new Co(this):new Do,this.sharedHandler=rt?new Fo(this):new Ho,this.remoteHandler=ve?new xo(this):new Mo,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&w(Et(Dt,P)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ce,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){return this.remoteHandler.initRawContainer(e,t,r)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const r=rt?Nt(e,t).allShareInfos:{},{userOptions:o,options:n}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(n,o),{allShareInfos:i}=this.sharedHandler.registerShared(n,o),c=[...n.plugins];o.plugins&&o.plugins.forEach(l=>{c.includes(l)||c.push(l)});const a={...e,...t,plugins:c,remotes:s,shared:i,id:o.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:a}),a}registerPlugins(e){const t=So(e,this);this.options.plugins=this.options.plugins.reduce((r,o)=>(o&&r&&!r.find(n=>n.name===o.name)&&r.push(o),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};let Bo=null;function Jt(e){return Bo}Nr(Uo);function Zt(e,t){const r=o=>{if(!o.startsWith("/"))return o;const n=o.length>1&&o.endsWith("/"),s=`${t}/${o}`.replace(/\/+/g,"/").replace(/\/$/,"")||"/";return n?`${s}/`:s};return e.map(o=>{const n={...o,path:r(o.path)};return typeof o.redirect=="string"?n.redirect=r(o.redirect):o.redirect&&typeof o.redirect=="object"&&"path"in o.redirect&&typeof o.redirect.path=="string"&&(n.redirect={...o.redirect,path:r(o.redirect.path)}),o.children&&o.children.length>0&&(n.children=Zt(o.children,t)),n})}function jo(e){const t=e.replace(/\/+$/,""),r=s=>s.startsWith("/")&&s!==t&&!s.startsWith(t+"/"),o=s=>`${t}${s}`.replace(/\/+/g,"/"),n=s=>typeof s=="string"?r(s)?o(s):s:"path"in s&&typeof s.path=="string"&&r(s.path)?{...s,path:o(s.path)}:s;return s=>{const i=s.push.bind(s),c=s.replace.bind(s),a=s.resolve.bind(s);s.push=l=>i(n(l)),s.replace=l=>c(n(l)),s.resolve=(l,...u)=>a(n(l),...u)}}function Vo(e){const{router:t,basename:r,memoryRoute:o,hashRoute:n}=e,s=t.getRoutes().sort((h,d)=>h.path.split("/").filter(p=>p).length-d.path.split("/").filter(p=>p).length),i=new Map,c=new Set;s.forEach(h=>{const d=i.get(h.path)||[];d.push(h),i.set(h.path,d)});const a=(h,d)=>`${h}/${d}`.replace(/\/+/g,"/").replace(/\/$/,"")||"/",l=(h,d="")=>{if(!h.children||h.children.length===0)return h;for(let p=0;p<h.children.length;p++){const E=h.children[p],y=a(d,E.path),g=(i.get(y)||[]).find(_=>!c.has(_)&&_!==h&&(E.name==null||_.name===E.name));if(g){const _={...g,path:E.path};h.children[p]=_,c.add(g),l(_,y)}}return h};let u=[];for(const h of s)if(!c.has(h)){const d=l(h,h.path);c.add(h),u.push(d)}let f,m;return o?f=he.createMemoryHistory(r):n?(f=he.createWebHashHistory(),r&&(u=Zt(u,r),m=jo(r))):f=he.createWebHistory(r),{history:f,routes:u,patchRouter:m}}function Wo(e){const t=new Map,r=Jt();return()=>({__APP_VERSION__:"2.8.0",async render(o){var d,p,E,y,R,g;D.debug("createBridgeComponent render Info",o);const{moduleName:n,dom:s,basename:i,memoryRoute:c,hashRoute:a,...l}=o,u=Yt.createApp(e.rootComponent,l);t.set(s,u);const f=await((E=(p=(d=r==null?void 0:r.bridgeHook)==null?void 0:d.lifecycle)==null?void 0:p.beforeBridgeRender)==null?void 0:E.emit(o)),m=f&&typeof f=="object"&&(f!=null&&f.extraProps)?f==null?void 0:f.extraProps:{},h=e.appOptions({app:u,basename:i,memoryRoute:c,hashRoute:a,...l,...m});if(h!=null&&h.router){const{history:_,routes:b,patchRouter:I}=Vo({router:h.router,basename:o.basename,memoryRoute:o.memoryRoute,hashRoute:o.hashRoute}),S=he.createRouter({...h.router.options,history:_,routes:b});I&&I(S),h.afterRouterCreate&&h.afterRouterCreate(S),D.debug("createBridgeComponent render router info>>>",{moduleName:n,router:S}),c&&await S.push(c.entryPath),u.use(S)}u.mount(s),(g=(R=(y=r==null?void 0:r.bridgeHook)==null?void 0:y.lifecycle)==null?void 0:R.afterBridgeRender)==null||g.emit(o)},destroy(o){var s,i,c,a,l,u;D.debug("createBridgeComponent destroy Info",o);const n=t.get(o==null?void 0:o.dom);(c=(i=(s=r==null?void 0:r.bridgeHook)==null?void 0:s.lifecycle)==null?void 0:i.beforeBridgeDestroy)==null||c.emit(o),n==null||n.unmount(),(u=(l=(a=r==null?void 0:r.bridgeHook)==null?void 0:a.lifecycle)==null?void 0:l.afterBridgeDestroy)==null||u.emit(o)}})}function qo(){const e=new PopStateEvent("popstate",{state:window.history.state});window.dispatchEvent(e)}const zo=v.defineComponent({name:"RemoteApp",props:{moduleName:String,basename:String,memoryRoute:Object,hashRoute:Boolean,providerInfo:Function,rootAttrs:Object},inheritAttrs:!1,setup(e){const t=v.ref(null),r=v.ref(null),o=v.ref(""),n=v.ref(!1),s=v.ref(!1),i=v.ref(!1),c=Ce.useRoute(),a=Jt(),l=v.useAttrs(),u=()=>({name:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute}),f=async()=>{var y,R,g,_,b,I,S;if(!t.value||n.value)return;const d=(y=e.providerInfo)==null?void 0:y.call(e);r.value=d;let p={...l,moduleName:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute};D.debug("createRemoteAppComponent LazyComponent render >>>",p);const E=await((_=(g=(R=a==null?void 0:a.bridgeHook)==null?void 0:R.lifecycle)==null?void 0:g.beforeBridgeRender)==null?void 0:_.emit(p))||{};p={...p,...E.extraProps},d.render(p),n.value=!0,(S=(I=(b=a==null?void 0:a.bridgeHook)==null?void 0:b.lifecycle)==null?void 0:I.afterBridgeRender)==null||S.emit(p)},m=()=>{var E,y,R,g,_,b;const d=r.value;if(!d||!n.value)return;D.debug("createRemoteAppComponent LazyComponent destroy >>>",{...e});const p=u();(R=(y=(E=a==null?void 0:a.bridgeHook)==null?void 0:E.lifecycle)==null?void 0:y.beforeBridgeDestroy)==null||R.emit(p),d.destroy({dom:t.value}),r.value=null,n.value=!1,(b=(_=(g=a==null?void 0:a.bridgeHook)==null?void 0:g.lifecycle)==null?void 0:_.afterBridgeDestroy)==null||b.emit(p)},h=v.watch(()=>c==null?void 0:c.path,d=>{s.value&&o.value!==""&&o.value!==d&&(D.debug("createRemoteAppComponent dispatchPopstateEnv >>>",{...e,pathname:c.path}),qo()),o.value=d});return v.onMounted(()=>{s.value=!0,f()}),v.onActivated(async()=>{s.value=!0,i.value&&(i.value=!1,await v.nextTick(),f())}),v.onDeactivated(()=>{s.value=!1,i.value=!0,m()}),v.onBeforeUnmount(()=>{h(),m()}),()=>v.createVNode("div",v.mergeProps(e.rootAttrs||{},{ref:t}),null)}});function Xt(e){return v.defineAsyncComponent({__APP_VERSION__:"2.8.0",...e.asyncComponentOptions,loader:async()=>{var a,l;const t=Ce.useRoute();let r="/";const o=(l=(a=t==null?void 0:t.matched)==null?void 0:a[0])==null?void 0:l.path;o&&(o.endsWith("/:pathMatch(.*)*")?r=o.replace("/:pathMatch(.*)*",""):r=t.matched[0].path);const n=(e==null?void 0:e.export)||"default";D.debug("createRemoteAppComponent LazyComponent create >>>",{basename:r,info:e});const s=await e.loader(),i=s&&s[Symbol.for("mf_module_id")],c=s[n];if(D.debug("createRemoteAppComponent LazyComponent loadRemote info >>>",{moduleName:i,module:s,exportName:n,basename:r,route:t}),n in s&&typeof c=="function")return{render(){return v.h(zo,{moduleName:i,providerInfo:c,basename:r,rootAttrs:e.rootAttrs,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute})}};throw new Error("module not found")}})}function Ko(e){return D.warn("createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"),Xt(e)}exports.createBridgeComponent=Wo;exports.createRemoteAppComponent=Xt;exports.createRemoteComponent=Ko;
7
+ `)};function Ir(e,t,r,o,n,s){return o(Et(e,t,r,n))}const B="[ Federation Runtime ]",Oe=ft(B);function C(e,t,r,o,n){e||S(t)}function S(e,t,r,o,n){if(t!==void 0)return Ir(e,t,r??{},a=>{throw new Error(`${B}: ${a}`)},o);const s=e;throw s instanceof Error?(s.message.startsWith(B)||(s.message=`${B}: ${s.message}`),s):new Error(`${B}: ${s}`)}function oe(e){e instanceof Error&&(e.message.startsWith(B)||(e.message=`${B}: ${e.message}`)),Oe.warn(e)}function $r(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function ne(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function De(e){return typeof e.entry<"u"}function gt(e){return!e.entry.includes(".json")}function He(e){return e&&typeof e=="object"}const Tr=Object.prototype.toString;function vr(e){return Tr.call(e)==="[object Object]"}function Rt(e){return Array.isArray(e)?e:[e]}function _t(e){const t={url:"",type:"global",globalName:""};return U||st()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}const Nr=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r},N=typeof globalThis=="object"?globalThis:window,O=(()=>{try{return document.defaultView}catch{return N}})(),be=O;function me(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function pe(e,t){return Object.hasOwnProperty.call(e,t)}pe(N,"__GLOBAL_LOADING_REMOTE_ENTRY__")||me(N,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const J=N.__GLOBAL_LOADING_REMOTE_ENTRY__;function bt(e){var t,r,o,n,s,a;pe(e,"__VMOK__")&&!pe(e,"__FEDERATION__")&&me(e,"__FEDERATION__",e.__VMOK__),pe(e,"__FEDERATION__")||(me(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),me(e,"__VMOK__",e.__FEDERATION__)),(t=e.__FEDERATION__).__GLOBAL_PLUGIN__??(t.__GLOBAL_PLUGIN__=[]),(r=e.__FEDERATION__).__INSTANCES__??(r.__INSTANCES__=[]),(o=e.__FEDERATION__).moduleInfo??(o.moduleInfo={}),(n=e.__FEDERATION__).__SHARE__??(n.__SHARE__={}),(s=e.__FEDERATION__).__MANIFEST_LOADING__??(s.__MANIFEST_LOADING__={}),(a=e.__FEDERATION__).__PRELOADED_MAP__??(a.__PRELOADED_MAP__=new Map)}bt(N);bt(O);function Ar(e,t=Me()){t&&(N.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.8.2")}function W(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const o of r){const[n,s]=o.split(":"),a=`${n}:${t}`,c=e[a];if(c)return{value:c,key:a}}return{value:void 0,key:t}}}else S(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const qe=()=>O.__FEDERATION__.moduleInfo,Mr=(e,t)=>{const r=W(t,ne(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:o,...n}=e,s=ne(n),a=W(O.__FEDERATION__.moduleInfo,s).value;if((a==null?void 0:a.version)===o)return a}},ye=e=>Mr(e,O.__FEDERATION__.moduleInfo),ze=(e,t)=>{const r=ne(e);return O.__FEDERATION__.moduleInfo[r]=t,O.__FEDERATION__.moduleInfo},Pr=e=>(O.__FEDERATION__.moduleInfo={...O.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete O.__FEDERATION__.moduleInfo[r]}),xe=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:N[r]}},kr=()=>O.__FEDERATION__.__GLOBAL_PLUGIN__,Or=e=>N.__FEDERATION__.__PRELOADED_MAP__.get(e),Lr=e=>N.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Ke="[0-9A-Za-z-]+",Ge=`(?:\\+(${Ke}(?:\\.${Ke})*))`,re="0|[1-9]\\d*",Ee="[0-9]+",St="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Je=`(?:${Ee}|${St})`,Cr=`(?:-?(${Je}(?:\\.${Je})*))`,Ze=`(?:${re}|${St})`,wt=`(?:-(${Ze}(?:\\.${Ze})*))`,$e=`${re}|x|X|\\*`,Y=`[v=\\s]*(${$e})(?:\\.(${$e})(?:\\.(${$e})(?:${wt})?${Ge}?)?)?`,Fr=`^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`,Dr=`[v=\\s]*${`(${Ee})\\.(${Ee})\\.(${Ee})`}${Cr}?${Ge}?`,Ue="((?:<|>)?=?)",Hr=`(\\s*)${Ue}\\s*(${Dr}|${Y})`,It="(?:~>?)",xr=`(\\s*)${It}\\s+`,$t="(?:\\^)",Gr=`(\\s*)${$t}\\s+`,Ur="(<|>)?=?\\s*\\*",Br=`^${$t}${Y}$`,jr=`v?${`(${re})\\.(${re})\\.(${re})`}${wt}?${Ge}?`,Vr=`^${It}${Y}$`,Wr=`^${Ue}\\s*${Y}$`,qr=`^${Ue}\\s*(${jr})$|^$`,zr="^\\s*>=\\s*0.0.0\\s*$";function L(e){return new RegExp(e)}function A(e){return!e||e.toLowerCase()==="x"||e==="*"}function Tt(...e){return t=>e.reduce((r,o)=>o(r),t)}function Xe(e){return e.match(L(qr))}function Ye(e,t,r,o){const n=`${e}.${t}.${r}`;return o?`${n}-${o}`:n}function Kr(e){return e.replace(L(Fr),(t,r,o,n,s,a,c,i,l,u,f,m)=>(A(o)?r="":A(n)?r=`>=${o}.0.0`:A(s)?r=`>=${o}.${n}.0`:r=`>=${r}`,A(l)?i="":A(u)?i=`<${Number(l)+1}.0.0-0`:A(f)?i=`<${l}.${Number(u)+1}.0-0`:m?i=`<=${l}.${u}.${f}-${m}`:i=`<=${i}`,`${r} ${i}`.trim()))}function Jr(e){return e.replace(L(Hr),"$1$2$3")}function Zr(e){return e.replace(L(xr),"$1~")}function Xr(e){return e.replace(L(Gr),"$1^")}function Yr(e){return e.trim().split(/\s+/).map(t=>t.replace(L(Br),(r,o,n,s,a)=>A(o)?"":A(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:A(s)?o==="0"?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.0 <${Number(o)+1}.0.0-0`:a?o==="0"?n==="0"?`>=${o}.${n}.${s}-${a} <${o}.${n}.${Number(s)+1}-0`:`>=${o}.${n}.${s}-${a} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s}-${a} <${Number(o)+1}.0.0-0`:o==="0"?n==="0"?`>=${o}.${n}.${s} <${o}.${n}.${Number(s)+1}-0`:`>=${o}.${n}.${s} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s} <${Number(o)+1}.0.0-0`)).join(" ")}function Qr(e){return e.trim().split(/\s+/).map(t=>t.replace(L(Vr),(r,o,n,s,a)=>A(o)?"":A(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:A(s)?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:a?`>=${o}.${n}.${s}-${a} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s} <${o}.${Number(n)+1}.0-0`)).join(" ")}function eo(e){return e.split(/\s+/).map(t=>t.trim().replace(L(Wr),(r,o,n,s,a,c)=>{const i=A(n),l=i||A(s),u=l||A(a);return o==="="&&u&&(o=""),c="",i?o===">"||o==="<"?"<0.0.0-0":"*":o&&u?(l&&(s=0),a=0,o===">"?(o=">=",l?(n=Number(n)+1,s=0,a=0):(s=Number(s)+1,a=0)):o==="<="&&(o="<",l?n=Number(n)+1:s=Number(s)+1),o==="<"&&(c="-0"),`${o+n}.${s}.${a}${c}`):l?`>=${n}.0.0${c} <${Number(n)+1}.0.0-0`:u?`>=${n}.${s}.0${c} <${n}.${Number(s)+1}.0-0`:r})).join(" ")}function to(e){return e.trim().replace(L(Ur),"")}function ro(e){return e.trim().replace(L(zr),"")}function ge(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function oo(e,t){const{preRelease:r}=e,{preRelease:o}=t;if(r===void 0&&o)return 1;if(r&&o===void 0)return-1;if(r===void 0&&o===void 0)return 0;for(let n=0,s=r.length;n<=s;n++){const a=r[n],c=o[n];if(a!==c)return a===void 0&&c===void 0?0:a?c?ge(a,c):-1:1}return 0}function le(e,t){return ge(e.major,t.major)||ge(e.minor,t.minor)||ge(e.patch,t.patch)||oo(e,t)}function Te(e,t){return e.version===t.version}function no(e,t){switch(e.operator){case"":case"=":return Te(e,t);case">":return le(e,t)<0;case">=":return Te(e,t)||le(e,t)<0;case"<":return le(e,t)>0;case"<=":return Te(e,t)||le(e,t)>0;case void 0:return!0;default:return!1}}function so(e){return Tt(Yr,Qr,eo,to)(e)}function io(e){return Tt(Kr,Jr,Zr,Xr)(e.trim()).split(/\s+/).join(" ")}function te(e,t){if(!e)return!1;const r=Xe(e);if(!r)return!1;const[,o,,n,s,a,c]=r,i={operator:o,version:Ye(n,s,a,c),major:n,minor:s,patch:a,preRelease:c==null?void 0:c.split(".")},l=t.split("||");for(const u of l){const f=u.trim();if(!f||f==="*"||f==="x")return!0;try{const m=io(f);if(!m.trim())return!0;const h=m.split(" ").map(E=>so(E)).join(" ");if(!h.trim())return!0;const d=h.split(/\s+/).map(E=>ro(E)).filter(Boolean);if(d.length===0)continue;let p=!0;for(const E of d){const y=Xe(E);if(!y){p=!1;break}const[,R,,g,_,b,I]=y;if(!no({operator:R,version:Ye(g,_,b,I),major:g,minor:_,patch:b,preRelease:I==null?void 0:I.split(".")},i)){p=!1;break}}if(p)return!0}catch(m){console.error(`[semver] Error processing range part "${f}":`,m);continue}}return!1}const ae="default",vt="global";function ao(e,t,r,o){var s,a;let n;return"get"in e?n=e.get:"lib"in e?n=()=>Promise.resolve(e.lib):n=()=>Promise.resolve(()=>{S(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((a=e.treeShaking)!=null&&a.mode)&&S(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:n,loaded:e!=null&&e.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??o)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??Ae.UNKNOWN,useIn:[]}:void 0}}function Nt(e,t){const r=t.shared||{},o=t.name,n=Object.keys(r).reduce((a,c)=>{const i=Rt(r[c]);return a[c]=a[c]||[],i.forEach(l=>{a[c].push(ao(l,o,c,t.shareStrategy))}),a},{}),s={...e.shared};return Object.keys(n).forEach(a=>{s[a]?n[a].forEach(c=>{s[a].find(i=>i.version===c.version)||s[a].push(c)}):s[a]=n[a]}),{allShareInfos:s,newShareInfos:n}}function se(e,t){if(!e)return!1;const{status:r,mode:o}=e;return r===Ae.NO_USE?!1:r===Ae.CALCULATED?!0:o==="runtime-infer"?t?lo(e,t):!0:!1}function j(e,t){const r=o=>{if(!Number.isNaN(Number(o))){const n=o.split(".");let s=o;for(let a=0;a<3-n.length;a++)s+=".0";return s}return o};return!!te(r(e),`<=${r(t)}`)}const ie=(e,t)=>{const r=t||function(o,n){return j(o,n)};return Object.keys(e).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},_e=e=>!!e.loaded||typeof e.lib=="function",co=e=>!!e.loading,lo=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(o=>r.includes(o)):!1};function uo(e,t,r,o){const n=e[t][r];let s="",a=se(o);const c=function(i,l){return a?n[i].treeShaking?n[l].treeShaking?!_e(n[i].treeShaking)&&j(i,l):!1:!0:!_e(n[i])&&j(i,l)};if(a){if(s=ie(e[t][r],c),s)return{version:s,useTreesShaking:a};a=!1}return{version:ie(e[t][r],c),useTreesShaking:a}}const q=e=>_e(e)||co(e);function fo(e,t,r,o){const n=e[t][r];let s="",a=se(o);const c=function(i,l){if(a){if(!n[i].treeShaking)return!0;if(!n[l].treeShaking)return!1;if(q(n[l].treeShaking))return q(n[i].treeShaking)?!!j(i,l):!0;if(q(n[i].treeShaking))return!1}return q(n[l])?q(n[i])?!!j(i,l):!0:q(n[i])?!1:j(i,l)};if(a){if(s=ie(e[t][r],c),s)return{version:s,useTreesShaking:a};a=!1}return{version:ie(e[t][r],c),useTreesShaking:a}}function ho(e){return e==="loaded-first"?fo:uo}function Re(e,t,r,o){if(!e)return;const{shareConfig:n,scope:s=ae,strategy:a,treeShaking:c}=r,i=Array.isArray(s)?s:[s];for(const l of i)if(n&&e[l]&&e[l][t]){const{requiredVersion:u}=n,{version:f,useTreesShaking:m}=ho(a)(e,l,t,c),h=()=>{const p=e[l][t][f];if(n.singleton){if(typeof u=="string"&&!te(f,u)){const E=`Version ${f} from ${f&&p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;n.strictVersion?S(E):oe(E)}return{shared:p,useTreesShaking:m}}else{if(u===!1||u==="*")return{shared:p,useTreesShaking:m};if(te(f,u))return{shared:p,useTreesShaking:m};const E=se(c);if(E){for(const[y,R]of Object.entries(e[l][t]))if(se(R.treeShaking,c==null?void 0:c.usedExports)&&te(y,u))return{shared:R,useTreesShaking:E}}for(const[y,R]of Object.entries(e[l][t]))if(te(y,u))return{shared:R,useTreesShaking:!1}}},d={shareScopeMap:e,scope:l,pkgName:t,version:f,GlobalFederation:be.__FEDERATION__,shareInfo:r,resolver:h};return(o.emit(d)||d).resolver()}}function At(){return be.__FEDERATION__.__SHARE__}function Qe(e){const{pkgName:t,extraOptions:r,shareInfos:o}=e,n=i=>{if(!i)return;const l={};return i.forEach(f=>{l[f.version]=f}),l[ie(l,function(f,m){return!_e(l[f])&&j(f,m)})]},s=(r==null?void 0:r.resolver)??n,a=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),c=(...i)=>{const l={};for(const u of i)if(u)for(const[f,m]of Object.entries(u)){const h=l[f];a(h)&&a(m)?l[f]=c(h,m):m!==void 0&&(l[f]=m)}return l};return c(s(o[t]),r==null?void 0:r.customShareInfo)}const z=(e,t)=>{e.useIn||(e.useIn=[]),$r(e.useIn,t)};function ue(e,t){return t&&e.treeShaking?e.treeShaking:e}function Be(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function et(e,t){for(const r of e){const o=t.startsWith(r.name);let n=t.replace(r.name,"");if(o){if(n.startsWith("/")){const c=r.name;return n=`.${n}`,{pkgNameOrAlias:c,expose:n,remote:r}}else if(n==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let a=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(a&&a.startsWith("/")){const c=r.alias;return a=`.${a}`,{pkgNameOrAlias:c,expose:a,remote:r}}else if(a==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function mo(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}const Mt="RUNTIME-001",Pt="RUNTIME-002",kt="RUNTIME-003",Ot="RUNTIME-004",Lt="RUNTIME-005",Le="RUNTIME-006",Ct="RUNTIME-007",Se="RUNTIME-008",po="RUNTIME-009",Ft="RUNTIME-010",Dt="RUNTIME-011",yo="RUNTIME-012",Ht="RUNTIME-013",xt="RUNTIME-014",Gt="RUNTIME-015",M={[Mt]:"Failed to get remoteEntry exports.",[Pt]:'The remote entry interface does not contain "init"',[kt]:"Failed to get manifest.",[Ot]:"Failed to locate remote.",[Lt]:"Invalid loadShareSync function call from bundler runtime",[Le]:"Invalid loadShareSync function call from runtime",[Ct]:"Failed to get remote snapshot.",[Se]:"Failed to load script resources.",[po]:"Please call createInstance first.",[Ft]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[Dt]:"The remoteEntry URL is missing from the remote snapshot.",[yo]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',[Ht]:"The manifest is not a valid Module Federation manifest.",[xt]:"The remote does not expose the requested module.",[Gt]:"Remote container initialization failed."};({...M});const Ut=".then(callbacks[0]).catch(callbacks[1])",Eo=["Failed to fetch dynamically imported module","Importing a module script failed","error loading dynamically imported module"];function go(e){return e instanceof TypeError?Eo.some(t=>e.message.includes(t)):!1}function Bt(e){return e==="esm"||e==="module"}async function Ro({entry:e,remoteEntryExports:t,name:r,getEntryUrl:o}){return new Promise((n,s)=>{const a=i=>{if(go(i)){const l=i instanceof Error?i.message:String(i);try{S(Se,M,{remoteName:r,resourceUrl:c},l)}catch(u){s(u);return}}s(i)},c=o?o(e):e;try{t?n(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${c}")${Ut}`)([n,a]):import(c).then(n).catch(a)}catch(i){S(`Failed to load ESM entry from "${c}". ${i instanceof Error?i.message:String(i)}`)}})}async function _o({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(o):new Function("callbacks",`System.import("${e}")${Ut}`)([r,o])}catch(n){S(`Failed to load SystemJS entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}function jt(e,t,r){const{remoteEntryKey:o,entryExports:n}=xe(e,t);return n||S(Mt,M,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:o}),n}async function bo({name:e,globalName:t,entry:r,remoteInfo:o,loaderHook:n,getEntryUrl:s,resourceContext:a}){const{entryExports:c}=xe(e,t);if(c)return c;const i=s?s(r):r;return hr(i,{attrs:{},createScriptHook:(l,u)=>{const f=n.lifecycle.createScript.emit({url:l,attrs:u,remoteInfo:o,resourceContext:a?{...a,url:l}:void 0});if(f&&(f instanceof HTMLScriptElement||"script"in f||"timeout"in f))return f}}).then(()=>jt(e,t,r),l=>{const u=l instanceof Error?l.message:String(l);S(Se,M,{remoteName:e,resourceUrl:i},u)})}async function So({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:o,resourceContext:n}){const{entry:s,entryGlobalName:a,name:c,type:i}=e;return Bt(i)?Ro({entry:s,remoteEntryExports:t,name:c,getEntryUrl:o}):i==="system"?_o({entry:s,remoteEntryExports:t}):bo({entry:s,globalName:a,name:c,remoteInfo:e,loaderHook:r,getEntryUrl:o,resourceContext:n})}async function wo({remoteInfo:e,loaderHook:t,resourceContext:r}){const{entry:o,entryGlobalName:n,name:s,type:a}=e,{entryExports:c}=xe(s,n);return c||pr(o,{attrs:{name:s,globalName:n,type:a},loaderHook:{createScriptHook:(i,l={})=>{const u=t.lifecycle.createScript.emit({url:i,attrs:l,remoteInfo:e,resourceContext:r?{...r,url:i}:void 0});if(u&&"url"in u)return u}}}).then(()=>jt(s,n,o)).catch(i=>{S(`Failed to load Node.js entry for remote "${s}" from "${o}". ${i instanceof Error?i.message:String(i)}`)})}function Ce(e){const{entry:t,name:r}=e;return it(r,t)}async function je(e){const{origin:t,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,resourceContext:s,_inErrorHandling:a=!1}=e,c=Ce(o);if(r)return r;if(!J[c]){const i=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;J[c]=i.emit({origin:t,loaderHook:l,remoteInfo:o,remoteEntryExports:r}).then(u=>u||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":U)?So({remoteInfo:o,remoteEntryExports:r,loaderHook:l,getEntryUrl:n,resourceContext:s}):wo({remoteInfo:o,loaderHook:l,resourceContext:s}))).then(async u=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:u}),u)).catch(async u=>{const f=Ce(o),m=u instanceof Error&&u.message.includes("ScriptExecutionError");if(u instanceof Error&&u.message.includes(Se)&&!m&&!a){const h=p=>je({...p,_inErrorHandling:!0}),d=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:h,origin:t,remoteInfo:o,remoteEntryExports:r,globalLoading:J,uniqueKey:f});if(d)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:d,recovered:!0}),d}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,error:u}),u})}return J[c]}function K(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||vt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ae}}function Io(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function $o(e,t){const r=kr(),o=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(n=>{e!=null&&e.find(s=>s.name!==n.name)&&e.push(n)}),e&&e.length>0&&e.forEach(n=>{o.forEach(s=>{s.applyPlugin(n,t)})}),e}function To(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function D(e){var r,o,n,s,a,c;const t={};for(const[i,l]of Object.entries(e.shared)){const u=l[0];u&&(t[i]={version:u.version,singleton:(r=u.shareConfig)==null?void 0:r.singleton,requiredVersion:((o=u.shareConfig)==null?void 0:o.requiredVersion)===!1?!1:(n=u.shareConfig)==null?void 0:n.requiredVersion,eager:u.eager,strictVersion:(s=u.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((a=e.remotes)==null?void 0:a.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((c=e.remotes)==null?void 0:c.map(To))??[],shared:t}}}function Vt(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function vo(e,t){return t.map(r=>{const o=mo(e,r.nameOrAlias);return C(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&ct({remoteInfo:o,remotes:e})}`),{remote:o,preloadConfig:Vt(r)}})}function No(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function Ve(e){return e instanceof Error?e.message.includes("timed out")||e.name.includes("Timeout"):!1}function V(e,t,r,o){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:o}}async function Ao(e,t,r,o){const n=e.moduleCache.get(r.name),s=r.entry;if(n!=null&&n.remoteEntryExports)return V(o,s,"cached");try{if(!await je({origin:e,remoteInfo:r,remoteEntryExports:n==null?void 0:n.remoteEntryExports,resourceContext:{...o,url:s}}))throw new Error(`Failed to load remoteEntry "${s}".`);return V(o,s,"success")}catch(a){return V(o,s,Ve(a)?"timeout":"error",a)}}function fe({host:e,remoteInfo:t,url:r,attrs:o,context:n,needDeleteLink:s}){return new Promise(a=>{const{link:c,needAttach:i}=fr({url:r,cb:()=>{a(V(n,r,i?"success":"cached"))},onErrorCallback:l=>{a(V(n,r,Ve(l)?"timeout":"error",l))},attrs:o,createLinkHook:(l,u)=>{const f=e.loaderHook.lifecycle.createLink.emit({url:l,attrs:u,remoteInfo:t,resourceContext:{...n,url:l}});return f instanceof HTMLLinkElement,f},needDeleteLink:s});i&&document.head.appendChild(c)})}function Mo({host:e,remoteInfo:t,url:r,attrs:o,context:n}){return new Promise(s=>{const{script:a,needAttach:c}=dt({url:r,cb:()=>{s(V(n,r,c?"success":"cached"))},onErrorCallback:i=>{s(V(n,r,Ve(i)?"timeout":"error",i))},attrs:o,createScriptHook:(i,l)=>{const u=e.loaderHook.lifecycle.createScript.emit({url:i,attrs:l,remoteInfo:t,resourceContext:{...n,url:i}});return u instanceof HTMLScriptElement,u},needDeleteScript:!0});c&&document.head.appendChild(a)})}function he(e,t){return{...e,resourceType:t}}function Wt(e,t,r,o=!0,n={initiator:"preloadRemote",id:e.name}){const{cssAssets:s,jsAssetsWithoutEntry:a,entryAssets:c}=r,i=[];if(t.options.inBrowser){if(c.forEach(f=>{const{moduleInfo:m}=f;i.push(Ao(t,e,m,he(n,"remoteEntry")))}),o){const f={rel:"preload",as:"style"};s.forEach(m=>{i.push(fe({host:t,remoteInfo:e,url:m,attrs:f,context:he(n,"css")}))})}else{const f={rel:"stylesheet",type:"text/css"};s.forEach(m=>{i.push(fe({host:t,remoteInfo:e,url:m,attrs:f,needDeleteLink:!1,context:he(n,"css")}))})}let l=Mo,u={fetchpriority:"high",type:"text/javascript"};o?(l=fe,u={rel:"preload",as:"script"}):Bt(e.type)&&(l=fe,u={rel:"modulepreload",fetchpriority:"high"}),a.forEach(f=>{i.push(l({host:t,remoteInfo:e,url:f,attrs:u,context:he(n,"js")}))})}return Promise.all(i)}function Po(e){if(!e||!("modules"in e)||!Array.isArray(e.modules))return;const t=e.modules.map(r=>r.moduleName).filter(Boolean);return t.length?t.join(","):void 0}function ko(e,t,r){const o=t,n=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];n.length||n.push("default"),n.forEach(a=>{o[a]||(o[a]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?n:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:o,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:o[n[0]],initScope:r??[]}}var tt=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;const t=await je({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:"loadRemote",id:Be(this.remoteInfo.name,e),resourceType:"remoteEntry"}});return C(t,`remoteEntryExports is undefined
8
+ ${ct(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,r,o){const n=await this.getEntry(o);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host}),n;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host})}catch(s){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:s,cached:!0,origin:this.host}),s}return n}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});const{remoteEntryInitOptions:s,shareScope:a,initScope:c}=ko(this.remoteInfo,this.host.shareScopeMap,r),i=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:s,initScope:c,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&S(Pt,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,D(this.host.options));try{await n.init(i.shareScope,i.initScope,i.remoteEntryInitOptions)}catch(l){S(Gt,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${l}`,D(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...i,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,origin:this.host})}catch(s){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:s,origin:this.host}),s}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,o){const{loadFactory:n=!0}=r||{loadFactory:!0},s=await this.init(e,o,void 0,t);this.lib=s,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,origin:this.host});let a;try{const l=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo});a=typeof l=="function"?l:void 0,a||(a=await s.get(t)),a||S(xt,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Po(o)},void 0,D(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,moduleFactory:a,origin:this.host})}catch(l){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,error:l,origin:this.host}),l}const c=Nr(this.remoteInfo.name,t),i=this.wraperFactory(a,c);if(!n)return i;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,origin:this.host});try{const l=await i();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,exposeModule:l,origin:this.host}),l}catch(l){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,error:l,origin:this.host}),l}}wraperFactory(e,t){function r(o,n){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:n,enumerable:!1})}return()=>{const o=e();return o instanceof Promise?o.then(n=>(r(n,t),n)):(r(o,t),o)}}},H=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var o;C(vr(e),"Plugin configuration is invalid.");const r=e.name;C(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,(o=e.apply)==null||o.call(e,t),Object.keys(this.lifecycle).forEach(n=>{const s=e[n];s&&this.lifecycle[n].on(s)}))}removePlugin(e){C(e,"A name is required.");const t=this.registerPlugins[e];C(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}},P=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const t=this;this.on(function r(...o){return t.remove(r),e.apply(null,o)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{const o=r(...e);o!==void 0&&(t=o)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},T=class extends P{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let o=0;const n=s=>s===!1?!1:o<r.length?Promise.resolve(r[o++].apply(null,e)).then(a=>a===void 0||e.length===1&&a===e[0]?n(s):n(a)):s;t=n()}return Promise.resolve(t)}};function qt(e,t){if(!He(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var X=class extends P{constructor(e){super(),this.onerror=S,this.type=e}emit(e){He(e)||S(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(r===void 0)continue;if(qt(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){oe(r),this.onerror(r)}return e}},x=class extends P{constructor(e){super(),this.onerror=S,this.type=e}emit(e){He(e)||S(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const o=s=>(oe(s),this.onerror(s),e),n=s=>{if(s!==void 0&&qt(e,s))e=s;else if(s!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(r<t.length)try{return Promise.resolve(t[r++](e)).then(n,o)}catch(a){return o(a)}return e};return Promise.resolve(n(e))}return Promise.resolve(e)}};const ee="Remote loading is disabled by experiments.optimization.disableRemote.";var Oo=class{constructor(){this.hooks=new H({})}formatAndRegisterRemote(){return[]}loadRemote(){throw new Error(ee)}preloadRemote(){throw new Error(ee)}registerRemotes(){throw new Error(ee)}getRemoteModuleAndOptions(){throw new Error(ee)}initRawContainer(){throw new Error(ee)}};function zt(e,t){const r=_t(t);r.url||S(Dt,M,{remoteName:e.name});let o=Pe(t,r.url);!U&&!o.startsWith("http")&&(o=`https:${o}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=o,e.version=t.version,e.buildVersion=t.buildVersion}function Lo(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:s,id:a}=e;if(!De(t)||!gt(t)){const{remoteSnapshot:c,globalSnapshot:i}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Be(t.name,o)});zt(s,c);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await n.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:c,globalSnapshot:i});return u&&Wt(s,n,u,!1,{initiator:"loadRemote",id:a}).catch(()=>{}),{...e,remoteSnapshot:c}}return e}}}function Co(e){const t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Kt(e,t,r,o,n={},s){const{value:a}=W(e,ne(t)),c=s||a;if(c&&!lt(c)&&(r(c,t,o),c.remotesInfo)){const i=Object.keys(c.remotesInfo);for(const l of i){if(n[l])continue;n[l]=!0;const u=Co(l),f=c.remotesInfo[l];Kt(e,{name:u.name,version:f.matchedVersion},r,!1,n,void 0)}}}const ve=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fo(e,t,r,o,n){const s=[],a=[],c=[],i=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:m}=f;if(Kt(o,r,(d,p,E)=>{var I;let y;if(E)y=f;else if(Array.isArray(m)){const w=m.find($=>$.nameOrAlias===p.name||$.nameOrAlias===p.alias);if(!w)return;y=Vt(w)}else if(m===!0)y=f;else return;const R=Pe(d,_t(d).url);R&&c.push({name:p.name,moduleInfo:{name:p.name,entry:R,type:"remoteEntryType"in d?d.remoteEntryType:"global",entryGlobalName:"globalName"in d?d.globalName:p.name,shareScope:"",version:"version"in d?d.version:void 0},url:R});let g="modules"in d?d.modules:[];const _=No(y.exposes);_.length&&"modules"in d&&(g=(I=d==null?void 0:d.modules)==null?void 0:I.reduce((w,$)=>((_==null?void 0:_.indexOf($.moduleName))!==-1&&w.push($),w),[]));function b(w){const $=w.map(k=>Pe(d,k));return y.filter?$.filter(y.filter):$}if(g){const w=g.length;for(let $=0;$<w;$++){const k=g[$],we=`${p.name}/${k.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:k.moduleName==="."?p.name:we,name:p.name,remoteSnapshot:d,preloadConfig:y,remote:p,origin:e}),!Or(we)&&(y.resourceCategory==="all"?(s.push(...b(k.assets.css.async)),s.push(...b(k.assets.css.sync)),a.push(...b(k.assets.js.async)),a.push(...b(k.assets.js.sync))):y.resourceCategory==="sync"&&(s.push(...b(k.assets.css.sync)),a.push(...b(k.assets.js.sync))),Lr(we))}}},!0,{},n),n.shared&&n.shared.length>0){const d=(p,E)=>{const{shared:y}=Re(e.shareScopeMap,E.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};y&&typeof y.lib=="function"&&(E.assets.js.sync.forEach(R=>{i.add(R)}),E.assets.css.sync.forEach(R=>{l.add(R)}))};n.shared.forEach(p=>{var R;const E=(R=u.shared)==null?void 0:R[p.sharedName];if(!E)return;const y=p.version?E.find(g=>g.version===p.version):E;y&&Rt(y).forEach(g=>{d(g,p)})})}const h=a.filter(d=>!i.has(d)&&!ve("script",d));return{cssAssets:s.filter(d=>!l.has(d)&&!ve("link",d)),jsAssetsWithoutEntry:h,entryAssets:c.filter(d=>!ve("script",d.url))}}const Do=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:o,remote:n,globalSnapshot:s,remoteSnapshot:a}=e;return U?De(n)&&gt(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(zt(o,a),Fo(t,r,o,s,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Jt(e,t){const r=ye({name:t.name,version:t.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&W(r.remotesInfo,e.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:qe(),remoteSnapshot:ye({name:e.name,version:o.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:qe(),remoteSnapshot:ye({name:e.name,version:"version"in e?e.version:void 0})}}var Ho=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new H({beforeLoadRemoteSnapshot:new T("beforeLoadRemoteSnapshot"),loadSnapshot:new x("loadGlobalSnapshot"),loadRemoteSnapshot:new x("loadRemoteSnapshot"),afterLoadSnapshot:new x("afterLoadSnapshot")}),this.manifestLoading=be.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:r="loadRemote"}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e,origin:this.HostInstance});let n=ye({name:this.HostInstance.options.name,version:this.HostInstance.options.version});n||(n={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},Pr({[this.HostInstance.options.name]:n})),n&&"remotesInfo"in n&&!W(n.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(n.remotesInfo={...n==null?void 0:n.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:a,globalSnapshot:c}=this.getGlobalRemoteInfo(e),{remoteSnapshot:i,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:a,globalSnapshot:c});let u,f;if(i)if(lt(i)){const m=U?i.remoteEntry:i.ssrRemoteEntry||i.remoteEntry||"",h=await this.loadManifestSnapshot(m,e,{},{initiator:r,id:t||e.name}),d=ze({...e,entry:m},h);u=h,f=d}else{const{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:i,from:"global"});u=m,f=l}else if(De(e)){const m=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),h=ze(e,m);u=m,f=h}else S(Ct,M,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,D(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:f}}getGlobalRemoteInfo(e){return Jt(e,this.HostInstance)}async getManifestJson(e,t,r,o){return(async()=>{const s=K(t);let a=this.manifestCache.get(e);if(a)return a;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{},s,o?{...o,url:e,resourceType:"manifest"}:void 0);(!i||!(i instanceof Response))&&(i=await fetch(e,{})),a=await i.json()}catch(i){a=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),a||(delete this.manifestLoading[e],S(kt,M,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,D(this.HostInstance.options)))}const c=[!a.metaData&&"metaData",!a.exposes&&"exposes",!a.shared&&"shared"].filter(Boolean);return c.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:new Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(", ")}.`),from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),c.length>0&&S(Ht,M,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(",")},void 0,D(this.HostInstance.options)),this.manifestCache.set(e,a),a})()}async loadManifestSnapshot(e,t,r,o){const n=async()=>{const s=await this.getManifestJson(e,t,r,o),a=ir(s,{version:e}),{remoteSnapshot:c}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:a,manifestUrl:e,from:"manifest"});return c};return this.manifestLoading[e]||(this.manifestLoading[e]=n().then(s=>s)),this.manifestLoading[e]}},xo=class{constructor(){this.hooks=new H({})}},Go=class{constructor(e){this.hooks=new H({beforeRegisterShare:new X("beforeRegisterShare"),afterResolve:new x("afterResolve"),beforeLoadShare:new x("beforeLoadShare"),loadShare:new T,afterLoadShare:new P("afterLoadShare"),errorLoadShare:new P("errorLoadShare"),resolveShare:new X("resolveShare"),initContainerShareScopeMap:new X("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:r,selectedShared:o}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:r,selectedShared:o,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(n){oe(n)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:r,error:o,recovered:n}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:o,recovered:n})}catch(s){oe(s)}}registerShared(e,t){const{newShareInfos:r,allShareInfos:o}=Nt(e,t);return Object.keys(r).forEach(n=>{r[n].forEach(s=>{s.scope.forEach(a=>{var c;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:n,shared:s}),(c=this.shareScopeMap[a])!=null&&c[n]||this.setShared({pkgName:n,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:o}}async loadShare(e,t){const{host:r}=this,o=Qe({pkgName:e,extraOptions:t,shareInfos:r.options.shared});let n=o;try{o!=null&&o.scope&&await Promise.all(o.scope.map(async i=>{await Promise.all(this.initializeSharing(i,{strategy:o.strategy}))})),n=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r})).shareInfo,C(n,`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.`);const s=n,{shared:a,useTreesShaking:c}=Re(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(a){const i=ue(a,c);if(i.lib)return z(i,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:a}),i.lib;if(i.loading&&!i.loaded){const l=await i.loading;return i.loaded=!0,i.lib||(i.lib=l),z(i,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:a}),l}else{const u=(async()=>{const m=await i.get();return z(i,r.options.name),i.loaded=!0,i.lib=m,m})();this.setShared({pkgName:e,loaded:!1,shared:a,from:r.options.name,lib:null,loading:u,treeShaking:c?i:void 0});const f=await u;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:a}),f}}else{if(t!=null&&t.customShareInfo)return this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,recovered:!0}),!1;const i=se(s.treeShaking),l=ue(s,i),f=(async()=>{const h=await l.get();l.lib=h,l.loaded=!0,z(l,r.options.name);const{shared:d,useTreesShaking:p}=Re(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare)||{};if(d){const E=ue(d,p);E.lib=h,E.loaded=!0,d.from=s.from}return h})();this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:f,treeShaking:i?l:void 0});const m=await f;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:s}),m}}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:n,error:s}),s}}initializeSharing(e=ae,t){const{host:r}=this,o=t==null?void 0:t.from,n=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const a=[];if(o!=="build"){const{initTokens:m}=this;s||(s=[]);let h=m[e];if(h||(h=m[e]={from:this.host.name}),s.indexOf(h)>=0)return a;s.push(h)}const c=this.shareScopeMap,i=r.options.name;c[e]||(c[e]={});const l=c[e],u=(m,h)=>{var g;const{version:d,eager:p}=h;l[m]=l[m]||{};const E=l[m],y=E[d]&&ue(E[d]),R=!!(y&&("eager"in y&&y.eager||"shareConfig"in y&&((g=y.shareConfig)!=null&&g.eager)));(!y||y.strategy!=="loaded-first"&&!y.loaded&&(!p!=!R?p:i>E[d].from))&&(E[d]=h)},f=async m=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:m});let d;try{d=await h.getEntry()}catch(p){if(d=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:m,error:p,from:"runtime",lifecycle:"beforeLoadShare",remote:h.remoteInfo,origin:r}),!d)return}finally{d!=null&&d.init&&!h.initing&&(h.remoteEntryExports=d,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(m=>{r.options.shared[m].forEach(h=>{h.scope.includes(e)&&u(m,h)})}),(r.options.shareStrategy==="version-first"||n==="version-first")&&r.options.remotes.forEach(m=>{m.shareScope===e&&a.push(f(m.name))}),a}loadShareSync(e,t){const{host:r}=this,o=Qe({pkgName:e,extraOptions:t,shareInfos:r.options.shared});try{o!=null&&o.scope&&o.scope.forEach(s=>{this.initializeSharing(s,{strategy:o.strategy})});const{shared:n}=Re(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(n){if(typeof n.lib=="function")return z(n,r.options.name),n.loaded||(n.loaded=!0,n.from===r.options.name&&(o.loaded=!0)),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),n.lib;if(typeof n.get=="function"){const s=n.get();if(!(s instanceof Promise))return z(n,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:s,shared:n}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),s}}if(o.lib)return o.loaded||(o.loaded=!0),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib;if(o.get){const s=o.get();return s instanceof Promise&&S((t==null?void 0:t.from)==="build"?Lt:Le,M,{hostName:r.options.name,sharedPkgName:e},void 0,D(r.options)),o.lib=s,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib}S(Le,M,{hostName:r.options.name,sharedPkgName:e},void 0,D(r.options))}catch(n){throw this.emitErrorLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,error:n}),n}}initShareScopeMap(e,t,r={}){const{host:o}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:o.options,origin:o,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:o,loading:n,loaded:s,get:a,treeShaking:c}){const{version:i,scope:l="default",...u}=t,f=Array.isArray(l)?l:[l],m=h=>{const d=(E,y,R)=>{R&&!E[y]&&(E[y]=R)},p=c?h.treeShaking:h;d(p,"loaded",s),d(p,"loading",n),d(p,"get",a)};f.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][i]||(this.shareScopeMap[h][e][i]={version:i,scope:[h],...u,lib:o});const d=this.shareScopeMap[h][e][i];m(d),r&&d.from!==r&&(d.from=r)})}_setGlobalShareScopeMap(e){const t=At(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},Uo=class{constructor(){this.shareScopeMap={},this.hooks=new H({afterResolve:new x("afterResolve")})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}loadShareSync(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},Bo=class{constructor(e){this.hooks=new H({beforeRegisterRemote:new X("beforeRegisterRemote"),registerRemote:new X("registerRemote"),beforeRequest:new x("beforeRequest"),afterMatchRemote:new T("afterMatchRemote"),onLoad:new T("onLoad"),afterLoadRemote:new T("afterLoadRemote"),handlePreloadModule:new P("handlePreloadModule"),errorLoadRemote:new T("errorLoadRemote"),beforePreloadRemote:new T("beforePreloadRemote"),generatePreloadAssets:new T("generatePreloadAssets"),afterPreloadRemote:new T("afterPreloadRemote"),loadEntry:new T}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,o)=>(this.registerRemote(o,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:o}=t,{name:n,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:o},s&&e.startsWith(n)){const a=e.replace(n,s);this.idToRemoteMap[a]={name:r.name,expose:o};return}if(s&&e.startsWith(s)){const a=e.replace(s,n);this.idToRemoteMap[a]={name:r.name,expose:o}}}async loadRemote(e,t){const{host:r}=this,o=et(r.options.remotes,e);let n=e,s=o==null?void 0:o.expose,a=o?K(o.remote):void 0,c;try{const{loadFactory:i=!0}=t||{loadFactory:!0},{module:l,moduleOptions:u,remoteMatchInfo:f}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:m,remote:h,expose:d,id:p,remoteSnapshot:E}=f;n=p,s=d,a=K(h);const y=await l.get(p,d,t,E),R=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:m,expose:d,exposeModule:i?y:void 0,exposeModuleFactory:i?void 0:y,remote:h,options:u,moduleInstance:l,origin:r});return this.setIdToRemoteMap(e,f),c={id:n,expose:s,remote:a,options:t,origin:r},typeof R=="function"?R:y}catch(i){const{from:l="runtime"}=t||{from:"runtime"};let u;try{u=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:l,lifecycle:"onLoad",expose:s,remote:a,origin:r})}catch(f){throw c={id:n,expose:s,remote:a,options:t,error:f,origin:r},f}if(!u)throw c={id:n,expose:s,remote:a,options:t,error:i,origin:r},i;return c={id:n,expose:s,remote:a,options:t,error:i,origin:r,recovered:!0},u}finally{c&&await this.hooks.lifecycle.afterLoadRemote.emit(c)}}async preloadRemote(e){const{host:t}=this,r=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const o=vo(t.options.remotes,e),n=c=>{const{preloadConfig:i,remote:l}=c,u=i.exposes||[];return u.length?u.map(f=>({ops:{...c,preloadConfig:{...i,exposes:[f]}},id:Be(l.name,f)})):[{ops:c,id:`${l.name}/*`}]};let s;await Promise.all(o.flatMap(n).map(async c=>{const{ops:i,id:l}=c,{remote:u,preloadConfig:f}=i,m=K(u);try{const{globalSnapshot:h,remoteSnapshot:d}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:u,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:i,remote:u,remoteInfo:m,globalSnapshot:h,remoteSnapshot:d});if(!p)return;const E=await Wt(m,t,p,!0,{initiator:"preloadRemote",id:l});r.push({remote:u,remoteInfo:m,preloadConfig:f,id:l,results:E})}catch(h){r.push({remote:u,remoteInfo:m,preloadConfig:f,id:l,results:[{url:m.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(m.entry)?"manifest":"remoteEntry",initiator:"preloadRemote",id:l,error:h}]})}}));const a=r.flatMap(c=>c.results.filter(i=>i.status==="error"||i.status==="timeout"));if(a.length>0&&(s=new Error(`preloadRemote failed to load ${a.length} resource(s).`),Object.assign(s,{results:r,failedResults:a})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:r,error:s}),s)throw s}registerRemotes(e,t){const{host:r}=this;e.forEach(o=>{this.registerRemote(o,r.options.remotes,{force:t==null?void 0:t.force})})}initRawContainer(e,t,r){const{host:o}=this,n=new tt({host:o,remoteInfo:K({name:e,entry:t})});return n.remoteEntryExports=r,o.moduleCache.set(e,n),n}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!o)throw h}const{id:n}=o,s=et(t.options.remotes,n);if(!s)try{S(Ot,M,{hostName:t.options.name,requestId:n},void 0,D(t.options))}catch(h){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:n,options:t.options,error:h,origin:t}),h}const{remote:a}=s,c=K(a);await this.hooks.lifecycle.afterMatchRemote.emit({id:n,...s,options:t.options,remoteInfo:c,origin:t});const i=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:n,...s,options:t.options,origin:t,remoteInfo:c}),{remote:l,expose:u}=i;C(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);let f=t.moduleCache.get(l.name);const m={host:t,remoteInfo:c};return f||(f=new tt(m),t.moduleCache.set(l.name,f)),{module:f,moduleOptions:m,remoteMatchInfo:i}}registerRemote(e,t,r){const{host:o}=this,n=()=>{if(e.alias){const a=t.find(c=>{var i;return e.alias&&(c.name.startsWith(e.alias)||((i=c.alias)==null?void 0:i.startsWith(e.alias)))});C(!a,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${a&&a.name} name or alias`)}"entry"in e&&U&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ae),e.type||(e.type=vt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const s=t.find(a=>a.name===e.name);if(!s)n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const a=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),at(a.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:o}=e,n=r.options.remotes.findIndex(i=>i.name===o);n!==-1&&r.options.remotes.splice(n,1);const s=W(N.__FEDERATION__.moduleInfo,ne(e)).key;delete N.__FEDERATION__.moduleInfo[s],"entry"in e&&(r.snapshotHandler.manifestCache.delete(e.entry),delete be.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);const{hostGlobalSnapshot:a}=Jt(e,r);if(a){const i=a&&"remotesInfo"in a&&a.remotesInfo&&W(a.remotesInfo,e.name).key;i&&delete a.remotesInfo[i]}const c=r.moduleCache.get(e.name);if(c){const i=c.remoteInfo,l=i.entryGlobalName;N[l]&&((t=Object.getOwnPropertyDescriptor(N,l))!=null&&t.configurable?delete N[l]:N[l]=void 0);const u=Ce(c.remoteInfo);J[u]&&delete J[u];let f=i.buildVersion?it(i.name,i.buildVersion):i.name;const m=N.__FEDERATION__.__INSTANCES__.findIndex(h=>i.buildVersion?h.options.id===f:h.name===f);if(m!==-1){const h=N.__FEDERATION__.__INSTANCES__[m];f=h.options.id||f;const d=At();let p=!0;const E=[];Object.keys(d).forEach(y=>{const R=d[y];R&&Object.keys(R).forEach(g=>{const _=R[g];_&&Object.keys(_).forEach(b=>{const I=_[b];I&&Object.keys(I).forEach(w=>{const $=I[w];$&&typeof $=="object"&&$.from===i.name&&($.loaded||$.loading?($.useIn=$.useIn.filter(k=>k!==i.name),$.useIn.length?p=!1:E.push([y,g,b,w])):E.push([y,g,b,w]))})})})}),p&&(h.shareScopeMap={},delete d[f]),E.forEach(([y,R,g,_])=>{var b,I,w;(w=(I=(b=d[y])==null?void 0:b[R])==null?void 0:I[g])==null||delete w[_]}),N.__FEDERATION__.__INSTANCES__.splice(m,1)}r.moduleCache.delete(e.name)}}catch(r){Oe.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};const jo=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Ne=typeof FEDERATION_OPTIMIZE_NO_REMOTE=="boolean"?!FEDERATION_OPTIMIZE_NO_REMOTE:!0,rt=typeof FEDERATION_OPTIMIZE_NO_SHARED=="boolean"?!FEDERATION_OPTIMIZE_NO_SHARED:!0;var Vo=class{constructor(e){this.hooks=new H({beforeInit:new X("beforeInit"),init:new P,beforeInitContainer:new x("beforeInitContainer"),initContainer:new x("initContainer")}),this.version="2.8.2",this.moduleCache=new Map,this.loaderHook=new H({getModuleInfo:new P,createScript:new P,createLink:new P,fetch:new T,loadEntryError:new T,afterLoadEntry:new T("afterLoadEntry"),beforeInitRemote:new T("beforeInitRemote"),afterInitRemote:new T("afterInitRemote"),beforeGetExpose:new T("beforeGetExpose"),afterGetExpose:new T("afterGetExpose"),beforeExecuteFactory:new T("beforeExecuteFactory"),afterExecuteFactory:new T("afterExecuteFactory"),getModuleFactory:new T}),this.bridgeHook=new H({beforeBridgeRender:new P,afterBridgeRender:new P,beforeBridgeDestroy:new P,afterBridgeDestroy:new P});const t=Ne&&jo?[Lo(),Do()]:[],r={id:Io(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:U};this.name=e.name,this.options=r,this.snapshotHandler=Ne?new Ho(this):new xo,this.sharedHandler=rt?new Go(this):new Uo,this.remoteHandler=Ne?new Bo(this):new Oo,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&S(Et(Ft,M)),this.registerPlugins(e.plugins);const t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ae,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){return this.remoteHandler.initRawContainer(e,t,r)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){const r=rt?Nt(e,t).allShareInfos:{},{userOptions:o,options:n}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(n,o),{allShareInfos:a}=this.sharedHandler.registerShared(n,o),c=[...n.plugins];o.plugins&&o.plugins.forEach(l=>{c.includes(l)||c.push(l)});const i={...e,...t,plugins:c,remotes:s,shared:a,id:o.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:i}),i}registerPlugins(e){const t=$o(e,this);this.options.plugins=this.options.plugins.reduce((r,o)=>(o&&r&&!r.find(n=>n.name===o.name)&&r.push(o),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};let Wo=null;function Zt(e){return Wo}Ar(Vo);function Xt(e,t){const r=o=>{if(!o.startsWith("/"))return o;const n=o.length>1&&o.endsWith("/"),s=`${t}/${o}`.replace(/\/+/g,"/").replace(/\/$/,"")||"/";return n?`${s}/`:s};return e.map(o=>{const n={...o,path:r(o.path)};return typeof o.redirect=="string"?n.redirect=r(o.redirect):o.redirect&&typeof o.redirect=="object"&&"path"in o.redirect&&typeof o.redirect.path=="string"&&(n.redirect={...o.redirect,path:r(o.redirect.path)}),o.children&&o.children.length>0&&(n.children=Xt(o.children,t)),n})}function qo(e){const t=e.replace(/\/+$/,""),r=s=>s.startsWith("/")&&s!==t&&!s.startsWith(t+"/"),o=s=>`${t}${s}`.replace(/\/+/g,"/"),n=s=>typeof s=="string"?r(s)?o(s):s:"path"in s&&typeof s.path=="string"&&r(s.path)?{...s,path:o(s.path)}:s;return s=>{const a=s.push.bind(s),c=s.replace.bind(s),i=s.resolve.bind(s);s.push=l=>a(n(l)),s.replace=l=>c(n(l)),s.resolve=(l,...u)=>i(n(l),...u)}}function zo(e){const{router:t,basename:r,memoryRoute:o,hashRoute:n}=e,s=t.getRoutes().sort((h,d)=>h.path.split("/").filter(p=>p).length-d.path.split("/").filter(p=>p).length),a=new Map,c=new Set;s.forEach(h=>{const d=a.get(h.path)||[];d.push(h),a.set(h.path,d)});const i=(h,d)=>`${h}/${d}`.replace(/\/+/g,"/").replace(/\/$/,"")||"/",l=(h,d="")=>{if(!h.children||h.children.length===0)return h;for(let p=0;p<h.children.length;p++){const E=h.children[p],y=i(d,E.path),g=(a.get(y)||[]).find(_=>!c.has(_)&&_!==h&&(E.name==null||_.name===E.name));if(g){const _={...g,path:E.path};h.children[p]=_,c.add(g),l(_,y)}}return h};let u=[];for(const h of s)if(!c.has(h)){const d=l(h,h.path);c.add(h),u.push(d)}let f,m;return o?f=de.createMemoryHistory(r):n?(f=de.createWebHashHistory(),r&&(u=Xt(u,r),m=qo(r))):f=de.createWebHistory(r),{history:f,routes:u,patchRouter:m}}function Ko(e){const t=new Map,r=Zt();return()=>({__APP_VERSION__:"2.8.2",async render(o){var d,p,E,y,R,g;F.debug("createBridgeComponent render Info",o);const{moduleName:n,dom:s,basename:a,memoryRoute:c,hashRoute:i,...l}=o,u=Qt.createApp(e.rootComponent,l);t.set(s,u);const f=await((E=(p=(d=r==null?void 0:r.bridgeHook)==null?void 0:d.lifecycle)==null?void 0:p.beforeBridgeRender)==null?void 0:E.emit(o)),m=f&&typeof f=="object"&&(f!=null&&f.extraProps)?f==null?void 0:f.extraProps:{},h=e.appOptions({app:u,basename:a,memoryRoute:c,hashRoute:i,...l,...m});if(h!=null&&h.router){const{history:_,routes:b,patchRouter:I}=zo({router:h.router,basename:o.basename,memoryRoute:o.memoryRoute,hashRoute:o.hashRoute}),w=de.createRouter({...h.router.options,history:_,routes:b});I&&I(w),h.afterRouterCreate&&h.afterRouterCreate(w),F.debug("createBridgeComponent render router info>>>",{moduleName:n,router:w}),c&&await w.push(c.entryPath),u.use(w)}u.mount(s),(g=(R=(y=r==null?void 0:r.bridgeHook)==null?void 0:y.lifecycle)==null?void 0:R.afterBridgeRender)==null||g.emit(o)},destroy(o){var s,a,c,i,l,u;F.debug("createBridgeComponent destroy Info",o);const n=t.get(o==null?void 0:o.dom);(c=(a=(s=r==null?void 0:r.bridgeHook)==null?void 0:s.lifecycle)==null?void 0:a.beforeBridgeDestroy)==null||c.emit(o),n==null||n.unmount(),(u=(l=(i=r==null?void 0:r.bridgeHook)==null?void 0:i.lifecycle)==null?void 0:l.afterBridgeDestroy)==null||u.emit(o)}})}function Jo(){const e=new PopStateEvent("popstate",{state:window.history.state});window.dispatchEvent(e)}const Zo=v.defineComponent({name:"RemoteApp",props:{moduleName:String,basename:String,memoryRoute:Object,hashRoute:Boolean,providerInfo:Function,rootAttrs:Object},inheritAttrs:!1,setup(e){const t=v.ref(null),r=v.ref(null),o=v.ref(""),n=v.ref(!1),s=v.ref(!1),a=v.ref(!1),c=Fe.useRoute(),i=Zt(),l=v.useAttrs(),u=()=>({name:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute}),f=async()=>{var y,R,g,_,b,I,w;if(!t.value||n.value)return;const d=(y=e.providerInfo)==null?void 0:y.call(e);r.value=d;let p={...l,moduleName:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute};F.debug("createRemoteAppComponent LazyComponent render >>>",p);const E=await((_=(g=(R=i==null?void 0:i.bridgeHook)==null?void 0:R.lifecycle)==null?void 0:g.beforeBridgeRender)==null?void 0:_.emit(p))||{};p={...p,...E.extraProps},d.render(p),n.value=!0,(w=(I=(b=i==null?void 0:i.bridgeHook)==null?void 0:b.lifecycle)==null?void 0:I.afterBridgeRender)==null||w.emit(p)},m=()=>{var E,y,R,g,_,b;const d=r.value;if(!d||!n.value)return;F.debug("createRemoteAppComponent LazyComponent destroy >>>",{...e});const p=u();(R=(y=(E=i==null?void 0:i.bridgeHook)==null?void 0:E.lifecycle)==null?void 0:y.beforeBridgeDestroy)==null||R.emit(p),d.destroy({dom:t.value}),r.value=null,n.value=!1,(b=(_=(g=i==null?void 0:i.bridgeHook)==null?void 0:g.lifecycle)==null?void 0:_.afterBridgeDestroy)==null||b.emit(p)},h=v.watch(()=>c==null?void 0:c.path,d=>{s.value&&o.value!==""&&o.value!==d&&(F.debug("createRemoteAppComponent dispatchPopstateEnv >>>",{...e,pathname:c.path}),Jo()),o.value=d});return v.onMounted(()=>{s.value=!0,f()}),v.onActivated(async()=>{s.value=!0,a.value&&(a.value=!1,await v.nextTick(),f())}),v.onDeactivated(()=>{s.value=!1,a.value=!0,m()}),v.onBeforeUnmount(()=>{h(),m()}),()=>v.createVNode("div",v.mergeProps(e.rootAttrs||{},{ref:t}),null)}});function Yt(e){return v.defineAsyncComponent({__APP_VERSION__:"2.8.2",...e.asyncComponentOptions,loader:async()=>{var i,l;const t=Fe.useRoute();let r="/";const o=(l=(i=t==null?void 0:t.matched)==null?void 0:i[0])==null?void 0:l.path;o&&(o.endsWith("/:pathMatch(.*)*")?r=o.replace("/:pathMatch(.*)*",""):r=t.matched[0].path);const n=(e==null?void 0:e.export)||"default";F.debug("createRemoteAppComponent LazyComponent create >>>",{basename:r,info:e});const s=await e.loader(),a=s&&s[Symbol.for("mf_module_id")],c=s[n];if(F.debug("createRemoteAppComponent LazyComponent loadRemote info >>>",{moduleName:a,module:s,exportName:n,basename:r,route:t}),n in s&&typeof c=="function")return{render(){return v.h(Zo,{moduleName:a,providerInfo:c,basename:r,rootAttrs:e.rootAttrs,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute})}};throw new Error("module not found")}})}function Xo(e){return F.warn("createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"),Yt(e)}exports.createBridgeComponent=Ko;exports.createRemoteAppComponent=Yt;exports.createRemoteComponent=Xo;