iobroker.javascript 9.2.0 → 9.2.1

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 (43) hide show
  1. package/README.md +18 -9
  2. package/admin/assets/AiChatPanel-Cc1KscBJ.js +315 -0
  3. package/admin/assets/AiInlineProvider-DkgjVSFQ.js +7 -0
  4. package/admin/assets/ScriptEditor-6qrtvwPL.js +2 -0
  5. package/admin/assets/ScriptEditorVanillaMonaco-bJua4sm1.js +3 -0
  6. package/admin/assets/applyCodeEdit-BdRnbz2g.js +1 -0
  7. package/admin/assets/{index-DAkyON1r.js → index-BZxCaQhO.js} +1 -1
  8. package/admin/assets/{index-DW5CwIma.js → index-CYbVtccs.js} +132 -121
  9. package/admin/assets/index-CexrwGGC.js +986 -0
  10. package/admin/assets/{index-BI3JsAz_.js → index-DsW7vBcg.js} +1 -1
  11. package/admin/assets/inlineChatWidget-Cu6rb4Ar.js +2 -0
  12. package/admin/assets/inlineDiffController-DBLpPOe2.js +16 -0
  13. package/admin/assets/{localSharedImportMap-CqvxvyGG.js → localSharedImportMap-BCwqnmn4.js} +1 -1
  14. package/admin/assets/stateHoverProvider-CGChzV5W.js +3 -0
  15. package/admin/assets/{virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-BJ03G6Pu.js → virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DNrEsMrg.js} +2 -2
  16. package/admin/custom/assets/{index-BVwMgafs.js → index-DNKzDki_.js} +152 -152
  17. package/admin/custom/assets/{index-DsIn9jH_.js → index-NItS-TWp.js} +1 -1
  18. package/admin/{assets/index-hwplVCgv.js → custom/assets/index-sozs10Ij.js} +45 -71
  19. package/admin/custom/assets/{localSharedImportMap-C4qXtGUd.js → localSharedImportMap-BxT0VwTO.js} +1 -1
  20. package/admin/custom/assets/{virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-DFSXB0v2.js → virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Br3IlnqO.js} +2 -2
  21. package/admin/custom/customComponents.js +1 -1
  22. package/admin/jsonConfig.json +9 -9
  23. package/admin/mf-manifest.json +1 -1
  24. package/admin/remoteEntry.js +1 -1
  25. package/admin/tab.html +2 -2
  26. package/build/lib/aiProviderResolver.js +80 -0
  27. package/build/lib/aiProviderResolver.js.map +1 -0
  28. package/build/lib/anthropicAdapter.js +175 -0
  29. package/build/lib/anthropicAdapter.js.map +1 -0
  30. package/build/lib/sandbox.js +7 -2
  31. package/build/lib/sandbox.js.map +1 -1
  32. package/build/main.js +141 -107
  33. package/build/main.js.map +1 -1
  34. package/build/types.d.ts +1 -0
  35. package/docs/de/README.md +62 -4
  36. package/docs/en/README.md +62 -4
  37. package/io-package.json +68 -1
  38. package/package.json +1 -1
  39. package/admin/assets/AiChatPanel-sgt697A2.js +0 -296
  40. package/admin/assets/AiInlineProvider-Dd7eKxk4.js +0 -7
  41. package/admin/assets/ScriptEditor-CH4qJzqq.js +0 -2
  42. package/admin/assets/ScriptEditorVanillaMonaco-cB_90T0P.js +0 -1
  43. package/admin/custom/assets/index-CVIpIckw.js +0 -960
@@ -1 +1 @@
1
- import"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-DFSXB0v2.js";const a={"@iobroker/adapter-react-v5":async()=>await import("./index-CVIpIckw.js"),"@iobroker/json-config":async()=>await import("./index-BVwMgafs.js"),"@mui/icons-material":async()=>await import("./index-C0RmLaAj.js"),"@mui/material":async()=>await import("./index-BptSiKBK.js"),"@mui/x-date-pickers":async()=>await import("./index-Dp7A3XHd.js"),"date-fns":async()=>await import("./index-Bvwv5H7k.js"),leaflet:async()=>await import("./leaflet-src-k2rCV-Ix.js").then(t=>t.l),react:async()=>await import("./index-CmJ8HzSc.js").then(t=>t.i),"react-dom":async()=>await import("./index-D0iTiVVG.js").then(t=>t.i)},n={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"8.1.3",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"8.2.8",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/material"].loaded=!0;const{"@mui/material":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"date-fns":{name:"date-fns",version:"4.1.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["date-fns"].loaded=!0;const{"date-fns":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.leaflet.loaded=!0;const{leaflet:e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.react.loaded=!0;const{react:e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},u=[];export{u as usedRemotes,n as usedShared};
1
+ import"./virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Br3IlnqO.js";const a={"@iobroker/adapter-react-v5":async()=>await import("./index-sozs10Ij.js"),"@iobroker/json-config":async()=>await import("./index-DNKzDki_.js"),"@mui/icons-material":async()=>await import("./index-C0RmLaAj.js"),"@mui/material":async()=>await import("./index-BptSiKBK.js"),"@mui/x-date-pickers":async()=>await import("./index-Dp7A3XHd.js"),"date-fns":async()=>await import("./index-Bvwv5H7k.js"),leaflet:async()=>await import("./leaflet-src-k2rCV-Ix.js").then(t=>t.l),react:async()=>await import("./index-CmJ8HzSc.js").then(t=>t.i),"react-dom":async()=>await import("./index-D0iTiVVG.js").then(t=>t.i)},n={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"8.2.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/json-config":{name:"@iobroker/json-config",version:"8.3.9",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@iobroker/json-config"].loaded=!0;const{"@iobroker/json-config":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/icons-material":{name:"@mui/icons-material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/material":{name:"@mui/material",version:"6.5.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/material"].loaded=!0;const{"@mui/material":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@mui/x-date-pickers":{name:"@mui/x-date-pickers",version:"7.29.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["@mui/x-date-pickers"].loaded=!0;const{"@mui/x-date-pickers":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"date-fns":{name:"date-fns",version:"4.1.0",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["date-fns"].loaded=!0;const{"date-fns":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},leaflet:{name:"leaflet",version:"1.9.4",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.leaflet.loaded=!0;const{leaflet:e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n.react.loaded=!0;const{react:e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ConfigCustomJavascriptSet",async get(){n["react-dom"].loaded=!0;const{"react-dom":e}=a,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},u=[];export{u as usedRemotes,n as usedShared};
@@ -1,8 +1,8 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./localSharedImportMap-C4qXtGUd.js","./preload-helper-BDBacUwf.js","./virtualExposes-jSvr-kK3.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./localSharedImportMap-BxT0VwTO.js","./preload-helper-BDBacUwf.js","./virtualExposes-jSvr-kK3.js"])))=>i.map(i=>d[i]);
2
2
  import{_ as sr}from"./preload-helper-BDBacUwf.js";var ir={},ar={},Tt={},M={},D={},P={};const ln="federation-manifest.json",cn=".json",un="FEDERATION_DEBUG",j={AT:"@",HYPHEN:"-",SLASH:"/"},De={[j.AT]:"scope_",[j.HYPHEN]:"_",[j.SLASH]:"__"},fn={[De[j.AT]]:j.AT,[De[j.HYPHEN]]:j.HYPHEN,[De[j.SLASH]]:j.SLASH},dn=":",hn="mf-manifest.json",mn="mf-stats.json",_n={NPM:"npm",APP:"app"},gn="__MF_DEVTOOLS_MODULE_INFO__",pn="ENCODE_NAME_PREFIX",yn=".federation",En={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};let Sn=(function(e){return e[e.UNKNOWN=1]="UNKNOWN",e[e.CALCULATED=2]="CALCULATED",e[e.NO_USE=0]="NO_USE",e})({});P.BROWSER_LOG_KEY=un;P.ENCODE_NAME_PREFIX=pn;P.EncodedNameTransformMap=fn;P.FederationModuleManifest=ln;P.MANIFEST_EXT=cn;P.MFModuleType=_n;P.MFPrefetchCommon=En;P.MODULE_DEVTOOL_IDENTIFIER=gn;P.ManifestFileName=hn;P.NameTransformMap=De;P.NameTransformSymbol=j;P.SEPARATOR=dn;P.StatsFileName=mn;P.TEMP_DIR=yn;P.TreeShakingStatus=Sn;var lr={},re={},Ot=Object.defineProperty,bn=(e,t)=>{let r={};for(var n in e)Ot(r,n,{get:e[n],enumerable:!0});return t||Ot(r,Symbol.toStringTag,{value:"Module"}),r};re.__exportAll=bn;(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerPlugin_exports",{enumerable:!0,get:function(){return r}})})(lr);var cr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ContainerReferencePlugin_exports",{enumerable:!0,get:function(){return r}})})(cr);var ur={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ModuleFederationPlugin_exports",{enumerable:!0,get:function(){return r}})})(ur);var fr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"SharePlugin_exports",{enumerable:!0,get:function(){return r}})})(fr);var dr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ConsumeSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(dr);var hr={};(function(e){var r=re.__exportAll({});Object.defineProperty(e,"ProvideSharedPlugin_exports",{enumerable:!0,get:function(){return r}})})(hr);var J={},be={};const Rn=P,mr=!0;function _r(){return mr}function Tn(){return typeof navigator<"u"&&(navigator==null?void 0:navigator.product)==="ReactNative"}function In(){try{if(_r()&&window.localStorage)return!!localStorage.getItem(Rn.BROWSER_LOG_KEY)}catch{return!1}return!1}function $n(){return typeof process<"u"&&be&&be.FEDERATION_DEBUG?!!be.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:In()}const Nn=function(){return typeof process<"u"&&be?be:{}};J.getProcessEnv=Nn;J.isBrowserEnv=_r;J.isBrowserEnvValue=mr;J.isDebugMode=$n;J.isReactNativeEnv=Tn;var H={};const S=P,dt=J,gr="[ Federation Runtime ]",Mn=(e,t,r=S.SEPARATOR)=>{const n=e.split(r),o=dt.getProcessEnv().NODE_ENV==="development"&&t,s="*",i=a=>a.startsWith("http")||a.includes(S.MANIFEST_EXT);if(n.length>=2){let[a,...c]=n;e.startsWith(r)&&(a=n.slice(0,2).join(r),c=[o||n.slice(2).join(r)]);let l=o||c.join(r);return i(l)?{name:a,entry:l}:{name:a,version:l||s}}else if(n.length===1){const[a]=n;return o&&i(o)?{name:a,entry:o}:{name:a,version:o||s}}else throw`Invalid entry value: ${e}`},Pn=function(...e){return e.length?e.reduce((t,r)=>r?t?`${t}${S.SEPARATOR}${r}`:r:t,""):""},It=function(e,t="",r=!1){try{const n=r?".js":"";return`${t}${e.replace(new RegExp(`${S.NameTransformSymbol.AT}`,"g"),S.NameTransformMap[S.NameTransformSymbol.AT]).replace(new RegExp(`${S.NameTransformSymbol.HYPHEN}`,"g"),S.NameTransformMap[S.NameTransformSymbol.HYPHEN]).replace(new RegExp(`${S.NameTransformSymbol.SLASH}`,"g"),S.NameTransformMap[S.NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},vn=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(`${S.NameTransformMap[S.NameTransformSymbol.AT]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.AT]]).replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.SLASH]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.SLASH]]).replace(new RegExp(`${S.NameTransformMap[S.NameTransformSymbol.HYPHEN]}`,"g"),S.EncodedNameTransformMap[S.NameTransformMap[S.NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},An=(e,t)=>{if(!e)return"";let r=e;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),It(r,"__federation_expose_",t)},On=(e,t)=>e?It(e,"__federation_shared_",t):"",kn=(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?!dt.isBrowserEnv()&&!dt.isReactNativeEnv()&&"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),"")},wn=(e,t)=>{e||pr(t)},pr=e=>{throw new Error(`${gr}: ${e}`)},Fn=e=>{console.warn(`${gr}: ${e}`)};function Ln(e){try{return JSON.stringify(e,null,2)}catch{return""}}const Dn=/^([\d^=v<>~]|[*xX]$)/;function Hn(e){return Dn.test(e)}H.assert=wn;H.composeKeyWithSeparator=Pn;H.decodeName=vn;H.encodeName=It;H.error=pr;H.generateExposeFilename=An;H.generateShareFilename=On;H.getResourceUrl=kn;H.isRequiredVersion=Hn;H.parseEntry=Mn;H.safeToString=Ln;H.warn=Fn;var ue={};const ye=P,Q=(e,t)=>{if(!e)return t;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const s=o.slice(1);return s.endsWith("/")?s.slice(0,-1):s}return o})(e);return n?n.endsWith("/")?`${n}${t}`:`${n}/${t}`:t};function yr(e){return e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function Cn(e,t={}){var E,I,k;const{remotes:r={},overrides:n={},version:o}=t;let s;const i=()=>"publicPath"in e.metaData?(e.metaData.publicPath==="auto"||e.metaData.publicPath==="")&&o?yr(o):e.metaData.publicPath:e.metaData.getPublicPath,a=Object.keys(n);let c={};Object.keys(r).length||(c=((E=e.remotes)==null?void 0:E.reduce((y,N)=>{let R;const v=N.federationContainerName;return a.includes(v)?R=n[v]:"version"in N?R=N.version:R=N.entry,y[v]={matchedVersion:R},y},{}))||{}),Object.keys(r).forEach(y=>c[y]={matchedVersion:a.includes(y)?n[y]:r[y]});const{remoteEntry:{path:l,name:u,type:d},types:f={path:"",name:"",zip:"",api:""},buildInfo:{buildVersion:h},globalName:m,ssrRemoteEntry:_}=e.metaData,{exposes:g}=e;let p={version:o||"",buildVersion:h,globalName:m,remoteEntry:Q(l,u),remoteEntryType:d,remoteTypes:Q(f.path,f.name),remoteTypesZip:f.zip||"",remoteTypesAPI:f.api||"",remotesInfo:c,shared:e==null?void 0:e.shared.map(y=>({assets:y.assets,sharedName:y.name,version:y.version,usedExports:y.referenceExports||[]})),modules:g==null?void 0:g.map(y=>({moduleName:y.name,modulePath:y.path,assets:y.assets}))};if((I=e.metaData)!=null&&I.prefetchInterface){const y=e.metaData.prefetchInterface;p={...p,prefetchInterface:y}}if((k=e.metaData)!=null&&k.prefetchEntry){const{path:y,name:N,type:R}=e.metaData.prefetchEntry;p={...p,prefetchEntry:Q(y,N),prefetchEntryType:R}}if("publicPath"in e.metaData?(s={...p,publicPath:i()},typeof e.metaData.ssrPublicPath=="string"&&(s.ssrPublicPath=e.metaData.ssrPublicPath)):s={...p,getPublicPath:i()},_){const y=Q(_.path,_.name);s.ssrRemoteEntry=y,s.ssrRemoteEntryType=_.type||"commonjs-module"}return s}function qn(e){return!!("remoteEntry"in e&&e.remoteEntry.includes(ye.MANIFEST_EXT))}function Gn(e){if(!e)return{statsFileName:ye.StatsFileName,manifestFileName:ye.ManifestFileName};let t=typeof e=="boolean"?"":e.filePath||"",r=typeof e=="boolean"?"":e.fileName||"";const n=".json",o=a=>a.endsWith(n)?a:`${a}${n}`,s=(a,c)=>a.replace(n,`${c}${n}`),i=r?o(r):ye.ManifestFileName;return{statsFileName:Q(t,r?s(i,"-stats"):ye.StatsFileName),manifestFileName:Q(t,i)}}ue.generateSnapshotFromManifest=Cn;ue.getManifestFileName=Gn;ue.inferAutoPublicPath=yr;ue.isManifestProvider=qn;ue.simpleJoinRemoteEntry=Q;var fe={};const kt=J,Er="[ Module Federation ]",ge=console,Un=["logger.ts","logger.js","captureStackTrace","Logger.emit","Logger.log","Logger.info","Logger.warn","Logger.error","Logger.debug"];function Wn(){try{const e=new Error().stack;if(!e)return;const[,...t]=e.split(`
3
3
  `),r=t.filter(n=>!Un.some(o=>n.includes(o)));return r.length?`Stack trace:
4
4
  ${r.slice(0,5).join(`
5
5
  `)}`:void 0}catch{return}}var Sr=class{constructor(e,t=ge){this.prefix=e,this.delegate=t??ge}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??ge}emit(e,t){const r=this.delegate,n=kt.isDebugMode()?Wn():void 0,o=n?[...t,n]: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(const i of s){const a=r[i];if(typeof a=="function"){a.call(r,this.prefix,...o);return}}for(const i of s){const a=ge[i];if(typeof a=="function"){a.call(ge,this.prefix,...o);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){kt.isDebugMode()&&this.emit("debug",e)}};function br(e){return new Sr(e)}function Rr(e){const t=new Sr(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}function Bn(e,t,r){if(e.__mf_infrastructure_logger__&&t!=null&&t.getInfrastructureLogger)try{const n=t.getInfrastructureLogger(r);n&&typeof n=="object"&&(typeof n.log=="function"||typeof n.info=="function"||typeof n.warn=="function"||typeof n.error=="function")&&e.setDelegate(n)}catch{e.setDelegate(void 0)}}const jn=br(Er),Vn=Rr(Er);fe.bindLoggerToCompiler=Bn;fe.createInfrastructureLogger=Rr;fe.createLogger=br;fe.infrastructureLogger=Vn;fe.logger=jn;var de={};const Xn=H;async function $t(e,t){try{return await e()}catch(r){!t&&Xn.warn(r);return}}function Ue(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function Tr(e){let t=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let l=0;l<s.length;l++){const u=s[l],d=u.getAttribute("src");if(d&&Ue(d,e.url)){t=u,r=!1;break}}if(!t){const l=e.attrs;t=document.createElement("script"),t.type=(l==null?void 0:l.type)==="module"?"module":"text/javascript";let u;e.createScriptHook&&(u=e.createScriptHook(e.url,e.attrs),u instanceof HTMLScriptElement?t=u:typeof u=="object"&&("script"in u&&u.script&&(t=u.script),"timeout"in u&&u.timeout&&(n=u.timeout))),t.src||(t.src=e.url),l&&!u&&Object.keys(l).forEach(d=>{t&&(d==="async"||d==="defer"?t[d]=l[d]:t.getAttribute(d)||t.setAttribute(d,l[d]))})}let i=null;const a=typeof window<"u"?l=>{if(l.filename&&Ue(l.filename,e.url)){const u=new Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${l.message} (${l.filename}:${l.lineno}:${l.colno})`);u.name="ScriptExecutionError",i=u}}:null;a&&window.addEventListener("error",a);const c=async(l,u)=>{clearTimeout(o),a&&window.removeEventListener("error",a);const d=()=>{if((u==null?void 0:u.type)==="error"){const f=new Error(`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);f.name="ScriptNetworkError",e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(f))}else i?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,$t(()=>{const{needDeleteScript:f=!0}=e;f&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),l&&typeof l=="function")){const f=l(u);if(f instanceof Promise){const h=await f;return d(),h}return d(),f}d()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),o=setTimeout(()=>{c(null,new Error(`Remote script "${e.url}" time-outed.`))},n),{script:t,needAttach:r}}function xn(e){let t=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s<n.length;s++){const i=n[s],a=i.getAttribute("href"),c=i.getAttribute("rel");if(a&&Ue(a,e.url)&&c===e.attrs.rel){t=i,r=!1;break}}if(!t){t=document.createElement("link"),t.setAttribute("href",e.url);let s;const i=e.attrs;e.createLinkHook&&(s=e.createLinkHook(e.url,i),s instanceof HTMLLinkElement&&(t=s)),i&&!s&&Object.keys(i).forEach(a=>{t&&!t.getAttribute(a)&&t.setAttribute(a,i[a])})}const o=(s,i)=>{const a=()=>{(i==null?void 0:i.type)==="error"?e!=null&&e.onErrorCallback&&(e==null||e.onErrorCallback(i)):e!=null&&e.cb&&(e==null||e.cb())};if(t&&(t.onerror=null,t.onload=null,$t(()=>{const{needDeleteLink:c=!0}=e;c&&t!=null&&t.parentNode&&t.parentNode.removeChild(t)}),s)){const c=s(i);return a(),c}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),{link:t,needAttach:r}}function Kn(e,t){const{attrs:r={},createScriptHook:n}=t;return new Promise((o,s)=>{const{script:i,needAttach:a}=Tr({url:e,cb:o,onErrorCallback:s,attrs:{fetchpriority:"high",...r},createScriptHook:n,needDeleteScript:!0});a&&document.head.appendChild(i)})}de.createLink=xn;de.createScript=Tr;de.isStaticResourcesEqual=Ue;de.loadScript=Kn;de.safeWrapper=$t;var Nt={};const Yn=(e,t,r,n)=>{t(new Error("createScriptNode is disabled in non-Node.js environment"))},zn=(e,t)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};Nt.createScriptNode=Yn;Nt.loadScriptNode=zn;var Ir={};function Jn(e,t,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return e?t:!1;if(n===!0)return t;if(n&&typeof n=="object")return{...t,...n};throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}Ir.normalizeOptions=Jn;var $r={};const Zn=e=>e;$r.createModuleFederationConfig=Zn;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P,r=lr,n=cr,o=ur,s=fr,i=dr,a=hr,c=J,l=H,u=ue,d=fe,f=de,h=Nt,m=Ir,_=$r;e.BROWSER_LOG_KEY=t.BROWSER_LOG_KEY,e.ENCODE_NAME_PREFIX=t.ENCODE_NAME_PREFIX,e.EncodedNameTransformMap=t.EncodedNameTransformMap,e.FederationModuleManifest=t.FederationModuleManifest,e.MANIFEST_EXT=t.MANIFEST_EXT,e.MFModuleType=t.MFModuleType,e.MFPrefetchCommon=t.MFPrefetchCommon,e.MODULE_DEVTOOL_IDENTIFIER=t.MODULE_DEVTOOL_IDENTIFIER,e.ManifestFileName=t.ManifestFileName,e.NameTransformMap=t.NameTransformMap,e.NameTransformSymbol=t.NameTransformSymbol,e.SEPARATOR=t.SEPARATOR,e.StatsFileName=t.StatsFileName,e.TEMP_DIR=t.TEMP_DIR,e.TreeShakingStatus=t.TreeShakingStatus,e.assert=l.assert,e.bindLoggerToCompiler=d.bindLoggerToCompiler,e.composeKeyWithSeparator=l.composeKeyWithSeparator,Object.defineProperty(e,"consumeSharedPlugin",{enumerable:!0,get:function(){return i.ConsumeSharedPlugin_exports}}),Object.defineProperty(e,"containerPlugin",{enumerable:!0,get:function(){return r.ContainerPlugin_exports}}),Object.defineProperty(e,"containerReferencePlugin",{enumerable:!0,get:function(){return n.ContainerReferencePlugin_exports}}),e.createInfrastructureLogger=d.createInfrastructureLogger,e.createLink=f.createLink,e.createLogger=d.createLogger,e.createModuleFederationConfig=_.createModuleFederationConfig,e.createScript=f.createScript,e.createScriptNode=h.createScriptNode,e.decodeName=l.decodeName,e.encodeName=l.encodeName,e.error=l.error,e.generateExposeFilename=l.generateExposeFilename,e.generateShareFilename=l.generateShareFilename,e.generateSnapshotFromManifest=u.generateSnapshotFromManifest,e.getManifestFileName=u.getManifestFileName,e.getProcessEnv=c.getProcessEnv,e.getResourceUrl=l.getResourceUrl,e.inferAutoPublicPath=u.inferAutoPublicPath,e.infrastructureLogger=d.infrastructureLogger,e.isBrowserEnv=c.isBrowserEnv,e.isBrowserEnvValue=c.isBrowserEnvValue,e.isDebugMode=c.isDebugMode,e.isManifestProvider=u.isManifestProvider,e.isReactNativeEnv=c.isReactNativeEnv,e.isRequiredVersion=l.isRequiredVersion,e.isStaticResourcesEqual=f.isStaticResourcesEqual,e.loadScript=f.loadScript,e.loadScriptNode=h.loadScriptNode,e.logger=d.logger,Object.defineProperty(e,"moduleFederationPlugin",{enumerable:!0,get:function(){return o.ModuleFederationPlugin_exports}}),e.normalizeOptions=m.normalizeOptions,e.parseEntry=l.parseEntry,Object.defineProperty(e,"provideSharedPlugin",{enumerable:!0,get:function(){return a.ProvideSharedPlugin_exports}}),e.safeToString=l.safeToString,e.safeWrapper=f.safeWrapper,Object.defineProperty(e,"sharePlugin",{enumerable:!0,get:function(){return s.SharePlugin_exports}}),e.simpleJoinRemoteEntry=u.simpleJoinRemoteEntry,e.warn=l.warn})(D);var Nr={},Mt={};const Qn=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split("-")[0].toLowerCase()}#${e.toLowerCase()}`,eo=(e,t,r,n)=>{const o=[`${[t[e]]} #${e}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(Qn(e)),n&&o.push(`Original Error Message:
