@aquera/data-visualizer-sdk 0.0.13 → 0.0.14

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.
@@ -0,0 +1,8 @@
1
+ import{a as y,b as R,d as Xe}from"./chunk-ZW5NV4UO.js";var Je=".json",Tt="FEDERATION_DEBUG",W={AT:"@",HYPHEN:"-",SLASH:"/"},ye={[W.AT]:"scope_",[W.HYPHEN]:"_",[W.SLASH]:"__"},Qt={[ye[W.AT]]:W.AT,[ye[W.HYPHEN]]:W.HYPHEN,[ye[W.SLASH]]:W.SLASH},wt=":";var ge=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});var O=typeof ENV_TARGET<"u"?ENV_TARGET==="web":typeof window<"u"&&typeof window.document<"u";function Ze(){return O}function _e(){return typeof navigator<"u"&&navigator?.product==="ReactNative"}function lo(){try{if(Ze()&&window.localStorage)return!!localStorage.getItem(Tt)}catch{return!1}return!1}function se(){return typeof process<"u"&&process.env&&process.env.FEDERATION_DEBUG?!!process.env.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:lo()}var uo="[ Federation Runtime ]";var Se=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${wt}${r}`:r:t,""):""};var ie=(e,t)=>{if("getPublicPath"in e){let r;return e.getPublicPath.startsWith("function")?r=new Function("return "+e.getPublicPath)()():r=new Function(e.getPublicPath)(),`${r}${t}`}else return"publicPath"in e?!Ze()&&!_e()&&"ssrPublicPath"in e&&typeof e.ssrPublicPath=="string"?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",e,t),"")};var Re=e=>{console.warn(`${uo}: ${e}`)};function Ie(e){try{return JSON.stringify(e,null,2)}catch{return""}}var Qe=(e,t)=>{if(!e)return t;let o=(n=>{if(n===".")return"";if(n.startsWith("./"))return n.replace("./","");if(n.startsWith("/")){let s=n.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return n})(e);return o?o.endsWith("/")?`${o}${t}`:`${o}/${t}`:t};function er(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Nt(e,t={}){let{remotes:r={},overrides:o={},version:n}=t,s,i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&n?er(n):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(o),c={};Object.keys(r).length||(c=e.remotes?.reduce((E,M)=>{let x,P=M.federationContainerName;return a.includes(P)?x=o[P]:"version"in M?x=M.version:x=M.entry,E[P]={matchedVersion:x},E},{})||{}),Object.keys(r).forEach(E=>c[E]={matchedVersion:a.includes(E)?o[E]:r[E]});let{remoteEntry:{path:l,name:f,type:u},types:m={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:d,ssrRemoteEntry:p}=e.metaData,{exposes:_}=e,g={version:n||"",buildVersion:h,globalName:d,remoteEntry:Qe(l,f),remoteEntryType:u,remoteTypes:Qe(m.path,m.name),remoteTypesZip:m.zip||"",remoteTypesAPI:m.api||"",remotesInfo:c,shared:e?.shared.map(E=>({assets:E.assets,sharedName:E.name,version:E.version,usedExports:E.referenceExports||[]})),modules:_?.map(E=>({moduleName:E.name,modulePath:E.path,assets:E.assets}))};if("publicPath"in e.metaData?(s=R(y({},g),{publicPath:i()}),typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s=R(y({},g),{getPublicPath:i()}),p){let E=Qe(p.path,p.name);s.ssrRemoteEntry=E,s.ssrRemoteEntryType=p.type||"commonjs-module"}return s}function be(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(Je))}var tr="[ Module Federation ]",Te=console,po=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Eo(){try{let e=new Error().stack;if(!e)return;let[,...t]=e.split(`
2
+ `),r=t.filter(o=>!po.some(n=>o.includes(n)));return r.length?`Stack trace:
3
+ ${r.slice(0,5).join(`
4
+ `)}`:void 0}catch{return}}var rr=class{constructor(e,t=Te){this.prefix=e,this.delegate=t??Te}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??Te}emit(e,t){let r=this.delegate,o=se()?Eo():void 0,n=o?[...t,o]:t,s=(()=>{switch(e){case"log":return["log","info"];case"info":return["info","log"];case"warn":return["warn","info","log"];case"error":return["error","warn","log"];default:return["debug","log"]}})();for(let i of s){let a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...n);return}}for(let i of s){let a=Te[i];if(typeof a=="function"){a.call(Te,this.prefix,...n);return}}}log(...e){this.emit("log",e)}warn(...e){this.emit("warn",e)}error(...e){this.emit("error",e)}success(...e){this.emit("info",e)}info(...e){this.emit("info",e)}ready(...e){this.emit("info",e)}debug(...e){se()&&this.emit("debug",e)}};function et(e){return new rr(e)}function or(e){let t=new rr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}var yo=et(tr),go=or(tr);async function Mt(e,t){try{return await e()}catch(r){!t&&Re(r);return}}function tt(e,t){let r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function rt(e){let t=null,r=!0,o=2e4,n,s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){let f=s[l],u=f.getAttribute("src");if(u&&tt(u,e.url)){t=f,r=!1;break}}if(!t){let l=e.attrs;t=document.createElement("script"),t.type=l?.type==="module"?"module":"text/javascript";let f;e.createScriptHook&&(f=e.createScriptHook(e.url,e.attrs),f instanceof HTMLScriptElement?t=f:typeof f=="object"&&("script"in f&&f.script&&(t=f.script),"timeout"in f&&f.timeout&&(o=f.timeout))),t.src||(t.src=e.url),l&&!f&&Object.keys(l).forEach(u=>{t&&(u==="async"||u==="defer"?t[u]=l[u]:t.getAttribute(u)||t.setAttribute(u,l[u]))})}let i=null,a=typeof window<"u"?l=>{if(l.filename&&tt(l.filename,e.url)){let f=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);f.name="ScriptExecutionError",i=f}}:null;a&&window.addEventListener("error",a);let c=async(l,f)=>{clearTimeout(n),a&&window.removeEventListener("error",a);let u=()=>{if(f?.type==="error"){let m=new Error(f?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);m.name="ScriptNetworkError",e?.onErrorCallback&&e?.onErrorCallback(m)}else i?e?.onErrorCallback&&e?.onErrorCallback(i):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,Mt(()=>{let{needDeleteScript:m=!0}=e;m&&t?.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){let m=l(f);if(m instanceof Promise){let h=await m;return u(),h}return u(),m}u()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),n=setTimeout(()=>{c(null,{type:"error",isTimeout:!0})},o),{script:t,needAttach:r}}function $t(e){let t=null,r=!0,o=2e4,n,s=document.getElementsByTagName("link");for(let a=0;a<s.length;a++){let c=s[a],l=c.getAttribute("href"),f=c.getAttribute("rel");if(l&&tt(l,e.url)&&f===e.attrs.rel){t=c,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let a,c=!0,l=e.attrs;e.createLinkHook&&(a=e.createLinkHook(e.url,l),a instanceof HTMLLinkElement?(t=a,c=!1):typeof a=="object"&&("link"in a&&a.link&&(t=a.link,c=!1),"timeout"in a&&a.timeout&&(o=a.timeout))),l&&c&&Object.keys(l).forEach(f=>{t&&!t.getAttribute(f)&&t.setAttribute(f,l[f])})}if(!r)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:r};let i=(a,c)=>{n&&clearTimeout(n);let l=()=>{if(c?.type==="error"){let f=new Error(c?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);f.name="LinkNetworkError",e?.onErrorCallback&&e?.onErrorCallback(f)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,Mt(()=>{let{needDeleteLink:f=!0}=e;f&&t?.parentNode&&t.parentNode.removeChild(t)}),a)){let f=a(c);return l(),f}l()};return t.onerror=i.bind(null,t.onerror),t.onload=i.bind(null,t.onload),n=setTimeout(()=>{i(null,{type:"error",isTimeout:!0})},o),{link:t,needAttach:r}}function we(e,t){let{attrs:r={},createScriptHook:o}=t;return new Promise((n,s)=>{let{script:i,needAttach:a}=rt({url:e,cb:n,onErrorCallback:s,attrs:y({fetchpriority:"high"},r),createScriptHook:o,needDeleteScript:!0});a&&document.head.appendChild(i)})}var ot=new Map;function Y(e){if(!e)throw new Error("import specifier is required");if(ot.has(e))return ot.get(e);let t=new Function("name","return import(name)")(e).then(r=>r).catch(r=>{throw console.error(`Error importing module ${e}:`,r),ot.delete(e),r});return ot.set(e,t),t}var _o=async(e,t,r)=>{let n=await((s,i)=>r.lifecycle.fetch.emit(s,i))(e,t||{});return!n||!(n instanceof Response)?fetch(e,t||{}):n},sr=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t,r,o)=>{if(o?.createScriptHook){let a=o.createScriptHook(e);a&&typeof a=="object"&&"url"in a&&(e=a.url)}let n;try{n=new URL(e)}catch(a){console.error("Error constructing URL:",a),t(new Error(`Invalid URL: ${a}`));return}let s=async()=>o?.fetch?(a,c)=>_o(a,c,o):fetch,i=async(a,c)=>{try{let f=await(await a(c.href)).text(),[u,m]=await Promise.all([Y("path"),Y("vm")]),h={exports:{},module:{exports:{}}},d=c.pathname.split("/").slice(0,-1).join("/"),p=u.basename(c.pathname),_=new m.Script(`(function(exports, module, require, __dirname, __filename) {${f}
5
+ })`,{filename:p,importModuleDynamically:m.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER??Y}),g;g=(await Y("node:module")).createRequire(c.protocol==="file:"||c.protocol==="node:"?c.href:u.join(process.cwd(),"__mf_require_base__.js")),_.runInThisContext()(h.exports,h.module,g,d,p);let E=h.module.exports||h.exports;if(r&&E&&r.globalName){t(void 0,E[r.globalName]||E);return}t(void 0,E)}catch(l){t(l instanceof Error?l:new Error(`Script execution error: ${l}`))}};s().then(async a=>{if(r?.type==="esm"||r?.type==="module")return cr(n.href,{fetch:a,vm:await Y("vm")}).then(async c=>{await c.evaluate(),t(void 0,c.namespace)}).catch(c=>{t(c instanceof Error?c:new Error(`Script execution error: ${c}`))});i(a,n)}).catch(a=>{t(a)})}:(e,t,r,o)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},Ne=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(e,t)=>new Promise((r,o)=>{sr(e,(n,s)=>{if(n)o(n);else{let i=t?.attrs?.globalName||`__FEDERATION_${t?.attrs?.name}:custom__`;r(globalThis[i]=s)}},t.attrs,t.loaderHook)}):(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")},ae=new Map,ir=e=>e.startsWith("http:")||e.startsWith("https:"),ar=e=>!e.startsWith("./")&&!e.startsWith("../")&&!e.startsWith("/")&&!e.includes(":");function So(e){let t=new URL(e),r=encodeURIComponent(t.protocol.slice(0,-1)),o=encodeURIComponent(t.host),n=t.pathname.split("/").map(i=>encodeURIComponent(i)).join("/"),s=encodeURIComponent(`${t.search}${t.hash}`);return`/${r}/${o}${n}${s?`/${s}`:""}`}function Ro(e,t){let r=t.endsWith("/")?t:`${t}/`;return new URL(`__module_federation_remote__${So(e)}`,r).href}async function Io(e){return e.startsWith("node:")?!0:ar(e)?(await Y("node:module")).builtinModules.includes(e):!1}function bo(e){let t=e&&(typeof e=="object"||typeof e=="function")?e:{default:e},r=y({},t);return Object.prototype.hasOwnProperty.call(r,"default")||(r.default=t),r}async function To(e,t,r){if(typeof r.SyntheticModule!="function")throw new Error("vm.SyntheticModule is required to load Node.js built-in modules in ESM remote entries.");let o=bo(t),n=Object.keys(o),s=new r.SyntheticModule(n,function(){for(let a of n)this.setExport(a,o[a])},{identifier:e});return ae.set(e,s),await s.link(async()=>{throw new Error(`Node.js built-in module "${e}" should not request child modules.`)}),await s.evaluate(),s}async function wo(e,t){let r=`node-builtin:${e}`;return ae.has(r)?ae.get(r):To(r,await Y(e),t)}async function nr(e,t,r){if(await Io(e))return wo(e,r.vm);if(ar(e))throw new Error(`Unsupported ESM module specifier "${e}". Only relative or absolute http(s) remote modules and Node.js built-in modules are supported.`);let o=new URL(e,t).href;if(!ir(o))throw new Error(`Unsupported ESM module specifier "${e}" resolved to "${o}". Only http(s) remote modules and Node.js built-in modules are supported.`);return cr(o,r)}async function No(e){if(e.status==="linked"&&await e.evaluate(),e.status==="errored")throw e.error;return e}async function cr(e,t){if(ae.has(e))return ae.get(e);let{fetch:r,vm:o}=t;if(!ir(e))throw new Error(`Unsupported ESM module URL "${e}". Only http(s) remote modules and Node.js built-in modules are supported.`);let n=await(await r(e)).text(),s=(await Y("node:url")).pathToFileURL(process.cwd()).href,i=new o.SourceTextModule(n,{identifier:e,initializeImportMeta:a=>{a.url=Ro(e,s)},importModuleDynamically:async a=>No(await nr(a,e,t))});return ae.set(e,i),await i.link(async a=>nr(a,e,t)),i}var Mo=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,Me=(e,t,r,o)=>{let n=[`${[t[e]]} #${e}`];return r&&n.push(`args: ${JSON.stringify(r)}`),n.push(Mo(e)),o&&n.push(`Original Error Message:
6
+ ${o}`),n.join(`
7
+ `)};function lr(e,t,r,o,n,s){return o(Me(e,t,r,n))}var Q="[ Federation Runtime ]",nt=et(Q);function N(e,t,r,o,n){e||(r!==void 0?S(t,r,o,void 0,n):S(t))}function S(e,t,r,o,n){if(t!==void 0)return lr(e,t,r??{},i=>{throw new Error(`${Q}: ${i}`)},o,n);let s=e;throw s instanceof Error?(s.message.startsWith(Q)||(s.message=`${Q}: ${s.message}`),s):new Error(`${Q}: ${s}`)}function C(e){e instanceof Error&&(e.message.startsWith(Q)||(e.message=`${Q}: ${e.message}`)),nt.warn(e)}function fr(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function X(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ce(e){return typeof e.entry<"u"}function st(e){return!e.entry.includes(".json")}function $e(e){return e&&typeof e=="object"}var $o=Object.prototype.toString;function ur(e){return $o.call(e)==="[object Object]"}function it(e){return Array.isArray(e)?e:[e]}function at(e){let t={url:"",type:"global",globalName:""};return O||_e()||!("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 mr=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};var b=typeof globalThis=="object"?globalThis:window,D=(()=>{try{return document.defaultView}catch{return b}})(),K=D;function ct(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function lt(e,t){return Object.hasOwnProperty.call(e,t)}lt(b,"__GLOBAL_LOADING_REMOTE_ENTRY__")||ct(b,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});var J=b.__GLOBAL_LOADING_REMOTE_ENTRY__;function dr(e){lt(e,"__VMOK__")&&!lt(e,"__FEDERATION__")&&ct(e,"__FEDERATION__",e.__VMOK__),lt(e,"__FEDERATION__")||(ct(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),ct(e,"__VMOK__",e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map}dr(b);dr(D);function ft(e){b.__FEDERATION__.__INSTANCES__.push(e)}function ut(){return b.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function mt(e,t=se()){t&&(b.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,b.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.8.0")}function G(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{let r=Object.keys(e);for(let o of r){let[n,s]=o.split(":"),i=`${n}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else S(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Ae=()=>D.__FEDERATION__.moduleInfo,hr=(e,t)=>{let r=G(t,X(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 o=e,{version:n}=o,s=Xe(o,["version"]),i=X(s),a=G(D.__FEDERATION__.moduleInfo,i).value;if(a?.version===n)return a}},le=e=>hr(e,D.__FEDERATION__.moduleInfo),dt=(e,t)=>{let r=X(e);return D.__FEDERATION__.moduleInfo[r]=t,D.__FEDERATION__.moduleInfo},ht=e=>(D.__FEDERATION__.moduleInfo=y(y({},D.__FEDERATION__.moduleInfo),e),()=>{let t=Object.keys(e);for(let r of t)delete D.__FEDERATION__.moduleInfo[r]}),Pe=(e,t)=>{let r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:b[r]}},At=e=>{let{__GLOBAL_PLUGIN__:t}=D.__FEDERATION__;e.forEach(r=>{t.findIndex(o=>o.name===r.name)===-1?t.push(r):C(`The plugin ${r.name} has been registered.`)})},Pt=()=>D.__FEDERATION__.__GLOBAL_PLUGIN__,vt=e=>b.__FEDERATION__.__PRELOADED_MAP__.get(e),Ot=e=>b.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);var pr="[0-9A-Za-z-]+",kt=`(?:\\+(${pr}(?:\\.${pr})*))`,ve="0|[1-9]\\d*",pt="[0-9]+",gr="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Er=`(?:${pt}|${gr})`,Ao=`(?:-?(${Er}(?:\\.${Er})*))`,yr=`(?:${ve}|${gr})`,_r=`(?:-(${yr}(?:\\.${yr})*))`,Lt=`${ve}|x|X|\\*`,fe=`[v=\\s]*(${Lt})(?:\\.(${Lt})(?:\\.(${Lt})(?:${_r})?${kt}?)?)?`,Sr=`^\\s*(${fe})\\s+-\\s+(${fe})\\s*$`,Po=`[v=\\s]*${`(${pt})\\.(${pt})\\.(${pt})`}${Ao}?${kt}?`,xt="((?:<|>)?=?)",Rr=`(\\s*)${xt}\\s*(${Po}|${fe})`,Ir="(?:~>?)",br=`(\\s*)${Ir}\\s+`,Tr="(?:\\^)",wr=`(\\s*)${Tr}\\s+`,Nr="(<|>)?=?\\s*\\*",Mr=`^${Tr}${fe}$`,vo=`v?${`(${ve})\\.(${ve})\\.(${ve})`}${_r}?${kt}?`,$r=`^${Ir}${fe}$`,Ar=`^${xt}\\s*${fe}$`,Pr=`^${xt}\\s*(${vo})$|^$`,vr="^\\s*>=\\s*0.0.0\\s*$";function B(e){return new RegExp(e)}function L(e){return!e||e.toLowerCase()==="x"||e==="*"}function Ft(...e){return t=>e.reduce((r,o)=>o(r),t)}function Dt(e){return e.match(B(Pr))}function Ht(e,t,r,o){let n=`${e}.${t}.${r}`;return o?`${n}-${o}`:n}function Or(e){return e.replace(B(Sr),(t,r,o,n,s,i,a,c,l,f,u,m)=>(L(o)?r="":L(n)?r=`>=${o}.0.0`:L(s)?r=`>=${o}.${n}.0`:r=`>=${r}`,L(l)?c="":L(f)?c=`<${Number(l)+1}.0.0-0`:L(u)?c=`<${l}.${Number(f)+1}.0-0`:m?c=`<=${l}.${f}.${u}-${m}`:c=`<=${c}`,`${r} ${c}`.trim()))}function Lr(e){return e.replace(B(Rr),"$1$2$3")}function kr(e){return e.replace(B(br),"$1~")}function xr(e){return e.replace(B(wr),"$1^")}function Fr(e){return e.trim().split(/\s+/).map(t=>t.replace(B(Mr),(r,o,n,s,i)=>L(o)?"":L(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:L(s)?o==="0"?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.0 <${Number(o)+1}.0.0-0`:i?o==="0"?n==="0"?`>=${o}.${n}.${s}-${i} <${o}.${n}.${Number(s)+1}-0`:`>=${o}.${n}.${s}-${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s}-${i} <${Number(o)+1}.0.0-0`:o==="0"?n==="0"?`>=${o}.${n}.${s} <${o}.${n}.${Number(s)+1}-0`:`>=${o}.${n}.${s} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s} <${Number(o)+1}.0.0-0`)).join(" ")}function Dr(e){return e.trim().split(/\s+/).map(t=>t.replace(B($r),(r,o,n,s,i)=>L(o)?"":L(n)?`>=${o}.0.0 <${Number(o)+1}.0.0-0`:L(s)?`>=${o}.${n}.0 <${o}.${Number(n)+1}.0-0`:i?`>=${o}.${n}.${s}-${i} <${o}.${Number(n)+1}.0-0`:`>=${o}.${n}.${s} <${o}.${Number(n)+1}.0-0`)).join(" ")}function Hr(e){return e.split(/\s+/).map(t=>t.trim().replace(B(Ar),(r,o,n,s,i,a)=>{let c=L(n),l=c||L(s),f=l||L(i);return o==="="&&f&&(o=""),a="",c?o===">"||o==="<"?"<0.0.0-0":"*":o&&f?(l&&(s=0),i=0,o===">"?(o=">=",l?(n=Number(n)+1,s=0,i=0):(s=Number(s)+1,i=0)):o==="<="&&(o="<",l?n=Number(n)+1:s=Number(s)+1),o==="<"&&(a="-0"),`${o+n}.${s}.${i}${a}`):l?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:f?`>=${n}.${s}.0${a} <${n}.${Number(s)+1}.0-0`:r})).join(" ")}function Ur(e){return e.trim().replace(B(Nr),"")}function Cr(e){return e.trim().replace(B(vr),"")}function yt(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Oo(e,t){let{preRelease:r}=e,{preRelease:o}=t;if(r===void 0&&o)return 1;if(r&&o===void 0)return-1;if(r===void 0&&o===void 0)return 0;for(let n=0,s=r.length;n<=s;n++){let i=r[n],a=o[n];if(i!==a)return i===void 0&&a===void 0?0:i?a?yt(i,a):-1:1}return 0}function Et(e,t){return yt(e.major,t.major)||yt(e.minor,t.minor)||yt(e.patch,t.patch)||Oo(e,t)}function Ut(e,t){return e.version===t.version}function Gr(e,t){switch(e.operator){case"":case"=":return Ut(e,t);case">":return Et(e,t)<0;case">=":return Ut(e,t)||Et(e,t)<0;case"<":return Et(e,t)>0;case"<=":return Ut(e,t)||Et(e,t)>0;case void 0:return!0;default:return!1}}function Lo(e){return Ft(Fr,Dr,Hr,Ur)(e)}function ko(e){return Ft(Or,Lr,kr,xr)(e.trim()).split(/\s+/).join(" ")}function ee(e,t){if(!e)return!1;let r=Dt(e);if(!r)return!1;let[,o,,n,s,i,a]=r,c={operator:o,version:Ht(n,s,i,a),major:n,minor:s,patch:i,preRelease:a?.split(".")},l=t.split("||");for(let f of l){let u=f.trim();if(!u||u==="*"||u==="x")return!0;try{let m=ko(u);if(!m.trim())return!0;let h=m.split(" ").map(_=>Lo(_)).join(" ");if(!h.trim())return!0;let d=h.split(/\s+/).map(_=>Cr(_)).filter(Boolean);if(d.length===0)continue;let p=!0;for(let _ of d){let g=Dt(_);if(!g){p=!1;break}let[,E,,M,x,P,v]=g;if(!Gr({operator:E,version:Ht(M,x,P,v),major:M,minor:x,patch:P,preRelease:v?.split(".")},c)){p=!1;break}}if(p)return!0}catch(m){console.error(`[semver] Error processing range part "${u}":`,m);continue}}return!1}var q="default",gt="global";function xo(e,t,r,o){let n;return"get"in e?n=e.get:"lib"in e?n=()=>Promise.resolve(e.lib):n=()=>Promise.resolve(()=>{S(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&S(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),R(y({deps:[],useIn:[],from:t,loading:null},e),{shareConfig:y({requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1},e.shareConfig),get:n,loaded:e?.loaded||"lib"in e?!0:void 0,version:e.version??"0",scope:Array.isArray(e.scope)?e.scope:[e.scope??"default"],strategy:(e.strategy??o)||"version-first",treeShaking:e.treeShaking?R(y({},e.treeShaking),{mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??ge.UNKNOWN,useIn:[]}):void 0})}function St(e,t){let r=t.shared||{},o=t.name,n=Object.keys(r).reduce((i,a)=>{let c=it(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(xo(l,o,a,t.shareStrategy))}),i},{}),s=y({},e.shared);return Object.keys(n).forEach(i=>{s[i]?n[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=n[i]}),{allShareInfos:s,newShareInfos:n}}function me(e,t){if(!e)return!1;let{status:r,mode:o}=e;return r===ge.NO_USE?!1:r===ge.CALCULATED?!0:o==="runtime-infer"?t?Do(e,t):!0:!1}function te(e,t){let r=o=>{if(!Number.isNaN(Number(o))){let n=o.split("."),s=o;for(let i=0;i<3-n.length;i++)s+=".0";return s}return o};return!!ee(r(e),`<=${r(t)}`)}var Oe=(e,t)=>{let r=t||function(o,n){return te(o,n)};return Object.keys(e).reduce((o,n)=>!o||r(o,n)||o==="0"?n:o,0)},_t=e=>!!e.loaded||typeof e.lib=="function",Fo=e=>!!e.loading,Do=(e,t)=>{if(!e||!t)return!1;let{usedExports:r}=e;return r?!!t.every(o=>r.includes(o)):!1};function Ho(e,t,r,o){let n=e[t][r],s="",i=me(o),a=function(c,l){return i?n[c].treeShaking?n[l].treeShaking?!_t(n[c].treeShaking)&&te(c,l):!1:!0:!_t(n[c])&&te(c,l)};if(i){if(s=Oe(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Oe(e[t][r],a),useTreesShaking:i}}var ue=e=>_t(e)||Fo(e);function Uo(e,t,r,o){let n=e[t][r],s="",i=me(o),a=function(c,l){if(i){if(!n[c].treeShaking)return!0;if(!n[l].treeShaking)return!1;if(ue(n[l].treeShaking))return ue(n[c].treeShaking)?!!te(c,l):!0;if(ue(n[c].treeShaking))return!1}return ue(n[l])?ue(n[c])?!!te(c,l):!0:ue(n[c])?!1:te(c,l)};if(i){if(s=Oe(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Oe(e[t][r],a),useTreesShaking:i}}function Co(e){return e==="loaded-first"?Uo:Ho}function Z(e,t,r,o){if(!e)return;let{shareConfig:n,scope:s=q,strategy:i,treeShaking:a}=r,c=Array.isArray(s)?s:[s];for(let l of c)if(n&&e[l]&&e[l][t]){let{requiredVersion:f}=n,{version:u,useTreesShaking:m}=Co(i)(e,l,t,a),h=()=>{let p=e[l][t][u];if(n.singleton){if(typeof f=="string"&&!ee(u,f)){let _=`Version ${u} from ${u&&p.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${f})`;n.strictVersion?S(_):C(_)}return{shared:p,useTreesShaking:m}}else{if(f===!1||f==="*")return{shared:p,useTreesShaking:m};if(ee(u,f))return{shared:p,useTreesShaking:m};let _=me(a);if(_){for(let[g,E]of Object.entries(e[l][t]))if(me(E.treeShaking,a?.usedExports)&&ee(g,f))return{shared:E,useTreesShaking:_}}for(let[g,E]of Object.entries(e[l][t]))if(ee(g,f))return{shared:E,useTreesShaking:!1}}},d={shareScopeMap:e,scope:l,pkgName:t,version:u,GlobalFederation:K.__FEDERATION__,shareInfo:r,resolver:h};return(o.emit(d)||d).resolver()}}function Le(){return K.__FEDERATION__.__SHARE__}function Ct(e){let{pkgName:t,extraOptions:r,shareInfos:o}=e,n=c=>{if(!c)return;let l={};return c.forEach(u=>{l[u.version]=u}),l[Oe(l,function(u,m){return!_t(l[u])&&te(u,m)})]},s=r?.resolver??n,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{let l={};for(let f of c)if(f)for(let[u,m]of Object.entries(f)){let h=l[u];i(h)&&i(m)?l[u]=a(h,m):m!==void 0&&(l[u]=m)}return l};return a(s(o[t]),r?.customShareInfo)}var re=(e,t)=>{e.useIn||(e.useIn=[]),fr(e.useIn,t)};function ke(e,t){return t&&e.treeShaking?e.treeShaking:e}function de(e,t){return!t||t==="."?e:`${e}/${t.replace(/^\.\//,"")}`}function xe(e,t){for(let r of e){let o=t.startsWith(r.name),n=t.replace(r.name,"");if(o){if(n.startsWith("/")){let a=r.name;return n=`.${n}`,{pkgNameOrAlias:a,expose:n,remote:r}}else if(n==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}let s=r.alias&&t.startsWith(r.alias),i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){let a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Wr(e,t){for(let r of e)if(t===r.name||r.alias&&t===r.alias)return r}var Fe="RUNTIME-001",De="RUNTIME-002",He="RUNTIME-003",Ue="RUNTIME-004",Ce="RUNTIME-005",he="RUNTIME-006",Ge="RUNTIME-007",pe="RUNTIME-008",j="RUNTIME-009",We="RUNTIME-010",Be="RUNTIME-011",Gt="RUNTIME-012",je="RUNTIME-013",Ve="RUNTIME-014",qe="RUNTIME-015",Wt="TYPE-001",Bt="BUILD-001",jt="BUILD-002";var I={[Fe]:"Failed to get remoteEntry exports.",[De]:'The remote entry interface does not contain "init"',[He]:"Failed to get manifest.",[Ue]:"Failed to locate remote.",[Ce]:"Invalid loadShareSync function call from bundler runtime",[he]:"Invalid loadShareSync function call from runtime",[Ge]:"Failed to get remote snapshot.",[pe]:"Failed to load script resources.",[j]:"Please call createInstance first.",[We]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[Be]:"The remoteEntry URL is missing from the remote snapshot.",[Gt]:'The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.',[je]:"The manifest is not a valid Module Federation manifest.",[Ve]:"The remote does not expose the requested module.",[qe]:"Remote container initialization failed."},Br={[Wt]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},jr={[Bt]:"Failed to find expose module.",[jt]:"PublicPath is required in prod mode."},Go=y(y(y({},I),Br),jr);var Vr=".then(callbacks[0]).catch(callbacks[1])";async function Wo({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Vr}`)([r,o]):import(e).then(r).catch(o)}catch(n){S(`Failed to load ESM entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}async function Bo({entry:e,remoteEntryExports:t}){return new Promise((r,o)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(o):new Function("callbacks",`System.import("${e}")${Vr}`)([r,o])}catch(n){S(`Failed to load SystemJS entry from "${e}". ${n instanceof Error?n.message:String(n)}`)}})}function qr(e,t,r){let{remoteEntryKey:o,entryExports:n}=Pe(e,t);return n||S(Fe,I,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:o}),n}async function jo({name:e,globalName:t,entry:r,remoteInfo:o,loaderHook:n,getEntryUrl:s,resourceContext:i}){let{entryExports:a}=Pe(e,t);if(a)return a;let c=s?s(r):r;return we(c,{attrs:{},createScriptHook:(l,f)=>{let u=n.lifecycle.createScript.emit({url:l,attrs:f,remoteInfo:o,resourceContext:i?R(y({},i),{url:l}):void 0});if(u&&(u instanceof HTMLScriptElement||"script"in u||"timeout"in u))return u}}).then(()=>qr(e,t,r),l=>{let f=l instanceof Error?l.message:String(l);S(pe,I,{remoteName:e,resourceUrl:c},f)})}async function Vo({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:o,resourceContext:n}){let{entry:s,entryGlobalName:i,name:a,type:c}=e;switch(c){case"esm":case"module":return Wo({entry:s,remoteEntryExports:t});case"system":return Bo({entry:s,remoteEntryExports:t});default:return jo({entry:s,globalName:i,name:a,remoteInfo:e,loaderHook:r,getEntryUrl:o,resourceContext:n})}}async function qo({remoteInfo:e,loaderHook:t,resourceContext:r}){let{entry:o,entryGlobalName:n,name:s,type:i}=e,{entryExports:a}=Pe(s,n);return a||Ne(o,{attrs:{name:s,globalName:n,type:i},loaderHook:{createScriptHook:(c,l={})=>{let f=t.lifecycle.createScript.emit({url:c,attrs:l,remoteInfo:e,resourceContext:r?R(y({},r),{url:c}):void 0});if(f&&"url"in f)return f}}}).then(()=>qr(s,n,o)).catch(c=>{S(`Failed to load Node.js entry for remote "${s}" from "${o}". ${c instanceof Error?c.message:String(c)}`)})}function Rt(e){let{entry:t,name:r}=e;return Se(r,t)}async function oe(e){let{origin:t,remoteEntryExports:r,remoteInfo:o,getEntryUrl:n,resourceContext:s,_inErrorHandling:i=!1}=e,a=Rt(o);if(r)return r;if(!J[a]){let c=t.remoteHandler.hooks.lifecycle.loadEntry,l=t.loaderHook;J[a]=c.emit({origin:t,loaderHook:l,remoteInfo:o,remoteEntryExports:r}).then(f=>f||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":O)?Vo({remoteInfo:o,remoteEntryExports:r,loaderHook:l,getEntryUrl:n,resourceContext:s}):qo({remoteInfo:o,loaderHook:l,resourceContext:s}))).then(async f=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:f}),f)).catch(async f=>{let u=Rt(o),m=f instanceof Error&&f.message.includes("ScriptExecutionError");if(f instanceof Error&&f.message.includes(pe)&&!m&&!i){let h=p=>oe(R(y({},p),{_inErrorHandling:!0})),d=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:h,origin:t,remoteInfo:o,remoteEntryExports:r,globalLoading:J,uniqueKey:u});if(d)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,remoteEntryExports:d,recovered:!0}),d}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:o,error:f}),f})}return J[a]}function V(e){return R(y({},e),{entry:"entry"in e?e.entry:"",type:e.type||gt,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||q})}function Kr(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function zr(e,t){let r=Pt(),o=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(n=>{e?.find(s=>s.name!==n.name)&&e.push(n)}),e&&e.length>0&&e.forEach(n=>{o.forEach(s=>{s.applyPlugin(n,t)})}),e}function Ko(e){return{name:e.name,alias:e.alias,entry:"entry"in e?e.entry:void 0,version:"version"in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function H(e){let t={};for(let[r,o]of Object.entries(e.shared)){let n=o[0];n&&(t[r]={version:n.version,singleton:n.shareConfig?.singleton,requiredVersion:n.shareConfig?.requiredVersion===!1?!1:n.shareConfig?.requiredVersion,eager:n.eager,strictVersion:n.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?"host":"unknown"},mfConfig:{name:e.name,remotes:e.remotes?.map(Ko)??[],shared:t}}}function qt(e){return y({resourceCategory:"sync",share:!0,depsRemote:!0},e)}function Yr(e,t){return t.map(r=>{let o=Wr(e,r.nameOrAlias);return N(o,`Unable to preload ${r.nameOrAlias} as it is not included in ${!o&&Ie({remoteInfo:o,remotes:e})}`),{remote:o,preloadConfig:qt(r)}})}function Xr(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function Kt(e){return e instanceof Error?e.message.includes("timed out")||e.name.includes("Timeout"):!1}function ne(e,t,r,o){return{url:t,status:r,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:o}}async function zo(e,t,r,o){let n=e.moduleCache.get(r.name),s=r.entry;if(n?.remoteEntryExports)return ne(o,s,"cached");try{if(!await oe({origin:e,remoteInfo:r,remoteEntryExports:n?.remoteEntryExports,resourceContext:R(y({},o),{url:s})}))throw new Error(`Failed to load remoteEntry "${s}".`);return ne(o,s,"success")}catch(i){return ne(o,s,Kt(i)?"timeout":"error",i)}}function Vt({host:e,remoteInfo:t,url:r,attrs:o,context:n,needDeleteLink:s}){return new Promise(i=>{let{link:a,needAttach:c}=$t({url:r,cb:()=>{i(ne(n,r,c?"success":"cached"))},onErrorCallback:l=>{i(ne(n,r,Kt(l)?"timeout":"error",l))},attrs:o,createLinkHook:(l,f)=>{let u=e.loaderHook.lifecycle.createLink.emit({url:l,attrs:f,remoteInfo:t,resourceContext:R(y({},n),{url:l})});return u instanceof HTMLLinkElement,u},needDeleteLink:s});c&&document.head.appendChild(a)})}function Yo({host:e,remoteInfo:t,url:r,attrs:o,context:n}){return new Promise(s=>{let{script:i,needAttach:a}=rt({url:r,cb:()=>{s(ne(n,r,a?"success":"cached"))},onErrorCallback:c=>{s(ne(n,r,Kt(c)?"timeout":"error",c))},attrs:o,createScriptHook:(c,l)=>{let f=e.loaderHook.lifecycle.createScript.emit({url:c,attrs:l,remoteInfo:t,resourceContext:R(y({},n),{url:c})});return f instanceof HTMLScriptElement,f},needDeleteScript:!0});a&&document.head.appendChild(i)})}function Ke(e,t){return R(y({},e),{resourceType:t})}function ze(e,t,r,o=!0,n={initiator:"preloadRemote",id:e.name}){let{cssAssets:s,jsAssetsWithoutEntry:i,entryAssets:a}=r,c=[];if(t.options.inBrowser){if(a.forEach(l=>{let{moduleInfo:f}=l;c.push(zo(t,e,f,Ke(n,"remoteEntry")))}),o){let l={rel:"preload",as:"style"};s.forEach(f=>{c.push(Vt({host:t,remoteInfo:e,url:f,attrs:l,context:Ke(n,"css")}))})}else{let l={rel:"stylesheet",type:"text/css"};s.forEach(f=>{c.push(Vt({host:t,remoteInfo:e,url:f,attrs:l,needDeleteLink:!1,context:Ke(n,"css")}))})}if(o){let l={rel:"preload",as:"script"};i.forEach(f=>{c.push(Vt({host:t,remoteInfo:e,url:f,attrs:l,context:Ke(n,"js")}))})}else{let l={fetchpriority:"high",type:e?.type==="module"?"module":"text/javascript"};i.forEach(f=>{c.push(Yo({host:t,remoteInfo:e,url:f,attrs:l,context:Ke(n,"js")}))})}}return Promise.all(c)}function Jo(e){if(!e||!("modules"in e)||!Array.isArray(e.modules))return;let t=e.modules.map(r=>r.moduleName).filter(Boolean);return t.length?t.join(","):void 0}function Zo(e,t,r){let o=t,n=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];n.length||n.push("default"),n.forEach(i=>{o[i]||(o[i]={})});let s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?n:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:o,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:o[n[0]],initScope:r??[]}}var Ye=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await oe({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:"loadRemote",id:de(this.remoteInfo.name,e),resourceType:"remoteEntry"}});return N(t,`remoteEntryExports is undefined
8
+ ${Ie(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,r,o){let n=await this.getEntry(o);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host}),n;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,cached:!0,origin:this.host})}catch(s){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:s,cached:!0,origin:this.host}),s}return n}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:s,shareScope:i,initScope:a}=Zo(this.remoteInfo,this.host.shareScopeMap,r),c=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:s,initScope:a,remoteInfo:this.remoteInfo,origin:this.host});typeof n?.init>"u"&&S(De,I,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,H(this.host.options));try{await n.init(c.shareScope,c.initScope,c.remoteEntryInitOptions)}catch(l){S(qe,I,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${l}`,H(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit(R(y({},c),{id:e,remoteSnapshot:t,remoteEntryExports:n})),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,origin:this.host})}catch(s){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:n,error:s,origin:this.host}),s}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,o){let{loadFactory:n=!0}=r||{loadFactory:!0},s=await this.init(e,o,void 0,t);this.lib=s,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,origin:this.host});let i;try{let l=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo});i=typeof l=="function"?l:void 0,i||(i=await s.get(t)),i||S(Ve,I,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Jo(o)},void 0,H(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,moduleFactory:i,origin:this.host})}catch(l){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:s,error:l,origin:this.host}),l}let a=mr(this.remoteInfo.name,t),c=this.wraperFactory(i,a);if(!n)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,origin:this.host});try{let l=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,exposeModule:l,origin:this.host}),l}catch(l){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:n,error:l,origin:this.host}),l}}wraperFactory(e,t){function r(o,n){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:n,enumerable:!1})}return()=>{let o=e();return o instanceof Promise?o.then(n=>(r(n,t),n)):(r(o,t),o)}}};var k=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){N(ur(e),"Plugin configuration is invalid.");let r=e.name;N(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,e.apply?.(t),Object.keys(this.lifecycle).forEach(o=>{let n=e[o];n&&this.lifecycle[o].on(n)}))}removePlugin(e){N(e,"A name is required.");let t=this.registerPlugins[e];N(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};var A=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){let t=this;this.on(function r(...o){return t.remove(r),e.apply(null,o)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(r=>{let o=r(...e);o!==void 0&&(t=o)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}};var w=class extends A{emit(...e){let t,r=Array.from(this.listeners);if(r.length>0){let o=0,n=s=>s===!1?!1:o<r.length?Promise.resolve(r[o++].apply(null,e)).then(i=>i===void 0||e.length===1&&i===e[0]?n(s):n(i)):s;t=n()}return Promise.resolve(t)}};function zt(e,t){if(!$e(t))return!1;if(e!==t){for(let r in e)if(!(r in t))return!1}return!0}var z=class extends A{constructor(e){super(),this.onerror=S,this.type=e}emit(e){$e(e)||S(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let r=t(e);if(r===void 0)continue;if(zt(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){C(r),this.onerror(r)}return e}};var F=class extends A{constructor(e){super(),this.onerror=S,this.type=e}emit(e){$e(e)||S(`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,o=s=>(C(s),this.onerror(s),e),n=s=>{if(s!==void 0&&zt(e,s))e=s;else if(s!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(r<t.length)try{return Promise.resolve(t[r++](e)).then(n,o)}catch(i){return o(i)}return e};return Promise.resolve(n(e))}return Promise.resolve(e)}};var Ee="Remote loading is disabled by experiments.optimization.disableRemote.",Jr=class{constructor(){throw new Error(Ee)}},Zr=class{constructor(){this.hooks=new k({})}formatAndRegisterRemote(){return[]}loadRemote(){throw new Error(Ee)}preloadRemote(){throw new Error(Ee)}registerRemotes(){throw new Error(Ee)}getRemoteModuleAndOptions(){throw new Error(Ee)}initRawContainer(){throw new Error(Ee)}};function Yt(e,t){let r=at(t);r.url||S(Be,I,{remoteName:e.name});let o=ie(t,r.url);!O&&!o.startsWith("http")&&(o=`https:${o}`),e.type=r.type,e.entryGlobalName=r.globalName,e.entry=o,e.version=t.version,e.buildVersion=t.buildVersion}function Qr(){return{name:"snapshot-plugin",async afterResolve(e){let{remote:t,pkgNameOrAlias:r,expose:o,origin:n,remoteInfo:s,id:i}=e;if(!ce(t)||!st(t)){let{remoteSnapshot:a,globalSnapshot:c}=await n.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:de(t.name,o)});Yt(s,a);let l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[o],resourceCategory:"sync",share:!1,depsRemote:!1}},f=await n.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:n,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return f&&ze(s,n,f,!1,{initiator:"loadRemote",id:i}).catch(()=>{}),R(y({},e),{remoteSnapshot:a})}return e}}}function Qo(e){let t=e.split(":");return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function eo(e,t,r,o,n={},s){let{value:i}=G(e,X(t)),a=s||i;if(a&&!be(a)&&(r(a,t,o),a.remotesInfo)){let c=Object.keys(a.remotesInfo);for(let l of c){if(n[l])continue;n[l]=!0;let f=Qo(l),u=a.remotesInfo[l];eo(e,{name:f.name,version:u.matchedVersion},r,!1,n,void 0)}}}var Xt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function en(e,t,r,o,n){let s=[],i=[],a=[],c=new Set,l=new Set,{options:f}=e,{preloadConfig:u}=t,{depsRemote:m}=u;if(eo(o,r,(d,p,_)=>{let g;if(_)g=u;else if(Array.isArray(m)){let v=m.find($=>$.nameOrAlias===p.name||$.nameOrAlias===p.alias);if(!v)return;g=qt(v)}else if(m===!0)g=u;else return;let E=ie(d,at(d).url);E&&a.push({name:p.name,moduleInfo:{name:p.name,entry:E,type:"remoteEntryType"in d?d.remoteEntryType:"global",entryGlobalName:"globalName"in d?d.globalName:p.name,shareScope:"",version:"version"in d?d.version:void 0},url:E});let M="modules"in d?d.modules:[],x=Xr(g.exposes);x.length&&"modules"in d&&(M=d?.modules?.reduce((v,$)=>(x?.indexOf($.moduleName)!==-1&&v.push($),v),[]));function P(v){let $=v.map(U=>ie(d,U));return g.filter?$.filter(g.filter):$}if(M){let v=M.length;for(let $=0;$<v;$++){let U=M[$],bt=`${p.name}/${U.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:U.moduleName==="."?p.name:bt,name:p.name,remoteSnapshot:d,preloadConfig:g,remote:p,origin:e}),!vt(bt)&&(g.resourceCategory==="all"?(s.push(...P(U.assets.css.async)),s.push(...P(U.assets.css.sync)),i.push(...P(U.assets.js.async)),i.push(...P(U.assets.js.sync))):g.resourceCategory==="sync"&&(s.push(...P(U.assets.css.sync)),i.push(...P(U.assets.js.sync))),Ot(bt))}}},!0,{},n),n.shared&&n.shared.length>0){let d=(p,_)=>{let{shared:g}=Z(e.shareScopeMap,_.sharedName,p,e.sharedHandler.hooks.lifecycle.resolveShare)||{};g&&typeof g.lib=="function"&&(_.assets.js.sync.forEach(E=>{c.add(E)}),_.assets.css.sync.forEach(E=>{l.add(E)}))};n.shared.forEach(p=>{let _=f.shared?.[p.sharedName];if(!_)return;let g=p.version?_.find(E=>E.version===p.version):_;g&&it(g).forEach(E=>{d(E,p)})})}let h=i.filter(d=>!c.has(d)&&!Xt("script",d));return{cssAssets:s.filter(d=>!l.has(d)&&!Xt("link",d)),jsAssetsWithoutEntry:h,entryAssets:a.filter(d=>!Xt("script",d.url))}}var to=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){let{origin:t,preloadOptions:r,remoteInfo:o,remote:n,globalSnapshot:s,remoteSnapshot:i}=e;return O?ce(n)&&st(n)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:n.name,url:n.entry,moduleInfo:{name:o.name,entry:n.entry,type:o.type||"global",entryGlobalName:"",shareScope:""}}]}:(Yt(o,i),en(t,r,o,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function Jt(e,t){let r=le({name:t.name,version:t.options.version}),o=r&&"remotesInfo"in r&&r.remotesInfo&&G(r.remotesInfo,e.name).value;return o&&o.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:Ae(),remoteSnapshot:le({name:e.name,version:o.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ae(),remoteSnapshot:le({name:e.name,version:"version"in e?e.version:void 0})}}var ro=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new k({beforeLoadRemoteSnapshot:new w("beforeLoadRemoteSnapshot"),loadSnapshot:new F("loadGlobalSnapshot"),loadRemoteSnapshot:new F("loadRemoteSnapshot"),afterLoadSnapshot:new F("afterLoadSnapshot")}),this.manifestLoading=K.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:r="loadRemote"}){let{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e,origin:this.HostInstance});let n=le({name:this.HostInstance.options.name,version:this.HostInstance.options.version});n||(n={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},ht({[this.HostInstance.options.name]:n})),n&&"remotesInfo"in n&&!G(n.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(n.remotesInfo=R(y({},n?.remotesInfo),{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));let{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}),f,u;if(c)if(be(c)){let m=O?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.loadManifestSnapshot(m,e,{},{initiator:r,id:t||e.name}),d=dt(R(y({},e),{entry:m}),h);f=h,u=d}else{let{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});f=m,u=l}else if(ce(e)){let m=await this.loadManifestSnapshot(e.entry,e,{},{initiator:r,id:t||e.name}),h=dt(e,m);f=m,u=h}else S(Ge,I,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,H(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:f}),{remoteSnapshot:f,globalSnapshot:u}}getGlobalRemoteInfo(e){return Jt(e,this.HostInstance)}async getManifestJson(e,t,r,o){return(async()=>{let s=V(t),i=this.manifestCache.get(e);if(i)return i;try{let c=await this.loaderHook.lifecycle.fetch.emit(e,{},s,o?R(y({},o),{url:e,resourceType:"manifest"}):void 0);(!c||!(c instanceof Response))&&(c=await fetch(e,{})),i=await c.json()}catch(c){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),i||(delete this.manifestLoading[e],S(He,I,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,H(this.HostInstance.options)))}let a=[!i.metaData&&"metaData",!i.exposes&&"exposes",!i.shared&&"shared"].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:new Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(", ")}.`),from:"runtime",lifecycle:"afterResolve",remote:s,origin:this.HostInstance}),a.length>0&&S(je,I,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.join(",")},void 0,H(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,r,o){let n=async()=>{let s=await this.getManifestJson(e,t,r,o),i=Nt(s,{version:e}),{remoteSnapshot:a}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:s,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return a};return this.manifestLoading[e]||(this.manifestLoading[e]=n().then(s=>s)),this.manifestLoading[e]}};var oo=class{constructor(){this.hooks=new k({})}};var no=class{constructor(e){this.hooks=new k({beforeRegisterShare:new z("beforeRegisterShare"),afterResolve:new F("afterResolve"),beforeLoadShare:new F("beforeLoadShare"),loadShare:new w,afterLoadShare:new A("afterLoadShare"),errorLoadShare:new A("errorLoadShare"),resolveShare:new z("resolveShare"),initContainerShareScopeMap:new z("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:r,selectedShared:o}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:r,selectedShared:o,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(n){C(n)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:r,error:o,recovered:n}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:o,recovered:n})}catch(s){C(s)}}registerShared(e,t){let{newShareInfos:r,allShareInfos:o}=St(e,t);return Object.keys(r).forEach(n=>{r[n].forEach(s=>{s.scope.forEach(i=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:n,shared:s}),this.shareScopeMap[i]?.[n]||this.setShared({pkgName:n,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:o}}async loadShare(e,t){let{host:r}=this,o=Ct({pkgName:e,extraOptions:t,shareInfos:r.options.shared}),n=o;try{o?.scope&&await Promise.all(o.scope.map(async c=>{await Promise.all(this.initializeSharing(c,{strategy:o.strategy}))})),n=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:r.options.shared,origin:r})).shareInfo,N(n,`Cannot find shared "${e}" in host "${r.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=n,{shared:i,useTreesShaking:a}=Z(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(i){let c=ke(i,a);if(c.lib)return re(c,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),c.lib;if(c.loading&&!c.loaded){let l=await c.loading;return c.loaded=!0,c.lib||(c.lib=l),re(c,r.options.name),this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),l}else{let f=(async()=>{let m=await c.get();return re(c,r.options.name),c.loaded=!0,c.lib=m,m})();this.setShared({pkgName:e,loaded:!1,shared:i,from:r.options.name,lib:null,loading:f,treeShaking:a?c:void 0});let u=await f;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:i}),u}}else{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,recovered:!0}),!1;let c=me(s.treeShaking),l=ke(s,c),u=(async()=>{let h=await l.get();l.lib=h,l.loaded=!0,re(l,r.options.name);let{shared:d,useTreesShaking:p}=Z(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare)||{};if(d){let _=ke(d,p);_.lib=h,_.loaded=!0,d.from=s.from}return h})();this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:u,treeShaking:c?l:void 0});let m=await u;return this.emitAfterLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:s,selectedShared:s}),m}}catch(s){throw this.emitErrorLoadShare({lifecycle:"loadShare",pkgName:e,shareInfo:n,error:s}),s}}initializeSharing(e=q,t){let{host:r}=this,o=t?.from,n=t?.strategy,s=t?.initScope,i=[];if(o!=="build"){let{initTokens:m}=this;s||(s=[]);let h=m[e];if(h||(h=m[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}let a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});let l=a[e],f=(m,h)=>{let{version:d,eager:p}=h;l[m]=l[m]||{};let _=l[m],g=_[d]&&ke(_[d]),E=!!(g&&("eager"in g&&g.eager||"shareConfig"in g&&g.shareConfig?.eager));(!g||g.strategy!=="loaded-first"&&!g.loaded&&(!p!=!E?p:c>_[d].from))&&(_[d]=h)},u=async m=>{let{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:m}),d;try{d=await h.getEntry()}catch(p){if(d=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:m,error:p,from:"runtime",lifecycle:"beforeLoadShare",remote:h.remoteInfo,origin:r}),!d)return}finally{d?.init&&!h.initing&&(h.remoteEntryExports=d,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(m=>{r.options.shared[m].forEach(h=>{h.scope.includes(e)&&f(m,h)})}),(r.options.shareStrategy==="version-first"||n==="version-first")&&r.options.remotes.forEach(m=>{m.shareScope===e&&i.push(u(m.name))}),i}loadShareSync(e,t){let{host:r}=this,o=Ct({pkgName:e,extraOptions:t,shareInfos:r.options.shared});try{o?.scope&&o.scope.forEach(s=>{this.initializeSharing(s,{strategy:o.strategy})});let{shared:n}=Z(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(n){if(typeof n.lib=="function")return re(n,r.options.name),n.loaded||(n.loaded=!0,n.from===r.options.name&&(o.loaded=!0)),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),n.lib;if(typeof n.get=="function"){let s=n.get();if(!(s instanceof Promise))return re(n,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:s,shared:n}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:n}),s}}if(o.lib)return o.loaded||(o.loaded=!0),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib;if(o.get){let s=o.get();return s instanceof Promise&&S(t?.from==="build"?Ce:he,I,{hostName:r.options.name,sharedPkgName:e},void 0,H(r.options)),o.lib=s,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:o.lib,shared:o}),this.emitAfterLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,selectedShared:o}),o.lib}S(he,I,{hostName:r.options.name,sharedPkgName:e},void 0,H(r.options))}catch(n){throw this.emitErrorLoadShare({lifecycle:"loadShareSync",pkgName:e,shareInfo:o,error:n}),n}}initShareScopeMap(e,t,r={}){let{host:o}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:o.options,origin:o,scopeName:e,hostShareScopeMap:r.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:r,lib:o,loading:n,loaded:s,get:i,treeShaking:a}){let h=t,{version:c,scope:l="default"}=h,f=Xe(h,["version","scope"]),u=Array.isArray(l)?l:[l],m=d=>{let p=(g,E,M)=>{M&&!g[E]&&(g[E]=M)},_=a?d.treeShaking:d;p(_,"loaded",s),p(_,"loading",n),p(_,"get",i)};u.forEach(d=>{this.shareScopeMap[d]||(this.shareScopeMap[d]={}),this.shareScopeMap[d][e]||(this.shareScopeMap[d][e]={}),this.shareScopeMap[d][e][c]||(this.shareScopeMap[d][e][c]=R(y({version:c,scope:[d]},f),{lib:o}));let p=this.shareScopeMap[d][e][c];m(p),r&&p.from!==r&&(p.from=r)})}_setGlobalShareScopeMap(e){let t=Le(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};var so=class{constructor(){this.shareScopeMap={},this.hooks=new k({afterResolve:new F("afterResolve")})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}loadShareSync(){throw new Error("Shared dependency loading is disabled by experiments.optimization.disableShared.")}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}};var io=class{constructor(e){this.hooks=new k({beforeRegisterRemote:new z("beforeRegisterRemote"),registerRemote:new z("registerRemote"),beforeRequest:new F("beforeRequest"),afterMatchRemote:new w("afterMatchRemote"),onLoad:new w("onLoad"),afterLoadRemote:new w("afterLoadRemote"),handlePreloadModule:new A("handlePreloadModule"),errorLoadRemote:new w("errorLoadRemote"),beforePreloadRemote:new w("beforePreloadRemote"),generatePreloadAssets:new w("generatePreloadAssets"),afterPreloadRemote:new w("afterPreloadRemote"),loadEntry:new w}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,o)=>(this.registerRemote(o,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){let{remote:r,expose:o}=t,{name:n,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:o},s&&e.startsWith(n)){let i=e.replace(n,s);this.idToRemoteMap[i]={name:r.name,expose:o};return}if(s&&e.startsWith(s)){let i=e.replace(s,n);this.idToRemoteMap[i]={name:r.name,expose:o}}}async loadRemote(e,t){let{host:r}=this,o=xe(r.options.remotes,e),n=e,s=o?.expose,i=o?V(o.remote):void 0,a;try{let{loadFactory:c=!0}=t||{loadFactory:!0},{module:l,moduleOptions:f,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:m,remote:h,expose:d,id:p,remoteSnapshot:_}=u;n=p,s=d,i=V(h);let g=await l.get(p,d,t,_),E=await this.hooks.lifecycle.onLoad.emit({id:p,pkgNameOrAlias:m,expose:d,exposeModule:c?g:void 0,exposeModuleFactory:c?void 0:g,remote:h,options:f,moduleInstance:l,origin:r});return this.setIdToRemoteMap(e,u),a={id:n,expose:s,remote:i,options:t,origin:r},typeof E=="function"?E:g}catch(c){let{from:l="runtime"}=t||{from:"runtime"},f;try{f=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:l,lifecycle:"onLoad",expose:s,remote:i,origin:r})}catch(u){throw a={id:n,expose:s,remote:i,options:t,error:u,origin:r},u}if(!f)throw a={id:n,expose:s,remote:i,options:t,error:c,origin:r},c;return a={id:n,expose:s,remote:i,options:t,error:c,origin:r,recovered:!0},f}finally{a&&await this.hooks.lifecycle.afterLoadRemote.emit(a)}}async preloadRemote(e){let{host:t}=this,r=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let o=Yr(t.options.remotes,e),n=a=>{let{preloadConfig:c,remote:l}=a,f=c.exposes||[];return f.length?f.map(u=>({ops:R(y({},a),{preloadConfig:R(y({},c),{exposes:[u]})}),id:de(l.name,u)})):[{ops:a,id:`${l.name}/*`}]},s;await Promise.all(o.flatMap(n).map(async a=>{let{ops:c,id:l}=a,{remote:f,preloadConfig:u}=c,m=V(f);try{let{globalSnapshot:h,remoteSnapshot:d}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:f,id:l,initiator:"preloadRemote"}),p=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:c,remote:f,remoteInfo:m,globalSnapshot:h,remoteSnapshot:d});if(!p)return;let _=await ze(m,t,p,!0,{initiator:"preloadRemote",id:l});r.push({remote:f,remoteInfo:m,preloadConfig:u,id:l,results:_})}catch(h){r.push({remote:f,remoteInfo:m,preloadConfig:u,id:l,results:[{url:m.entry,status:"error",resourceType:/\.json(?:$|[?#])/i.test(m.entry)?"manifest":"remoteEntry",initiator:"preloadRemote",id:l,error:h}]})}}));let i=r.flatMap(a=>a.results.filter(c=>c.status==="error"||c.status==="timeout"));if(i.length>0&&(s=new Error(`preloadRemote failed to load ${i.length} resource(s).`),Object.assign(s,{results:r,failedResults:i})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:r,error:s}),s)throw s}registerRemotes(e,t){let{host:r}=this;e.forEach(o=>{this.registerRemote(o,r.options.remotes,{force:t?.force})})}initRawContainer(e,t,r){let{host:o}=this,n=new Ye({host:o,remoteInfo:V({name:e,entry:t})});return n.remoteEntryExports=r,o.moduleCache.set(e,n),n}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:r}=e,o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!o)throw h}let{id:n}=o,s=xe(t.options.remotes,n);if(!s)try{S(Ue,I,{hostName:t.options.name,requestId:n},void 0,H(t.options))}catch(h){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:n,options:t.options,error:h,origin:t}),h}let{remote:i}=s,a=V(i);await this.hooks.lifecycle.afterMatchRemote.emit(R(y({id:n},s),{options:t.options,remoteInfo:a,origin:t}));let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit(R(y({id:n},s),{options:t.options,origin:t,remoteInfo:a})),{remote:l,expose:f}=c;N(l&&f,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${n}.`);let u=t.moduleCache.get(l.name),m={host:t,remoteInfo:a};return u||(u=new Ye(m),t.moduleCache.set(l.name,u)),{module:u,moduleOptions:m,remoteMatchInfo:c}}registerRemote(e,t,r){let{host:o}=this,n=()=>{if(e.alias){let i=t.find(a=>e.alias&&(a.name.startsWith(e.alias)||a.alias?.startsWith(e.alias)));N(!i,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${i&&i.name} name or alias`)}"entry"in e&&O&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=q),e.type||(e.type=gt)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});let s=t.find(i=>i.name===e.name);if(!s)n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{let i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r?.force&&(this.removeRemote(s),n(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),Re(i.join(" ")))}}removeRemote(e){try{let{host:t}=this,{name:r}=e,o=t.options.remotes.findIndex(a=>a.name===r);o!==-1&&t.options.remotes.splice(o,1);let n=G(b.__FEDERATION__.moduleInfo,X(e)).key;delete b.__FEDERATION__.moduleInfo[n],"entry"in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete K.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:s}=Jt(e,t);if(s){let a=s&&"remotesInfo"in s&&s.remotesInfo&&G(s.remotesInfo,e.name).key;a&&delete s.remotesInfo[a]}let i=t.moduleCache.get(e.name);if(i){let a=i.remoteInfo,c=a.entryGlobalName;b[c]&&(Object.getOwnPropertyDescriptor(b,c)?.configurable?delete b[c]:b[c]=void 0);let l=Rt(i.remoteInfo);J[l]&&delete J[l];let f=a.buildVersion?Se(a.name,a.buildVersion):a.name,u=b.__FEDERATION__.__INSTANCES__.findIndex(m=>a.buildVersion?m.options.id===f:m.name===f);if(u!==-1){let m=b.__FEDERATION__.__INSTANCES__[u];f=m.options.id||f;let h=Le(),d=!0,p=[];Object.keys(h).forEach(_=>{let g=h[_];g&&Object.keys(g).forEach(E=>{let M=g[E];M&&Object.keys(M).forEach(x=>{let P=M[x];P&&Object.keys(P).forEach(v=>{let $=P[v];$&&typeof $=="object"&&$.from===a.name&&($.loaded||$.loading?($.useIn=$.useIn.filter(U=>U!==a.name),$.useIn.length?d=!1:p.push([_,E,x,v])):p.push([_,E,x,v]))})})})}),d&&(m.shareScopeMap={},delete h[f]),p.forEach(([_,g,E,M])=>{delete h[_]?.[g]?.[E]?.[M]}),b.__FEDERATION__.__INSTANCES__.splice(u,1)}t.moduleCache.delete(e.name)}}catch(t){nt.error(`removeRemote failed: ${t instanceof Error?t.message:String(t)}`)}}};var tn=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Zt=typeof FEDERATION_OPTIMIZE_NO_REMOTE=="boolean"?!FEDERATION_OPTIMIZE_NO_REMOTE:!0,ao=typeof FEDERATION_OPTIMIZE_NO_SHARED=="boolean"?!FEDERATION_OPTIMIZE_NO_SHARED:!0,It=class{constructor(e){this.hooks=new k({beforeInit:new z("beforeInit"),init:new A,beforeInitContainer:new F("beforeInitContainer"),initContainer:new F("initContainer")}),this.version="2.8.0",this.moduleCache=new Map,this.loaderHook=new k({getModuleInfo:new A,createScript:new A,createLink:new A,fetch:new w,loadEntryError:new w,afterLoadEntry:new w("afterLoadEntry"),beforeInitRemote:new w("beforeInitRemote"),afterInitRemote:new w("afterInitRemote"),beforeGetExpose:new w("beforeGetExpose"),afterGetExpose:new w("afterGetExpose"),beforeExecuteFactory:new w("beforeExecuteFactory"),afterExecuteFactory:new w("afterExecuteFactory"),getModuleFactory:new w}),this.bridgeHook=new k({beforeBridgeRender:new A,afterBridgeRender:new A,beforeBridgeDestroy:new A,afterBridgeDestroy:new A});let t=Zt&&tn?[Qr(),to()]:[],r={id:Kr(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:O};this.name=e.name,this.options=r,this.snapshotHandler=Zt?new ro(this):new oo,this.sharedHandler=ao?new no(this):new so,this.remoteHandler=Zt?new io(this):new Zr,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...r.plugins,...e.plugins||[]]),this.options=this.formatOptions(r,e)}initOptions(e){e.name&&e.name!==this.options.name&&S(Me(We,I)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=q,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){return this.remoteHandler.initRawContainer(e,t,r)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,r={}){this.sharedHandler.initShareScopeMap(e,t,r)}formatOptions(e,t){let r=ao?St(e,t).allShareInfos:{},{userOptions:o,options:n}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(n,o),{allShareInfos:i}=this.sharedHandler.registerShared(n,o),a=[...n.plugins];o.plugins&&o.plugins.forEach(l=>{a.includes(l)||a.push(l)});let c=R(y(y({},e),t),{plugins:a,remotes:s,shared:i,id:o.id||e.id});return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){let t=zr(e,this);this.options.plugins=this.options.plugins.reduce((r,o)=>(o&&r&&!r.find(n=>n.name===o.name)&&r.push(o),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,R(y({},this.options),{shared:e}))}};var rn=typeof FEDERATION_OPTIMIZE_NO_REMOTE=="boolean"&&FEDERATION_OPTIMIZE_NO_REMOTE?Jr:Ye;function on(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function co(e,t){let r=on();return b.__FEDERATION__.__INSTANCES__.find(o=>!!(r&&o.options.id===r||o.options.name===e&&!o.options.version&&!t||o.options.name===e&&t&&o.options.version===t))}function nn(e){let t=new(ut()||It)(y({id:`${e.name}@${e.version||Date.now()}`},e));return ft(t),t}var T=null;function ef(e){let t=co(e.name,e.version),r=R(y({},e),{id:e.id||""});return t?(t.initOptions(r),T||(T=t),t):(T=nn(r),T)}function tf(...e){return N(T,j,I),T.loadRemote.apply(T,e)}function rf(...e){return N(T,j,I),T.loadShare.apply(T,e)}function of(...e){return N(T,j,I),T.loadShareSync.apply(T,e)}function nf(...e){return N(T,j,I),T.preloadRemote.apply(T,e)}function sf(...e){return N(T,j,I),T.registerRemotes.apply(T,e)}function af(...e){return N(T,j,I),T.registerPlugins.apply(T,e)}function cf(e){return e?b.__FEDERATION__.__INSTANCES__.find(e)||null:T}function lf(...e){return N(T,j,I),T.registerShared.apply(T,e)}mt(It);export{rn as Module,It as ModuleFederation,nn as createInstance,cf as getInstance,oe as getRemoteEntry,V as getRemoteInfo,ef as init,tf as loadRemote,we as loadScript,Ne as loadScriptNode,rf as loadShare,of as loadShareSync,nf as preloadRemote,At as registerGlobalPlugins,af as registerPlugins,sf as registerRemotes,lf as registerShared};
@@ -0,0 +1 @@
1
+ import{a,b}from"./chunk-U7M4GJRC.js";import"./chunk-XUJBDACP.js";import"./chunk-OW4EIMXS.js";import"./chunk-JP5QY5S6.js";import"./chunk-U4S2XPPP.js";import"./chunk-FK6H3RFT.js";import"./chunk-SYVY7IJY.js";import"./chunk-DPY4ZJSO.js";import"./chunk-T3NXAI3H.js";import"./chunk-JWVGGQEQ.js";import"./chunk-T4WJW6GR.js";import"./chunk-QXVITQOV.js";import"./chunk-I4TM4AGJ.js";import"./chunk-F6YL5NFN.js";import"./chunk-ATUZQYGW.js";import"./chunk-XCT4UKLK.js";import"./chunk-4XZ7RFFX.js";import"./chunk-YHTLTPEH.js";import"./chunk-LFSX3TZJ.js";import"./chunk-BTDKTIE6.js";import"./chunk-5CTM6JVQ.js";import"./chunk-W2HKCDVZ.js";import"./chunk-MPGDQZRI.js";import"./chunk-HOS2FAXH.js";import"./chunk-INJSG5RK.js";import"./chunk-RCWO45CI.js";import"./chunk-ZW5NV4UO.js";export{a as DVZ_MANAGE_DASHBOARDS_TAG,b as defineDvzManageDashboards};
@@ -1 +1 @@
1
- import{a,b}from"./chunk-NA6Z7CGT.js";import"./chunk-PBLP5EZH.js";import"./chunk-JP5QY5S6.js";import"./chunk-Z5FDX7CX.js";import"./chunk-FK6H3RFT.js";import"./chunk-SYVY7IJY.js";import"./chunk-DPY4ZJSO.js";import"./chunk-T3NXAI3H.js";import"./chunk-JWVGGQEQ.js";import"./chunk-T4WJW6GR.js";import"./chunk-QXVITQOV.js";import"./chunk-I4TM4AGJ.js";import"./chunk-F6YL5NFN.js";import"./chunk-ATUZQYGW.js";import"./chunk-XCT4UKLK.js";import"./chunk-4XZ7RFFX.js";import"./chunk-YHTLTPEH.js";import"./chunk-LFSX3TZJ.js";import"./chunk-BTDKTIE6.js";import"./chunk-5CTM6JVQ.js";import"./chunk-W2HKCDVZ.js";import"./chunk-MPGDQZRI.js";import"./chunk-HOS2FAXH.js";import"./chunk-INJSG5RK.js";import"./chunk-RCWO45CI.js";import"./chunk-ZW5NV4UO.js";export{a as DVZ_DASHBOARDS_TAG,b as defineDvzDashboards};
1
+ import{a,b}from"./chunk-4ZLBZZLH.js";import"./chunk-OW4EIMXS.js";import"./chunk-JP5QY5S6.js";import"./chunk-U4S2XPPP.js";import"./chunk-FK6H3RFT.js";import"./chunk-SYVY7IJY.js";import"./chunk-DPY4ZJSO.js";import"./chunk-T3NXAI3H.js";import"./chunk-JWVGGQEQ.js";import"./chunk-T4WJW6GR.js";import"./chunk-QXVITQOV.js";import"./chunk-I4TM4AGJ.js";import"./chunk-F6YL5NFN.js";import"./chunk-ATUZQYGW.js";import"./chunk-XCT4UKLK.js";import"./chunk-4XZ7RFFX.js";import"./chunk-YHTLTPEH.js";import"./chunk-LFSX3TZJ.js";import"./chunk-BTDKTIE6.js";import"./chunk-5CTM6JVQ.js";import"./chunk-W2HKCDVZ.js";import"./chunk-MPGDQZRI.js";import"./chunk-HOS2FAXH.js";import"./chunk-INJSG5RK.js";import"./chunk-RCWO45CI.js";import"./chunk-ZW5NV4UO.js";export{a as DVZ_DASHBOARDS_TAG,b as defineDvzDashboards};