@empjs/share 3.13.2 → 3.13.3

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.
Files changed (2) hide show
  1. package/output/wSdk.js +1 -0
  2. package/package.json +2 -2
package/output/wSdk.js ADDED
@@ -0,0 +1 @@
1
+ (function(){"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,S=(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)),je=(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},$t=(e,t)=>{for(var r in t)Rt(e,r,{get:t[r],enumerable:!0})},E=(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())}),Nt="EMP_SHARE_RUNTIME",xe={};$t(xe,{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={};$t(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:()=>Gr,composeKeyWithSeparator:()=>Se,containerPlugin:()=>$r,containerReferencePlugin:()=>Nr,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:()=>j,isDebugMode:()=>ce,isManifestProvider:()=>Ne,isReactNativeEnv:()=>Re,isRequiredVersion:()=>Dr,isStaticResourcesEqual:()=>Ze,loadScript:()=>Z,loadScriptNode:()=>Q,logger:()=>xr,moduleFederationPlugin:()=>Tr,normalizeOptions:()=>Vr,parseEntry:()=>Pr,safeToString:()=>$e,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"},$r=Object.freeze({__proto__:null}),Nr=Object.freeze({__proto__:null}),Tr=Object.freeze({__proto__:null}),wr=Object.freeze({__proto__:null});function j(){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(j()&&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?j()||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 $e(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:E,ssrRemoteEntry:g}=e.metaData,{exposes:_}=e,b={version:a||"",buildVersion:y,globalName:E,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==_?void 0:_.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(null!=(n=e.metaData)&&n.prefetchInterface){let t=e.metaData.prefetchInterface;b=L(S({},b),{prefetchInterface:t})}if(null!=(o=e.metaData)&&o.prefetchEntry){let{path:t,name:r,type:n}=e.metaData.prefetchEntry;b=L(S({},b),{prefetchEntry:X(t,r),prefetchEntryType:n})}if(i="publicPath"in e.metaData?L(S({},b),{publicPath:u(),ssrPublicPath:e.metaData.ssrPublicPath}):L(S({},b),{getPublicPath:u()}),g){let e=X(g.path,g.name);i.ssrRemoteEntry=e,i.ssrRemoteEntryType=g.type||"commonjs-module"}return i}function Ne(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 Gr(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 xr=Te(Mt),Ur=Lt(Mt);function Je(e,t){return E(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)=>E(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:S({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=()=>E(null,null,function*(){let e=yield ae("node-fetch");return e.default||e}),jr=(e,t,r)=>E(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=()=>E(null,null,function*(){return null!=loaderHook&&loaderHook.fetch?(e,t)=>jr(e,t,loaderHook):"undefined"==typeof fetch?Ft():fetch}),handleScriptFetch=(f,urlObj)=>E(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=>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=>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")},Ve=new Map;function Ke(e,t){return E(this,null,function*(){if(Ve.has(e))return Ve.get(e);let{fetch:r,vm:n}=t,o=yield(yield r(e)).text(),i=new n.SourceTextModule(o,{importModuleDynamically:(r,n)=>E(null,null,function*(){return Ke(new URL(r,e).href,t)})});return Ve.set(e,i),yield i.link(r=>E(null,null,function*(){let n=new URL(r,e).href;return yield Ke(n,t)})),i})}function Vr(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 S(S({},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."};S(S(S({},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 Ge(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 j()||Re()?"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,x=(()=>{try{return document.defaultView}catch(e){return O}})(),he=x;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.22.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(x);var kt=()=>x.__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(je(t,["version"])),o=re(x.__FEDERATION__.moduleInfo,n).value;if((null==o?void 0:o.version)===r)return o}},ve=e=>en(e,x.__FEDERATION__.moduleInfo),Ht=(e,t)=>{let r=de(e);return x.__FEDERATION__.moduleInfo[r]=t,x.__FEDERATION__.moduleInfo},tn=e=>(x.__FEDERATION__.moduleInfo=S(S({},x.__FEDERATION__.moduleInfo),e),()=>{let t=Object.keys(e);for(let e of t)delete x.__FEDERATION__.moduleInfo[e]}),mt=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:O[r]}},Jt=e=>{let{__GLOBAL_PLUGIN__:t}=x.__FEDERATION__;e.forEach(e=>{-1===t.findIndex(t=>t.name===e.name)?t.push(e):Ge(`The plugin ${e.name} has been registered.`)})},rn=()=>x.__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-]*",Gt=`(?:${De}|${Qt})`,sn=`(?:-?(${Gt}(?:\\.${Gt})*))`,xt=`(?:${fe}|${Qt})`,er=`(?:-(${xt}(?:\\.${xt})*))`,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 jt(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 $n(e){return e.replace(K(dn),"$1^")}function Nn(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(Nn,Tn,wn,An)(e)}function Fn(e){return nr(Rn,Sn,In,$n)(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:jt(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:jt(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(S({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:S({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=S({},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):Ge(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 Vt(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 Gn(){return"undefined"!=typeof FEDERATION_BUILD_IDENTIFIER?FEDERATION_BUILD_IDENTIFIER:""}function xn(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 jn(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 Vn(e){return E(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 E(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 E(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 E(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 Vn({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 E(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 E(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:j())?Kn({remoteInfo:n,remoteEntryExports:r,loaderHook:l,getEntryUrl:o}):qn({remoteInfo:n,loaderHook:l}))).catch(e=>E(null,null,function*(){let o=lt(n);if(e instanceof Error&&e.message.includes(Oe)&&!i){let e=e=>oe(L(S({},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(S({},e),{entry:"entry"in e?e.entry:"",type:e.type||Zt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||ye})}function cr(e){return S({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&&$e({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 E(this,null,function*(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;return e=yield oe({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports}),P(e,`remoteEntryExports is undefined \n ${$e(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports})}get(e,t,r,n){return E(this,null,function*(){let o,{loadFactory:i=!0}=r||{loadFactory:!0},s=yield this.getEntry();if(!this.inited){let t=this.host.shareScopeMap,r=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];r.length||r.push("default"),r.forEach(e=>{t[e]||(t[e]={})});let o=t[r[0]],i=[],l={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?r:this.remoteInfo.shareScope||"default"};Object.defineProperty(l,"shareScopeMap",{value:t,enumerable:!1});let a=yield this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:o,remoteEntryInitOptions:l,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});void 0===(null==s?void 0:s.init)&&W(F(et,M,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),yield s.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),yield this.host.hooks.lifecycle.initContainer.emit(L(S({},a),{id:e,remoteSnapshot:n,remoteEntryExports:s}))}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?()=>E(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){Ge(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=>(Ge(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);!j()&&!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 E(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(S({},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&&!Ne(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 E(this,null,function*(){let{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:s}=e;return j()?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 E(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(S({},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(Ne(c)){let t=j()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",r=yield this.getManifestJson(t,e,{});i=r,s=Ht(L(S({},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 E(this,null,function*(){let r=()=>E(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]=(()=>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 E(this,null,function*(){let{host:r}=this,n=Vt({pkgName:e,extraOptions:t,shareInfos:r.options.shared});null!=n&&n.scope&&(yield Promise.all(n.scope.map(e=>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=E(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=E(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=t=>E(this,null,function*(){let{module:n}=yield r.remoteHandler.getRemoteModuleAndOptions({id:t});if(n.getEntry){let o;try{o=yield n.getEntry()}catch(e){o=yield r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:t,error:e,from:"runtime",lifecycle:"beforeLoadShare",origin:r})}n.inited||(yield(t=>t&&t.init&&t.init(l[e],i))(o),n.inited=!0)}});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=Vt({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=je(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(S({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 E(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 E(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=>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 E(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=xn(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(S({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&&j()&&!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.22.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:Gn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:j()};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 E(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 E(this,null,function*(){return this.remoteHandler.loadRemote(e,t)})}preloadRemote(e){return E(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(S(S({},e),t),{plugins:l,remotes:i,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:a}),a}registerPlugins(e){let t=jn(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(S({},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)}Yt(J),window[Nt]={MFRuntime:xe,MFSDK:Ae}})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empjs/share",
3
- "version": "3.13.2",
3
+ "version": "3.13.3",
4
4
  "description": "emp share and runtime",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -163,7 +163,7 @@
163
163
  },
164
164
  "devDependencies": {
165
165
  "@swc/core": "^1.15.1",
166
- "@empjs/cli": "3.11.0"
166
+ "@empjs/cli": "3.11.3"
167
167
  },
168
168
  "scripts": {
169
169
  "dev": "pnpm --filter @empjs/share run /^dev:.*/",