UNPKG

@curatedotfun/masa-source

Version:
3 lines 158 kB
(()=>{"use strict";var __webpack_modules__={725:function(e,t,r){var n=r(542),a=r(195);let i=null;function s(e){let t=a.getGlobalFederationInstance(e.name,e.version);return t?(t.initOptions(e),i||(i=t),t):(i=new(n.getGlobalFederationConstructor()||n.FederationHost)(e),n.setGlobalFederationInstance(i),i)}function o(...e){return n.assert(i,"Please call init first"),i.loadRemote.apply(i,e)}function l(...e){return n.assert(i,"Please call init first"),i.loadShare.apply(i,e)}function u(...e){return n.assert(i,"Please call init first"),i.loadShareSync.apply(i,e)}function c(...e){return n.assert(i,"Please call init first"),i.preloadRemote.apply(i,e)}function d(...e){return n.assert(i,"Please call init first"),i.registerRemotes.apply(i,e)}function h(...e){return n.assert(i,"Please call init first"),i.registerPlugins.apply(i,e)}function f(){return i}n.setGlobalFederationConstructor(n.FederationHost),Object.defineProperty(t,"FederationHost",{enumerable:!0,get:function(){return n.FederationHost}}),Object.defineProperty(t,"Module",{enumerable:!0,get:function(){return n.Module}}),Object.defineProperty(t,"getRemoteEntry",{enumerable:!0,get:function(){return n.getRemoteEntry}}),Object.defineProperty(t,"getRemoteInfo",{enumerable:!0,get:function(){return n.getRemoteInfo}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return n.loadScriptNode}}),Object.defineProperty(t,"registerGlobalPlugins",{enumerable:!0,get:function(){return n.registerGlobalPlugins}}),t.getInstance=f,t.init=s,t.loadRemote=o,t.loadShare=l,t.loadShareSync=u,t.preloadRemote=c,t.registerPlugins=h,t.registerRemotes=d},195:function(e,t,r){var n=r(542);function a(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}t.getGlobalFederationInstance=function(e,t){let r=a();return n.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!r&&n.options.id===a()||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&!!t&&n.options.version===t)}},232:function(e,t){let r="RUNTIME-001",n="RUNTIME-002",a="RUNTIME-003",i="RUNTIME-004",s="RUNTIME-005",o="RUNTIME-006",l="RUNTIME-007",u="RUNTIME-008",c="TYPE-001",d="BUILD-001",h=e=>{let t=e.split("-")[0].toLowerCase();return`https://module-federation.io/guide/troubleshooting/${t}/${e}`},f=(e,t,r,n)=>{let a=[`${[t[e]]} #${e}`];return r&&a.push(`args: ${JSON.stringify(r)}`),a.push(h(e)),n&&a.push(`Original Error Message: ${n}`),a.join("\n")};function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let m={[r]:"Failed to get remoteEntry exports.",[n]:'The remote entry interface does not contain "init"',[a]:"Failed to get manifest.",[i]:"Failed to locate remote.",[s]:"Invalid loadShareSync function call from bundler runtime",[o]:"Invalid loadShareSync function call from runtime",[l]:"Failed to get remote snapshot.",[u]:"Failed to load script resources."},y={[c]:"Failed to generate type declaration."},g={[d]:"Failed to find expose module."},_=p({},m,y,g);t.BUILD_001=d,t.RUNTIME_001=r,t.RUNTIME_002=n,t.RUNTIME_003=a,t.RUNTIME_004=i,t.RUNTIME_005=s,t.RUNTIME_006=o,t.RUNTIME_007=l,t.RUNTIME_008=u,t.TYPE_001=c,t.buildDescMap=g,t.errorDescMap=_,t.getShortErrorMsg=f,t.runtimeDescMap=m,t.typeDescMap=y},542:function(e,t,r){var n=r(335),a=r(851),i=r(232);let s="[ Federation Runtime ]",o=a.createLogger(s);function l(e,t){e||u(t)}function u(e){if(e instanceof Error)throw e.message=`${s}: ${e.message}`,e;throw Error(`${s}: ${e}`)}function c(e){e instanceof Error&&(e.message=`${s}: ${e.message}`),o.warn(e)}function d(e,t){return -1===e.findIndex(e=>e===t)&&e.push(t),e}function h(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function f(e){return void 0!==e.entry}function p(e){return!e.entry.includes(".json")&&e.entry.includes(".js")}async function m(e,t){try{return await e()}catch(e){t||c(e);return}}function y(e){return e&&"object"==typeof e}let g=Object.prototype.toString;function _(e){return"[object Object]"===g.call(e)}function v(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function b(e){return Array.isArray(e)?e:[e]}function E(e){let t={url:"",type:"global",globalName:""};return a.isBrowserEnv()||a.isReactNativeEnv()?"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}let S=(e,t)=>{let r;return r=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),r+=t},w="object"==typeof globalThis?globalThis:window,k=(()=>{try{return document.defaultView}catch(e){return w}})(),O=k;function x(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function I(e,t){return Object.hasOwnProperty.call(e,t)}I(w,"__GLOBAL_LOADING_REMOTE_ENTRY__")||x(w,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});let T=w.__GLOBAL_LOADING_REMOTE_ENTRY__;function R(e){var t,r,n,a,i,s,o,l,u,c,d,h;I(e,"__VMOK__")&&!I(e,"__FEDERATION__")&&x(e,"__FEDERATION__",e.__VMOK__),I(e,"__FEDERATION__")||(x(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),x(e,"__VMOK__",e.__FEDERATION__)),null!=(o=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__)||(t.__GLOBAL_PLUGIN__=[]),null!=(l=(r=e.__FEDERATION__).__INSTANCES__)||(r.__INSTANCES__=[]),null!=(u=(n=e.__FEDERATION__).moduleInfo)||(n.moduleInfo={}),null!=(c=(a=e.__FEDERATION__).__SHARE__)||(a.__SHARE__={}),null!=(d=(i=e.__FEDERATION__).__MANIFEST_LOADING__)||(i.__MANIFEST_LOADING__={}),null!=(h=(s=e.__FEDERATION__).__PRELOADED_MAP__)||(s.__PRELOADED_MAP__=new Map)}function N(){w.__FEDERATION__.__GLOBAL_PLUGIN__=[],w.__FEDERATION__.__INSTANCES__=[],w.__FEDERATION__.moduleInfo={},w.__FEDERATION__.__SHARE__={},w.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(T).forEach(e=>{delete T[e]})}function A(e){w.__FEDERATION__.__INSTANCES__.push(e)}function $(){return w.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function P(e,t=a.isDebugMode()){t&&(w.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,w.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.11.2")}function M(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};for(let r of Object.keys(e)){let[n,a]=r.split(":"),i=`${n}:${t}`,s=e[i];if(s)return{value:s,key:i}}return{value:void 0,key:t}}throw Error("key must be string")}R(w),R(k);let j=()=>k.__FEDERATION__.moduleInfo,C=(e,t)=>{let r=M(t,h(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){let{version:t}=e,r=h(n._object_without_properties_loose(e,["version"])),a=M(k.__FEDERATION__.moduleInfo,r).value;if((null==a?void 0:a.version)===t)return a}},D=e=>C(e,k.__FEDERATION__.moduleInfo),F=(e,t)=>{let r=h(e);return k.__FEDERATION__.moduleInfo[r]=t,k.__FEDERATION__.moduleInfo},L=e=>(k.__FEDERATION__.moduleInfo=n._extends({},k.__FEDERATION__.moduleInfo,e),()=>{for(let t of Object.keys(e))delete k.__FEDERATION__.moduleInfo[t]}),Z=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`,n=w[r];return{remoteEntryKey:r,entryExports:n}},H=e=>{let{__GLOBAL_PLUGIN__:t}=k.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):c(`The plugin ${e.name} has been registered.`)})},U=()=>k.__FEDERATION__.__GLOBAL_PLUGIN__,z=e=>w.__FEDERATION__.__PRELOADED_MAP__.get(e),G=e=>w.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),W="default",V="global",B="[0-9A-Za-z-]+",q=`(?:\\+(${B}(?:\\.${B})*))`,K="0|[1-9]\\d*",J="[0-9]+",Y="\\d*[a-zA-Z-][a-zA-Z0-9-]*",X=`(?:${J}|${Y})`,Q=`(?:-?(${X}(?:\\.${X})*))`,ee=`(?:${K}|${Y})`,et=`(?:-(${ee}(?:\\.${ee})*))`,er=`${K}|x|X|\\*`,en=`[v=\\s]*(${er})(?:\\.(${er})(?:\\.(${er})(?:${et})?${q}?)?)?`,ea=`^\\s*(${en})\\s+-\\s+(${en})\\s*$`,ei=`(${J})\\.(${J})\\.(${J})`,es=`[v=\\s]*${ei}${Q}?${q}?`,eo="((?:<|>)?=?)",el=`(\\s*)${eo}\\s*(${es}|${en})`,eu="(?:~>?)",ec=`(\\s*)${eu}\\s+`,ed="(?:\\^)",eh=`(\\s*)${ed}\\s+`,ef="(<|>)?=?\\s*\\*",ep=`^${ed}${en}$`,em=`(${K})\\.(${K})\\.(${K})`,ey=`v?${em}${et}?${q}?`,eg=`^${eu}${en}$`,e_=`^${eo}\\s*${en}$`,ev=`^${eo}\\s*(${ey})$|^$`,eb="^\\s*>=\\s*0.0.0\\s*$";function eE(e){return new RegExp(e)}function eS(e){return!e||"x"===e.toLowerCase()||"*"===e}function ew(...e){return t=>e.reduce((e,t)=>t(e),t)}function ek(e){return e.match(eE(ev))}function eO(e,t,r,n){let a=`${e}.${t}.${r}`;return n?`${a}-${n}`:a}function ex(e){return e.replace(eE(ea),(e,t,r,n,a,i,s,o,l,u,c,d)=>(t=eS(r)?"":eS(n)?`>=${r}.0.0`:eS(a)?`>=${r}.${n}.0`:`>=${t}`,o=eS(l)?"":eS(u)?`<${Number(l)+1}.0.0-0`:eS(c)?`<${l}.${Number(u)+1}.0-0`:d?`<=${l}.${u}.${c}-${d}`:`<=${o}`,`${t} ${o}`.trim()))}function eI(e){return e.replace(eE(el),"$1$2$3")}function eT(e){return e.replace(eE(ec),"$1~")}function eR(e){return e.replace(eE(eh),"$1^")}function eN(e){return e.trim().split(/\s+/).map(e=>e.replace(eE(ep),(e,t,r,n,a)=>{if(eS(t))return"";if(eS(r))return`>=${t}.0.0 <${Number(t)+1}.0.0-0`;if(eS(n))if("0"===t)return`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`;else return`>=${t}.${r}.0 <${Number(t)+1}.0.0-0`;if(a)if("0"!==t)return`>=${t}.${r}.${n}-${a} <${Number(t)+1}.0.0-0`;else if("0"===r)return`>=${t}.${r}.${n}-${a} <${t}.${r}.${Number(n)+1}-0`;else return`>=${t}.${r}.${n}-${a} <${t}.${Number(r)+1}.0-0`;if("0"===t)if("0"===r)return`>=${t}.${r}.${n} <${t}.${r}.${Number(n)+1}-0`;else return`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`;return`>=${t}.${r}.${n} <${Number(t)+1}.0.0-0`})).join(" ")}function eA(e){return e.trim().split(/\s+/).map(e=>e.replace(eE(eg),(e,t,r,n,a)=>eS(t)?"":eS(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:eS(n)?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:a?`>=${t}.${r}.${n}-${a} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`)).join(" ")}function e$(e){return e.split(/\s+/).map(e=>e.trim().replace(eE(e_),(e,t,r,n,a,i)=>{let s=eS(r),o=s||eS(n),l=o||eS(a);if("="===t&&l&&(t=""),i="",s)if(">"===t||"<"===t)return"<0.0.0-0";else return"*";return t&&l?(o&&(n=0),a=0,">"===t?(t=">=",o?(r=Number(r)+1,n=0):n=Number(n)+1,a=0):"<="===t&&(t="<",o?r=Number(r)+1:n=Number(n)+1),"<"===t&&(i="-0"),`${t+r}.${n}.${a}${i}`):o?`>=${r}.0.0${i} <${Number(r)+1}.0.0-0`:l?`>=${r}.${n}.0${i} <${r}.${Number(n)+1}.0-0`:e})).join(" ")}function eP(e){return e.trim().replace(eE(ef),"")}function eM(e){return e.trim().replace(eE(eb),"")}function ej(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function eC(e,t){let{preRelease:r}=e,{preRelease:n}=t;if(void 0===r&&n)return 1;if(r&&void 0===n)return -1;if(void 0===r&&void 0===n)return 0;for(let e=0,t=r.length;e<=t;e++){let t=r[e],a=n[e];if(t!==a){if(void 0===t&&void 0===a)return 0;if(!t)return 1;if(!a)return -1;return ej(t,a)}}return 0}function eD(e,t){return ej(e.major,t.major)||ej(e.minor,t.minor)||ej(e.patch,t.patch)||eC(e,t)}function eF(e,t){return e.version===t.version}function eL(e,t){switch(e.operator){case"":case"=":return eF(e,t);case">":return 0>eD(e,t);case">=":return eF(e,t)||0>eD(e,t);case"<":return eD(e,t)>0;case"<=":return eF(e,t)||eD(e,t)>0;case void 0:return!0;default:return!1}}function eZ(e){return ew(eN,eA,e$,eP)(e)}function eH(e){return ew(ex,eI,eT,eR)(e.trim()).split(/\s+/).join(" ")}function eU(e,t){if(!e)return!1;let r=eH(t).split(" ").map(e=>eZ(e)).join(" ").split(/\s+/).map(e=>eM(e)),n=ek(e);if(!n)return!1;let[,a,,i,s,o,l]=n,u={operator:a,version:eO(i,s,o,l),major:i,minor:s,patch:o,preRelease:null==l?void 0:l.split(".")};for(let e of r){let t=ek(e);if(!t)return!1;let[,r,,n,a,i,s]=t;if(!eL({operator:r,version:eO(n,a,i,s),major:n,minor:a,patch:i,preRelease:null==s?void 0:s.split(".")},u))return!1}return!0}function ez(e,t,r,a){var i,s,o;let l;return l="get"in e?e.get:"lib"in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{throw Error(`Can not get shared '${r}'!`)}),e.strategy&&c('"shared.strategy is deprecated, please set in initOptions.shareStrategy instead!"'),n._extends({deps:[],useIn:[],from:t,loading:null},e,{shareConfig:n._extends({requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:l,loaded:null!=e&&!!e.loaded||"lib"in e||void 0,version:null!=(i=e.version)?i:"0",scope:Array.isArray(e.scope)?e.scope:[null!=(s=e.scope)?s:"default"],strategy:(null!=(o=e.strategy)?o:a)||"version-first"})}function eG(e,t){let r=t.shared||{},a=t.name,i=Object.keys(r).reduce((e,n)=>{let i=b(r[n]);return e[n]=e[n]||[],i.forEach(r=>{e[n].push(ez(r,a,n,t.shareStrategy))}),e},{}),s=n._extends({},e.shared);return Object.keys(i).forEach(e=>{s[e]?i[e].forEach(t=>{s[e].find(e=>e.version===t.version)||s[e].push(t)}):s[e]=i[e]}),{shared:s,shareInfos:i}}function eW(e,t){let r=e=>{if(!Number.isNaN(Number(e))){let t=e.split("."),r=e;for(let e=0;e<3-t.length;e++)r+=".0";return r}return e};return!!eU(r(e),`<=${r(t)}`)}let eV=(e,t)=>{let r=t||function(e,t){return eW(e,t)};return Object.keys(e).reduce((e,t)=>!e||r(e,t)||"0"===e?t:e,0)},eB=e=>!!e.loaded||"function"==typeof e.lib,eq=e=>!!e.loading;function eK(e,t,r){let n=e[t][r],a=function(e,t){return!eB(n[e])&&eW(e,t)};return eV(e[t][r],a)}function eJ(e,t,r){let n=e[t][r],a=function(e,t){let r=e=>eB(e)||eq(e);if(r(n[t]))if(r(n[e]))return!!eW(e,t);else return!0;return!r(n[e])&&eW(e,t)};return eV(e[t][r],a)}function eY(e){return"loaded-first"===e?eJ:eK}function eX(e,t,r,n){if(!e)return;let{shareConfig:a,scope:i=W,strategy:s}=r;for(let o of Array.isArray(i)?i:[i])if(a&&e[o]&&e[o][t]){let{requiredVersion:i}=a,l=eY(s)(e,o,t),d=()=>{if(a.singleton){if("string"==typeof i&&!eU(l,i)){let n=`Version ${l} from ${l&&e[o][t][l].from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${i})`;a.strictVersion?u(n):c(n)}return e[o][t][l]}if(!1===i||"*"===i||eU(l,i))return e[o][t][l];for(let[r,n]of Object.entries(e[o][t]))if(eU(r,i))return n},h={shareScopeMap:e,scope:o,pkgName:t,version:l,GlobalFederation:O.__FEDERATION__,resolver:d};return(n.emit(h)||h).resolver()}}function eQ(){return O.__FEDERATION__.__SHARE__}function e0(e){var t;let{pkgName:r,extraOptions:n,shareInfos:a}=e,i=e=>{if(!e)return;let t={};e.forEach(e=>{t[e.version]=e});let r=function(e,r){return!eB(t[e])&&eW(e,r)},n=eV(t,r);return t[n]};return Object.assign({},(null!=(t=null==n?void 0:n.resolver)?t:i)(a[r]),null==n?void 0:n.customShareInfo)}var e1={global:{Global:O,nativeGlobal:k,resetFederationGlobalInfo:N,setGlobalFederationInstance:A,getGlobalFederationConstructor:$,setGlobalFederationConstructor:P,getInfoWithoutType:M,getGlobalSnapshot:j,getTargetSnapshotInfoByModuleInfo:C,getGlobalSnapshotInfoByModuleInfo:D,setGlobalSnapshotInfoByModuleInfo:F,addGlobalSnapshot:L,getRemoteEntryExports:Z,registerGlobalPlugins:H,getGlobalHostPlugins:U,getPreloaded:z,setPreloaded:G},share:{getRegisteredShare:eX,getGlobalShareScope:eQ}};function e2(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function e4(e,t){for(let r of e){let e=t.startsWith(r.name),n=t.replace(r.name,"");if(e){if(n.startsWith("/"))return{pkgNameOrAlias:r.name,expose:n=`.${n}`,remote:r};else if(""===n)return{pkgNameOrAlias:r.name,expose:".",remote:r}}let a=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&a){if(i&&i.startsWith("/"))return{pkgNameOrAlias:r.alias,expose:i=`.${i}`,remote:r};else if(""===i)return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function e9(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}function e3(e,t){let r=U();return r.length>0&&r.forEach(t=>{(null==e?void 0:e.find(e=>e.name!==t.name))&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{t.forEach(t=>{t.applyPlugin(e)})}),e}async function e5({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):"undefined"!=typeof FEDERATION_ALLOW_NEW_FUNCTION?Function("callbacks",`import("${e}").then(callbacks[0]).catch(callbacks[1])`)([r,n]):import(e).then(r).catch(n)}catch(e){n(e)}})}async function e6({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):Function("callbacks",`System.import("${e}").then(callbacks[0]).catch(callbacks[1])`)([r,n])}catch(e){n(e)}})}async function e7({name:e,globalName:t,entry:r,loaderHook:n}){let{entryExports:s}=Z(e,t);return s||a.loadScript(r,{attrs:{},createScriptHook:(e,t)=>{let r=n.lifecycle.createScript.emit({url:e,attrs:t});if(r&&(r instanceof HTMLScriptElement||"script"in r||"timeout"in r))return r}}).then(()=>{let{remoteEntryKey:n,entryExports:a}=Z(e,t);return l(a,i.getShortErrorMsg(i.RUNTIME_001,i.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n})),a}).catch(t=>{throw l(void 0,i.getShortErrorMsg(i.RUNTIME_008,i.runtimeDescMap,{remoteName:e,resourceUrl:r})),t})}async function e8({remoteInfo:e,remoteEntryExports:t,loaderHook:r}){let{entry:n,entryGlobalName:a,name:i,type:s}=e;switch(s){case"esm":case"module":return e5({entry:n,remoteEntryExports:t});case"system":return e6({entry:n,remoteEntryExports:t});default:return e7({entry:n,globalName:a,name:i,loaderHook:r})}}async function te({remoteInfo:e,loaderHook:t}){let{entry:r,entryGlobalName:n,name:s,type:o}=e,{entryExports:u}=Z(s,n);return u||a.loadScriptNode(r,{attrs:{name:s,globalName:n,type:o},loaderHook:{createScriptHook:(e,r={})=>{let n=t.lifecycle.createScript.emit({url:e,attrs:r});if(n&&"url"in n)return n}}}).then(()=>{let{remoteEntryKey:e,entryExports:t}=Z(s,n);return l(t,i.getShortErrorMsg(i.RUNTIME_001,i.runtimeDescMap,{remoteName:s,remoteEntryUrl:r,remoteEntryKey:e})),t}).catch(e=>{throw e})}function tt(e){let{entry:t,name:r}=e;return a.composeKeyWithSeparator(r,t)}async function tr({origin:e,remoteEntryExports:t,remoteInfo:r}){let n=tt(r);if(t)return t;if(!T[n]){let i=e.remoteHandler.hooks.lifecycle.loadEntry,s=e.loaderHook;T[n]=i.emit({loaderHook:s,remoteInfo:r,remoteEntryExports:t}).then(e=>e||(a.isBrowserEnv()?e8({remoteInfo:r,remoteEntryExports:t,loaderHook:s}):te({remoteInfo:r,loaderHook:s})))}return T[n]}function tn(e){return n._extends({},e,{entry:"entry"in e?e.entry:"",type:e.type||V,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||W})}let ta=class{async getEntry(){let e;if(this.remoteEntryExports)return this.remoteEntryExports;try{e=await tr({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})}catch(r){let t=tt(this.remoteInfo);e=await this.host.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:tr,origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,globalLoading:T,uniqueKey:t})}return l(e,`remoteEntryExports is undefined ${a.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,t,r,a){let s,{loadFactory:o=!0}=r||{loadFactory:!0},c=await this.getEntry();if(!this.inited){let t=this.host.shareScopeMap,r=this.remoteInfo.shareScope||"default";t[r]||(t[r]={});let s=t[r],o=[],l={version:this.remoteInfo.version||""};Object.defineProperty(l,"shareScopeMap",{value:t,enumerable:!1});let d=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:l,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});void 0===(null==c?void 0:c.init)&&u(i.getShortErrorMsg(i.RUNTIME_002,i.runtimeDescMap,{remoteName:name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await c.init(d.shareScope,d.initScope,d.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(n._extends({},d,{id:e,remoteSnapshot:a,remoteEntryExports:c}))}this.lib=c,this.inited=!0,(s=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:c,expose:t,moduleInfo:this.remoteInfo}))||(s=await c.get(t)),l(s,`${h(this.remoteInfo)} remote don't export ${t}.`);let d=S(this.remoteInfo.name,t),f=this.wraperFactory(s,d);return o?await f():f}wraperFactory(e,t){function r(e,t){e&&"object"==typeof e&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for("mf_module_id"))&&Object.defineProperty(e,Symbol.for("mf_module_id"),{value:t,enumerable:!1})}return e instanceof Promise?async()=>{let n=await e();return r(n,t),n}:()=>{let n=e();return r(n,t),n}}constructor({remoteInfo:e,host:t}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}};class ti{on(e){"function"==typeof e&&this.listeners.add(e)}once(e){let t=this;this.on(function r(...n){return t.remove(r),e.apply(null,n)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{t=r(...e)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}}class ts extends ti{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let n=0,a=t=>!1!==t&&(n<r.length?Promise.resolve(r[n++].apply(null,e)).then(a):t);t=a()}return Promise.resolve(t)}}function to(e,t){if(!y(t))return!1;if(e!==t){for(let r in e)if(!(r in t))return!1}return!0}class tl extends ti{emit(e){for(let t of(y(e)||u(`The data for the "${this.type}" hook should be an object.`),this.listeners))try{let r=t(e);if(to(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){c(e),this.onerror(e)}return e}constructor(e){super(),this.onerror=u,this.type=e}}class tu extends ti{emit(e){y(e)||u(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let r=0,n=t=>(c(t),this.onerror(t),e),a=i=>{if(to(e,i)){if(e=i,r<t.length)try{return Promise.resolve(t[r++](e)).then(a,n)}catch(e){return n(e)}}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)}constructor(e){super(),this.onerror=u,this.type=e}}class tc{applyPlugin(e){l(_(e),"Plugin configuration is invalid.");let t=e.name;l(t,"A name must be provided by the plugin."),this.registerPlugins[t]||(this.registerPlugins[t]=e,Object.keys(this.lifecycle).forEach(t=>{let r=e[t];r&&this.lifecycle[t].on(r)}))}removePlugin(e){l(e,"A name is required.");let t=this.registerPlugins[e];l(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{"name"!==e&&this.lifecycle[e].remove(t[e])})}inherit({lifecycle:e,registerPlugins:t}){Object.keys(e).forEach(t=>{l(!this.lifecycle[t],`The hook "${t}" has a conflict and cannot be inherited.`),this.lifecycle[t]=e[t]}),Object.keys(t).forEach(e=>{l(!this.registerPlugins[e],`The plugin "${e}" has a conflict and cannot be inherited.`),this.applyPlugin(t[e])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function td(e){return n._extends({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function th(e,t){return t.map(t=>{let r=e9(e,t.nameOrAlias);return l(r,`Unable to preload ${t.nameOrAlias} as it is not included in ${!r&&a.safeToString({remoteInfo:r,remotes:e})}`),{remote:r,preloadConfig:td(t)}})}function tf(e){return e?e.map(e=>"."===e?e:e.startsWith("./")?e.replace("./",""):e):[]}function tp(e,t,r,n=!0){let{cssAssets:i,jsAssetsWithoutEntry:s,entryAssets:o}=r;if(t.options.inBrowser){if(o.forEach(r=>{let{moduleInfo:n}=r,a=t.moduleCache.get(e.name);a?tr({origin:t,remoteInfo:n,remoteEntryExports:a.remoteEntryExports}):tr({origin:t,remoteInfo:n,remoteEntryExports:void 0})}),n){let e={rel:"preload",as:"style"};i.forEach(r=>{let{link:n,needAttach:i}=a.createLink({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});i&&document.head.appendChild(n)})}else{let e={rel:"stylesheet",type:"text/css"};i.forEach(r=>{let{link:n,needAttach:i}=a.createLink({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n},needDeleteLink:!1});i&&document.head.appendChild(n)})}if(n){let e={rel:"preload",as:"script"};s.forEach(r=>{let{link:n,needAttach:i}=a.createLink({url:r,cb:()=>{},attrs:e,createLinkHook:(e,r)=>{let n=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:r});if(n instanceof HTMLLinkElement)return n}});i&&document.head.appendChild(n)})}else{let r={fetchpriority:"high",type:(null==e?void 0:e.type)==="module"?"module":"text/javascript"};s.forEach(e=>{let{script:n,needAttach:i}=a.createScript({url:e,cb:()=>{},attrs:r,createScriptHook:(e,r)=>{let n=t.loaderHook.lifecycle.createScript.emit({url:e,attrs:r});if(n instanceof HTMLScriptElement)return n},needDeleteScript:!0});i&&document.head.appendChild(n)})}}}function tm(e,t){let r=E(t);r.url||u(`The attribute remoteEntry of ${e.name} must not be undefined.`);let n=a.getResourceUrl(t,r.url);a.isBrowserEnv()||n.startsWith("http")||(n=`https:${n}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=n,e.version=t.version,e.buildVersion=t.buildVersion}function ty(){return{name:"snapshot-plugin",async afterResolve(e){let{remote:t,pkgNameOrAlias:r,expose:a,origin:i,remoteInfo:s}=e;if(!f(t)||!p(t)){let{remoteSnapshot:o,globalSnapshot:l}=await i.snapshotHandler.loadRemoteSnapshotInfo(t);tm(s,o);let u={remote:t,preloadConfig:{nameOrAlias:r,exposes:[a],resourceCategory:"sync",share:!1,depsRemote:!1}},c=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:u,remoteInfo:s,remote:t,remoteSnapshot:o,globalSnapshot:l});return c&&tp(s,i,c,!1),n._extends({},e,{remoteSnapshot:o})}return e}}}function tg(e){let t=e.split(":");return 1===t.length?{name:t[0],version:void 0}:2===t.length?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function t_(e,t,r,n,i={},s){let{value:o}=M(e,h(t)),l=s||o;if(l&&!a.isManifestProvider(l)&&(r(l,t,n),l.remotesInfo))for(let t of Object.keys(l.remotesInfo)){if(i[t])continue;i[t]=!0;let n=tg(t),a=l.remotesInfo[t];t_(e,{name:n.name,version:a.matchedVersion},r,!1,i,void 0)}}let tv=(e,t)=>document.querySelector(`${e}[${"link"===e?"href":"src"}="${t}"]`);function tb(e,t,r,n,i){let s=[],o=[],l=[],u=new Set,c=new Set,{options:d}=e,{preloadConfig:h}=t,{depsRemote:f}=h;if(t_(n,r,(t,r,n)=>{let i;if(n)i=h;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===r.name||e.nameOrAlias===r.alias);if(!e)return;i=td(e)}else{if(!0!==f)return;i=h}let u=a.getResourceUrl(t,E(t).url);u&&l.push({name:r.name,moduleInfo:{name:r.name,entry:u,type:"remoteEntryType"in t?t.remoteEntryType:"global",entryGlobalName:"globalName"in t?t.globalName:r.name,shareScope:"",version:"version"in t?t.version:void 0},url:u});let c="modules"in t?t.modules:[],d=tf(i.exposes);if(d.length&&"modules"in t){var p;c=null==t||null==(p=t.modules)?void 0:p.reduce((e,t)=>((null==d?void 0:d.indexOf(t.moduleName))!==-1&&e.push(t),e),[])}function m(e){let r=e.map(e=>a.getResourceUrl(t,e));return i.filter?r.filter(i.filter):r}if(c){let n=c.length;for(let a=0;a<n;a++){let n=c[a],l=`${r.name}/${n.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===n.moduleName?r.name:l,name:r.name,remoteSnapshot:t,preloadConfig:i,remote:r,origin:e}),z(l)||("all"===i.resourceCategory?(s.push(...m(n.assets.css.async)),s.push(...m(n.assets.css.sync)),o.push(...m(n.assets.js.async))):(i.resourceCategory="sync",s.push(...m(n.assets.css.sync))),o.push(...m(n.assets.js.sync)),G(l))}}},!0,{},i),i.shared){let t=(t,r)=>{let n=eX(e.shareScopeMap,r.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);n&&"function"==typeof n.lib&&(r.assets.js.sync.forEach(e=>{u.add(e)}),r.assets.css.sync.forEach(e=>{c.add(e)}))};i.shared.forEach(e=>{var r;let n=null==(r=d.shared)?void 0:r[e.sharedName];if(!n)return;let a=e.version?n.find(t=>t.version===e.version):n;a&&b(a).forEach(r=>{t(r,e)})})}let p=o.filter(e=>!u.has(e)&&!tv("script",e));return{cssAssets:s.filter(e=>!c.has(e)&&!tv("link",e)),jsAssetsWithoutEntry:p,entryAssets:l.filter(e=>!tv("script",e.url))}}let tE=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){let{origin:t,preloadOptions:r,remoteInfo:n,remote:i,globalSnapshot:s,remoteSnapshot:o}=e;return a.isBrowserEnv()?f(i)&&p(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:n.name,entry:i.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(tm(n,o),tb(t,r,n,s,o)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function tS(e,t){let r=D({name:t.options.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&M(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:j(),remoteSnapshot:D({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:j(),remoteSnapshot:D({name:e.name,version:"version"in e?e.version:void 0})}}class tw{async loadSnapshot(e){let{options:t}=this.HostInstance,{hostGlobalSnapshot:r,remoteSnapshot:n,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:i,globalSnapshot:s}=await this.hooks.lifecycle.loadSnapshot.emit({options:t,moduleInfo:e,hostGlobalSnapshot:r,remoteSnapshot:n,globalSnapshot:a});return{remoteSnapshot:i,globalSnapshot:s}}async loadRemoteSnapshotInfo(e){let t,r,{options:s}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:s,moduleInfo:e});let o=D({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},L({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!M(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo=n._extends({},null==o?void 0:o.remotesInfo,{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));let{hostGlobalSnapshot:l,remoteSnapshot:c,globalSnapshot:d}=this.getGlobalRemoteInfo(e),{remoteSnapshot:h,globalSnapshot:p}=await this.hooks.lifecycle.loadSnapshot.emit({options:s,moduleInfo:e,hostGlobalSnapshot:l,remoteSnapshot:c,globalSnapshot:d});if(h)if(a.isManifestProvider(h)){let i=a.isBrowserEnv()?h.remoteEntry:h.ssrRemoteEntry||h.remoteEntry||"",s=await this.getManifestJson(i,e,{}),o=F(n._extends({},e,{entry:i}),s);t=s,r=o}else{let{remoteSnapshot:n}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:h,from:"global"});t=n,r=p}else if(f(e)){let n=await this.getManifestJson(e.entry,e,{}),a=F(e,n),{remoteSnapshot:i}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:n,from:"global"});t=i,r=a}else u(i.getShortErrorMsg(i.RUNTIME_007,i.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(p)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({options:s,moduleInfo:e,remoteSnapshot:t}),{remoteSnapshot:t,globalSnapshot:r}}getGlobalRemoteInfo(e){return tS(e,this.HostInstance)}async getManifestJson(e,t,r){let n=async()=>{let r=this.manifestCache.get(e);if(r)return r;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{});t&&t instanceof Response||(t=await fetch(e,{})),r=await t.json()}catch(n){(r=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}))||(delete this.manifestLoading[e],u(i.getShortErrorMsg(i.RUNTIME_003,i.runtimeDescMap,{manifestUrl:e,moduleName:t.name},`${n}`)))}return l(r.metaData&&r.exposes&&r.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,r),r},s=async()=>{let r=await n(),i=a.generateSnapshotFromManifest(r,{version:e}),{remoteSnapshot:s}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:r,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return s};return this.manifestLoading[e]||(this.manifestLoading[e]=s().then(e=>e)),this.manifestLoading[e]}constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new tc({beforeLoadRemoteSnapshot:new ts("beforeLoadRemoteSnapshot"),loadSnapshot:new tu("loadGlobalSnapshot"),loadRemoteSnapshot:new tu("loadRemoteSnapshot"),afterLoadSnapshot:new tu("afterLoadSnapshot")}),this.manifestLoading=O.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}class tk{registerShared(e,t){let{shareInfos:r,shared:n}=eG(e,t);return Object.keys(r).forEach(e=>{r[e].forEach(r=>{!eX(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)&&r&&r.lib&&this.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:!0,shared:r,from:t.name})})}),{shareInfos:r,shared:n}}async loadShare(e,t){let{host:r}=this,n=e0({pkgName:e,extraOptions:t,shareInfos:r.options.shared});(null==n?void 0:n.scope)&&await Promise.all(n.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:n.strategy}))}));let{shareInfo:a}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});l(a,`Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);let i=eX(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare),s=e=>{e.useIn||(e.useIn=[]),d(e.useIn,r.options.name)};if(i&&i.lib)return s(i),i.lib;if(i&&i.loading&&!i.loaded){let e=await i.loading;return i.loaded=!0,i.lib||(i.lib=e),s(i),e}if(i){let t=(async()=>{let t=await i.get();a.lib=t,a.loaded=!0,s(a);let r=eX(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0),t})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:t}),t}{if(null==t?void 0:t.customShareInfo)return!1;let n=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,s(a);let r=eX(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0),t})();return this.setShared({pkgName:e,loaded:!1,shared:a,from:r.options.name,lib:null,loading:n}),n}}initializeSharing(e=W,t){let{host:r}=this,n=null==t?void 0:t.from,a=null==t?void 0:t.strategy,i=null==t?void 0:t.initScope,s=[];if("build"!==n){let{initTokens:t}=this;i||(i=[]);let r=t[e];if(r||(r=t[e]={from:this.host.name}),i.indexOf(r)>=0)return s;i.push(r)}let o=this.shareScopeMap,l=r.options.name;o[e]||(o[e]={});let u=o[e],c=(e,t)=>{var r;let{version:n,eager:a}=t;u[e]=u[e]||{};let i=u[e],s=i[n],o=!!(s&&(s.eager||(null==(r=s.shareConfig)?void 0:r.eager)));(!s||"loaded-first"!==s.strategy&&!s.loaded&&(!a!=!o?a:l>s.from))&&(i[n]=t)},d=t=>t&&t.init&&t.init(o[e],i),h=async e=>{let{module:t}=await r.remoteHandler.getRemoteModuleAndOptions({id:e});if(t.getEntry){let n;try{n=await t.getEntry()}catch(t){n=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:t,from:"runtime",lifecycle:"beforeLoadShare",origin:r})}t.inited||(await d(n),t.inited=!0)}};return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(r=>{r.scope.includes(e)&&c(t,r)})}),("version-first"===r.options.shareStrategy||"version-first"===a)&&r.options.remotes.forEach(t=>{t.shareScope===e&&s.push(h(t.name))}),s}loadShareSync(e,t){let{host:r}=this,n=e0({pkgName:e,extraOptions:t,shareInfos:r.options.shared});(null==n?void 0:n.scope)&&n.scope.forEach(e=>{this.initializeSharing(e,{strategy:n.strategy})});let a=eX(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),s=e=>{e.useIn||(e.useIn=[]),d(e.useIn,r.options.name)};if(a){if("function"==typeof a.lib)return s(a),a.loaded||(a.loaded=!0,a.from===r.options.name&&(n.loaded=!0)),a.lib;if("function"==typeof a.get){let t=a.get();if(!(t instanceof Promise))return s(a),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:t,shared:a}),t}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){let a=n.get();if(a instanceof Promise){let n=(null==t?void 0:t.from)==="build"?i.RUNTIME_005:i.RUNTIME_006;throw Error(i.getShortErrorMsg(n,i.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e}))}return n.lib=a,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}throw Error(i.getShortErrorMsg(i.RUNTIME_006,i.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e}))}initShareScopeMap(e,t,r={}){let{host:n}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:n.options,origin:n,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:a,loading:i,loaded:s,get:o}){let{version:l,scope:u="default"}=t,c=n._object_without_properties_loose(t,["version","scope"]);(Array.isArray(u)?u:[u]).forEach(t=>{if(this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),!this.shareScopeMap[t][e][l]){this.shareScopeMap[t][e][l]=n._extends({version:l,scope:["default"]},c,{lib:a,loaded:s,loading:i}),o&&(this.shareScopeMap[t][e][l].get=o);return}let r=this.shareScopeMap[t][e][l];i&&!r.loading&&(r.loading=i)})}_setGlobalShareScopeMap(e){let t=eQ(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}constructor(e){this.hooks=new tc({afterResolve:new tu("afterResolve"),beforeLoadShare:new tu("beforeLoadShare"),loadShare:new ts,resolveShare:new tl("resolveShare"),initContainerShareScopeMap:new tl("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}}class tO{formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:r,expose:n}=t,{name:a,alias:i}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},i&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:r.name,expose:n};return}if(i&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:r.name,expose:n}}}async loadRemote(e,t){let{host:r}=this;try{let{loadFactory:n=!0}=t||{loadFactory:!0},{module:a,moduleOptions:i,remoteMatchInfo:s}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:o,remote:l,expose:u,id:c,remoteSnapshot:d}=s,h=await a.get(c,u,t,d),f=await this.hooks.lifecycle.onLoad.emit({id:c,pkgNameOrAlias:o,expose:u,exposeModule:n?h:void 0,exposeModuleFactory:n?void 0:h,remote:l,options:i,moduleInstance:a,origin:r});if(this.setIdToRemoteMap(e,s),"function"==typeof f)return f;return h}catch(i){let{from:n="runtime"}=t||{from:"runtime"},a=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:n,lifecycle:"onLoad",origin:r});if(!a)throw i;return a}}async preloadRemote(e){let{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=th(t.options.remotes,e);await Promise.all(r.map(async e=>{let{remote:r}=e,n=tn(r),{globalSnapshot:a,remoteSnapshot:i}=await t.snapshotHandler.loadRemoteSnapshotInfo(r),s=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:e,remote:r,remoteInfo:n,globalSnapshot:a,remoteSnapshot:i});s&&tp(n,t,s)}))}registerRemotes(e,t){let{host:r}=this;e.forEach(e=>{this.registerRemote(e,r.options.remotes,{force:null==t?void 0:t.force})})}async getRemoteModuleAndOptions(e){let t,{host:r}=this,{id:a}=e;try{t=await this.hooks.lifecycle.beforeRequest.emit({id:a,options:r.options,origin:r})}catch(e){if(!(t=await this.hooks.lifecycle.errorLoadRemote.emit({id:a,options:r.options,origin:r,from:"runtime",error:e,lifecycle:"beforeRequest"})))throw e}let{id:s}=t,o=e4(r.options.remotes,s);l(o,i.getShortErrorMsg(i.RUNTIME_004,i.runtimeDescMap,{hostName:r.options.name,requestId:s}));let{remote:u}=o,c=tn(u),d=await r.sharedHandler.hooks.lifecycle.afterResolve.emit(n._extends({id:s},o,{options:r.options,origin:r,remoteInfo:c})),{remote:h,expose:f}=d;l(h&&f,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${s}.`);let p=r.moduleCache.get(h.name),m={host:r,remoteInfo:c};return p||(p=new ta(m),r.moduleCache.set(h.name,p)),{module:p,moduleOptions:m,remoteMatchInfo:d}}registerRemote(e,t,r){let{host:n}=this,i=()=>{if(e.alias){let r=t.find(t=>{var r;return e.alias&&(t.name.startsWith(e.alias)||(null==(r=t.alias)?void 0:r.startsWith(e.alias)))});l(!r,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${r&&r.name} name or alias`)}"entry"in e&&a.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=W),e.type||(e.type=V)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});let s=t.find(t=>t.name===e.name);if(s){let o=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];(null==r?void 0:r.force)&&(this.removeRemote(s),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),a.warn(o.join(" ")))}else i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n})}removeRemote(e){try{let{host:r}=this,{name:n}=e,i=r.options.remotes.findIndex(e=>e.name===n);-1!==i&&r.options.remotes.splice(i,1);let s=r.moduleCache.get(e.name);if(s){let n=s.remoteInfo,i=n.entryGlobalName;if(w[i]){var t;(null==(t=Object.getOwnPropertyDescriptor(w,i))?void 0:t.configurable)?delete w[i]:w[i]=void 0}let o=tt(s.remoteInfo);T[o]&&delete T[o],r.snapshotHandler.manifestCache.delete(n.entry);let l=n.buildVersion?a.composeKeyWithSeparator(n.name,n.buildVersion):n.name,u=w.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===l:e.name===l);if(-1!==u){let e=w.__FEDERATION__.__INSTANCES__[u];l=e.options.id||l;let t=eQ(),r=!0,a=[];Object.keys(t).forEach(e=>{let i=t[e];i&&Object.keys(i).forEach(t=>{let s=i[t];s&&Object.keys(s).forEach(i=>{let o=s[i];o&&Object.keys(o).forEach(s=>{let l=o[s];l&&"object"==typeof l&&l.from===n.name&&(l.loaded||l.loading?(l.useIn=l.useIn.filter(e=>e!==n.name),l.useIn.length?r=!1:a.push([e,t,i,s])):a.push([e,t,i,s]))})})})}),r&&(e.shareScopeMap={},delete t[l]),a.forEach(([e,r,n,a])=>{var i,s,o;null==(o=t[e])||null==(s=o[r])||null==(i=s[n])||delete i[a]}),w.__FEDERATION__.__INSTANCES__.splice(u,1)}let{hostGlobalSnapshot:c}=tS(e,r);if(c){let t=c&&"remotesInfo"in c&&c.remotesInfo&&M(c.remotesInfo,e.name).key;t&&(delete c.remotesInfo[t],O.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete O.__FEDERATION__.__MANIFEST_LOADING__[t])}r.moduleCache.delete(e.name)}}catch(e){o.log("removeRemote fail: ",e)}}constructor(e){this.hooks=new tc({beforeRegisterRemote:new tl("beforeRegisterRemote"),registerRemote:new tl("registerRemote"),beforeRequest:new tu("beforeRequest"),onLoad:new ts("onLoad"),handlePreloadModule:new ti("handlePreloadModule"),errorLoadRemote:new ts("errorLoadRemote"),beforePreloadRemote:new ts("beforePreloadRemote"),generatePreloadAssets:new ts("generatePreloadAssets"),afterPreloadRemote:new ts,loadEntry:new ts}),this.host=e,this.idToRemoteMap={}}}class tx{initOptions(e){this.registerPlugins(e.plugins);let 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=W,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){let n=new ta({host:this,remoteInfo:tn({name:e,entry:t})});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){let{shared:r}=eG(e,t),{userOptions:a,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(i,a),{shared:o}=this.sharedHandler.registerShared(i,a),l=[...i.plugins];a.plugins&&a.plugins.forEach(e=>{l.includes(e)||l.push(e)});let u=n._extends({},e,t,{plugins:l,remotes:s,shared:o});return this.hooks.lifecycle.init.emit({origin:this,options:u}),u}registerPlugins(e){let t=e3(e,[this.hooks,this.remoteHandler.hooks,this.sharedHandler.hooks,this.snapshotHandler.hooks,this.loaderHook,this.bridgeHook]);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}constructor(e){this.hooks=new tc({beforeInit:new tl("beforeInit"),init:new ti,beforeInitContainer:new tu("beforeInitContainer"),initContainer:new tu("initContainer")}),this.version="0.11.2",this.moduleCache=new Map,this.loaderHook=new tc({getModuleInfo:new ti,createScript:new ti,createLink:new ti,fetch:new ts,loadEntryError:new ts,getModuleFactory:new ts}),this.bridgeHook=new tc({beforeBridgeRender:new ti,afterBridgeRender:new ti,beforeBridgeDestroy:new ti,afterBridgeDestroy:new ti});let t={id:e2(),name:e.name,plugins:[ty(),tE()],remotes:[],shared:{},inBrowser:a.isBrowserEnv()};this.name=e.name,this.options=t,this.snapshotHandler=new tw(this),this.sharedHandler=new tk(this),this.remoteHandler=new tO(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...t.plugins,...e.plugins||[]]),this.options=this.formatOptions(t,e)}}var tI=Object.freeze({__proto__:null});Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return a.loadScript}}),Object.defineProperty(t,"loadScriptNode",{enumerable:!0,get:function(){return a.loadScriptNode}}),t.CurrentGlobal=w,t.FederationHost=tx,t.Global=O,t.Module=ta,t.addGlobalSnapshot=L,t.assert=l,t.getGlobalFederationConstructor=$,t.getGlobalSnapshot=j,t.getInfoWithoutType=M,t.getRegisteredShare=eX,t.getRemoteEntry=tr,t.getRemoteInfo=tn,t.helpers=e1,t.isStaticResourcesEqual=v,t.matchRemoteWithNameAndExpose=e4,t.registerGlobalPlugins=H,t.resetFederationGlobalInfo=N,t.safeWrapper=m,t.satisfy=eU,t.setGlobalFederationConstructor=P,t.setGlobalFederationInstance=A,t.types=tI},335:function(e,t){function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function n(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}t._extends=r,t._object_without_properties_loose=n},851:function(__unused_webpack_module,exports,__webpack_require__){var polyfills=__webpack_require__(512);let FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",BROWSER_LOG_VALUE="1",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return"undefined"!=typeof window&&void 0!==window.document}function isReactNativeEnv(){var e;return"undefined"!=typeof navigator&&(null==(e=navigator)?void 0:e.product)==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return localStorage.getItem(BROWSER_LOG_KEY)===BROWSER_LOG_VALUE}catch(e){}return!1}function isDebugMode(){return"undefined"!=typeof process&&process.env&&process.env.FEDERATION_DEBUG?!!process.env.FEDERATION_DEBUG:!!("undefined"!=typeof FEDERATION_DEBUG&&FEDERATION_DEBUG)||isBrowserDebug()}let getProcessEnv=function(){return"undefined"!=typeof process&&process.env?process.env:{}},LOG_CATEGORY="[ Federation Runtime ]",parseEntry=(e,t,r=SEPARATOR)=>{let n=e.split(r),a="development"===getProcessEnv().NODE_ENV&&t,i="*",s=e=>e.startsWith("http")||e.includes(MANIFEST_EXT);if(n.length>=2){let[t,...o]=n;e.startsWith(r)&&(t=n.slice(0,2).join(r),o=[a||n.slice(2).join(r)]);let l=a||o.join(r);return s(l)?{name:t,entry:l}:{name:t,version:l||i}}if(1===n.length){let[e]=n;return a&&s(a)?{name:e,entry:a}:{name:e,version:a||i}}throw`Invalid entry value: ${e}`},composeKeyWithSeparator=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}${SEPARATOR}${t}`:t:e,""):""},encodeName=function(e,t="",r=!1){try{let n=r?".js":"";return`${t}${e.replace(RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(e){throw e}},decodeName=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(RegExp(t,"g"),"")}return n=n.replace(RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(e){throw e}},generateExposeFilename=(e,t)=>{if(!e)return"";let r=e;return"."===r&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",t)},generateShareFilename=(e,t)=>e?encodeName(e,"__federation_shared_",t):"",getResourceUrl=(e,t)=>{if("getPublicPath"in e){let r;return r=e.getPublicPath.startsWith("function")?Function("return "+e.getPublicPath)()():Function(e.getPublicPath)(),`${r}${t}`}return"publicPath"in e?`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},assert=(e,t)=>{e||error(t)},error=e=>{throw Error(`${LOG_CATEGORY}: ${e}`)},warn=e=>{console.war