@empjs/share 3.13.9-beta.0 → 3.13.9-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/output/sdk.js CHANGED
@@ -1 +1 @@
1
- var EMP_SHARE_RUNTIME=function(exports){"use strict";var Rt=Object.defineProperty,yr=Object.defineProperties,_r=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,bt=(e,t,r)=>t in e?Rt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))St.call(t,r)&&bt(e,r,t[r]);if(_e)for(var r of _e(t))It.call(t,r)&&bt(e,r,t[r]);return e},L=(e,t)=>yr(e,_r(t)),Ve=(e,t)=>{var r={};for(var n in e)St.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&_e)for(var n of _e(e))t.indexOf(n)<0&&It.call(e,n)&&(r[n]=e[n]);return r},Nt=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},_=(e,t,r)=>new Promise((n,o)=>{var i=e=>{try{l(r.next(e))}catch(e){o(e)}},s=e=>{try{l(r.throw(e))}catch(e){o(e)}},l=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,s);l((r=r.apply(e,t)).next())}),$t="EMP_SHARE_RUNTIME",Ge={};Nt(Ge,{Module:()=>se,ModuleFederation:()=>J,createInstance:()=>mr,getInstance:()=>lo,getRemoteEntry:()=>oe,getRemoteInfo:()=>me,init:()=>ro,loadRemote:()=>no,loadScript:()=>Z,loadScriptNode:()=>Q,loadShare:()=>oo,loadShareSync:()=>so,preloadRemote:()=>io,registerGlobalPlugins:()=>Jt,registerPlugins:()=>co,registerRemotes:()=>ao,registerShared:()=>uo});var Ae={};Nt(Ae,{BROWSER_LOG_KEY:()=>Tt,ENCODE_NAME_PREFIX:()=>Rr,EncodedNameTransformMap:()=>ge,FederationModuleManifest:()=>Er,MANIFEST_EXT:()=>qe,MFModuleType:()=>gr,MFPrefetchCommon:()=>Ir,MODULE_DEVTOOL_IDENTIFIER:()=>br,ManifestFileName:()=>Be,NameTransformMap:()=>H,NameTransformSymbol:()=>A,SEPARATOR:()=>ze,StatsFileName:()=>We,TEMP_DIR:()=>Sr,assert:()=>Fr,bindLoggerToCompiler:()=>xr,composeKeyWithSeparator:()=>Se,containerPlugin:()=>Nr,containerReferencePlugin:()=>$r,createInfrastructureLogger:()=>Lt,createLink:()=>ue,createLogger:()=>Te,createModuleFederationConfig:()=>Br,createScript:()=>we,createScriptNode:()=>vt,decodeName:()=>Or,encodeName:()=>Xe,error:()=>Pt,generateExposeFilename:()=>Mr,generateShareFilename:()=>Lr,generateSnapshotFromManifest:()=>Ye,getManifestFileName:()=>kr,getProcessEnv:()=>wt,getResourceUrl:()=>le,inferAutoPublicPath:()=>Ot,infrastructureLogger:()=>Ur,isBrowserEnv:()=>V,isDebugMode:()=>ce,isManifestProvider:()=>$e,isReactNativeEnv:()=>Re,isRequiredVersion:()=>Dr,isStaticResourcesEqual:()=>Ze,loadScript:()=>Z,loadScriptNode:()=>Q,logger:()=>Gr,moduleFederationPlugin:()=>Tr,normalizeOptions:()=>jr,parseEntry:()=>Pr,safeToString:()=>Ne,safeWrapper:()=>Je,sharePlugin:()=>wr,simpleJoinRemoteEntry:()=>X,warn:()=>Ie});var Er="federation-manifest.json",qe=".json",Tt="FEDERATION_DEBUG",A={AT:"@",HYPHEN:"-",SLASH:"/"},H={[A.AT]:"scope_",[A.HYPHEN]:"_",[A.SLASH]:"__"},ge={[H[A.AT]]:A.AT,[H[A.HYPHEN]]:A.HYPHEN,[H[A.SLASH]]:A.SLASH},ze=":",Be="mf-manifest.json",We="mf-stats.json",gr={NPM:"npm",APP:"app"},br="__MF_DEVTOOLS_MODULE_INFO__",Rr="ENCODE_NAME_PREFIX",Sr=".federation",Ir={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"},Nr=Object.freeze({__proto__:null}),$r=Object.freeze({__proto__:null}),Tr=Object.freeze({__proto__:null}),wr=Object.freeze({__proto__:null});function V(){return"undefined"!=typeof window&&void 0!==window.document}function Re(){return"undefined"!=typeof navigator&&"ReactNative"===(null==navigator?void 0:navigator.product)}function Ar(){try{if(V()&&window.localStorage)return!!localStorage.getItem(Tt)}catch(e){return!1}return!1}function ce(){return"undefined"!=typeof process&&process.env,Ar()}var wt=function(){return"undefined"!=typeof process&&process.env?process.env:{}},At="[ Federation Runtime ]",Pr=(e,t,r=ze)=>{let n=e.split(r),o="development"===wt().NODE_ENV&&t,i=e=>e.startsWith("http")||e.includes(qe);if(n.length>=2){let[t,...s]=n;e.startsWith(r)&&(t=n.slice(0,2).join(r),s=[o||n.slice(2).join(r)]);let l=o||s.join(r);return i(l)?{name:t,entry:l}:{name:t,version:l||"*"}}if(1===n.length){let[e]=n;return o&&i(o)?{name:e,entry:o}:{name:e,version:o||"*"}}throw`Invalid entry value: ${e}`},Se=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}${ze}${t}`:t:e,""):""},Xe=function(e,t="",r=!1){try{let n=r?".js":"";return`${t}${e.replace(new RegExp(`${A.AT}`,"g"),H[A.AT]).replace(new RegExp(`${A.HYPHEN}`,"g"),H[A.HYPHEN]).replace(new RegExp(`${A.SLASH}`,"g"),H[A.SLASH])}${n}`}catch(e){throw e}},Or=function(e,t,r){try{let n=e;if(t){if(!n.startsWith(t))return n;n=n.replace(new RegExp(t,"g"),"")}return n=n.replace(new RegExp(`${H[A.AT]}`,"g"),ge[H[A.AT]]).replace(new RegExp(`${H[A.SLASH]}`,"g"),ge[H[A.SLASH]]).replace(new RegExp(`${H[A.HYPHEN]}`,"g"),ge[H[A.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(e){throw e}},Mr=(e,t)=>{if(!e)return"";let r=e;return"."===r&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),Xe(r,"__federation_expose_",t)},Lr=(e,t)=>e?Xe(e,"__federation_shared_",t):"",le=(e,t)=>{if("getPublicPath"in e){let r;return r=e.getPublicPath.startsWith("function")?new Function("return "+e.getPublicPath)()():new Function(e.getPublicPath)(),`${r}${t}`}return"publicPath"in e?V()||Re()||!("ssrPublicPath"in e)?`${e.publicPath}${t}`:`${e.ssrPublicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Fr=(e,t)=>{e||Pt(t)},Pt=e=>{throw new Error(`${At}: ${e}`)},Ie=e=>{console.warn(`${At}: ${e}`)};function Ne(e){try{return JSON.stringify(e,null,2)}catch(e){return""}}var vr=/^([\d^=v<>~]|[*xX]$)/;function Dr(e){return vr.test(e)}var X=(e,t)=>{if(!e)return t;let r=(e=>{if("."===e)return"";if(e.startsWith("./"))return e.replace("./","");if(e.startsWith("/")){let t=e.slice(1);return t.endsWith("/")?t.slice(0,-1):t}return e})(e);return r?r.endsWith("/")?`${r}${t}`:`${r}/${t}`:t};function Ot(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Ye(e,t={}){var r,n,o;let i,{remotes:s={},overrides:l={},version:a}=t,u=()=>"publicPath"in e.metaData?"auto"===e.metaData.publicPath&&a?Ot(a):e.metaData.publicPath:e.metaData.getPublicPath,c=Object.keys(l),h={};Object.keys(s).length||(h=(null==(r=e.remotes)?void 0:r.reduce((e,t)=>{let r,n=t.federationContainerName;return r=c.includes(n)?l[n]:"version"in t?t.version:t.entry,e[n]={matchedVersion:r},e},{}))||{}),Object.keys(s).forEach(e=>h[e]={matchedVersion:c.includes(e)?l[e]:s[e]});let{remoteEntry:{path:f,name:m,type:d},types:p={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:y},globalName:_,ssrRemoteEntry:g}=e.metaData,{exposes:E}=e,S={version:a||"",buildVersion:y,globalName:_,remoteEntry:X(f,m),remoteEntryType:d,remoteTypes:X(p.path,p.name),remoteTypesZip:p.zip||"",remoteTypesAPI:p.api||"",remotesInfo:h,shared:null==e?void 0:e.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version})),modules:null==E?void 0:E.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(null!=(n=e.metaData)&&n.prefetchInterface){let t=e.metaData.prefetchInterface;S=L(b({},S),{prefetchInterface:t})}if(null!=(o=e.metaData)&&o.prefetchEntry){let{path:t,name:r,type:n}=e.metaData.prefetchEntry;S=L(b({},S),{prefetchEntry:X(t,r),prefetchEntryType:n})}if(i="publicPath"in e.metaData?L(b({},S),{publicPath:u(),ssrPublicPath:e.metaData.ssrPublicPath}):L(b({},S),{getPublicPath:u()}),g){let e=X(g.path,g.name);i.ssrRemoteEntry=e,i.ssrRemoteEntryType=g.type||"commonjs-module"}return i}function $e(e){return!(!("remoteEntry"in e)||!e.remoteEntry.includes(qe))}function kr(e){if(!e)return{statsFileName:We,manifestFileName:Be};let t="boolean"==typeof e?"":e.filePath||"",r="boolean"==typeof e?"":e.fileName||"",n=".json",o=r?(s=r).endsWith(n)?s:`${s}${n}`:Be,i=r?((e,t)=>e.replace(n,`${t}${n}`))(o,"-stats"):We;var s;return{statsFileName:X(t,i),manifestFileName:X(t,o)}}var Mt="[ Module Federation ]",ie=console,Hr=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Cr(){try{let e=(new Error).stack;if(!e)return;let[,...t]=e.split("\n"),r=t.filter(e=>!Hr.some(t=>e.includes(t)));return r.length?`Stack trace:\n${r.slice(0,5).join("\n")}`:void 0}catch(e){return}}var be=class{constructor(e,t=ie){this.prefix=e,this.delegate=null!=t?t:ie}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=null!=e?e:ie}emit(e,t){let r=this.delegate,n=ce()?Cr():void 0,o=n?[...t,n]:t,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"];default:return["debug","log"]}})();for(let e of i){let t=r[e];if("function"==typeof t)return void t.call(r,this.prefix,...o)}for(let e of i){let t=ie[e];if("function"==typeof t)return void t.call(ie,this.prefix,...o)}}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){ce()&&this.emit("debug",e)}};function Te(e){return new be(e)}function Lt(e){let t=new be(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function xr(e,t,r){if(e.__mf_infrastructure_logger__&&null!=t&&t.getInfrastructureLogger)try{let n=t.getInfrastructureLogger(r);n&&"object"==typeof n&&("function"==typeof n.log||"function"==typeof n.info||"function"==typeof n.warn||"function"==typeof n.error)&&e.setDelegate(n)}catch(t){e.setDelegate(void 0)}}var Gr=Te(Mt),Ur=Lt(Mt);function Je(e,t){return _(this,null,function*(){try{return yield e()}catch(e){return void(!t&&Ie(e))}})}function Ze(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function we(e){let t,r=null,n=!0,o=2e4,i=document.getElementsByTagName("script");for(let t=0;t<i.length;t++){let o=i[t],s=o.getAttribute("src");if(s&&Ze(s,e.url)){r=o,n=!1;break}}if(!r){let t,n=e.attrs;r=document.createElement("script"),r.type="module"===(null==n?void 0:n.type)?"module":"text/javascript",e.createScriptHook&&(t=e.createScriptHook(e.url,e.attrs),t instanceof HTMLScriptElement?r=t:"object"==typeof t&&("script"in t&&t.script&&(r=t.script),"timeout"in t&&t.timeout&&(o=t.timeout))),r.src||(r.src=e.url),n&&!t&&Object.keys(n).forEach(e=>{r&&("async"===e||"defer"===e?r[e]=n[e]:r.getAttribute(e)||r.setAttribute(e,n[e]))})}let s=(n,o)=>_(null,null,function*(){clearTimeout(t);let i=()=>{"error"===(null==o?void 0:o.type)?null!=e&&e.onErrorCallback&&(null==e||e.onErrorCallback(o)):null!=e&&e.cb&&(null==e||e.cb())};if(r&&(r.onerror=null,r.onload=null,Je(()=>{let{needDeleteScript:t=!0}=e;t&&null!=r&&r.parentNode&&r.parentNode.removeChild(r)}),n&&"function"==typeof n)){let e=n(o);if(e instanceof Promise){let t=yield e;return i(),t}return i(),e}i()});return r.onerror=s.bind(null,r.onerror),r.onload=s.bind(null,r.onload),t=setTimeout(()=>{s(null,new Error(`Remote script "${e.url}" time-outed.`))},o),{script:r,needAttach:n}}function ue(e){let t=null,r=!0,n=document.getElementsByTagName("link");for(let o=0;o<n.length;o++){let i=n[o],s=i.getAttribute("href"),l=i.getAttribute("rel");if(s&&Ze(s,e.url)&&l===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let r,n=e.attrs;e.createLinkHook&&(r=e.createLinkHook(e.url,n),r instanceof HTMLLinkElement&&(t=r)),n&&!r&&Object.keys(n).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,n[e])})}let o=(r,n)=>{let o=()=>{"error"===(null==n?void 0:n.type)?null!=e&&e.onErrorCallback&&(null==e||e.onErrorCallback(n)):null!=e&&e.cb&&(null==e||e.cb())};if(t&&(t.onerror=null,t.onload=null,Je(()=>{let{needDeleteLink:r=!0}=e;r&&null!=t&&t.parentNode&&t.parentNode.removeChild(t)}),r)){let e=r(n);return o(),e}o()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Z(e,t){let{attrs:r={},createScriptHook:n}=t;return new Promise((t,o)=>{let{script:i,needAttach:s}=we({url:e,cb:t,onErrorCallback:o,attrs:b({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});s&&document.head.appendChild(i)})}var Ee=new Map;function ae(e){if(!e)throw new Error("import specifier is required");if(Ee.has(e))return Ee.get(e);let t=new Function("name","return import(name)")(e).then(e=>e).catch(t=>{throw console.error(`Error importing module ${e}:`,t),Ee.delete(e),t});return Ee.set(e,t),t}var Ft=()=>_(null,null,function*(){let e=yield ae("node-fetch");return e.default||e}),Vr=(e,t,r)=>_(null,null,function*(){let n=yield(o=e,i=t||{},r.lifecycle.fetch.emit(o,i));var o,i;return n&&n instanceof Response?n:("undefined"==typeof fetch?yield Ft():fetch)(e,t||{})}),vt="undefined"==typeof ENV_TARGET||"web"!==ENV_TARGET?(url,cb,attrs,loaderHook)=>{if(null!=loaderHook&&loaderHook.createScriptHook){let e=loaderHook.createScriptHook(url);e&&"object"==typeof e&&"url"in e&&(url=e.url)}let urlObj;try{urlObj=new URL(url)}catch(e){return console.error("Error constructing URL:",e),void cb(new Error(`Invalid URL: ${e}`))}let getFetch=()=>_(null,null,function*(){return null!=loaderHook&&loaderHook.fetch?(e,t)=>Vr(e,t,loaderHook):"undefined"==typeof fetch?Ft():fetch}),handleScriptFetch=(f,urlObj)=>_(null,null,function*(){var t,e;try{let res=yield f(urlObj.href),data=yield res.text(),[path,vm]=yield Promise.all([ae("path"),ae("vm")]),scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname),script=new vm.Script(`(function(exports, module, require, __dirname, __filename) {${data}\n})`,{filename:filename,importModuleDynamically:null!=(e=null==(t=vm.constants)?void 0:t.USE_MAIN_CONTEXT_DEFAULT_LOADER)?e:ae});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);let exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){let e=exportedInterface[attrs.globalName]||exportedInterface;return void cb(void 0,e)}cb(void 0,exportedInterface)}catch(e){cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))}});getFetch().then(e=>_(null,null,function*(){if("esm"===(null==attrs?void 0:attrs.type)||"module"===(null==attrs?void 0:attrs.type))return Ke(urlObj.href,{fetch:e,vm:yield ae("vm")}).then(e=>_(null,null,function*(){yield e.evaluate(),cb(void 0,e.namespace)})).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(e,urlObj)})).catch(e=>{cb(e)})}:(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Q="undefined"==typeof ENV_TARGET||"web"!==ENV_TARGET?(e,t)=>new Promise((r,n)=>{vt(e,(e,o)=>{var i,s;if(e)n(e);else{let e=(null==(i=null==t?void 0:t.attrs)?void 0:i.globalName)||`__FEDERATION_${null==(s=null==t?void 0:t.attrs)?void 0:s.name}:custom__`,n=globalThis[e]=o;r(n)}},t.attrs,t.loaderHook)}):(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},je=new Map;function Ke(e,t){return _(this,null,function*(){if(je.has(e))return je.get(e);let{fetch:r,vm:n}=t,o=yield(yield r(e)).text(),i=new n.SourceTextModule(o,{importModuleDynamically:(r,n)=>_(null,null,function*(){return Ke(new URL(r,e).href,t)})});return je.set(e,i),yield i.link(r=>_(null,null,function*(){let n=new URL(r,e).href;return yield Ke(n,t)})),i})}function jr(e,t,r){return function(n){if(!1===n)return!1;if(void 0===n)return!!e&&t;if(!0===n)return t;if(n&&"object"==typeof n)return b(b({},t),n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}var Br=e=>e,Qe="RUNTIME-001",et="RUNTIME-002",tt="RUNTIME-003",rt="RUNTIME-004",nt="RUNTIME-005",Pe="RUNTIME-006",ot="RUNTIME-007",Oe="RUNTIME-008",q="RUNTIME-009",Wr="TYPE-001",Kr="BUILD-001",qr="BUILD-002",zr=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}/${e}`,F=(e,t,r,n)=>{let o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(zr(e)),n&&o.push(`Original Error Message:\n ${n}`),o.join("\n")},M={[Qe]:"Failed to get remoteEntry exports.",[et]:'The remote entry interface does not contain "init"',[tt]:"Failed to get manifest.",[rt]:"Failed to locate remote.",[nt]:"Invalid loadShareSync function call from bundler runtime",[Pe]:"Invalid loadShareSync function call from runtime",[ot]:"Failed to get remote snapshot.",[Oe]:"Failed to load script resources.",[q]:"Please call createInstance first."},Xr={[Wr]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Yr={[Kr]:"Failed to find expose module.",[qr]:"PublicPath is required in prod mode."};b(b(b({},M),Xr),Yr);var te="[ Federation Runtime ]",ct=Te(te);function P(e,t){e||W(t)}function W(e){throw e instanceof Error?(e.message.startsWith(te)||(e.message=`${te}: ${e.message}`),e):new Error(`${te}: ${e}`)}function xe(e){e instanceof Error&&(e.message.startsWith(te)||(e.message=`${te}: ${e.message}`)),ct.warn(e)}function Dt(e,t){return-1===e.findIndex(e=>e===t)&&e.push(t),e}function de(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ht(e){return void 0!==e.entry}function Bt(e){return!e.entry.includes(".json")}function pt(e){return e&&"object"==typeof e}var Jr=Object.prototype.toString;function Zr(e){return"[object Object]"===Jr.call(e)}function Wt(e){return Array.isArray(e)?e:[e]}function Kt(e){let t={url:"",type:"global",globalName:""};return V()||Re()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}var Qr=(e,t)=>{let r;return r=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),r+=t,r},O="object"==typeof globalThis?globalThis:window,G=(()=>{try{return document.defaultView}catch(e){return O}})(),he=G;function Le(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Fe(e,t){return Object.hasOwnProperty.call(e,t)}Fe(O,"__GLOBAL_LOADING_REMOTE_ENTRY__")||Le(O,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});var ee=O.__GLOBAL_LOADING_REMOTE_ENTRY__;function qt(e){var t,r,n,o,i,s;Fe(e,"__VMOK__")&&!Fe(e,"__FEDERATION__")&&Le(e,"__FEDERATION__",e.__VMOK__),Fe(e,"__FEDERATION__")||(Le(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),Le(e,"__VMOK__",e.__FEDERATION__)),null!=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__||(t.__GLOBAL_PLUGIN__=[]),null!=(r=e.__FEDERATION__).__INSTANCES__||(r.__INSTANCES__=[]),null!=(n=e.__FEDERATION__).moduleInfo||(n.moduleInfo={}),null!=(o=e.__FEDERATION__).__SHARE__||(o.__SHARE__={}),null!=(i=e.__FEDERATION__).__MANIFEST_LOADING__||(i.__MANIFEST_LOADING__={}),null!=(s=e.__FEDERATION__).__PRELOADED_MAP__||(s.__PRELOADED_MAP__=new Map)}function zt(e){O.__FEDERATION__.__INSTANCES__.push(e)}function Xt(){return O.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Yt(e,t=ce()){t&&(O.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,O.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.23.0")}function re(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};{let r=Object.keys(e);for(let n of r){let[r,o]=n.split(":"),i=`${r}:${t}`,s=e[i];if(s)return{value:s,key:i}}return{value:void 0,key:t}}}throw new Error("key must be string")}qt(O),qt(G);var kt=()=>G.__FEDERATION__.moduleInfo,en=(e,t)=>{let r=re(t,de(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 t=e,{version:r}=t,n=de(Ve(t,["version"])),o=re(G.__FEDERATION__.moduleInfo,n).value;if((null==o?void 0:o.version)===r)return o}},ve=e=>en(e,G.__FEDERATION__.moduleInfo),Ht=(e,t)=>{let r=de(e);return G.__FEDERATION__.moduleInfo[r]=t,G.__FEDERATION__.moduleInfo},tn=e=>(G.__FEDERATION__.moduleInfo=b(b({},G.__FEDERATION__.moduleInfo),e),()=>{let t=Object.keys(e);for(let e of t)delete G.__FEDERATION__.moduleInfo[e]}),mt=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:O[r]}},Jt=e=>{let{__GLOBAL_PLUGIN__:t}=G.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):xe(`The plugin ${e.name} has been registered.`)})},rn=()=>G.__FEDERATION__.__GLOBAL_PLUGIN__,nn=e=>O.__FEDERATION__.__PRELOADED_MAP__.get(e),on=e=>O.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ye="default",Zt="global",Ct="[0-9A-Za-z-]+",yt=`(?:\\+(${Ct}(?:\\.${Ct})*))`,fe="0|[1-9]\\d*",De="[0-9]+",Qt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",xt=`(?:${De}|${Qt})`,sn=`(?:-?(${xt}(?:\\.${xt})*))`,Gt=`(?:${fe}|${Qt})`,er=`(?:-(${Gt}(?:\\.${Gt})*))`,st=`${fe}|x|X|\\*`,ne=`[v=\\s]*(${st})(?:\\.(${st})(?:\\.(${st})(?:${er})?${yt}?)?)?`,an=`^\\s*(${ne})\\s+-\\s+(${ne})\\s*$`,cn=`(${De})\\.(${De})\\.(${De})`,ln=`[v=\\s]*${cn}${sn}?${yt}?`,_t="((?:<|>)?=?)",un=`(\\s*)${_t}\\s*(${ln}|${ne})`,tr="(?:~>?)",fn=`(\\s*)${tr}\\s+`,rr="(?:\\^)",dn=`(\\s*)${rr}\\s+`,hn="(<|>)?=?\\s*\\*",pn=`^${rr}${ne}$`,mn=`(${fe})\\.(${fe})\\.(${fe})`,yn=`v?${mn}${er}?${yt}?`,_n=`^${tr}${ne}$`,En=`^${_t}\\s*${ne}$`,gn=`^${_t}\\s*(${yn})$|^$`,bn="^\\s*>=\\s*0.0.0\\s*$";function K(e){return new RegExp(e)}function D(e){return!e||"x"===e.toLowerCase()||"*"===e}function nr(...e){return t=>e.reduce((e,t)=>t(e),t)}function Ut(e){return e.match(K(gn))}function Vt(e,t,r,n){let o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}function Rn(e){return e.replace(K(an),(e,t,r,n,o,i,s,l,a,u,c,h)=>`${t=D(r)?"":D(n)?`>=${r}.0.0`:D(o)?`>=${r}.${n}.0`:`>=${t}`} ${l=D(a)?"":D(u)?`<${Number(a)+1}.0.0-0`:D(c)?`<${a}.${Number(u)+1}.0-0`:h?`<=${a}.${u}.${c}-${h}`:`<=${l}`}`.trim())}function Sn(e){return e.replace(K(un),"$1$2$3")}function In(e){return e.replace(K(fn),"$1~")}function Nn(e){return e.replace(K(dn),"$1^")}function $n(e){return e.trim().split(/\s+/).map(e=>e.replace(K(pn),(e,t,r,n,o)=>D(t)?"":D(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:D(n)?"0"===t?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.0 <${Number(t)+1}.0.0-0`:o?"0"===t?"0"===r?`>=${t}.${r}.${n}-${o} <${t}.${r}.${Number(n)+1}-0`:`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n}-${o} <${Number(t)+1}.0.0-0`:"0"===t?"0"===r?`>=${t}.${r}.${n} <${t}.${r}.${Number(n)+1}-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${Number(t)+1}.0.0-0`)).join(" ")}function Tn(e){return e.trim().split(/\s+/).map(e=>e.replace(K(_n),(e,t,r,n,o)=>D(t)?"":D(r)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:D(n)?`>=${t}.${r}.0 <${t}.${Number(r)+1}.0-0`:o?`>=${t}.${r}.${n}-${o} <${t}.${Number(r)+1}.0-0`:`>=${t}.${r}.${n} <${t}.${Number(r)+1}.0-0`)).join(" ")}function wn(e){return e.split(/\s+/).map(e=>e.trim().replace(K(En),(e,t,r,n,o,i)=>{let s=D(r),l=s||D(n),a=l||D(o);return"="===t&&a&&(t=""),i="",s?">"===t||"<"===t?"<0.0.0-0":"*":t&&a?(l&&(n=0),o=0,">"===t?(t=">=",l?(r=Number(r)+1,n=0,o=0):(n=Number(n)+1,o=0)):"<="===t&&(t="<",l?r=Number(r)+1:n=Number(n)+1),"<"===t&&(i="-0"),`${t+r}.${n}.${o}${i}`):l?`>=${r}.0.0${i} <${Number(r)+1}.0.0-0`:a?`>=${r}.${n}.0${i} <${r}.${Number(n)+1}.0-0`:e})).join(" ")}function An(e){return e.trim().replace(K(hn),"")}function Pn(e){return e.trim().replace(K(bn),"")}function ke(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function On(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],o=n[e];if(t!==o)return void 0===t&&void 0===o?0:t?o?ke(t,o):-1:1}return 0}function Me(e,t){return ke(e.major,t.major)||ke(e.minor,t.minor)||ke(e.patch,t.patch)||On(e,t)}function it(e,t){return e.version===t.version}function Mn(e,t){switch(e.operator){case"":case"=":return it(e,t);case">":return Me(e,t)<0;case">=":return it(e,t)||Me(e,t)<0;case"<":return Me(e,t)>0;case"<=":return it(e,t)||Me(e,t)>0;case void 0:return!0;default:return!1}}function Ln(e){return nr($n,Tn,wn,An)(e)}function Fn(e){return nr(Rn,Sn,In,Nn)(e.trim()).split(/\s+/).join(" ")}function He(e,t){if(!e)return!1;let r=Ut(e);if(!r)return!1;let[,n,,o,i,s,l]=r,a={operator:n,version:Vt(o,i,s,l),major:o,minor:i,patch:s,preRelease:null==l?void 0:l.split(".")},u=t.split("||");for(let e of u){let t=e.trim();if(!t||"*"===t||"x"===t)return!0;try{let e=Fn(t);if(!e.trim())return!0;let r=e.split(" ").map(e=>Ln(e)).join(" ");if(!r.trim())return!0;let n=r.split(/\s+/).map(e=>Pn(e)).filter(Boolean);if(0===n.length)continue;let o=!0;for(let e of n){let t=Ut(e);if(!t){o=!1;break}let[,r,,n,i,s,l]=t;if(!Mn({operator:r,version:Vt(n,i,s,l),major:n,minor:i,patch:s,preRelease:null==l?void 0:l.split(".")},a)){o=!1;break}}if(o)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}function vn(e,t,r,n){var o,i,s;let l;return l="get"in e?e.get:"lib"in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)}),L(b({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:b({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!=(o=e.version)?o:"0",scope:Array.isArray(e.scope)?e.scope:[null!=(i=e.scope)?i:"default"],strategy:(null!=(s=e.strategy)?s:n)||"version-first"})}function or(e,t){let r=t.shared||{},n=t.name,o=Object.keys(r).reduce((e,o)=>{let i=Wt(r[o]);return e[o]=e[o]||[],i.forEach(r=>{e[o].push(vn(r,n,o,t.shareStrategy))}),e},{}),i=b({},e.shared);return Object.keys(o).forEach(e=>{i[e]?o[e].forEach(t=>{i[e].find(e=>e.version===t.version)||i[e].push(t)}):i[e]=o[e]}),{shared:i,shareInfos:o}}function pe(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!!He(r(e),`<=${r(t)}`)}var Et=(e,t)=>{let r=t||function(e,t){return pe(e,t)};return Object.keys(e).reduce((e,t)=>!e||r(e,t)||"0"===e?t:e,0)},gt=e=>!!e.loaded||"function"==typeof e.lib,Dn=e=>!!e.loading;function kn(e,t,r){let n=e[t][r];return Et(e[t][r],function(e,t){return!gt(n[e])&&pe(e,t)})}function Hn(e,t,r){let n=e[t][r];return Et(e[t][r],function(e,t){let r=e=>gt(e)||Dn(e);return r(n[t])?!r(n[e])||!!pe(e,t):!r(n[e])&&pe(e,t)})}function Cn(e){return"loaded-first"===e?Hn:kn}function Ce(e,t,r,n){if(!e)return;let{shareConfig:o,scope:i=ye,strategy:s}=r,l=Array.isArray(i)?i:[i];for(let i of l)if(o&&e[i]&&e[i][t]){let{requiredVersion:l}=o,a=Cn(s)(e,i,t),u=()=>{if(o.singleton){if("string"==typeof l&&!He(a,l)){let n=`Version ${a} from ${a&&e[i][t][a].from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${l})`;o.strictVersion?W(n):xe(n)}return e[i][t][a]}if(!1===l||"*"===l||He(a,l))return e[i][t][a];for(let[r,n]of Object.entries(e[i][t]))if(He(r,l))return n},c={shareScopeMap:e,scope:i,pkgName:t,version:a,GlobalFederation:he.__FEDERATION__,resolver:u};return(n.emit(c)||c).resolver()}}function sr(){return he.__FEDERATION__.__SHARE__}function jt(e){var t;let{pkgName:r,extraOptions:n,shareInfos:o}=e,i=null!=(t=null==n?void 0:n.resolver)?t:e=>{if(!e)return;let t={};e.forEach(e=>{t[e.version]=e});let r=Et(t,function(e,r){return!gt(t[e])&&pe(e,r)});return t[r]};return Object.assign({},i(o[r]),null==n?void 0:n.customShareInfo)}function xn(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function Gn(e,t){for(let r of e){let e=t.startsWith(r.name),n=t.replace(r.name,"");if(e){if(n.startsWith("/")){return n=`.${n}`,{pkgNameOrAlias:r.name,expose:n,remote:r}}if(""===n)return{pkgNameOrAlias:r.name,expose:".",remote:r}}let o=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&o){if(i&&i.startsWith("/")){return i=`.${i}`,{pkgNameOrAlias:r.alias,expose:i,remote:r}}if(""===i)return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Un(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}function Vn(e,t){let r=rn(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(t=>{null!=e&&e.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{n.forEach(r=>{r.applyPlugin(e,t)})}),e}var ir=".then(callbacks[0]).catch(callbacks[1])";function jn(e){return _(this,arguments,function*({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):new Function("callbacks",`import("${e}")${ir}`)([r,n])}catch(e){n(e)}})})}function Bn(e){return _(this,arguments,function*({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):"undefined"==typeof __system_context__?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${ir}`)([r,n])}catch(e){n(e)}})})}function ar(e,t,r){let{remoteEntryKey:n,entryExports:o}=mt(e,t);return P(o,F(Qe,M,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n})),o}function Wn(e){return _(this,arguments,function*({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){let{entryExports:i}=mt(e,t);return i||Z(o?o(r):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(()=>ar(e,t,r)).catch(t=>{throw P(void 0,F(Oe,M,{remoteName:e,resourceUrl:r})),t})})}function Kn(e){return _(this,arguments,function*({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){let{entry:o,entryGlobalName:i,name:s,type:l}=e;switch(l){case"esm":case"module":return jn({entry:o,remoteEntryExports:t});case"system":return Bn({entry:o,remoteEntryExports:t});default:return Wn({entry:o,globalName:i,name:s,loaderHook:r,getEntryUrl:n})}})}function qn(e){return _(this,arguments,function*({remoteInfo:e,loaderHook:t}){let{entry:r,entryGlobalName:n,name:o,type:i}=e,{entryExports:s}=mt(o,n);return s||Q(r,{attrs:{name:o,globalName:n,type:i},loaderHook:{createScriptHook:(e,r={})=>{let n=t.lifecycle.createScript.emit({url:e,attrs:r});if(n&&"url"in n)return n}}}).then(()=>ar(o,n,r)).catch(e=>{throw e})})}function lt(e){let{entry:t,name:r}=e;return Se(r,t)}function oe(e){return _(this,null,function*(){let{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:i=!1}=e,s=lt(n);if(r)return r;if(!ee[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;ee[s]=e.emit({loaderHook:l,remoteInfo:n,remoteEntryExports:r}).then(e=>e||(("undefined"!=typeof ENV_TARGET?"web"===ENV_TARGET:V())?Kn({remoteInfo:n,remoteEntryExports:r,loaderHook:l,getEntryUrl:o}):qn({remoteInfo:n,loaderHook:l}))).catch(e=>_(null,null,function*(){let o=lt(n);if(e instanceof Error&&e.message.includes(Oe)&&!i){let e=e=>oe(L(b({},e),{_inErrorHandling:!0})),i=yield t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:ee,uniqueKey:o});if(i)return i}throw e}))}return ee[s]})}function me(e){return L(b({},e),{entry:"entry"in e?e.entry:"",type:e.type||Zt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ye})}function cr(e){return b({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function zn(e,t){return t.map(t=>{let r=Un(e,t.nameOrAlias);return P(r,`Unable to preload ${t.nameOrAlias} as it is not included in ${!r&&Ne({remoteInfo:r,remotes:e})}`),{remote:r,preloadConfig:cr(t)}})}function Xn(e){return e?e.map(e=>"."===e?e:e.startsWith("./")?e.replace("./",""):e):[]}function lr(e,t,r,n=!0){let{cssAssets:o,jsAssetsWithoutEntry:i,entryAssets:s}=r;if(t.options.inBrowser){if(s.forEach(r=>{let{moduleInfo:n}=r,o=t.moduleCache.get(e.name);oe(o?{origin:t,remoteInfo:n,remoteEntryExports:o.remoteEntryExports}:{origin:t,remoteInfo:n,remoteEntryExports:void 0})}),n){let e={rel:"preload",as:"style"};o.forEach(r=>{let{link:n,needAttach:o}=ue({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}});o&&document.head.appendChild(n)})}else{let e={rel:"stylesheet",type:"text/css"};o.forEach(r=>{let{link:n,needAttach:o}=ue({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});o&&document.head.appendChild(n)})}if(n){let e={rel:"preload",as:"script"};i.forEach(r=>{let{link:n,needAttach:o}=ue({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}});o&&document.head.appendChild(n)})}else{let r={fetchpriority:"high",type:"module"===(null==e?void 0:e.type)?"module":"text/javascript"};i.forEach(e=>{let{script:n,needAttach:o}=we({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});o&&document.head.appendChild(n)})}}}var se=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}getEntry(){return _(this,null,function*(){if(this.remoteEntryExports)return this.remoteEntryExports;let e=yield oe({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return P(e,`remoteEntryExports is undefined \n ${Ne(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports})}init(e,t){return _(this,null,function*(){let r=yield this.getEntry();if(!this.inited){let n=this.host.shareScopeMap,o=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];o.length||o.push("default"),o.forEach(e=>{n[e]||(n[e]={})});let i=n[o[0]],s=[],l={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?o:this.remoteInfo.shareScope||"default"};Object.defineProperty(l,"shareScopeMap",{value:n,enumerable:!1});let a=yield this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:l,initScope:s,remoteInfo:this.remoteInfo,origin:this.host});void 0===(null==r?void 0:r.init)&&W(F(et,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),yield r.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),yield this.host.hooks.lifecycle.initContainer.emit(L(b({},a),{id:e,remoteSnapshot:t,remoteEntryExports:r}))}return r})}get(e,t,r,n){return _(this,null,function*(){let o,{loadFactory:i=!0}=r||{loadFactory:!0},s=yield this.init(e,n);this.lib=s,this.inited=!0,o=yield this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),o||(o=yield s.get(t)),P(o,`${de(this.remoteInfo)} remote don't export ${t}.`);let l=Qr(this.remoteInfo.name,t),a=this.wraperFactory(o,l);return i?yield a():a})}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?()=>_(null,null,function*(){let n=yield e();return r(n,t),n}):()=>{let n=e();return r(n,t),n}}},k=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}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()}},C=class extends k{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let n=0,o=t=>!1!==t&&(n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):t);t=o()}return Promise.resolve(t)}};function ur(e,t){if(!pt(t))return!1;if(e!==t)for(let r in e)if(!(r in t))return!1;return!0}var Y=class extends k{constructor(e){super(),this.onerror=W,this.type=e}emit(e){pt(e)||W(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let r=t(e);if(!ur(e,r)){this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}e=r}catch(e){xe(e),this.onerror(e)}return e}},B=class extends k{constructor(e){super(),this.onerror=W,this.type=e}emit(e){pt(e)||W(`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=>(xe(t),this.onerror(t),e),o=i=>{if(ur(e,i)){if(e=i,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,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(o(e))}return Promise.resolve(e)}},z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var r;P(Zr(e),"Plugin configuration is invalid.");let n=e.name;P(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,null==(r=e.apply)||r.call(e,t),Object.keys(this.lifecycle).forEach(t=>{let r=e[t];r&&this.lifecycle[t].on(r)}))}removePlugin(e){P(e,"A name is required.");let t=this.registerPlugins[e];P(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(e=>{"name"!==e&&this.lifecycle[e].remove(t[e])})}};function fr(e,t){let r=Kt(t);r.url||W(`The attribute remoteEntry of ${e.name} must not be undefined.`);let n=le(t,r.url);!V()&&!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 Yn(){return{name:"snapshot-plugin",afterResolve(e){return _(this,null,function*(){let{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:i,id:s}=e;if(!ht(t)||!Bt(t)){let{remoteSnapshot:l,globalSnapshot:a}=yield o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:s});fr(i,l);let u={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},c=yield o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:u,remoteInfo:i,remote:t,remoteSnapshot:l,globalSnapshot:a});return c&&lr(i,o,c,!1),L(b({},e),{remoteSnapshot:l})}return e})}}}function Jn(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 dr(e,t,r,n,o={},i){let s=de(t),{value:l}=re(e,s),a=i||l;if(a&&!$e(a)&&(r(a,t,n),a.remotesInfo)){let t=Object.keys(a.remotesInfo);for(let n of t){if(o[n])continue;o[n]=!0;let t=Jn(n),i=a.remotesInfo[n];dr(e,{name:t.name,version:i.matchedVersion},r,!1,o,void 0)}}}var at=(e,t)=>document.querySelector(`${e}[${"link"===e?"href":"src"}="${t}"]`);function Zn(e,t,r,n,o){let i=[],s=[],l=[],a=new Set,u=new Set,{options:c}=e,{preloadConfig:h}=t,{depsRemote:f}=h;if(dr(n,r,(t,r,n)=>{var o;let a;if(n)a=h;else if(Array.isArray(f)){let e=f.find(e=>e.nameOrAlias===r.name||e.nameOrAlias===r.alias);if(!e)return;a=cr(e)}else{if(!0!==f)return;a=h}let u=le(t,Kt(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:[],m=Xn(a.exposes);function d(e){let r=e.map(e=>le(t,e));return a.filter?r.filter(a.filter):r}if(m.length&&"modules"in t&&(c=null==(o=null==t?void 0:t.modules)?void 0:o.reduce((e,t)=>(-1!==(null==m?void 0:m.indexOf(t.moduleName))&&e.push(t),e),[])),c){let n=c.length;for(let o=0;o<n;o++){let n=c[o],l=`${r.name}/${n.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===n.moduleName?r.name:l,name:r.name,remoteSnapshot:t,preloadConfig:a,remote:r,origin:e}),!nn(l)&&("all"===a.resourceCategory?(i.push(...d(n.assets.css.async)),i.push(...d(n.assets.css.sync)),s.push(...d(n.assets.js.async)),s.push(...d(n.assets.js.sync))):(a.resourceCategory="sync")&&(i.push(...d(n.assets.css.sync)),s.push(...d(n.assets.js.sync))),on(l))}}},!0,{},o),o.shared&&o.shared.length>0){let t=(t,r)=>{let n=Ce(e.shareScopeMap,r.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);n&&"function"==typeof n.lib&&(r.assets.js.sync.forEach(e=>{a.add(e)}),r.assets.css.sync.forEach(e=>{u.add(e)}))};o.shared.forEach(e=>{var r;let n=null==(r=c.shared)?void 0:r[e.sharedName];if(!n)return;let o=e.version?n.find(t=>t.version===e.version):n;o&&Wt(o).forEach(r=>{t(r,e)})})}let m=s.filter(e=>!a.has(e)&&!at("script",e));return{cssAssets:i.filter(e=>!u.has(e)&&!at("link",e)),jsAssetsWithoutEntry:m,entryAssets:l.filter(e=>!at("script",e.url))}}var Qn=function(){return{name:"generate-preload-assets-plugin",generatePreloadAssets(e){return _(this,null,function*(){let{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:s}=e;return V()?ht(o)&&Bt(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(fr(n,s),Zn(t,r,n,i,s)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}})}}};function hr(e,t){let r=ve({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&re(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:kt(),remoteSnapshot:ve({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:kt(),remoteSnapshot:ve({name:e.name,version:"version"in e?e.version:void 0})}}var ut=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new z({beforeLoadRemoteSnapshot:new C("beforeLoadRemoteSnapshot"),loadSnapshot:new B("loadGlobalSnapshot"),loadRemoteSnapshot:new B("loadRemoteSnapshot"),afterLoadSnapshot:new B("afterLoadSnapshot")}),this.manifestLoading=he.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}loadRemoteSnapshotInfo(e){return _(this,arguments,function*({moduleInfo:e,id:t,expose:r}){let{options:n}=this.HostInstance;yield this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=ve({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},tn({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!re(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo=L(b({},null==o?void 0:o.remotesInfo),{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));let i,s,{hostGlobalSnapshot:l,remoteSnapshot:a,globalSnapshot:u}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:h}=yield this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:l,remoteSnapshot:a,globalSnapshot:u});if(c)if($e(c)){let t=V()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",r=yield this.getManifestJson(t,e,{});i=r,s=Ht(L(b({},e),{entry:t}),r)}else{let{remoteSnapshot:t}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});i=t,s=h}else if(ht(e)){let t=yield this.getManifestJson(e.entry,e,{}),r=Ht(e,t),{remoteSnapshot:n}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:t,from:"global"});i=n,s=r}else W(F(ot,M,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(h)}));return yield this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:i}),{remoteSnapshot:i,globalSnapshot:s}})}getGlobalRemoteInfo(e){return hr(e,this.HostInstance)}getManifestJson(e,t,r){return _(this,null,function*(){let r=()=>_(this,null,function*(){let r=this.manifestCache.get(e);if(r)return r;try{let t=yield this.loaderHook.lifecycle.fetch.emit(e,{});(!t||!(t instanceof Response))&&(t=yield fetch(e,{})),r=yield t.json()}catch(n){r=yield this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),r||(delete this.manifestLoading[e],W(F(tt,M,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${n}`)))}return P(r.metaData&&r.exposes&&r.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,r),r});return this.manifestLoading[e]||(this.manifestLoading[e]=(()=>_(this,null,function*(){let n=yield r(),o=Ye(n,{version:e}),{remoteSnapshot:i}=yield this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:n,remoteSnapshot:o,manifestUrl:e,from:"manifest"});return i}))().then(e=>e)),this.manifestLoading[e]})}},ft=class{constructor(e){this.hooks=new z({afterResolve:new B("afterResolve"),beforeLoadShare:new B("beforeLoadShare"),loadShare:new C,resolveShare:new Y("resolveShare"),initContainerShareScopeMap:new Y("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){let{shareInfos:r,shared:n}=or(e,t);return Object.keys(r).forEach(e=>{r[e].forEach(r=>{r.scope.forEach(n=>{var o;(null==(o=this.shareScopeMap[n])?void 0:o[e])||this.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:r.loaded||!!r.lib,shared:r,from:t.name})})})}),{shareInfos:r,shared:n}}loadShare(e,t){return _(this,null,function*(){let{host:r}=this,n=jt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&(yield Promise.all(n.scope.map(e=>_(this,null,function*(){yield Promise.all(this.initializeSharing(e,{strategy:n.strategy}))}))));let o=yield this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r}),{shareInfo:i}=o;P(i,`Cannot find ${e} Share in the ${r.options.name}. Please ensure that the ${e} Share parameters have been injected`);let s=Ce(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),l=e=>{e.useIn||(e.useIn=[]),Dt(e.useIn,r.options.name)};if(s&&s.lib)return l(s),s.lib;if(s&&s.loading&&!s.loaded){let e=yield s.loading;return s.loaded=!0,s.lib||(s.lib=e),l(s),e}if(s){let t=_(this,null,function*(){let e=yield s.get();return l(s),s.loaded=!0,s.lib=e,e});return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:t}),t}{if(null!=t&&t.customShareInfo)return!1;let n=_(this,null,function*(){let t=yield i.get();i.lib=t,i.loaded=!0,l(i);let r=Ce(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare);return r&&(r.lib=t,r.loaded=!0,r.from=i.from),t});return this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:n}),n}})}initializeSharing(e=ye,t){let{host:r}=this,n=null==t?void 0:t.from,o=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 l=this.shareScopeMap,a=r.options.name;l[e]||(l[e]={});let u=l[e],c=e=>_(this,null,function*(){let{module:t}=yield r.remoteHandler.getRemoteModuleAndOptions({id:e});yield t.init()});return Object.keys(r.options.shared).forEach(t=>{r.options.shared[t].forEach(r=>{r.scope.includes(e)&&((e,t)=>{var r;let{version:n,eager:o}=t;u[e]=u[e]||{};let i=u[e],s=i[n],l=!(!s||!(s.eager||null!=(r=s.shareConfig)&&r.eager));(!s||"loaded-first"!==s.strategy&&!s.loaded&&(!o!=!l?o:a>s.from))&&(i[n]=t)})(t,r)})}),("version-first"===r.options.shareStrategy||"version-first"===o)&&r.options.remotes.forEach(t=>{t.shareScope===e&&s.push(c(t.name))}),s}loadShareSync(e,t){let{host:r}=this,n=jt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&n.scope.forEach(e=>{this.initializeSharing(e,{strategy:n.strategy})});let o=Ce(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare),i=e=>{e.useIn||(e.useIn=[]),Dt(e.useIn,r.options.name)};if(o){if("function"==typeof o.lib)return i(o),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if("function"==typeof o.get){let t=o.get();if(!(t instanceof Promise))return i(o),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:t,shared:o}),t}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){let o=n.get();if(o instanceof Promise){let n="build"===(null==t?void 0:t.from)?nt:Pe;throw new Error(F(n,M,{hostName:r.options.name,sharedPkgName:e}))}return n.lib=o,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}throw new Error(F(Pe,M,{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:n,loading:o,loaded:i,get:s}){let l=t,{version:a,scope:u="default"}=l,c=Ve(l,["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][a])return this.shareScopeMap[t][e][a]=L(b({version:a,scope:[t]},c),{lib:n,loaded:i,loading:o}),void(s&&(this.shareScopeMap[t][e][a].get=s));let l=this.shareScopeMap[t][e][a];o&&!l.loading&&(l.loading=o),i&&!l.loaded&&(l.loaded=i),r&&l.from!==r&&(l.from=r)})}_setGlobalShareScopeMap(e){let t=sr(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}},dt=class{constructor(e){this.hooks=new z({beforeRegisterRemote:new Y("beforeRegisterRemote"),registerRemote:new Y("registerRemote"),beforeRequest:new B("beforeRequest"),onLoad:new C("onLoad"),handlePreloadModule:new k("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,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:o,alias:i}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},i&&e.startsWith(o)){let t=e.replace(o,i);return void(this.idToRemoteMap[t]={name:r.name,expose:n})}if(i&&e.startsWith(i)){let t=e.replace(i,o);this.idToRemoteMap[t]={name:r.name,expose:n}}}loadRemote(e,t){return _(this,null,function*(){let{host:r}=this;try{let{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:i,remoteMatchInfo:s}=yield this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:a,expose:u,id:c,remoteSnapshot:h}=s,f=yield o.get(c,u,t,h),m=yield this.hooks.lifecycle.onLoad.emit({id:c,pkgNameOrAlias:l,expose:u,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:a,options:i,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,s),"function"==typeof m?m:f}catch(n){let{from:o="runtime"}=t||{from:"runtime"},i=yield this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!i)throw n;return i}})}preloadRemote(e){return _(this,null,function*(){let{host:t}=this;yield this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=zn(t.options.remotes,e);yield Promise.all(r.map(e=>_(this,null,function*(){let{remote:r}=e,n=me(r),{globalSnapshot:o,remoteSnapshot:i}=yield t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:r}),s=yield this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:e,remote:r,remoteInfo:n,globalSnapshot:o,remoteSnapshot:i});s&&lr(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})})}getRemoteModuleAndOptions(e){return _(this,null,function*(){let t,{host:r}=this,{id:n}=e;try{t=yield this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(e){if(t=yield this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:e,lifecycle:"beforeRequest"}),!t)throw e}let{id:o}=t,i=Gn(r.options.remotes,o);P(i,F(rt,M,{hostName:r.options.name,requestId:o}));let{remote:s}=i,l=me(s),a=yield r.sharedHandler.hooks.lifecycle.afterResolve.emit(L(b({id:o},i),{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:c}=a;P(u&&c,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let h=r.moduleCache.get(u.name),f={host:r,remoteInfo:l};return h||(h=new se(f),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:f,remoteMatchInfo:a}})}registerRemote(e,t,r){let{host:n}=this,o=()=>{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)))});P(!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&&V()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=ye),e.type||(e.type=Zt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});let i=t.find(t=>t.name===e.name);if(i){let s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];null!=r&&r.force&&(this.removeRemote(i),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),Ie(s.join(" ")))}else o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n})}removeRemote(e){var t;try{let{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(e=>e.name===n);-1!==o&&r.options.remotes.splice(o,1);let i=r.moduleCache.get(e.name);if(i){let n=i.remoteInfo,o=n.entryGlobalName;O[o]&&(null!=(t=Object.getOwnPropertyDescriptor(O,o))&&t.configurable?delete O[o]:O[o]=void 0);let s=lt(i.remoteInfo);ee[s]&&delete ee[s],r.snapshotHandler.manifestCache.delete(n.entry);let l=n.buildVersion?Se(n.name,n.buildVersion):n.name,a=O.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===l:e.name===l);if(-1!==a){let e=O.__FEDERATION__.__INSTANCES__[a];l=e.options.id||l;let t=sr(),r=!0,o=[];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 l=s[i];l&&Object.keys(l).forEach(s=>{let a=l[s];a&&"object"==typeof a&&a.from===n.name&&(a.loaded||a.loading?(a.useIn=a.useIn.filter(e=>e!==n.name),a.useIn.length?r=!1:o.push([e,t,i,s])):o.push([e,t,i,s]))})})})}),r&&(e.shareScopeMap={},delete t[l]),o.forEach(([e,r,n,o])=>{var i,s,l;null==(l=null==(s=null==(i=t[e])?void 0:i[r])?void 0:s[n])||delete l[o]}),O.__FEDERATION__.__INSTANCES__.splice(a,1)}let{hostGlobalSnapshot:u}=hr(e,r);if(u){let t=u&&"remotesInfo"in u&&u.remotesInfo&&re(u.remotesInfo,e.name).key;t&&(delete u.remotesInfo[t],he.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete he.__FEDERATION__.__MANIFEST_LOADING__[t])}r.moduleCache.delete(e.name)}}catch(e){ct.log("removeRemote fail: ",e)}}},eo="boolean"!=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,J=class{constructor(e){this.hooks=new z({beforeInit:new Y("beforeInit"),init:new k,beforeInitContainer:new B("beforeInitContainer"),initContainer:new B("initContainer")}),this.version="0.23.0",this.moduleCache=new Map,this.loaderHook=new z({getModuleInfo:new k,createScript:new k,createLink:new k,fetch:new C,loadEntryError:new C,getModuleFactory:new C}),this.bridgeHook=new z({beforeBridgeRender:new k,afterBridgeRender:new k,beforeBridgeDestroy:new k,afterBridgeDestroy:new k});let t=eo?[Yn(),Qn()]:[],r={id:xn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:V()};this.name=e.name,this.options=r,this.snapshotHandler=new ut(this),this.sharedHandler=new ft(this),this.remoteHandler=new dt(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}loadShare(e,t){return _(this,null,function*(){return this.sharedHandler.loadShare(e,t)})}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=ye,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){let n=me({name:e,entry:t}),o=new se({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}loadRemote(e,t){return _(this,null,function*(){return this.remoteHandler.loadRemote(e,t)})}preloadRemote(e){return _(this,null,function*(){return this.remoteHandler.preloadRemote(e)})}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){let{shared:r}=or(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),i=this.remoteHandler.formatAndRegisterRemote(o,n),{shared:s}=this.sharedHandler.registerShared(o,n),l=[...o.plugins];n.plugins&&n.plugins.forEach(e=>{l.includes(e)||l.push(e)});let a=L(b(b({},e),t),{plugins:l,remotes:i,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:a}),a}registerPlugins(e){let t=Vn(e,this);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)}registerShared(e){this.sharedHandler.registerShared(this.options,L(b({},this.options),{shared:e}))}};function to(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function pr(e,t){let r=to();return O.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===e&&!n.options.version&&!t||n.options.name===e&&t&&n.options.version===t))}function mr(e){let t=new(Xt()||J)(e);return zt(t),t}var $=null;function ro(e){let t=pr(e.name,e.version);return t?(t.initOptions(e),$||($=t),t):$=mr(e)}function no(...e){return P($,F(q,M)),$.loadRemote.apply($,e)}function oo(...e){return P($,F(q,M)),$.loadShare.apply($,e)}function so(...e){return P($,F(q,M)),$.loadShareSync.apply($,e)}function io(...e){return P($,F(q,M)),$.preloadRemote.apply($,e)}function ao(...e){return P($,F(q,M)),$.registerRemotes.apply($,e)}function co(...e){return P($,F(q,M)),$.registerPlugins.apply($,e)}function lo(){return $}function uo(...e){return P($,F(q,M)),$.registerShared.apply($,e)}return Yt(J),window[$t]={MFRuntime:Ge,MFSDK:Ae},exports.MFRuntime=Ge,exports.MFSDK=Ae,exports}({});
1
+ function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function _async_to_generator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function i(e){asyncGeneratorStep(a,r,o,i,c,"next",e)}function c(e){asyncGeneratorStep(a,r,o,i,c,"throw",e)}i(void 0)})}}function _call_super(e,t,n){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,n||[],_get_prototype_of(e).constructor):t.apply(e,n))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){_define_property(e,t,n[t])})}return e}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function _object_without_properties(e,t){if(null==e)return{};var n,r,o=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _object_without_properties_loose(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_array(e){return _array_with_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var n,r,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}var EMP_SHARE_RUNTIME=function(exports){"use strict";var ir=Object.defineProperty,pt=function(e,t){for(var n in t)ir(e,n,{get:t[n],enumerable:!0})},mt="EMP_SHARE_RUNTIME",De={};pt(De,{Module:function(){return te},ModuleFederation:function(){return q},createInstance:function(){return sr},getInstance:function(){return Zn},getRemoteEntry:function(){return ee},getRemoteInfo:function(){return fe},init:function(){return Wn},loadRemote:function(){return Kn},loadScript:function(){return z},loadScriptNode:function(){return X},loadShare:function(){return qn},loadShareSync:function(){return zn},preloadRemote:function(){return Xn},registerGlobalPlugins:function(){return Ut},registerPlugins:function(){return Jn},registerRemotes:function(){return Yn},registerShared:function(){return Qn}});var Ie={},_obj,_obj1;pt(Ie,{BROWSER_LOG_KEY:function(){return yt},ENCODE_NAME_PREFIX:function(){return ur},EncodedNameTransformMap:function(){return pe},FederationModuleManifest:function(){return ar},MANIFEST_EXT:function(){return Ue},MFModuleType:function(){return cr},MFPrefetchCommon:function(){return dr},MODULE_DEVTOOL_IDENTIFIER:function(){return lr},ManifestFileName:function(){return He},NameTransformMap:function(){return v},NameTransformSymbol:function(){return I},SEPARATOR:function(){return Ve},StatsFileName:function(){return Ce},TEMP_DIR:function(){return fr},assert:function(){return Sr},bindLoggerToCompiler:function(){return Or},composeKeyWithSeparator:function(){return _e},containerPlugin:function(){return hr},containerReferencePlugin:function(){return pr},createInfrastructureLogger:function(){return St},createLink:function(){return ie},createLogger:function(){return Re},createModuleFederationConfig:function(){return Lr},createScript:function(){return Se},createScriptNode:function(){return Nt},decodeName:function(){return gr},encodeName:function(){return je},error:function(){return gt},generateExposeFilename:function(){return br},generateShareFilename:function(){return Rr},generateSnapshotFromManifest:function(){return Be},getManifestFileName:function(){return $r},getProcessEnv:function(){return _t},getResourceUrl:function(){return se},inferAutoPublicPath:function(){return bt},infrastructureLogger:function(){return Pr},isBrowserEnv:function(){return x},isDebugMode:function(){return oe},isManifestProvider:function(){return be},isReactNativeEnv:function(){return ye},isRequiredVersion:function(){return Nr},isStaticResourcesEqual:function(){return Ke},loadScript:function(){return z},loadScriptNode:function(){return X},logger:function(){return Ar},moduleFederationPlugin:function(){return mr},normalizeOptions:function(){return vr},parseEntry:function(){return Er},safeToString:function(){return ge},safeWrapper:function(){return We},sharePlugin:function(){return yr},simpleJoinRemoteEntry:function(){return W},warn:function(){return Ee}});var ar="federation-manifest.json",Ue=".json",yt="FEDERATION_DEBUG",I={AT:"@",HYPHEN:"-",SLASH:"/"},v=(_obj={},_define_property(_obj,I.AT,"scope_"),_define_property(_obj,I.HYPHEN,"_"),_define_property(_obj,I.SLASH,"__"),_obj),pe=(_obj1={},_define_property(_obj1,v[I.AT],I.AT),_define_property(_obj1,v[I.HYPHEN],I.HYPHEN),_define_property(_obj1,v[I.SLASH],I.SLASH),_obj1),Ve=":",He="mf-manifest.json",Ce="mf-stats.json",cr={NPM:"npm",APP:"app"},lr="__MF_DEVTOOLS_MODULE_INFO__",ur="ENCODE_NAME_PREFIX",fr=".federation",dr={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"},hr=Object.freeze({__proto__:null}),pr=Object.freeze({__proto__:null}),mr=Object.freeze({__proto__:null}),yr=Object.freeze({__proto__:null});function x(){return("undefined"==typeof window?"undefined":_type_of(window))<"u"&&_type_of(window.document)<"u"}function ye(){var e;return("undefined"==typeof navigator?"undefined":_type_of(navigator))<"u"&&"ReactNative"===(null===(e=navigator)||void 0===e?void 0:e.product)}function _r(){try{if(x()&&window.localStorage)return!!localStorage.getItem(yt)}catch(e){return!1}return!1}function oe(){return("undefined"==typeof process?"undefined":_type_of(process))<"u"&&process.env,_r()}var _t=function(){return("undefined"==typeof process?"undefined":_type_of(process))<"u"&&process.env?process.env:{}},Et="[ Federation Runtime ]",Er=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve,r=e.split(n),o="development"===_t().NODE_ENV&&t,a=function(e){return e.startsWith("http")||e.includes(Ue)};if(r.length>=2){var i=_to_array(r),c=i[0],s=i.slice(1);e.startsWith(n)&&(c=r.slice(0,2).join(n),s=[o||r.slice(2).join(n)]);var u=o||s.join(n);return a(u)?{name:c,entry:u}:{name:c,version:u||"*"}}if(1===r.length){var l=_sliced_to_array(r,1)[0];return o&&a(o)?{name:l,entry:o}:{name:l,version:o||"*"}}throw"Invalid entry value: ".concat(e)},_e=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length?t.reduce(function(e,t){return t?e?"".concat(e).concat(Ve).concat(t):t:e},""):""},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var r=n?".js":"";return"".concat(t).concat(e.replace(new RegExp("".concat(I.AT),"g"),v[I.AT]).replace(new RegExp("".concat(I.HYPHEN),"g"),v[I.HYPHEN]).replace(new RegExp("".concat(I.SLASH),"g"),v[I.SLASH])).concat(r)}catch(e){throw e}},gr=function(e,t,n){try{var r=e;if(t){if(!r.startsWith(t))return r;r=r.replace(new RegExp(t,"g"),"")}return r=r.replace(new RegExp("".concat(v[I.AT]),"g"),pe[v[I.AT]]).replace(new RegExp("".concat(v[I.SLASH]),"g"),pe[v[I.SLASH]]).replace(new RegExp("".concat(v[I.HYPHEN]),"g"),pe[v[I.HYPHEN]]),n&&(r=r.replace(".js","")),r}catch(e){throw e}},br=function(e,t){if(!e)return"";var n=e;return"."===n&&(n="default_export"),n.startsWith("./")&&(n=n.replace("./","")),je(n,"__federation_expose_",t)},Rr=function(e,t){return e?je(e,"__federation_shared_",t):""},se=function(e,t){var n;return"getPublicPath"in e?(n=e.getPublicPath.startsWith("function")?new Function("return "+e.getPublicPath)()():new Function(e.getPublicPath)(),"".concat(n).concat(t)):"publicPath"in e?x()||ye()||!("ssrPublicPath"in e)?"".concat(e.publicPath).concat(t):"".concat(e.ssrPublicPath).concat(t):(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")},Sr=function(e,t){e||gt(t)},gt=function(e){throw new Error("".concat(Et,": ").concat(e))},Ee=function(e){console.warn("".concat(Et,": ").concat(e))};function ge(e){try{return JSON.stringify(e,null,2)}catch(e){return""}}var Ir=/^([\d^=v<>~]|[*xX]$)/;function Nr(e){return Ir.test(e)}var W=function(e,t){if(!e)return t;var n=function(e){if("."===e)return"";if(e.startsWith("./"))return e.replace("./","");if(e.startsWith("/")){var t=e.slice(1);return t.endsWith("/")?t.slice(0,-1):t}return e}(e);return n?n.endsWith("/")?"".concat(n).concat(t):"".concat(n,"/").concat(t):t};function bt(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Be(e){var t,n,r,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=a.remotes,c=void 0===i?{}:i,s=a.overrides,u=void 0===s?{}:s,l=a.version,f=function(){return"publicPath"in e.metaData?"auto"===e.metaData.publicPath&&l?bt(l):e.metaData.publicPath:e.metaData.getPublicPath},_=Object.keys(u),p={};Object.keys(c).length||(p=(null===(t=e.remotes)||void 0===t?void 0:t.reduce(function(e,t){var n,r=t.federationContainerName;return n=_.includes(r)?u[r]:"version"in t?t.version:t.entry,e[r]={matchedVersion:n},e},{}))||{}),Object.keys(c).forEach(function(e){return p[e]={matchedVersion:_.includes(e)?u[e]:c[e]}});var h=e.metaData,d=h.remoteEntry,m=d.path,y=d.name,v=d.type,g=h.types,b=void 0===g?{path:"",name:"",zip:"",api:""}:g,E=h.buildInfo.buildVersion,S=h.globalName,I=h.ssrRemoteEntry,N=e.exposes,w={version:l||"",buildVersion:E,globalName:S,remoteEntry:W(m,y),remoteEntryType:v,remoteTypes:W(b.path,b.name),remoteTypesZip:b.zip||"",remoteTypesAPI:b.api||"",remotesInfo:p,shared:null==e?void 0:e.shared.map(function(e){return{assets:e.assets,sharedName:e.name,version:e.version}}),modules:null==N?void 0:N.map(function(e){return{moduleName:e.name,modulePath:e.path,assets:e.assets}})};if(null===(n=e.metaData)||void 0===n?void 0:n.prefetchInterface){var R=e.metaData.prefetchInterface;w=_object_spread_props(_object_spread({},w),{prefetchInterface:R})}if(null===(r=e.metaData)||void 0===r?void 0:r.prefetchEntry){var A=e.metaData.prefetchEntry,O=A.path,k=A.name,j=A.type;w=_object_spread_props(_object_spread({},w),{prefetchEntry:W(O,k),prefetchEntryType:j})}if(o="publicPath"in e.metaData?_object_spread_props(_object_spread({},w),{publicPath:f(),ssrPublicPath:e.metaData.ssrPublicPath}):_object_spread_props(_object_spread({},w),{getPublicPath:f()}),I){var T=W(I.path,I.name);o.ssrRemoteEntry=T,o.ssrRemoteEntryType=I.type||"commonjs-module"}return o}function be(e){return!(!("remoteEntry"in e)||!e.remoteEntry.includes(Ue))}function $r(e){if(!e)return{statsFileName:Ce,manifestFileName:He};var t,n="boolean"==typeof e?"":e.filePath||"",r="boolean"==typeof e?"":e.fileName||"",o=".json",a=r?(t=r).endsWith(o)?t:"".concat(t).concat(o):He,i=r?function(e,t){return e.replace(o,"".concat(t).concat(o))}(a,"-stats"):Ce;return{statsFileName:W(n,i),manifestFileName:W(n,a)}}var Rt="[ Module Federation ]",re=console,Tr=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function wr(){try{var e=(new Error).stack;if(!e)return;var t=_to_array(e.split("\n")).slice(1).filter(function(e){return!Tr.some(function(t){return e.includes(t)})});return t.length?"Stack trace:\n".concat(t.slice(0,5).join("\n")):void 0}catch(e){return}}var me=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:re;_class_call_check(this,e),this.prefix=t,this.delegate=null!=n?n:re}return _create_class(e,[{key:"setPrefix",value:function(e){this.prefix=e}},{key:"setDelegate",value:function(e){this.delegate=null!=e?e:re}},{key:"emit",value:function(e,t){var n=this.delegate,r=oe()?wr():void 0,o=r?_to_consumable_array(t).concat([r]):t,a=function(){switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}}(),i=!0,c=!1,s=void 0;try{for(var u,l=a[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var f,_=n[u.value];if("function"==typeof _)return void(f=_).call.apply(f,[n,this.prefix].concat(_to_consumable_array(o)))}}catch(e){c=!0,s=e}finally{try{i||null==l.return||l.return()}finally{if(c)throw s}}var p=!0,h=!1,d=void 0;try{for(var m,y=a[Symbol.iterator]();!(p=(m=y.next()).done);p=!0){var v,g=m.value,b=re[g];if("function"==typeof b)return void(v=b).call.apply(v,[re,this.prefix].concat(_to_consumable_array(o)))}}catch(e){h=!0,d=e}finally{try{p||null==y.return||y.return()}finally{if(h)throw d}}}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("log",t)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("warn",t)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("error",t)}},{key:"success",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("info",t)}},{key:"info",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("info",t)}},{key:"ready",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.emit("info",t)}},{key:"debug",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];oe()&&this.emit("debug",t)}}]),e}();function Re(e){return new me(e)}function St(e){var t=new me(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Or(e,t,n){if(e.__mf_infrastructure_logger__&&(null==t?void 0:t.getInfrastructureLogger))try{var r=t.getInfrastructureLogger(n);r&&"object"==(void 0===r?"undefined":_type_of(r))&&("function"==typeof r.log||"function"==typeof r.info||"function"==typeof r.warn||"function"==typeof r.error)&&e.setDelegate(r)}catch(t){e.setDelegate(void 0)}}var Ar=Re(Rt),Pr=St(Rt);function We(e,t){return _async_to_generator(function(){var n;return _ts_generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e()];case 1:return[2,r.sent()];case 2:return n=r.sent(),!t&&Ee(n),[2];case 3:return[2]}})})()}function Ke(e,t){var n=/^(https?:)?\/\//i;return e.replace(n,"").replace(/\/$/,"")===t.replace(n,"").replace(/\/$/,"")}function Se(e){for(var t,n=null,r=!0,o=2e4,a=document.getElementsByTagName("script"),i=0;i<a.length;i++){var c=a[i],s=c.getAttribute("src");if(s&&Ke(s,e.url)){n=c,r=!1;break}}if(!n){var u,l=e.attrs;(n=document.createElement("script")).type="module"===(null==l?void 0:l.type)?"module":"text/javascript",e.createScriptHook&&(_instanceof(u=e.createScriptHook(e.url,e.attrs),HTMLScriptElement)?n=u:"object"==(void 0===u?"undefined":_type_of(u))&&("script"in u&&u.script&&(n=u.script),"timeout"in u&&u.timeout&&(o=u.timeout))),n.src||(n.src=e.url),l&&!u&&Object.keys(l).forEach(function(e){n&&("async"===e||"defer"===e?n[e]=l[e]:n.getAttribute(e)||n.setAttribute(e,l[e]))})}var f=function(r,o){return _async_to_generator(function(){var a,i,c;return _ts_generator(this,function(s){switch(s.label){case 0:return clearTimeout(t),a=function(){"error"===(null==o?void 0:o.type)?(null==e?void 0:e.onErrorCallback)&&(null==e||e.onErrorCallback(o)):(null==e?void 0:e.cb)&&(null==e||e.cb())},n&&(n.onerror=null,n.onload=null,We(function(){var t=e.needDeleteScript;(void 0===t||t)&&(null==n?void 0:n.parentNode)&&n.parentNode.removeChild(n)}),r&&"function"==typeof r)?_instanceof(i=r(o),Promise)?[4,i]:[3,2]:[3,3];case 1:return c=s.sent(),[2,(a(),c)];case 2:return[2,(a(),i)];case 3:return a(),[2]}})})()};return n.onerror=f.bind(null,n.onerror),n.onload=f.bind(null,n.onload),t=setTimeout(function(){f(null,new Error('Remote script "'.concat(e.url,'" time-outed.')))},o),{script:n,needAttach:r}}function ie(e){for(var t=null,n=!0,r=document.getElementsByTagName("link"),o=0;o<r.length;o++){var a=r[o],i=a.getAttribute("href"),c=a.getAttribute("rel");if(i&&Ke(i,e.url)&&c===e.attrs.rel){t=a,n=!1;break}}if(!t){(t=document.createElement("link")).setAttribute("href",e.url);var s,u=e.attrs;e.createLinkHook&&(_instanceof(s=e.createLinkHook(e.url,u),HTMLLinkElement)&&(t=s)),u&&!s&&Object.keys(u).forEach(function(e){t&&!t.getAttribute(e)&&t.setAttribute(e,u[e])})}var l=function(n,r){var o=function(){"error"===(null==r?void 0:r.type)?(null==e?void 0:e.onErrorCallback)&&(null==e||e.onErrorCallback(r)):(null==e?void 0:e.cb)&&(null==e||e.cb())};if(t&&(t.onerror=null,t.onload=null,We(function(){var n=e.needDeleteLink;(void 0===n||n)&&(null==t?void 0:t.parentNode)&&t.parentNode.removeChild(t)}),n)){var a=n(r);return o(),a}o()};return t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),{link:t,needAttach:n}}function z(e,t){var n=t.attrs,r=void 0===n?{}:n,o=t.createScriptHook;return new Promise(function(t,n){var a=Se({url:e,cb:t,onErrorCallback:n,attrs:_object_spread({fetchpriority:"high"},r),createScriptHook:o,needDeleteScript:!0}),i=a.script;a.needAttach&&document.head.appendChild(i)})}var he=new Map;function ne(e){if(!e)throw new Error("import specifier is required");if(he.has(e))return he.get(e);var t=new Function("name","return import(name)")(e).then(function(e){return e}).catch(function(t){throw console.error("Error importing module ".concat(e,":"),t),he.delete(e),t});return he.set(e,t),t}var It=function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,ne("node-fetch")];case 1:return[2,(e=t.sent()).default||e]}})})()},Mr=function(e,t,n){return _async_to_generator(function(){var r,o,a;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,(c=e,s=t||{},n.lifecycle.fetch.emit(c,s))];case 1:return(r=i.sent())&&_instanceof(r,Response)?[3,5]:("undefined"==typeof fetch?"undefined":_type_of(fetch))>"u"?[4,It()]:[3,3];case 2:return a=i.sent(),[3,4];case 3:a=fetch,i.label=4;case 4:return o=a(e,t||{}),[3,6];case 5:o=r,i.label=6;case 6:return[2,o]}var c,s})})()},Nt=("undefined"==typeof ENV_TARGET?"undefined":_type_of(ENV_TARGET))>"u"||"web"!==ENV_TARGET?function(url,cb,attrs,loaderHook){if(null==loaderHook?void 0:loaderHook.createScriptHook){var _$t=loaderHook.createScriptHook(url);_$t&&"object"==(void 0===_$t?"undefined":_type_of(_$t))&&"url"in _$t&&(url=_$t.url)}var urlObj;try{urlObj=new URL(url)}catch(e){return console.error("Error constructing URL:",e),void cb(new Error("Invalid URL: ".concat(e)))}var getFetch=function(){return _async_to_generator(function(){return _ts_generator(this,function(e){return[2,(null==loaderHook?void 0:loaderHook.fetch)?function(e,t){return Mr(e,t,loaderHook)}:("undefined"==typeof fetch?"undefined":_type_of(fetch))>"u"?It():fetch]})})()},handleScriptFetch=function(f,urlObj){return _async_to_generator(function(){var _vm_constants,_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER,res,data,_ref,path,vm,scriptContext,urlDirname,filename,script,exportedInterface,_$t,t;return _ts_generator(this,function(_state){switch(_state.label){case 0:return _state.trys.push([0,4,,5]),[4,f(urlObj.href)];case 1:return res=_state.sent(),[4,res.text()];case 2:return data=_state.sent(),[4,Promise.all([ne("path"),ne("vm")])];case 3:return _ref=_sliced_to_array.apply(void 0,[_state.sent(),2]),path=_ref[0],vm=_ref[1],scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname),script=new vm.Script("(function(exports, module, require, __dirname, __filename) {".concat(data,"\n})"),{filename:filename,importModuleDynamically:null!==(_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER=null===(_vm_constants=vm.constants)||void 0===_vm_constants?void 0:_vm_constants.USE_MAIN_CONTEXT_DEFAULT_LOADER)&&void 0!==_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER?_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER:ne}),script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename),exportedInterface=scriptContext.module.exports||scriptContext.exports,attrs&&exportedInterface&&attrs.globalName?(_$t=exportedInterface[attrs.globalName]||exportedInterface,cb(void 0,_$t),[2]):(cb(void 0,exportedInterface),[3,5]);case 4:return t=_state.sent(),cb(_instanceof(t,Error)?t:new Error("Script execution error: ".concat(t))),[3,5];case 5:return[2]}})})()};getFetch().then(function(e){return _async_to_generator(function(){var t,n;return _ts_generator(this,function(r){switch(r.label){case 0:return"esm"!==(null==attrs?void 0:attrs.type)&&"module"!==(null==attrs?void 0:attrs.type)?[3,2]:(t=[urlObj.href],n={fetch:e},[4,ne("vm")]);case 1:return[2,Ge.apply(void 0,t.concat([(n.vm=r.sent(),n)])).then(function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,e.evaluate()];case 1:return t.sent(),cb(void 0,e.namespace),[2]}})})()}).catch(function(e){cb(_instanceof(e,Error)?e:new Error("Script execution error: ".concat(e)))})];case 2:return handleScriptFetch(e,urlObj),[2]}})})()}).catch(function(e){cb(e)})}:function(e,t,n,r){t(new Error("createScriptNode is disabled in non-Node.js environment"))},X=("undefined"==typeof ENV_TARGET?"undefined":_type_of(ENV_TARGET))>"u"||"web"!==ENV_TARGET?function(e,t){return new Promise(function(n,r){Nt(e,function(e,o){if(e)r(e);else{var a,i,c=(null==t||null===(a=t.attrs)||void 0===a?void 0:a.globalName)||"__FEDERATION_".concat(null==t||null===(i=t.attrs)||void 0===i?void 0:i.name,":custom__"),s=globalThis[c]=o;n(s)}},t.attrs,t.loaderHook)})}:function(e,t){throw new Error("loadScriptNode is disabled in non-Node.js environment")},xe=new Map;function Ge(e,t){return _async_to_generator(function(){var n,r,o,a;return _ts_generator(this,function(i){switch(i.label){case 0:return xe.has(e)?[2,xe.get(e)]:(n=t.fetch,r=t.vm,[4,n(e)]);case 1:return[4,i.sent().text()];case 2:return o=i.sent(),a=new r.SourceTextModule(o,{importModuleDynamically:function(n,r){return _async_to_generator(function(){return _ts_generator(this,function(r){return[2,Ge(new URL(n,e).href,t)]})})()}}),xe.set(e,a),[4,a.link(function(n){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,Ge(new URL(n,e).href,t)];case 1:return[2,r.sent()]}})})()})];case 3:return[2,(i.sent(),a)]}})})()}function vr(e,t,n){return function(r){if(!1===r)return!1;if((void 0===r?"undefined":_type_of(r))>"u")return!!e&&t;if(!0===r)return t;if(r&&"object"==(void 0===r?"undefined":_type_of(r)))return _object_spread({},t,r);throw new Error("Unexpected type for `".concat(n,"`, expect boolean/undefined/object, got: ").concat(void 0===r?"undefined":_type_of(r)))}}var Lr=function(e){return e},_obj2,qe="RUNTIME-001",ze="RUNTIME-002",Xe="RUNTIME-003",Ye="RUNTIME-004",Je="RUNTIME-005",Ne="RUNTIME-006",Ze="RUNTIME-007",$e="RUNTIME-008",j="RUNTIME-009",xr=function(e){return"View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/".concat(e.split("-")[0].toLowerCase(),"/").concat(e)},A=function(e,t,n,r){var o=["".concat([t[e]]," #").concat(e)];return n&&o.push("args: ".concat(JSON.stringify(n))),o.push(xr(e)),r&&o.push("Original Error Message:\n ".concat(r)),o.join("\n")},w=(_obj2={},_define_property(_obj2,qe,"Failed to get remoteEntry exports."),_define_property(_obj2,ze,'The remote entry interface does not contain "init"'),_define_property(_obj2,Xe,"Failed to get manifest."),_define_property(_obj2,Ye,"Failed to locate remote."),_define_property(_obj2,Je,"Invalid loadShareSync function call from bundler runtime"),_define_property(_obj2,Ne,"Invalid loadShareSync function call from runtime"),_define_property(_obj2,Ze,"Failed to get remote snapshot."),_define_property(_obj2,$e,"Failed to load script resources."),_define_property(_obj2,j,"Please call createInstance first."),_obj2),J="[ Federation Runtime ]",rt=Re(J);function N(e,t){e||G(t)}function G(e){throw _instanceof(e,Error)?(e.message.startsWith(J)||(e.message="".concat(J,": ").concat(e.message)),e):new Error("".concat(J,": ").concat(e))}function Fe(e){_instanceof(e,Error)&&(e.message.startsWith(J)||(e.message="".concat(J,": ").concat(e.message))),rt.warn(e)}function $t(e,t){return-1===e.findIndex(function(e){return e===t})&&e.push(t),e}function ce(e){return"version"in e&&e.version?"".concat(e.name,":").concat(e.version):"entry"in e&&e.entry?"".concat(e.name,":").concat(e.entry):"".concat(e.name)}function at(e){return _type_of(e.entry)<"u"}function Ft(e){return!e.entry.includes(".json")}function ct(e){return e&&"object"==(void 0===e?"undefined":_type_of(e))}var Gr=Object.prototype.toString;function Ur(e){return"[object Object]"===Gr.call(e)}function Dt(e){return Array.isArray(e)?e:[e]}function kt(e){var t={url:"",type:"global",globalName:""};return x()||ye()||!("ssrRemoteEntry"in e)?"remoteEntry"in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:t:"ssrRemoteEntry"in e?{url:e.ssrRemoteEntry||t.url,type:e.ssrRemoteEntryType||t.type,globalName:e.globalName}:t}var Vr=function(e,t){var n;return n=e.endsWith("/")?e.slice(0,-1):e,t.startsWith(".")&&(t=t.slice(1)),n+=t},$="object"==("undefined"==typeof globalThis?"undefined":_type_of(globalThis))?globalThis:window,D=function(){try{return document.defaultView}catch(e){return $}}(),le=D;function we(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function Oe(e,t){return Object.hasOwnProperty.call(e,t)}Oe($,"__GLOBAL_LOADING_REMOTE_ENTRY__")||we($,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});var Y=$.__GLOBAL_LOADING_REMOTE_ENTRY__;function xt(e){var t,n,r,o,a,i,c,s,u,l,f,_;Oe(e,"__VMOK__")&&!Oe(e,"__FEDERATION__")&&we(e,"__FEDERATION__",e.__VMOK__),Oe(e,"__FEDERATION__")||(we(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),we(e,"__VMOK__",e.__FEDERATION__)),null!==(c=(t=e.__FEDERATION__).__GLOBAL_PLUGIN__)&&void 0!==c||(t.__GLOBAL_PLUGIN__=[]),null!==(s=(n=e.__FEDERATION__).__INSTANCES__)&&void 0!==s||(n.__INSTANCES__=[]),null!==(u=(r=e.__FEDERATION__).moduleInfo)&&void 0!==u||(r.moduleInfo={}),null!==(l=(o=e.__FEDERATION__).__SHARE__)&&void 0!==l||(o.__SHARE__={}),null!==(f=(a=e.__FEDERATION__).__MANIFEST_LOADING__)&&void 0!==f||(a.__MANIFEST_LOADING__={}),null!==(_=(i=e.__FEDERATION__).__PRELOADED_MAP__)&&void 0!==_||(i.__PRELOADED_MAP__=new Map)}function Ht(e){$.__FEDERATION__.__INSTANCES__.push(e)}function Ct(){return $.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Gt(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:oe())&&($.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,$.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.23.0")}function Z(e,t){if("string"==typeof t){if(e[t])return{value:e[t],key:t};var n=Object.keys(e),r=!0,o=!1,a=void 0;try{for(var i,c=n[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){var s=_sliced_to_array(i.value.split(":"),2),u=s[0],l=(s[1],"".concat(u,":").concat(t)),f=e[l];if(f)return{value:f,key:l}}}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return{value:void 0,key:t}}throw new Error("key must be string")}xt($),xt(D);var Tt=function(){return D.__FEDERATION__.moduleInfo},jr=function(e,t){var n=Z(t,ce(e)).value;if(n&&!n.version&&"version"in e&&e.version&&(n.version=e.version),n)return n;if("version"in e&&e.version){var r=e.version,o=ce(_object_without_properties(e,["version"])),a=Z(D.__FEDERATION__.moduleInfo,o).value;if((null==a?void 0:a.version)===r)return a}},Ae=function(e){return jr(e,D.__FEDERATION__.moduleInfo)},wt=function(e,t){var n=ce(e);return D.__FEDERATION__.moduleInfo[n]=t,D.__FEDERATION__.moduleInfo},Br=function(e){return D.__FEDERATION__.moduleInfo=_object_spread({},D.__FEDERATION__.moduleInfo,e),function(){var t=Object.keys(e),n=!0,r=!1,o=void 0;try{for(var a,i=t[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value;delete D.__FEDERATION__.moduleInfo[c]}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}},lt=function(e,t){var n=t||"__FEDERATION_".concat(e,":custom__");return{remoteEntryKey:n,entryExports:$[n]}},Ut=function(e){var t=D.__FEDERATION__.__GLOBAL_PLUGIN__;e.forEach(function(e){-1===t.findIndex(function(t){return t.name===e.name})?t.push(e):Fe("The plugin ".concat(e.name," has been registered."))})},Wr=function(){return D.__FEDERATION__.__GLOBAL_PLUGIN__},Kr=function(e){return $.__FEDERATION__.__PRELOADED_MAP__.get(e)},qr=function(e){return $.__FEDERATION__.__PRELOADED_MAP__.set(e,!0)},de="default",Vt="global",Ot="[0-9A-Za-z-]+",ut="(?:\\+(".concat(Ot,"(?:\\.").concat(Ot,")*))"),ae="0|[1-9]\\d*",Pe="[0-9]+",jt="\\d*[a-zA-Z-][a-zA-Z0-9-]*",At="(?:".concat(Pe,"|").concat(jt,")"),zr="(?:-?(".concat(At,"(?:\\.").concat(At,")*))"),Pt="(?:".concat(ae,"|").concat(jt,")"),Bt="(?:-(".concat(Pt,"(?:\\.").concat(Pt,")*))"),Qe="".concat(ae,"|x|X|\\*"),Q="[v=\\s]*(".concat(Qe,")(?:\\.(").concat(Qe,")(?:\\.(").concat(Qe,")(?:").concat(Bt,")?").concat(ut,"?)?)?"),Xr="^\\s*(".concat(Q,")\\s+-\\s+(").concat(Q,")\\s*$"),Yr="(".concat(Pe,")\\.(").concat(Pe,")\\.(").concat(Pe,")"),Jr="[v=\\s]*".concat(Yr).concat(zr,"?").concat(ut,"?"),ft="((?:<|>)?=?)",Zr="(\\s*)".concat(ft,"\\s*(").concat(Jr,"|").concat(Q,")"),Wt="(?:~>?)",Qr="(\\s*)".concat(Wt,"\\s+"),Kt="(?:\\^)",en="(\\s*)".concat(Kt,"\\s+"),tn="(<|>)?=?\\s*\\*",rn="^".concat(Kt).concat(Q,"$"),nn="(".concat(ae,")\\.(").concat(ae,")\\.(").concat(ae,")"),on="v?".concat(nn).concat(Bt,"?").concat(ut,"?"),sn="^".concat(Wt).concat(Q,"$"),an="^".concat(ft,"\\s*").concat(Q,"$"),cn="^".concat(ft,"\\s*(").concat(on,")$|^$"),ln="^\\s*>=\\s*0.0.0\\s*$";function U(e){return new RegExp(e)}function P(e){return!e||"x"===e.toLowerCase()||"*"===e}function qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce(function(e,t){return t(e)},e)}}function Mt(e){return e.match(U(cn))}function vt(e,t,n,r){var o="".concat(e,".").concat(t,".").concat(n);return r?"".concat(o,"-").concat(r):o}function un(e){return e.replace(U(Xr),function(e,t,n,r,o,a,i,c,s,u,l,f){return t=P(n)?"":P(r)?">=".concat(n,".0.0"):P(o)?">=".concat(n,".").concat(r,".0"):">=".concat(t),c=P(s)?"":P(u)?"<".concat(Number(s)+1,".0.0-0"):P(l)?"<".concat(s,".").concat(Number(u)+1,".0-0"):f?"<=".concat(s,".").concat(u,".").concat(l,"-").concat(f):"<=".concat(c),"".concat(t," ").concat(c).trim()})}function fn(e){return e.replace(U(Zr),"$1$2$3")}function dn(e){return e.replace(U(Qr),"$1~")}function hn(e){return e.replace(U(en),"$1^")}function pn(e){return e.trim().split(/\s+/).map(function(e){return e.replace(U(rn),function(e,t,n,r,o){return P(t)?"":P(n)?">=".concat(t,".0.0 <").concat(Number(t)+1,".0.0-0"):P(r)?"0"===t?">=".concat(t,".").concat(n,".0 <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".0 <").concat(Number(t)+1,".0.0-0"):o?"0"===t?"0"===n?">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(t,".").concat(n,".").concat(Number(r)+1,"-0"):">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(Number(t)+1,".0.0-0"):"0"===t?"0"===n?">=".concat(t,".").concat(n,".").concat(r," <").concat(t,".").concat(n,".").concat(Number(r)+1,"-0"):">=".concat(t,".").concat(n,".").concat(r," <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".").concat(r," <").concat(Number(t)+1,".0.0-0")})}).join(" ")}function mn(e){return e.trim().split(/\s+/).map(function(e){return e.replace(U(sn),function(e,t,n,r,o){return P(t)?"":P(n)?">=".concat(t,".0.0 <").concat(Number(t)+1,".0.0-0"):P(r)?">=".concat(t,".").concat(n,".0 <").concat(t,".").concat(Number(n)+1,".0-0"):o?">=".concat(t,".").concat(n,".").concat(r,"-").concat(o," <").concat(t,".").concat(Number(n)+1,".0-0"):">=".concat(t,".").concat(n,".").concat(r," <").concat(t,".").concat(Number(n)+1,".0-0")})}).join(" ")}function yn(e){return e.split(/\s+/).map(function(e){return e.trim().replace(U(an),function(e,t,n,r,o,a){var i=P(n),c=i||P(r),s=c||P(o);return"="===t&&s&&(t=""),a="",i?">"===t||"<"===t?"<0.0.0-0":"*":t&&s?(c&&(r=0),o=0,">"===t?(t=">=",c?(n=Number(n)+1,r=0,o=0):(r=Number(r)+1,o=0)):"<="===t&&(t="<",c?n=Number(n)+1:r=Number(r)+1),"<"===t&&(a="-0"),"".concat(t+n,".").concat(r,".").concat(o).concat(a)):c?">=".concat(n,".0.0").concat(a," <").concat(Number(n)+1,".0.0-0"):s?">=".concat(n,".").concat(r,".0").concat(a," <").concat(n,".").concat(Number(r)+1,".0-0"):e})}).join(" ")}function _n(e){return e.trim().replace(U(tn),"")}function En(e){return e.trim().replace(U(ln),"")}function Me(e,t){return(e=Number(e)||e)>(t=Number(t)||t)?1:e===t?0:-1}function gn(e,t){var n=e.preRelease,r=t.preRelease;if(void 0===n&&r)return 1;if(n&&void 0===r)return-1;if(void 0===n&&void 0===r)return 0;for(var o=0,a=n.length;o<=a;o++){var i=n[o],c=r[o];if(i!==c)return void 0===i&&void 0===c?0:i?c?Me(i,c):-1:1}return 0}function Te(e,t){return Me(e.major,t.major)||Me(e.minor,t.minor)||Me(e.patch,t.patch)||gn(e,t)}function et(e,t){return e.version===t.version}function bn(e,t){switch(e.operator){case"":case"=":return et(e,t);case">":return Te(e,t)<0;case">=":return et(e,t)||Te(e,t)<0;case"<":return Te(e,t)>0;case"<=":return et(e,t)||Te(e,t)>0;case void 0:return!0;default:return!1}}function Rn(e){return qt(pn,mn,yn,_n)(e)}function Sn(e){return qt(un,fn,dn,hn)(e.trim()).split(/\s+/).join(" ")}function ve(e,t){if(!e)return!1;var n=Mt(e);if(!n)return!1;var r=_sliced_to_array(n,7),o=r[1],a=r[3],i=r[4],c=r[5],s=r[6],u={operator:o,version:vt(a,i,c,s),major:a,minor:i,patch:c,preRelease:null==s?void 0:s.split(".")},l=t.split("||"),f=!0,_=!1,p=void 0;try{for(var h,d=l[Symbol.iterator]();!(f=(h=d.next()).done);f=!0){var m=h.value.trim();if(!m||"*"===m||"x"===m)return!0;try{var y=Sn(m);if(!y.trim())return!0;var v=y.split(" ").map(function(e){return Rn(e)}).join(" ");if(!v.trim())return!0;var g=v.split(/\s+/).map(function(e){return En(e)}).filter(Boolean);if(0===g.length)continue;var b=!0,E=!0,S=!1,I=void 0;try{for(var N,w=g[Symbol.iterator]();!(E=(N=w.next()).done);E=!0){var R=Mt(N.value);if(!R){b=!1;break}var A=_sliced_to_array(R,7),O=A[1],k=A[3],j=A[4],T=A[5],P=A[6];if(!bn({operator:O,version:vt(k,j,T,P),major:k,minor:j,patch:T,preRelease:null==P?void 0:P.split(".")},u)){b=!1;break}}}catch(e){S=!0,I=e}finally{try{E||null==w.return||w.return()}finally{if(S)throw I}}if(b)return!0}catch(e){console.error('[semver] Error processing range part "'.concat(m,'":'),e);continue}}}catch(e){_=!0,p=e}finally{try{f||null==d.return||d.return()}finally{if(_)throw p}}return!1}function In(e,t,n,r){var o,a,i,c;return o="get"in e?e.get:"lib"in e?function(){return Promise.resolve(e.lib)}:function(){return Promise.resolve(function(){throw new Error("Can not get shared '".concat(n,"'!"))})},_object_spread_props(_object_spread({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:_object_spread({requiredVersion:"^".concat(e.version),singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:o,loaded:!(!(null==e?void 0:e.loaded)&&!("lib"in e))||void 0,version:null!==(a=e.version)&&void 0!==a?a:"0",scope:Array.isArray(e.scope)?e.scope:[null!==(i=e.scope)&&void 0!==i?i:"default"],strategy:(null!==(c=e.strategy)&&void 0!==c?c:r)||"version-first"})}function zt(e,t){var n=t.shared||{},r=t.name,o=Object.keys(n).reduce(function(e,o){var a=Dt(n[o]);return e[o]=e[o]||[],a.forEach(function(n){e[o].push(In(n,r,o,t.shareStrategy))}),e},{}),a=_object_spread({},e.shared);return Object.keys(o).forEach(function(e){a[e]?o[e].forEach(function(t){a[e].find(function(e){return e.version===t.version})||a[e].push(t)}):a[e]=o[e]}),{shared:a,shareInfos:o}}function ue(e,t){var n=function(e){if(!Number.isNaN(Number(e))){for(var t=e.split("."),n=e,r=0;r<3-t.length;r++)n+=".0";return n}return e};return!!ve(n(e),"<=".concat(n(t)))}var dt=function(e,t){var n=t||function(e,t){return ue(e,t)};return Object.keys(e).reduce(function(e,t){return!e||n(e,t)||"0"===e?t:e},0)},ht=function(e){return!!e.loaded||"function"==typeof e.lib},Nn=function(e){return!!e.loading};function $n(e,t,n){var r=e[t][n];return dt(e[t][n],function(e,t){return!ht(r[e])&&ue(e,t)})}function Tn(e,t,n){var r=e[t][n];return dt(e[t][n],function(e,t){var n=function(e){return ht(e)||Nn(e)};return n(r[t])?!n(r[e])||!!ue(e,t):!n(r[e])&&ue(e,t)})}function wn(e){return"loaded-first"===e?Tn:$n}function Le(e,t,n,r){if(e){var o=n.shareConfig,a=n.scope,i=void 0===a?de:a,c=n.strategy,s=Array.isArray(i)?i:[i],u=!0,l=!1,f=void 0;try{for(var _,p=function(){var a=_.value;if(o&&e[a]&&e[a][t]){var i=o.requiredVersion,s=wn(c)(e,a,t),u={shareScopeMap:e,scope:a,pkgName:t,version:s,GlobalFederation:le.__FEDERATION__,resolver:function(){if(o.singleton){if("string"==typeof i&&!ve(s,i)){var r="Version ".concat(s," from ").concat(s&&e[a][t][s].from," of shared singleton module ").concat(t," does not satisfy the requirement of ").concat(n.from," which needs ").concat(i,")");o.strictVersion?G(r):Fe(r)}return e[a][t][s]}if(!1===i||"*"===i||ve(s,i))return e[a][t][s];var c=!0,u=!1,l=void 0;try{for(var f,_=Object.entries(e[a][t])[Symbol.iterator]();!(c=(f=_.next()).done);c=!0){var p=_sliced_to_array(f.value,2),h=p[0],d=p[1];if(ve(h,i))return d}}catch(e){u=!0,l=e}finally{try{c||null==_.return||_.return()}finally{if(u)throw l}}}};return{v:(r.emit(u)||u).resolver()}}},h=s[Symbol.iterator]();!(u=(_=h.next()).done);u=!0){var d=p();if("object"===_type_of(d))return d.v}}catch(e){l=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(l)throw f}}}}function Xt(){return le.__FEDERATION__.__SHARE__}function Lt(e){var t,n=e.pkgName,r=e.extraOptions,o=e.shareInfos,a=null!==(t=null==r?void 0:r.resolver)&&void 0!==t?t:function(e){if(e){var t={};e.forEach(function(e){t[e.version]=e});var n=dt(t,function(e,n){return!ht(t[e])&&ue(e,n)});return t[n]}};return Object.assign({},a(o[n]),null==r?void 0:r.customShareInfo)}function On(){return("undefined"==typeof FEDERATION_BUILD_IDENTIFIER?"undefined":_type_of(FEDERATION_BUILD_IDENTIFIER))<"u"?FEDERATION_BUILD_IDENTIFIER:""}function An(e,t){var n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value,s=t.startsWith(c.name),u=t.replace(c.name,"");if(s){if(u.startsWith("/"))return{pkgNameOrAlias:c.name,expose:u=".".concat(u),remote:c};if(""===u)return{pkgNameOrAlias:c.name,expose:".",remote:c}}var l=c.alias&&t.startsWith(c.alias),f=c.alias&&t.replace(c.alias,"");if(c.alias&&l){if(f&&f.startsWith("/"))return{pkgNameOrAlias:c.alias,expose:f=".".concat(f),remote:c};if(""===f)return{pkgNameOrAlias:c.alias,expose:".",remote:c}}}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}function Pn(e,t){var n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value;if(t===c.name||c.alias&&t===c.alias)return c}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}}function Mn(e,t){var n=Wr(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(function(t){(null==e?void 0:e.find(function(e){return e.name!==t.name}))&&e.push(t)}),e&&e.length>0&&e.forEach(function(e){r.forEach(function(n){n.applyPlugin(e,t)})}),e}var Yt=".then(callbacks[0]).catch(callbacks[1])";function vn(e){return _async_to_generator(function(e){var t,n;return _ts_generator(this,function(r){return t=e.entry,n=e.remoteEntryExports,[2,new Promise(function(e,r){try{n?e(n):new Function("callbacks",'import("'.concat(t,'")').concat(Yt))([e,r])}catch(e){r(e)}})]})}).apply(this,arguments)}function Ln(e){return _async_to_generator(function(e){var t,n;return _ts_generator(this,function(r){return t=e.entry,n=e.remoteEntryExports,[2,new Promise(function(e,r){try{n?e(n):("undefined"==typeof __system_context__?"undefined":_type_of(__system_context__))>"u"?System.import(t).then(e).catch(r):new Function("callbacks",'System.import("'.concat(t,'")').concat(Yt))([e,r])}catch(e){r(e)}})]})}).apply(this,arguments)}function Jt(e,t,n){var r=lt(e,t),o=r.remoteEntryKey,a=r.entryExports;return N(a,A(qe,w,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:o})),a}function Fn(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c;return _ts_generator(this,function(s){return t=e.name,n=e.globalName,r=e.entry,o=e.loaderHook,a=e.getEntryUrl,i=lt(t,n),(c=i.entryExports)?[2,c]:[2,z(a?a(r):r,{attrs:{},createScriptHook:function(e,t){var n=o.lifecycle.createScript.emit({url:e,attrs:t});if(n&&(_instanceof(n,HTMLScriptElement)||"script"in n||"timeout"in n))return n}}).then(function(){return Jt(t,n,r)}).catch(function(e){throw N(void 0,A($e,w,{remoteName:t,resourceUrl:r})),e})]})}).apply(this,arguments)}function Dn(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c;return _ts_generator(this,function(s){switch(t=e.remoteInfo,n=e.remoteEntryExports,r=e.loaderHook,o=e.getEntryUrl,a=t.entry,i=t.entryGlobalName,c=t.name,t.type){case"esm":case"module":return[2,vn({entry:a,remoteEntryExports:n})];case"system":return[2,Ln({entry:a,remoteEntryExports:n})];default:return[2,Fn({entry:a,globalName:i,name:c,loaderHook:r,getEntryUrl:o})]}return[2]})}).apply(this,arguments)}function kn(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c;return _ts_generator(this,function(s){return t=e.remoteInfo,n=e.loaderHook,r=t.entry,o=t.entryGlobalName,a=t.name,i=t.type,c=lt(a,o),[2,c.entryExports||X(r,{attrs:{name:a,globalName:o,type:i},loaderHook:{createScriptHook:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.lifecycle.createScript.emit({url:e,attrs:t});if(r&&"url"in r)return r}}}).then(function(){return Jt(a,o,r)}).catch(function(e){throw e})]})}).apply(this,arguments)}function nt(e){var t=e.entry,n=e.name;return _e(n,t)}function ee(e){return _async_to_generator(function(){var t,n,r,o,a,i,c,s,u;return _ts_generator(this,function(l){return t=e.origin,n=e.remoteEntryExports,r=e.remoteInfo,o=e.getEntryUrl,a=e._inErrorHandling,i=void 0!==a&&a,c=nt(r),n?[2,n]:(Y[c]||(s=t.remoteHandler.hooks.lifecycle.loadEntry,u=t.loaderHook,Y[c]=s.emit({loaderHook:u,remoteInfo:r,remoteEntryExports:n}).then(function(e){return e||((("undefined"==typeof ENV_TARGET?"undefined":_type_of(ENV_TARGET))<"u"?"web"===ENV_TARGET:x())?Dn({remoteInfo:r,remoteEntryExports:n,loaderHook:u,getEntryUrl:o}):kn({remoteInfo:r,loaderHook:u}))}).catch(function(e){return _async_to_generator(function(){var o,a,c;return _ts_generator(this,function(s){switch(s.label){case 0:return o=nt(r),_instanceof(e,Error)&&e.message.includes($e)&&!i?(a=function(e){return ee(_object_spread_props(_object_spread({},e),{_inErrorHandling:!0}))},[4,t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:a,origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:Y,uniqueKey:o})]):[3,2];case 1:if(c=s.sent())return[2,c];s.label=2;case 2:throw e}})})()})),[2,Y[c]])})})()}function fe(e){return _object_spread_props(_object_spread({},e),{entry:"entry"in e?e.entry:"",type:e.type||Vt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||de})}function Zt(e){return _object_spread({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},e)}function xn(e,t){return t.map(function(t){var n=Pn(e,t.nameOrAlias);return N(n,"Unable to preload ".concat(t.nameOrAlias," as it is not included in ").concat(!n&&ge({remoteInfo:n,remotes:e}))),{remote:n,preloadConfig:Zt(t)}})}function Hn(e){return e?e.map(function(e){return"."===e?e:e.startsWith("./")?e.replace("./",""):e}):[]}function Qt(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=n.cssAssets,a=n.jsAssetsWithoutEntry,i=n.entryAssets;if(t.options.inBrowser){if(i.forEach(function(n){var r=n.moduleInfo,o=t.moduleCache.get(e.name);ee(o?{origin:t,remoteInfo:r,remoteEntryExports:o.remoteEntryExports}:{origin:t,remoteInfo:r,remoteEntryExports:void 0})}),r){var c={rel:"preload",as:"style"};o.forEach(function(e){var n=ie({url:e,cb:function(){},attrs:c,createLinkHook:function(e,n){var r=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:n});if(_instanceof(r,HTMLLinkElement))return r}}),r=n.link;n.needAttach&&document.head.appendChild(r)})}else{var s={rel:"stylesheet",type:"text/css"};o.forEach(function(e){var n=ie({url:e,cb:function(){},attrs:s,createLinkHook:function(e,n){var r=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:n});if(_instanceof(r,HTMLLinkElement))return r},needDeleteLink:!1}),r=n.link;n.needAttach&&document.head.appendChild(r)})}if(r){var u={rel:"preload",as:"script"};a.forEach(function(e){var n=ie({url:e,cb:function(){},attrs:u,createLinkHook:function(e,n){var r=t.loaderHook.lifecycle.createLink.emit({url:e,attrs:n});if(_instanceof(r,HTMLLinkElement))return r}}),r=n.link;n.needAttach&&document.head.appendChild(r)})}else{var l={fetchpriority:"high",type:"module"===(null==e?void 0:e.type)?"module":"text/javascript"};a.forEach(function(e){var n=Se({url:e,cb:function(){},attrs:l,createScriptHook:function(e,n){var r=t.loaderHook.lifecycle.createScript.emit({url:e,attrs:n});if(_instanceof(r,HTMLScriptElement))return r},needDeleteScript:!0}),r=n.script;n.needAttach&&document.head.appendChild(r)})}}}var te=function(){function e(t){var n=t.remoteInfo,r=t.host;_class_call_check(this,e),this.inited=!1,this.lib=void 0,this.remoteInfo=n,this.host=r}return _create_class(e,[{key:"getEntry",value:function(){return _async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return this.remoteEntryExports?[2,this.remoteEntryExports]:[4,ee({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})];case 1:return[2,(N(e=t.sent(),"remoteEntryExports is undefined \n ".concat(ge(this.remoteInfo))),this.remoteEntryExports=e,this.remoteEntryExports)]}})}).call(this)}},{key:"init",value:function(e,t){return _async_to_generator(function(){var n,r,o,a,i,c,s;return _ts_generator(this,function(u){switch(u.label){case 0:return[4,this.getEntry()];case 1:return n=u.sent(),this.inited?[3,5]:(r=this.host.shareScopeMap,(o=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope]).length||o.push("default"),o.forEach(function(e){r[e]||(r[e]={})}),a=r[o[0]],i=[],c={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?o:this.remoteInfo.shareScope||"default"},Object.defineProperty(c,"shareScopeMap",{value:r,enumerable:!1}),[4,this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:c,initScope:i,remoteInfo:this.remoteInfo,origin:this.host})]);case 2:return s=u.sent(),_type_of(null==n?void 0:n.init)>"u"&&G(A(ze,w,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),[4,n.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)];case 3:return u.sent(),[4,this.host.hooks.lifecycle.initContainer.emit(_object_spread_props(_object_spread({},s),{id:e,remoteSnapshot:t,remoteEntryExports:n}))];case 4:u.sent(),u.label=5;case 5:return[2,n]}})}).call(this)}},{key:"get",value:function(e,t,n,r){return _async_to_generator(function(){var o,a,i,c,s,u,l;return _ts_generator(this,function(f){switch(f.label){case 0:return o=(n||{loadFactory:!0}).loadFactory,a=void 0===o||o,[4,this.init(e,r)];case 1:return i=f.sent(),this.lib=i,this.inited=!0,[4,this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:i,expose:t,moduleInfo:this.remoteInfo})];case 2:return c=f.sent(),c?[3,4]:[4,i.get(t)];case 3:c=f.sent(),f.label=4;case 4:return N(c,"".concat(ce(this.remoteInfo)," remote don't export ").concat(t,".")),s=Vr(this.remoteInfo.name,t),u=this.wraperFactory(c,s),a?[4,u()]:[3,6];case 5:return l=f.sent(),[3,7];case 6:l=u,f.label=7;case 7:return[2,l]}})}).call(this)}},{key:"wraperFactory",value:function(e,t){function n(e,t){e&&"object"==(void 0===e?"undefined":_type_of(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 _instanceof(e,Promise)?function(){return _async_to_generator(function(){var r;return _ts_generator(this,function(o){switch(o.label){case 0:return[4,e()];case 1:return[2,(n(r=o.sent(),t),r)]}})})()}:function(){var r=e();return n(r,t),r}}}]),e}(),M=function(){function e(t){_class_call_check(this,e),this.type="",this.listeners=new Set,t&&(this.type=t)}return _create_class(e,[{key:"on",value:function(e){"function"==typeof e&&this.listeners.add(e)}},{key:"once",value:function(e){var t=this;this.on(function n(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t.remove(n),e.apply(null,o)})}},{key:"emit",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;return this.listeners.size>0&&this.listeners.forEach(function(e){r=e.apply(void 0,_to_consumable_array(t))}),r}},{key:"remove",value:function(e){this.listeners.delete(e)}},{key:"removeAll",value:function(){this.listeners.clear()}}]),e}(),L=function(e){function t(){return _class_call_check(this,t),_call_super(this,t,arguments)}return _inherits(t,e),_create_class(t,[{key:"emit",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=Array.from(this.listeners);if(o.length>0){var a=0,i=function(e){return!1!==e&&(a<o.length?Promise.resolve(o[a++].apply(null,t)).then(i):e)};r=i()}return Promise.resolve(r)}}]),t}(M);function er(e,t){if(!ct(t))return!1;if(e!==t)for(var n in e)if(!(n in t))return!1;return!0}var K=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t)).onerror=G,n.type=e,n}return _inherits(t,e),_create_class(t,[{key:"emit",value:function(e){ct(e)||G('The data for the "'.concat(this.type,'" hook should be an object.'));var t=!0,n=!1,r=void 0;try{for(var o,a=this.listeners[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;try{var c=i(e);if(!er(e,c)){this.onerror('A plugin returned an unacceptable value for the "'.concat(this.type,'" type.'));break}e=c}catch(e){Fe(e),this.onerror(e)}}}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}return e}}]),t}(M),C=function(e){function t(e){var n;return _class_call_check(this,t),(n=_call_super(this,t)).onerror=G,n.type=e,n}return _inherits(t,e),_create_class(t,[{key:"emit",value:function(e){var t=this;ct(e)||G('The response data for the "'.concat(this.type,'" hook must be an object.'));var n=Array.from(this.listeners);if(n.length>0){var r=0,o=function(n){return Fe(n),t.onerror(n),e},a=function(i){if(er(e,i)){if(e=i,r<n.length)try{return Promise.resolve(n[r++](e)).then(a,o)}catch(e){return o(e)}}else t.onerror('A plugin returned an incorrect value for the "'.concat(t.type,'" type.'));return e};return Promise.resolve(a(e))}return Promise.resolve(e)}}]),t}(M),B=function(){function e(t){_class_call_check(this,e),this.registerPlugins={},this.lifecycle=t,this.lifecycleKeys=Object.keys(t)}return _create_class(e,[{key:"applyPlugin",value:function(e,t){var n,r=this;N(Ur(e),"Plugin configuration is invalid.");var o=e.name;N(o,"A name must be provided by the plugin."),this.registerPlugins[o]||(this.registerPlugins[o]=e,null===(n=e.apply)||void 0===n||n.call(e,t),Object.keys(this.lifecycle).forEach(function(t){var n=e[t];n&&r.lifecycle[t].on(n)}))}},{key:"removePlugin",value:function(e){var t=this;N(e,"A name is required.");var n=this.registerPlugins[e];N(n,'The plugin "'.concat(e,'" is not registered.')),Object.keys(n).forEach(function(e){"name"!==e&&t.lifecycle[e].remove(n[e])})}}]),e}();function tr(e,t){var n=kt(t);n.url||G("The attribute remoteEntry of ".concat(e.name," must not be undefined."));var r=se(t,n.url);!x()&&!r.startsWith("http")&&(r="https:".concat(r)),e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Cn(){return{name:"snapshot-plugin",afterResolve:function(e){return _async_to_generator(function(){var t,n,r,o,a,i,c,s,u,l,f;return _ts_generator(this,function(_){switch(_.label){case 0:return t=e.remote,n=e.pkgNameOrAlias,r=e.expose,o=e.origin,a=e.remoteInfo,i=e.id,at(t)&&Ft(t)?[3,3]:[4,o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i})];case 1:return c=_.sent(),s=c.remoteSnapshot,u=c.globalSnapshot,tr(a,s),l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:"sync",share:!1,depsRemote:!1}},[4,o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:u})];case 2:return[2,((f=_.sent())&&Qt(a,o,f,!1),_object_spread_props(_object_spread({},e),{remoteSnapshot:s}))];case 3:return[2,e]}})})()}}}function Gn(e){var 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 rr(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0,i=Z(e,ce(t)).value,c=a||i;if(c&&!be(c)&&(n(c,t,r),c.remotesInfo)){var s=Object.keys(c.remotesInfo),u=!0,l=!1,f=void 0;try{for(var _,p=s[Symbol.iterator]();!(u=(_=p.next()).done);u=!0){var h=_.value;if(!o[h]){o[h]=!0;var d=Gn(h),m=c.remotesInfo[h];rr(e,{name:d.name,version:m.matchedVersion},n,!1,o,void 0)}}}catch(e){l=!0,f=e}finally{try{u||null==p.return||p.return()}finally{if(l)throw f}}}}var tt=function(e,t){return document.querySelector("".concat(e,"[").concat("link"===e?"href":"src",'="').concat(t,'"]'))};function Un(e,t,n,r,o){var a=[],i=[],c=[],s=new Set,u=new Set,l=e.options,f=t.preloadConfig,_=f.depsRemote;if(rr(r,n,function(t,n,r){var o,s,u=function(e){var n=e.map(function(e){return se(t,e)});return s.filter?n.filter(s.filter):n};if(r)s=f;else if(Array.isArray(_)){var l=_.find(function(e){return e.nameOrAlias===n.name||e.nameOrAlias===n.alias});if(!l)return;s=Zt(l)}else{if(!0!==_)return;s=f}var p=se(t,kt(t).url);p&&c.push({name:n.name,moduleInfo:{name:n.name,entry:p,type:"remoteEntryType"in t?t.remoteEntryType:"global",entryGlobalName:"globalName"in t?t.globalName:n.name,shareScope:"",version:"version"in t?t.version:void 0},url:p});var h="modules"in t?t.modules:[],d=Hn(s.exposes);if(d.length&&"modules"in t&&(h=null==t||null===(o=t.modules)||void 0===o?void 0:o.reduce(function(e,t){return-1!==(null==d?void 0:d.indexOf(t.moduleName))&&e.push(t),e},[])),h)for(var m=h.length,y=0;y<m;y++){var v,g,b,E,S,I,N=h[y],w="".concat(n.name,"/").concat(N.moduleName);e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:"."===N.moduleName?n.name:w,name:n.name,remoteSnapshot:t,preloadConfig:s,remote:n,origin:e}),!Kr(w)&&("all"===s.resourceCategory?((v=a).push.apply(v,_to_consumable_array(u(N.assets.css.async))),(g=a).push.apply(g,_to_consumable_array(u(N.assets.css.sync))),(b=i).push.apply(b,_to_consumable_array(u(N.assets.js.async))),(E=i).push.apply(E,_to_consumable_array(u(N.assets.js.sync)))):(s.resourceCategory="sync")&&((S=a).push.apply(S,_to_consumable_array(u(N.assets.css.sync))),(I=i).push.apply(I,_to_consumable_array(u(N.assets.js.sync)))),qr(w))}},!0,{},o),o.shared&&o.shared.length>0){o.shared.forEach(function(t){var n,r=null===(n=l.shared)||void 0===n?void 0:n[t.sharedName];if(r){var o=t.version?r.find(function(e){return e.version===t.version}):r;o&&Dt(o).forEach(function(n){!function(t,n){var r=Le(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare);r&&"function"==typeof r.lib&&(n.assets.js.sync.forEach(function(e){s.add(e)}),n.assets.css.sync.forEach(function(e){u.add(e)}))}(n,t)})}})}var p=i.filter(function(e){return!s.has(e)&&!tt("script",e)});return{cssAssets:a.filter(function(e){return!u.has(e)&&!tt("link",e)}),jsAssetsWithoutEntry:p,entryAssets:c.filter(function(e){return!tt("script",e.url)})}}var Vn=function(){return{name:"generate-preload-assets-plugin",generatePreloadAssets:function(e){return _async_to_generator(function(){var t,n,r,o,a,i;return _ts_generator(this,function(c){return t=e.origin,n=e.preloadOptions,r=e.remoteInfo,o=e.remote,a=e.globalSnapshot,i=e.remoteSnapshot,[2,x()?at(o)&&Ft(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:r.name,entry:o.entry,type:r.type||"global",entryGlobalName:"",shareScope:""}}]}:(tr(r,i),Un(t,n,r,a,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}]})})()}}};function nr(e,t){var n=Ae({name:t.name,version:t.options.version}),r=n&&"remotesInfo"in n&&n.remotesInfo&&Z(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Tt(),remoteSnapshot:Ae({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Tt(),remoteSnapshot:Ae({name:e.name,version:"version"in e?e.version:void 0})}}var ot=function(){function e(t){_class_call_check(this,e),this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new B({beforeLoadRemoteSnapshot:new L("beforeLoadRemoteSnapshot"),loadSnapshot:new C("loadGlobalSnapshot"),loadRemoteSnapshot:new C("loadRemoteSnapshot"),afterLoadSnapshot:new C("afterLoadSnapshot")}),this.manifestLoading=le.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=t,this.loaderHook=t.loaderHook}return _create_class(e,[{key:"loadRemoteSnapshotInfo",value:function(e){return _async_to_generator(function(e){var t,n,r,o,a,i,c,s,u,l,f,_,p,h,d,m,y,v,g,b,E,S,I;return _ts_generator(this,function(N){switch(N.label){case 0:return t=e.moduleInfo,n=e.id,e.expose,r=this.HostInstance,o=r.options,[4,this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:t})];case 1:return N.sent(),(a=Ae({name:this.HostInstance.options.name,version:this.HostInstance.options.version}))||(a={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},Br(_define_property({},this.HostInstance.options.name,a))),a&&"remotesInfo"in a&&!Z(a.remotesInfo,t.name).value&&("version"in t||"entry"in t)&&(a.remotesInfo=_object_spread_props(_object_spread({},null==a?void 0:a.remotesInfo),_define_property({},t.name,{matchedVersion:"version"in t?t.version:t.entry}))),i=this.getGlobalRemoteInfo(t),c=i.hostGlobalSnapshot,s=i.remoteSnapshot,u=i.globalSnapshot,[4,this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:t,hostGlobalSnapshot:c,remoteSnapshot:s,globalSnapshot:u})];case 2:return l=N.sent(),f=l.remoteSnapshot,_=l.globalSnapshot,f?be(f)?(d=x()?f.remoteEntry:f.ssrRemoteEntry||f.remoteEntry||"",[4,this.getManifestJson(d,t,{})]):[3,4]:[3,7];case 3:return m=N.sent(),y=wt(_object_spread_props(_object_spread({},t),{entry:d}),m),p=m,h=y,[3,6];case 4:return[4,this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,remoteSnapshot:f,from:"global"})];case 5:v=N.sent(),g=v.remoteSnapshot,p=g,h=_,N.label=6;case 6:return[3,11];case 7:return at(t)?[4,this.getManifestJson(t.entry,t,{})]:[3,10];case 8:return b=N.sent(),E=wt(t,b),[4,this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,remoteSnapshot:b,from:"global"})];case 9:return S=N.sent(),I=S.remoteSnapshot,p=I,h=E,[3,11];case 10:G(A(Ze,w,{hostName:t.name,hostVersion:t.version,globalSnapshot:JSON.stringify(_)})),N.label=11;case 11:return[4,this.hooks.lifecycle.afterLoadSnapshot.emit({id:n,host:this.HostInstance,options:o,moduleInfo:t,remoteSnapshot:p})];case 12:return[2,(N.sent(),{remoteSnapshot:p,globalSnapshot:h})]}})}).apply(this,arguments)}},{key:"getGlobalRemoteInfo",value:function(e){return nr(e,this.HostInstance)}},{key:"getManifestJson",value:function(e,t,n){return _async_to_generator(function(){var n,r,o;return _ts_generator(this,function(a){return n=this,r=function(){return _async_to_generator(function(){var n,r,o;return _ts_generator(this,function(a){switch(a.label){case 0:if(n=this.manifestCache.get(e))return[2,n];a.label=1;case 1:return a.trys.push([1,6,,8]),[4,this.loaderHook.lifecycle.fetch.emit(e,{})];case 2:return r=a.sent(),!r||!_instanceof(r,Response)?[4,fetch(e,{})]:[3,4];case 3:r=a.sent(),a.label=4;case 4:return[4,r.json()];case 5:return n=a.sent(),[3,8];case 6:return o=a.sent(),[4,this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance})];case 7:return(n=a.sent())||(delete this.manifestLoading[e],G(A(Xe,w,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},"".concat(o)))),[3,8];case 8:return[2,(N(n.metaData&&n.exposes&&n.shared,"".concat(e," is not a federation manifest")),this.manifestCache.set(e,n),n)]}})}).call(n)},o=function(){return _async_to_generator(function(){var n,o,a;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,r()];case 1:return n=i.sent(),o=Be(n,{version:e}),[4,this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:n,remoteSnapshot:o,manifestUrl:e,from:"manifest"})];case 2:return a=i.sent(),[2,a.remoteSnapshot]}})}).call(n)},[2,(this.manifestLoading[e]||(this.manifestLoading[e]=o().then(function(e){return e})),this.manifestLoading[e])]})}).call(this)}}]),e}(),st=function(){function e(t){_class_call_check(this,e),this.hooks=new B({afterResolve:new C("afterResolve"),beforeLoadShare:new C("beforeLoadShare"),loadShare:new L,resolveShare:new K("resolveShare"),initContainerShareScopeMap:new K("initContainerShareScopeMap")}),this.host=t,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(t.options)}return _create_class(e,[{key:"registerShared",value:function(e,t){var n=this,r=zt(e,t),o=r.shareInfos,a=r.shared;return Object.keys(o).forEach(function(e){o[e].forEach(function(r){r.scope.forEach(function(o){var a;(null===(a=n.shareScopeMap[o])||void 0===a?void 0:a[e])||n.setShared({pkgName:e,lib:r.lib,get:r.get,loaded:r.loaded||!!r.lib,shared:r,from:t.name})})})}),{shareInfos:o,shared:a}}},{key:"loadShare",value:function(e,t){return _async_to_generator(function(){var n,r,o,a,i,c,s,u,l,f;return _ts_generator(this,function(_){switch(_.label){case 0:return n=this,r=this.host,o=Lt({pkgName:e,extraOptions:t,shareInfos:r.options.shared}),(null==o?void 0:o.scope)?[4,Promise.all(o.scope.map(function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.initializeSharing(e,{strategy:o.strategy}))];case 1:return t.sent(),[2]}})}).call(n)}))]:[3,2];case 1:_.sent(),_.label=2;case 2:return[4,this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r})];case 3:return a=_.sent(),N(i=a.shareInfo,"Cannot find ".concat(e," Share in the ").concat(r.options.name,". Please ensure that the ").concat(e," Share parameters have been injected")),c=Le(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare),s=function(e){e.useIn||(e.useIn=[]),$t(e.useIn,r.options.name)},c&&c.lib?[2,(s(c),c.lib)]:c&&c.loading&&!c.loaded?[4,c.loading]:[3,5];case 4:return u=_.sent(),[2,(c.loaded=!0,c.lib||(c.lib=u),s(c),u)];case 5:return c?(l=_async_to_generator(function(){var e;return _ts_generator(this,function(t){switch(t.label){case 0:return[4,c.get()];case 1:return e=t.sent(),[2,(s(c),c.loaded=!0,c.lib=e,e)]}})})(),[2,(this.setShared({pkgName:e,loaded:!1,shared:c,from:r.options.name,lib:null,loading:l}),l)]):(null==t?void 0:t.customShareInfo)?[2,!1]:(f=_async_to_generator(function(){var t,n;return _ts_generator(this,function(r){switch(r.label){case 0:return[4,i.get()];case 1:return t=r.sent(),i.lib=t,i.loaded=!0,s(i),[2,((n=Le(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare))&&(n.lib=t,n.loaded=!0,n.from=i.from),t)]}})}).call(n),[2,(this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:f}),f)]);case 6:return[2]}})}).call(this)}},{key:"initializeSharing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de,t=arguments.length>1?arguments[1]:void 0,n=this.host,r=null==t?void 0:t.from,o=null==t?void 0:t.strategy,a=null==t?void 0:t.initScope,i=[];if("build"!==r){var c=this.initTokens;a||(a=[]);var s=c[e];if(s||(s=c[e]={from:this.host.name}),a.indexOf(s)>=0)return i;a.push(s)}var u=this.shareScopeMap,l=n.options.name;u[e]||(u[e]={});var f=u[e];return Object.keys(n.options.shared).forEach(function(t){n.options.shared[t].forEach(function(n){n.scope.includes(e)&&function(e,t){var n,r=t.version,o=t.eager;f[e]=f[e]||{};var a=f[e],i=a[r],c=!(!i||!i.eager&&!(null===(n=i.shareConfig)||void 0===n?void 0:n.eager));(!i||"loaded-first"!==i.strategy&&!i.loaded&&(!o!=!c?o:l>i.from))&&(a[r]=t)}(t,n)})}),("version-first"===n.options.shareStrategy||"version-first"===o)&&n.options.remotes.forEach(function(t){t.shareScope===e&&i.push(function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){switch(t.label){case 0:return[4,n.remoteHandler.getRemoteModuleAndOptions({id:e})];case 1:return[4,t.sent().module.init()];case 2:return t.sent(),[2]}})})()}(t.name))}),i}},{key:"loadShareSync",value:function(e,t){var n=this,r=this.host,o=Lt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});(null==o?void 0:o.scope)&&o.scope.forEach(function(e){n.initializeSharing(e,{strategy:o.strategy})});var a=Le(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),i=function(e){e.useIn||(e.useIn=[]),$t(e.useIn,r.options.name)};if(a){if("function"==typeof a.lib)return i(a),a.loaded||(a.loaded=!0,a.from===r.options.name&&(o.loaded=!0)),a.lib;if("function"==typeof a.get){var c=a.get();if(!_instanceof(c,Promise))return i(a),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:c,shared:a}),c}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){var s=o.get();if(_instanceof(s,Promise)){var u="build"===(null==t?void 0:t.from)?Je:Ne;throw new Error(A(u,w,{hostName:r.options.name,sharedPkgName:e}))}return o.lib=s,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(A(Ne,w,{hostName:r.options.name,sharedPkgName:e}))}},{key:"initShareScopeMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.host;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}},{key:"setShared",value:function(e){var t=this,n=e.pkgName,r=e.shared,o=e.from,a=e.lib,i=e.loading,c=e.loaded,s=e.get,u=r.version,l=r.scope,f=void 0===l?"default":l,_=_object_without_properties(r,["version","scope"]);(Array.isArray(f)?f:[f]).forEach(function(e){if(t.shareScopeMap[e]||(t.shareScopeMap[e]={}),t.shareScopeMap[e][n]||(t.shareScopeMap[e][n]={}),!t.shareScopeMap[e][n][u])return t.shareScopeMap[e][n][u]=_object_spread_props(_object_spread({version:u,scope:[e]},_),{lib:a,loaded:c,loading:i}),void(s&&(t.shareScopeMap[e][n][u].get=s));var r=t.shareScopeMap[e][n][u];i&&!r.loading&&(r.loading=i),c&&!r.loaded&&(r.loaded=c),o&&r.from!==o&&(r.from=o)})}},{key:"_setGlobalShareScopeMap",value:function(e){var t=Xt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}}]),e}(),it=function(){function e(t){_class_call_check(this,e),this.hooks=new B({beforeRegisterRemote:new K("beforeRegisterRemote"),registerRemote:new K("registerRemote"),beforeRequest:new C("beforeRequest"),onLoad:new L("onLoad"),handlePreloadModule:new M("handlePreloadModule"),errorLoadRemote:new L("errorLoadRemote"),beforePreloadRemote:new L("beforePreloadRemote"),generatePreloadAssets:new L("generatePreloadAssets"),afterPreloadRemote:new L,loadEntry:new L}),this.host=t,this.idToRemoteMap={}}return _create_class(e,[{key:"formatAndRegisterRemote",value:function(e,t){var n=this;return(t.remotes||[]).reduce(function(e,t){return n.registerRemote(t,e,{force:!1}),e},e.remotes)}},{key:"setIdToRemoteMap",value:function(e,t){var n=t.remote,r=t.expose,o=n.name,a=n.alias;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(o)){var i=e.replace(o,a);this.idToRemoteMap[i]={name:n.name,expose:r}}else if(a&&e.startsWith(a)){var c=e.replace(a,o);this.idToRemoteMap[c]={name:n.name,expose:r}}}},{key:"loadRemote",value:function(e,t){return _async_to_generator(function(){var n,r,o,a,i,c,s,u,l,f,_,p,h,d,m,y,v,g;return _ts_generator(this,function(b){switch(b.label){case 0:n=this.host,b.label=1;case 1:return b.trys.push([1,5,,7]),r=(t||{loadFactory:!0}).loadFactory,o=void 0===r||r,[4,this.getRemoteModuleAndOptions({id:e})];case 2:return a=b.sent(),i=a.module,c=a.moduleOptions,s=a.remoteMatchInfo,u=s.pkgNameOrAlias,l=s.remote,f=s.expose,_=s.id,p=s.remoteSnapshot,[4,i.get(_,f,t,p)];case 3:return h=b.sent(),[4,this.hooks.lifecycle.onLoad.emit({id:_,pkgNameOrAlias:u,expose:f,exposeModule:o?h:void 0,exposeModuleFactory:o?void 0:h,remote:l,options:c,moduleInstance:i,origin:n})];case 4:return d=b.sent(),[2,(this.setIdToRemoteMap(e,s),"function"==typeof d?d:h)];case 5:return m=b.sent(),y=(t||{from:"runtime"}).from,v=void 0===y?"runtime":y,[4,this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:m,from:v,lifecycle:"onLoad",origin:n})];case 6:if(!(g=b.sent()))throw m;return[2,g];case 7:return[2]}})}).call(this)}},{key:"preloadRemote",value:function(e){return _async_to_generator(function(){var t,n,r;return _ts_generator(this,function(o){switch(o.label){case 0:return t=this,n=this.host,[4,this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:n.options,origin:n})];case 1:return o.sent(),r=xn(n.options.remotes,e),[4,Promise.all(r.map(function(e){return _async_to_generator(function(){var t,r,o,a,i,c;return _ts_generator(this,function(s){switch(s.label){case 0:return t=e.remote,r=fe(t),[4,n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t})];case 1:return o=s.sent(),a=o.globalSnapshot,i=o.remoteSnapshot,[4,this.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:e,remote:t,remoteInfo:r,globalSnapshot:a,remoteSnapshot:i})];case 2:return(c=s.sent())&&Qt(r,n,c),[2]}})}).call(t)}))];case 2:return o.sent(),[2]}})}).call(this)}},{key:"registerRemotes",value:function(e,t){var n=this,r=this.host;e.forEach(function(e){n.registerRemote(e,r.options.remotes,{force:null==t?void 0:t.force})})}},{key:"getRemoteModuleAndOptions",value:function(e){return _async_to_generator(function(){var t,n,r,o,a,i,c,s,u,l,f,_,p;return _ts_generator(this,function(h){switch(h.label){case 0:t=this.host,n=e.id,h.label=1;case 1:return h.trys.push([1,3,,5]),[4,this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})];case 2:return r=h.sent(),[3,5];case 3:return o=h.sent(),[4,this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:"runtime",error:o,lifecycle:"beforeRequest"})];case 4:if(!(r=h.sent()))throw o;return[3,5];case 5:return a=r.id,N(i=An(t.options.remotes,a),A(Ye,w,{hostName:t.options.name,requestId:a})),c=i.remote,s=fe(c),[4,t.sharedHandler.hooks.lifecycle.afterResolve.emit(_object_spread_props(_object_spread({id:a},i),{options:t.options,origin:t,remoteInfo:s}))];case 6:return u=h.sent(),l=u.remote,f=u.expose,N(l&&f,"The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ".concat(a,".")),_=t.moduleCache.get(l.name),p={host:t,remoteInfo:s},[2,(_||(_=new te(p),t.moduleCache.set(l.name,_)),{module:_,moduleOptions:p,remoteMatchInfo:u})]}})}).call(this)}},{key:"registerRemote",value:function(e,t,n){var r=this.host,o=function(){if(e.alias){var n=t.find(function(t){var n;return e.alias&&(t.name.startsWith(e.alias)||(null===(n=t.alias)||void 0===n?void 0:n.startsWith(e.alias)))});N(!n,"The alias ".concat(e.alias," of remote ").concat(e.name," is not allowed to be the prefix of ").concat(n&&n.name," name or alias"))}"entry"in e&&x()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=de),e.type||(e.type=Vt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});var a=t.find(function(t){return t.name===e.name});if(a){var i=['The remote "'.concat(e.name,'" is already registered.'),"Please note that overriding it may cause unexpected errors."];(null==n?void 0:n.force)&&(this.removeRemote(a),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),Ee(i.join(" ")))}else o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r})}},{key:"removeRemote",value:function(e){try{var t=this.host,n=e.name,r=t.options.remotes.findIndex(function(e){return e.name===n});-1!==r&&t.options.remotes.splice(r,1);var o=t.moduleCache.get(e.name);if(o){var a,i=o.remoteInfo,c=i.entryGlobalName;$[c]&&((null===(a=Object.getOwnPropertyDescriptor($,c))||void 0===a?void 0:a.configurable)?delete $[c]:$[c]=void 0);var s=nt(o.remoteInfo);Y[s]&&delete Y[s],t.snapshotHandler.manifestCache.delete(i.entry);var u=i.buildVersion?_e(i.name,i.buildVersion):i.name,l=$.__FEDERATION__.__INSTANCES__.findIndex(function(e){return i.buildVersion?e.options.id===u:e.name===u});if(-1!==l){var f=$.__FEDERATION__.__INSTANCES__[l];u=f.options.id||u;var _=Xt(),p=!0,h=[];Object.keys(_).forEach(function(e){var t=_[e];t&&Object.keys(t).forEach(function(n){var r=t[n];r&&Object.keys(r).forEach(function(t){var o=r[t];o&&Object.keys(o).forEach(function(r){var a=o[r];a&&"object"==(void 0===a?"undefined":_type_of(a))&&a.from===i.name&&(a.loaded||a.loading?(a.useIn=a.useIn.filter(function(e){return e!==i.name}),a.useIn.length?p=!1:h.push([e,n,t,r])):h.push([e,n,t,r]))})})})}),p&&(f.shareScopeMap={},delete _[u]),h.forEach(function(e){var t,n,r,o=_sliced_to_array(e,4),a=o[0],i=o[1],c=o[2],s=o[3];null===(r=_[a])||void 0===r||(null===(n=r[i])||void 0===n||(null===(t=n[c])||void 0===t||delete t[s]))}),$.__FEDERATION__.__INSTANCES__.splice(l,1)}var d=nr(e,t).hostGlobalSnapshot;if(d){var m=d&&"remotesInfo"in d&&d.remotesInfo&&Z(d.remotesInfo,e.name).key;m&&(delete d.remotesInfo[m],le.__FEDERATION__.__MANIFEST_LOADING__[m]&&delete le.__FEDERATION__.__MANIFEST_LOADING__[m])}t.moduleCache.delete(e.name)}}catch(e){rt.log("removeRemote fail: ",e)}}}]),e}(),jn="boolean"!=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,q=function(){function e(t){_class_call_check(this,e),this.hooks=new B({beforeInit:new K("beforeInit"),init:new M,beforeInitContainer:new C("beforeInitContainer"),initContainer:new C("initContainer")}),this.version="0.23.0",this.moduleCache=new Map,this.loaderHook=new B({getModuleInfo:new M,createScript:new M,createLink:new M,fetch:new L,loadEntryError:new L,getModuleFactory:new L}),this.bridgeHook=new B({beforeBridgeRender:new M,afterBridgeRender:new M,beforeBridgeDestroy:new M,afterBridgeDestroy:new M});var n=jn?[Cn(),Vn()]:[],r={id:On(),name:t.name,plugins:n,remotes:[],shared:{},inBrowser:x()};this.name=t.name,this.options=r,this.snapshotHandler=new ot(this),this.sharedHandler=new st(this),this.remoteHandler=new it(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins(_to_consumable_array(r.plugins).concat(_to_consumable_array(t.plugins||[]))),this.options=this.formatOptions(r,t)}return _create_class(e,[{key:"initOptions",value:function(e){this.registerPlugins(e.plugins);var t=this.formatOptions(this.options,e);return this.options=t,t}},{key:"loadShare",value:function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,this.sharedHandler.loadShare(e,t)]})}).call(this)}},{key:"loadShareSync",value:function(e,t){return this.sharedHandler.loadShareSync(e,t)}},{key:"initializeSharing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de,t=arguments.length>1?arguments[1]:void 0;return this.sharedHandler.initializeSharing(e,t)}},{key:"initRawContainer",value:function(e,t,n){var r=fe({name:e,entry:t}),o=new te({host:this,remoteInfo:r});return o.remoteEntryExports=n,this.moduleCache.set(e,o),o}},{key:"loadRemote",value:function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,this.remoteHandler.loadRemote(e,t)]})}).call(this)}},{key:"preloadRemote",value:function(e){return _async_to_generator(function(){return _ts_generator(this,function(t){return[2,this.remoteHandler.preloadRemote(e)]})}).call(this)}},{key:"initShareScopeMap",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sharedHandler.initShareScopeMap(e,t,n)}},{key:"formatOptions",value:function(e,t){var n=zt(e,t).shared,r=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),o=r.userOptions,a=r.options,i=this.remoteHandler.formatAndRegisterRemote(a,o),c=this.sharedHandler.registerShared(a,o).shared,s=_to_consumable_array(a.plugins);o.plugins&&o.plugins.forEach(function(e){s.includes(e)||s.push(e)});var u=_object_spread_props(_object_spread({},e,t),{plugins:s,remotes:i,shared:c});return this.hooks.lifecycle.init.emit({origin:this,options:u}),u}},{key:"registerPlugins",value:function(e){var t=Mn(e,this);this.options.plugins=this.options.plugins.reduce(function(e,t){return t&&e&&!e.find(function(e){return e.name===t.name})&&e.push(t),e},t||[])}},{key:"registerRemotes",value:function(e,t){return this.remoteHandler.registerRemotes(e,t)}},{key:"registerShared",value:function(e){this.sharedHandler.registerShared(this.options,_object_spread_props(_object_spread({},this.options),{shared:e}))}}]),e}();function Bn(){return("undefined"==typeof FEDERATION_BUILD_IDENTIFIER?"undefined":_type_of(FEDERATION_BUILD_IDENTIFIER))<"u"?FEDERATION_BUILD_IDENTIFIER:""}function or(e,t){var n=Bn();return $.__FEDERATION__.__INSTANCES__.find(function(r){return!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t)})}function sr(e){var t=new(Ct()||q)(e);return Ht(t),t}var R=null;function Wn(e){var t=or(e.name,e.version);return t?(t.initOptions(e),R||(R=t),t):R=sr(e)}function Kn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.loadRemote.apply(R,t)}function qn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.loadShare.apply(R,t)}function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.loadShareSync.apply(R,t)}function Xn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.preloadRemote.apply(R,t)}function Yn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.registerRemotes.apply(R,t)}function Jn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.registerPlugins.apply(R,t)}function Zn(){return R}function Qn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return N(R,A(j,w)),R.registerShared.apply(R,t)}return Gt(q),window[mt]={MFRuntime:De,MFSDK:Ie},exports.MFRuntime=De,exports.MFSDK=Ie,exports}({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empjs/share",
3
- "version": "3.13.9-beta.0",
3
+ "version": "3.13.9-beta.2",
4
4
  "description": "emp share and runtime",
5
5
  "license": "MIT",
6
6
  "type": "module",