@signalk/server-admin-ui 2.21.0 → 2.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/public/assets/adminUI__loadShare__react__loadShare__-BXV3lg18.js +2 -0
- package/public/assets/adminUI__mf_v__runtimeInit__mf_v__-OBqvctZP.js +8 -0
- package/public/assets/bootstrap-CX1Fo5Ij.js +818 -0
- package/public/assets/hostInit-BMKH-INB.js +1 -1
- package/public/assets/{index-5hkOWmYo.js → index-DGNZrxCr.js} +5 -5
- package/public/assets/{index-Dlc1dzC4.js → index-DweN4-6z.js} +3 -3
- package/public/assets/loadingerror-BhQSZDj4.js +2 -0
- package/public/index.html +2 -2
- package/public/remoteEntry.js +2 -2
- package/vite.config.js +3 -2
- package/public/assets/adminUI__loadShare__react__loadShare__-Cn7x_nA9.js +0 -2
- package/public/assets/adminUI__mf_v__runtimeInit__mf_v__-Cm0AUItX.js +0 -9
- package/public/assets/bootstrap-Dl8NOv2y.js +0 -753
- package/public/assets/loadingerror-Dkv7JQqX.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signalk/server-admin-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "Signal K server admin webapp",
|
|
5
5
|
"author": "Scott Bender, Teppo Kurki",
|
|
6
6
|
"contributors": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"font-awesome": "^4.7.0",
|
|
35
35
|
"jsonlint-mod": "^1.7.6",
|
|
36
36
|
"lodash.remove": "^4.7.0",
|
|
37
|
+
"mathjs": "^12.4.0",
|
|
37
38
|
"lodash.set": "^4.3.2",
|
|
38
39
|
"lodash.uniq": "^4.5.0",
|
|
39
40
|
"moment": "^2.29.1",
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./_commonjsHelpers-D6-XlEtG.js";import{b as c}from"./adminUI__mf_v__runtimeInit__mf_v__-OBqvctZP.js";function f(e,s){for(var a=0;a<s.length;a++){const t=s[a];if(typeof t!="string"&&!Array.isArray(t)){for(const r in t)if(r!=="default"&&!(r in e)){const n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const l=c.then(e=>e.loadShare("react",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"^16.14.0"}}})),o=await l.then(e=>e()),u=o,_=o.__esModule?o.default:o,d=f({__proto__:null,default:_},[u]),g=i(d);export{_ as R,u as _,g as r};
|
|
2
|
+
//# sourceMappingURL=adminUI__loadShare__react__loadShare__-BXV3lg18.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var I={},m={},Q={};const tr="federation-manifest.json",Pe=".json",et="FEDERATION_DEBUG",T={AT:"@",HYPHEN:"-",SLASH:"/"},v={[T.AT]:"scope_",[T.HYPHEN]:"_",[T.SLASH]:"__"},de={[v[T.AT]]:T.AT,[v[T.HYPHEN]]:T.HYPHEN,[v[T.SLASH]]:T.SLASH},Oe=":",Ie="mf-manifest.json",Ne="mf-stats.json",rr={NPM:"npm",APP:"app"},nr="__MF_DEVTOOLS_MODULE_INFO__",or="ENCODE_NAME_PREFIX",sr=".federation",ir={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ar=Object.freeze({__proto__:null}),cr=Object.freeze({__proto__:null}),lr=Object.freeze({__proto__:null}),ur=Object.freeze({__proto__:null});function ve(){return typeof window<"u"&&typeof window.document<"u"}function tt(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function fr(){try{if(ve()&&window.localStorage)return!!localStorage.getItem(et)}catch{return!1}return!1}function $e(){return typeof process<"u"&&Q&&Q.FEDERATION_DEBUG?!!Q.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:fr()}const rt=function(){return typeof process<"u"&&Q?Q:{}},nt="[ Federation Runtime ]",dr=(t,e,r=Oe)=>{const n=t.split(r),o=rt().NODE_ENV==="development"&&e,a="*",s=i=>i.startsWith("http")||i.includes(Pe);if(n.length>=2){let[i,...c]=n;t.startsWith(r)&&(i=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return s(l)?{name:i,entry:l}:{name:i,version:l||a}}else if(n.length===1){const[i]=n;return o&&s(o)?{name:i,entry:o}:{name:i,version:o||a}}else throw`Invalid entry value: ${t}`},hr=function(...t){return t.length?t.reduce((e,r)=>r?e?`${e}${Oe}${r}`:r:e,""):""},Le=function(t,e="",r=!1){try{const n=r?".js":"";return`${e}${t.replace(new RegExp(`${T.AT}`,"g"),v[T.AT]).replace(new RegExp(`${T.HYPHEN}`,"g"),v[T.HYPHEN]).replace(new RegExp(`${T.SLASH}`,"g"),v[T.SLASH])}${n}`}catch(n){throw n}},pr=function(t,e,r){try{let n=t;if(e){if(!n.startsWith(e))return n;n=n.replace(new RegExp(e,"g"),"")}return n=n.replace(new RegExp(`${v[T.AT]}`,"g"),de[v[T.AT]]).replace(new RegExp(`${v[T.SLASH]}`,"g"),de[v[T.SLASH]]).replace(new RegExp(`${v[T.HYPHEN]}`,"g"),de[v[T.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},mr=(t,e)=>{if(!t)return"";let r=t;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),Le(r,"__federation_expose_",e)},_r=(t,e)=>t?Le(t,"__federation_shared_",e):"",Er=(t,e)=>{if("getPublicPath"in t){let r;return t.getPublicPath.startsWith("function")?r=new Function("return "+t.getPublicPath)()():r=new Function(t.getPublicPath)(),`${r}${e}`}else return"publicPath"in t?!ve()&&!tt()&&"ssrPublicPath"in t?`${t.ssrPublicPath}${e}`:`${t.publicPath}${e}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",t,e),"")},yr=(t,e)=>{t||ot(e)},ot=t=>{throw new Error(`${nt}: ${t}`)},st=t=>{console.warn(`${nt}: ${t}`)};function gr(t){try{return JSON.stringify(t,null,2)}catch{return""}}const br=/^([\d^=v<>~]|[*xX]$)/;function Sr(t){return br.test(t)}const K=(t,e)=>{if(!t)return e;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const a=o.slice(1);return a.endsWith("/")?a.slice(0,-1):a}return o})(t);return n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e};function it(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Rr(t,e={}){const{remotes:r={},overrides:n={},version:o}=e;let a;const s=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&o?it(o):t.metaData.publicPath:t.metaData.getPublicPath,i=Object.keys(n);let c={};Object.keys(r).length||(c=t.remotes?.reduce((E,b)=>{let $;const M=b.federationContainerName;return i.includes(M)?$=n[M]:"version"in b?$=b.version:$=b.entry,E[M]={matchedVersion:$},E},{})||{}),Object.keys(r).forEach(E=>c[E]={matchedVersion:i.includes(E)?n[E]:r[E]});const{remoteEntry:{path:l,name:u,type:d},types:f={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:p},globalName:_,ssrRemoteEntry:g}=t.metaData,{exposes:h}=t;let y={version:o||"",buildVersion:p,globalName:_,remoteEntry:K(l,u),remoteEntryType:d,remoteTypes:K(f.path,f.name),remoteTypesZip:f.zip||"",remoteTypesAPI:f.api||"",remotesInfo:c,shared:t?.shared.map(E=>({assets:E.assets,sharedName:E.name,version:E.version})),modules:h?.map(E=>({moduleName:E.name,modulePath:E.path,assets:E.assets}))};if(t.metaData?.prefetchInterface){const E=t.metaData.prefetchInterface;y={...y,prefetchInterface:E}}if(t.metaData?.prefetchEntry){const{path:E,name:b,type:$}=t.metaData.prefetchEntry;y={...y,prefetchEntry:K(E,b),prefetchEntryType:$}}if("publicPath"in t.metaData?a={...y,publicPath:s(),ssrPublicPath:t.metaData.ssrPublicPath}:a={...y,getPublicPath:s()},g){const E=K(g.path,g.name);a.ssrRemoteEntry=E,a.ssrRemoteEntryType=g.type||"commonjs-module"}return a}function Ir(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(Pe))}function Nr(t){if(!t)return{statsFileName:Ne,manifestFileName:Ie};let e=typeof t=="boolean"?"":t.filePath||"",r=typeof t=="boolean"?"":t.fileName||"";const n=".json",o=c=>c.endsWith(n)?c:`${c}${n}`,a=(c,l)=>c.replace(n,`${l}${n}`),s=r?o(r):Ie,i=r?a(s,"-stats"):Ne;return{statsFileName:K(e,i),manifestFileName:K(e,s)}}const at="[ Module Federation ]",Z=console,$r=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Tr(){try{const t=new Error().stack;if(!t)return;const[,...e]=t.split(`
|
|
2
|
+
`),r=e.filter(o=>!$r.some(a=>o.includes(a)));return r.length?`Stack trace:
|
|
3
|
+
${r.slice(0,5).join(`
|
|
4
|
+
`)}`:void 0}catch{return}}class ct{constructor(e,r=Z){this.prefix=e,this.delegate=r??Z}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??Z}emit(e,r){const n=this.delegate,a=$e()?Tr():void 0,s=a?[...r,a]:r,i=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];case"debug":default:return["debug","log"]}})();for(const c of i){const l=n[c];if(typeof l=="function"){l.call(n,this.prefix,...s);return}}for(const c of i){const l=Z[c];if(typeof l=="function"){l.call(Z,this.prefix,...s);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){$e()&&this.emit("debug",e)}}function lt(t){return new ct(t)}function ut(t){const e=new ct(t);return Object.defineProperty(e,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),e}function Mr(t,e,r){if(t.__mf_infrastructure_logger__&&e?.getInfrastructureLogger)try{const n=e.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&t.setDelegate(n)}catch{t.setDelegate(void 0)}}const wr=lt(at),Ar=ut(at);async function Fe(t,e){try{return await t()}catch(r){!e&&st(r);return}}function De(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function ft(t){let e=null,r=!0,n=2e4,o;const a=document.getElementsByTagName("script");for(let i=0;i<a.length;i++){const c=a[i],l=c.getAttribute("src");if(l&&De(l,t.url)){e=c,r=!1;break}}if(!e){const i=t.attrs;e=document.createElement("script"),e.type=i?.type==="module"?"module":"text/javascript";let c;t.createScriptHook&&(c=t.createScriptHook(t.url,t.attrs),c instanceof HTMLScriptElement?e=c:typeof c=="object"&&("script"in c&&c.script&&(e=c.script),"timeout"in c&&c.timeout&&(n=c.timeout))),e.src||(e.src=t.url),i&&!c&&Object.keys(i).forEach(l=>{e&&(l==="async"||l==="defer"?e[l]=i[l]:e.getAttribute(l)||e.setAttribute(l,i[l]))})}const s=async(i,c)=>{clearTimeout(o);const l=()=>{c?.type==="error"?t?.onErrorCallback&&t?.onErrorCallback(c):t?.cb&&t?.cb()};if(e&&(e.onerror=null,e.onload=null,Fe(()=>{const{needDeleteScript:u=!0}=t;u&&e?.parentNode&&e.parentNode.removeChild(e)}),i&&typeof i=="function")){const u=i(c);if(u instanceof Promise){const d=await u;return l(),d}return l(),u}l()};return e.onerror=s.bind(null,e.onerror),e.onload=s.bind(null,e.onload),o=setTimeout(()=>{s(null,new Error(`Remote script "${t.url}" time-outed.`))},n),{script:e,needAttach:r}}function Pr(t){let e=null,r=!0;const n=document.getElementsByTagName("link");for(let a=0;a<n.length;a++){const s=n[a],i=s.getAttribute("href"),c=s.getAttribute("rel");if(i&&De(i,t.url)&&c===t.attrs.rel){e=s,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let a;const s=t.attrs;t.createLinkHook&&(a=t.createLinkHook(t.url,s),a instanceof HTMLLinkElement&&(e=a)),s&&!a&&Object.keys(s).forEach(i=>{e&&!e.getAttribute(i)&&e.setAttribute(i,s[i])})}const o=(a,s)=>{const i=()=>{s?.type==="error"?t?.onErrorCallback&&t?.onErrorCallback(s):t?.cb&&t?.cb()};if(e&&(e.onerror=null,e.onload=null,Fe(()=>{const{needDeleteLink:c=!0}=t;c&&e?.parentNode&&e.parentNode.removeChild(e)}),a)){const c=a(s);return i(),c}i()};return e.onerror=o.bind(null,e.onerror),e.onload=o.bind(null,e.onload),{link:e,needAttach:r}}function Or(t,e){const{attrs:r={},createScriptHook:n}=e;return new Promise((o,a)=>{const{script:s,needAttach:i}=ft({url:t,cb:o,onErrorCallback:a,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});i&&document.head.appendChild(s)})}const vr=(t,e,r,n)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},Lr=(t,e)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};function Fr(t,e,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return t?e:!1;if(n===!0)return e;if(n&&typeof n=="object")return{...e,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}const Dr=t=>t;m.BROWSER_LOG_KEY=et;m.ENCODE_NAME_PREFIX=or;m.EncodedNameTransformMap=de;m.FederationModuleManifest=tr;m.MANIFEST_EXT=Pe;m.MFModuleType=rr;m.MFPrefetchCommon=ir;m.MODULE_DEVTOOL_IDENTIFIER=nr;m.ManifestFileName=Ie;m.NameTransformMap=v;m.NameTransformSymbol=T;m.SEPARATOR=Oe;m.StatsFileName=Ne;m.TEMP_DIR=sr;m.assert=yr;m.bindLoggerToCompiler=Mr;m.composeKeyWithSeparator=hr;m.containerPlugin=ar;m.containerReferencePlugin=cr;m.createInfrastructureLogger=ut;m.createLink=Pr;m.createLogger=lt;m.createModuleFederationConfig=Dr;m.createScript=ft;m.createScriptNode=vr;m.decodeName=pr;m.encodeName=Le;m.error=ot;m.generateExposeFilename=mr;m.generateShareFilename=_r;m.generateSnapshotFromManifest=Rr;m.getManifestFileName=Nr;m.getProcessEnv=rt;m.getResourceUrl=Er;m.inferAutoPublicPath=it;m.infrastructureLogger=Ar;m.isBrowserEnv=ve;m.isDebugMode=$e;m.isManifestProvider=Ir;m.isReactNativeEnv=tt;m.isRequiredVersion=Sr;m.isStaticResourcesEqual=De;m.loadScript=Or;m.loadScriptNode=Lr;m.logger=wr;m.moduleFederationPlugin=lr;m.normalizeOptions=Fr;m.parseEntry=dr;m.safeToString=gr;m.safeWrapper=Fe;m.sharePlugin=ur;m.simpleJoinRemoteEntry=K;m.warn=st;var w={};const dt="RUNTIME-001",ht="RUNTIME-002",pt="RUNTIME-003",mt="RUNTIME-004",_t="RUNTIME-005",Et="RUNTIME-006",yt="RUNTIME-007",gt="RUNTIME-008",bt="RUNTIME-009",St="TYPE-001",Rt="BUILD-001",It="BUILD-002",kr=t=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${t.split("-")[0].toLowerCase()}/${t}`,Hr=(t,e,r,n)=>{const o=[`${[e[t]]} #${t}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(kr(t)),n&&o.push(`Original Error Message:
|
|
5
|
+
${n}`),o.join(`
|
|
6
|
+
`)},Nt={[dt]:"Failed to get remoteEntry exports.",[ht]:'The remote entry interface does not contain "init"',[pt]:"Failed to get manifest.",[mt]:"Failed to locate remote.",[_t]:"Invalid loadShareSync function call from bundler runtime",[Et]:"Invalid loadShareSync function call from runtime",[yt]:"Failed to get remote snapshot.",[gt]:"Failed to load script resources.",[bt]:"Please call createInstance first."},$t={[St]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Tt={[Rt]:"Failed to find expose module.",[It]:"PublicPath is required in prod mode."},Cr={...Nt,...$t,...Tt};w.BUILD_001=Rt;w.BUILD_002=It;w.RUNTIME_001=dt;w.RUNTIME_002=ht;w.RUNTIME_003=pt;w.RUNTIME_004=mt;w.RUNTIME_005=_t;w.RUNTIME_006=Et;w.RUNTIME_007=yt;w.RUNTIME_008=gt;w.RUNTIME_009=bt;w.TYPE_001=St;w.buildDescMap=Tt;w.errorDescMap=Cr;w.getShortErrorMsg=Hr;w.runtimeDescMap=Nt;w.typeDescMap=$t;var S=m,R=w;const z="[ Federation Runtime ]",Te=S.createLogger(z);function O(t,e){t||x(e)}function x(t){throw t instanceof Error?(t.message.startsWith(z)||(t.message=`${z}: ${t.message}`),t):new Error(`${z}: ${t}`)}function ce(t){t instanceof Error&&(t.message.startsWith(z)||(t.message=`${z}: ${t.message}`)),Te.warn(t)}function qe(t,e){return t.findIndex(r=>r===e)===-1&&t.push(e),t}function ne(t){return"version"in t&&t.version?`${t.name}:${t.version}`:"entry"in t&&t.entry?`${t.name}:${t.entry}`:`${t.name}`}function ke(t){return typeof t.entry<"u"}function Mt(t){return!t.entry.includes(".json")}async function Gr(t,e){try{return await t()}catch(r){!e&&ce(r);return}}function He(t){return t&&typeof t=="object"}const xr=Object.prototype.toString;function Ur(t){return xr.call(t)==="[object Object]"}function Br(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function wt(t){return Array.isArray(t)?t:[t]}function At(t){const e={url:"",type:"global",globalName:""};return S.isBrowserEnv()||S.isReactNativeEnv()?"remoteEntry"in t?{url:t.remoteEntry,type:t.remoteEntryType,globalName:t.globalName}:e:"ssrRemoteEntry"in t?{url:t.ssrRemoteEntry||e.url,type:t.ssrRemoteEntryType||e.type,globalName:t.globalName}:e}const Vr=(t,e)=>{let r;return t.endsWith("/")?r=t.slice(0,-1):r=t,e.startsWith(".")&&(e=e.slice(1)),r=r+e,r},N=typeof globalThis=="object"?globalThis:window,L=(()=>{try{return document.defaultView}catch{return N}})(),q=L;function he(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,writable:!0})}function pe(t,e){return Object.hasOwnProperty.call(t,e)}pe(N,"__GLOBAL_LOADING_REMOTE_ENTRY__")||he(N,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const V=N.__GLOBAL_LOADING_REMOTE_ENTRY__;function Pt(t){pe(t,"__VMOK__")&&!pe(t,"__FEDERATION__")&&he(t,"__FEDERATION__",t.__VMOK__),pe(t,"__FEDERATION__")||(he(t,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),he(t,"__VMOK__",t.__FEDERATION__)),t.__FEDERATION__.__GLOBAL_PLUGIN__??=[],t.__FEDERATION__.__INSTANCES__??=[],t.__FEDERATION__.moduleInfo??={},t.__FEDERATION__.__SHARE__??={},t.__FEDERATION__.__MANIFEST_LOADING__??={},t.__FEDERATION__.__PRELOADED_MAP__??=new Map}Pt(N);Pt(L);function Ot(){N.__FEDERATION__.__GLOBAL_PLUGIN__=[],N.__FEDERATION__.__INSTANCES__=[],N.__FEDERATION__.moduleInfo={},N.__FEDERATION__.__SHARE__={},N.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(V).forEach(t=>{delete V[t]})}function vt(t){N.__FEDERATION__.__INSTANCES__.push(t)}function Lt(){return N.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ft(t,e=S.isDebugMode()){e&&(N.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,N.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.21.6")}function j(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const n=Object.keys(t);for(const o of n){const[a,s]=o.split(":"),i=`${a}:${e}`,c=t[i];if(c)return{value:c,key:i}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const Ee=()=>L.__FEDERATION__.moduleInfo,Dt=(t,e)=>{const r=ne(t),n=j(e,r).value;if(n&&!n.version&&"version"in t&&t.version&&(n.version=t.version),n)return n;if("version"in t&&t.version){const{version:o,...a}=t,s=ne(a),i=j(L.__FEDERATION__.moduleInfo,s).value;if(i?.version===o)return i}},ee=t=>Dt(t,L.__FEDERATION__.moduleInfo),Me=(t,e)=>{const r=ne(t);return L.__FEDERATION__.moduleInfo[r]=e,L.__FEDERATION__.moduleInfo},Ce=t=>(L.__FEDERATION__.moduleInfo={...L.__FEDERATION__.moduleInfo,...t},()=>{const e=Object.keys(t);for(const r of e)delete L.__FEDERATION__.moduleInfo[r]}),ye=(t,e)=>{const r=e||`__FEDERATION_${t}:custom__`,n=N[r];return{remoteEntryKey:r,entryExports:n}},kt=t=>{const{__GLOBAL_PLUGIN__:e}=L.__FEDERATION__;t.forEach(r=>{e.findIndex(n=>n.name===r.name)===-1?e.push(r):ce(`The plugin ${r.name} has been registered.`)})},Ht=()=>L.__FEDERATION__.__GLOBAL_PLUGIN__,Ct=t=>N.__FEDERATION__.__PRELOADED_MAP__.get(t),Gt=t=>N.__FEDERATION__.__PRELOADED_MAP__.set(t,!0),le="default",xt="global",ze="[0-9A-Za-z-]+",Ge=`(?:\\+(${ze}(?:\\.${ze})*))`,te="0|[1-9]\\d*",me="[0-9]+",Ut="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Ye=`(?:${me}|${Ut})`,Wr=`(?:-?(${Ye}(?:\\.${Ye})*))`,Xe=`(?:${te}|${Ut})`,Bt=`(?:-(${Xe}(?:\\.${Xe})*))`,be=`${te}|x|X|\\*`,J=`[v=\\s]*(${be})(?:\\.(${be})(?:\\.(${be})(?:${Bt})?${Ge}?)?)?`,jr=`^\\s*(${J})\\s+-\\s+(${J})\\s*$`,Kr=`(${me})\\.(${me})\\.(${me})`,qr=`[v=\\s]*${Kr}${Wr}?${Ge}?`,xe="((?:<|>)?=?)",zr=`(\\s*)${xe}\\s*(${qr}|${J})`,Vt="(?:~>?)",Yr=`(\\s*)${Vt}\\s+`,Wt="(?:\\^)",Xr=`(\\s*)${Wt}\\s+`,Jr="(<|>)?=?\\s*\\*",Zr=`^${Wt}${J}$`,Qr=`(${te})\\.(${te})\\.(${te})`,en=`v?${Qr}${Bt}?${Ge}?`,tn=`^${Vt}${J}$`,rn=`^${xe}\\s*${J}$`,nn=`^${xe}\\s*(${en})$|^$`,on="^\\s*>=\\s*0.0.0\\s*$";function U(t){return new RegExp(t)}function P(t){return!t||t.toLowerCase()==="x"||t==="*"}function jt(...t){return e=>t.reduce((r,n)=>n(r),e)}function Je(t){return t.match(U(nn))}function Ze(t,e,r,n){const o=`${t}.${e}.${r}`;return n?`${o}-${n}`:o}function sn(t){return t.replace(U(jr),(e,r,n,o,a,s,i,c,l,u,d,f)=>(P(n)?r="":P(o)?r=`>=${n}.0.0`:P(a)?r=`>=${n}.${o}.0`:r=`>=${r}`,P(l)?c="":P(u)?c=`<${Number(l)+1}.0.0-0`:P(d)?c=`<${l}.${Number(u)+1}.0-0`:f?c=`<=${l}.${u}.${d}-${f}`:c=`<=${c}`,`${r} ${c}`.trim()))}function an(t){return t.replace(U(zr),"$1$2$3")}function cn(t){return t.replace(U(Yr),"$1~")}function ln(t){return t.replace(U(Xr),"$1^")}function un(t){return t.trim().split(/\s+/).map(e=>e.replace(U(Zr),(r,n,o,a,s)=>P(n)?"":P(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:P(a)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:s?n==="0"?o==="0"?`>=${n}.${o}.${a}-${s} <${n}.${o}.${Number(a)+1}-0`:`>=${n}.${o}.${a}-${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${a}-${s} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${a} <${n}.${o}.${Number(a)+1}-0`:`>=${n}.${o}.${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${a} <${Number(n)+1}.0.0-0`)).join(" ")}function fn(t){return t.trim().split(/\s+/).map(e=>e.replace(U(tn),(r,n,o,a,s)=>P(n)?"":P(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:P(a)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:s?`>=${n}.${o}.${a}-${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${a} <${n}.${Number(o)+1}.0-0`)).join(" ")}function dn(t){return t.split(/\s+/).map(e=>e.trim().replace(U(rn),(r,n,o,a,s,i)=>{const c=P(o),l=c||P(a),u=l||P(s);return n==="="&&u&&(n=""),i="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(l&&(a=0),s=0,n===">"?(n=">=",l?(o=Number(o)+1,a=0,s=0):(a=Number(a)+1,s=0)):n==="<="&&(n="<",l?o=Number(o)+1:a=Number(a)+1),n==="<"&&(i="-0"),`${n+o}.${a}.${s}${i}`):l?`>=${o}.0.0${i} <${Number(o)+1}.0.0-0`:u?`>=${o}.${a}.0${i} <${o}.${Number(a)+1}.0-0`:r})).join(" ")}function hn(t){return t.trim().replace(U(Jr),"")}function pn(t){return t.trim().replace(U(on),"")}function _e(t,e){return t=Number(t)||t,e=Number(e)||e,t>e?1:t===e?0:-1}function mn(t,e){const{preRelease:r}=t,{preRelease:n}=e;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,a=r.length;o<=a;o++){const s=r[o],i=n[o];if(s!==i)return s===void 0&&i===void 0?0:s?i?_e(s,i):-1:1}return 0}function ue(t,e){return _e(t.major,e.major)||_e(t.minor,e.minor)||_e(t.patch,e.patch)||mn(t,e)}function Se(t,e){return t.version===e.version}function _n(t,e){switch(t.operator){case"":case"=":return Se(t,e);case">":return ue(t,e)<0;case">=":return Se(t,e)||ue(t,e)<0;case"<":return ue(t,e)>0;case"<=":return Se(t,e)||ue(t,e)>0;case void 0:return!0;default:return!1}}function En(t){return jt(un,fn,dn,hn)(t)}function yn(t){return jt(sn,an,cn,ln)(t.trim()).split(/\s+/).join(" ")}function re(t,e){if(!t)return!1;const r=Je(t);if(!r)return!1;const[,n,,o,a,s,i]=r,c={operator:n,version:Ze(o,a,s,i),major:o,minor:a,patch:s,preRelease:i?.split(".")},l=e.split("||");for(const u of l){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const f=yn(d);if(!f.trim())return!0;const p=f.split(" ").map(h=>En(h)).join(" ");if(!p.trim())return!0;const _=p.split(/\s+/).map(h=>pn(h)).filter(Boolean);if(_.length===0)continue;let g=!0;for(const h of _){const y=Je(h);if(!y){g=!1;break}const[,E,,b,$,M,B]=y,A={operator:E,version:Ze(b,$,M,B),major:b,minor:$,patch:M,preRelease:B?.split(".")};if(!_n(A,c)){g=!1;break}}if(g)return!0}catch(f){console.error(`[semver] Error processing range part "${d}":`,f);continue}}return!1}function gn(t,e,r,n){let o;return"get"in t?o=t.get:"lib"in t?o=()=>Promise.resolve(t.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)}),{deps:[],useIn:[],from:e,loading:null,...t,shareConfig:{requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1,...t.shareConfig},get:o,loaded:t?.loaded||"lib"in t?!0:void 0,version:t.version??"0",scope:Array.isArray(t.scope)?t.scope:[t.scope??"default"],strategy:(t.strategy??n)||"version-first"}}function Kt(t,e){const r=e.shared||{},n=e.name,o=Object.keys(r).reduce((s,i)=>{const c=wt(r[i]);return s[i]=s[i]||[],c.forEach(l=>{s[i].push(gn(l,n,i,e.shareStrategy))}),s},{}),a={...t.shared};return Object.keys(o).forEach(s=>{a[s]?o[s].forEach(i=>{a[s].find(l=>l.version===i.version)||a[s].push(i)}):a[s]=o[s]}),{shared:a,shareInfos:o}}function oe(t,e){const r=n=>{if(!Number.isNaN(Number(n))){const a=n.split(".");let s=n;for(let i=0;i<3-a.length;i++)s+=".0";return s}return n};return!!re(r(t),`<=${r(e)}`)}const Ue=(t,e)=>{const r=e||function(n,o){return oe(n,o)};return Object.keys(t).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},Be=t=>!!t.loaded||typeof t.lib=="function",bn=t=>!!t.loading;function Sn(t,e,r){const n=t[e][r],o=function(a,s){return!Be(n[a])&&oe(a,s)};return Ue(t[e][r],o)}function Rn(t,e,r){const n=t[e][r],o=function(a,s){const i=c=>Be(c)||bn(c);return i(n[s])?i(n[a])?!!oe(a,s):!0:i(n[a])?!1:oe(a,s)};return Ue(t[e][r],o)}function In(t){return t==="loaded-first"?Rn:Sn}function Y(t,e,r,n){if(!t)return;const{shareConfig:o,scope:a=le,strategy:s}=r,i=Array.isArray(a)?a:[a];for(const c of i)if(o&&t[c]&&t[c][e]){const{requiredVersion:l}=o,d=In(s)(t,c,e),f=()=>{if(o.singleton){if(typeof l=="string"&&!re(d,l)){const g=`Version ${d} from ${d&&t[c][e][d].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${l})`;o.strictVersion?x(g):ce(g)}return t[c][e][d]}else{if(l===!1||l==="*"||re(d,l))return t[c][e][d];for(const[g,h]of Object.entries(t[c][e]))if(re(g,l))return h}},p={shareScopeMap:t,scope:c,pkgName:e,version:d,GlobalFederation:q.__FEDERATION__,resolver:f};return(n.emit(p)||p).resolver()}}function Ve(){return q.__FEDERATION__.__SHARE__}function Qe(t){const{pkgName:e,extraOptions:r,shareInfos:n}=t,o=s=>{if(!s)return;const i={};s.forEach(u=>{i[u.version]=u});const l=Ue(i,function(u,d){return!Be(i[u])&&oe(u,d)});return i[l]},a=r?.resolver??o;return Object.assign({},a(n[e]),r?.customShareInfo)}function Nn(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function We(t,e){for(const r of t){const n=e.startsWith(r.name);let o=e.replace(r.name,"");if(n){if(o.startsWith("/")){const i=r.name;return o=`.${o}`,{pkgNameOrAlias:i,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const a=r.alias&&e.startsWith(r.alias);let s=r.alias&&e.replace(r.alias,"");if(r.alias&&a){if(s&&s.startsWith("/")){const i=r.alias;return s=`.${s}`,{pkgNameOrAlias:i,expose:s,remote:r}}else if(s==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function $n(t,e){for(const r of t)if(e===r.name||r.alias&&e===r.alias)return r}function Tn(t,e){const r=Ht(),n=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(o=>{t?.find(a=>a.name!==o.name)&&t.push(o)}),t&&t.length>0&&t.forEach(o=>{n.forEach(a=>{a.applyPlugin(o,e)})}),t}const qt=".then(callbacks[0]).catch(callbacks[1])";async function Mn({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${qt}`)([r,n]):import(t).then(r).catch(n)}catch(o){n(o)}})}async function wn({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(n):new Function("callbacks",`System.import("${t}")${qt}`)([r,n])}catch(o){n(o)}})}function zt(t,e,r){const{remoteEntryKey:n,entryExports:o}=ye(t,e);return O(o,R.getShortErrorMsg(R.RUNTIME_001,R.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:n})),o}async function An({name:t,globalName:e,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:a}=ye(t,e);if(a)return a;const s=o?o(r):r;return S.loadScript(s,{attrs:{},createScriptHook:(i,c)=>{const l=n.lifecycle.createScript.emit({url:i,attrs:c});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>zt(t,e,r)).catch(i=>{throw O(void 0,R.getShortErrorMsg(R.RUNTIME_008,R.runtimeDescMap,{remoteName:t,resourceUrl:r})),i})}async function Pn({remoteInfo:t,remoteEntryExports:e,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:a,name:s,type:i}=t;switch(i){case"esm":case"module":return Mn({entry:o,remoteEntryExports:e});case"system":return wn({entry:o,remoteEntryExports:e});default:return An({entry:o,globalName:a,name:s,loaderHook:r,getEntryUrl:n})}}async function On({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:n,name:o,type:a}=t,{entryExports:s}=ye(o,n);return s||S.loadScriptNode(r,{attrs:{name:o,globalName:n,type:a},loaderHook:{createScriptHook:(i,c={})=>{const l=e.lifecycle.createScript.emit({url:i,attrs:c});if(l&&"url"in l)return l}}}).then(()=>zt(o,n,r)).catch(i=>{throw i})}function we(t){const{entry:e,name:r}=t;return S.composeKeyWithSeparator(r,e)}async function se(t){const{origin:e,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:a=!1}=t,s=we(n);if(r)return r;if(!V[s]){const i=e.remoteHandler.hooks.lifecycle.loadEntry,c=e.loaderHook;V[s]=i.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||(!0?Pn({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o}):On({remoteInfo:n,loaderHook:c}))).catch(async l=>{const u=we(n);if(l instanceof Error&&l.message.includes(R.RUNTIME_008)&&!a){const f=_=>se({..._,_inErrorHandling:!0}),p=await e.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:f,origin:e,remoteInfo:n,remoteEntryExports:r,globalLoading:V,uniqueKey:u});if(p)return p}throw l})}return V[s]}function ie(t){return{...t,entry:"entry"in t?t.entry:"",type:t.type||xt,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||le}}function Yt(t){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...t}}function vn(t,e){return e.map(r=>{const n=$n(t,r.nameOrAlias);return O(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&S.safeToString({remoteInfo:n,remotes:t})}`),{remote:n,preloadConfig:Yt(r)}})}function Ln(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function je(t,e,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:a,entryAssets:s}=r;if(e.options.inBrowser){if(s.forEach(i=>{const{moduleInfo:c}=i,l=e.moduleCache.get(t.name);se(l?{origin:e,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}:{origin:e,remoteInfo:c,remoteEntryExports:void 0})}),n){const i={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:u}=S.createLink({url:c,cb:()=>{},attrs:i,createLinkHook:(d,f)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(p instanceof HTMLLinkElement)return p}});u&&document.head.appendChild(l)})}else{const i={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:u}=S.createLink({url:c,cb:()=>{},attrs:i,createLinkHook:(d,f)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(p instanceof HTMLLinkElement)return p},needDeleteLink:!1});u&&document.head.appendChild(l)})}if(n){const i={rel:"preload",as:"script"};a.forEach(c=>{const{link:l,needAttach:u}=S.createLink({url:c,cb:()=>{},attrs:i,createLinkHook:(d,f)=>{const p=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(p instanceof HTMLLinkElement)return p}});u&&document.head.appendChild(l)})}else{const i={fetchpriority:"high",type:t?.type==="module"?"module":"text/javascript"};a.forEach(c=>{const{script:l,needAttach:u}=S.createScript({url:c,cb:()=>{},attrs:i,createScriptHook:(d,f)=>{const p=e.loaderHook.lifecycle.createScript.emit({url:d,attrs:f});if(p instanceof HTMLScriptElement)return p},needDeleteScript:!0});u&&document.head.appendChild(l)})}}}const Fn={getRegisteredShare:Y,getGlobalShareScope:Ve},Dn={Global:q,nativeGlobal:L,resetFederationGlobalInfo:Ot,setGlobalFederationInstance:vt,getGlobalFederationConstructor:Lt,setGlobalFederationConstructor:Ft,getInfoWithoutType:j,getGlobalSnapshot:Ee,getTargetSnapshotInfoByModuleInfo:Dt,getGlobalSnapshotInfoByModuleInfo:ee,setGlobalSnapshotInfoByModuleInfo:Me,addGlobalSnapshot:Ce,getRemoteEntryExports:ye,registerGlobalPlugins:kt,getGlobalHostPlugins:Ht,getPreloaded:Ct,setPreloaded:Gt};var kn={global:Dn,share:Fn,utils:{matchRemoteWithNameAndExpose:We,preloadAssets:je,getRemoteInfo:ie}};class Ke{constructor({remoteInfo:e,host:r}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=r}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;return e=await se({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports}),O(e,`remoteEntryExports is undefined
|
|
7
|
+
${S.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,n,o){const{loadFactory:a=!0}=n||{loadFactory:!0},s=await this.getEntry();if(!this.inited){const d=this.host.shareScopeMap,f=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];f.length||f.push("default"),f.forEach(y=>{d[y]||(d[y]={})});const p=d[f[0]],_=[],g={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?f:this.remoteInfo.shareScope||"default"};Object.defineProperty(g,"shareScopeMap",{value:d,enumerable:!1});const h=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:p,remoteEntryInitOptions:g,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof s?.init>"u"&&x(R.getShortErrorMsg(R.RUNTIME_002,R.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await s.init(h.shareScope,h.initScope,h.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...h,id:e,remoteSnapshot:o,remoteEntryExports:s})}this.lib=s,this.inited=!0;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:r,moduleInfo:this.remoteInfo}),i||(i=await s.get(r)),O(i,`${ne(this.remoteInfo)} remote don't export ${r}.`);const c=Vr(this.remoteInfo.name,r),l=this.wraperFactory(i,c);return a?await l():l}wraperFactory(e,r){function n(o,a){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:a,enumerable:!1})}return e instanceof Promise?async()=>{const o=await e();return n(o,r),o}:()=>{const o=e();return n(o,r),o}}}class D{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const r=this;this.on(function n(...o){return r.remove(n),e.apply(null,o)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(n=>{r=n(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}}class C extends D{emit(...e){let r;const n=Array.from(this.listeners);if(n.length>0){let o=0;const a=s=>s===!1?!1:o<n.length?Promise.resolve(n[o++].apply(null,e)).then(a):s;r=a()}return Promise.resolve(r)}}function Xt(t,e){if(!He(e))return!1;if(t!==e){for(const r in t)if(!(r in e))return!1}return!0}class ae extends D{constructor(e){super(),this.onerror=x,this.type=e}emit(e){He(e)||x(`The data for the "${this.type}" hook should be an object.`);for(const r of this.listeners)try{const n=r(e);if(Xt(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(n){ce(n),this.onerror(n)}return e}}class W extends D{constructor(e){super(),this.onerror=x,this.type=e}emit(e){He(e)||x(`The response data for the "${this.type}" hook must be an object.`);const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>(ce(s),this.onerror(s),e),a=s=>{if(Xt(e,s)){if(e=s,n<r.length)try{return Promise.resolve(r[n++](e)).then(a,o)}catch(i){return o(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(a(e))}return Promise.resolve(e)}}class X{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,r){O(Ur(e),"Plugin configuration is invalid.");const n=e.name;O(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(r),Object.keys(this.lifecycle).forEach(o=>{const a=e[o];a&&this.lifecycle[o].on(a)}))}removePlugin(e){O(e,"A name is required.");const r=this.registerPlugins[e];O(r,`The plugin "${e}" is not registered.`),Object.keys(r).forEach(n=>{n!=="name"&&this.lifecycle[n].remove(r[n])})}}function Jt(t,e){const r=At(e);r.url||x(`The attribute remoteEntry of ${t.name} must not be undefined.`);let n=S.getResourceUrl(e,r.url);!S.isBrowserEnv()&&!n.startsWith("http")&&(n=`https:${n}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=n,t.version=e.version,t.buildVersion=e.buildVersion}function Hn(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:a,id:s}=t;if(!ke(e)||!Mt(e)){const{remoteSnapshot:i,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:s});Jt(a,i);const l={remote:e,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:a,remote:e,remoteSnapshot:i,globalSnapshot:c});return u&&je(a,o,u,!1),{...t,remoteSnapshot:i}}return t}}}function Cn(t){const e=t.split(":");return e.length===1?{name:e[0],version:void 0}:e.length===2?{name:e[0],version:e[1]}:{name:e[1],version:e[2]}}function Zt(t,e,r,n,o={},a){const s=ne(e),{value:i}=j(t,s),c=a||i;if(c&&!S.isManifestProvider(c)&&(r(c,e,n),c.remotesInfo)){const l=Object.keys(c.remotesInfo);for(const u of l){if(o[u])continue;o[u]=!0;const d=Cn(u),f=c.remotesInfo[u];Zt(t,{name:d.name,version:f.matchedVersion},r,!1,o,void 0)}}}const Re=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function Gn(t,e,r,n,o){const a=[],s=[],i=[],c=new Set,l=new Set,{options:u}=t,{preloadConfig:d}=e,{depsRemote:f}=d;if(Zt(n,r,(h,y,E)=>{let b;if(E)b=d;else if(Array.isArray(f)){const H=f.find(F=>F.nameOrAlias===y.name||F.nameOrAlias===y.alias);if(!H)return;b=Yt(H)}else if(f===!0)b=d;else return;const $=S.getResourceUrl(h,At(h).url);$&&i.push({name:y.name,moduleInfo:{name:y.name,entry:$,type:"remoteEntryType"in h?h.remoteEntryType:"global",entryGlobalName:"globalName"in h?h.globalName:y.name,shareScope:"",version:"version"in h?h.version:void 0},url:$});let M="modules"in h?h.modules:[];const B=Ln(b.exposes);B.length&&"modules"in h&&(M=h?.modules?.reduce((H,F)=>(B?.indexOf(F.moduleName)!==-1&&H.push(F),H),[]));function A(H){const F=H.map(G=>S.getResourceUrl(h,G));return b.filter?F.filter(b.filter):F}if(M){const H=M.length;for(let F=0;F<H;F++){const G=M[F],ge=`${y.name}/${G.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:G.moduleName==="."?y.name:ge,name:y.name,remoteSnapshot:h,preloadConfig:b,remote:y,origin:t}),!Ct(ge)&&(b.resourceCategory==="all"?(a.push(...A(G.assets.css.async)),a.push(...A(G.assets.css.sync)),s.push(...A(G.assets.js.async)),s.push(...A(G.assets.js.sync))):(b.resourceCategory="sync")&&(a.push(...A(G.assets.css.sync)),s.push(...A(G.assets.js.sync))),Gt(ge))}}},!0,{},o),o.shared&&o.shared.length>0){const h=(y,E)=>{const b=Y(t.shareScopeMap,E.sharedName,y,t.sharedHandler.hooks.lifecycle.resolveShare);b&&typeof b.lib=="function"&&(E.assets.js.sync.forEach($=>{c.add($)}),E.assets.css.sync.forEach($=>{l.add($)}))};o.shared.forEach(y=>{const E=u.shared?.[y.sharedName];if(!E)return;const b=y.version?E.find(M=>M.version===y.version):E;if(!b)return;wt(b).forEach(M=>{h(M,y)})})}const _=s.filter(h=>!c.has(h)&&!Re("script",h));return{cssAssets:a.filter(h=>!l.has(h)&&!Re("link",h)),jsAssetsWithoutEntry:_,entryAssets:i.filter(h=>!Re("script",h.url))}}const xn=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:a,remoteSnapshot:s}=t;return S.isBrowserEnv()?ke(o)&&Mt(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(Jt(n,s),Gn(e,r,n,a,s)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Qt(t,e){const r=ee({name:e.name,version:e.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&j(r.remotesInfo,t.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:Ee(),remoteSnapshot:ee({name:t.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ee(),remoteSnapshot:ee({name:t.name,version:"version"in t?t.version:void 0})}}class Un{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new X({beforeLoadRemoteSnapshot:new C("beforeLoadRemoteSnapshot"),loadSnapshot:new W("loadGlobalSnapshot"),loadRemoteSnapshot:new W("loadRemoteSnapshot"),afterLoadSnapshot:new W("afterLoadSnapshot")}),this.manifestLoading=q.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:r,expose:n}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e});let a=ee({name:this.HostInstance.options.name,version:this.HostInstance.options.version});a||(a={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},Ce({[this.HostInstance.options.name]:a})),a&&"remotesInfo"in a&&!j(a.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(a.remotesInfo={...a?.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:c}=this.getGlobalRemoteInfo(e),{remoteSnapshot:l,globalSnapshot:u}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:c});let d,f;if(l)if(S.isManifestProvider(l)){const p=S.isBrowserEnv()?l.remoteEntry:l.ssrRemoteEntry||l.remoteEntry||"",_=await this.getManifestJson(p,e,{}),g=Me({...e,entry:p},_);d=_,f=g}else{const{remoteSnapshot:p}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:l,from:"global"});d=p,f=u}else if(ke(e)){const p=await this.getManifestJson(e.entry,e,{}),_=Me(e,p),{remoteSnapshot:g}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:p,from:"global"});d=g,f=_}else x(R.getShortErrorMsg(R.RUNTIME_007,R.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(u)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:d}),{remoteSnapshot:d,globalSnapshot:f}}getGlobalRemoteInfo(e){return Qt(e,this.HostInstance)}async getManifestJson(e,r,n){const o=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],x(R.getShortErrorMsg(R.RUNTIME_003,R.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${i}`)))}return O(s.metaData&&s.exposes&&s.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,s),s},a=async()=>{const s=await o(),i=S.generateSnapshotFromManifest(s,{version:e}),{remoteSnapshot:c}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return c};return this.manifestLoading[e]||(this.manifestLoading[e]=a().then(s=>s)),this.manifestLoading[e]}}class Bn{constructor(e){this.hooks=new X({afterResolve:new W("afterResolve"),beforeLoadShare:new W("beforeLoadShare"),loadShare:new C,resolveShare:new ae("resolveShare"),initContainerShareScopeMap:new ae("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,r){const{shareInfos:n,shared:o}=Kt(e,r);return Object.keys(n).forEach(s=>{n[s].forEach(c=>{c.scope.forEach(l=>{this.shareScopeMap[l]?.[s]||this.setShared({pkgName:s,lib:c.lib,get:c.get,loaded:c.loaded||!!c.lib,shared:c,from:r.name})})})}),{shareInfos:n,shared:o}}async loadShare(e,r){const{host:n}=this,o=Qe({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o?.scope&&await Promise.all(o.scope.map(async l=>{await Promise.all(this.initializeSharing(l,{strategy:o.strategy}))}));const a=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:n.options.shared,origin:n}),{shareInfo:s}=a;O(s,`Cannot find ${e} Share in the ${n.options.name}. Please ensure that the ${e} Share parameters have been injected`);const i=Y(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare),c=l=>{l.useIn||(l.useIn=[]),qe(l.useIn,n.options.name)};if(i&&i.lib)return c(i),i.lib;if(i&&i.loading&&!i.loaded){const l=await i.loading;return i.loaded=!0,i.lib||(i.lib=l),c(i),l}else if(i){const u=(async()=>{const d=await i.get();return c(i),i.loaded=!0,i.lib=d,d})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:n.options.name,lib:null,loading:u}),u}else{if(r?.customShareInfo)return!1;const u=(async()=>{const d=await s.get();s.lib=d,s.loaded=!0,c(s);const f=Y(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare);return f&&(f.lib=d,f.loaded=!0,f.from=s.from),d})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:u}),u}}initializeSharing(e=le,r){const{host:n}=this,o=r?.from,a=r?.strategy;let s=r?.initScope;const i=[];if(o!=="build"){const{initTokens:_}=this;s||(s=[]);let g=_[e];if(g||(g=_[e]={from:this.host.name}),s.indexOf(g)>=0)return i;s.push(g)}const c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});const u=c[e],d=(_,g)=>{const{version:h,eager:y}=g;u[_]=u[_]||{};const E=u[_],b=E[h],$=!!(b&&(b.eager||b.shareConfig?.eager));(!b||b.strategy!=="loaded-first"&&!b.loaded&&(!y!=!$?y:l>b.from))&&(E[h]=g)},f=_=>_&&_.init&&_.init(c[e],s),p=async _=>{const{module:g}=await n.remoteHandler.getRemoteModuleAndOptions({id:_});if(g.getEntry){let h;try{h=await g.getEntry()}catch(y){h=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:y,from:"runtime",lifecycle:"beforeLoadShare",origin:n})}g.inited||(await f(h),g.inited=!0)}};return Object.keys(n.options.shared).forEach(_=>{n.options.shared[_].forEach(h=>{h.scope.includes(e)&&d(_,h)})}),(n.options.shareStrategy==="version-first"||a==="version-first")&&n.options.remotes.forEach(_=>{_.shareScope===e&&i.push(p(_.name))}),i}loadShareSync(e,r){const{host:n}=this,o=Qe({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o?.scope&&o.scope.forEach(i=>{this.initializeSharing(i,{strategy:o.strategy})});const a=Y(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),s=i=>{i.useIn||(i.useIn=[]),qe(i.useIn,n.options.name)};if(a){if(typeof a.lib=="function")return s(a),a.loaded||(a.loaded=!0,a.from===n.options.name&&(o.loaded=!0)),a.lib;if(typeof a.get=="function"){const i=a.get();if(!(i instanceof Promise))return s(a),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i,shared:a}),i}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const i=o.get();if(i instanceof Promise){const c=r?.from==="build"?R.RUNTIME_005:R.RUNTIME_006;throw new Error(R.getShortErrorMsg(c,R.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}return o.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(R.getShortErrorMsg(R.RUNTIME_006,R.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,n={}){const{host:o}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:o.options,origin:o,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:n,lib:o,loading:a,loaded:s,get:i}){const{version:c,scope:l="default",...u}=r;(Array.isArray(l)?l:[l]).forEach(f=>{if(this.shareScopeMap[f]||(this.shareScopeMap[f]={}),this.shareScopeMap[f][e]||(this.shareScopeMap[f][e]={}),!this.shareScopeMap[f][e][c]){this.shareScopeMap[f][e][c]={version:c,scope:[f],...u,lib:o,loaded:s,loading:a},i&&(this.shareScopeMap[f][e][c].get=i);return}const p=this.shareScopeMap[f][e][c];a&&!p.loading&&(p.loading=a),s&&!p.loaded&&(p.loaded=s),n&&p.from!==n&&(p.from=n)})}_setGlobalShareScopeMap(e){const r=Ve(),n=e.id||e.name;n&&!r[n]&&(r[n]=this.shareScopeMap)}}class Vn{constructor(e){this.hooks=new X({beforeRegisterRemote:new ae("beforeRegisterRemote"),registerRemote:new ae("registerRemote"),beforeRequest:new W("beforeRequest"),onLoad:new C("onLoad"),handlePreloadModule:new D("handlePreloadModule"),errorLoadRemote:new C("errorLoadRemote"),beforePreloadRemote:new C("beforePreloadRemote"),generatePreloadAssets:new C("generatePreloadAssets"),afterPreloadRemote:new C,loadEntry:new C}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,r){return(r.remotes||[]).reduce((o,a)=>(this.registerRemote(a,o,{force:!1}),o),e.remotes)}setIdToRemoteMap(e,r){const{remote:n,expose:o}=r,{name:a,alias:s}=n;if(this.idToRemoteMap[e]={name:n.name,expose:o},s&&e.startsWith(a)){const i=e.replace(a,s);this.idToRemoteMap[i]={name:n.name,expose:o};return}if(s&&e.startsWith(s)){const i=e.replace(s,a);this.idToRemoteMap[i]={name:n.name,expose:o}}}async loadRemote(e,r){const{host:n}=this;try{const{loadFactory:o=!0}=r||{loadFactory:!0},{module:a,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:c,remote:l,expose:u,id:d,remoteSnapshot:f}=i,p=await a.get(d,u,r,f),_=await this.hooks.lifecycle.onLoad.emit({id:d,pkgNameOrAlias:c,expose:u,exposeModule:o?p:void 0,exposeModuleFactory:o?void 0:p,remote:l,options:s,moduleInstance:a,origin:n});return this.setIdToRemoteMap(e,i),typeof _=="function"?_:p}catch(o){const{from:a="runtime"}=r||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:a,lifecycle:"onLoad",origin:n});if(!s)throw o;return s}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const n=vn(r.options.remotes,e);await Promise.all(n.map(async o=>{const{remote:a}=o,s=ie(a),{globalSnapshot:i,remoteSnapshot:c}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:o,remote:a,remoteInfo:s,globalSnapshot:i,remoteSnapshot:c});l&&je(s,r,l)}))}registerRemotes(e,r){const{host:n}=this;e.forEach(o=>{this.registerRemote(o,n.options.remotes,{force:r?.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:n}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(_){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!o)throw _}const{id:a}=o,s=We(r.options.remotes,a);O(s,R.getShortErrorMsg(R.RUNTIME_004,R.runtimeDescMap,{hostName:r.options.name,requestId:a}));const{remote:i}=s,c=ie(i),l=await r.sharedHandler.hooks.lifecycle.afterResolve.emit({id:a,...s,options:r.options,origin:r,remoteInfo:c}),{remote:u,expose:d}=l;O(u&&d,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${a}.`);let f=r.moduleCache.get(u.name);const p={host:r,remoteInfo:c};return f||(f=new Ke(p),r.moduleCache.set(u.name,f)),{module:f,moduleOptions:p,remoteMatchInfo:l}}registerRemote(e,r,n){const{host:o}=this,a=()=>{if(e.alias){const i=r.find(c=>e.alias&&(c.name.startsWith(e.alias)||c.alias?.startsWith(e.alias)));O(!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&&S.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=le),e.type||(e.type=xt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const s=r.find(i=>i.name===e.name);if(!s)a(),r.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."];n?.force&&(this.removeRemote(s),a(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),S.warn(i.join(" ")))}}removeRemote(e){try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(s=>s.name===n);o!==-1&&r.options.remotes.splice(o,1);const a=r.moduleCache.get(e.name);if(a){const s=a.remoteInfo,i=s.entryGlobalName;N[i]&&(Object.getOwnPropertyDescriptor(N,i)?.configurable?delete N[i]:N[i]=void 0);const c=we(a.remoteInfo);V[c]&&delete V[c],r.snapshotHandler.manifestCache.delete(s.entry);let l=s.buildVersion?S.composeKeyWithSeparator(s.name,s.buildVersion):s.name;const u=N.__FEDERATION__.__INSTANCES__.findIndex(f=>s.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=N.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const p=Ve();let _=!0;const g=[];Object.keys(p).forEach(h=>{const y=p[h];y&&Object.keys(y).forEach(E=>{const b=y[E];b&&Object.keys(b).forEach($=>{const M=b[$];M&&Object.keys(M).forEach(B=>{const A=M[B];A&&typeof A=="object"&&A.from===s.name&&(A.loaded||A.loading?(A.useIn=A.useIn.filter(H=>H!==s.name),A.useIn.length?_=!1:g.push([h,E,$,B])):g.push([h,E,$,B]))})})})}),_&&(f.shareScopeMap={},delete p[l]),g.forEach(([h,y,E,b])=>{delete p[h]?.[y]?.[E]?.[b]}),N.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Qt(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&j(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],q.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete q.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Te.log("removeRemote fail: ",r)}}}const Wn=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;class jn{constructor(e){this.hooks=new X({beforeInit:new ae("beforeInit"),init:new D,beforeInitContainer:new W("beforeInitContainer"),initContainer:new W("initContainer")}),this.version="0.21.6",this.moduleCache=new Map,this.loaderHook=new X({getModuleInfo:new D,createScript:new D,createLink:new D,fetch:new C,loadEntryError:new C,getModuleFactory:new C}),this.bridgeHook=new X({beforeBridgeRender:new D,afterBridgeRender:new D,beforeBridgeDestroy:new D,afterBridgeDestroy:new D});const r=Wn?[Hn(),xn()]:[],n={id:Nn(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:S.isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new Un(this),this.sharedHandler=new Bn(this),this.remoteHandler=new Vn(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){this.registerPlugins(e.plugins);const r=this.formatOptions(this.options,e);return this.options=r,r}async loadShare(e,r){return this.sharedHandler.loadShare(e,r)}loadShareSync(e,r){return this.sharedHandler.loadShareSync(e,r)}initializeSharing(e=le,r){return this.sharedHandler.initializeSharing(e,r)}initRawContainer(e,r,n){const o=ie({name:e,entry:r}),a=new Ke({host:this,remoteInfo:o});return a.remoteEntryExports=n,this.moduleCache.set(e,a),a}async loadRemote(e,r){return this.remoteHandler.loadRemote(e,r)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,r,n={}){this.sharedHandler.initShareScopeMap(e,r,n)}formatOptions(e,r){const{shared:n}=Kt(e,r),{userOptions:o,options:a}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:n}),s=this.remoteHandler.formatAndRegisterRemote(a,o),{shared:i}=this.sharedHandler.registerShared(a,o),c=[...a.plugins];o.plugins&&o.plugins.forEach(u=>{c.includes(u)||c.push(u)});const l={...e,...r,plugins:c,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:l}),l}registerPlugins(e){const r=Tn(e,this);this.options.plugins=this.options.plugins.reduce((n,o)=>(o&&n&&!n.find(a=>a.name===o.name)&&n.push(o),n),r||[])}registerRemotes(e,r){return this.remoteHandler.registerRemotes(e,r)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}}var Kn=Object.freeze({__proto__:null});I.loadScript=S.loadScript;I.loadScriptNode=S.loadScriptNode;I.CurrentGlobal=N;I.Global=q;I.Module=Ke;I.ModuleFederation=jn;I.addGlobalSnapshot=Ce;I.assert=O;I.getGlobalFederationConstructor=Lt;I.getGlobalSnapshot=Ee;I.getInfoWithoutType=j;I.getRegisteredShare=Y;I.getRemoteEntry=se;I.getRemoteInfo=ie;I.helpers=kn;I.isStaticResourcesEqual=Br;I.matchRemoteWithNameAndExpose=We;I.registerGlobalPlugins=kt;I.resetFederationGlobalInfo=Ot;I.safeWrapper=Gr;I.satisfy=re;I.setGlobalFederationConstructor=Ft;I.setGlobalFederationInstance=vt;I.types=Kn;var er={},qn=I;function zn(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function Yn(t,e){const r=zn();return qn.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===t&&!n.options.version&&!e||n.options.name===t&&e&&n.options.version===e))}er.getGlobalFederationInstance=Yn;var k=I,Xn=er;function Jn(t){const e=k.getGlobalFederationConstructor()||k.ModuleFederation,r=new e(t);return k.setGlobalFederationInstance(r),r}let fe=null;function Zn(t){const e=Xn.getGlobalFederationInstance(t.name,t.version);return e?(e.initOptions(t),fe||(fe=e),e):(fe=Jn(t),fe)}k.setGlobalFederationConstructor(k.ModuleFederation);k.Module;k.ModuleFederation;k.getRemoteEntry;k.getRemoteInfo;k.loadScript;k.loadScriptNode;k.registerGlobalPlugins;var eo=Zn;const Ae="__mf_init____mf__virtual/adminUI__mf_v__runtimeInit__mf_v__.js__";if(!globalThis[Ae]){let t,e;const r=new Promise((n,o)=>{t=n,e=o});globalThis[Ae]={initPromise:r,initResolve:t,initReject:e}}const{initPromise:to,initResolve:ro,initReject:no}=globalThis[Ae];export{ro as a,to as b,eo as i};
|
|
8
|
+
//# sourceMappingURL=adminUI__mf_v__runtimeInit__mf_v__-OBqvctZP.js.map
|