@module-federation/bridge-vue3 2.5.0 → 2.5.1

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
@@ -4,5 +4,5 @@ ${r.slice(0,5).join(`
4
4
  `)}`:void 0}catch{return}}var it=class{constructor(e,t=Z){this.prefix=e,this.delegate=t??Z}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??Z}emit(e,t){const r=this.delegate,o=Te()?or():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=Z[i];if(typeof c=="function"){c.call(Z,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){Te()&&this.emit("debug",e)}};function at(e){return new it(e)}function nr(e){const t=new it(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}nr(tr);async function ct(e,t){try{return await e()}catch(r){ot(r);return}}function Ae(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function lt(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&&Ae(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&&Ae(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 d=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.)`);d.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(d))}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,ct(()=>{const{needDeleteScript:d=!0}=e;d&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const d=l(u);if(d instanceof Promise){const h=await d;return f(),h}return f(),d}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 sr(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&&Ae(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,ct(()=>{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 ir(e,t){const{attrs:r={},createScriptHook:o}=t;return new Promise((n,s)=>{const{script:i,needAttach:c}=lt({url:e,cb:n,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:o,needDeleteScript:!0});c&&document.head.appendChild(i)})}const ae=new Map;function W(e){if(!e)throw new Error("import specifier is required");if(ae.has(e))return ae.get(e);const t=new Function("name","return import(name)")(e).then(r=>r).catch(r=>{throw console.error(`Error importing module ${e}:`,r),ae.delete(e),r});return ae.set(e,t),t}const ut=async()=>{const e=await W("node-fetch");return e.default||e},ar=async(e,t,r)=>{const n=await((s,i)=>r.lifecycle.fetch.emit(s,i))(e,t||{});return!n||!(n instanceof Response)?(typeof fetch>"u"?await ut():fetch)(e,t||{}):n},cr=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)=>ar(c,a,o):typeof fetch>"u"?ut():fetch,i=async(c,a)=>{var l;try{const f=await(await c(a.href)).text(),[d,h]=await Promise.all([W("path"),W("vm")]),m={exports:{},module:{exports:{}}},p=a.pathname.split("/").slice(0,-1).join("/"),y=d.basename(a.pathname),E=new h.Script(`(function(exports, module, require, __dirname, __filename) {${f}
5
5
  })`,{filename:y,importModuleDynamically:((l=h.constants)==null?void 0:l.USE_MAIN_CONTEXT_DEFAULT_LOADER)??W});let _;_=(await W("node:module")).createRequire(a.protocol==="file:"||a.protocol==="node:"?a.href:d.join(process.cwd(),"__mf_require_base__.js")),E.runInThisContext()(m.exports,m.module,_,p,y);const g=m.module.exports||m.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 Pe(n.href,{fetch:c,vm:await W("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"))},lr=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t)=>new Promise((r,o)=>{cr(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")},be=new Map;async function Pe(e,t){if(be.has(e))return be.get(e);const{fetch:r,vm:o}=t,n=await(await r(e)).text(),s=new o.SourceTextModule(n,{importModuleDynamically:async(i,c)=>{const a=new URL(i,e).href;return Pe(a,t)}});return be.set(e,s),await s.link(async i=>{const c=new URL(i,e).href;return await Pe(c,t)}),s}const F=at("[ Module Federation Bridge Vue3 ]"),ur=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,ft=(e,t,r,o)=>{const n=[`${[t[e]]} #${e}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(ur(e)),o&&n.push(`Original Error Message:
6
6
  ${o}`),n.join(`
7
- `)};function fr(e,t,r,o,n,s){return o(ft(e,t,r,n))}const G="[ Federation Runtime ]",ke=at(G);function C(e,t,r,o,n){e||b(t)}function b(e,t,r,o,n){if(t!==void 0)return fr(e,t,r??{},i=>{throw new Error(`${G}: ${i}`)},o);const s=e;throw s instanceof Error?(s.message.startsWith(G)||(s.message=`${G}: ${s.message}`),s):new Error(`${G}: ${s}`)}function re(e){e instanceof Error&&(e.message.startsWith(G)||(e.message=`${G}: ${e.message}`)),ke.warn(e)}function hr(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function Ee(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Ce(e){return typeof e.entry<"u"}function ht(e){return!e.entry.includes(".json")}function Fe(e){return e&&typeof e=="object"}const dr=Object.prototype.toString;function mr(e){return dr.call(e)==="[object Object]"}function dt(e){return Array.isArray(e)?e:[e]}function mt(e){const t={url:"",type:"global",globalName:""};return x||tt()||!("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 pr=(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,L=(()=>{try{return document.defaultView}catch{return N}})(),oe=L;function fe(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function he(e,t){return Object.hasOwnProperty.call(e,t)}he(N,"__GLOBAL_LOADING_REMOTE_ENTRY__")||fe(N,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const q=N.__GLOBAL_LOADING_REMOTE_ENTRY__;function pt(e){var t,r,o,n,s,i;he(e,"__VMOK__")&&!he(e,"__FEDERATION__")&&fe(e,"__FEDERATION__",e.__VMOK__),he(e,"__FEDERATION__")||(fe(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),fe(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)}pt(N);pt(L);function yr(e,t=Te()){t&&(N.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.5.0")}function X(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 b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const je=()=>L.__FEDERATION__.moduleInfo,Er=(e,t)=>{const r=X(t,Ee(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=Ee(n),i=X(L.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===o)return i}},de=e=>Er(e,L.__FEDERATION__.moduleInfo),We=(e,t)=>{const r=Ee(e);return L.__FEDERATION__.moduleInfo[r]=t,L.__FEDERATION__.moduleInfo},gr=e=>(L.__FEDERATION__.moduleInfo={...L.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete L.__FEDERATION__.moduleInfo[r]}),He=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:N[r]}},_r=()=>L.__FEDERATION__.__GLOBAL_PLUGIN__,Rr=e=>N.__FEDERATION__.__PRELOADED_MAP__.get(e),br=e=>N.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),qe="[0-9A-Za-z-]+",De=`(?:\\+(${qe}(?:\\.${qe})*))`,te="0|[1-9]\\d*",me="[0-9]+",yt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Ke=`(?:${me}|${yt})`,Sr=`(?:-?(${Ke}(?:\\.${Ke})*))`,ze=`(?:${te}|${yt})`,Et=`(?:-(${ze}(?:\\.${ze})*))`,Se=`${te}|x|X|\\*`,Y=`[v=\\s]*(${Se})(?:\\.(${Se})(?:\\.(${Se})(?:${Et})?${De}?)?)?`,wr=`^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`,$r=`[v=\\s]*${`(${me})\\.(${me})\\.(${me})`}${Sr}?${De}?`,xe="((?:<|>)?=?)",Ir=`(\\s*)${xe}\\s*(${$r}|${Y})`,gt="(?:~>?)",Nr=`(\\s*)${gt}\\s+`,_t="(?:\\^)",Tr=`(\\s*)${_t}\\s+`,vr="(<|>)?=?\\s*\\*",Ar=`^${_t}${Y}$`,Pr=`v?${`(${te})\\.(${te})\\.(${te})`}${Et}?${De}?`,kr=`^${gt}${Y}$`,Lr=`^${xe}\\s*${Y}$`,Mr=`^${xe}\\s*(${Pr})$|^$`,Or="^\\s*>=\\s*0.0.0\\s*$";function O(e){return new RegExp(e)}function T(e){return!e||e.toLowerCase()==="x"||e==="*"}function Rt(...e){return t=>e.reduce((r,o)=>o(r),t)}function Je(e){return e.match(O(Mr))}function Xe(e,t,r,o){const n=`${e}.${t}.${r}`;return o?`${n}-${o}`:n}function Cr(e){return e.replace(O(wr),(t,r,o,n,s,i,c,a,l,u,f,d)=>(T(o)?r="":T(n)?r=`>=${o}.0.0`:T(s)?r=`>=${o}.${n}.0`:r=`>=${r}`,T(l)?a="":T(u)?a=`<${Number(l)+1}.0.0-0`:T(f)?a=`<${l}.${Number(u)+1}.0-0`:d?a=`<=${l}.${u}.${f}-${d}`:a=`<=${a}`,`${r} ${a}`.trim()))}function Fr(e){return e.replace(O(Ir),"$1$2$3")}function Hr(e){return e.replace(O(Nr),"$1~")}function Dr(e){return e.replace(O(Tr),"$1^")}function xr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(Ar),(r,o,n,s,i)=>T(o)?"":T(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:T(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 Gr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(kr),(r,o,n,s,i)=>T(o)?"":T(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:T(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 Ur(e){return e.split(/\s+/).map(t=>t.trim().replace(O(Lr),(r,o,n,s,i,c)=>{const a=T(n),l=a||T(s),u=l||T(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 Br(e){return e.trim().replace(O(vr),"")}function Vr(e){return e.trim().replace(O(Or),"")}function pe(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function jr(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?pe(i,c):-1:1}return 0}function ce(e,t){return pe(e.major,t.major)||pe(e.minor,t.minor)||pe(e.patch,t.patch)||jr(e,t)}function we(e,t){return e.version===t.version}function Wr(e,t){switch(e.operator){case"":case"=":return we(e,t);case">":return ce(e,t)<0;case">=":return we(e,t)||ce(e,t)<0;case"<":return ce(e,t)>0;case"<=":return we(e,t)||ce(e,t)>0;case void 0:return!0;default:return!1}}function qr(e){return Rt(xr,Gr,Ur,Br)(e)}function Kr(e){return Rt(Cr,Fr,Hr,Dr)(e.trim()).split(/\s+/).join(" ")}function ee(e,t){if(!e)return!1;const r=Je(e);if(!r)return!1;const[,o,,n,s,i,c]=r,a={operator:o,version:Xe(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 d=Kr(f);if(!d.trim())return!0;const h=d.split(" ").map(y=>qr(y)).join(" ");if(!h.trim())return!0;const m=h.split(/\s+/).map(y=>Vr(y)).filter(Boolean);if(m.length===0)continue;let p=!0;for(const y of m){const E=Je(y);if(!E){p=!1;break}const[,_,,g,R,w,$]=E;if(!Wr({operator:_,version:Xe(g,R,w,$),major:g,minor:R,patch:w,preRelease:$==null?void 0:$.split(".")},a)){p=!1;break}}if(p)return!0}catch(d){console.error(`[semver] Error processing range part "${f}":`,d);continue}}return!1}const ie="default",bt="global";function zr(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(()=>{b(`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)&&b(`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 St(e,t){const r=t.shared||{},o=t.name,n=Object.keys(r).reduce((i,c)=>{const a=dt(r[c]);return i[c]=i[c]||[],a.forEach(l=>{i[c].push(zr(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 ne(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?Xr(e,t):!0:!1}function U(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!!ee(r(e),`<=${r(t)}`)}const se=(e,t)=>{const r=t||function(o,n){return U(o,n)};return Object.keys(e).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},ge=e=>!!e.loaded||typeof e.lib=="function",Jr=e=>!!e.loading,Xr=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(o=>r.includes(o)):!1};function Yr(e,t,r,o){const n=e[t][r];let s="",i=ne(o);const c=function(a,l){return i?n[a].treeShaking?n[l].treeShaking?!ge(n[a].treeShaking)&&U(a,l):!1:!0:!ge(n[a])&&U(a,l)};if(i){if(s=se(e[t][r],c),s)return{version:s,useTreesShaking:i};i=!1}return{version:se(e[t][r],c),useTreesShaking:i}}const V=e=>ge(e)||Jr(e);function Zr(e,t,r,o){const n=e[t][r];let s="",i=ne(o);const c=function(a,l){if(i){if(!n[a].treeShaking)return!0;if(!n[l].treeShaking)return!1;if(V(n[l].treeShaking))return V(n[a].treeShaking)?!!U(a,l):!0;if(V(n[a].treeShaking))return!1}return V(n[l])?V(n[a])?!!U(a,l):!0:V(n[a])?!1:U(a,l)};if(i){if(s=se(e[t][r],c),s)return{version:s,useTreesShaking:i};i=!1}return{version:se(e[t][r],c),useTreesShaking:i}}function Qr(e){return e==="loaded-first"?Zr:Yr}function ye(e,t,r,o){if(!e)return;const{shareConfig:n,scope:s=ie,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:d}=Qr(i)(e,l,t,c),h=()=>{const p=e[l][t][f];if(n.singleton){if(typeof u=="string"&&!ee(f,u)){const y=`Version ${f} from ${f&&p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;n.strictVersion?b(y):re(y)}return{shared:p,useTreesShaking:d}}else{if(u===!1||u==="*")return{shared:p,useTreesShaking:d};if(ee(f,u))return{shared:p,useTreesShaking:d};const y=ne(c);if(y){for(const[E,_]of Object.entries(e[l][t]))if(ne(_.treeShaking,c==null?void 0:c.usedExports)&&ee(E,u))return{shared:_,useTreesShaking:y}}for(const[E,_]of Object.entries(e[l][t]))if(ee(E,u))return{shared:_,useTreesShaking:!1}}},m={shareScopeMap:e,scope:l,pkgName:t,version:f,GlobalFederation:oe.__FEDERATION__,shareInfo:r,resolver:h};return(o.emit(m)||m).resolver()}}function wt(){return oe.__FEDERATION__.__SHARE__}function Ye(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[se(l,function(f,d){return!ge(l[f])&&U(f,d)})]},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,d]of Object.entries(u)){const h=l[f];i(h)&&i(d)?l[f]=c(h,d):d!==void 0&&(l[f]=d)}return l};return c(s(o[t]),r==null?void 0:r.customShareInfo)}const j=(e,t)=>{e.useIn||(e.useIn=[]),hr(e.useIn,t)};function le(e,t){return t&&e.treeShaking?e.treeShaking:e}function Ge(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function Ze(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 eo(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}const $t="RUNTIME-001",It="RUNTIME-002",Nt="RUNTIME-003",Tt="RUNTIME-004",vt="RUNTIME-005",Le="RUNTIME-006",At="RUNTIME-007",Ue="RUNTIME-008",to="RUNTIME-009",Pt="RUNTIME-010",kt="RUNTIME-011",ro="RUNTIME-012",Lt="RUNTIME-013",Mt="RUNTIME-014",Ot="RUNTIME-015",P={[$t]:"Failed to get remoteEntry exports.",[It]:'The remote entry interface does not contain "init"',[Nt]:"Failed to get manifest.",[Tt]:"Failed to locate remote.",[vt]:"Invalid loadShareSync function call from bundler runtime",[Le]:"Invalid loadShareSync function call from runtime",[At]:"Failed to get remote snapshot.",[Ue]:"Failed to load script resources.",[to]:"Please call createInstance first.",[Pt]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[kt]:"The remoteEntry URL is missing from the remote snapshot.",[ro]:'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.',[Lt]:"The manifest is not a valid Module Federation manifest.",[Mt]:"The remote does not expose the requested module.",[Ot]:"Remote container initialization failed."};({...P});const Ct=".then(callbacks[0]).catch(callbacks[1])";async function oo({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Ct}`)([r,o]):import(e).then(r).catch(o)}catch(n){b(`Failed to load ESM entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}async function no({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}")${Ct}`)([r,o])}catch(n){b(`Failed to load SystemJS entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}function Ft(e,t,r){const{remoteEntryKey:o,entryExports:n}=He(e,t);return n||b($t,P,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:o}),n}async function so({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 ir(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(()=>Ft(e,t,r),l=>{const u=l instanceof Error?l.message:String(l);b(Ue,P,{remoteName:e,resourceUrl:a},u)})}async function io({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 oo({entry:s,remoteEntryExports:t});case"system":return no({entry:s,remoteEntryExports:t});default:return so({entry:s,globalName:i,name:c,remoteInfo:e,loaderHook:r,getEntryUrl:o,resourceContext:n})}}async function ao({remoteInfo:e,loaderHook:t,resourceContext:r}){const{entry:o,entryGlobalName:n,name:s,type:i}=e,{entryExports:c}=He(s,n);return c||lr(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(()=>Ft(s,n,o)).catch(a=>{b(`Failed to load Node.js entry for remote "${s}" from "${o}". ${a instanceof Error?a.message:String(a)}`)})}function Me(e){const{entry:t,name:r}=e;return rt(r,t)}async function Be(e){const{origin:t,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,resourceContext:s,_inErrorHandling:i=!1}=e,c=Me(o);if(r)return r;if(!q[c]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;q[c]=a.emit({origin:t,loaderHook:l,remoteInfo:o,remoteEntryExports:r}).then(u=>u||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":x)?io({remoteInfo:o,remoteEntryExports:r,loaderHook:l,getEntryUrl:n,resourceContext:s}):ao({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=Me(o),d=u instanceof Error&&u.message.includes("ScriptExecutionError");if(u instanceof Error&&u.message.includes(Ue)&&!d&&!i){const h=p=>Be({...p,_inErrorHandling:!0}),m=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:h,origin:t,remoteInfo:o,remoteEntryExports:r,globalLoading:q,uniqueKey:f});if(m)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:m,recovered:!0}),m}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,error:u}),u})}return q[c]}function K(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||bt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ie}}function co(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function lo(e,t){const r=_r(),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 uo(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 H(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(uo))??[],shared:t}}}function Ht(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function fo(e,t){return t.map(r=>{const o=eo(e,r.nameOrAlias);return C(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&nt({remoteInfo:o,remotes:e})}`),{remote:o,preloadConfig:Ht(r)}})}function ho(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 B(e,t,r,o){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:o}}async function mo(e,t,r,o){const n=e.moduleCache.get(r.name),s=r.entry;if(n!=null&&n.remoteEntryExports)return B(o,s,"cached");try{if(!await Be({origin:e,remoteInfo:r,remoteEntryExports:n==null?void 0:n.remoteEntryExports,resourceContext:{...o,url:s}}))throw new Error(`Failed to load remoteEntry "${s}".`);return B(o,s,"success")}catch(i){return B(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}=sr({url:r,cb:()=>{i(B(n,r,a?"success":"cached"))},onErrorCallback:l=>{i(B(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 po({host:e,remoteInfo:t,url:r,attrs:o,context:n}){return new Promise(s=>{const{script:i,needAttach:c}=lt({url:r,cb:()=>{s(B(n,r,c?"success":"cached"))},onErrorCallback:a=>{s(B(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 Q(e,t){return{...e,resourceType:t}}function Dt(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(mo(t,e,u,Q(n,"remoteEntry")))}),o){const l={rel:"preload",as:"style"};s.forEach(u=>{a.push($e({host:t,remoteInfo:e,url:u,attrs:l,context:Q(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:Q(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:Q(n,"js")}))})}else{const l={fetchpriority:"high",type:(e==null?void 0:e.type)==="module"?"module":"text/javascript"};i.forEach(u=>{a.push(po({host:t,remoteInfo:e,url:u,attrs:l,context:Q(n,"js")}))})}}return Promise.all(a)}function yo(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 Eo(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 xt=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 Be({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:"loadRemote",id:Ge(this.remoteInfo.name,e),resourceType:"remoteEntry"}});return C(t,`remoteEntryExports is undefined
8
- ${nt(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}=Eo(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"&&b(It,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,H(this.host.options));try{await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions)}catch(l){b(Ot,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${l}`,H(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||b(Mt,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:yo(o)},void 0,H(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=pr(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)}}},A=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()}},I=class extends A{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 Gt(e,t){if(!Fe(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var z=class extends A{constructor(e){super(),this.onerror=b,this.type=e}emit(e){Fe(e)||b(`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(Gt(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){re(r),this.onerror(r)}return e}},D=class extends A{constructor(e){super(),this.onerror=b,this.type=e}emit(e){Fe(e)||b(`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=>(re(s),this.onerror(s),e),n=s=>{if(s!==void 0&&Gt(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)}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var o;C(mr(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])})}};function Ut(e,t){const r=mt(t);r.url||b(kt,P,{remoteName:e.name});let o=ve(t,r.url);!x&&!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 go(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:s,id:i}=e;if(!Ce(t)||!ht(t)){const{remoteSnapshot:c,globalSnapshot:a}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Ge(t.name,o)});Ut(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&&Dt(s,n,u,!1,{initiator:"loadRemote",id:i}).catch(()=>{}),{...e,remoteSnapshot:c}}return e}}}function _o(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 Bt(e,t,r,o,n={},s){const{value:i}=X(e,Ee(t)),c=s||i;if(c&&!st(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=_o(l),f=c.remotesInfo[l];Bt(e,{name:u.name,version:f.matchedVersion},r,!1,n,void 0)}}}const Ie=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Ro(e,t,r,o,n){const s=[],i=[],c=[],a=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:d}=f;if(Bt(o,r,(m,p,y)=>{var $;let E;if(y)E=f;else if(Array.isArray(d)){const S=d.find(v=>v.nameOrAlias===p.name||v.nameOrAlias===p.alias);if(!S)return;E=Ht(S)}else if(d===!0)E=f;else return;const _=ve(m,mt(m).url);_&&c.push({name:p.name,moduleInfo:{name:p.name,entry:_,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:p.name,shareScope:"",version:"version"in m?m.version:void 0},url:_});let g="modules"in m?m.modules:[];const R=ho(E.exposes);R.length&&"modules"in m&&(g=($=m==null?void 0:m.modules)==null?void 0:$.reduce((S,v)=>((R==null?void 0:R.indexOf(v.moduleName))!==-1&&S.push(v),S),[]));function w(S){const v=S.map(M=>ve(m,M));return E.filter?v.filter(E.filter):v}if(g){const S=g.length;for(let v=0;v<S;v++){const M=g[v],_e=`${p.name}/${M.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:M.moduleName==="."?p.name:_e,name:p.name,remoteSnapshot:m,preloadConfig:E,remote:p,origin:e}),!Rr(_e)&&(E.resourceCategory==="all"?(s.push(...w(M.assets.css.async)),s.push(...w(M.assets.css.sync)),i.push(...w(M.assets.js.async)),i.push(...w(M.assets.js.sync))):E.resourceCategory==="sync"&&(s.push(...w(M.assets.css.sync)),i.push(...w(M.assets.js.sync))),br(_e))}}},!0,{},n),n.shared&&n.shared.length>0){const m=(p,y)=>{const{shared:E}=ye(e.shareScopeMap,y.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};E&&typeof E.lib=="function"&&(y.assets.js.sync.forEach(_=>{a.add(_)}),y.assets.css.sync.forEach(_=>{l.add(_)}))};n.shared.forEach(p=>{var _;const y=(_=u.shared)==null?void 0:_[p.sharedName];if(!y)return;const E=p.version?y.find(g=>g.version===p.version):y;E&&dt(E).forEach(g=>{m(g,p)})})}const h=i.filter(m=>!a.has(m)&&!Ie("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!Ie("link",m)),jsAssetsWithoutEntry:h,entryAssets:c.filter(m=>!Ie("script",m.url))}}const bo=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 x?Ce(n)&&ht(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(Ut(o,i),Ro(t,r,o,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Vt(e,t){const r=de({name:t.name,version:t.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&X(r.remotesInfo,e.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:je(),remoteSnapshot:de({name:e.name,version:o.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:de({name:e.name,version:"version"in e?e.version:void 0})}}var So=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new I("beforeLoadRemoteSnapshot"),loadSnapshot:new D("loadGlobalSnapshot"),loadRemoteSnapshot:new D("loadRemoteSnapshot"),afterLoadSnapshot:new D("afterLoadSnapshot")}),this.manifestLoading=oe.__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=de({name:this.HostInstance.options.name,version:this.HostInstance.options.version});n||(n={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},gr({[this.HostInstance.options.name]:n})),n&&"remotesInfo"in n&&!X(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(st(a)){const d=x?a.remoteEntry:a.ssrRemoteEntry||a.remoteEntry||"",h=await this.loadManifestSnapshot(d,e,{},{initiator:r,id:t||e.name}),m=We({...e,entry:d},h);u=h,f=m}else{const{remoteSnapshot:d}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:a,from:"global"});u=d,f=l}else if(Ce(e)){const d=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),h=We(e,d);u=d,f=h}else b(At,P,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,H(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 Vt(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],b(Nt,P,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${a}`,H(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&&b(Lt,P,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(",")},void 0,H(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=er(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]}},wo=class{constructor(e){this.hooks=new J({beforeRegisterShare:new z("beforeRegisterShare"),afterResolve:new D("afterResolve"),beforeLoadShare:new D("beforeLoadShare"),loadShare:new I,afterLoadShare:new A("afterLoadShare"),errorLoadShare:new A("errorLoadShare"),resolveShare:new z("resolveShare"),initContainerShareScopeMap:new z("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){re(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){re(s)}}registerShared(e,t){const{newShareInfos:r,allShareInfos:o}=St(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=Ye({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}=ye(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(i){const a=le(i,c);if(a.lib)return j(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),j(a,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),l}else{const u=(async()=>{const d=await a.get();return j(a,r.options.name),a.loaded=!0,a.lib=d,d})();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=ne(s.treeShaking),l=le(s,a),f=(async()=>{const h=await l.get();l.lib=h,l.loaded=!0,j(l,r.options.name);const{shared:m,useTreesShaking:p}=ye(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare)||{};if(m){const y=le(m,p);y.lib=h,y.loaded=!0,m.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 d=await f;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:s}),d}}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:n,error:s}),s}}initializeSharing(e=ie,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:d}=this;s||(s=[]);let h=d[e];if(h||(h=d[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=(d,h)=>{var g;const{version:m,eager:p}=h;l[d]=l[d]||{};const y=l[d],E=y[m]&&le(y[m]),_=!!(E&&("eager"in E&&E.eager||"shareConfig"in E&&((g=E.shareConfig)!=null&&g.eager)));(!E||E.strategy!=="loaded-first"&&!E.loaded&&(!p!=!_?p:a>y[m].from))&&(y[m]=h)},f=async d=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let m;try{m=await h.getEntry()}catch(p){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:p,from:"runtime",lifecycle:"beforeLoadShare",remote:h.remoteInfo,origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(h=>{h.scope.includes(e)&&u(d,h)})}),(r.options.shareStrategy==="version-first"||n==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&i.push(f(d.name))}),i}loadShareSync(e,t){const{host:r}=this,o=Ye({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}=ye(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(n){if(typeof n.lib=="function")return j(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 j(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&&b((t==null?void 0:t.from)==="build"?vt:Le,P,{hostName:r.options.name,sharedPkgName:e},void 0,H(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}b(Le,P,{hostName:r.options.name,sharedPkgName:e},void 0,H(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],d=h=>{const m=(y,E,_)=>{_&&!y[E]&&(y[E]=_)},p=c?h.treeShaking:h;m(p,"loaded",s),m(p,"loading",n),m(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 m=this.shareScopeMap[h][e][a];d(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=wt(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},$o=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new z("beforeRegisterRemote"),registerRemote:new z("registerRemote"),beforeRequest:new D("beforeRequest"),afterMatchRemote:new I("afterMatchRemote"),onLoad:new I("onLoad"),afterLoadRemote:new I("afterLoadRemote"),handlePreloadModule:new A("handlePreloadModule"),errorLoadRemote:new I("errorLoadRemote"),beforePreloadRemote:new I("beforePreloadRemote"),generatePreloadAssets:new I("generatePreloadAssets"),afterPreloadRemote:new I("afterPreloadRemote"),loadEntry:new I}),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=Ze(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:d,remote:h,expose:m,id:p,remoteSnapshot:y}=f;n=p,s=m,i=K(h);const E=await l.get(p,m,t,y),_=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:d,expose:m,exposeModule:a?E:void 0,exposeModuleFactory:a?void 0:E,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 _=="function"?_:E}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=fo(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:Ge(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,d=K(u);try{const{globalSnapshot:h,remoteSnapshot:m}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:u,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:a,remote:u,remoteInfo:d,globalSnapshot:h,remoteSnapshot:m});if(!p)return;const y=await Dt(d,t,p,!0,{initiator:"preloadRemote",id:l});r.push({remote:u,remoteInfo:d,preloadConfig:f,id:l,results:y})}catch(h){r.push({remote:u,remoteInfo:d,preloadConfig:f,id:l,results:[{url:d.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(d.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})})}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=Ze(t.options.remotes,n);if(!s)try{b(Tt,P,{hostName:t.options.name,requestId:n},void 0,H(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 d={host:t,remoteInfo:c};return f||(f=new xt(d),t.moduleCache.set(l.name,f)),{module:f,moduleOptions:d,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&&x&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ie),e.type||(e.type=bt)};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}),ot(i.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=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,c=i.entryGlobalName;N[c]&&((t=Object.getOwnPropertyDescriptor(N,c))!=null&&t.configurable?delete N[c]:N[c]=void 0);const a=Me(s.remoteInfo);q[a]&&delete q[a],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?rt(i.name,i.buildVersion):i.name;const u=N.__FEDERATION__.__INSTANCES__.findIndex(d=>i.buildVersion?d.options.id===l:d.name===l);if(u!==-1){const d=N.__FEDERATION__.__INSTANCES__[u];l=d.options.id||l;const h=wt();let m=!0;const p=[];Object.keys(h).forEach(y=>{const E=h[y];E&&Object.keys(E).forEach(_=>{const g=E[_];g&&Object.keys(g).forEach(R=>{const w=g[R];w&&Object.keys(w).forEach($=>{const S=w[$];S&&typeof S=="object"&&S.from===i.name&&(S.loaded||S.loading?(S.useIn=S.useIn.filter(v=>v!==i.name),S.useIn.length?m=!1:p.push([y,_,R,$])):p.push([y,_,R,$]))})})})}),m&&(d.shareScopeMap={},delete h[l]),p.forEach(([y,E,_,g])=>{var R,w,$;($=(w=(R=h[y])==null?void 0:R[E])==null?void 0:w[_])==null||delete $[g]}),N.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:f}=Vt(e,r);if(f){const d=f&&"remotesInfo"in f&&f.remotesInfo&&X(f.remotesInfo,e.name).key;d&&(delete f.remotesInfo[d],oe.__FEDERATION__.__MANIFEST_LOADING__[d]&&delete oe.__FEDERATION__.__MANIFEST_LOADING__[d])}r.moduleCache.delete(e.name)}}catch(r){ke.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};const Io=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var No=class{constructor(e){this.hooks=new J({beforeInit:new z("beforeInit"),init:new A,beforeInitContainer:new D("beforeInitContainer"),initContainer:new D("initContainer")}),this.version="2.5.0",this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new A,createScript:new A,createLink:new A,fetch:new I,loadEntryError:new I,afterLoadEntry:new I("afterLoadEntry"),beforeInitRemote:new I("beforeInitRemote"),afterInitRemote:new I("afterInitRemote"),beforeGetExpose:new I("beforeGetExpose"),afterGetExpose:new I("afterGetExpose"),beforeExecuteFactory:new I("beforeExecuteFactory"),afterExecuteFactory:new I("afterExecuteFactory"),getModuleFactory:new I}),this.bridgeHook=new J({beforeBridgeRender:new A,afterBridgeRender:new A,beforeBridgeDestroy:new A,afterBridgeDestroy:new A});const t=Io?[go(),bo()]:[],r={id:co(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:x};this.name=e.name,this.options=r,this.snapshotHandler=new So(this),this.sharedHandler=new wo(this),this.remoteHandler=new $o(this),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&&b(ft(Pt,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=ie,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const o=K({name:e,entry:t}),n=new xt({host:this,remoteInfo:o});return n.remoteEntryExports=r,this.moduleCache.set(e,n),n}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{allShareInfos:r}=St(e,t),{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=lo(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 To=null;function jt(e){return To}yr(No);function Wt(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=Wt(o.children,t)),n})}function vo(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 Ao(e){const{router:t,basename:r,memoryRoute:o,hashRoute:n}=e,s=t.getRoutes().sort((h,m)=>h.path.split("/").filter(p=>p).length-m.path.split("/").filter(p=>p).length),i=new Map,c=new Set;s.forEach(h=>{const m=i.get(h.path)||[];m.push(h),i.set(h.path,m)});const a=(h,m)=>`${h}/${m}`.replace(/\/+/g,"/").replace(/\/$/,"")||"/",l=(h,m="")=>{if(!h.children||h.children.length===0)return h;for(let p=0;p<h.children.length;p++){const y=h.children[p],E=a(m,y.path),g=(i.get(E)||[]).find(R=>!c.has(R)&&R!==h&&(y.name==null||R.name===y.name));if(g){const R={...g,path:y.path};h.children[p]=R,c.add(g),l(R,E)}}return h};let u=[];for(const h of s)if(!c.has(h)){const m=l(h,h.path);c.add(h),u.push(m)}let f,d;return o?f=ue.createMemoryHistory(r):n?(f=ue.createWebHashHistory(),r&&(u=Wt(u,r),d=vo(r))):f=ue.createWebHistory(r),{history:f,routes:u,patchRouter:d}}function Po(e){const t=new Map,r=jt();return()=>({__APP_VERSION__:"2.5.0",async render(o){var m,p,y,E,_,g;F.debug("createBridgeComponent render Info",o);const{moduleName:n,dom:s,basename:i,memoryRoute:c,hashRoute:a,...l}=o,u=Kt.createApp(e.rootComponent,l);t.set(s,u);const f=await((y=(p=(m=r==null?void 0:r.bridgeHook)==null?void 0:m.lifecycle)==null?void 0:p.beforeBridgeRender)==null?void 0:y.emit(o)),d=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,...d});if(h!=null&&h.router){const{history:R,routes:w,patchRouter:$}=Ao({router:h.router,basename:o.basename,memoryRoute:o.memoryRoute,hashRoute:o.hashRoute}),S=ue.createRouter({...h.router.options,history:R,routes:w});$&&$(S),h.afterRouterCreate&&h.afterRouterCreate(S),F.debug("createBridgeComponent render router info>>>",{moduleName:n,router:S}),c&&await S.push(c.entryPath),u.use(S)}u.mount(s),(g=(_=(E=r==null?void 0:r.bridgeHook)==null?void 0:E.lifecycle)==null?void 0:_.afterBridgeRender)==null||g.emit(o)},destroy(o){var s,i,c,a,l,u;F.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 ko(){const e=new PopStateEvent("popstate",{state:window.history.state});window.dispatchEvent(e)}const Lo=k.defineComponent({name:"RemoteApp",props:{moduleName:String,basename:String,memoryRoute:Object,hashRoute:Boolean,providerInfo:Function,rootAttrs:Object},inheritAttrs:!1,setup(e){const t=k.ref(null),r=k.ref(null),o=k.ref(""),n=Oe.useRoute(),s=jt(),i=k.useAttrs(),c=async()=>{var d,h,m,p,y,E,_;const l=(d=e.providerInfo)==null?void 0:d.call(e);r.value=l;let u={...i,moduleName:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute};F.debug("createRemoteAppComponent LazyComponent render >>>",u);const f=await((p=(m=(h=s==null?void 0:s.bridgeHook)==null?void 0:h.lifecycle)==null?void 0:m.beforeBridgeRender)==null?void 0:p.emit(u))||{};u={...u,...f.extraProps},l.render(u),(_=(E=(y=s==null?void 0:s.bridgeHook)==null?void 0:y.lifecycle)==null?void 0:E.afterBridgeRender)==null||_.emit(u)},a=k.watch(()=>n==null?void 0:n.path,l=>{l!==n.path&&c(),o.value!==""&&o.value!==l&&(F.debug("createRemoteAppComponent dispatchPopstateEnv >>>",{...e,pathname:n.path}),ko()),o.value=l});return k.onMounted(()=>{c()}),k.onBeforeUnmount(()=>{var l,u,f,d,h,m,p;F.debug("createRemoteAppComponent LazyComponent destroy >>>",{...e}),a(),(f=(u=(l=s==null?void 0:s.bridgeHook)==null?void 0:l.lifecycle)==null?void 0:u.beforeBridgeDestroy)==null||f.emit({name:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute}),(d=r.value)==null||d.destroy({dom:t.value}),(p=(m=(h=s==null?void 0:s.bridgeHook)==null?void 0:h.lifecycle)==null?void 0:m.afterBridgeDestroy)==null||p.emit({name:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute})}),()=>k.createVNode("div",k.mergeProps(e.rootAttrs||{},{ref:t}),null)}});function qt(e){return k.defineAsyncComponent({__APP_VERSION__:"2.5.0",...e.asyncComponentOptions,loader:async()=>{var a,l;const t=Oe.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";F.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(F.debug("createRemoteAppComponent LazyComponent loadRemote info >>>",{moduleName:i,module:s,exportName:n,basename:r,route:t}),n in s&&typeof c=="function")return{render(){return k.h(Lo,{moduleName:i,providerInfo:c,basename:r,rootAttrs:e.rootAttrs,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute})}};throw new Error("module not found")}})}function Mo(e){return F.warn("createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"),qt(e)}exports.createBridgeComponent=Po;exports.createRemoteAppComponent=qt;exports.createRemoteComponent=Mo;
7
+ `)};function fr(e,t,r,o,n,s){return o(ft(e,t,r,n))}const G="[ Federation Runtime ]",ke=at(G);function C(e,t,r,o,n){e||b(t)}function b(e,t,r,o,n){if(t!==void 0)return fr(e,t,r??{},i=>{throw new Error(`${G}: ${i}`)},o);const s=e;throw s instanceof Error?(s.message.startsWith(G)||(s.message=`${G}: ${s.message}`),s):new Error(`${G}: ${s}`)}function re(e){e instanceof Error&&(e.message.startsWith(G)||(e.message=`${G}: ${e.message}`)),ke.warn(e)}function hr(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function Ee(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function Ce(e){return typeof e.entry<"u"}function ht(e){return!e.entry.includes(".json")}function Fe(e){return e&&typeof e=="object"}const dr=Object.prototype.toString;function mr(e){return dr.call(e)==="[object Object]"}function dt(e){return Array.isArray(e)?e:[e]}function mt(e){const t={url:"",type:"global",globalName:""};return x||tt()||!("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 pr=(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,L=(()=>{try{return document.defaultView}catch{return N}})(),oe=L;function fe(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function he(e,t){return Object.hasOwnProperty.call(e,t)}he(N,"__GLOBAL_LOADING_REMOTE_ENTRY__")||fe(N,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const q=N.__GLOBAL_LOADING_REMOTE_ENTRY__;function pt(e){var t,r,o,n,s,i;he(e,"__VMOK__")&&!he(e,"__FEDERATION__")&&fe(e,"__FEDERATION__",e.__VMOK__),he(e,"__FEDERATION__")||(fe(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),fe(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)}pt(N);pt(L);function yr(e,t=Te()){t&&(N.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.5.1")}function X(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 b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const je=()=>L.__FEDERATION__.moduleInfo,Er=(e,t)=>{const r=X(t,Ee(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=Ee(n),i=X(L.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===o)return i}},de=e=>Er(e,L.__FEDERATION__.moduleInfo),We=(e,t)=>{const r=Ee(e);return L.__FEDERATION__.moduleInfo[r]=t,L.__FEDERATION__.moduleInfo},gr=e=>(L.__FEDERATION__.moduleInfo={...L.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete L.__FEDERATION__.moduleInfo[r]}),He=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:N[r]}},_r=()=>L.__FEDERATION__.__GLOBAL_PLUGIN__,Rr=e=>N.__FEDERATION__.__PRELOADED_MAP__.get(e),br=e=>N.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),qe="[0-9A-Za-z-]+",De=`(?:\\+(${qe}(?:\\.${qe})*))`,te="0|[1-9]\\d*",me="[0-9]+",yt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Ke=`(?:${me}|${yt})`,Sr=`(?:-?(${Ke}(?:\\.${Ke})*))`,ze=`(?:${te}|${yt})`,Et=`(?:-(${ze}(?:\\.${ze})*))`,Se=`${te}|x|X|\\*`,Y=`[v=\\s]*(${Se})(?:\\.(${Se})(?:\\.(${Se})(?:${Et})?${De}?)?)?`,wr=`^\\s*(${Y})\\s+-\\s+(${Y})\\s*$`,$r=`[v=\\s]*${`(${me})\\.(${me})\\.(${me})`}${Sr}?${De}?`,xe="((?:<|>)?=?)",Ir=`(\\s*)${xe}\\s*(${$r}|${Y})`,gt="(?:~>?)",Nr=`(\\s*)${gt}\\s+`,_t="(?:\\^)",Tr=`(\\s*)${_t}\\s+`,vr="(<|>)?=?\\s*\\*",Ar=`^${_t}${Y}$`,Pr=`v?${`(${te})\\.(${te})\\.(${te})`}${Et}?${De}?`,kr=`^${gt}${Y}$`,Lr=`^${xe}\\s*${Y}$`,Mr=`^${xe}\\s*(${Pr})$|^$`,Or="^\\s*>=\\s*0.0.0\\s*$";function O(e){return new RegExp(e)}function T(e){return!e||e.toLowerCase()==="x"||e==="*"}function Rt(...e){return t=>e.reduce((r,o)=>o(r),t)}function Je(e){return e.match(O(Mr))}function Xe(e,t,r,o){const n=`${e}.${t}.${r}`;return o?`${n}-${o}`:n}function Cr(e){return e.replace(O(wr),(t,r,o,n,s,i,c,a,l,u,f,d)=>(T(o)?r="":T(n)?r=`>=${o}.0.0`:T(s)?r=`>=${o}.${n}.0`:r=`>=${r}`,T(l)?a="":T(u)?a=`<${Number(l)+1}.0.0-0`:T(f)?a=`<${l}.${Number(u)+1}.0-0`:d?a=`<=${l}.${u}.${f}-${d}`:a=`<=${a}`,`${r} ${a}`.trim()))}function Fr(e){return e.replace(O(Ir),"$1$2$3")}function Hr(e){return e.replace(O(Nr),"$1~")}function Dr(e){return e.replace(O(Tr),"$1^")}function xr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(Ar),(r,o,n,s,i)=>T(o)?"":T(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:T(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 Gr(e){return e.trim().split(/\s+/).map(t=>t.replace(O(kr),(r,o,n,s,i)=>T(o)?"":T(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:T(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 Ur(e){return e.split(/\s+/).map(t=>t.trim().replace(O(Lr),(r,o,n,s,i,c)=>{const a=T(n),l=a||T(s),u=l||T(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 Br(e){return e.trim().replace(O(vr),"")}function Vr(e){return e.trim().replace(O(Or),"")}function pe(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function jr(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?pe(i,c):-1:1}return 0}function ce(e,t){return pe(e.major,t.major)||pe(e.minor,t.minor)||pe(e.patch,t.patch)||jr(e,t)}function we(e,t){return e.version===t.version}function Wr(e,t){switch(e.operator){case"":case"=":return we(e,t);case">":return ce(e,t)<0;case">=":return we(e,t)||ce(e,t)<0;case"<":return ce(e,t)>0;case"<=":return we(e,t)||ce(e,t)>0;case void 0:return!0;default:return!1}}function qr(e){return Rt(xr,Gr,Ur,Br)(e)}function Kr(e){return Rt(Cr,Fr,Hr,Dr)(e.trim()).split(/\s+/).join(" ")}function ee(e,t){if(!e)return!1;const r=Je(e);if(!r)return!1;const[,o,,n,s,i,c]=r,a={operator:o,version:Xe(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 d=Kr(f);if(!d.trim())return!0;const h=d.split(" ").map(y=>qr(y)).join(" ");if(!h.trim())return!0;const m=h.split(/\s+/).map(y=>Vr(y)).filter(Boolean);if(m.length===0)continue;let p=!0;for(const y of m){const E=Je(y);if(!E){p=!1;break}const[,_,,g,R,w,$]=E;if(!Wr({operator:_,version:Xe(g,R,w,$),major:g,minor:R,patch:w,preRelease:$==null?void 0:$.split(".")},a)){p=!1;break}}if(p)return!0}catch(d){console.error(`[semver] Error processing range part "${f}":`,d);continue}}return!1}const ie="default",bt="global";function zr(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(()=>{b(`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)&&b(`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 St(e,t){const r=t.shared||{},o=t.name,n=Object.keys(r).reduce((i,c)=>{const a=dt(r[c]);return i[c]=i[c]||[],a.forEach(l=>{i[c].push(zr(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 ne(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?Xr(e,t):!0:!1}function U(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!!ee(r(e),`<=${r(t)}`)}const se=(e,t)=>{const r=t||function(o,n){return U(o,n)};return Object.keys(e).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},ge=e=>!!e.loaded||typeof e.lib=="function",Jr=e=>!!e.loading,Xr=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(o=>r.includes(o)):!1};function Yr(e,t,r,o){const n=e[t][r];let s="",i=ne(o);const c=function(a,l){return i?n[a].treeShaking?n[l].treeShaking?!ge(n[a].treeShaking)&&U(a,l):!1:!0:!ge(n[a])&&U(a,l)};if(i){if(s=se(e[t][r],c),s)return{version:s,useTreesShaking:i};i=!1}return{version:se(e[t][r],c),useTreesShaking:i}}const V=e=>ge(e)||Jr(e);function Zr(e,t,r,o){const n=e[t][r];let s="",i=ne(o);const c=function(a,l){if(i){if(!n[a].treeShaking)return!0;if(!n[l].treeShaking)return!1;if(V(n[l].treeShaking))return V(n[a].treeShaking)?!!U(a,l):!0;if(V(n[a].treeShaking))return!1}return V(n[l])?V(n[a])?!!U(a,l):!0:V(n[a])?!1:U(a,l)};if(i){if(s=se(e[t][r],c),s)return{version:s,useTreesShaking:i};i=!1}return{version:se(e[t][r],c),useTreesShaking:i}}function Qr(e){return e==="loaded-first"?Zr:Yr}function ye(e,t,r,o){if(!e)return;const{shareConfig:n,scope:s=ie,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:d}=Qr(i)(e,l,t,c),h=()=>{const p=e[l][t][f];if(n.singleton){if(typeof u=="string"&&!ee(f,u)){const y=`Version ${f} from ${f&&p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;n.strictVersion?b(y):re(y)}return{shared:p,useTreesShaking:d}}else{if(u===!1||u==="*")return{shared:p,useTreesShaking:d};if(ee(f,u))return{shared:p,useTreesShaking:d};const y=ne(c);if(y){for(const[E,_]of Object.entries(e[l][t]))if(ne(_.treeShaking,c==null?void 0:c.usedExports)&&ee(E,u))return{shared:_,useTreesShaking:y}}for(const[E,_]of Object.entries(e[l][t]))if(ee(E,u))return{shared:_,useTreesShaking:!1}}},m={shareScopeMap:e,scope:l,pkgName:t,version:f,GlobalFederation:oe.__FEDERATION__,shareInfo:r,resolver:h};return(o.emit(m)||m).resolver()}}function wt(){return oe.__FEDERATION__.__SHARE__}function Ye(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[se(l,function(f,d){return!ge(l[f])&&U(f,d)})]},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,d]of Object.entries(u)){const h=l[f];i(h)&&i(d)?l[f]=c(h,d):d!==void 0&&(l[f]=d)}return l};return c(s(o[t]),r==null?void 0:r.customShareInfo)}const j=(e,t)=>{e.useIn||(e.useIn=[]),hr(e.useIn,t)};function le(e,t){return t&&e.treeShaking?e.treeShaking:e}function Ge(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function Ze(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 eo(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}const $t="RUNTIME-001",It="RUNTIME-002",Nt="RUNTIME-003",Tt="RUNTIME-004",vt="RUNTIME-005",Le="RUNTIME-006",At="RUNTIME-007",Ue="RUNTIME-008",to="RUNTIME-009",Pt="RUNTIME-010",kt="RUNTIME-011",ro="RUNTIME-012",Lt="RUNTIME-013",Mt="RUNTIME-014",Ot="RUNTIME-015",P={[$t]:"Failed to get remoteEntry exports.",[It]:'The remote entry interface does not contain "init"',[Nt]:"Failed to get manifest.",[Tt]:"Failed to locate remote.",[vt]:"Invalid loadShareSync function call from bundler runtime",[Le]:"Invalid loadShareSync function call from runtime",[At]:"Failed to get remote snapshot.",[Ue]:"Failed to load script resources.",[to]:"Please call createInstance first.",[Pt]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[kt]:"The remoteEntry URL is missing from the remote snapshot.",[ro]:'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.',[Lt]:"The manifest is not a valid Module Federation manifest.",[Mt]:"The remote does not expose the requested module.",[Ot]:"Remote container initialization failed."};({...P});const Ct=".then(callbacks[0]).catch(callbacks[1])";async function oo({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Ct}`)([r,o]):import(e).then(r).catch(o)}catch(n){b(`Failed to load ESM entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}async function no({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}")${Ct}`)([r,o])}catch(n){b(`Failed to load SystemJS entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}function Ft(e,t,r){const{remoteEntryKey:o,entryExports:n}=He(e,t);return n||b($t,P,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:o}),n}async function so({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 ir(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(()=>Ft(e,t,r),l=>{const u=l instanceof Error?l.message:String(l);b(Ue,P,{remoteName:e,resourceUrl:a},u)})}async function io({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 oo({entry:s,remoteEntryExports:t});case"system":return no({entry:s,remoteEntryExports:t});default:return so({entry:s,globalName:i,name:c,remoteInfo:e,loaderHook:r,getEntryUrl:o,resourceContext:n})}}async function ao({remoteInfo:e,loaderHook:t,resourceContext:r}){const{entry:o,entryGlobalName:n,name:s,type:i}=e,{entryExports:c}=He(s,n);return c||lr(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(()=>Ft(s,n,o)).catch(a=>{b(`Failed to load Node.js entry for remote "${s}" from "${o}". ${a instanceof Error?a.message:String(a)}`)})}function Me(e){const{entry:t,name:r}=e;return rt(r,t)}async function Be(e){const{origin:t,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,resourceContext:s,_inErrorHandling:i=!1}=e,c=Me(o);if(r)return r;if(!q[c]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;q[c]=a.emit({origin:t,loaderHook:l,remoteInfo:o,remoteEntryExports:r}).then(u=>u||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":x)?io({remoteInfo:o,remoteEntryExports:r,loaderHook:l,getEntryUrl:n,resourceContext:s}):ao({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=Me(o),d=u instanceof Error&&u.message.includes("ScriptExecutionError");if(u instanceof Error&&u.message.includes(Ue)&&!d&&!i){const h=p=>Be({...p,_inErrorHandling:!0}),m=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:h,origin:t,remoteInfo:o,remoteEntryExports:r,globalLoading:q,uniqueKey:f});if(m)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:m,recovered:!0}),m}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,error:u}),u})}return q[c]}function K(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||bt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ie}}function co(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function lo(e,t){const r=_r(),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 uo(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 H(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(uo))??[],shared:t}}}function Ht(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,...e}}function fo(e,t){return t.map(r=>{const o=eo(e,r.nameOrAlias);return C(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&nt({remoteInfo:o,remotes:e})}`),{remote:o,preloadConfig:Ht(r)}})}function ho(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 B(e,t,r,o){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:o}}async function mo(e,t,r,o){const n=e.moduleCache.get(r.name),s=r.entry;if(n!=null&&n.remoteEntryExports)return B(o,s,"cached");try{if(!await Be({origin:e,remoteInfo:r,remoteEntryExports:n==null?void 0:n.remoteEntryExports,resourceContext:{...o,url:s}}))throw new Error(`Failed to load remoteEntry "${s}".`);return B(o,s,"success")}catch(i){return B(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}=sr({url:r,cb:()=>{i(B(n,r,a?"success":"cached"))},onErrorCallback:l=>{i(B(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 po({host:e,remoteInfo:t,url:r,attrs:o,context:n}){return new Promise(s=>{const{script:i,needAttach:c}=lt({url:r,cb:()=>{s(B(n,r,c?"success":"cached"))},onErrorCallback:a=>{s(B(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 Q(e,t){return{...e,resourceType:t}}function Dt(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(mo(t,e,u,Q(n,"remoteEntry")))}),o){const l={rel:"preload",as:"style"};s.forEach(u=>{a.push($e({host:t,remoteInfo:e,url:u,attrs:l,context:Q(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:Q(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:Q(n,"js")}))})}else{const l={fetchpriority:"high",type:(e==null?void 0:e.type)==="module"?"module":"text/javascript"};i.forEach(u=>{a.push(po({host:t,remoteInfo:e,url:u,attrs:l,context:Q(n,"js")}))})}}return Promise.all(a)}function yo(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 Eo(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 xt=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 Be({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:"loadRemote",id:Ge(this.remoteInfo.name,e),resourceType:"remoteEntry"}});return C(t,`remoteEntryExports is undefined
8
+ ${nt(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}=Eo(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"&&b(It,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,H(this.host.options));try{await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions)}catch(l){b(Ot,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${l}`,H(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||b(Mt,P,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:yo(o)},void 0,H(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=pr(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)}}},A=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()}},I=class extends A{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 Gt(e,t){if(!Fe(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var z=class extends A{constructor(e){super(),this.onerror=b,this.type=e}emit(e){Fe(e)||b(`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(Gt(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){re(r),this.onerror(r)}return e}},D=class extends A{constructor(e){super(),this.onerror=b,this.type=e}emit(e){Fe(e)||b(`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=>(re(s),this.onerror(s),e),n=s=>{if(s!==void 0&&Gt(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)}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var o;C(mr(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])})}};function Ut(e,t){const r=mt(t);r.url||b(kt,P,{remoteName:e.name});let o=ve(t,r.url);!x&&!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 go(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:s,id:i}=e;if(!Ce(t)||!ht(t)){const{remoteSnapshot:c,globalSnapshot:a}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Ge(t.name,o)});Ut(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&&Dt(s,n,u,!1,{initiator:"loadRemote",id:i}).catch(()=>{}),{...e,remoteSnapshot:c}}return e}}}function _o(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 Bt(e,t,r,o,n={},s){const{value:i}=X(e,Ee(t)),c=s||i;if(c&&!st(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=_o(l),f=c.remotesInfo[l];Bt(e,{name:u.name,version:f.matchedVersion},r,!1,n,void 0)}}}const Ie=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Ro(e,t,r,o,n){const s=[],i=[],c=[],a=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:d}=f;if(Bt(o,r,(m,p,y)=>{var $;let E;if(y)E=f;else if(Array.isArray(d)){const S=d.find(v=>v.nameOrAlias===p.name||v.nameOrAlias===p.alias);if(!S)return;E=Ht(S)}else if(d===!0)E=f;else return;const _=ve(m,mt(m).url);_&&c.push({name:p.name,moduleInfo:{name:p.name,entry:_,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:p.name,shareScope:"",version:"version"in m?m.version:void 0},url:_});let g="modules"in m?m.modules:[];const R=ho(E.exposes);R.length&&"modules"in m&&(g=($=m==null?void 0:m.modules)==null?void 0:$.reduce((S,v)=>((R==null?void 0:R.indexOf(v.moduleName))!==-1&&S.push(v),S),[]));function w(S){const v=S.map(M=>ve(m,M));return E.filter?v.filter(E.filter):v}if(g){const S=g.length;for(let v=0;v<S;v++){const M=g[v],_e=`${p.name}/${M.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:M.moduleName==="."?p.name:_e,name:p.name,remoteSnapshot:m,preloadConfig:E,remote:p,origin:e}),!Rr(_e)&&(E.resourceCategory==="all"?(s.push(...w(M.assets.css.async)),s.push(...w(M.assets.css.sync)),i.push(...w(M.assets.js.async)),i.push(...w(M.assets.js.sync))):E.resourceCategory==="sync"&&(s.push(...w(M.assets.css.sync)),i.push(...w(M.assets.js.sync))),br(_e))}}},!0,{},n),n.shared&&n.shared.length>0){const m=(p,y)=>{const{shared:E}=ye(e.shareScopeMap,y.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};E&&typeof E.lib=="function"&&(y.assets.js.sync.forEach(_=>{a.add(_)}),y.assets.css.sync.forEach(_=>{l.add(_)}))};n.shared.forEach(p=>{var _;const y=(_=u.shared)==null?void 0:_[p.sharedName];if(!y)return;const E=p.version?y.find(g=>g.version===p.version):y;E&&dt(E).forEach(g=>{m(g,p)})})}const h=i.filter(m=>!a.has(m)&&!Ie("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!Ie("link",m)),jsAssetsWithoutEntry:h,entryAssets:c.filter(m=>!Ie("script",m.url))}}const bo=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 x?Ce(n)&&ht(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(Ut(o,i),Ro(t,r,o,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Vt(e,t){const r=de({name:t.name,version:t.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&X(r.remotesInfo,e.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:je(),remoteSnapshot:de({name:e.name,version:o.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:de({name:e.name,version:"version"in e?e.version:void 0})}}var So=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new I("beforeLoadRemoteSnapshot"),loadSnapshot:new D("loadGlobalSnapshot"),loadRemoteSnapshot:new D("loadRemoteSnapshot"),afterLoadSnapshot:new D("afterLoadSnapshot")}),this.manifestLoading=oe.__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=de({name:this.HostInstance.options.name,version:this.HostInstance.options.version});n||(n={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},gr({[this.HostInstance.options.name]:n})),n&&"remotesInfo"in n&&!X(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(st(a)){const d=x?a.remoteEntry:a.ssrRemoteEntry||a.remoteEntry||"",h=await this.loadManifestSnapshot(d,e,{},{initiator:r,id:t||e.name}),m=We({...e,entry:d},h);u=h,f=m}else{const{remoteSnapshot:d}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:a,from:"global"});u=d,f=l}else if(Ce(e)){const d=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),h=We(e,d);u=d,f=h}else b(At,P,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,H(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 Vt(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],b(Nt,P,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${a}`,H(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&&b(Lt,P,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(",")},void 0,H(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=er(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]}},wo=class{constructor(e){this.hooks=new J({beforeRegisterShare:new z("beforeRegisterShare"),afterResolve:new D("afterResolve"),beforeLoadShare:new D("beforeLoadShare"),loadShare:new I,afterLoadShare:new A("afterLoadShare"),errorLoadShare:new A("errorLoadShare"),resolveShare:new z("resolveShare"),initContainerShareScopeMap:new z("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){re(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){re(s)}}registerShared(e,t){const{newShareInfos:r,allShareInfos:o}=St(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=Ye({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}=ye(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(i){const a=le(i,c);if(a.lib)return j(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),j(a,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),l}else{const u=(async()=>{const d=await a.get();return j(a,r.options.name),a.loaded=!0,a.lib=d,d})();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=ne(s.treeShaking),l=le(s,a),f=(async()=>{const h=await l.get();l.lib=h,l.loaded=!0,j(l,r.options.name);const{shared:m,useTreesShaking:p}=ye(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare)||{};if(m){const y=le(m,p);y.lib=h,y.loaded=!0,m.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 d=await f;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:s}),d}}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:n,error:s}),s}}initializeSharing(e=ie,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:d}=this;s||(s=[]);let h=d[e];if(h||(h=d[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=(d,h)=>{var g;const{version:m,eager:p}=h;l[d]=l[d]||{};const y=l[d],E=y[m]&&le(y[m]),_=!!(E&&("eager"in E&&E.eager||"shareConfig"in E&&((g=E.shareConfig)!=null&&g.eager)));(!E||E.strategy!=="loaded-first"&&!E.loaded&&(!p!=!_?p:a>y[m].from))&&(y[m]=h)},f=async d=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:d});let m;try{m=await h.getEntry()}catch(p){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:d,error:p,from:"runtime",lifecycle:"beforeLoadShare",remote:h.remoteInfo,origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(d=>{r.options.shared[d].forEach(h=>{h.scope.includes(e)&&u(d,h)})}),(r.options.shareStrategy==="version-first"||n==="version-first")&&r.options.remotes.forEach(d=>{d.shareScope===e&&i.push(f(d.name))}),i}loadShareSync(e,t){const{host:r}=this,o=Ye({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}=ye(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(n){if(typeof n.lib=="function")return j(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 j(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&&b((t==null?void 0:t.from)==="build"?vt:Le,P,{hostName:r.options.name,sharedPkgName:e},void 0,H(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}b(Le,P,{hostName:r.options.name,sharedPkgName:e},void 0,H(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],d=h=>{const m=(y,E,_)=>{_&&!y[E]&&(y[E]=_)},p=c?h.treeShaking:h;m(p,"loaded",s),m(p,"loading",n),m(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 m=this.shareScopeMap[h][e][a];d(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=wt(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},$o=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new z("beforeRegisterRemote"),registerRemote:new z("registerRemote"),beforeRequest:new D("beforeRequest"),afterMatchRemote:new I("afterMatchRemote"),onLoad:new I("onLoad"),afterLoadRemote:new I("afterLoadRemote"),handlePreloadModule:new A("handlePreloadModule"),errorLoadRemote:new I("errorLoadRemote"),beforePreloadRemote:new I("beforePreloadRemote"),generatePreloadAssets:new I("generatePreloadAssets"),afterPreloadRemote:new I("afterPreloadRemote"),loadEntry:new I}),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=Ze(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:d,remote:h,expose:m,id:p,remoteSnapshot:y}=f;n=p,s=m,i=K(h);const E=await l.get(p,m,t,y),_=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:d,expose:m,exposeModule:a?E:void 0,exposeModuleFactory:a?void 0:E,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 _=="function"?_:E}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=fo(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:Ge(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,d=K(u);try{const{globalSnapshot:h,remoteSnapshot:m}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:u,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:a,remote:u,remoteInfo:d,globalSnapshot:h,remoteSnapshot:m});if(!p)return;const y=await Dt(d,t,p,!0,{initiator:"preloadRemote",id:l});r.push({remote:u,remoteInfo:d,preloadConfig:f,id:l,results:y})}catch(h){r.push({remote:u,remoteInfo:d,preloadConfig:f,id:l,results:[{url:d.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(d.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})})}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=Ze(t.options.remotes,n);if(!s)try{b(Tt,P,{hostName:t.options.name,requestId:n},void 0,H(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 d={host:t,remoteInfo:c};return f||(f=new xt(d),t.moduleCache.set(l.name,f)),{module:f,moduleOptions:d,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&&x&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ie),e.type||(e.type=bt)};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}),ot(i.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=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,c=i.entryGlobalName;N[c]&&((t=Object.getOwnPropertyDescriptor(N,c))!=null&&t.configurable?delete N[c]:N[c]=void 0);const a=Me(s.remoteInfo);q[a]&&delete q[a],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?rt(i.name,i.buildVersion):i.name;const u=N.__FEDERATION__.__INSTANCES__.findIndex(d=>i.buildVersion?d.options.id===l:d.name===l);if(u!==-1){const d=N.__FEDERATION__.__INSTANCES__[u];l=d.options.id||l;const h=wt();let m=!0;const p=[];Object.keys(h).forEach(y=>{const E=h[y];E&&Object.keys(E).forEach(_=>{const g=E[_];g&&Object.keys(g).forEach(R=>{const w=g[R];w&&Object.keys(w).forEach($=>{const S=w[$];S&&typeof S=="object"&&S.from===i.name&&(S.loaded||S.loading?(S.useIn=S.useIn.filter(v=>v!==i.name),S.useIn.length?m=!1:p.push([y,_,R,$])):p.push([y,_,R,$]))})})})}),m&&(d.shareScopeMap={},delete h[l]),p.forEach(([y,E,_,g])=>{var R,w,$;($=(w=(R=h[y])==null?void 0:R[E])==null?void 0:w[_])==null||delete $[g]}),N.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:f}=Vt(e,r);if(f){const d=f&&"remotesInfo"in f&&f.remotesInfo&&X(f.remotesInfo,e.name).key;d&&(delete f.remotesInfo[d],oe.__FEDERATION__.__MANIFEST_LOADING__[d]&&delete oe.__FEDERATION__.__MANIFEST_LOADING__[d])}r.moduleCache.delete(e.name)}}catch(r){ke.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};const Io=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var No=class{constructor(e){this.hooks=new J({beforeInit:new z("beforeInit"),init:new A,beforeInitContainer:new D("beforeInitContainer"),initContainer:new D("initContainer")}),this.version="2.5.1",this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new A,createScript:new A,createLink:new A,fetch:new I,loadEntryError:new I,afterLoadEntry:new I("afterLoadEntry"),beforeInitRemote:new I("beforeInitRemote"),afterInitRemote:new I("afterInitRemote"),beforeGetExpose:new I("beforeGetExpose"),afterGetExpose:new I("afterGetExpose"),beforeExecuteFactory:new I("beforeExecuteFactory"),afterExecuteFactory:new I("afterExecuteFactory"),getModuleFactory:new I}),this.bridgeHook=new J({beforeBridgeRender:new A,afterBridgeRender:new A,beforeBridgeDestroy:new A,afterBridgeDestroy:new A});const t=Io?[go(),bo()]:[],r={id:co(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:x};this.name=e.name,this.options=r,this.snapshotHandler=new So(this),this.sharedHandler=new wo(this),this.remoteHandler=new $o(this),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&&b(ft(Pt,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=ie,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const o=K({name:e,entry:t}),n=new xt({host:this,remoteInfo:o});return n.remoteEntryExports=r,this.moduleCache.set(e,n),n}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{allShareInfos:r}=St(e,t),{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=lo(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 To=null;function jt(e){return To}yr(No);function Wt(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=Wt(o.children,t)),n})}function vo(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 Ao(e){const{router:t,basename:r,memoryRoute:o,hashRoute:n}=e,s=t.getRoutes().sort((h,m)=>h.path.split("/").filter(p=>p).length-m.path.split("/").filter(p=>p).length),i=new Map,c=new Set;s.forEach(h=>{const m=i.get(h.path)||[];m.push(h),i.set(h.path,m)});const a=(h,m)=>`${h}/${m}`.replace(/\/+/g,"/").replace(/\/$/,"")||"/",l=(h,m="")=>{if(!h.children||h.children.length===0)return h;for(let p=0;p<h.children.length;p++){const y=h.children[p],E=a(m,y.path),g=(i.get(E)||[]).find(R=>!c.has(R)&&R!==h&&(y.name==null||R.name===y.name));if(g){const R={...g,path:y.path};h.children[p]=R,c.add(g),l(R,E)}}return h};let u=[];for(const h of s)if(!c.has(h)){const m=l(h,h.path);c.add(h),u.push(m)}let f,d;return o?f=ue.createMemoryHistory(r):n?(f=ue.createWebHashHistory(),r&&(u=Wt(u,r),d=vo(r))):f=ue.createWebHistory(r),{history:f,routes:u,patchRouter:d}}function Po(e){const t=new Map,r=jt();return()=>({__APP_VERSION__:"2.5.1",async render(o){var m,p,y,E,_,g;F.debug("createBridgeComponent render Info",o);const{moduleName:n,dom:s,basename:i,memoryRoute:c,hashRoute:a,...l}=o,u=Kt.createApp(e.rootComponent,l);t.set(s,u);const f=await((y=(p=(m=r==null?void 0:r.bridgeHook)==null?void 0:m.lifecycle)==null?void 0:p.beforeBridgeRender)==null?void 0:y.emit(o)),d=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,...d});if(h!=null&&h.router){const{history:R,routes:w,patchRouter:$}=Ao({router:h.router,basename:o.basename,memoryRoute:o.memoryRoute,hashRoute:o.hashRoute}),S=ue.createRouter({...h.router.options,history:R,routes:w});$&&$(S),h.afterRouterCreate&&h.afterRouterCreate(S),F.debug("createBridgeComponent render router info>>>",{moduleName:n,router:S}),c&&await S.push(c.entryPath),u.use(S)}u.mount(s),(g=(_=(E=r==null?void 0:r.bridgeHook)==null?void 0:E.lifecycle)==null?void 0:_.afterBridgeRender)==null||g.emit(o)},destroy(o){var s,i,c,a,l,u;F.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 ko(){const e=new PopStateEvent("popstate",{state:window.history.state});window.dispatchEvent(e)}const Lo=k.defineComponent({name:"RemoteApp",props:{moduleName:String,basename:String,memoryRoute:Object,hashRoute:Boolean,providerInfo:Function,rootAttrs:Object},inheritAttrs:!1,setup(e){const t=k.ref(null),r=k.ref(null),o=k.ref(""),n=Oe.useRoute(),s=jt(),i=k.useAttrs(),c=async()=>{var d,h,m,p,y,E,_;const l=(d=e.providerInfo)==null?void 0:d.call(e);r.value=l;let u={...i,moduleName:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute};F.debug("createRemoteAppComponent LazyComponent render >>>",u);const f=await((p=(m=(h=s==null?void 0:s.bridgeHook)==null?void 0:h.lifecycle)==null?void 0:m.beforeBridgeRender)==null?void 0:p.emit(u))||{};u={...u,...f.extraProps},l.render(u),(_=(E=(y=s==null?void 0:s.bridgeHook)==null?void 0:y.lifecycle)==null?void 0:E.afterBridgeRender)==null||_.emit(u)},a=k.watch(()=>n==null?void 0:n.path,l=>{l!==n.path&&c(),o.value!==""&&o.value!==l&&(F.debug("createRemoteAppComponent dispatchPopstateEnv >>>",{...e,pathname:n.path}),ko()),o.value=l});return k.onMounted(()=>{c()}),k.onBeforeUnmount(()=>{var l,u,f,d,h,m,p;F.debug("createRemoteAppComponent LazyComponent destroy >>>",{...e}),a(),(f=(u=(l=s==null?void 0:s.bridgeHook)==null?void 0:l.lifecycle)==null?void 0:u.beforeBridgeDestroy)==null||f.emit({name:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute}),(d=r.value)==null||d.destroy({dom:t.value}),(p=(m=(h=s==null?void 0:s.bridgeHook)==null?void 0:h.lifecycle)==null?void 0:m.afterBridgeDestroy)==null||p.emit({name:e.moduleName,dom:t.value,basename:e.basename,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute})}),()=>k.createVNode("div",k.mergeProps(e.rootAttrs||{},{ref:t}),null)}});function qt(e){return k.defineAsyncComponent({__APP_VERSION__:"2.5.1",...e.asyncComponentOptions,loader:async()=>{var a,l;const t=Oe.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";F.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(F.debug("createRemoteAppComponent LazyComponent loadRemote info >>>",{moduleName:i,module:s,exportName:n,basename:r,route:t}),n in s&&typeof c=="function")return{render(){return k.h(Lo,{moduleName:i,providerInfo:c,basename:r,rootAttrs:e.rootAttrs,memoryRoute:e.memoryRoute,hashRoute:e.hashRoute})}};throw new Error("module not found")}})}function Mo(e){return F.warn("createRemoteComponent is deprecated, please use createRemoteAppComponent instead!"),qt(e)}exports.createBridgeComponent=Po;exports.createRemoteAppComponent=qt;exports.createRemoteComponent=Mo;
package/dist/index.js CHANGED
@@ -540,7 +540,7 @@ function mt(e) {
540
540
  mt(N);
541
541
  mt(P);
542
542
  function wr(e, t = Te()) {
543
- t && (N.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.5.0");
543
+ t && (N.__FEDERATION__.__DEBUG_CONSTRUCTOR__ = e, N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__ = "2.5.1");
544
544
  }
545
545
  function J(e, t) {
546
546
  if (typeof t == "string") {
@@ -2753,7 +2753,7 @@ var Mo = class {
2753
2753
  init: new A(),
2754
2754
  beforeInitContainer: new H("beforeInitContainer"),
2755
2755
  initContainer: new H("initContainer")
2756
- }), this.version = "2.5.0", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new z({
2756
+ }), this.version = "2.5.1", this.moduleCache = /* @__PURE__ */ new Map(), this.loaderHook = new z({
2757
2757
  getModuleInfo: new A(),
2758
2758
  createScript: new A(),
2759
2759
  createLink: new A(),
@@ -2923,7 +2923,7 @@ function Fo(e) {
2923
2923
  function Bo(e) {
2924
2924
  const t = /* @__PURE__ */ new Map(), r = Vt();
2925
2925
  return () => ({
2926
- __APP_VERSION__: "2.5.0",
2926
+ __APP_VERSION__: "2.5.1",
2927
2927
  async render(o) {
2928
2928
  var m, p, y, E, _, g;
2929
2929
  C.debug("createBridgeComponent render Info", o);
@@ -3038,7 +3038,7 @@ const Do = /* @__PURE__ */ qt({
3038
3038
  });
3039
3039
  function xo(e) {
3040
3040
  return Qt({
3041
- __APP_VERSION__: "2.5.0",
3041
+ __APP_VERSION__: "2.5.1",
3042
3042
  ...e.asyncComponentOptions,
3043
3043
  //@ts-ignore
3044
3044
  loader: async () => {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "git+https://github.com/module-federation/core.git",
8
8
  "directory": "packages/bridge/vue3-bridge"
9
9
  },
10
- "version": "2.5.0",
10
+ "version": "2.5.1",
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
@@ -25,9 +25,9 @@
25
25
  "vue-router": "=4"
26
26
  },
27
27
  "dependencies": {
28
- "@module-federation/sdk": "2.5.0",
29
- "@module-federation/bridge-shared": "2.5.0",
30
- "@module-federation/runtime": "2.5.0"
28
+ "@module-federation/sdk": "2.5.1",
29
+ "@module-federation/bridge-shared": "2.5.1",
30
+ "@module-federation/runtime": "2.5.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/react": "^18.3.11",