6
6
  ${n}`),o.join(`
7
7
  `)};Mt.getShortErrorMsg=eo;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mt;function r(n,o,s,i,a,c){return i(t.getShortErrorMsg(n,o,s,a))}e.logAndReport=r})(Nr);let to=D,ro=Nr;const ee="[ Federation Runtime ]",ht=(0,to.createLogger)(ee);function no(e,t,r,n,o){e||(r!==void 0?mt(t,r,n,void 0,o):mt(t))}function mt(e,t,r,n,o){if(t!==void 0)return(0,ro.logAndReport)(e,t,r??{},i=>{throw new Error(`${ee}: ${i}`)},n,o);const s=e;throw s instanceof Error?(s.message.startsWith(ee)||(s.message=`${ee}: ${s.message}`),s):new Error(`${ee}: ${s}`)}function oo(e){e instanceof Error&&(e.message.startsWith(ee)||(e.message=`${ee}: ${e.message}`)),ht.warn(e)}M.assert=no;M.error=mt;M.logger=ht;M.warn=oo;var $={};const so=M;let wt=D;function io(e,t){return e.findIndex(r=>r===t)===-1&&e.push(t),e}function ao(e){return"version"in e&&e.version?`${e.name}:${e.version}`:"entry"in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function lo(e){return typeof e.entry<"u"}function co(e){return!e.entry.includes(".json")}async function uo(e,t){try{return await e()}catch(r){!t&&so.warn(r);return}}function fo(e){return e&&typeof e=="object"}const Mr=Object.prototype.toString;function ho(e){return Mr.call(e)==="[object Object]"}function mo(e,t){const r=/^(https?:)?\/\//i;return e.replace(r,"").replace(/\/$/,"")===t.replace(r,"").replace(/\/$/,"")}function _o(e){return Array.isArray(e)?e:[e]}function go(e){const t={url:"",type:"global",globalName:""};return wt.isBrowserEnvValue||(0,wt.isReactNativeEnv)()||!("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}const po=(e,t)=>{let r;return e.endsWith("/")?r=e.slice(0,-1):r=e,t.startsWith(".")&&(t=t.slice(1)),r=r+t,r};$.addUniqueItem=io;$.arrayOptions=_o;$.getFMId=ao;$.getRemoteEntryInfoFromSnapshot=go;$.isObject=fo;$.isPlainObject=ho;$.isPureRemoteEntry=co;$.isRemoteInfoWithEntry=lo;$.isStaticResourcesEqual=mo;$.objectToString=Mr;$.processModuleAlias=po;$.safeWrapper=uo;var b={};const Pr=M,_t=$;let yo=D;const O=typeof globalThis=="object"?globalThis:window,C=(()=>{try{return document.defaultView}catch{return O}})(),Eo=C;function He(e,t,r){Object.defineProperty(e,t,{value:r,configurable:!1,writable:!0})}function Ce(e,t){return Object.hasOwnProperty.call(e,t)}Ce(O,"__GLOBAL_LOADING_REMOTE_ENTRY__")||He(O,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const gt=O.__GLOBAL_LOADING_REMOTE_ENTRY__;function vr(e){Ce(e,"__VMOK__")&&!Ce(e,"__FEDERATION__")&&He(e,"__FEDERATION__",e.__VMOK__),Ce(e,"__FEDERATION__")||(He(e,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),He(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}vr(O);vr(C);function So(){O.__FEDERATION__.__GLOBAL_PLUGIN__=[],O.__FEDERATION__.__INSTANCES__=[],O.__FEDERATION__.moduleInfo={},O.__FEDERATION__.__SHARE__={},O.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(gt).forEach(e=>{delete gt[e]})}function bo(e){O.__FEDERATION__.__INSTANCES__.push(e)}function Ro(){return O.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function To(e,t=(0,yo.isDebugMode)()){t&&(O.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,O.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="2.2.2")}function pt(e,t){if(typeof t=="string"){if(e[t])return{value:e[t],key:t};{const r=Object.keys(e);for(const n of r){const[o,s]=n.split(":"),i=`${o}:${t}`,a=e[i];if(a)return{value:a,key:i}}return{value:void 0,key:t}}}else Pr.error(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}const Io=()=>C.__FEDERATION__.moduleInfo,Ar=(e,t)=>{const r=pt(t,_t.getFMId(e)).value;if(r&&!r.version&&"version"in e&&e.version&&(r.version=e.version),r)return r;if("version"in e&&e.version){const{version:n,...o}=e,s=_t.getFMId(o),i=pt(C.__FEDERATION__.moduleInfo,s).value;if((i==null?void 0:i.version)===n)return i}},$o=e=>Ar(e,C.__FEDERATION__.moduleInfo),No=(e,t)=>{const r=_t.getFMId(e);return C.__FEDERATION__.moduleInfo[r]=t,C.__FEDERATION__.moduleInfo},Mo=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{const t=Object.keys(e);for(const r of t)delete C.__FEDERATION__.moduleInfo[r]}),Po=(e,t)=>{const r=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:r,entryExports:O[r]}},vo=e=>{const{__GLOBAL_PLUGIN__:t}=C.__FEDERATION__;e.forEach(r=>{t.findIndex(n=>n.name===r.name)===-1?t.push(r):Pr.warn(`The plugin ${r.name} has been registered.`)})},Ao=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Oo=e=>O.__FEDERATION__.__PRELOADED_MAP__.get(e),ko=e=>O.__FEDERATION__.__PRELOADED_MAP__.set(e,!0);b.CurrentGlobal=O;b.Global=Eo;b.addGlobalSnapshot=Mo;b.getGlobalFederationConstructor=Ro;b.getGlobalHostPlugins=Ao;b.getGlobalSnapshot=Io;b.getGlobalSnapshotInfoByModuleInfo=$o;b.getInfoWithoutType=pt;b.getPreloaded=Oo;b.getRemoteEntryExports=Po;b.getTargetSnapshotInfoByModuleInfo=Ar;b.globalLoading=gt;b.nativeGlobal=C;b.registerGlobalPlugins=vo;b.resetFederationGlobalInfo=So;b.setGlobalFederationConstructor=To;b.setGlobalFederationInstance=bo;b.setGlobalSnapshotInfoByModuleInfo=No;b.setPreloaded=ko;var Pt={},ne={},W={};const Ft="[0-9A-Za-z-]+",vt=`(?:\\+(${Ft}(?:\\.${Ft})*))`,Re="0|[1-9]\\d*",qe="[0-9]+",Or="\\d*[a-zA-Z-][a-zA-Z0-9-]*",Lt=`(?:${qe}|${Or})`,wo=`(?:-?(${Lt}(?:\\.${Lt})*))`,Dt=`(?:${Re}|${Or})`,kr=`(?:-(${Dt}(?:\\.${Dt})*))`,ze=`${Re}|x|X|\\*`,ce=`[v=\\s]*(${ze})(?:\\.(${ze})(?:\\.(${ze})(?:${kr})?${vt}?)?)?`,Fo=`^\\s*(${ce})\\s+-\\s+(${ce})\\s*$`,Lo=`[v=\\s]*${`(${qe})\\.(${qe})\\.(${qe})`}${wo}?${vt}?`,At="((?:<|>)?=?)",Do=`(\\s*)${At}\\s*(${Lo}|${ce})`,wr="(?:~>?)",Ho=`(\\s*)${wr}\\s+`,Fr="(?:\\^)",Co=`(\\s*)${Fr}\\s+`,qo="(<|>)?=?\\s*\\*",Go=`^${Fr}${ce}$`,Uo=`v?${`(${Re})\\.(${Re})\\.(${Re})`}${kr}?${vt}?`,Wo=`^${wr}${ce}$`,Bo=`^${At}\\s*${ce}$`,jo=`^${At}\\s*(${Uo})$|^$`,Vo="^\\s*>=\\s*0.0.0\\s*$";W.caret=Go;W.caretTrim=Co;W.comparator=jo;W.comparatorTrim=Do;W.gte0=Vo;W.hyphenRange=Fo;W.star=qo;W.tilde=Wo;W.tildeTrim=Ho;W.xRange=Bo;const Xo=W;function Lr(e){return new RegExp(e)}function xo(e){return!e||e.toLowerCase()==="x"||e==="*"}function Ko(...e){return t=>e.reduce((r,n)=>n(r),t)}function Yo(e){return e.match(Lr(Xo.comparator))}function zo(e,t,r,n){const o=`${e}.${t}.${r}`;return n?`${o}-${n}`:o}ne.combineVersion=zo;ne.extractComparator=Yo;ne.isXVersion=xo;ne.parseRegex=Lr;ne.pipe=Ko;var V={};const x=W,T=ne;function Jo(e){return e.replace(T.parseRegex(x.hyphenRange),(t,r,n,o,s,i,a,c,l,u,d,f)=>(T.isXVersion(n)?r="":T.isXVersion(o)?r=`>=${n}.0.0`:T.isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,T.isXVersion(l)?c="":T.isXVersion(u)?c=`<${Number(l)+1}.0.0-0`:T.isXVersion(d)?c=`<${l}.${Number(u)+1}.0-0`:f?c=`<=${l}.${u}.${d}-${f}`:c=`<=${c}`,`${r} ${c}`.trim()))}function Zo(e){return e.replace(T.parseRegex(x.comparatorTrim),"$1$2$3")}function Qo(e){return e.replace(T.parseRegex(x.tildeTrim),"$1~")}function es(e){return e.replace(T.parseRegex(x.caretTrim),"$1^")}function ts(e){return e.trim().split(/\s+/).map(t=>t.replace(T.parseRegex(x.caret),(r,n,o,s,i)=>T.isXVersion(n)?"":T.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:T.isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:i?n==="0"?o==="0"?`>=${n}.${o}.${s}-${i} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${i} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${s} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${Number(n)+1}.0.0-0`)).join(" ")}function rs(e){return e.trim().split(/\s+/).map(t=>t.replace(T.parseRegex(x.tilde),(r,n,o,s,i)=>T.isXVersion(n)?"":T.isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:T.isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:i?`>=${n}.${o}.${s}-${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function ns(e){return e.split(/\s+/).map(t=>t.trim().replace(T.parseRegex(x.xRange),(r,n,o,s,i,a)=>{const c=T.isXVersion(o),l=c||T.isXVersion(s),u=l||T.isXVersion(i);return n==="="&&u&&(n=""),a="",c?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(l&&(s=0),i=0,n===">"?(n=">=",l?(o=Number(o)+1,s=0,i=0):(s=Number(s)+1,i=0)):n==="<="&&(n="<",l?o=Number(o)+1:s=Number(s)+1),n==="<"&&(a="-0"),`${n+o}.${s}.${i}${a}`):l?`>=${o}.0.0${a} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${a} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function os(e){return e.trim().replace(T.parseRegex(x.star),"")}function ss(e){return e.trim().replace(T.parseRegex(x.gte0),"")}V.parseCaretTrim=es;V.parseCarets=ts;V.parseComparatorTrim=Zo;V.parseGTE0=ss;V.parseHyphen=Jo;V.parseStar=os;V.parseTildeTrim=Qo;V.parseTildes=rs;V.parseXRanges=ns;var Dr={};function Ge(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function is(e,t){const{preRelease:r}=e,{preRelease:n}=t;if(r===void 0&&n)return 1;if(r&&n===void 0)return-1;if(r===void 0&&n===void 0)return 0;for(let o=0,s=r.length;o<=s;o++){const i=r[o],a=n[o];if(i!==a)return i===void 0&&a===void 0?0:i?a?Ge(i,a):-1:1}return 0}function ke(e,t){return Ge(e.major,t.major)||Ge(e.minor,t.minor)||Ge(e.patch,t.patch)||is(e,t)}function Je(e,t){return e.version===t.version}function as(e,t){switch(e.operator){case"":case"=":return Je(e,t);case">":return ke(e,t)<0;case">=":return Je(e,t)||ke(e,t)<0;case"<":return ke(e,t)>0;case"<=":return Je(e,t)||ke(e,t)>0;case void 0:return!0;default:return!1}}Dr.compare=as;const ae=ne,X=V,ls=Dr;function cs(e){return ae.pipe(X.parseCarets,X.parseTildes,X.parseXRanges,X.parseStar)(e)}function us(e){return ae.pipe(X.parseHyphen,X.parseComparatorTrim,X.parseTildeTrim,X.parseCaretTrim)(e.trim()).split(/\s+/).join(" ")}function fs(e,t){if(!e)return!1;const r=ae.extractComparator(e);if(!r)return!1;const[,n,,o,s,i,a]=r,c={operator:n,version:ae.combineVersion(o,s,i,a),major:o,minor:s,patch:i,preRelease:a==null?void 0:a.split(".")},l=t.split("||");for(const u of l){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const f=us(d);if(!f.trim())return!0;const h=f.split(" ").map(g=>cs(g)).join(" ");if(!h.trim())return!0;const m=h.split(/\s+/).map(g=>X.parseGTE0(g)).filter(Boolean);if(m.length===0)continue;let _=!0;for(const g of m){const p=ae.extractComparator(g);if(!p){_=!1;break}const[,E,,I,k,y,N]=p;if(!ls.compare({operator:E,version:ae.combineVersion(I,k,y,N),major:I,minor:k,patch:y,preRelease:N==null?void 0:N.split(".")},c)){_=!1;break}}if(_)return!0}catch(f){console.error(`[semver] Error processing range part "${d}":`,f);continue}}return!1}Pt.satisfy=fs;var q={},oe={};const ds="default",hs="global";oe.DEFAULT_REMOTE_TYPE=hs;oe.DEFAULT_SCOPE=ds;const We=M,Hr=$,Cr=b,ms=oe,Ee=Pt;let yt=D;function _s(e,t,r,n){var s,i;let o;return"get"in e?o=e.get:"lib"in e?o=()=>Promise.resolve(e.lib):o=()=>Promise.resolve(()=>{We.error(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),(s=e.shareConfig)!=null&&s.eager&&((i=e.treeShaking)!=null&&i.mode)&&We.error(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:o,loaded:e!=null&&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??n)||"version-first",treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??"server-calc",status:e.treeShaking.status??yt.TreeShakingStatus.UNKNOWN,useIn:[]}:void 0}}function gs(e,t){const r=t.shared||{},n=t.name,o=Object.keys(r).reduce((i,a)=>{const c=Hr.arrayOptions(r[a]);return i[a]=i[a]||[],c.forEach(l=>{i[a].push(_s(l,n,a,t.shareStrategy))}),i},{}),s={...e.shared};return Object.keys(o).forEach(i=>{s[i]?o[i].forEach(a=>{s[i].find(c=>c.version===a.version)||s[i].push(a)}):s[i]=o[i]}),{allShareInfos:s,newShareInfos:o}}function Te(e,t){if(!e)return!1;const{status:r,mode:n}=e;return r===yt.TreeShakingStatus.NO_USE?!1:r===yt.TreeShakingStatus.CALCULATED?!0:n==="runtime-infer"?t?ys(e,t):!0:!1}function te(e,t){const r=n=>{if(!Number.isNaN(Number(n))){const o=n.split(".");let s=n;for(let i=0;i<3-o.length;i++)s+=".0";return s}return n};return!!Ee.satisfy(r(e),`<=${r(t)}`)}const Ie=(e,t)=>{const r=t||function(n,o){return te(n,o)};return Object.keys(e).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},Be=e=>!!e.loaded||typeof e.lib=="function",ps=e=>!!e.loading,ys=(e,t)=>{if(!e||!t)return!1;const{usedExports:r}=e;return r?!!t.every(n=>r.includes(n)):!1};function Es(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){return i?o[c].treeShaking?o[l].treeShaking?!Be(o[c].treeShaking)&&te(c,l):!1:!0:!Be(o[c])&&te(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}const se=e=>Be(e)||ps(e);function Ss(e,t,r,n){const o=e[t][r];let s="",i=Te(n);const a=function(c,l){if(i){if(!o[c].treeShaking)return!0;if(!o[l].treeShaking)return!1;if(se(o[l].treeShaking))return se(o[c].treeShaking)?!!te(c,l):!0;if(se(o[c].treeShaking))return!1}return se(o[l])?se(o[c])?!!te(c,l):!0:se(o[c])?!1:te(c,l)};if(i){if(s=Ie(e[t][r],a),s)return{version:s,useTreesShaking:i};i=!1}return{version:Ie(e[t][r],a),useTreesShaking:i}}function bs(e){return e==="loaded-first"?Ss:Es}function Rs(e,t,r,n){if(!e)return;const{shareConfig:o,scope:s=ms.DEFAULT_SCOPE,strategy:i,treeShaking:a}=r,c=Array.isArray(s)?s:[s];for(const l of c)if(o&&e[l]&&e[l][t]){const{requiredVersion:u}=o,{version:d,useTreesShaking:f}=bs(i)(e,l,t,a),h=()=>{const _=e[l][t][d];if(o.singleton){if(typeof u=="string"&&!Ee.satisfy(d,u)){const g=`Version ${d} from ${d&&_.from} of shared singleton module ${t} does not satisfy the requirement of ${r.from} which needs ${u})`;o.strictVersion?We.error(g):We.warn(g)}return{shared:_,useTreesShaking:f}}else{if(u===!1||u==="*")return{shared:_,useTreesShaking:f};if(Ee.satisfy(d,u))return{shared:_,useTreesShaking:f};const g=Te(a);if(g){for(const[p,E]of Object.entries(e[l][t]))if(Te(E.treeShaking,a==null?void 0:a.usedExports)&&Ee.satisfy(p,u))return{shared:E,useTreesShaking:g}}for(const[p,E]of Object.entries(e[l][t]))if(Ee.satisfy(p,u))return{shared:E,useTreesShaking:!1}}},m={shareScopeMap:e,scope:l,pkgName:t,version:d,GlobalFederation:Cr.Global.__FEDERATION__,shareInfo:r,resolver:h};return(n.emit(m)||m).resolver()}}function Ts(){return Cr.Global.__FEDERATION__.__SHARE__}function Is(e){const{pkgName:t,extraOptions:r,shareInfos:n}=e,o=c=>{if(!c)return;const l={};return c.forEach(d=>{l[d.version]=d}),l[Ie(l,function(d,f){return!Be(l[d])&&te(d,f)})]},s=(r==null?void 0:r.resolver)??o,i=c=>c!==null&&typeof c=="object"&&!Array.isArray(c),a=(...c)=>{const l={};for(const u of c)if(u)for(const[d,f]of Object.entries(u)){const h=l[d];i(h)&&i(f)?l[d]=a(h,f):f!==void 0&&(l[d]=f)}return l};return a(s(n[t]),r==null?void 0:r.customShareInfo)}const $s=(e,t)=>{e.useIn||(e.useIn=[]),Hr.addUniqueItem(e.useIn,t)};function Ns(e,t){return t&&e.treeShaking?e.treeShaking:e}q.addUseIn=$s;q.directShare=Ns;q.formatShareConfigs=gs;q.getGlobalShareScope=Ts;q.getRegisteredShare=Rs;q.getTargetSharedOptions=Is;q.shouldUseTreeShaking=Te;var he={};function Ms(e,t){for(const r of e){const n=t.startsWith(r.name);let o=t.replace(r.name,"");if(n){if(o.startsWith("/")){const a=r.name;return o=`.${o}`,{pkgNameOrAlias:a,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&t.startsWith(r.alias);let i=r.alias&&t.replace(r.alias,"");if(r.alias&&s){if(i&&i.startsWith("/")){const a=r.alias;return i=`.${i}`,{pkgNameOrAlias:a,expose:i,remote:r}}else if(i==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function Ps(e,t){for(const r of e)if(t===r.name||r.alias&&t===r.alias)return r}he.matchRemote=Ps;he.matchRemoteWithNameAndExpose=Ms;var K={},Y={},F={};const vs="RUNTIME-001",As="RUNTIME-002",Os="RUNTIME-003",ks="RUNTIME-004",ws="RUNTIME-005",Fs="RUNTIME-006",Ls="RUNTIME-007",Ds="RUNTIME-008",Hs="RUNTIME-009",Cs="RUNTIME-010",qs="RUNTIME-011",Gs="TYPE-001",Us="BUILD-001",Ws="BUILD-002";F.BUILD_001=Us;F.BUILD_002=Ws;F.RUNTIME_001=vs;F.RUNTIME_002=As;F.RUNTIME_003=Os;F.RUNTIME_004=ks;F.RUNTIME_005=ws;F.RUNTIME_006=Fs;F.RUNTIME_007=Ls;F.RUNTIME_008=Ds;F.RUNTIME_009=Hs;F.RUNTIME_010=Cs;F.RUNTIME_011=qs;F.TYPE_001=Gs;var Me={};const L=F,qr={[L.RUNTIME_001]:"Failed to get remoteEntry exports.",[L.RUNTIME_002]:'The remote entry interface does not contain "init"',[L.RUNTIME_003]:"Failed to get manifest.",[L.RUNTIME_004]:"Failed to locate remote.",[L.RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[L.RUNTIME_006]:"Invalid loadShareSync function call from runtime",[L.RUNTIME_007]:"Failed to get remote snapshot.",[L.RUNTIME_008]:"Failed to load script resources.",[L.RUNTIME_009]:"Please call createInstance first.",[L.RUNTIME_010]:'The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.',[L.RUNTIME_011]:"The remoteEntry URL is missing from the remote snapshot."},Gr={[L.TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},Ur={[L.BUILD_001]:"Failed to find expose module.",[L.BUILD_002]:"PublicPath is required in prod mode."},Bs={...qr,...Gr,...Ur};Me.buildDescMap=Ur;Me.errorDescMap=Bs;Me.runtimeDescMap=qr;Me.typeDescMap=Gr;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F,r=Mt,n=Me;e.BUILD_001=t.BUILD_001,e.BUILD_002=t.BUILD_002,e.RUNTIME_001=t.RUNTIME_001,e.RUNTIME_002=t.RUNTIME_002,e.RUNTIME_003=t.RUNTIME_003,e.RUNTIME_004=t.RUNTIME_004,e.RUNTIME_005=t.RUNTIME_005,e.RUNTIME_006=t.RUNTIME_006,e.RUNTIME_007=t.RUNTIME_007,e.RUNTIME_008=t.RUNTIME_008,e.RUNTIME_009=t.RUNTIME_009,e.RUNTIME_010=t.RUNTIME_010,e.RUNTIME_011=t.RUNTIME_011,e.TYPE_001=t.TYPE_001,e.buildDescMap=n.buildDescMap,e.errorDescMap=n.errorDescMap,e.getShortErrorMsg=r.getShortErrorMsg,e.runtimeDescMap=n.runtimeDescMap,e.typeDescMap=n.typeDescMap})(Y);const Ve=M,le=b,Ht=oe;let Wr=D,$e=Y;const Br=".then(callbacks[0]).catch(callbacks[1])";async function js({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${e}")${Br}`)([r,n]):import(e).then(r).catch(n)}catch(o){Ve.error(`Failed to load ESM entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}async function Vs({entry:e,remoteEntryExports:t}){return new Promise((r,n)=>{try{t?r(t):typeof __system_context__>"u"?System.import(e).then(r).catch(n):new Function("callbacks",`System.import("${e}")${Br}`)([r,n])}catch(o){Ve.error(`Failed to load SystemJS entry from "${e}". ${o instanceof Error?o.message:String(o)}`)}})}function Xs(e,t,r){const{remoteEntryKey:n,entryExports:o}=le.getRemoteEntryExports(e,t);return o||Ve.error($e.RUNTIME_001,$e.runtimeDescMap,{remoteName:e,remoteEntryUrl:r,remoteEntryKey:n}),o}async function xs({name:e,globalName:t,entry:r,loaderHook:n,getEntryUrl:o}){const{entryExports:s}=le.getRemoteEntryExports(e,t);if(s)return s;const i=o?o(r):r;return(0,Wr.loadScript)(i,{attrs:{},createScriptHook:(a,c)=>{const l=n.lifecycle.createScript.emit({url:a,attrs:c});if(l&&(l instanceof HTMLScriptElement||"script"in l||"timeout"in l))return l}}).then(()=>Xs(e,t,r),a=>{const c=a instanceof Error?a.message:String(a);Ve.error($e.RUNTIME_008,$e.runtimeDescMap,{remoteName:e,resourceUrl:i},c)})}async function Ks({remoteInfo:e,remoteEntryExports:t,loaderHook:r,getEntryUrl:n}){const{entry:o,entryGlobalName:s,name:i,type:a}=e;switch(a){case"esm":case"module":return js({entry:o,remoteEntryExports:t});case"system":return Vs({entry:o,remoteEntryExports:t});default:return xs({entry:o,globalName:s,name:i,loaderHook:r,getEntryUrl:n})}}function Et(e){const{entry:t,name:r}=e;return(0,Wr.composeKeyWithSeparator)(r,t)}async function jr(e){const{origin:t,remoteEntryExports:r,remoteInfo:n,getEntryUrl:o,_inErrorHandling:s=!1}=e,i=Et(n);if(r)return r;if(!le.globalLoading[i]){const a=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;le.globalLoading[i]=a.emit({loaderHook:c,remoteInfo:n,remoteEntryExports:r}).then(l=>l||Ks({remoteInfo:n,remoteEntryExports:r,loaderHook:c,getEntryUrl:o})).catch(async l=>{const u=Et(n),d=l instanceof Error&&l.message.includes("ScriptExecutionError");if(l instanceof Error&&l.message.includes($e.RUNTIME_008)&&!d&&!s){const f=m=>jr({...m,_inErrorHandling:!0}),h=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:f,origin:t,remoteInfo:n,remoteEntryExports:r,globalLoading:le.globalLoading,uniqueKey:u});if(h)return h}throw l})}return le.globalLoading[i]}function Ys(e){return{...e,entry:"entry"in e?e.entry:"",type:e.type||Ht.DEFAULT_REMOTE_TYPE,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||Ht.DEFAULT_SCOPE}}K.getRemoteEntry=jr;K.getRemoteEntryUniqueKey=Et;K.getRemoteInfo=Ys;var Vr={};function zs(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}Vr.getBuilderId=zs;var Xr={};const Js=b;function Zs(e,t){const r=Js.getGlobalHostPlugins(),n=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return r.length>0&&r.forEach(o=>{e!=null&&e.find(s=>s.name!==o.name)&&e.push(o)}),e&&e.length>0&&e.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,t)})}),e}Xr.registerPlugins=Zs;var Pe={};function Qs(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 ei(e){var r,n,o,s,i,a;const t={};for(const[c,l]of Object.entries(e.shared)){const u=l[0];u&&(t[c]={version:u.version,singleton:(r=u.shareConfig)==null?void 0:r.singleton,requiredVersion:((n=u.shareConfig)==null?void 0:n.requiredVersion)===!1?!1:(o=u.shareConfig)==null?void 0:o.requiredVersion,eager:u.eager,strictVersion:(s=u.shareConfig)==null?void 0:s.strictVersion})}return{project:{name:e.name,mfRole:((i=e.remotes)==null?void 0:i.length)>0?"host":"unknown"},mfConfig:{name:e.name,remotes:((a=e.remotes)==null?void 0:a.map(Qs))??[],shared:t}}}Pe.optionsToMFContext=ei;var xr={},Z={};const ti=M,ri=he,Ct=K;let Se=D;function Kr(e){return{resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1,...e}}function ni(e,t){return t.map(r=>{const n=ri.matchRemote(e,r.nameOrAlias);return ti.assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&(0,Se.safeToString)({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Kr(r)}})}function oi(e){return e?e.map(t=>t==="."?t:t.startsWith("./")?t.replace("./",""):t):[]}function si(e,t,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:i}=r;if(t.options.inBrowser){if(i.forEach(a=>{const{moduleInfo:c}=a,l=t.moduleCache.get(e.name);l?Ct.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:l.remoteEntryExports}):Ct.getRemoteEntry({origin:t,remoteInfo:c,remoteEntryExports:void 0})}),n){const a={rel:"preload",as:"style"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={rel:"stylesheet",type:"text/css"};o.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h},needDeleteLink:!1});u&&document.head.appendChild(l)})}if(n){const a={rel:"preload",as:"script"};s.forEach(c=>{const{link:l,needAttach:u}=(0,Se.createLink)({url:c,cb:()=>{},attrs:a,createLinkHook:(d,f)=>{const h=t.loaderHook.lifecycle.createLink.emit({url:d,attrs:f});if(h instanceof HTMLLinkElement)return h}});u&&document.head.appendChild(l)})}else{const a={fetchpriority:"high",type:(e==null?void 0:e.type)==="module"?"module":"text/javascript"};s.forEach(c=>{const{script:l,needAttach:u}=(0,Se.createScript)({url:c,cb:()=>{},attrs:a,createScriptHook:(d,f)=>{const h=t.loaderHook.lifecycle.createScript.emit({url:d,attrs:f});if(h instanceof HTMLScriptElement)return h},needDeleteScript:!0});u&&document.head.appendChild(l)})}}}Z.defaultPreloadArgs=Kr;Z.formatPreloadArgs=ni;Z.normalizePreloadExposes=oi;Z.preloadAssets=si;const w=b,qt=q,ii=he,ai=K,li=Z,ci={getRegisteredShare:qt.getRegisteredShare,getGlobalShareScope:qt.getGlobalShareScope},ui={Global:w.Global,nativeGlobal:w.nativeGlobal,resetFederationGlobalInfo:w.resetFederationGlobalInfo,setGlobalFederationInstance:w.setGlobalFederationInstance,getGlobalFederationConstructor:w.getGlobalFederationConstructor,setGlobalFederationConstructor:w.setGlobalFederationConstructor,getInfoWithoutType:w.getInfoWithoutType,getGlobalSnapshot:w.getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo:w.getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo:w.getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo:w.setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot:w.addGlobalSnapshot,getRemoteEntryExports:w.getRemoteEntryExports,registerGlobalPlugins:w.registerGlobalPlugins,getGlobalHostPlugins:w.getGlobalHostPlugins,getPreloaded:w.getPreloaded,setPreloaded:w.setPreloaded};var fi={global:ui,share:ci,utils:{matchRemoteWithNameAndExpose:ii.matchRemoteWithNameAndExpose,preloadAssets:li.preloadAssets,getRemoteInfo:ai.getRemoteInfo}};xr.default=fi;var Xe={};const Ze=M,Gt=$,di=K,hi=Pe;let mi=D,Ut=Y;function _i(e,t,r){const n=t,o=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];o.length||o.push("default"),o.forEach(i=>{n[i]||(n[i]={})});const s={version:e.version||"",shareScopeKeys:Array.isArray(e.shareScope)?o:e.shareScope||"default"};return Object.defineProperty(s,"shareScopeMap",{value:n,enumerable:!1}),{remoteEntryInitOptions:s,shareScope:n[o[0]],initScope:r??[]}}var gi=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;const e=await di.getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports});return Ze.assert(e,`remoteEntryExports is undefined
8
- ${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&Ze.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Ze.assert(i,`${Gt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Gt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Xe.Module=gi;var Yr={},me={},pi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const 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()}};me.SyncHook=pi;var ve={};const yi=me;var Ei=class extends yi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):s;t=o()}return Promise.resolve(t)}};ve.AsyncHook=Ei;var _e={};const Qe=M,zr=$,Si=me;function Jr(e,t){if(!zr.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var bi=class extends Si.SyncHook{constructor(e){super(),this.onerror=Qe.error,this.type=e}emit(e){zr.isObject(e)||Qe.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(Jr(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){Qe.warn(r),this.onerror(r)}return e}};_e.SyncWaterfallHook=bi;_e.checkReturnData=Jr;var Ae={};const et=M,Ri=$,Ti=me,Ii=_e;var $i=class extends Ti.SyncHook{constructor(e){super(),this.onerror=et.error,this.type=e}emit(e){Ri.isObject(e)||et.error(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(et.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}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)}};Ae.AsyncWaterfallHook=$i;var Oe={};const we=M,Ni=$;var Mi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var n;we.assert(Ni.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;we.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,(n=e.apply)==null||n.call(e,t),Object.keys(this.lifecycle).forEach(o=>{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};Oe.PluginSystem=Mi;var xe={};const Pi=M,St=$,vi=Z;let Wt=D,Bt=Y;function Zr(e,t){const r=St.getRemoteEntryInfoFromSnapshot(t);r.url||Pi.error(Bt.RUNTIME_011,Bt.runtimeDescMap,{remoteName:e.name});let n=(0,Wt.getResourceUrl)(t,r.url);!Wt.isBrowserEnvValue&&!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 Ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!St.isRemoteInfoWithEntry(t)||!St.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Zr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&vi.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Zr;xe.snapshotPlugin=Ai;var Qr={};const Ne=$,bt=b,Oi=q,jt=Z,ki=xe;let je=D;function wi(e){const 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 en(e,t,r,n,o={},s){const{value:i}=bt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,je.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=wi(l),d=a.remotesInfo[l];en(e,{name:u.name,version:d.matchedVersion},r,!1,o,void 0)}}}const tt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(en(n,r,(m,_,g)=>{var N;let p;if(g)p=d;else if(Array.isArray(f)){const R=f.find(v=>v.nameOrAlias===_.name||v.nameOrAlias===_.alias);if(!R)return;p=jt.defaultPreloadArgs(R)}else if(f===!0)p=d;else return;const E=(0,je.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);E&&a.push({name:_.name,moduleInfo:{name:_.name,entry:E,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:E});let I="modules"in m?m.modules:[];const k=jt.normalizePreloadExposes(p.exposes);k.length&&"modules"in m&&(I=(N=m==null?void 0:m.modules)==null?void 0:N.reduce((R,v)=>((k==null?void 0:k.indexOf(v.moduleName))!==-1&&R.push(v),R),[]));function y(R){const v=R.map(B=>(0,je.getResourceUrl)(m,B));return p.filter?v.filter(p.filter):v}if(I){const R=I.length;for(let v=0;v<R;v++){const B=I[v],Ye=`${_.name}/${B.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:B.moduleName==="."?_.name:Ye,name:_.name,remoteSnapshot:m,preloadConfig:p,remote:_,origin:e}),!bt.getPreloaded(Ye)&&(p.resourceCategory==="all"?(s.push(...y(B.assets.css.async)),s.push(...y(B.assets.css.sync)),i.push(...y(B.assets.js.async)),i.push(...y(B.assets.js.sync))):p.resourceCategory==="sync"&&(s.push(...y(B.assets.css.sync)),i.push(...y(B.assets.js.sync))),bt.setPreloaded(Ye))}}},!0,{},o),o.shared&&o.shared.length>0){const m=(_,g)=>{const{shared:p}=Oi.getRegisteredShare(e.shareScopeMap,g.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};p&&typeof p.lib=="function"&&(g.assets.js.sync.forEach(E=>{c.add(E)}),g.assets.css.sync.forEach(E=>{l.add(E)}))};o.shared.forEach(_=>{var E;const g=(E=u.shared)==null?void 0:E[_.sharedName];if(!g)return;const p=_.version?g.find(I=>I.version===_.version):g;p&&Ne.arrayOptions(p).forEach(I=>{m(I,_)})})}const h=i.filter(m=>!c.has(m)&&!tt("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!tt("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!tt("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return je.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ki.assignRemoteInfo(n,i),Fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Qr.generatePreloadAssetsPlugin=Li;var Ke={};const rt=M,Di=$,U=b,Vt=Pe,Hi=ve,nt=Ae,Ci=Oe;let ot=D,Fe=Y;function tn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var qi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ci.PluginSystem({beforeLoadRemoteSnapshot:new Hi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new nt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new nt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new nt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,d;if(c)if((0,ot.isManifestProvider)(c)){const f=ot.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(f,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:f},h);u=h,d=m}else{const{remoteSnapshot:f}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=f,d=l}else if(Di.isRemoteInfoWithEntry(e)){const f=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,f),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});u=m,d=h}else rt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return tn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],rt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return rt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ot.generateSnapshotFromManifest)(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]=o().then(s=>s)),this.manifestLoading[e]}};Ke.SnapshotHandler=qi;Ke.getGlobalRemoteInfo=tn;var rn={};const st=M,Gi=oe,A=q,Xt=Pe,Ui=ve,it=_e,xt=Ae,Wi=Oe;let pe=Y;var Bi=class{constructor(e){this.hooks=new Wi.PluginSystem({beforeRegisterShare:new it.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Ui.AsyncHook,resolveShare:new it.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new it.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=A.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),(a=this.shareScopeMap[i])!=null&&a[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});st.assert(o,`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.`);const{shared:s,useTreesShaking:i}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=A.directShare(s,i);if(a.lib)return A.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),A.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return A.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t!=null&&t.customShareInfo)return!1;const a=A.shouldUseTreeShaking(o.treeShaking),c=A.directShare(o,a),u=(async()=>{const d=await c.get();c.lib=d,c.loaded=!0,A.addUseIn(c,r.options.name);const{shared:f,useTreesShaking:h}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(f){const m=A.directShare(f,h);m.lib=d,m.loaded=!0,f.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(n!=="build"){const{initTokens:f}=this;s||(s=[]);let h=f[e];if(h||(h=f[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(f,h)=>{var I;const{version:m,eager:_}=h;l[f]=l[f]||{};const g=l[f],p=g[m]&&A.directShare(g[m]),E=!!(p&&("eager"in p&&p.eager||"shareConfig"in p&&((I=p.shareConfig)!=null&&I.eager)));(!p||p.strategy!=="loaded-first"&&!p.loaded&&(!_!=!E?_:c>g[m].from))&&(g[m]=h)},d=async f=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:f});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:f,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(f=>{r.options.shared[f].forEach(h=>{h.scope.includes(e)&&u(f,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(f=>{f.shareScope===e&&i.push(d(f.name))}),i}loadShareSync(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=A.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return A.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return A.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&st.error((t==null?void 0:t.from)==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}st.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{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:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,d=Array.isArray(l)?l:[l],f=h=>{const m=(g,p,E)=>{E&&!g[p]&&(g[p]=E)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];f(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=A.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};rn.SharedHandler=Bi;var nn={};const Le=M,G=b,Kt=oe,ji=q,Vi=he,at=K,Xi=Pe,Yt=Z,xi=Xe,Ki=me,ie=ve,zt=_e,Yi=Ae,zi=Oe,Ji=Ke;let lt=D,Jt=Y;var Zi=class{constructor(e){this.hooks=new zi.PluginSystem({beforeRegisterRemote:new zt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new zt.SyncWaterfallHook("registerRemote"),beforeRequest:new Yi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ki.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:d}=i,f=await o.get(u,l,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:f}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Yt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=at.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Yt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Vi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(Jt.RUNTIME_004,Jt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=at.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(l.name);const f={host:t,remoteInfo:a};return d||(d=new xi.Module(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});Le.assert(!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&&lt.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Kt.DEFAULT_SCOPE),e.type||(e.type=Kt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,lt.warn)(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(i=>i.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,a=i.entryGlobalName;G.CurrentGlobal[a]&&((t=Object.getOwnPropertyDescriptor(G.CurrentGlobal,a))!=null&&t.configurable?delete G.CurrentGlobal[a]:G.CurrentGlobal[a]=void 0);const c=at.getRemoteEntryUniqueKey(s.remoteInfo);G.globalLoading[c]&&delete G.globalLoading[c],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?(0,lt.composeKeyWithSeparator)(i.name,i.buildVersion):i.name;const u=G.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>i.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=G.CurrentGlobal.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const h=ji.getGlobalShareScope();let m=!0;const _=[];Object.keys(h).forEach(g=>{const p=h[g];p&&Object.keys(p).forEach(E=>{const I=p[E];I&&Object.keys(I).forEach(k=>{const y=I[k];y&&Object.keys(y).forEach(N=>{const R=y[N];R&&typeof R=="object"&&R.from===i.name&&(R.loaded||R.loading?(R.useIn=R.useIn.filter(v=>v!==i.name),R.useIn.length?m=!1:_.push([g,E,k,N])):_.push([g,E,k,N]))})})})}),m&&(f.shareScopeMap={},delete h[l]),_.forEach(([g,p,E,I])=>{var k,y,N;(N=(y=(k=h[g])==null?void 0:k[p])==null?void 0:y[E])==null||delete N[I]}),G.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Ji.getGlobalRemoteInfo(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&G.getInfoWithoutType(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],G.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete G.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Le.logger.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};nn.RemoteHandler=Zi;const Qi=M,ea=oe,ta=q,ra=Vr,na=Xr,oa=K,sa=Xe,z=me,ct=ve,ia=_e,Zt=Ae,ut=Oe,aa=xe,la=Qr,ca=Ke,ua=rn,fa=nn;let da=D,ft=Y;const ha=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ma=class{constructor(e){this.hooks=new ut.PluginSystem({beforeInit:new ia.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new Zt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Zt.AsyncWaterfallHook("initContainer")}),this.version="2.2.2",this.moduleCache=new Map,this.loaderHook=new ut.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ct.AsyncHook,loadEntryError:new ct.AsyncHook,getModuleFactory:new ct.AsyncHook}),this.bridgeHook=new ut.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=ha?[aa.snapshotPlugin(),la.generatePreloadAssetsPlugin()]:[],r={id:ra.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:da.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ca.SnapshotHandler(this),this.sharedHandler=new ua.SharedHandler(this),this.remoteHandler=new fa.RemoteHandler(this),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&&Qi.error((0,ft.getShortErrorMsg)(ft.RUNTIME_010,ft.runtimeDescMap)),this.registerPlugins(e.plugins);const 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=ea.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=oa.getRemoteInfo({name:e,entry:t}),o=new sa.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}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){const{allShareInfos:r}=ta.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=na.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Yr.ModuleFederation=ma;var on={},sn={},Qt=Object.defineProperty,_a=(e,t)=>{let r={};for(var n in e)Qt(r,n,{get:e[n],enumerable:!0});return t||Qt(r,Symbol.toStringTag,{value:"Module"}),r};sn.__exportAll=_a;(function(e){var r=sn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(on);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=$,n=b,o=Pt,s=q,i=he,a=K,c=xr,l=Xe,u=Yr,d=on;let f=D;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return f.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return f.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(Tt);let ga=Tt;function pa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=pa();return ga.CurrentGlobal.__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))}ar.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ar;let r=Tt,n=Y;function o(_){const g=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(g),g}let s=null;function i(_){const g=t.getGlobalFederationInstance(_.name,_.version);return g?(g.initOptions(_),s||(s=g),g):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=f,e.registerRemotes=d,e.registerShared=m})(ir);const an="__mf_init____mf__virtual/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__.js__";let Rt=globalThis[an];if(!Rt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Rt=globalThis[an]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ea=Rt.initResolve,er={},tr="default",rr="ConfigCustomJavascriptSet";let nr,or;async function Sa(){return nr??=sr(()=>import("./localSharedImportMap-C4qXtGUd.js"),__vite__mapDeps([0,1]),import.meta.url),nr}async function ba(){return or??=sr(()=>import("./virtualExposes-jSvr-kK3.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.default??e),or}async function Ta(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Sa(),o=ir.init({name:rr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=er[tr];if(s||(s=er[tr]={from:rr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ea(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return o}}async function Ia(e){const t=await ba();if(!(e in t))throw new Error(`Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{ir as d,Ia as g,Ta as i};
8
+ ${(0,mi.safeToString)(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async init(e,t,r){const n=await this.getEntry();if(this.inited)return n;if(this.initPromise)return await this.initPromise,n;this.initing=!0,this.initPromise=(async()=>{const{remoteEntryInitOptions:o,shareScope:s,initScope:i}=_i(this.remoteInfo,this.host.shareScopeMap,r),a=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:s,remoteEntryInitOptions:o,initScope:i,remoteInfo:this.remoteInfo,origin:this.host});typeof(n==null?void 0:n.init)>"u"&&Ze.error(Ut.RUNTIME_002,Ut.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,hi.optionsToMFContext(this.host.options)),await n.init(a.shareScope,a.initScope,a.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit({...a,id:e,remoteSnapshot:t,remoteEntryExports:n}),this.inited=!0})();try{await this.initPromise}finally{this.initing=!1,this.initPromise=void 0}return n}async get(e,t,r,n){const{loadFactory:o=!0}=r||{loadFactory:!0},s=await this.init(e,n);this.lib=s;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:s,expose:t,moduleInfo:this.remoteInfo}),i||(i=await s.get(t)),Ze.assert(i,`${Gt.getFMId(this.remoteInfo)} remote don't export ${t}.`);const a=Gt.processModuleAlias(this.remoteInfo.name,t),c=this.wraperFactory(i,a);return o?await c():c}wraperFactory(e,t){function r(n,o){n&&typeof n=="object"&&Object.isExtensible(n)&&!Object.getOwnPropertyDescriptor(n,Symbol.for("mf_module_id"))&&Object.defineProperty(n,Symbol.for("mf_module_id"),{value:o,enumerable:!1})}return e instanceof Promise?async()=>{const n=await e();return r(n,t),n}:()=>{const n=e();return r(n,t),n}}};Xe.Module=gi;var Yr={},me={},pi=class{constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const 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()}};me.SyncHook=pi;var ve={};const yi=me;var Ei=class extends yi.SyncHook{emit(...e){let t;const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=s=>s===!1?!1:n<r.length?Promise.resolve(r[n++].apply(null,e)).then(o):s;t=o()}return Promise.resolve(t)}};ve.AsyncHook=Ei;var _e={};const Qe=M,zr=$,Si=me;function Jr(e,t){if(!zr.isObject(t))return!1;if(e!==t){for(const r in e)if(!(r in t))return!1}return!0}var bi=class extends Si.SyncHook{constructor(e){super(),this.onerror=Qe.error,this.type=e}emit(e){zr.isObject(e)||Qe.error(`The data for the "${this.type}" hook should be an object.`);for(const t of this.listeners)try{const r=t(e);if(Jr(e,r))e=r;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(r){Qe.warn(r),this.onerror(r)}return e}};_e.SyncWaterfallHook=bi;_e.checkReturnData=Jr;var Ae={};const et=M,Ri=$,Ti=me,Ii=_e;var $i=class extends Ti.SyncHook{constructor(e){super(),this.onerror=et.error,this.type=e}emit(e){Ri.isObject(e)||et.error(`The response data for the "${this.type}" hook must be an object.`);const t=Array.from(this.listeners);if(t.length>0){let r=0;const n=s=>(et.warn(s),this.onerror(s),e),o=s=>{if(Ii.checkReturnData(e,s)){if(e=s,r<t.length)try{return Promise.resolve(t[r++](e)).then(o,n)}catch(i){return n(i)}}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)}};Ae.AsyncWaterfallHook=$i;var Oe={};const we=M,Ni=$;var Mi=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){var n;we.assert(Ni.isPlainObject(e),"Plugin configuration is invalid.");const r=e.name;we.assert(r,"A name must be provided by the plugin."),this.registerPlugins[r]||(this.registerPlugins[r]=e,(n=e.apply)==null||n.call(e,t),Object.keys(this.lifecycle).forEach(o=>{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){we.assert(e,"A name is required.");const t=this.registerPlugins[e];we.assert(t,`The plugin "${e}" is not registered.`),Object.keys(t).forEach(r=>{r!=="name"&&this.lifecycle[r].remove(t[r])})}};Oe.PluginSystem=Mi;var xe={};const Pi=M,St=$,vi=Z;let Wt=D,Bt=Y;function Zr(e,t){const r=St.getRemoteEntryInfoFromSnapshot(t);r.url||Pi.error(Bt.RUNTIME_011,Bt.runtimeDescMap,{remoteName:e.name});let n=(0,Wt.getResourceUrl)(t,r.url);!Wt.isBrowserEnvValue&&!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 Ai(){return{name:"snapshot-plugin",async afterResolve(e){const{remote:t,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:i}=e;if(!St.isRemoteInfoWithEntry(t)||!St.isPureRemoteEntry(t)){const{remoteSnapshot:a,globalSnapshot:c}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:i});Zr(s,a);const l={remote:t,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:l,remoteInfo:s,remote:t,remoteSnapshot:a,globalSnapshot:c});return u&&vi.preloadAssets(s,o,u,!1),{...e,remoteSnapshot:a}}return e}}}xe.assignRemoteInfo=Zr;xe.snapshotPlugin=Ai;var Qr={};const Ne=$,bt=b,Oi=q,jt=Z,ki=xe;let je=D;function wi(e){const 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 en(e,t,r,n,o={},s){const{value:i}=bt.getInfoWithoutType(e,Ne.getFMId(t)),a=s||i;if(a&&!(0,je.isManifestProvider)(a)&&(r(a,t,n),a.remotesInfo)){const c=Object.keys(a.remotesInfo);for(const l of c){if(o[l])continue;o[l]=!0;const u=wi(l),d=a.remotesInfo[l];en(e,{name:u.name,version:d.matchedVersion},r,!1,o,void 0)}}}const tt=(e,t)=>document.querySelector(`${e}[${e==="link"?"href":"src"}="${t}"]`);function Fi(e,t,r,n,o){const s=[],i=[],a=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:d}=t,{depsRemote:f}=d;if(en(n,r,(m,_,g)=>{var N;let p;if(g)p=d;else if(Array.isArray(f)){const R=f.find(v=>v.nameOrAlias===_.name||v.nameOrAlias===_.alias);if(!R)return;p=jt.defaultPreloadArgs(R)}else if(f===!0)p=d;else return;const E=(0,je.getResourceUrl)(m,Ne.getRemoteEntryInfoFromSnapshot(m).url);E&&a.push({name:_.name,moduleInfo:{name:_.name,entry:E,type:"remoteEntryType"in m?m.remoteEntryType:"global",entryGlobalName:"globalName"in m?m.globalName:_.name,shareScope:"",version:"version"in m?m.version:void 0},url:E});let I="modules"in m?m.modules:[];const k=jt.normalizePreloadExposes(p.exposes);k.length&&"modules"in m&&(I=(N=m==null?void 0:m.modules)==null?void 0:N.reduce((R,v)=>((k==null?void 0:k.indexOf(v.moduleName))!==-1&&R.push(v),R),[]));function y(R){const v=R.map(B=>(0,je.getResourceUrl)(m,B));return p.filter?v.filter(p.filter):v}if(I){const R=I.length;for(let v=0;v<R;v++){const B=I[v],Ye=`${_.name}/${B.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:B.moduleName==="."?_.name:Ye,name:_.name,remoteSnapshot:m,preloadConfig:p,remote:_,origin:e}),!bt.getPreloaded(Ye)&&(p.resourceCategory==="all"?(s.push(...y(B.assets.css.async)),s.push(...y(B.assets.css.sync)),i.push(...y(B.assets.js.async)),i.push(...y(B.assets.js.sync))):p.resourceCategory==="sync"&&(s.push(...y(B.assets.css.sync)),i.push(...y(B.assets.js.sync))),bt.setPreloaded(Ye))}}},!0,{},o),o.shared&&o.shared.length>0){const m=(_,g)=>{const{shared:p}=Oi.getRegisteredShare(e.shareScopeMap,g.sharedName,_,e.sharedHandler.hooks.lifecycle.resolveShare)||{};p&&typeof p.lib=="function"&&(g.assets.js.sync.forEach(E=>{c.add(E)}),g.assets.css.sync.forEach(E=>{l.add(E)}))};o.shared.forEach(_=>{var E;const g=(E=u.shared)==null?void 0:E[_.sharedName];if(!g)return;const p=_.version?g.find(I=>I.version===_.version):g;p&&Ne.arrayOptions(p).forEach(I=>{m(I,_)})})}const h=i.filter(m=>!c.has(m)&&!tt("script",m));return{cssAssets:s.filter(m=>!l.has(m)&&!tt("link",m)),jsAssetsWithoutEntry:h,entryAssets:a.filter(m=>!tt("script",m.url))}}const Li=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(e){const{origin:t,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:i}=e;return je.isBrowserEnvValue?Ne.isRemoteInfoWithEntry(o)&&Ne.isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(ki.assignRemoteInfo(n,i),Fi(t,r,n,s,i)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};Qr.generatePreloadAssetsPlugin=Li;var Ke={};const rt=M,Di=$,U=b,Vt=Pe,Hi=ve,nt=Ae,Ci=Oe;let ot=D,Fe=Y;function tn(e,t){const r=U.getGlobalSnapshotInfoByModuleInfo({name:t.name,version:t.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&U.getInfoWithoutType(r.remotesInfo,e.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:U.getGlobalSnapshot(),remoteSnapshot:U.getGlobalSnapshotInfoByModuleInfo({name:e.name,version:"version"in e?e.version:void 0})}}var qi=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Ci.PluginSystem({beforeLoadRemoteSnapshot:new Hi.AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new nt.AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new nt.AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new nt.AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=U.Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,expose:r}){const{options:n}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:n,moduleInfo:e});let o=U.getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});o||(o={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},U.addGlobalSnapshot({[this.HostInstance.options.name]:o})),o&&"remotesInfo"in o&&!U.getInfoWithoutType(o.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(o.remotesInfo={...o==null?void 0:o.remotesInfo,[e.name]:{matchedVersion:"version"in e?e.version:e.entry}});const{hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:n,moduleInfo:e,hostGlobalSnapshot:s,remoteSnapshot:i,globalSnapshot:a});let u,d;if(c)if((0,ot.isManifestProvider)(c)){const f=ot.isBrowserEnvValue?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",h=await this.getManifestJson(f,e,{}),m=U.setGlobalSnapshotInfoByModuleInfo({...e,entry:f},h);u=h,d=m}else{const{remoteSnapshot:f}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});u=f,d=l}else if(Di.isRemoteInfoWithEntry(e)){const f=await this.getManifestJson(e.entry,e,{}),h=U.setGlobalSnapshotInfoByModuleInfo(e,f),{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:f,from:"global"});u=m,d=h}else rt.error(Fe.RUNTIME_007,Fe.runtimeDescMap,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,Vt.optionsToMFContext(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:n,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return tn(e,this.HostInstance)}async getManifestJson(e,t,r){const n=async()=>{let s=this.manifestCache.get(e);if(s)return s;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),s=await i.json()}catch(i){s=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),s||(delete this.manifestLoading[e],rt.error(Fe.RUNTIME_003,Fe.runtimeDescMap,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${i}`,Vt.optionsToMFContext(this.HostInstance.options)))}return rt.assert(s.metaData&&s.exposes&&s.shared,`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${[!s.metaData&&"metaData",!s.exposes&&"exposes",!s.shared&&"shared"].filter(Boolean).join(", ")}.`),this.manifestCache.set(e,s),s},o=async()=>{const s=await n(),i=(0,ot.generateSnapshotFromManifest)(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]=o().then(s=>s)),this.manifestLoading[e]}};Ke.SnapshotHandler=qi;Ke.getGlobalRemoteInfo=tn;var rn={};const st=M,Gi=oe,A=q,Xt=Pe,Ui=ve,it=_e,xt=Ae,Wi=Oe;let pe=Y;var Bi=class{constructor(e){this.hooks=new Wi.PluginSystem({beforeRegisterShare:new it.SyncWaterfallHook("beforeRegisterShare"),afterResolve:new xt.AsyncWaterfallHook("afterResolve"),beforeLoadShare:new xt.AsyncWaterfallHook("beforeLoadShare"),loadShare:new Ui.AsyncHook,resolveShare:new it.SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new it.SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}registerShared(e,t){const{newShareInfos:r,allShareInfos:n}=A.formatShareConfigs(e,t);return Object.keys(r).forEach(o=>{r[o].forEach(s=>{s.scope.forEach(i=>{var a;this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:o,shared:s}),(a=this.shareScopeMap[i])!=null&&a[o]||this.setShared({pkgName:o,lib:s.lib,get:s.get,loaded:s.loaded||!!s.lib,shared:s,from:t.name})})})}),{newShareInfos:r,allShareInfos:n}}async loadShare(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&await Promise.all(n.scope.map(async a=>{await Promise.all(this.initializeSharing(a,{strategy:n.strategy}))}));const{shareInfo:o}=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:n,shared:r.options.shared,origin:r});st.assert(o,`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.`);const{shared:s,useTreesShaking:i}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(s){const a=A.directShare(s,i);if(a.lib)return A.addUseIn(a,r.options.name),a.lib;if(a.loading&&!a.loaded){const c=await a.loading;return a.loaded=!0,a.lib||(a.lib=c),A.addUseIn(a,r.options.name),c}else{const l=(async()=>{const u=await a.get();return A.addUseIn(a,r.options.name),a.loaded=!0,a.lib=u,u})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:r.options.name,lib:null,loading:l,treeShaking:i?a:void 0}),l}}else{if(t!=null&&t.customShareInfo)return!1;const a=A.shouldUseTreeShaking(o.treeShaking),c=A.directShare(o,a),u=(async()=>{const d=await c.get();c.lib=d,c.loaded=!0,A.addUseIn(c,r.options.name);const{shared:f,useTreesShaking:h}=A.getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare)||{};if(f){const m=A.directShare(f,h);m.lib=d,m.loaded=!0,f.from=o.from}return d})();return this.setShared({pkgName:e,loaded:!1,shared:o,from:r.options.name,lib:null,loading:u,treeShaking:a?c:void 0}),u}}initializeSharing(e=Gi.DEFAULT_SCOPE,t){const{host:r}=this,n=t==null?void 0:t.from,o=t==null?void 0:t.strategy;let s=t==null?void 0:t.initScope;const i=[];if(n!=="build"){const{initTokens:f}=this;s||(s=[]);let h=f[e];if(h||(h=f[e]={from:this.host.name}),s.indexOf(h)>=0)return i;s.push(h)}const a=this.shareScopeMap,c=r.options.name;a[e]||(a[e]={});const l=a[e],u=(f,h)=>{var I;const{version:m,eager:_}=h;l[f]=l[f]||{};const g=l[f],p=g[m]&&A.directShare(g[m]),E=!!(p&&("eager"in p&&p.eager||"shareConfig"in p&&((I=p.shareConfig)!=null&&I.eager)));(!p||p.strategy!=="loaded-first"&&!p.loaded&&(!_!=!E?_:c>g[m].from))&&(g[m]=h)},d=async f=>{const{module:h}=await r.remoteHandler.getRemoteModuleAndOptions({id:f});let m;try{m=await h.getEntry()}catch(_){if(m=await r.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:f,error:_,from:"runtime",lifecycle:"beforeLoadShare",origin:r}),!m)return}finally{m!=null&&m.init&&!h.initing&&(h.remoteEntryExports=m,await h.init(void 0,void 0,s))}};return Object.keys(r.options.shared).forEach(f=>{r.options.shared[f].forEach(h=>{h.scope.includes(e)&&u(f,h)})}),(r.options.shareStrategy==="version-first"||o==="version-first")&&r.options.remotes.forEach(f=>{f.shareScope===e&&i.push(d(f.name))}),i}loadShareSync(e,t){const{host:r}=this,n=A.getTargetSharedOptions({pkgName:e,extraOptions:t,shareInfos:r.options.shared});n!=null&&n.scope&&n.scope.forEach(i=>{this.initializeSharing(i,{strategy:n.strategy})});const{shared:o,useTreesShaking:s}=A.getRegisteredShare(this.shareScopeMap,e,n,this.hooks.lifecycle.resolveShare)||{};if(o){if(typeof o.lib=="function")return A.addUseIn(o,r.options.name),o.loaded||(o.loaded=!0,o.from===r.options.name&&(n.loaded=!0)),o.lib;if(typeof o.get=="function"){const i=o.get();if(!(i instanceof Promise))return A.addUseIn(o,r.options.name),this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:i,shared:o}),i}}if(n.lib)return n.loaded||(n.loaded=!0),n.lib;if(n.get){const i=n.get();return i instanceof Promise&&st.error((t==null?void 0:t.from)==="build"?pe.RUNTIME_005:pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options)),n.lib=i,this.setShared({pkgName:e,loaded:!0,from:r.options.name,lib:n.lib,shared:n}),n.lib}st.error(pe.RUNTIME_006,pe.runtimeDescMap,{hostName:r.options.name,sharedPkgName:e},void 0,Xt.optionsToMFContext(r.options))}initShareScopeMap(e,t,r={}){const{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:s,get:i,treeShaking:a}){const{version:c,scope:l="default",...u}=t,d=Array.isArray(l)?l:[l],f=h=>{const m=(g,p,E)=>{E&&!g[p]&&(g[p]=E)},_=a?h.treeShaking:h;m(_,"loaded",s),m(_,"loading",o),m(_,"get",i)};d.forEach(h=>{this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),this.shareScopeMap[h][e][c]||(this.shareScopeMap[h][e][c]={version:c,scope:[h],...u,lib:n});const m=this.shareScopeMap[h][e][c];f(m),r&&m.from!==r&&(m.from=r)})}_setGlobalShareScopeMap(e){const t=A.getGlobalShareScope(),r=e.id||e.name;r&&!t[r]&&(t[r]=this.shareScopeMap)}};rn.SharedHandler=Bi;var nn={};const Le=M,G=b,Kt=oe,ji=q,Vi=he,at=K,Xi=Pe,Yt=Z,xi=Xe,Ki=me,ie=ve,zt=_e,Yi=Ae,zi=Oe,Ji=Ke;let lt=D,Jt=Y;var Zi=class{constructor(e){this.hooks=new zi.PluginSystem({beforeRegisterRemote:new zt.SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new zt.SyncWaterfallHook("registerRemote"),beforeRequest:new Yi.AsyncWaterfallHook("beforeRequest"),onLoad:new ie.AsyncHook("onLoad"),handlePreloadModule:new Ki.SyncHook("handlePreloadModule"),errorLoadRemote:new ie.AsyncHook("errorLoadRemote"),beforePreloadRemote:new ie.AsyncHook("beforePreloadRemote"),generatePreloadAssets:new ie.AsyncHook("generatePreloadAssets"),afterPreloadRemote:new ie.AsyncHook,loadEntry:new ie.AsyncHook}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((r,n)=>(this.registerRemote(n,r,{force:!1}),r),e.remotes)}setIdToRemoteMap(e,t){const{remote:r,expose:n}=t,{name:o,alias:s}=r;if(this.idToRemoteMap[e]={name:r.name,expose:n},s&&e.startsWith(o)){const i=e.replace(o,s);this.idToRemoteMap[i]={name:r.name,expose:n};return}if(s&&e.startsWith(s)){const i=e.replace(s,o);this.idToRemoteMap[i]={name:r.name,expose:n}}}async loadRemote(e,t){const{host:r}=this;try{const{loadFactory:n=!0}=t||{loadFactory:!0},{module:o,moduleOptions:s,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:a,remote:c,expose:l,id:u,remoteSnapshot:d}=i,f=await o.get(u,l,t,d),h=await this.hooks.lifecycle.onLoad.emit({id:u,pkgNameOrAlias:a,expose:l,exposeModule:n?f:void 0,exposeModuleFactory:n?void 0:f,remote:c,options:s,moduleInstance:o,origin:r});return this.setIdToRemoteMap(e,i),typeof h=="function"?h:f}catch(n){const{from:o="runtime"}=t||{from:"runtime"},s=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:n,from:o,lifecycle:"onLoad",origin:r});if(!s)throw n;return s}}async preloadRemote(e){const{host:t}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});const r=Yt.formatPreloadArgs(t.options.remotes,e);await Promise.all(r.map(async n=>{const{remote:o}=n,s=at.getRemoteInfo(o),{globalSnapshot:i,remoteSnapshot:a}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:o}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:n,remote:o,remoteInfo:s,globalSnapshot:i,remoteSnapshot:a});c&&Yt.preloadAssets(s,t,c)}))}registerRemotes(e,t){const{host:r}=this;e.forEach(n=>{this.registerRemote(n,r.options.remotes,{force:t==null?void 0:t.force})})}async getRemoteModuleAndOptions(e){const{host:t}=this,{id:r}=e;let n;try{n=await this.hooks.lifecycle.beforeRequest.emit({id:r,options:t.options,origin:t})}catch(h){if(n=await this.hooks.lifecycle.errorLoadRemote.emit({id:r,options:t.options,origin:t,from:"runtime",error:h,lifecycle:"beforeRequest"}),!n)throw h}const{id:o}=n,s=Vi.matchRemoteWithNameAndExpose(t.options.remotes,o);s||Le.error(Jt.RUNTIME_004,Jt.runtimeDescMap,{hostName:t.options.name,requestId:o},void 0,Xi.optionsToMFContext(t.options));const{remote:i}=s,a=at.getRemoteInfo(i),c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:o,...s,options:t.options,origin:t,remoteInfo:a}),{remote:l,expose:u}=c;Le.assert(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${o}.`);let d=t.moduleCache.get(l.name);const f={host:t,remoteInfo:a};return d||(d=new xi.Module(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,r){const{host:n}=this,o=()=>{if(e.alias){const i=t.find(a=>{var c;return e.alias&&(a.name.startsWith(e.alias)||((c=a.alias)==null?void 0:c.startsWith(e.alias)))});Le.assert(!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&&lt.isBrowserEnvValue&&typeof window<"u"&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=Kt.DEFAULT_SCOPE),e.type||(e.type=Kt.DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:n});const s=t.find(i=>i.name===e.name);if(!s)o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];r!=null&&r.force&&(this.removeRemote(s),o(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:n}),(0,lt.warn)(i.join(" ")))}}removeRemote(e){var t;try{const{host:r}=this,{name:n}=e,o=r.options.remotes.findIndex(i=>i.name===n);o!==-1&&r.options.remotes.splice(o,1);const s=r.moduleCache.get(e.name);if(s){const i=s.remoteInfo,a=i.entryGlobalName;G.CurrentGlobal[a]&&((t=Object.getOwnPropertyDescriptor(G.CurrentGlobal,a))!=null&&t.configurable?delete G.CurrentGlobal[a]:G.CurrentGlobal[a]=void 0);const c=at.getRemoteEntryUniqueKey(s.remoteInfo);G.globalLoading[c]&&delete G.globalLoading[c],r.snapshotHandler.manifestCache.delete(i.entry);let l=i.buildVersion?(0,lt.composeKeyWithSeparator)(i.name,i.buildVersion):i.name;const u=G.CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(f=>i.buildVersion?f.options.id===l:f.name===l);if(u!==-1){const f=G.CurrentGlobal.__FEDERATION__.__INSTANCES__[u];l=f.options.id||l;const h=ji.getGlobalShareScope();let m=!0;const _=[];Object.keys(h).forEach(g=>{const p=h[g];p&&Object.keys(p).forEach(E=>{const I=p[E];I&&Object.keys(I).forEach(k=>{const y=I[k];y&&Object.keys(y).forEach(N=>{const R=y[N];R&&typeof R=="object"&&R.from===i.name&&(R.loaded||R.loading?(R.useIn=R.useIn.filter(v=>v!==i.name),R.useIn.length?m=!1:_.push([g,E,k,N])):_.push([g,E,k,N]))})})})}),m&&(f.shareScopeMap={},delete h[l]),_.forEach(([g,p,E,I])=>{var k,y,N;(N=(y=(k=h[g])==null?void 0:k[p])==null?void 0:y[E])==null||delete N[I]}),G.CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(u,1)}const{hostGlobalSnapshot:d}=Ji.getGlobalRemoteInfo(e,r);if(d){const f=d&&"remotesInfo"in d&&d.remotesInfo&&G.getInfoWithoutType(d.remotesInfo,e.name).key;f&&(delete d.remotesInfo[f],G.Global.__FEDERATION__.__MANIFEST_LOADING__[f]&&delete G.Global.__FEDERATION__.__MANIFEST_LOADING__[f])}r.moduleCache.delete(e.name)}}catch(r){Le.logger.error(`removeRemote failed: ${r instanceof Error?r.message:String(r)}`)}}};nn.RemoteHandler=Zi;const Qi=M,ea=oe,ta=q,ra=Vr,na=Xr,oa=K,sa=Xe,z=me,ct=ve,ia=_e,Zt=Ae,ut=Oe,aa=xe,la=Qr,ca=Ke,ua=rn,fa=nn;let da=D,ft=Y;const ha=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;var ma=class{constructor(e){this.hooks=new ut.PluginSystem({beforeInit:new ia.SyncWaterfallHook("beforeInit"),init:new z.SyncHook,beforeInitContainer:new Zt.AsyncWaterfallHook("beforeInitContainer"),initContainer:new Zt.AsyncWaterfallHook("initContainer")}),this.version="2.2.2",this.moduleCache=new Map,this.loaderHook=new ut.PluginSystem({getModuleInfo:new z.SyncHook,createScript:new z.SyncHook,createLink:new z.SyncHook,fetch:new ct.AsyncHook,loadEntryError:new ct.AsyncHook,getModuleFactory:new ct.AsyncHook}),this.bridgeHook=new ut.PluginSystem({beforeBridgeRender:new z.SyncHook,afterBridgeRender:new z.SyncHook,beforeBridgeDestroy:new z.SyncHook,afterBridgeDestroy:new z.SyncHook});const t=ha?[aa.snapshotPlugin(),la.generatePreloadAssetsPlugin()]:[],r={id:ra.getBuilderId(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:da.isBrowserEnvValue};this.name=e.name,this.options=r,this.snapshotHandler=new ca.SnapshotHandler(this),this.sharedHandler=new ua.SharedHandler(this),this.remoteHandler=new fa.RemoteHandler(this),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&&Qi.error((0,ft.getShortErrorMsg)(ft.RUNTIME_010,ft.runtimeDescMap)),this.registerPlugins(e.plugins);const 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=ea.DEFAULT_SCOPE,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,r){const n=oa.getRemoteInfo({name:e,entry:t}),o=new sa.Module({host:this,remoteInfo:n});return o.remoteEntryExports=r,this.moduleCache.set(e,o),o}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){const{allShareInfos:r}=ta.formatShareConfigs(e,t),{userOptions:n,options:o}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:r}),s=this.remoteHandler.formatAndRegisterRemote(o,n),{allShareInfos:i}=this.sharedHandler.registerShared(o,n),a=[...o.plugins];n.plugins&&n.plugins.forEach(l=>{a.includes(l)||a.push(l)});const c={...e,...t,plugins:a,remotes:s,shared:i};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const t=na.registerPlugins(e,this);this.options.plugins=this.options.plugins.reduce((r,n)=>(n&&r&&!r.find(o=>o.name===n.name)&&r.push(n),r),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};Yr.ModuleFederation=ma;var on={},sn={},Qt=Object.defineProperty,_a=(e,t)=>{let r={};for(var n in e)Qt(r,n,{get:e[n],enumerable:!0});return t||Qt(r,Symbol.toStringTag,{value:"Module"}),r};sn.__exportAll=_a;(function(e){var r=sn.__exportAll({});Object.defineProperty(e,"type_exports",{enumerable:!0,get:function(){return r}})})(on);(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M,r=$,n=b,o=Pt,s=q,i=he,a=K,c=xr,l=Xe,u=Yr,d=on;let f=D;const h=c.default;e.CurrentGlobal=n.CurrentGlobal,e.Global=n.Global,e.Module=l.Module,e.ModuleFederation=u.ModuleFederation,e.addGlobalSnapshot=n.addGlobalSnapshot,e.assert=t.assert,e.error=t.error,e.getGlobalFederationConstructor=n.getGlobalFederationConstructor,e.getGlobalSnapshot=n.getGlobalSnapshot,e.getInfoWithoutType=n.getInfoWithoutType,e.getRegisteredShare=s.getRegisteredShare,e.getRemoteEntry=a.getRemoteEntry,e.getRemoteInfo=a.getRemoteInfo,e.helpers=h,e.isStaticResourcesEqual=r.isStaticResourcesEqual,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return f.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return f.loadScriptNode}}),e.matchRemoteWithNameAndExpose=i.matchRemoteWithNameAndExpose,e.registerGlobalPlugins=n.registerGlobalPlugins,e.resetFederationGlobalInfo=n.resetFederationGlobalInfo,e.safeWrapper=r.safeWrapper,e.satisfy=o.satisfy,e.setGlobalFederationConstructor=n.setGlobalFederationConstructor,e.setGlobalFederationInstance=n.setGlobalFederationInstance,Object.defineProperty(e,"types",{enumerable:!0,get:function(){return d.type_exports}})})(Tt);let ga=Tt;function pa(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function ya(e,t){const r=pa();return ga.CurrentGlobal.__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))}ar.getGlobalFederationInstance=ya;(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ar;let r=Tt,n=Y;function o(_){const g=new((0,r.getGlobalFederationConstructor)()||r.ModuleFederation)(_);return(0,r.setGlobalFederationInstance)(g),g}let s=null;function i(_){const g=t.getGlobalFederationInstance(_.name,_.version);return g?(g.initOptions(_),s||(s=g),g):(s=o(_),s)}function a(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadRemote.apply(s,_)}function c(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShare.apply(s,_)}function l(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.loadShareSync.apply(s,_)}function u(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.preloadRemote.apply(s,_)}function d(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerRemotes.apply(s,_)}function f(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerPlugins.apply(s,_)}function h(){return s}function m(..._){return(0,r.assert)(s,n.RUNTIME_009,n.runtimeDescMap),s.registerShared.apply(s,_)}(0,r.setGlobalFederationConstructor)(r.ModuleFederation),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),e.ModuleFederation=r.ModuleFederation,e.createInstance=o,e.getInstance=h,Object.defineProperty(e,"getRemoteEntry",{enumerable:!0,get:function(){return r.getRemoteEntry}}),Object.defineProperty(e,"getRemoteInfo",{enumerable:!0,get:function(){return r.getRemoteInfo}}),e.init=i,e.loadRemote=a,Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"loadScriptNode",{enumerable:!0,get:function(){return r.loadScriptNode}}),e.loadShare=c,e.loadShareSync=l,e.preloadRemote=u,Object.defineProperty(e,"registerGlobalPlugins",{enumerable:!0,get:function(){return r.registerGlobalPlugins}}),e.registerPlugins=f,e.registerRemotes=d,e.registerShared=m})(ir);const an="__mf_init____mf__virtual/ConfigCustomJavascriptSet__mf_v__runtimeInit__mf_v__.js__";let Rt=globalThis[an];if(!Rt){let e,t;const r=new Promise((n,o)=>{e=n,t=o});Rt=globalThis[an]={initPromise:r,initResolve:e,initReject:t},typeof window>"u"&&e({loadRemote:function(){return Promise.resolve(void 0)},loadShare:function(){return Promise.resolve(void 0)}})}const Ea=Rt.initResolve,er={},tr="default",rr="ConfigCustomJavascriptSet";let nr,or;async function Sa(){return nr??=sr(()=>import("./localSharedImportMap-BxT0VwTO.js"),__vite__mapDeps([0,1]),import.meta.url),nr}async function ba(){return or??=sr(()=>import("./virtualExposes-jSvr-kK3.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.default??e),or}async function Ta(e={},t=[]){const{usedShared:r,usedRemotes:n}=await Sa(),o=ir.init({name:rr,remotes:n,shared:r,plugins:[],shareStrategy:"version-first"});var s=er[tr];if(s||(s=er[tr]={from:rr}),!(t.indexOf(s)>=0)){t.push(s),o.initShareScopeMap("default",e),Ea(o);try{await Promise.all(await o.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return o}}async function Ia(e){const t=await ba();if(!(e in t))throw new Error(`Module ${e} does not exist in container.`);return t[e]().then(r=>()=>r)}export{ir as d,Ia as g,Ta as i};
@@ -1 +1 @@
1
- import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-DFSXB0v2.js";export{r as get,a as init};
1
+ import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_ConfigCustomJavascriptSet__customComponents_js-Br3IlnqO.js";export{r as get,a as init};
@@ -146,7 +146,7 @@
146
146
  },
147
147
  "gptKey": {
148
148
  "newLine": true,
149
- "type": "text",
149
+ "type": "password",
150
150
  "label": "ChatGPT API key",
151
151
  "xs": 12,
152
152
  "sm": 9,
@@ -156,7 +156,7 @@
156
156
  "_testOpenAi": {
157
157
  "type": "sendTo",
158
158
  "label": "Test OpenAI",
159
- "icon": "img/openai.svg",
159
+ "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAyQzYuNDggMiAyIDUuNTggMiAxMGMwIDIuMjQgMS4xMiA0LjI3IDIuOTMgNS43Mkw0IDIwbDQuMzUtMi4xOEM5LjUgMTguMjcgMTAuNzIgMTguNSAxMiAxOC41YzUuNTIgMCAxMC0zLjU4IDEwLThTMTcuNTIgMiAxMiAyem0tMSAxMUg4di0yaDNWOGgydjNoM3YyaC0zdjNoLTJ2LTN6Ii8+PC9zdmc+",
160
160
  "command": "testApiConnection",
161
161
  "jsonData": "{\"apiKey\": \"${data.gptKey}\", \"provider\": \"openai\"}",
162
162
  "variant": "outlined",
@@ -167,7 +167,7 @@
167
167
  },
168
168
  "claudeKey": {
169
169
  "newLine": true,
170
- "type": "text",
170
+ "type": "password",
171
171
  "label": "Anthropic API key",
172
172
  "xs": 12,
173
173
  "sm": 9,
@@ -177,7 +177,7 @@
177
177
  "_testClaude": {
178
178
  "type": "sendTo",
179
179
  "label": "Test Anthropic",
180
- "icon": "img/anthropic.svg",
180
+ "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAyTDMgMjBoNGwxLjUtNGg3bDEuNSA0aDRMMTIgMnptMCA2bDIuNSA3aC01TDEyIDh6Ii8+PC9zdmc+",
181
181
  "command": "testApiConnection",
182
182
  "jsonData": "{\"apiKey\": \"${data.claudeKey}\", \"provider\": \"anthropic\"}",
183
183
  "variant": "outlined",
@@ -188,7 +188,7 @@
188
188
  },
189
189
  "geminiKey": {
190
190
  "newLine": true,
191
- "type": "text",
191
+ "type": "password",
192
192
  "label": "Gemini API key",
193
193
  "xs": 12,
194
194
  "sm": 9,
@@ -198,7 +198,7 @@
198
198
  "_testGemini": {
199
199
  "type": "sendTo",
200
200
  "label": "Test Gemini",
201
- "icon": "img/gemini.svg",
201
+ "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMiAxbDMgN2g3bC01LjUgNC41TDE4LjUgMjAgMTIgMTUuNSA1LjUgMjBsMi03LjVMMiA4aDd6Ii8+PC9zdmc+",
202
202
  "command": "testApiConnection",
203
203
  "jsonData": "{\"apiKey\": \"${data.geminiKey}\", \"provider\": \"gemini\"}",
204
204
  "variant": "outlined",
@@ -209,7 +209,7 @@
209
209
  },
210
210
  "deepseekKey": {
211
211
  "newLine": true,
212
- "type": "text",
212
+ "type": "password",
213
213
  "label": "DeepSeek API key",
214
214
  "xs": 12,
215
215
  "sm": 9,
@@ -219,7 +219,7 @@
219
219
  "_testDeepseek": {
220
220
  "type": "sendTo",
221
221
  "label": "Test DeepSeek",
222
- "icon": "img/deepseek.svg",
222
+ "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik0xMCAyYTggOCAwIDAgMSA2LjMyIDEyLjkxbDQuMzkgNC4zOC0xLjQyIDEuNDItNC4zOC00LjM5QTggOCAwIDEgMSAxMCAyem0wIDJhNiA2IDAgMSAwIDAgMTIgNiA2IDAgMCAwIDAtMTJ6Ii8+PC9zdmc+",
223
223
  "command": "testApiConnection",
224
224
  "jsonData": "{\"apiKey\": \"${data.deepseekKey}\", \"provider\": \"deepseek\"}",
225
225
  "variant": "outlined",
@@ -248,7 +248,7 @@
248
248
  "_testCustom": {
249
249
  "type": "sendTo",
250
250
  "label": "Test Custom API",
251
- "icon": "img/custom.svg",
251
+ "icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJjdXJyZW50Q29sb3IiPjxwYXRoIGQ9Ik00IDFoMTZ2NUg0VjF6bTEgMXYzaDE0VjJINXptLTEgNmgxNnY1SDRWOHptMSAxdjNoMTRWOUg1em0tMSA2aDE2djVINHYtNXptMSAxdjNoMTR2LTNINXptMi0xMmgydjFIN1Yzem0wIDZoMnYxSDdWOXptMCA2aDJ2MUg3di0xeiIvPjwvc3ZnPg==",
252
252
  "command": "testApiConnection",
253
253
  "jsonData": "{\"apiKey\": \"${data.gptBaseUrlKey}\", \"baseUrl\": \"${data.gptBaseUrl}\", \"provider\": \"openai\"}",
254
254
  "variant": "outlined",
@@ -1 +1 @@
1
- {"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Dsh1HfIY.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BkyLyaYT.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.5.0","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-dN73sbyQ.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CVZSzCXy.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"8.1.8","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-hwplVCgv.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]}
1
+ {"id":"iobroker_javascript","name":"iobroker_javascript","metaData":{"name":"iobroker_javascript","type":"app","buildInfo":{"buildVersion":"1.0.0","buildName":"iobroker_javascript"},"remoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"ssrRemoteEntry":{"name":"remoteEntry.js","path":"","type":"module"},"types":{"path":"","name":""},"globalName":"iobroker_javascript","pluginVersion":"0.2.5","publicPath":"./"},"shared":[{"id":"iobroker_javascript:react","name":"react","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-Dsh1HfIY.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:react-dom","name":"react-dom","version":"18.3.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-BkyLyaYT.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@mui/material","name":"@mui/material","version":"6.5.0","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-dN73sbyQ.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:prop-types","name":"prop-types","version":"15.8.1","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CVZSzCXy.js"]},"css":{"async":[],"sync":[]}}},{"id":"iobroker_javascript:@iobroker/adapter-react-v5","name":"@iobroker/adapter-react-v5","version":"8.1.8","requiredVersion":"*","assets":{"js":{"async":[],"sync":["assets/index-CexrwGGC.js"]},"css":{"async":[],"sync":[]}}}],"remotes":[],"exposes":[]}
@@ -1 +1 @@
1
- import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-BJ03G6Pu.js";export{r as get,a as init};
1
+ import"./assets/preload-helper-BDBacUwf.js";import{g as r,i as a}from"./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DNrEsMrg.js";export{r as get,a as init};
package/admin/tab.html CHANGED
@@ -115,9 +115,9 @@
115
115
  type="text/javascript"
116
116
  src="google-blockly/own/blocks_object.js"
117
117
  ></script>
118
- <script type="module" crossorigin src="./assets/index-DW5CwIma.js"></script>
118
+ <script type="module" crossorigin src="./assets/index-CYbVtccs.js"></script>
119
119
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-BDBacUwf.js">
120
- <link rel="modulepreload" crossorigin href="./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-BJ03G6Pu.js">
120
+ <link rel="modulepreload" crossorigin href="./assets/virtual_mf-REMOTE_ENTRY_ID_iobroker_javascript__remoteEntry_js-DNrEsMrg.js">
121
121
  <link rel="modulepreload" crossorigin href="./assets/iobroker_javascript__loadShare__react__loadShare__.mjs-CTZOFJS2.js">
122
122
  <link rel="modulepreload" crossorigin href="./assets/iobroker_javascript__loadShare__react__loadShare__.mjs_commonjs-proxy-CE9lvhW8.js">
123
123
  <link rel="modulepreload" crossorigin href="./assets/iobroker_javascript__loadShare__prop_mf_2_types__loadShare__.mjs-BCtSFofY.js">
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ /**
3
+ * Helpers for resolving AI provider credentials in sendTo handlers.
4
+ *
5
+ * Keys are stored as `encryptedNative` + `protectedNative` in io-package.json —
6
+ * they are never sent from the frontend. The backend looks them up in `this.config`
7
+ * based on the `provider` name sent along with each `chatCompletion` or
8
+ * `testApiConnection` request.
9
+ *
10
+ * These functions are extracted so they can be unit-tested in isolation.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.PROVIDER_KEY_FIELD = void 0;
14
+ exports.resolveProviderCredentials = resolveProviderCredentials;
15
+ exports.resolveTestCredentials = resolveTestCredentials;
16
+ exports.listAvailableProviders = listAvailableProviders;
17
+ /** Maps each provider to the adapter-config field holding its API key. */
18
+ exports.PROVIDER_KEY_FIELD = {
19
+ openai: 'gptKey',
20
+ anthropic: 'claudeKey',
21
+ gemini: 'geminiKey',
22
+ deepseek: 'deepseekKey',
23
+ custom: 'gptBaseUrlKey',
24
+ };
25
+ /**
26
+ * Resolve API key and base URL for a provider from adapter config.
27
+ * Optional `messageBaseUrl` takes precedence over the stored `gptBaseUrl`
28
+ * (used by the settings-dialog Test button where the user's form value
29
+ * should win over the persisted value).
30
+ */
31
+ function resolveProviderCredentials(config, provider, messageBaseUrl) {
32
+ const cfg = config || {};
33
+ const keyField = exports.PROVIDER_KEY_FIELD[provider];
34
+ const apiKey = keyField ? (cfg[keyField] || '').toString().trim() : '';
35
+ // baseUrl only applies to openai-compatible providers (custom / openai endpoint override).
36
+ // An empty/whitespace messageBaseUrl counts as "not provided" and falls back to the stored value,
37
+ // so the frontend can safely send `baseUrl: ''` without overriding a configured custom URL.
38
+ const baseUrl = provider === 'custom' || provider === 'openai'
39
+ ? (messageBaseUrl || cfg.gptBaseUrl || '').toString().trim()
40
+ : '';
41
+ return { apiKey, baseUrl };
42
+ }
43
+ /**
44
+ * For the testApiConnection sendTo command: if the caller supplied an apiKey
45
+ * (settings-dialog form value), use it; otherwise fall back to the stored key.
46
+ */
47
+ function resolveTestCredentials(config, provider, messageApiKey, messageBaseUrl) {
48
+ const fallback = resolveProviderCredentials(config, provider, messageBaseUrl);
49
+ const explicitKey = (messageApiKey || '').toString().trim();
50
+ return {
51
+ apiKey: explicitKey || fallback.apiKey,
52
+ baseUrl: fallback.baseUrl,
53
+ };
54
+ }
55
+ /**
56
+ * List of providers that have credentials configured in this.config.
57
+ * Used by the `getAvailableAiProviders` sendTo command so the frontend
58
+ * knows which provider icons/models to show without ever seeing a key.
59
+ */
60
+ function listAvailableProviders(config) {
61
+ const cfg = config || {};
62
+ const providers = [];
63
+ if ((cfg.gptKey || '').trim()) {
64
+ providers.push({ provider: 'openai' });
65
+ }
66
+ if ((cfg.claudeKey || '').trim()) {
67
+ providers.push({ provider: 'anthropic' });
68
+ }
69
+ if ((cfg.geminiKey || '').trim()) {
70
+ providers.push({ provider: 'gemini' });
71
+ }
72
+ if ((cfg.deepseekKey || '').trim()) {
73
+ providers.push({ provider: 'deepseek' });
74
+ }
75
+ if ((cfg.gptBaseUrl || '').trim()) {
76
+ providers.push({ provider: 'custom', baseUrl: cfg.gptBaseUrl });
77
+ }
78
+ return providers;
79
+ }
80
+ //# sourceMappingURL=aiProviderResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aiProviderResolver.js","sourceRoot":"","sources":["../../src/lib/aiProviderResolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AA6BH,gEAgBC;AAMD,wDAYC;AAOD,wDAqBC;AA7ED,0EAA0E;AAC7D,QAAA,kBAAkB,GAA4C;IACvE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,WAAW;IACnB,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,eAAe;CAC1B,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,0BAA0B,CACtC,MAAwC,EACxC,QAAgB,EAChB,cAAuB;IAEvB,MAAM,GAAG,GAAG,MAAM,IAAI,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,0BAAkB,CAAC,QAAsB,CAAC,CAAC;IAC5D,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACvE,2FAA2F;IAC3F,kGAAkG;IAClG,4FAA4F;IAC5F,MAAM,OAAO,GACT,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,QAAQ;QAC1C,CAAC,CAAC,CAAC,cAAc,IAAI,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAC5D,CAAC,CAAC,EAAE,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAClC,MAAwC,EACxC,QAAgB,EAChB,aAAsB,EACtB,cAAuB;IAEvB,MAAM,QAAQ,GAAG,0BAA0B,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAC9E,MAAM,WAAW,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;IAC5D,OAAO;QACH,MAAM,EAAE,WAAW,IAAI,QAAQ,CAAC,MAAM;QACtC,OAAO,EAAE,QAAQ,CAAC,OAAO;KAC5B,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB,CAClC,MAAwC;IAExC,MAAM,GAAG,GAAG,MAAM,IAAI,EAAE,CAAC;IACzB,MAAM,SAAS,GAAiD,EAAE,CAAC;IACnE,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5B,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/B,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/B,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACjC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,SAAS,CAAC;AACrB,CAAC","sourcesContent":["/**\n * Helpers for resolving AI provider credentials in sendTo handlers.\n *\n * Keys are stored as `encryptedNative` + `protectedNative` in io-package.json —\n * they are never sent from the frontend. The backend looks them up in `this.config`\n * based on the `provider` name sent along with each `chatCompletion` or\n * `testApiConnection` request.\n *\n * These functions are extracted so they can be unit-tested in isolation.\n */\n\n/** Configuration subset that carries AI credentials. */\nexport interface AiConfigSlice {\n gptKey?: string;\n gptBaseUrl?: string;\n gptBaseUrlKey?: string;\n claudeKey?: string;\n geminiKey?: string;\n deepseekKey?: string;\n}\n\nexport type AiProvider = 'openai' | 'anthropic' | 'gemini' | 'deepseek' | 'custom';\n\n/** Maps each provider to the adapter-config field holding its API key. */\nexport const PROVIDER_KEY_FIELD: Record<AiProvider, keyof AiConfigSlice> = {\n openai: 'gptKey',\n anthropic: 'claudeKey',\n gemini: 'geminiKey',\n deepseek: 'deepseekKey',\n custom: 'gptBaseUrlKey',\n};\n\n/**\n * Resolve API key and base URL for a provider from adapter config.\n * Optional `messageBaseUrl` takes precedence over the stored `gptBaseUrl`\n * (used by the settings-dialog Test button where the user's form value\n * should win over the persisted value).\n */\nexport function resolveProviderCredentials(\n config: AiConfigSlice | undefined | null,\n provider: string,\n messageBaseUrl?: string,\n): { apiKey: string; baseUrl: string } {\n const cfg = config || {};\n const keyField = PROVIDER_KEY_FIELD[provider as AiProvider];\n const apiKey = keyField ? (cfg[keyField] || '').toString().trim() : '';\n // baseUrl only applies to openai-compatible providers (custom / openai endpoint override).\n // An empty/whitespace messageBaseUrl counts as \"not provided\" and falls back to the stored value,\n // so the frontend can safely send `baseUrl: ''` without overriding a configured custom URL.\n const baseUrl =\n provider === 'custom' || provider === 'openai'\n ? (messageBaseUrl || cfg.gptBaseUrl || '').toString().trim()\n : '';\n return { apiKey, baseUrl };\n}\n\n/**\n * For the testApiConnection sendTo command: if the caller supplied an apiKey\n * (settings-dialog form value), use it; otherwise fall back to the stored key.\n */\nexport function resolveTestCredentials(\n config: AiConfigSlice | undefined | null,\n provider: string,\n messageApiKey?: string,\n messageBaseUrl?: string,\n): { apiKey: string; baseUrl: string } {\n const fallback = resolveProviderCredentials(config, provider, messageBaseUrl);\n const explicitKey = (messageApiKey || '').toString().trim();\n return {\n apiKey: explicitKey || fallback.apiKey,\n baseUrl: fallback.baseUrl,\n };\n}\n\n/**\n * List of providers that have credentials configured in this.config.\n * Used by the `getAvailableAiProviders` sendTo command so the frontend\n * knows which provider icons/models to show without ever seeing a key.\n */\nexport function listAvailableProviders(\n config: AiConfigSlice | undefined | null,\n): { provider: AiProvider; baseUrl?: string }[] {\n const cfg = config || {};\n const providers: { provider: AiProvider; baseUrl?: string }[] = [];\n if ((cfg.gptKey || '').trim()) {\n providers.push({ provider: 'openai' });\n }\n if ((cfg.claudeKey || '').trim()) {\n providers.push({ provider: 'anthropic' });\n }\n if ((cfg.geminiKey || '').trim()) {\n providers.push({ provider: 'gemini' });\n }\n if ((cfg.deepseekKey || '').trim()) {\n providers.push({ provider: 'deepseek' });\n }\n if ((cfg.gptBaseUrl || '').trim()) {\n providers.push({ provider: 'custom', baseUrl: cfg.gptBaseUrl });\n }\n return providers;\n}\n"]}