iobroker.vis-2-widgets-inventwo 0.3.4 → 0.3.6

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 (56) hide show
  1. package/README.md +6 -0
  2. package/io-package.json +27 -27
  3. package/package.json +1 -1
  4. package/widgets/vis-2-widgets-inventwo/assets/InventwoGeneric-CD9vu_cc.js +2 -0
  5. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetCheckbox-CoqgwpTy.js +2 -0
  6. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSlider-DqUrwpd0.js +2 -0
  7. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSwitch-D66oqkdK.js +2 -0
  8. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetTable-_LSfYw4B.js +2 -0
  9. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetUniversal-ChknruIC.js +12 -0
  10. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetUniversal-zR8yBSHx.css +1 -0
  11. package/widgets/vis-2-widgets-inventwo/assets/_commonjsHelpers-BujWM7Y5.js +2 -0
  12. package/widgets/vis-2-widgets-inventwo/assets/createSvgIcon-CxCg16Xx.js +2 -0
  13. package/widgets/vis-2-widgets-inventwo/assets/defaultTheme-DL-wasCI.js +17 -0
  14. package/widgets/vis-2-widgets-inventwo/assets/hostInit-CXLMYJ8s.js +3 -0
  15. package/widgets/vis-2-widgets-inventwo/assets/index-B7Dbx8oC.js +10 -0
  16. package/widgets/vis-2-widgets-inventwo/assets/index-BD-FQvN5.js +2 -0
  17. package/widgets/vis-2-widgets-inventwo/assets/{index-f8cx2lwt.js → index-CSZW0DpR.js} +3 -2
  18. package/widgets/vis-2-widgets-inventwo/assets/index-CZmEcmpB.js +2 -0
  19. package/widgets/vis-2-widgets-inventwo/assets/{index-C-Jo2qj7.js → index-CaPX8dkd.js} +3 -2
  20. package/widgets/vis-2-widgets-inventwo/assets/index-CheqdL9m.js +2 -0
  21. package/widgets/vis-2-widgets-inventwo/assets/{index-DvbC0cIJ.js → index-CtldE_Jt.js} +40 -39
  22. package/widgets/vis-2-widgets-inventwo/assets/jsx-runtime-Dt7ToRAj.js +10 -0
  23. package/widgets/vis-2-widgets-inventwo/assets/preload-helper-47hLtgXP.js +2 -0
  24. package/widgets/vis-2-widgets-inventwo/assets/styled-B53MEpUW.js +8 -0
  25. package/widgets/vis-2-widgets-inventwo/assets/tableRowClasses-BB2m7w67.js +2 -0
  26. package/widgets/vis-2-widgets-inventwo/assets/translations-eYsfgiMl.js +2 -0
  27. package/widgets/vis-2-widgets-inventwo/assets/tslib.es6-bbV-5QUe.js +2 -0
  28. package/widgets/vis-2-widgets-inventwo/assets/useTheme-D6kRSJ_1.js +2 -0
  29. package/widgets/vis-2-widgets-inventwo/assets/virtualExposes-BGZiKeMG.js +3 -0
  30. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DabLVWRI.js +2 -0
  31. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-CwpbEbbN.js +2 -0
  32. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare__react__loadShare__-CvH99W-I.js +2 -0
  33. package/widgets/vis-2-widgets-inventwo/assets/{vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js → vis2Inventwo__mf_v__runtimeInit__mf_v__-C3oMM7wE.js} +5 -4
  34. package/widgets/vis-2-widgets-inventwo/customWidgets.js +3 -2
  35. package/widgets/vis-2-widgets-inventwo/assets/InventwoGeneric-D4TSslP6.js +0 -1
  36. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetCheckbox-DX3ORFGc.js +0 -1
  37. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSlider-ejvLhAV-.js +0 -1
  38. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetSwitch-CdAAoW2d.js +0 -1
  39. package/widgets/vis-2-widgets-inventwo/assets/InventwoWidgetTable-t3jwKHkf.js +0 -1
  40. package/widgets/vis-2-widgets-inventwo/assets/_commonjsHelpers-B_uApUQq.js +0 -1
  41. package/widgets/vis-2-widgets-inventwo/assets/createSvgIcon-BVtBa_de.js +0 -1
  42. package/widgets/vis-2-widgets-inventwo/assets/defaultTheme-B9IKJkvV.js +0 -16
  43. package/widgets/vis-2-widgets-inventwo/assets/hostInit-D8zJ8suC.js +0 -2
  44. package/widgets/vis-2-widgets-inventwo/assets/index-CdA3nOgT.js +0 -1
  45. package/widgets/vis-2-widgets-inventwo/assets/index-DGue0Sbd.js +0 -1
  46. package/widgets/vis-2-widgets-inventwo/assets/index-DZzhxPZw.js +0 -1
  47. package/widgets/vis-2-widgets-inventwo/assets/index-efZo-HwM.js +0 -9
  48. package/widgets/vis-2-widgets-inventwo/assets/jsx-runtime-C86LZJaJ.js +0 -9
  49. package/widgets/vis-2-widgets-inventwo/assets/preload-helper-CmmR0tKU.js +0 -1
  50. package/widgets/vis-2-widgets-inventwo/assets/styled-Ddrjhtlo.js +0 -7
  51. package/widgets/vis-2-widgets-inventwo/assets/tableRowClasses-Bn_tNoU4.js +0 -1
  52. package/widgets/vis-2-widgets-inventwo/assets/translations-TYtjXUYG.js +0 -1
  53. package/widgets/vis-2-widgets-inventwo/assets/useTheme-3EfQxciw.js +0 -1
  54. package/widgets/vis-2-widgets-inventwo/assets/virtualExposes-B-vfXZaV.js +0 -2
  55. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js +0 -1
  56. package/widgets/vis-2-widgets-inventwo/assets/vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js +0 -1
@@ -1,5 +1,6 @@
1
- (function(){if(!window.inventwoDebugLog){let r=function(n,o){const s=Array.from(o).map(a=>{if(typeof a=="object"&&a!==null)try{return JSON.stringify(a)}catch{return"[object]"}return String(a)}).join(" ");mylog.push({type:n,msg:s})};window.inventwoDebugLog=!0;const t={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let e=!1;["log","warn","error","debug"].forEach(function(n){console[n]=function(...o){r(n,o),t[n].apply(console,o)}}),setInterval(function(){const n=$(".mylog");if(!n||e)return;e=!0;const o=mylog.splice(0,mylog.length);o.forEach(s=>{n.append($("<div>").addClass(s.type).text("["+s.type+"] "+s.msg))}),o.length&&n.scrollTop(n[0].scrollHeight),e=!1},1e3)}})();var index_cjs$3={},index_cjs$2={},polyfills_cjs$1={};function _extends$2(){return _extends$2=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$2.apply(this,arguments)}function _object_without_properties_loose(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,s;for(s=0;s<n.length;s++)o=n[s],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}polyfills_cjs$1._extends=_extends$2;polyfills_cjs$1._object_without_properties_loose=_object_without_properties_loose;var index_cjs$1={},polyfills_cjs={};function _extends$1(){return _extends$1=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$1.apply(this,arguments)}polyfills_cjs._=_extends$1;var define_process_env_default={},polyfills$1=polyfills_cjs;const FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return typeof window<"u"&&typeof window.document<"u"}function isReactNativeEnv(){var t;return typeof navigator<"u"&&((t=navigator)==null?void 0:t.product)==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return!!localStorage.getItem(BROWSER_LOG_KEY)}catch{return!1}return!1}function isDebugMode(){return typeof process<"u"&&define_process_env_default&&define_process_env_default.FEDERATION_DEBUG?!!define_process_env_default.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:isBrowserDebug()}const getProcessEnv=function(){return typeof process<"u"&&define_process_env_default?define_process_env_default:{}},LOG_CATEGORY$1="[ Federation Runtime ]",parseEntry=(t,e,r=SEPARATOR)=>{const n=t.split(r),o=getProcessEnv().NODE_ENV==="development"&&e,s="*",a=i=>i.startsWith("http")||i.includes(MANIFEST_EXT);if(n.length>=2){let[i,...l]=n;t.startsWith(r)&&(i=n.slice(0,2).join(r),l=[o||n.slice(2).join(r)]);let c=o||l.join(r);return a(c)?{name:i,entry:c}:{name:i,version:c||s}}else if(n.length===1){const[i]=n;return o&&a(o)?{name:i,entry:o}:{name:i,version:o||s}}else throw`Invalid entry value: ${t}`},composeKeyWithSeparator=function(...t){return t.length?t.reduce((e,r)=>r?e?`${e}${SEPARATOR}${r}`:r:e,""):""},encodeName=function(t,e="",r=!1){try{const n=r?".js":"";return`${e}${t.replace(new RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},decodeName=function(t,e,r){try{let n=t;if(e){if(!n.startsWith(e))return n;n=n.replace(new RegExp(e,"g"),"")}return n=n.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},generateExposeFilename=(t,e)=>{if(!t)return"";let r=t;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",e)},generateShareFilename=(t,e)=>t?encodeName(t,"__federation_shared_",e):"",getResourceUrl=(t,e)=>{if("getPublicPath"in t){let r;return t.getPublicPath.startsWith("function")?r=new Function("return "+t.getPublicPath)()():r=new Function(t.getPublicPath)(),`${r}${e}`}else return"publicPath"in t?!isBrowserEnv()&&!isReactNativeEnv()&&"ssrPublicPath"in t?`${t.ssrPublicPath}${e}`:`${t.publicPath}${e}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",t,e),"")},assert$1=(t,e)=>{t||error$1(e)},error$1=t=>{throw new Error(`${LOG_CATEGORY$1}: ${t}`)},warn$1=t=>{console.warn(`${LOG_CATEGORY$1}: ${t}`)};function safeToString(t){try{return JSON.stringify(t,null,2)}catch{return""}}const VERSION_PATTERN_REGEXP=/^([\d^=v<>~]|[*xX]$)/;function isRequiredVersion(t){return VERSION_PATTERN_REGEXP.test(t)}const simpleJoinRemoteEntry=(t,e)=>{if(!t)return e;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})(t);return n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){var r,n;const{remotes:o={},overrides:s={},version:a}=e;let i;const l=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&a?inferAutoPublicPath(a):t.metaData.publicPath:t.metaData.getPublicPath,c=Object.keys(s);let u={};if(!Object.keys(o).length){var d;u=((d=t.remotes)==null?void 0:d.reduce((y,R)=>{let N;const T=R.federationContainerName;return c.includes(T)?N=s[T]:"version"in R?N=R.version:N=R.entry,y[T]={matchedVersion:N},y},{}))||{}}Object.keys(o).forEach(y=>u[y]={matchedVersion:c.includes(y)?s[y]:o[y]});const{remoteEntry:{path:h,name:m,type:_},types:E,buildInfo:{buildVersion:p},globalName:g,ssrRemoteEntry:I}=t.metaData,{exposes:S}=t;let b={version:a||"",buildVersion:p,globalName:g,remoteEntry:simpleJoinRemoteEntry(h,m),remoteEntryType:_,remoteTypes:simpleJoinRemoteEntry(E.path,E.name),remoteTypesZip:E.zip||"",remoteTypesAPI:E.api||"",remotesInfo:u,shared:t==null?void 0:t.shared.map(y=>({assets:y.assets,sharedName:y.name,version:y.version})),modules:S==null?void 0:S.map(y=>({moduleName:y.name,modulePath:y.path,assets:y.assets}))};if((r=t.metaData)!=null&&r.prefetchInterface){const y=t.metaData.prefetchInterface;b=polyfills$1._({},b,{prefetchInterface:y})}if((n=t.metaData)!=null&&n.prefetchEntry){const{path:y,name:R,type:N}=t.metaData.prefetchEntry;b=polyfills$1._({},b,{prefetchEntry:simpleJoinRemoteEntry(y,R),prefetchEntryType:N})}if("publicPath"in t.metaData?i=polyfills$1._({},b,{publicPath:l(),ssrPublicPath:t.metaData.ssrPublicPath}):i=polyfills$1._({},b,{getPublicPath:l()}),I){const y=simpleJoinRemoteEntry(I.path,I.name);i.ssrRemoteEntry=y,i.ssrRemoteEntryType=I.type||"commonjs-module"}return i}function isManifestProvider(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(MANIFEST_EXT))}const PREFIX="[ Module Federation ]";let Logger=class{setPrefix(e){this.prefix=e}log(...e){console.log(this.prefix,...e)}warn(...e){console.log(this.prefix,...e)}error(...e){console.log(this.prefix,...e)}success(...e){console.log(this.prefix,...e)}info(...e){console.log(this.prefix,...e)}ready(...e){console.log(this.prefix,...e)}debug(...e){isDebugMode()&&console.log(this.prefix,...e)}constructor(e){this.prefix=e}};function createLogger(t){return new Logger(t)}const logger$1=createLogger(PREFIX);async function safeWrapper$1(t,e){try{return await t()}catch(r){!e&&warn$1(r);return}}function isStaticResourcesEqual$1(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function createScript(t){let e=null,r=!0,n=2e4,o;const s=document.getElementsByTagName("script");for(let i=0;i<s.length;i++){const l=s[i],c=l.getAttribute("src");if(c&&isStaticResourcesEqual$1(c,t.url)){e=l,r=!1;break}}if(!e){const i=t.attrs;e=document.createElement("script"),e.type=(i==null?void 0:i.type)==="module"?"module":"text/javascript";let l;t.createScriptHook&&(l=t.createScriptHook(t.url,t.attrs),l instanceof HTMLScriptElement?e=l:typeof l=="object"&&("script"in l&&l.script&&(e=l.script),"timeout"in l&&l.timeout&&(n=l.timeout))),e.src||(e.src=t.url),i&&!l&&Object.keys(i).forEach(c=>{e&&(c==="async"||c==="defer"?e[c]=i[c]:e.getAttribute(c)||e.setAttribute(c,i[c]))})}const a=async(i,l)=>{clearTimeout(o);const c=()=>{(l==null?void 0:l.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(l)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteScript:u=!0}=t;u&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),i&&typeof i=="function")){const u=i(l);if(u instanceof Promise){const d=await u;return c(),d}return c(),u}c()};return e.onerror=a.bind(null,e.onerror),e.onload=a.bind(null,e.onload),o=setTimeout(()=>{a(null,new Error(`Remote script "${t.url}" time-outed.`))},n),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const n=document.getElementsByTagName("link");for(let s=0;s<n.length;s++){const a=n[s],i=a.getAttribute("href"),l=a.getAttribute("rel");if(i&&isStaticResourcesEqual$1(i,t.url)&&l===t.attrs.rel){e=a,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let s;const a=t.attrs;t.createLinkHook&&(s=t.createLinkHook(t.url,a),s instanceof HTMLLinkElement&&(e=s)),a&&!s&&Object.keys(a).forEach(i=>{e&&!e.getAttribute(i)&&e.setAttribute(i,a[i])})}const o=(s,a)=>{const i=()=>{(a==null?void 0:a.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(a)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteLink:l=!0}=t;l&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),s)){const l=s(a);return i(),l}i()};return e.onerror=o.bind(null,e.onerror),e.onload=o.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:n}=e;return new Promise((o,s)=>{const{script:a,needAttach:i}=createScript({url:t,cb:o,onErrorCallback:s,attrs:polyfills$1._({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});i&&document.head.appendChild(a)})}function importNodeModule(t){if(!t)throw new Error("import specifier is required");return new Function("name","return import(name)")(t).then(r=>r).catch(r=>{throw console.error(`Error importing module ${t}:`,r),r})}const loadNodeFetch=async()=>{const t=await importNodeModule("node-fetch");return t.default||t},lazyLoaderHookFetch=async(t,e,r)=>{const o=await((s,a)=>r.lifecycle.fetch.emit(s,a))(t,e||{});return!o||!(o instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):o},createScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(url,cb,attrs,loaderHook)=>{if(loaderHook!=null&&loaderHook.createScriptHook){const t=loaderHook.createScriptHook(url);t&&typeof t=="object"&&"url"in t&&(url=t.url)}let urlObj;try{urlObj=new URL(url)}catch(t){console.error("Error constructing URL:",t),cb(new Error(`Invalid URL: ${t}`));return}const getFetch=async()=>loaderHook!=null&&loaderHook.fetch?(t,e)=>lazyLoaderHookFetch(t,e,loaderHook):typeof fetch>"u"?loadNodeFetch():fetch,handleScriptFetch=async(f,urlObj)=>{try{var _vm_constants;const res=await f(urlObj.href),data=await res.text(),[path,vm]=await Promise.all([importNodeModule("path"),importNodeModule("vm")]),scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname);var _vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER;const script=new vm.Script(`(function(exports, module, require, __dirname, __filename) {${data}
2
- })`,{filename,importModuleDynamically:(_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER=(_vm_constants=vm.constants)==null?void 0:_vm_constants.USE_MAIN_CONTEXT_DEFAULT_LOADER)!=null?_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER:importNodeModule});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);const exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){const t=exportedInterface[attrs.globalName]||exportedInterface;cb(void 0,t);return}cb(void 0,exportedInterface)}catch(t){cb(t instanceof Error?t:new Error(`Script execution error: ${t}`))}};getFetch().then(async t=>{if((attrs==null?void 0:attrs.type)==="esm"||(attrs==null?void 0:attrs.type)==="module")return loadModule(urlObj.href,{fetch:t,vm:await importNodeModule("vm")}).then(async e=>{await e.evaluate(),cb(void 0,e.namespace)}).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(t,urlObj)}).catch(t=>{cb(t)})}:(t,e,r,n)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,n)=>{createScriptNode(t,(o,s)=>{if(o)n(o);else{var a,i;const l=(e==null||(a=e.attrs)==null?void 0:a.globalName)||`__FEDERATION_${e==null||(i=e.attrs)==null?void 0:i.name}:custom__`,c=globalThis[l]=s;r(c)}},e.attrs,e.loaderHook)}):(t,e)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};async function loadModule(t,e){const{fetch:r,vm:n}=e,s=await(await r(t)).text(),a=new n.SourceTextModule(s,{importModuleDynamically:async(i,l)=>{const c=new URL(i,t).href;return loadModule(c,e)}});return await a.link(async i=>{const l=new URL(i,t).href;return await loadModule(l,e)}),a}function normalizeOptions(t,e,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return t?e:!1;if(n===!0)return e;if(n&&typeof n=="object")return polyfills$1._({},e,n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}const createModuleFederationConfig=t=>t;index_cjs$1.BROWSER_LOG_KEY=BROWSER_LOG_KEY;index_cjs$1.ENCODE_NAME_PREFIX=ENCODE_NAME_PREFIX;index_cjs$1.EncodedNameTransformMap=EncodedNameTransformMap;index_cjs$1.FederationModuleManifest=FederationModuleManifest;index_cjs$1.MANIFEST_EXT=MANIFEST_EXT;index_cjs$1.MFModuleType=MFModuleType;index_cjs$1.MFPrefetchCommon=MFPrefetchCommon;index_cjs$1.MODULE_DEVTOOL_IDENTIFIER=MODULE_DEVTOOL_IDENTIFIER;index_cjs$1.ManifestFileName=ManifestFileName;index_cjs$1.NameTransformMap=NameTransformMap;index_cjs$1.NameTransformSymbol=NameTransformSymbol;index_cjs$1.SEPARATOR=SEPARATOR;index_cjs$1.StatsFileName=StatsFileName;index_cjs$1.TEMP_DIR=TEMP_DIR;index_cjs$1.assert=assert$1;index_cjs$1.composeKeyWithSeparator=composeKeyWithSeparator;index_cjs$1.containerPlugin=ContainerPlugin;index_cjs$1.containerReferencePlugin=ContainerReferencePlugin;index_cjs$1.createLink=createLink;index_cjs$1.createLogger=createLogger;index_cjs$1.createModuleFederationConfig=createModuleFederationConfig;index_cjs$1.createScript=createScript;index_cjs$1.createScriptNode=createScriptNode;index_cjs$1.decodeName=decodeName;index_cjs$1.encodeName=encodeName;index_cjs$1.error=error$1;index_cjs$1.generateExposeFilename=generateExposeFilename;index_cjs$1.generateShareFilename=generateShareFilename;index_cjs$1.generateSnapshotFromManifest=generateSnapshotFromManifest;index_cjs$1.getProcessEnv=getProcessEnv;index_cjs$1.getResourceUrl=getResourceUrl;index_cjs$1.inferAutoPublicPath=inferAutoPublicPath;index_cjs$1.isBrowserEnv=isBrowserEnv;index_cjs$1.isDebugMode=isDebugMode;index_cjs$1.isManifestProvider=isManifestProvider;index_cjs$1.isReactNativeEnv=isReactNativeEnv;index_cjs$1.isRequiredVersion=isRequiredVersion;index_cjs$1.isStaticResourcesEqual=isStaticResourcesEqual$1;index_cjs$1.loadScript=loadScript;index_cjs$1.loadScriptNode=loadScriptNode;index_cjs$1.logger=logger$1;index_cjs$1.moduleFederationPlugin=ModuleFederationPlugin;index_cjs$1.normalizeOptions=normalizeOptions;index_cjs$1.parseEntry=parseEntry;index_cjs$1.safeToString=safeToString;index_cjs$1.safeWrapper=safeWrapper$1;index_cjs$1.sharePlugin=SharePlugin;index_cjs$1.simpleJoinRemoteEntry=simpleJoinRemoteEntry;index_cjs$1.warn=warn$1;var index_cjs={};const RUNTIME_001="RUNTIME-001",RUNTIME_002="RUNTIME-002",RUNTIME_003="RUNTIME-003",RUNTIME_004="RUNTIME-004",RUNTIME_005="RUNTIME-005",RUNTIME_006="RUNTIME-006",RUNTIME_007="RUNTIME-007",RUNTIME_008="RUNTIME-008",RUNTIME_009="RUNTIME-009",TYPE_001="TYPE-001",BUILD_001="BUILD-001",BUILD_002="BUILD-002",getDocsUrl=t=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${t.split("-")[0].toLowerCase()}/${t}`,getShortErrorMsg=(t,e,r,n)=>{const o=[`${[e[t]]} #${t}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(getDocsUrl(t)),n&&o.push(`Original Error Message:
1
+ (function(){if(!window.inventwoDebugLog){let r=function(n,o,i){const a=Array.from(o).map(s=>{if(typeof s=="object"&&s!==null)try{return JSON.stringify(s)}catch{return"[object]"}return String(s)}).join(" ");mylog.push({type:n,msg:a,location:i})};window.inventwoDebugLog=!0;const t={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let e=!1;["log","warn","error","debug"].forEach(function(n){console[n]=function(...o){let i="";try{const a=new Error().stack;if(a){const s=a.split(`
2
+ `),l=s[2]||s[1];l&&(i=l.trim())}}catch{}r(n,o,i),t[n].apply(console,o)}}),setInterval(function(){const n=$(".mylog");if(!n||e)return;e=!0;const o=mylog.splice(0,mylog.length);o.forEach(i=>{n.append($("<div>").addClass(i.type).text("["+i.type+"] "+i.msg+(i.location?" @ "+i.location:"")))}),o.length&&n.scrollTop(n[0].scrollHeight),e=!1},1e3)}})();var index_cjs$3={},index_cjs$2={},polyfills_cjs$1={};function _extends$2(){return _extends$2=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$2.apply(this,arguments)}function _object_without_properties_loose(t,e){if(t==null)return{};var r={},n=Object.keys(t),o,i;for(i=0;i<n.length;i++)o=n[i],!(e.indexOf(o)>=0)&&(r[o]=t[o]);return r}polyfills_cjs$1._extends=_extends$2;polyfills_cjs$1._object_without_properties_loose=_object_without_properties_loose;var index_cjs$1={},polyfills_cjs={};function _extends$1(){return _extends$1=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends$1.apply(this,arguments)}polyfills_cjs._=_extends$1;var define_process_env_default={},polyfills$1=polyfills_cjs;const FederationModuleManifest="federation-manifest.json",MANIFEST_EXT=".json",BROWSER_LOG_KEY="FEDERATION_DEBUG",NameTransformSymbol={AT:"@",HYPHEN:"-",SLASH:"/"},NameTransformMap={[NameTransformSymbol.AT]:"scope_",[NameTransformSymbol.HYPHEN]:"_",[NameTransformSymbol.SLASH]:"__"},EncodedNameTransformMap={[NameTransformMap[NameTransformSymbol.AT]]:NameTransformSymbol.AT,[NameTransformMap[NameTransformSymbol.HYPHEN]]:NameTransformSymbol.HYPHEN,[NameTransformMap[NameTransformSymbol.SLASH]]:NameTransformSymbol.SLASH},SEPARATOR=":",ManifestFileName="mf-manifest.json",StatsFileName="mf-stats.json",MFModuleType={NPM:"npm",APP:"app"},MODULE_DEVTOOL_IDENTIFIER="__MF_DEVTOOLS_MODULE_INFO__",ENCODE_NAME_PREFIX="ENCODE_NAME_PREFIX",TEMP_DIR=".federation",MFPrefetchCommon={identifier:"MFDataPrefetch",globalKey:"__PREFETCH__",library:"mf-data-prefetch",exportsKey:"__PREFETCH_EXPORTS__",fileName:"bootstrap.js"};var ContainerPlugin=Object.freeze({__proto__:null}),ContainerReferencePlugin=Object.freeze({__proto__:null}),ModuleFederationPlugin=Object.freeze({__proto__:null}),SharePlugin=Object.freeze({__proto__:null});function isBrowserEnv(){return typeof window<"u"&&typeof window.document<"u"}function isReactNativeEnv(){var t;return typeof navigator<"u"&&((t=navigator)==null?void 0:t.product)==="ReactNative"}function isBrowserDebug(){try{if(isBrowserEnv()&&window.localStorage)return!!localStorage.getItem(BROWSER_LOG_KEY)}catch{return!1}return!1}function isDebugMode(){return typeof process<"u"&&define_process_env_default&&define_process_env_default.FEDERATION_DEBUG?!!define_process_env_default.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<"u"&&FEDERATION_DEBUG?!0:isBrowserDebug()}const getProcessEnv=function(){return typeof process<"u"&&define_process_env_default?define_process_env_default:{}},LOG_CATEGORY$1="[ Federation Runtime ]",parseEntry=(t,e,r=SEPARATOR)=>{const n=t.split(r),o=getProcessEnv().NODE_ENV==="development"&&e,i="*",a=s=>s.startsWith("http")||s.includes(MANIFEST_EXT);if(n.length>=2){let[s,...l]=n;t.startsWith(r)&&(s=n.slice(0,2).join(r),l=[o||n.slice(2).join(r)]);let c=o||l.join(r);return a(c)?{name:s,entry:c}:{name:s,version:c||i}}else if(n.length===1){const[s]=n;return o&&a(o)?{name:s,entry:o}:{name:s,version:o||i}}else throw`Invalid entry value: ${t}`},composeKeyWithSeparator=function(...t){return t.length?t.reduce((e,r)=>r?e?`${e}${SEPARATOR}${r}`:r:e,""):""},encodeName=function(t,e="",r=!1){try{const n=r?".js":"";return`${e}${t.replace(new RegExp(`${NameTransformSymbol.AT}`,"g"),NameTransformMap[NameTransformSymbol.AT]).replace(new RegExp(`${NameTransformSymbol.HYPHEN}`,"g"),NameTransformMap[NameTransformSymbol.HYPHEN]).replace(new RegExp(`${NameTransformSymbol.SLASH}`,"g"),NameTransformMap[NameTransformSymbol.SLASH])}${n}`}catch(n){throw n}},decodeName=function(t,e,r){try{let n=t;if(e){if(!n.startsWith(e))return n;n=n.replace(new RegExp(e,"g"),"")}return n=n.replace(new RegExp(`${NameTransformMap[NameTransformSymbol.AT]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.AT]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.SLASH]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.SLASH]]).replace(new RegExp(`${NameTransformMap[NameTransformSymbol.HYPHEN]}`,"g"),EncodedNameTransformMap[NameTransformMap[NameTransformSymbol.HYPHEN]]),r&&(n=n.replace(".js","")),n}catch(n){throw n}},generateExposeFilename=(t,e)=>{if(!t)return"";let r=t;return r==="."&&(r="default_export"),r.startsWith("./")&&(r=r.replace("./","")),encodeName(r,"__federation_expose_",e)},generateShareFilename=(t,e)=>t?encodeName(t,"__federation_shared_",e):"",getResourceUrl=(t,e)=>{if("getPublicPath"in t){let r;return t.getPublicPath.startsWith("function")?r=new Function("return "+t.getPublicPath)()():r=new Function(t.getPublicPath)(),`${r}${e}`}else return"publicPath"in t?!isBrowserEnv()&&!isReactNativeEnv()&&"ssrPublicPath"in t?`${t.ssrPublicPath}${e}`:`${t.publicPath}${e}`:(console.warn("Cannot get resource URL. If in debug mode, please ignore.",t,e),"")},assert$1=(t,e)=>{t||error$1(e)},error$1=t=>{throw new Error(`${LOG_CATEGORY$1}: ${t}`)},warn$1=t=>{console.warn(`${LOG_CATEGORY$1}: ${t}`)};function safeToString(t){try{return JSON.stringify(t,null,2)}catch{return""}}const VERSION_PATTERN_REGEXP=/^([\d^=v<>~]|[*xX]$)/;function isRequiredVersion(t){return VERSION_PATTERN_REGEXP.test(t)}const simpleJoinRemoteEntry=(t,e)=>{if(!t)return e;const n=(o=>{if(o===".")return"";if(o.startsWith("./"))return o.replace("./","");if(o.startsWith("/")){const i=o.slice(1);return i.endsWith("/")?i.slice(0,-1):i}return o})(t);return n?n.endsWith("/")?`${n}${e}`:`${n}/${e}`:e};function inferAutoPublicPath(t){return t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")}function generateSnapshotFromManifest(t,e={}){var r,n;const{remotes:o={},overrides:i={},version:a}=e;let s;const l=()=>"publicPath"in t.metaData?t.metaData.publicPath==="auto"&&a?inferAutoPublicPath(a):t.metaData.publicPath:t.metaData.getPublicPath,c=Object.keys(i);let u={};if(!Object.keys(o).length){var d;u=((d=t.remotes)==null?void 0:d.reduce((y,R)=>{let N;const T=R.federationContainerName;return c.includes(T)?N=i[T]:"version"in R?N=R.version:N=R.entry,y[T]={matchedVersion:N},y},{}))||{}}Object.keys(o).forEach(y=>u[y]={matchedVersion:c.includes(y)?i[y]:o[y]});const{remoteEntry:{path:h,name:m,type:_},types:E,buildInfo:{buildVersion:p},globalName:g,ssrRemoteEntry:I}=t.metaData,{exposes:S}=t;let b={version:a||"",buildVersion:p,globalName:g,remoteEntry:simpleJoinRemoteEntry(h,m),remoteEntryType:_,remoteTypes:simpleJoinRemoteEntry(E.path,E.name),remoteTypesZip:E.zip||"",remoteTypesAPI:E.api||"",remotesInfo:u,shared:t==null?void 0:t.shared.map(y=>({assets:y.assets,sharedName:y.name,version:y.version})),modules:S==null?void 0:S.map(y=>({moduleName:y.name,modulePath:y.path,assets:y.assets}))};if((r=t.metaData)!=null&&r.prefetchInterface){const y=t.metaData.prefetchInterface;b=polyfills$1._({},b,{prefetchInterface:y})}if((n=t.metaData)!=null&&n.prefetchEntry){const{path:y,name:R,type:N}=t.metaData.prefetchEntry;b=polyfills$1._({},b,{prefetchEntry:simpleJoinRemoteEntry(y,R),prefetchEntryType:N})}if("publicPath"in t.metaData?s=polyfills$1._({},b,{publicPath:l(),ssrPublicPath:t.metaData.ssrPublicPath}):s=polyfills$1._({},b,{getPublicPath:l()}),I){const y=simpleJoinRemoteEntry(I.path,I.name);s.ssrRemoteEntry=y,s.ssrRemoteEntryType=I.type||"commonjs-module"}return s}function isManifestProvider(t){return!!("remoteEntry"in t&&t.remoteEntry.includes(MANIFEST_EXT))}const PREFIX="[ Module Federation ]";let Logger=class{setPrefix(e){this.prefix=e}log(...e){console.log(this.prefix,...e)}warn(...e){console.log(this.prefix,...e)}error(...e){console.log(this.prefix,...e)}success(...e){console.log(this.prefix,...e)}info(...e){console.log(this.prefix,...e)}ready(...e){console.log(this.prefix,...e)}debug(...e){isDebugMode()&&console.log(this.prefix,...e)}constructor(e){this.prefix=e}};function createLogger(t){return new Logger(t)}const logger$1=createLogger(PREFIX);async function safeWrapper$1(t,e){try{return await t()}catch(r){!e&&warn$1(r);return}}function isStaticResourcesEqual$1(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function createScript(t){let e=null,r=!0,n=2e4,o;const i=document.getElementsByTagName("script");for(let s=0;s<i.length;s++){const l=i[s],c=l.getAttribute("src");if(c&&isStaticResourcesEqual$1(c,t.url)){e=l,r=!1;break}}if(!e){const s=t.attrs;e=document.createElement("script"),e.type=(s==null?void 0:s.type)==="module"?"module":"text/javascript";let l;t.createScriptHook&&(l=t.createScriptHook(t.url,t.attrs),l instanceof HTMLScriptElement?e=l:typeof l=="object"&&("script"in l&&l.script&&(e=l.script),"timeout"in l&&l.timeout&&(n=l.timeout))),e.src||(e.src=t.url),s&&!l&&Object.keys(s).forEach(c=>{e&&(c==="async"||c==="defer"?e[c]=s[c]:e.getAttribute(c)||e.setAttribute(c,s[c]))})}const a=async(s,l)=>{clearTimeout(o);const c=()=>{(l==null?void 0:l.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(l)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteScript:u=!0}=t;u&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),s&&typeof s=="function")){const u=s(l);if(u instanceof Promise){const d=await u;return c(),d}return c(),u}c()};return e.onerror=a.bind(null,e.onerror),e.onload=a.bind(null,e.onload),o=setTimeout(()=>{a(null,new Error(`Remote script "${t.url}" time-outed.`))},n),{script:e,needAttach:r}}function createLink(t){let e=null,r=!0;const n=document.getElementsByTagName("link");for(let i=0;i<n.length;i++){const a=n[i],s=a.getAttribute("href"),l=a.getAttribute("rel");if(s&&isStaticResourcesEqual$1(s,t.url)&&l===t.attrs.rel){e=a,r=!1;break}}if(!e){e=document.createElement("link"),e.setAttribute("href",t.url);let i;const a=t.attrs;t.createLinkHook&&(i=t.createLinkHook(t.url,a),i instanceof HTMLLinkElement&&(e=i)),a&&!i&&Object.keys(a).forEach(s=>{e&&!e.getAttribute(s)&&e.setAttribute(s,a[s])})}const o=(i,a)=>{const s=()=>{(a==null?void 0:a.type)==="error"?t!=null&&t.onErrorCallback&&(t==null||t.onErrorCallback(a)):t!=null&&t.cb&&(t==null||t.cb())};if(e&&(e.onerror=null,e.onload=null,safeWrapper$1(()=>{const{needDeleteLink:l=!0}=t;l&&e!=null&&e.parentNode&&e.parentNode.removeChild(e)}),i)){const l=i(a);return s(),l}s()};return e.onerror=o.bind(null,e.onerror),e.onload=o.bind(null,e.onload),{link:e,needAttach:r}}function loadScript(t,e){const{attrs:r={},createScriptHook:n}=e;return new Promise((o,i)=>{const{script:a,needAttach:s}=createScript({url:t,cb:o,onErrorCallback:i,attrs:polyfills$1._({fetchpriority:"high"},r),createScriptHook:n,needDeleteScript:!0});s&&document.head.appendChild(a)})}function importNodeModule(t){if(!t)throw new Error("import specifier is required");return new Function("name","return import(name)")(t).then(r=>r).catch(r=>{throw console.error(`Error importing module ${t}:`,r),r})}const loadNodeFetch=async()=>{const t=await importNodeModule("node-fetch");return t.default||t},lazyLoaderHookFetch=async(t,e,r)=>{const o=await((i,a)=>r.lifecycle.fetch.emit(i,a))(t,e||{});return!o||!(o instanceof Response)?(typeof fetch>"u"?await loadNodeFetch():fetch)(t,e||{}):o},createScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(url,cb,attrs,loaderHook)=>{if(loaderHook!=null&&loaderHook.createScriptHook){const t=loaderHook.createScriptHook(url);t&&typeof t=="object"&&"url"in t&&(url=t.url)}let urlObj;try{urlObj=new URL(url)}catch(t){console.error("Error constructing URL:",t),cb(new Error(`Invalid URL: ${t}`));return}const getFetch=async()=>loaderHook!=null&&loaderHook.fetch?(t,e)=>lazyLoaderHookFetch(t,e,loaderHook):typeof fetch>"u"?loadNodeFetch():fetch,handleScriptFetch=async(f,urlObj)=>{try{var _vm_constants;const res=await f(urlObj.href),data=await res.text(),[path,vm]=await Promise.all([importNodeModule("path"),importNodeModule("vm")]),scriptContext={exports:{},module:{exports:{}}},urlDirname=urlObj.pathname.split("/").slice(0,-1).join("/"),filename=path.basename(urlObj.pathname);var _vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER;const script=new vm.Script(`(function(exports, module, require, __dirname, __filename) {${data}
3
+ })`,{filename,importModuleDynamically:(_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER=(_vm_constants=vm.constants)==null?void 0:_vm_constants.USE_MAIN_CONTEXT_DEFAULT_LOADER)!=null?_vm_constants_USE_MAIN_CONTEXT_DEFAULT_LOADER:importNodeModule});script.runInThisContext()(scriptContext.exports,scriptContext.module,eval("require"),urlDirname,filename);const exportedInterface=scriptContext.module.exports||scriptContext.exports;if(attrs&&exportedInterface&&attrs.globalName){const t=exportedInterface[attrs.globalName]||exportedInterface;cb(void 0,t);return}cb(void 0,exportedInterface)}catch(t){cb(t instanceof Error?t:new Error(`Script execution error: ${t}`))}};getFetch().then(async t=>{if((attrs==null?void 0:attrs.type)==="esm"||(attrs==null?void 0:attrs.type)==="module")return loadModule(urlObj.href,{fetch:t,vm:await importNodeModule("vm")}).then(async e=>{await e.evaluate(),cb(void 0,e.namespace)}).catch(e=>{cb(e instanceof Error?e:new Error(`Script execution error: ${e}`))});handleScriptFetch(t,urlObj)}).catch(t=>{cb(t)})}:(t,e,r,n)=>{e(new Error("createScriptNode is disabled in non-Node.js environment"))},loadScriptNode=typeof ENV_TARGET>"u"||ENV_TARGET!=="web"?(t,e)=>new Promise((r,n)=>{createScriptNode(t,(o,i)=>{if(o)n(o);else{var a,s;const l=(e==null||(a=e.attrs)==null?void 0:a.globalName)||`__FEDERATION_${e==null||(s=e.attrs)==null?void 0:s.name}:custom__`,c=globalThis[l]=i;r(c)}},e.attrs,e.loaderHook)}):(t,e)=>{throw new Error("loadScriptNode is disabled in non-Node.js environment")};async function loadModule(t,e){const{fetch:r,vm:n}=e,i=await(await r(t)).text(),a=new n.SourceTextModule(i,{importModuleDynamically:async(s,l)=>{const c=new URL(s,t).href;return loadModule(c,e)}});return await a.link(async s=>{const l=new URL(s,t).href;return await loadModule(l,e)}),a}function normalizeOptions(t,e,r){return function(n){if(n===!1)return!1;if(typeof n>"u")return t?e:!1;if(n===!0)return e;if(n&&typeof n=="object")return polyfills$1._({},e,n);throw new Error(`Unexpected type for \`${r}\`, expect boolean/undefined/object, got: ${typeof n}`)}}const createModuleFederationConfig=t=>t;index_cjs$1.BROWSER_LOG_KEY=BROWSER_LOG_KEY;index_cjs$1.ENCODE_NAME_PREFIX=ENCODE_NAME_PREFIX;index_cjs$1.EncodedNameTransformMap=EncodedNameTransformMap;index_cjs$1.FederationModuleManifest=FederationModuleManifest;index_cjs$1.MANIFEST_EXT=MANIFEST_EXT;index_cjs$1.MFModuleType=MFModuleType;index_cjs$1.MFPrefetchCommon=MFPrefetchCommon;index_cjs$1.MODULE_DEVTOOL_IDENTIFIER=MODULE_DEVTOOL_IDENTIFIER;index_cjs$1.ManifestFileName=ManifestFileName;index_cjs$1.NameTransformMap=NameTransformMap;index_cjs$1.NameTransformSymbol=NameTransformSymbol;index_cjs$1.SEPARATOR=SEPARATOR;index_cjs$1.StatsFileName=StatsFileName;index_cjs$1.TEMP_DIR=TEMP_DIR;index_cjs$1.assert=assert$1;index_cjs$1.composeKeyWithSeparator=composeKeyWithSeparator;index_cjs$1.containerPlugin=ContainerPlugin;index_cjs$1.containerReferencePlugin=ContainerReferencePlugin;index_cjs$1.createLink=createLink;index_cjs$1.createLogger=createLogger;index_cjs$1.createModuleFederationConfig=createModuleFederationConfig;index_cjs$1.createScript=createScript;index_cjs$1.createScriptNode=createScriptNode;index_cjs$1.decodeName=decodeName;index_cjs$1.encodeName=encodeName;index_cjs$1.error=error$1;index_cjs$1.generateExposeFilename=generateExposeFilename;index_cjs$1.generateShareFilename=generateShareFilename;index_cjs$1.generateSnapshotFromManifest=generateSnapshotFromManifest;index_cjs$1.getProcessEnv=getProcessEnv;index_cjs$1.getResourceUrl=getResourceUrl;index_cjs$1.inferAutoPublicPath=inferAutoPublicPath;index_cjs$1.isBrowserEnv=isBrowserEnv;index_cjs$1.isDebugMode=isDebugMode;index_cjs$1.isManifestProvider=isManifestProvider;index_cjs$1.isReactNativeEnv=isReactNativeEnv;index_cjs$1.isRequiredVersion=isRequiredVersion;index_cjs$1.isStaticResourcesEqual=isStaticResourcesEqual$1;index_cjs$1.loadScript=loadScript;index_cjs$1.loadScriptNode=loadScriptNode;index_cjs$1.logger=logger$1;index_cjs$1.moduleFederationPlugin=ModuleFederationPlugin;index_cjs$1.normalizeOptions=normalizeOptions;index_cjs$1.parseEntry=parseEntry;index_cjs$1.safeToString=safeToString;index_cjs$1.safeWrapper=safeWrapper$1;index_cjs$1.sharePlugin=SharePlugin;index_cjs$1.simpleJoinRemoteEntry=simpleJoinRemoteEntry;index_cjs$1.warn=warn$1;var index_cjs={};const RUNTIME_001="RUNTIME-001",RUNTIME_002="RUNTIME-002",RUNTIME_003="RUNTIME-003",RUNTIME_004="RUNTIME-004",RUNTIME_005="RUNTIME-005",RUNTIME_006="RUNTIME-006",RUNTIME_007="RUNTIME-007",RUNTIME_008="RUNTIME-008",RUNTIME_009="RUNTIME-009",TYPE_001="TYPE-001",BUILD_001="BUILD-001",BUILD_002="BUILD-002",getDocsUrl=t=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${t.split("-")[0].toLowerCase()}/${t}`,getShortErrorMsg=(t,e,r,n)=>{const o=[`${[e[t]]} #${t}`];return r&&o.push(`args: ${JSON.stringify(r)}`),o.push(getDocsUrl(t)),n&&o.push(`Original Error Message:
3
4
  ${n}`),o.join(`
4
- `)};function _extends(){return _extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(this,arguments)}const runtimeDescMap={[RUNTIME_001]:"Failed to get remoteEntry exports.",[RUNTIME_002]:'The remote entry interface does not contain "init"',[RUNTIME_003]:"Failed to get manifest.",[RUNTIME_004]:"Failed to locate remote.",[RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[RUNTIME_006]:"Invalid loadShareSync function call from runtime",[RUNTIME_007]:"Failed to get remote snapshot.",[RUNTIME_008]:"Failed to load script resources.",[RUNTIME_009]:"Please call createInstance first."},typeDescMap={[TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},buildDescMap={[BUILD_001]:"Failed to find expose module.",[BUILD_002]:"PublicPath is required in prod mode."},errorDescMap=_extends({},runtimeDescMap,typeDescMap,buildDescMap);index_cjs.BUILD_001=BUILD_001;index_cjs.BUILD_002=BUILD_002;index_cjs.RUNTIME_001=RUNTIME_001;index_cjs.RUNTIME_002=RUNTIME_002;index_cjs.RUNTIME_003=RUNTIME_003;index_cjs.RUNTIME_004=RUNTIME_004;index_cjs.RUNTIME_005=RUNTIME_005;index_cjs.RUNTIME_006=RUNTIME_006;index_cjs.RUNTIME_007=RUNTIME_007;index_cjs.RUNTIME_008=RUNTIME_008;index_cjs.RUNTIME_009=RUNTIME_009;index_cjs.TYPE_001=TYPE_001;index_cjs.buildDescMap=buildDescMap;index_cjs.errorDescMap=errorDescMap;index_cjs.getShortErrorMsg=getShortErrorMsg;index_cjs.runtimeDescMap=runtimeDescMap;index_cjs.typeDescMap=typeDescMap;var polyfills=polyfills_cjs$1,sdk=index_cjs$1,errorCodes$1=index_cjs;const LOG_CATEGORY="[ Federation Runtime ]",logger=sdk.createLogger(LOG_CATEGORY);function assert(t,e){t||error(e)}function error(t){throw t instanceof Error?(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`),t):new Error(`${LOG_CATEGORY}: ${t}`)}function warn(t){t instanceof Error&&(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`)),logger.warn(t)}function addUniqueItem(t,e){return t.findIndex(r=>r===e)===-1&&t.push(e),t}function getFMId(t){return"version"in t&&t.version?`${t.name}:${t.version}`:"entry"in t&&t.entry?`${t.name}:${t.entry}`:`${t.name}`}function isRemoteInfoWithEntry(t){return typeof t.entry<"u"}function isPureRemoteEntry(t){return!t.entry.includes(".json")}async function safeWrapper(t,e){try{return await t()}catch(r){!e&&warn(r);return}}function isObject(t){return t&&typeof t=="object"}const objectToString=Object.prototype.toString;function isPlainObject(t){return objectToString.call(t)==="[object Object]"}function isStaticResourcesEqual(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function arrayOptions(t){return Array.isArray(t)?t:[t]}function getRemoteEntryInfoFromSnapshot(t){const e={url:"",type:"global",globalName:""};return sdk.isBrowserEnv()||sdk.isReactNativeEnv()?"remoteEntry"in t?{url:t.remoteEntry,type:t.remoteEntryType,globalName:t.globalName}:e:"ssrRemoteEntry"in t?{url:t.ssrRemoteEntry||e.url,type:t.ssrRemoteEntryType||e.type,globalName:t.globalName}:e}const processModuleAlias=(t,e)=>{let r;return t.endsWith("/")?r=t.slice(0,-1):r=t,e.startsWith(".")&&(e=e.slice(1)),r=r+e,r},CurrentGlobal=typeof globalThis=="object"?globalThis:window,nativeGlobal=(()=>{try{return document.defaultView}catch{return CurrentGlobal}})(),Global=nativeGlobal;function definePropertyGlobalVal(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,writable:!0})}function includeOwnProperty(t,e){return Object.hasOwnProperty.call(t,e)}includeOwnProperty(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__")||definePropertyGlobalVal(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const globalLoading=CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;function setGlobalDefaultVal(t){var e,r,n,o,s,a;includeOwnProperty(t,"__VMOK__")&&!includeOwnProperty(t,"__FEDERATION__")&&definePropertyGlobalVal(t,"__FEDERATION__",t.__VMOK__),includeOwnProperty(t,"__FEDERATION__")||(definePropertyGlobalVal(t,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),definePropertyGlobalVal(t,"__VMOK__",t.__FEDERATION__));var i;(i=(e=t.__FEDERATION__).__GLOBAL_PLUGIN__)!=null||(e.__GLOBAL_PLUGIN__=[]);var l;(l=(r=t.__FEDERATION__).__INSTANCES__)!=null||(r.__INSTANCES__=[]);var c;(c=(n=t.__FEDERATION__).moduleInfo)!=null||(n.moduleInfo={});var u;(u=(o=t.__FEDERATION__).__SHARE__)!=null||(o.__SHARE__={});var d;(d=(s=t.__FEDERATION__).__MANIFEST_LOADING__)!=null||(s.__MANIFEST_LOADING__={});var h;(h=(a=t.__FEDERATION__).__PRELOADED_MAP__)!=null||(a.__PRELOADED_MAP__=new Map)}setGlobalDefaultVal(CurrentGlobal);setGlobalDefaultVal(nativeGlobal);function resetFederationGlobalInfo(){CurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__=[],CurrentGlobal.__FEDERATION__.__INSTANCES__=[],CurrentGlobal.__FEDERATION__.moduleInfo={},CurrentGlobal.__FEDERATION__.__SHARE__={},CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(globalLoading).forEach(t=>{delete globalLoading[t]})}function setGlobalFederationInstance(t){CurrentGlobal.__FEDERATION__.__INSTANCES__.push(t)}function getGlobalFederationConstructor(){return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function setGlobalFederationConstructor(t,e=sdk.isDebugMode()){e&&(CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.17.1")}function getInfoWithoutType(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const n=Object.keys(t);for(const o of n){const[s,a]=o.split(":"),i=`${s}:${e}`,l=t[i];if(l)return{value:l,key:i}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const getGlobalSnapshot=()=>nativeGlobal.__FEDERATION__.moduleInfo,getTargetSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t),n=getInfoWithoutType(e,r).value;if(n&&!n.version&&"version"in t&&t.version&&(n.version=t.version),n)return n;if("version"in t&&t.version){const{version:o}=t,s=polyfills._object_without_properties_loose(t,["version"]),a=getFMId(s),i=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,a).value;if((i==null?void 0:i.version)===o)return i}},getGlobalSnapshotInfoByModuleInfo=t=>getTargetSnapshotInfoByModuleInfo(t,nativeGlobal.__FEDERATION__.moduleInfo),setGlobalSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t);return nativeGlobal.__FEDERATION__.moduleInfo[r]=e,nativeGlobal.__FEDERATION__.moduleInfo},addGlobalSnapshot=t=>(nativeGlobal.__FEDERATION__.moduleInfo=polyfills._extends({},nativeGlobal.__FEDERATION__.moduleInfo,t),()=>{const e=Object.keys(t);for(const r of e)delete nativeGlobal.__FEDERATION__.moduleInfo[r]}),getRemoteEntryExports=(t,e)=>{const r=e||`__FEDERATION_${t}:custom__`,n=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:n}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(n=>n.name===r.name)===-1?e.push(r):warn(`The plugin ${r.name} has been registered.`)})},getGlobalHostPlugins=()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__,getPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(t),setPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(t,!0),DEFAULT_SCOPE="default",DEFAULT_REMOTE_TYPE="global",buildIdentifier="[0-9A-Za-z-]+",build=`(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`,numericIdentifier="0|[1-9]\\d*",numericIdentifierLoose="[0-9]+",nonNumericIdentifier="\\d*[a-zA-Z-][a-zA-Z0-9-]*",preReleaseIdentifierLoose=`(?:${numericIdentifierLoose}|${nonNumericIdentifier})`,preReleaseLoose=`(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`,preReleaseIdentifier=`(?:${numericIdentifier}|${nonNumericIdentifier})`,preRelease=`(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`,xRangeIdentifier=`${numericIdentifier}|x|X|\\*`,xRangePlain=`[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`,hyphenRange=`^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`,mainVersionLoose=`(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`,loosePlain=`[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`,gtlt="((?:<|>)?=?)",comparatorTrim=`(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`,loneTilde="(?:~>?)",tildeTrim=`(\\s*)${loneTilde}\\s+`,loneCaret="(?:\\^)",caretTrim=`(\\s*)${loneCaret}\\s+`,star="(<|>)?=?\\s*\\*",caret=`^${loneCaret}${xRangePlain}$`,mainVersion=`(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`,fullPlain=`v?${mainVersion}${preRelease}?${build}?`,tilde=`^${loneTilde}${xRangePlain}$`,xRange=`^${gtlt}\\s*${xRangePlain}$`,comparator=`^${gtlt}\\s*(${fullPlain})$|^$`,gte0="^\\s*>=\\s*0.0.0\\s*$";function parseRegex(t){return new RegExp(t)}function isXVersion(t){return!t||t.toLowerCase()==="x"||t==="*"}function pipe(...t){return e=>t.reduce((r,n)=>n(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,n){const o=`${t}.${e}.${r}`;return n?`${o}-${n}`:o}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,n,o,s,a,i,l,c,u,d,h)=>(isXVersion(n)?r="":isXVersion(o)?r=`>=${n}.0.0`:isXVersion(s)?r=`>=${n}.${o}.0`:r=`>=${r}`,isXVersion(c)?l="":isXVersion(u)?l=`<${Number(c)+1}.0.0-0`:isXVersion(d)?l=`<${c}.${Number(u)+1}.0-0`:h?l=`<=${c}.${u}.${d}-${h}`:l=`<=${l}`,`${r} ${l}`.trim()))}function parseComparatorTrim(t){return t.replace(parseRegex(comparatorTrim),"$1$2$3")}function parseTildeTrim(t){return t.replace(parseRegex(tildeTrim),"$1~")}function parseCaretTrim(t){return t.replace(parseRegex(caretTrim),"$1^")}function parseCarets(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(caret),(r,n,o,s,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(s)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:a?n==="0"?o==="0"?`>=${n}.${o}.${s}-${a} <${n}.${o}.${Number(s)+1}-0`:`>=${n}.${o}.${s}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s}-${a} <${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 parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,n,o,s,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(s)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:a?`>=${n}.${o}.${s}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${s} <${n}.${Number(o)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,n,o,s,a,i)=>{const l=isXVersion(o),c=l||isXVersion(s),u=c||isXVersion(a);return n==="="&&u&&(n=""),i="",l?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(c&&(s=0),a=0,n===">"?(n=">=",c?(o=Number(o)+1,s=0,a=0):(s=Number(s)+1,a=0)):n==="<="&&(n="<",c?o=Number(o)+1:s=Number(s)+1),n==="<"&&(i="-0"),`${n+o}.${s}.${a}${i}`):c?`>=${o}.0.0${i} <${Number(o)+1}.0.0-0`:u?`>=${o}.${s}.0${i} <${o}.${Number(s)+1}.0-0`:r})).join(" ")}function parseStar(t){return t.trim().replace(parseRegex(star),"")}function parseGTE0(t){return t.trim().replace(parseRegex(gte0),"")}function compareAtom(t,e){return t=Number(t)||t,e=Number(e)||e,t>e?1:t===e?0:-1}function comparePreRelease(t,e){const{preRelease:r}=t,{preRelease:n}=e;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 a=r[o],i=n[o];if(a!==i)return a===void 0&&i===void 0?0:a?i?compareAtom(a,i):-1:1}return 0}function compareVersion(t,e){return compareAtom(t.major,e.major)||compareAtom(t.minor,e.minor)||compareAtom(t.patch,e.patch)||comparePreRelease(t,e)}function eq(t,e){return t.version===e.version}function compare(t,e){switch(t.operator){case"":case"=":return eq(t,e);case">":return compareVersion(t,e)<0;case">=":return eq(t,e)||compareVersion(t,e)<0;case"<":return compareVersion(t,e)>0;case"<=":return eq(t,e)||compareVersion(t,e)>0;case void 0:return!0;default:return!1}}function parseComparatorString(t){return pipe(parseCarets,parseTildes,parseXRanges,parseStar)(t)}function parseRange(t){return pipe(parseHyphen,parseComparatorTrim,parseTildeTrim,parseCaretTrim)(t.trim()).split(/\s+/).join(" ")}function satisfy(t,e){if(!t)return!1;const r=extractComparator(t);if(!r)return!1;const[,n,,o,s,a,i]=r,l={operator:n,version:combineVersion(o,s,a,i),major:o,minor:s,patch:a,preRelease:i==null?void 0:i.split(".")},c=e.split("||");for(const u of c){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const h=parseRange(d);if(!h.trim())return!0;const m=h.split(" ").map(p=>parseComparatorString(p)).join(" ");if(!m.trim())return!0;const _=m.split(/\s+/).map(p=>parseGTE0(p)).filter(Boolean);if(_.length===0)continue;let E=!0;for(const p of _){const g=extractComparator(p);if(!g){E=!1;break}const[,I,,S,b,y,R]=g,N={operator:I,version:combineVersion(S,b,y,R),major:S,minor:b,patch:y,preRelease:R==null?void 0:R.split(".")};if(!compare(N,l)){E=!1;break}}if(E)return!0}catch(h){console.error(`[semver] Error processing range part "${d}":`,h);continue}}return!1}function formatShare(t,e,r,n){let o;"get"in t?o=t.get:"lib"in t?o=()=>Promise.resolve(t.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)});var s,a,i;return polyfills._extends({deps:[],useIn:[],from:e,loading:null},t,{shareConfig:polyfills._extends({requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1},t.shareConfig),get:o,loaded:t!=null&&t.loaded||"lib"in t?!0:void 0,version:(s=t.version)!=null?s:"0",scope:Array.isArray(t.scope)?t.scope:[(a=t.scope)!=null?a:"default"],strategy:((i=t.strategy)!=null?i:n)||"version-first"})}function formatShareConfigs(t,e){const r=e.shared||{},n=e.name,o=Object.keys(r).reduce((a,i)=>{const l=arrayOptions(r[i]);return a[i]=a[i]||[],l.forEach(c=>{a[i].push(formatShare(c,n,i,e.shareStrategy))}),a},{}),s=polyfills._extends({},t.shared);return Object.keys(o).forEach(a=>{s[a]?o[a].forEach(i=>{s[a].find(c=>c.version===i.version)||s[a].push(i)}):s[a]=o[a]}),{shared:s,shareInfos:o}}function versionLt(t,e){const r=n=>{if(!Number.isNaN(Number(n))){const s=n.split(".");let a=n;for(let i=0;i<3-s.length;i++)a+=".0";return a}return n};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(n,o){return versionLt(n,o)};return Object.keys(t).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const n=t[e][r],o=function(s,a){return!isLoaded(n[s])&&versionLt(s,a)};return findVersion(t[e][r],o)}function findSingletonVersionOrderByLoaded(t,e,r){const n=t[e][r],o=function(s,a){const i=l=>isLoaded(l)||isLoading(l);return i(n[a])?i(n[s])?!!versionLt(s,a):!0:i(n[s])?!1:versionLt(s,a)};return findVersion(t[e][r],o)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,n){if(!t)return;const{shareConfig:o,scope:s=DEFAULT_SCOPE,strategy:a}=r,i=Array.isArray(s)?s:[s];for(const l of i)if(o&&t[l]&&t[l][e]){const{requiredVersion:c}=o,d=getFindShareFunction(a)(t,l,e),h=()=>{if(o.singleton){if(typeof c=="string"&&!satisfy(d,c)){const E=`Version ${d} from ${d&&t[l][e][d].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${c})`;o.strictVersion?error(E):warn(E)}return t[l][e][d]}else{if(c===!1||c==="*"||satisfy(d,c))return t[l][e][d];for(const[E,p]of Object.entries(t[l][e]))if(satisfy(E,c))return p}},m={shareScopeMap:t,scope:l,pkgName:e,version:d,GlobalFederation:Global.__FEDERATION__,resolver:h};return(n.emit(m)||m).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:n}=t,o=i=>{if(!i)return;const l={};i.forEach(d=>{l[d.version]=d});const u=findVersion(l,function(d,h){return!isLoaded(l[d])&&versionLt(d,h)});return l[u]};var s;const a=(s=r==null?void 0:r.resolver)!=null?s:o;return Object.assign({},a(n[e]),r==null?void 0:r.customShareInfo)}function getBuilderId$1(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function matchRemoteWithNameAndExpose(t,e){for(const r of t){const n=e.startsWith(r.name);let o=e.replace(r.name,"");if(n){if(o.startsWith("/")){const i=r.name;return o=`.${o}`,{pkgNameOrAlias:i,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const s=r.alias&&e.startsWith(r.alias);let a=r.alias&&e.replace(r.alias,"");if(r.alias&&s){if(a&&a.startsWith("/")){const i=r.alias;return a=`.${a}`,{pkgNameOrAlias:i,expose:a,remote:r}}else if(a==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function matchRemote(t,e){for(const r of t)if(e===r.name||r.alias&&e===r.alias)return r}function registerPlugins$1(t,e){const r=getGlobalHostPlugins(),n=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(o=>{t!=null&&t.find(s=>s.name!==o.name)&&t.push(o)}),t&&t.length>0&&t.forEach(o=>{n.forEach(s=>{s.applyPlugin(o,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,n]):import(t).then(r).catch(n)}catch(o){n(o)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(n):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,n])}catch(o){n(o)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:n,entryExports:o}=getRemoteEntryExports(t,e);return assert(o,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_001,errorCodes$1.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:n})),o}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:n}){const{entryExports:o}=getRemoteEntryExports(t,e);return o||sdk.loadScript(r,{attrs:{},createScriptHook:(s,a)=>{const i=n.lifecycle.createScript.emit({url:s,attrs:a});if(i&&(i instanceof HTMLScriptElement||"script"in i||"timeout"in i))return i}}).then(()=>handleRemoteEntryLoaded(t,e,r)).catch(s=>{throw assert(void 0,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_008,errorCodes$1.runtimeDescMap,{remoteName:t,resourceUrl:r})),s})}async function loadEntryDom({remoteInfo:t,remoteEntryExports:e,loaderHook:r}){const{entry:n,entryGlobalName:o,name:s,type:a}=t;switch(a){case"esm":case"module":return loadEsmEntry({entry:n,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:n,remoteEntryExports:e});default:return loadEntryScript({entry:n,globalName:o,name:s,loaderHook:r})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:n,name:o,type:s}=t,{entryExports:a}=getRemoteEntryExports(o,n);return a||sdk.loadScriptNode(r,{attrs:{name:o,globalName:n,type:s},loaderHook:{createScriptHook:(i,l={})=>{const c=e.lifecycle.createScript.emit({url:i,attrs:l});if(c&&"url"in c)return c}}}).then(()=>handleRemoteEntryLoaded(o,n,r)).catch(i=>{throw i})}function getRemoteEntryUniqueKey(t){const{entry:e,name:r}=t;return sdk.composeKeyWithSeparator(r,e)}async function getRemoteEntry({origin:t,remoteEntryExports:e,remoteInfo:r}){const n=getRemoteEntryUniqueKey(r);if(e)return e;if(!globalLoading[n]){const o=t.remoteHandler.hooks.lifecycle.loadEntry,s=t.loaderHook;globalLoading[n]=o.emit({loaderHook:s,remoteInfo:r,remoteEntryExports:e}).then(a=>a||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:r,remoteEntryExports:e,loaderHook:s}):loadEntryNode({remoteInfo:r,loaderHook:s})))}return globalLoading[n]}function getRemoteInfo(t){return polyfills._extends({},t,{entry:"entry"in t?t.entry:"",type:t.type||DEFAULT_REMOTE_TYPE,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||DEFAULT_SCOPE})}function defaultPreloadArgs(t){return polyfills._extends({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},t)}function formatPreloadArgs(t,e){return e.map(r=>{const n=matchRemote(t,r.nameOrAlias);return assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&sdk.safeToString({remoteInfo:n,remotes:t})}`),{remote:n,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:a}=r;if(e.options.inBrowser){if(a.forEach(i=>{const{moduleInfo:l}=i,c=e.moduleCache.get(t.name);getRemoteEntry(c?{origin:e,remoteInfo:l,remoteEntryExports:c.remoteEntryExports}:{origin:e,remoteInfo:l,remoteEntryExports:void 0})}),n){const i={rel:"preload",as:"style"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:i,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m}});u&&document.head.appendChild(c)})}else{const i={rel:"stylesheet",type:"text/css"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:i,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m},needDeleteLink:!1});u&&document.head.appendChild(c)})}if(n){const i={rel:"preload",as:"script"};s.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:i,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m}});u&&document.head.appendChild(c)})}else{const i={fetchpriority:"high",type:(t==null?void 0:t.type)==="module"?"module":"text/javascript"};s.forEach(l=>{const{script:c,needAttach:u}=sdk.createScript({url:l,cb:()=>{},attrs:i,createScriptHook:(d,h)=>{const m=e.loaderHook.lifecycle.createScript.emit({url:d,attrs:h});if(m instanceof HTMLScriptElement)return m},needDeleteScript:!0});u&&document.head.appendChild(c)})}}}const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded};var helpers={global:GlobalUtils,share:ShareUtils,utils:{matchRemoteWithNameAndExpose,preloadAssets,getRemoteInfo}};let Module=class{async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;try{e=await getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})}catch{const n=getRemoteEntryUniqueKey(this.remoteInfo);e=await this.host.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry,origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,globalLoading,uniqueKey:n})}return assert(e,`remoteEntryExports is undefined
5
- ${sdk.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,n,o){const{loadFactory:s=!0}=n||{loadFactory:!0},a=await this.getEntry();if(!this.inited){const d=this.host.shareScopeMap,h=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];h.length||h.push("default"),h.forEach(g=>{d[g]||(d[g]={})});const m=d[h[0]],_=[],E={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?h:this.remoteInfo.shareScope||"default"};Object.defineProperty(E,"shareScopeMap",{value:d,enumerable:!1});const p=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:m,remoteEntryInitOptions:E,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof(a==null?void 0:a.init)>"u"&&error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_002,errorCodes$1.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await a.init(p.shareScope,p.initScope,p.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(polyfills._extends({},p,{id:e,remoteSnapshot:o,remoteEntryExports:a}))}this.lib=a,this.inited=!0;let i;i=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:r,moduleInfo:this.remoteInfo}),i||(i=await a.get(r)),assert(i,`${getFMId(this.remoteInfo)} remote don't export ${r}.`);const l=processModuleAlias(this.remoteInfo.name,r),c=this.wraperFactory(i,l);return s?await c():c}wraperFactory(e,r){function n(o,s){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:s,enumerable:!1})}return e instanceof Promise?async()=>{const o=await e();return n(o,r),o}:()=>{const o=e();return n(o,r),o}}constructor({remoteInfo:e,host:r}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=r}};class SyncHook{on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const r=this;this.on(function n(...o){return r.remove(n),e.apply(null,o)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(n=>{r=n(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}}class AsyncHook extends SyncHook{emit(...e){let r;const n=Array.from(this.listeners);if(n.length>0){let o=0;const s=a=>a===!1?!1:o<n.length?Promise.resolve(n[o++].apply(null,e)).then(s):a;r=s()}return Promise.resolve(r)}}function checkReturnData(t,e){if(!isObject(e))return!1;if(t!==e){for(const r in t)if(!(r in e))return!1}return!0}class SyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The data for the "${this.type}" hook should be an object.`);for(const r of this.listeners)try{const n=r(e);if(checkReturnData(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(n){warn(n),this.onerror(n)}return e}constructor(e){super(),this.onerror=error,this.type=e}}class AsyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The response data for the "${this.type}" hook must be an object.`);const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=a=>(warn(a),this.onerror(a),e),s=a=>{if(checkReturnData(e,a)){if(e=a,n<r.length)try{return Promise.resolve(r[n++](e)).then(s,o)}catch(i){return o(i)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(s(e))}return Promise.resolve(e)}constructor(e){super(),this.onerror=error,this.type=e}}class PluginSystem{applyPlugin(e,r){assert(isPlainObject(e),"Plugin configuration is invalid.");const n=e.name;assert(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply==null||e.apply.call(e,r),Object.keys(this.lifecycle).forEach(o=>{const s=e[o];s&&this.lifecycle[o].on(s)}))}removePlugin(e){assert(e,"A name is required.");const r=this.registerPlugins[e];assert(r,`The plugin "${e}" is not registered.`),Object.keys(r).forEach(n=>{n!=="name"&&this.lifecycle[n].remove(r[n])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function assignRemoteInfo(t,e){const r=getRemoteEntryInfoFromSnapshot(e);r.url||error(`The attribute remoteEntry of ${t.name} must not be undefined.`);let n=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!n.startsWith("http")&&(n=`https:${n}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=n,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:s,id:a}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:i,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:a});assignRemoteInfo(s,i);const c={remote:e,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:s,remote:e,remoteSnapshot:i,globalSnapshot:l});return u&&preloadAssets(s,o,u,!1),polyfills._extends({},t,{remoteSnapshot:i})}return t}}}function splitId(t){const e=t.split(":");return e.length===1?{name:e[0],version:void 0}:e.length===2?{name:e[0],version:e[1]}:{name:e[1],version:e[2]}}function traverseModuleInfo(t,e,r,n,o={},s){const a=getFMId(e),{value:i}=getInfoWithoutType(t,a),l=s||i;if(l&&!sdk.isManifestProvider(l)&&(r(l,e,n),l.remotesInfo)){const c=Object.keys(l.remotesInfo);for(const u of c){if(o[u])continue;o[u]=!0;const d=splitId(u),h=l.remotesInfo[u];traverseModuleInfo(t,{name:d.name,version:h.matchedVersion},r,!1,o,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,n,o){const s=[],a=[],i=[],l=new Set,c=new Set,{options:u}=t,{preloadConfig:d}=e,{depsRemote:h}=d;if(traverseModuleInfo(n,r,(p,g,I)=>{let S;if(I)S=d;else if(Array.isArray(h)){const M=h.find(v=>v.nameOrAlias===g.name||v.nameOrAlias===g.alias);if(!M)return;S=defaultPreloadArgs(M)}else if(h===!0)S=d;else return;const b=sdk.getResourceUrl(p,getRemoteEntryInfoFromSnapshot(p).url);b&&i.push({name:g.name,moduleInfo:{name:g.name,entry:b,type:"remoteEntryType"in p?p.remoteEntryType:"global",entryGlobalName:"globalName"in p?p.globalName:g.name,shareScope:"",version:"version"in p?p.version:void 0},url:b});let y="modules"in p?p.modules:[];const R=normalizePreloadExposes(S.exposes);if(R.length&&"modules"in p){var N;y=p==null||(N=p.modules)==null?void 0:N.reduce((M,v)=>((R==null?void 0:R.indexOf(v.moduleName))!==-1&&M.push(v),M),[])}function T(M){const v=M.map(A=>sdk.getResourceUrl(p,A));return S.filter?v.filter(S.filter):v}if(y){const M=y.length;for(let v=0;v<M;v++){const A=y[v],x=`${g.name}/${A.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:A.moduleName==="."?g.name:x,name:g.name,remoteSnapshot:p,preloadConfig:S,remote:g,origin:t}),!getPreloaded(x)&&(S.resourceCategory==="all"?(s.push(...T(A.assets.css.async)),s.push(...T(A.assets.css.sync)),a.push(...T(A.assets.js.async)),a.push(...T(A.assets.js.sync))):(S.resourceCategory="sync")&&(s.push(...T(A.assets.css.sync)),a.push(...T(A.assets.js.sync))),setPreloaded(x))}}},!0,{},o),o.shared&&o.shared.length>0){const p=(g,I)=>{const S=getRegisteredShare(t.shareScopeMap,I.sharedName,g,t.sharedHandler.hooks.lifecycle.resolveShare);S&&typeof S.lib=="function"&&(I.assets.js.sync.forEach(b=>{l.add(b)}),I.assets.css.sync.forEach(b=>{c.add(b)}))};o.shared.forEach(g=>{var I;const S=(I=u.shared)==null?void 0:I[g.sharedName];if(!S)return;const b=g.version?S.find(R=>R.version===g.version):S;if(!b)return;arrayOptions(b).forEach(R=>{p(R,g)})})}const _=a.filter(p=>!l.has(p)&&!isExisted("script",p));return{cssAssets:s.filter(p=>!c.has(p)&&!isExisted("link",p)),jsAssetsWithoutEntry:_,entryAssets:i.filter(p=>!isExisted("script",p.url))}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:s,remoteSnapshot:a}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(o)&&isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(n,a),generatePreloadAssets(e,r,n,s,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:"version"in t?t.version:void 0})}}class SnapshotHandler{async loadRemoteSnapshotInfo({moduleInfo:e,id:r,expose:n}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e});let s=getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});s||(s={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},addGlobalSnapshot({[this.HostInstance.options.name]:s})),s&&"remotesInfo"in s&&!getInfoWithoutType(s.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(s.remotesInfo=polyfills._extends({},s==null?void 0:s.remotesInfo,{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));const{hostGlobalSnapshot:a,remoteSnapshot:i,globalSnapshot:l}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:u}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:i,globalSnapshot:l});let d,h;if(c)if(sdk.isManifestProvider(c)){const m=sdk.isBrowserEnv()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",_=await this.getManifestJson(m,e,{}),E=setGlobalSnapshotInfoByModuleInfo(polyfills._extends({},e,{entry:m}),_);d=_,h=E}else{const{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});d=m,h=u}else if(isRemoteInfoWithEntry(e)){const m=await this.getManifestJson(e.entry,e,{}),_=setGlobalSnapshotInfoByModuleInfo(e,m),{remoteSnapshot:E}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:m,from:"global"});d=E,h=_}else error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_007,errorCodes$1.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(u)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:d}),{remoteSnapshot:d,globalSnapshot:h}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,n){const o=async()=>{let a=this.manifestCache.get(e);if(a)return a;try{let i=await this.loaderHook.lifecycle.fetch.emit(e,{});(!i||!(i instanceof Response))&&(i=await fetch(e,{})),a=await i.json()}catch(i){a=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),a||(delete this.manifestLoading[e],error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_003,errorCodes$1.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${i}`)))}return assert(a.metaData&&a.exposes&&a.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,a),a},s=async()=>{const a=await o(),i=sdk.generateSnapshotFromManifest(a,{version:e}),{remoteSnapshot:l}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:a,remoteSnapshot:i,manifestUrl:e,from:"manifest"});return l};return this.manifestLoading[e]||(this.manifestLoading[e]=s().then(a=>a)),this.manifestLoading[e]}constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new PluginSystem({beforeLoadRemoteSnapshot:new AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}class SharedHandler{registerShared(e,r){const{shareInfos:n,shared:o}=formatShareConfigs(e,r);return Object.keys(n).forEach(a=>{n[a].forEach(l=>{!getRegisteredShare(this.shareScopeMap,a,l,this.hooks.lifecycle.resolveShare)&&l&&l.lib&&this.setShared({pkgName:a,lib:l.lib,get:l.get,loaded:!0,shared:l,from:r.name})})}),{shareInfos:n,shared:o}}async loadShare(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&await Promise.all(o.scope.map(async c=>{await Promise.all(this.initializeSharing(c,{strategy:o.strategy}))}));const s=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:n.options.shared,origin:n}),{shareInfo:a}=s;assert(a,`Cannot find ${e} Share in the ${n.options.name}. Please ensure that the ${e} Share parameters have been injected`);const i=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare),l=c=>{c.useIn||(c.useIn=[]),addUniqueItem(c.useIn,n.options.name)};if(i&&i.lib)return l(i),i.lib;if(i&&i.loading&&!i.loaded){const c=await i.loading;return i.loaded=!0,i.lib||(i.lib=c),l(i),c}else if(i){const u=(async()=>{const d=await i.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0,l(h)),d})();return this.setShared({pkgName:e,loaded:!1,shared:i,from:n.options.name,lib:null,loading:u}),u}else{if(r!=null&&r.customShareInfo)return!1;const u=(async()=>{const d=await a.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0),d})();return this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:u}),u}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:n}=this,o=r==null?void 0:r.from,s=r==null?void 0:r.strategy;let a=r==null?void 0:r.initScope;const i=[];if(o!=="build"){const{initTokens:_}=this;a||(a=[]);let E=_[e];if(E||(E=_[e]={from:this.host.name}),a.indexOf(E)>=0)return i;a.push(E)}const l=this.shareScopeMap,c=n.options.name;l[e]||(l[e]={});const u=l[e],d=(_,E)=>{var p;const{version:g,eager:I}=E;u[_]=u[_]||{};const S=u[_],b=S[g],y=!!(b&&(b.eager||(p=b.shareConfig)!=null&&p.eager));(!b||b.strategy!=="loaded-first"&&!b.loaded&&(!I!=!y?I:c>b.from))&&(S[g]=E)},h=_=>_&&_.init&&_.init(l[e],a),m=async _=>{const{module:E}=await n.remoteHandler.getRemoteModuleAndOptions({id:_});if(E.getEntry){let p;try{p=await E.getEntry()}catch(g){p=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:g,from:"runtime",lifecycle:"beforeLoadShare",origin:n})}E.inited||(await h(p),E.inited=!0)}};return Object.keys(n.options.shared).forEach(_=>{n.options.shared[_].forEach(p=>{p.scope.includes(e)&&d(_,p)})}),(n.options.shareStrategy==="version-first"||s==="version-first")&&n.options.remotes.forEach(_=>{_.shareScope===e&&i.push(m(_.name))}),i}loadShareSync(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&o.scope.forEach(i=>{this.initializeSharing(i,{strategy:o.strategy})});const s=getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),a=i=>{i.useIn||(i.useIn=[]),addUniqueItem(i.useIn,n.options.name)};if(s){if(typeof s.lib=="function")return a(s),s.loaded||(s.loaded=!0,s.from===n.options.name&&(o.loaded=!0)),s.lib;if(typeof s.get=="function"){const i=s.get();if(!(i instanceof Promise))return a(s),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i,shared:s}),i}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const i=o.get();if(i instanceof Promise){const l=(r==null?void 0:r.from)==="build"?errorCodes$1.RUNTIME_005:errorCodes$1.RUNTIME_006;throw new Error(errorCodes$1.getShortErrorMsg(l,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}return o.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_006,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,n={}){const{host:o}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:o.options,origin:o,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:n,lib:o,loading:s,loaded:a,get:i}){const{version:l,scope:c="default"}=r,u=polyfills._object_without_properties_loose(r,["version","scope"]);(Array.isArray(c)?c:[c]).forEach(h=>{if(this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),!this.shareScopeMap[h][e][l]){this.shareScopeMap[h][e][l]=polyfills._extends({version:l,scope:["default"]},u,{lib:o,loaded:a,loading:s}),i&&(this.shareScopeMap[h][e][l].get=i);return}const m=this.shareScopeMap[h][e][l];s&&!m.loading&&(m.loading=s)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),n=e.id||e.name;n&&!r[n]&&(r[n]=this.shareScopeMap)}constructor(e){this.hooks=new PluginSystem({afterResolve:new AsyncWaterfallHook("afterResolve"),beforeLoadShare:new AsyncWaterfallHook("beforeLoadShare"),loadShare:new AsyncHook,resolveShare:new SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}}class RemoteHandler{formatAndRegisterRemote(e,r){return(r.remotes||[]).reduce((o,s)=>(this.registerRemote(s,o,{force:!1}),o),e.remotes)}setIdToRemoteMap(e,r){const{remote:n,expose:o}=r,{name:s,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:o},a&&e.startsWith(s)){const i=e.replace(s,a);this.idToRemoteMap[i]={name:n.name,expose:o};return}if(a&&e.startsWith(a)){const i=e.replace(a,s);this.idToRemoteMap[i]={name:n.name,expose:o}}}async loadRemote(e,r){const{host:n}=this;try{const{loadFactory:o=!0}=r||{loadFactory:!0},{module:s,moduleOptions:a,remoteMatchInfo:i}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:c,expose:u,id:d,remoteSnapshot:h}=i,m=await s.get(d,u,r,h),_=await this.hooks.lifecycle.onLoad.emit({id:d,pkgNameOrAlias:l,expose:u,exposeModule:o?m:void 0,exposeModuleFactory:o?void 0:m,remote:c,options:a,moduleInstance:s,origin:n});return this.setIdToRemoteMap(e,i),typeof _=="function"?_:m}catch(o){const{from:s="runtime"}=r||{from:"runtime"},a=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:s,lifecycle:"onLoad",origin:n});if(!a)throw o;return a}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const n=formatPreloadArgs(r.options.remotes,e);await Promise.all(n.map(async o=>{const{remote:s}=o,a=getRemoteInfo(s),{globalSnapshot:i,remoteSnapshot:l}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:s}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:o,remote:s,remoteInfo:a,globalSnapshot:i,remoteSnapshot:l});c&&preloadAssets(a,r,c)}))}registerRemotes(e,r){const{host:n}=this;e.forEach(o=>{this.registerRemote(o,n.options.remotes,{force:r==null?void 0:r.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:n}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(_){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!o)throw _}const{id:s}=o,a=matchRemoteWithNameAndExpose(r.options.remotes,s);assert(a,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_004,errorCodes$1.runtimeDescMap,{hostName:r.options.name,requestId:s}));const{remote:i}=a,l=getRemoteInfo(i),c=await r.sharedHandler.hooks.lifecycle.afterResolve.emit(polyfills._extends({id:s},a,{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:d}=c;assert(u&&d,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${s}.`);let h=r.moduleCache.get(u.name);const m={host:r,remoteInfo:l};return h||(h=new Module(m),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:m,remoteMatchInfo:c}}registerRemote(e,r,n){const{host:o}=this,s=()=>{if(e.alias){const i=r.find(l=>{var c;return e.alias&&(l.name.startsWith(e.alias)||((c=l.alias)==null?void 0:c.startsWith(e.alias)))});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&&sdk.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const a=r.find(i=>i.name===e.name);if(!a)s(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const i=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];n!=null&&n.force&&(this.removeRemote(a),s(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),sdk.warn(i.join(" ")))}}removeRemote(e){try{const{host:n}=this,{name:o}=e,s=n.options.remotes.findIndex(i=>i.name===o);s!==-1&&n.options.remotes.splice(s,1);const a=n.moduleCache.get(e.name);if(a){const i=a.remoteInfo,l=i.entryGlobalName;if(CurrentGlobal[l]){var r;(r=Object.getOwnPropertyDescriptor(CurrentGlobal,l))!=null&&r.configurable?delete CurrentGlobal[l]:CurrentGlobal[l]=void 0}const c=getRemoteEntryUniqueKey(a.remoteInfo);globalLoading[c]&&delete globalLoading[c],n.snapshotHandler.manifestCache.delete(i.entry);let u=i.buildVersion?sdk.composeKeyWithSeparator(i.name,i.buildVersion):i.name;const d=CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(m=>i.buildVersion?m.options.id===u:m.name===u);if(d!==-1){const m=CurrentGlobal.__FEDERATION__.__INSTANCES__[d];u=m.options.id||u;const _=getGlobalShareScope();let E=!0;const p=[];Object.keys(_).forEach(g=>{const I=_[g];I&&Object.keys(I).forEach(S=>{const b=I[S];b&&Object.keys(b).forEach(y=>{const R=b[y];R&&Object.keys(R).forEach(N=>{const T=R[N];T&&typeof T=="object"&&T.from===i.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(M=>M!==i.name),T.useIn.length?E=!1:p.push([g,S,y,N])):p.push([g,S,y,N]))})})})}),E&&(m.shareScopeMap={},delete _[u]),p.forEach(([g,I,S,b])=>{var y,R,N;(N=_[g])==null||(R=N[I])==null||(y=R[S])==null||delete y[b]}),CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(d,1)}const{hostGlobalSnapshot:h}=getGlobalRemoteInfo(e,n);if(h){const m=h&&"remotesInfo"in h&&h.remotesInfo&&getInfoWithoutType(h.remotesInfo,e.name).key;m&&(delete h.remotesInfo[m],Global.__FEDERATION__.__MANIFEST_LOADING__[m]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[m])}n.moduleCache.delete(e.name)}}catch(n){logger.log("removeRemote fail: ",n)}}constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}}const USE_SNAPSHOT=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;class ModuleFederation{initOptions(e){this.registerPlugins(e.plugins);const r=this.formatOptions(this.options,e);return this.options=r,r}async loadShare(e,r){return this.sharedHandler.loadShare(e,r)}loadShareSync(e,r){return this.sharedHandler.loadShareSync(e,r)}initializeSharing(e=DEFAULT_SCOPE,r){return this.sharedHandler.initializeSharing(e,r)}initRawContainer(e,r,n){const o=getRemoteInfo({name:e,entry:r}),s=new Module({host:this,remoteInfo:o});return s.remoteEntryExports=n,this.moduleCache.set(e,s),s}async loadRemote(e,r){return this.remoteHandler.loadRemote(e,r)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,r,n={}){this.sharedHandler.initShareScopeMap(e,r,n)}formatOptions(e,r){const{shared:n}=formatShareConfigs(e,r),{userOptions:o,options:s}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(s,o),{shared:i}=this.sharedHandler.registerShared(s,o),l=[...s.plugins];o.plugins&&o.plugins.forEach(u=>{l.includes(u)||l.push(u)});const c=polyfills._extends({},e,r,{plugins:l,remotes:a,shared:i});return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const r=registerPlugins$1(e,this);this.options.plugins=this.options.plugins.reduce((n,o)=>(o&&n&&!n.find(s=>s.name===o.name)&&n.push(o),n),r||[])}registerRemotes(e,r){return this.remoteHandler.registerRemotes(e,r)}registerShared(e){this.sharedHandler.registerShared(this.options,polyfills._extends({},this.options,{shared:e}))}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.17.1",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook,loadEntryError:new AsyncHook,getModuleFactory:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const r=USE_SNAPSHOT?[snapshotPlugin(),generatePreloadAssetsPlugin()]:[],n={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}var index=Object.freeze({__proto__:null});index_cjs$2.loadScript=sdk.loadScript;index_cjs$2.loadScriptNode=sdk.loadScriptNode;index_cjs$2.CurrentGlobal=CurrentGlobal;index_cjs$2.Global=Global;index_cjs$2.Module=Module;index_cjs$2.ModuleFederation=ModuleFederation;index_cjs$2.addGlobalSnapshot=addGlobalSnapshot;index_cjs$2.assert=assert;index_cjs$2.getGlobalFederationConstructor=getGlobalFederationConstructor;index_cjs$2.getGlobalSnapshot=getGlobalSnapshot;index_cjs$2.getInfoWithoutType=getInfoWithoutType;index_cjs$2.getRegisteredShare=getRegisteredShare;index_cjs$2.getRemoteEntry=getRemoteEntry;index_cjs$2.getRemoteInfo=getRemoteInfo;index_cjs$2.helpers=helpers;index_cjs$2.isStaticResourcesEqual=isStaticResourcesEqual;index_cjs$2.matchRemoteWithNameAndExpose=matchRemoteWithNameAndExpose;index_cjs$2.registerGlobalPlugins=registerGlobalPlugins;index_cjs$2.resetFederationGlobalInfo=resetFederationGlobalInfo;index_cjs$2.safeWrapper=safeWrapper;index_cjs$2.satisfy=satisfy;index_cjs$2.setGlobalFederationConstructor=setGlobalFederationConstructor;index_cjs$2.setGlobalFederationInstance=setGlobalFederationInstance;index_cjs$2.types=index;var utils_cjs={},runtimeCore$1=index_cjs$2;function getBuilderId(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function getGlobalFederationInstance(t,e){const r=getBuilderId();return runtimeCore$1.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===t&&!n.options.version&&!e||n.options.name===t&&e&&n.options.version===e))}utils_cjs.getGlobalFederationInstance=getGlobalFederationInstance;var runtimeCore=index_cjs$2,errorCodes=index_cjs,utils=utils_cjs;function createInstance(t){const e=runtimeCore.getGlobalFederationConstructor()||runtimeCore.ModuleFederation;return new e(t)}let FederationInstance=null;function init(t){const e=utils.getGlobalFederationInstance(t.name,t.version);return e?(e.initOptions(t),FederationInstance||(FederationInstance=e),e):(FederationInstance=createInstance(t),runtimeCore.setGlobalFederationInstance(FederationInstance),FederationInstance)}function loadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadRemote.apply(FederationInstance,t)}function loadShare(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShare.apply(FederationInstance,t)}function loadShareSync(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShareSync.apply(FederationInstance,t)}function preloadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.preloadRemote.apply(FederationInstance,t)}function registerRemotes(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerRemotes.apply(FederationInstance,t)}function registerPlugins(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerPlugins.apply(FederationInstance,t)}function getInstance(){return FederationInstance}function registerShared(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerShared.apply(FederationInstance,t)}runtimeCore.setGlobalFederationConstructor(runtimeCore.ModuleFederation);index_cjs$3.Module=runtimeCore.Module;index_cjs$3.ModuleFederation=runtimeCore.ModuleFederation;index_cjs$3.getRemoteEntry=runtimeCore.getRemoteEntry;index_cjs$3.getRemoteInfo=runtimeCore.getRemoteInfo;index_cjs$3.loadScript=runtimeCore.loadScript;index_cjs$3.loadScriptNode=runtimeCore.loadScriptNode;index_cjs$3.registerGlobalPlugins=runtimeCore.registerGlobalPlugins;index_cjs$3.createInstance=createInstance;index_cjs$3.getInstance=getInstance;var init_1=index_cjs$3.init=init;index_cjs$3.loadRemote=loadRemote;index_cjs$3.loadShare=loadShare;index_cjs$3.loadShareSync=loadShareSync;index_cjs$3.preloadRemote=preloadRemote;index_cjs$3.registerPlugins=registerPlugins;index_cjs$3.registerRemotes=registerRemotes;index_cjs$3.registerShared=registerShared;let initResolve,initReject;const initPromise=new Promise((t,e)=>{initResolve=t,initReject=e});var vis2Inventwo__mf_v__runtimeInit__mf_v__={initPromise,initResolve,initReject};export{init_1 as a,index_cjs$3 as i,vis2Inventwo__mf_v__runtimeInit__mf_v__ as v};
5
+ `)};function _extends(){return _extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(this,arguments)}const runtimeDescMap={[RUNTIME_001]:"Failed to get remoteEntry exports.",[RUNTIME_002]:'The remote entry interface does not contain "init"',[RUNTIME_003]:"Failed to get manifest.",[RUNTIME_004]:"Failed to locate remote.",[RUNTIME_005]:"Invalid loadShareSync function call from bundler runtime",[RUNTIME_006]:"Invalid loadShareSync function call from runtime",[RUNTIME_007]:"Failed to get remote snapshot.",[RUNTIME_008]:"Failed to load script resources.",[RUNTIME_009]:"Please call createInstance first."},typeDescMap={[TYPE_001]:"Failed to generate type declaration. Execute the below cmd to reproduce and fix the error."},buildDescMap={[BUILD_001]:"Failed to find expose module.",[BUILD_002]:"PublicPath is required in prod mode."},errorDescMap=_extends({},runtimeDescMap,typeDescMap,buildDescMap);index_cjs.BUILD_001=BUILD_001;index_cjs.BUILD_002=BUILD_002;index_cjs.RUNTIME_001=RUNTIME_001;index_cjs.RUNTIME_002=RUNTIME_002;index_cjs.RUNTIME_003=RUNTIME_003;index_cjs.RUNTIME_004=RUNTIME_004;index_cjs.RUNTIME_005=RUNTIME_005;index_cjs.RUNTIME_006=RUNTIME_006;index_cjs.RUNTIME_007=RUNTIME_007;index_cjs.RUNTIME_008=RUNTIME_008;index_cjs.RUNTIME_009=RUNTIME_009;index_cjs.TYPE_001=TYPE_001;index_cjs.buildDescMap=buildDescMap;index_cjs.errorDescMap=errorDescMap;index_cjs.getShortErrorMsg=getShortErrorMsg;index_cjs.runtimeDescMap=runtimeDescMap;index_cjs.typeDescMap=typeDescMap;var polyfills=polyfills_cjs$1,sdk=index_cjs$1,errorCodes$1=index_cjs;const LOG_CATEGORY="[ Federation Runtime ]",logger=sdk.createLogger(LOG_CATEGORY);function assert(t,e){t||error(e)}function error(t){throw t instanceof Error?(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`),t):new Error(`${LOG_CATEGORY}: ${t}`)}function warn(t){t instanceof Error&&(t.message.startsWith(LOG_CATEGORY)||(t.message=`${LOG_CATEGORY}: ${t.message}`)),logger.warn(t)}function addUniqueItem(t,e){return t.findIndex(r=>r===e)===-1&&t.push(e),t}function getFMId(t){return"version"in t&&t.version?`${t.name}:${t.version}`:"entry"in t&&t.entry?`${t.name}:${t.entry}`:`${t.name}`}function isRemoteInfoWithEntry(t){return typeof t.entry<"u"}function isPureRemoteEntry(t){return!t.entry.includes(".json")}async function safeWrapper(t,e){try{return await t()}catch(r){!e&&warn(r);return}}function isObject(t){return t&&typeof t=="object"}const objectToString=Object.prototype.toString;function isPlainObject(t){return objectToString.call(t)==="[object Object]"}function isStaticResourcesEqual(t,e){const r=/^(https?:)?\/\//i,n=t.replace(r,"").replace(/\/$/,""),o=e.replace(r,"").replace(/\/$/,"");return n===o}function arrayOptions(t){return Array.isArray(t)?t:[t]}function getRemoteEntryInfoFromSnapshot(t){const e={url:"",type:"global",globalName:""};return sdk.isBrowserEnv()||sdk.isReactNativeEnv()?"remoteEntry"in t?{url:t.remoteEntry,type:t.remoteEntryType,globalName:t.globalName}:e:"ssrRemoteEntry"in t?{url:t.ssrRemoteEntry||e.url,type:t.ssrRemoteEntryType||e.type,globalName:t.globalName}:e}const processModuleAlias=(t,e)=>{let r;return t.endsWith("/")?r=t.slice(0,-1):r=t,e.startsWith(".")&&(e=e.slice(1)),r=r+e,r},CurrentGlobal=typeof globalThis=="object"?globalThis:window,nativeGlobal=(()=>{try{return document.defaultView}catch{return CurrentGlobal}})(),Global=nativeGlobal;function definePropertyGlobalVal(t,e,r){Object.defineProperty(t,e,{value:r,configurable:!1,writable:!0})}function includeOwnProperty(t,e){return Object.hasOwnProperty.call(t,e)}includeOwnProperty(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__")||definePropertyGlobalVal(CurrentGlobal,"__GLOBAL_LOADING_REMOTE_ENTRY__",{});const globalLoading=CurrentGlobal.__GLOBAL_LOADING_REMOTE_ENTRY__;function setGlobalDefaultVal(t){var e,r,n,o,i,a;includeOwnProperty(t,"__VMOK__")&&!includeOwnProperty(t,"__FEDERATION__")&&definePropertyGlobalVal(t,"__FEDERATION__",t.__VMOK__),includeOwnProperty(t,"__FEDERATION__")||(definePropertyGlobalVal(t,"__FEDERATION__",{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),definePropertyGlobalVal(t,"__VMOK__",t.__FEDERATION__));var s;(s=(e=t.__FEDERATION__).__GLOBAL_PLUGIN__)!=null||(e.__GLOBAL_PLUGIN__=[]);var l;(l=(r=t.__FEDERATION__).__INSTANCES__)!=null||(r.__INSTANCES__=[]);var c;(c=(n=t.__FEDERATION__).moduleInfo)!=null||(n.moduleInfo={});var u;(u=(o=t.__FEDERATION__).__SHARE__)!=null||(o.__SHARE__={});var d;(d=(i=t.__FEDERATION__).__MANIFEST_LOADING__)!=null||(i.__MANIFEST_LOADING__={});var h;(h=(a=t.__FEDERATION__).__PRELOADED_MAP__)!=null||(a.__PRELOADED_MAP__=new Map)}setGlobalDefaultVal(CurrentGlobal);setGlobalDefaultVal(nativeGlobal);function resetFederationGlobalInfo(){CurrentGlobal.__FEDERATION__.__GLOBAL_PLUGIN__=[],CurrentGlobal.__FEDERATION__.__INSTANCES__=[],CurrentGlobal.__FEDERATION__.moduleInfo={},CurrentGlobal.__FEDERATION__.__SHARE__={},CurrentGlobal.__FEDERATION__.__MANIFEST_LOADING__={},Object.keys(globalLoading).forEach(t=>{delete globalLoading[t]})}function setGlobalFederationInstance(t){CurrentGlobal.__FEDERATION__.__INSTANCES__.push(t)}function getGlobalFederationConstructor(){return CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function setGlobalFederationConstructor(t,e=sdk.isDebugMode()){e&&(CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR__=t,CurrentGlobal.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__="0.17.1")}function getInfoWithoutType(t,e){if(typeof e=="string"){if(t[e])return{value:t[e],key:e};{const n=Object.keys(t);for(const o of n){const[i,a]=o.split(":"),s=`${i}:${e}`,l=t[s];if(l)return{value:l,key:s}}return{value:void 0,key:e}}}else throw new Error("key must be string")}const getGlobalSnapshot=()=>nativeGlobal.__FEDERATION__.moduleInfo,getTargetSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t),n=getInfoWithoutType(e,r).value;if(n&&!n.version&&"version"in t&&t.version&&(n.version=t.version),n)return n;if("version"in t&&t.version){const{version:o}=t,i=polyfills._object_without_properties_loose(t,["version"]),a=getFMId(i),s=getInfoWithoutType(nativeGlobal.__FEDERATION__.moduleInfo,a).value;if((s==null?void 0:s.version)===o)return s}},getGlobalSnapshotInfoByModuleInfo=t=>getTargetSnapshotInfoByModuleInfo(t,nativeGlobal.__FEDERATION__.moduleInfo),setGlobalSnapshotInfoByModuleInfo=(t,e)=>{const r=getFMId(t);return nativeGlobal.__FEDERATION__.moduleInfo[r]=e,nativeGlobal.__FEDERATION__.moduleInfo},addGlobalSnapshot=t=>(nativeGlobal.__FEDERATION__.moduleInfo=polyfills._extends({},nativeGlobal.__FEDERATION__.moduleInfo,t),()=>{const e=Object.keys(t);for(const r of e)delete nativeGlobal.__FEDERATION__.moduleInfo[r]}),getRemoteEntryExports=(t,e)=>{const r=e||`__FEDERATION_${t}:custom__`,n=CurrentGlobal[r];return{remoteEntryKey:r,entryExports:n}},registerGlobalPlugins=t=>{const{__GLOBAL_PLUGIN__:e}=nativeGlobal.__FEDERATION__;t.forEach(r=>{e.findIndex(n=>n.name===r.name)===-1?e.push(r):warn(`The plugin ${r.name} has been registered.`)})},getGlobalHostPlugins=()=>nativeGlobal.__FEDERATION__.__GLOBAL_PLUGIN__,getPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.get(t),setPreloaded=t=>CurrentGlobal.__FEDERATION__.__PRELOADED_MAP__.set(t,!0),DEFAULT_SCOPE="default",DEFAULT_REMOTE_TYPE="global",buildIdentifier="[0-9A-Za-z-]+",build=`(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`,numericIdentifier="0|[1-9]\\d*",numericIdentifierLoose="[0-9]+",nonNumericIdentifier="\\d*[a-zA-Z-][a-zA-Z0-9-]*",preReleaseIdentifierLoose=`(?:${numericIdentifierLoose}|${nonNumericIdentifier})`,preReleaseLoose=`(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`,preReleaseIdentifier=`(?:${numericIdentifier}|${nonNumericIdentifier})`,preRelease=`(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`,xRangeIdentifier=`${numericIdentifier}|x|X|\\*`,xRangePlain=`[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`,hyphenRange=`^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`,mainVersionLoose=`(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`,loosePlain=`[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`,gtlt="((?:<|>)?=?)",comparatorTrim=`(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`,loneTilde="(?:~>?)",tildeTrim=`(\\s*)${loneTilde}\\s+`,loneCaret="(?:\\^)",caretTrim=`(\\s*)${loneCaret}\\s+`,star="(<|>)?=?\\s*\\*",caret=`^${loneCaret}${xRangePlain}$`,mainVersion=`(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`,fullPlain=`v?${mainVersion}${preRelease}?${build}?`,tilde=`^${loneTilde}${xRangePlain}$`,xRange=`^${gtlt}\\s*${xRangePlain}$`,comparator=`^${gtlt}\\s*(${fullPlain})$|^$`,gte0="^\\s*>=\\s*0.0.0\\s*$";function parseRegex(t){return new RegExp(t)}function isXVersion(t){return!t||t.toLowerCase()==="x"||t==="*"}function pipe(...t){return e=>t.reduce((r,n)=>n(r),e)}function extractComparator(t){return t.match(parseRegex(comparator))}function combineVersion(t,e,r,n){const o=`${t}.${e}.${r}`;return n?`${o}-${n}`:o}function parseHyphen(t){return t.replace(parseRegex(hyphenRange),(e,r,n,o,i,a,s,l,c,u,d,h)=>(isXVersion(n)?r="":isXVersion(o)?r=`>=${n}.0.0`:isXVersion(i)?r=`>=${n}.${o}.0`:r=`>=${r}`,isXVersion(c)?l="":isXVersion(u)?l=`<${Number(c)+1}.0.0-0`:isXVersion(d)?l=`<${c}.${Number(u)+1}.0-0`:h?l=`<=${c}.${u}.${d}-${h}`:l=`<=${l}`,`${r} ${l}`.trim()))}function parseComparatorTrim(t){return t.replace(parseRegex(comparatorTrim),"$1$2$3")}function parseTildeTrim(t){return t.replace(parseRegex(tildeTrim),"$1~")}function parseCaretTrim(t){return t.replace(parseRegex(caretTrim),"$1^")}function parseCarets(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(caret),(r,n,o,i,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(i)?n==="0"?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.0 <${Number(n)+1}.0.0-0`:a?n==="0"?o==="0"?`>=${n}.${o}.${i}-${a} <${n}.${o}.${Number(i)+1}-0`:`>=${n}.${o}.${i}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i}-${a} <${Number(n)+1}.0.0-0`:n==="0"?o==="0"?`>=${n}.${o}.${i} <${n}.${o}.${Number(i)+1}-0`:`>=${n}.${o}.${i} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i} <${Number(n)+1}.0.0-0`)).join(" ")}function parseTildes(t){return t.trim().split(/\s+/).map(e=>e.replace(parseRegex(tilde),(r,n,o,i,a)=>isXVersion(n)?"":isXVersion(o)?`>=${n}.0.0 <${Number(n)+1}.0.0-0`:isXVersion(i)?`>=${n}.${o}.0 <${n}.${Number(o)+1}.0-0`:a?`>=${n}.${o}.${i}-${a} <${n}.${Number(o)+1}.0-0`:`>=${n}.${o}.${i} <${n}.${Number(o)+1}.0-0`)).join(" ")}function parseXRanges(t){return t.split(/\s+/).map(e=>e.trim().replace(parseRegex(xRange),(r,n,o,i,a,s)=>{const l=isXVersion(o),c=l||isXVersion(i),u=c||isXVersion(a);return n==="="&&u&&(n=""),s="",l?n===">"||n==="<"?"<0.0.0-0":"*":n&&u?(c&&(i=0),a=0,n===">"?(n=">=",c?(o=Number(o)+1,i=0,a=0):(i=Number(i)+1,a=0)):n==="<="&&(n="<",c?o=Number(o)+1:i=Number(i)+1),n==="<"&&(s="-0"),`${n+o}.${i}.${a}${s}`):c?`>=${o}.0.0${s} <${Number(o)+1}.0.0-0`:u?`>=${o}.${i}.0${s} <${o}.${Number(i)+1}.0-0`:r})).join(" ")}function parseStar(t){return t.trim().replace(parseRegex(star),"")}function parseGTE0(t){return t.trim().replace(parseRegex(gte0),"")}function compareAtom(t,e){return t=Number(t)||t,e=Number(e)||e,t>e?1:t===e?0:-1}function comparePreRelease(t,e){const{preRelease:r}=t,{preRelease:n}=e;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,i=r.length;o<=i;o++){const a=r[o],s=n[o];if(a!==s)return a===void 0&&s===void 0?0:a?s?compareAtom(a,s):-1:1}return 0}function compareVersion(t,e){return compareAtom(t.major,e.major)||compareAtom(t.minor,e.minor)||compareAtom(t.patch,e.patch)||comparePreRelease(t,e)}function eq(t,e){return t.version===e.version}function compare(t,e){switch(t.operator){case"":case"=":return eq(t,e);case">":return compareVersion(t,e)<0;case">=":return eq(t,e)||compareVersion(t,e)<0;case"<":return compareVersion(t,e)>0;case"<=":return eq(t,e)||compareVersion(t,e)>0;case void 0:return!0;default:return!1}}function parseComparatorString(t){return pipe(parseCarets,parseTildes,parseXRanges,parseStar)(t)}function parseRange(t){return pipe(parseHyphen,parseComparatorTrim,parseTildeTrim,parseCaretTrim)(t.trim()).split(/\s+/).join(" ")}function satisfy(t,e){if(!t)return!1;const r=extractComparator(t);if(!r)return!1;const[,n,,o,i,a,s]=r,l={operator:n,version:combineVersion(o,i,a,s),major:o,minor:i,patch:a,preRelease:s==null?void 0:s.split(".")},c=e.split("||");for(const u of c){const d=u.trim();if(!d||d==="*"||d==="x")return!0;try{const h=parseRange(d);if(!h.trim())return!0;const m=h.split(" ").map(p=>parseComparatorString(p)).join(" ");if(!m.trim())return!0;const _=m.split(/\s+/).map(p=>parseGTE0(p)).filter(Boolean);if(_.length===0)continue;let E=!0;for(const p of _){const g=extractComparator(p);if(!g){E=!1;break}const[,I,,S,b,y,R]=g,N={operator:I,version:combineVersion(S,b,y,R),major:S,minor:b,patch:y,preRelease:R==null?void 0:R.split(".")};if(!compare(N,l)){E=!1;break}}if(E)return!0}catch(h){console.error(`[semver] Error processing range part "${d}":`,h);continue}}return!1}function formatShare(t,e,r,n){let o;"get"in t?o=t.get:"lib"in t?o=()=>Promise.resolve(t.lib):o=()=>Promise.resolve(()=>{throw new Error(`Can not get shared '${r}'!`)});var i,a,s;return polyfills._extends({deps:[],useIn:[],from:e,loading:null},t,{shareConfig:polyfills._extends({requiredVersion:`^${t.version}`,singleton:!1,eager:!1,strictVersion:!1},t.shareConfig),get:o,loaded:t!=null&&t.loaded||"lib"in t?!0:void 0,version:(i=t.version)!=null?i:"0",scope:Array.isArray(t.scope)?t.scope:[(a=t.scope)!=null?a:"default"],strategy:((s=t.strategy)!=null?s:n)||"version-first"})}function formatShareConfigs(t,e){const r=e.shared||{},n=e.name,o=Object.keys(r).reduce((a,s)=>{const l=arrayOptions(r[s]);return a[s]=a[s]||[],l.forEach(c=>{a[s].push(formatShare(c,n,s,e.shareStrategy))}),a},{}),i=polyfills._extends({},t.shared);return Object.keys(o).forEach(a=>{i[a]?o[a].forEach(s=>{i[a].find(c=>c.version===s.version)||i[a].push(s)}):i[a]=o[a]}),{shared:i,shareInfos:o}}function versionLt(t,e){const r=n=>{if(!Number.isNaN(Number(n))){const i=n.split(".");let a=n;for(let s=0;s<3-i.length;s++)a+=".0";return a}return n};return!!satisfy(r(t),`<=${r(e)}`)}const findVersion=(t,e)=>{const r=e||function(n,o){return versionLt(n,o)};return Object.keys(t).reduce((n,o)=>!n||r(n,o)||n==="0"?o:n,0)},isLoaded=t=>!!t.loaded||typeof t.lib=="function",isLoading=t=>!!t.loading;function findSingletonVersionOrderByVersion(t,e,r){const n=t[e][r],o=function(i,a){return!isLoaded(n[i])&&versionLt(i,a)};return findVersion(t[e][r],o)}function findSingletonVersionOrderByLoaded(t,e,r){const n=t[e][r],o=function(i,a){const s=l=>isLoaded(l)||isLoading(l);return s(n[a])?s(n[i])?!!versionLt(i,a):!0:s(n[i])?!1:versionLt(i,a)};return findVersion(t[e][r],o)}function getFindShareFunction(t){return t==="loaded-first"?findSingletonVersionOrderByLoaded:findSingletonVersionOrderByVersion}function getRegisteredShare(t,e,r,n){if(!t)return;const{shareConfig:o,scope:i=DEFAULT_SCOPE,strategy:a}=r,s=Array.isArray(i)?i:[i];for(const l of s)if(o&&t[l]&&t[l][e]){const{requiredVersion:c}=o,d=getFindShareFunction(a)(t,l,e),h=()=>{if(o.singleton){if(typeof c=="string"&&!satisfy(d,c)){const E=`Version ${d} from ${d&&t[l][e][d].from} of shared singleton module ${e} does not satisfy the requirement of ${r.from} which needs ${c})`;o.strictVersion?error(E):warn(E)}return t[l][e][d]}else{if(c===!1||c==="*"||satisfy(d,c))return t[l][e][d];for(const[E,p]of Object.entries(t[l][e]))if(satisfy(E,c))return p}},m={shareScopeMap:t,scope:l,pkgName:e,version:d,GlobalFederation:Global.__FEDERATION__,resolver:h};return(n.emit(m)||m).resolver()}}function getGlobalShareScope(){return Global.__FEDERATION__.__SHARE__}function getTargetSharedOptions(t){const{pkgName:e,extraOptions:r,shareInfos:n}=t,o=s=>{if(!s)return;const l={};s.forEach(d=>{l[d.version]=d});const u=findVersion(l,function(d,h){return!isLoaded(l[d])&&versionLt(d,h)});return l[u]};var i;const a=(i=r==null?void 0:r.resolver)!=null?i:o;return Object.assign({},a(n[e]),r==null?void 0:r.customShareInfo)}function getBuilderId$1(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function matchRemoteWithNameAndExpose(t,e){for(const r of t){const n=e.startsWith(r.name);let o=e.replace(r.name,"");if(n){if(o.startsWith("/")){const s=r.name;return o=`.${o}`,{pkgNameOrAlias:s,expose:o,remote:r}}else if(o==="")return{pkgNameOrAlias:r.name,expose:".",remote:r}}const i=r.alias&&e.startsWith(r.alias);let a=r.alias&&e.replace(r.alias,"");if(r.alias&&i){if(a&&a.startsWith("/")){const s=r.alias;return a=`.${a}`,{pkgNameOrAlias:s,expose:a,remote:r}}else if(a==="")return{pkgNameOrAlias:r.alias,expose:".",remote:r}}}}function matchRemote(t,e){for(const r of t)if(e===r.name||r.alias&&e===r.alias)return r}function registerPlugins$1(t,e){const r=getGlobalHostPlugins(),n=[e.hooks,e.remoteHandler.hooks,e.sharedHandler.hooks,e.snapshotHandler.hooks,e.loaderHook,e.bridgeHook];return r.length>0&&r.forEach(o=>{t!=null&&t.find(i=>i.name!==o.name)&&t.push(o)}),t&&t.length>0&&t.forEach(o=>{n.forEach(i=>{i.applyPlugin(o,e)})}),t}const importCallback=".then(callbacks[0]).catch(callbacks[1])";async function loadEsmEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof FEDERATION_ALLOW_NEW_FUNCTION<"u"?new Function("callbacks",`import("${t}")${importCallback}`)([r,n]):import(t).then(r).catch(n)}catch(o){n(o)}})}async function loadSystemJsEntry({entry:t,remoteEntryExports:e}){return new Promise((r,n)=>{try{e?r(e):typeof __system_context__>"u"?System.import(t).then(r).catch(n):new Function("callbacks",`System.import("${t}")${importCallback}`)([r,n])}catch(o){n(o)}})}function handleRemoteEntryLoaded(t,e,r){const{remoteEntryKey:n,entryExports:o}=getRemoteEntryExports(t,e);return assert(o,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_001,errorCodes$1.runtimeDescMap,{remoteName:t,remoteEntryUrl:r,remoteEntryKey:n})),o}async function loadEntryScript({name:t,globalName:e,entry:r,loaderHook:n}){const{entryExports:o}=getRemoteEntryExports(t,e);return o||sdk.loadScript(r,{attrs:{},createScriptHook:(i,a)=>{const s=n.lifecycle.createScript.emit({url:i,attrs:a});if(s&&(s instanceof HTMLScriptElement||"script"in s||"timeout"in s))return s}}).then(()=>handleRemoteEntryLoaded(t,e,r)).catch(i=>{throw assert(void 0,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_008,errorCodes$1.runtimeDescMap,{remoteName:t,resourceUrl:r})),i})}async function loadEntryDom({remoteInfo:t,remoteEntryExports:e,loaderHook:r}){const{entry:n,entryGlobalName:o,name:i,type:a}=t;switch(a){case"esm":case"module":return loadEsmEntry({entry:n,remoteEntryExports:e});case"system":return loadSystemJsEntry({entry:n,remoteEntryExports:e});default:return loadEntryScript({entry:n,globalName:o,name:i,loaderHook:r})}}async function loadEntryNode({remoteInfo:t,loaderHook:e}){const{entry:r,entryGlobalName:n,name:o,type:i}=t,{entryExports:a}=getRemoteEntryExports(o,n);return a||sdk.loadScriptNode(r,{attrs:{name:o,globalName:n,type:i},loaderHook:{createScriptHook:(s,l={})=>{const c=e.lifecycle.createScript.emit({url:s,attrs:l});if(c&&"url"in c)return c}}}).then(()=>handleRemoteEntryLoaded(o,n,r)).catch(s=>{throw s})}function getRemoteEntryUniqueKey(t){const{entry:e,name:r}=t;return sdk.composeKeyWithSeparator(r,e)}async function getRemoteEntry({origin:t,remoteEntryExports:e,remoteInfo:r}){const n=getRemoteEntryUniqueKey(r);if(e)return e;if(!globalLoading[n]){const o=t.remoteHandler.hooks.lifecycle.loadEntry,i=t.loaderHook;globalLoading[n]=o.emit({loaderHook:i,remoteInfo:r,remoteEntryExports:e}).then(a=>a||((typeof ENV_TARGET<"u"?ENV_TARGET==="web":sdk.isBrowserEnv())?loadEntryDom({remoteInfo:r,remoteEntryExports:e,loaderHook:i}):loadEntryNode({remoteInfo:r,loaderHook:i})))}return globalLoading[n]}function getRemoteInfo(t){return polyfills._extends({},t,{entry:"entry"in t?t.entry:"",type:t.type||DEFAULT_REMOTE_TYPE,entryGlobalName:t.entryGlobalName||t.name,shareScope:t.shareScope||DEFAULT_SCOPE})}function defaultPreloadArgs(t){return polyfills._extends({resourceCategory:"sync",share:!0,depsRemote:!0,prefetchInterface:!1},t)}function formatPreloadArgs(t,e){return e.map(r=>{const n=matchRemote(t,r.nameOrAlias);return assert(n,`Unable to preload ${r.nameOrAlias} as it is not included in ${!n&&sdk.safeToString({remoteInfo:n,remotes:t})}`),{remote:n,preloadConfig:defaultPreloadArgs(r)}})}function normalizePreloadExposes(t){return t?t.map(e=>e==="."?e:e.startsWith("./")?e.replace("./",""):e):[]}function preloadAssets(t,e,r,n=!0){const{cssAssets:o,jsAssetsWithoutEntry:i,entryAssets:a}=r;if(e.options.inBrowser){if(a.forEach(s=>{const{moduleInfo:l}=s,c=e.moduleCache.get(t.name);getRemoteEntry(c?{origin:e,remoteInfo:l,remoteEntryExports:c.remoteEntryExports}:{origin:e,remoteInfo:l,remoteEntryExports:void 0})}),n){const s={rel:"preload",as:"style"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m}});u&&document.head.appendChild(c)})}else{const s={rel:"stylesheet",type:"text/css"};o.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m},needDeleteLink:!1});u&&document.head.appendChild(c)})}if(n){const s={rel:"preload",as:"script"};i.forEach(l=>{const{link:c,needAttach:u}=sdk.createLink({url:l,cb:()=>{},attrs:s,createLinkHook:(d,h)=>{const m=e.loaderHook.lifecycle.createLink.emit({url:d,attrs:h});if(m instanceof HTMLLinkElement)return m}});u&&document.head.appendChild(c)})}else{const s={fetchpriority:"high",type:(t==null?void 0:t.type)==="module"?"module":"text/javascript"};i.forEach(l=>{const{script:c,needAttach:u}=sdk.createScript({url:l,cb:()=>{},attrs:s,createScriptHook:(d,h)=>{const m=e.loaderHook.lifecycle.createScript.emit({url:d,attrs:h});if(m instanceof HTMLScriptElement)return m},needDeleteScript:!0});u&&document.head.appendChild(c)})}}}const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded};var helpers={global:GlobalUtils,share:ShareUtils,utils:{matchRemoteWithNameAndExpose,preloadAssets,getRemoteInfo}};let Module=class{async getEntry(){if(this.remoteEntryExports)return this.remoteEntryExports;let e;try{e=await getRemoteEntry({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports})}catch{const n=getRemoteEntryUniqueKey(this.remoteInfo);e=await this.host.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry,origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,globalLoading,uniqueKey:n})}return assert(e,`remoteEntryExports is undefined
6
+ ${sdk.safeToString(this.remoteInfo)}`),this.remoteEntryExports=e,this.remoteEntryExports}async get(e,r,n,o){const{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.getEntry();if(!this.inited){const d=this.host.shareScopeMap,h=Array.isArray(this.remoteInfo.shareScope)?this.remoteInfo.shareScope:[this.remoteInfo.shareScope];h.length||h.push("default"),h.forEach(g=>{d[g]||(d[g]={})});const m=d[h[0]],_=[],E={version:this.remoteInfo.version||"",shareScopeKeys:Array.isArray(this.remoteInfo.shareScope)?h:this.remoteInfo.shareScope||"default"};Object.defineProperty(E,"shareScopeMap",{value:d,enumerable:!1});const p=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:m,remoteEntryInitOptions:E,initScope:_,remoteInfo:this.remoteInfo,origin:this.host});typeof(a==null?void 0:a.init)>"u"&&error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_002,errorCodes$1.runtimeDescMap,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName})),await a.init(p.shareScope,p.initScope,p.remoteEntryInitOptions),await this.host.hooks.lifecycle.initContainer.emit(polyfills._extends({},p,{id:e,remoteSnapshot:o,remoteEntryExports:a}))}this.lib=a,this.inited=!0;let s;s=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:r,moduleInfo:this.remoteInfo}),s||(s=await a.get(r)),assert(s,`${getFMId(this.remoteInfo)} remote don't export ${r}.`);const l=processModuleAlias(this.remoteInfo.name,r),c=this.wraperFactory(s,l);return i?await c():c}wraperFactory(e,r){function n(o,i){o&&typeof o=="object"&&Object.isExtensible(o)&&!Object.getOwnPropertyDescriptor(o,Symbol.for("mf_module_id"))&&Object.defineProperty(o,Symbol.for("mf_module_id"),{value:i,enumerable:!1})}return e instanceof Promise?async()=>{const o=await e();return n(o,r),o}:()=>{const o=e();return n(o,r),o}}constructor({remoteInfo:e,host:r}){this.inited=!1,this.lib=void 0,this.remoteInfo=e,this.host=r}};class SyncHook{on(e){typeof e=="function"&&this.listeners.add(e)}once(e){const r=this;this.on(function n(...o){return r.remove(n),e.apply(null,o)})}emit(...e){let r;return this.listeners.size>0&&this.listeners.forEach(n=>{r=n(...e)}),r}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}constructor(e){this.type="",this.listeners=new Set,e&&(this.type=e)}}class AsyncHook extends SyncHook{emit(...e){let r;const n=Array.from(this.listeners);if(n.length>0){let o=0;const i=a=>a===!1?!1:o<n.length?Promise.resolve(n[o++].apply(null,e)).then(i):a;r=i()}return Promise.resolve(r)}}function checkReturnData(t,e){if(!isObject(e))return!1;if(t!==e){for(const r in t)if(!(r in e))return!1}return!0}class SyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The data for the "${this.type}" hook should be an object.`);for(const r of this.listeners)try{const n=r(e);if(checkReturnData(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(n){warn(n),this.onerror(n)}return e}constructor(e){super(),this.onerror=error,this.type=e}}class AsyncWaterfallHook extends SyncHook{emit(e){isObject(e)||error(`The response data for the "${this.type}" hook must be an object.`);const r=Array.from(this.listeners);if(r.length>0){let n=0;const o=a=>(warn(a),this.onerror(a),e),i=a=>{if(checkReturnData(e,a)){if(e=a,n<r.length)try{return Promise.resolve(r[n++](e)).then(i,o)}catch(s){return o(s)}}else this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`);return e};return Promise.resolve(i(e))}return Promise.resolve(e)}constructor(e){super(),this.onerror=error,this.type=e}}class PluginSystem{applyPlugin(e,r){assert(isPlainObject(e),"Plugin configuration is invalid.");const n=e.name;assert(n,"A name must be provided by the plugin."),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply==null||e.apply.call(e,r),Object.keys(this.lifecycle).forEach(o=>{const i=e[o];i&&this.lifecycle[o].on(i)}))}removePlugin(e){assert(e,"A name is required.");const r=this.registerPlugins[e];assert(r,`The plugin "${e}" is not registered.`),Object.keys(r).forEach(n=>{n!=="name"&&this.lifecycle[n].remove(r[n])})}constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}}function assignRemoteInfo(t,e){const r=getRemoteEntryInfoFromSnapshot(e);r.url||error(`The attribute remoteEntry of ${t.name} must not be undefined.`);let n=sdk.getResourceUrl(e,r.url);!sdk.isBrowserEnv()&&!n.startsWith("http")&&(n=`https:${n}`),t.type=r.type,t.entryGlobalName=r.globalName,t.entry=n,t.version=e.version,t.buildVersion=e.buildVersion}function snapshotPlugin(){return{name:"snapshot-plugin",async afterResolve(t){const{remote:e,pkgNameOrAlias:r,expose:n,origin:o,remoteInfo:i,id:a}=t;if(!isRemoteInfoWithEntry(e)||!isPureRemoteEntry(e)){const{remoteSnapshot:s,globalSnapshot:l}=await o.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:e,id:a});assignRemoteInfo(i,s);const c={remote:e,preloadConfig:{nameOrAlias:r,exposes:[n],resourceCategory:"sync",share:!1,depsRemote:!1}},u=await o.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:o,preloadOptions:c,remoteInfo:i,remote:e,remoteSnapshot:s,globalSnapshot:l});return u&&preloadAssets(i,o,u,!1),polyfills._extends({},t,{remoteSnapshot:s})}return t}}}function splitId(t){const e=t.split(":");return e.length===1?{name:e[0],version:void 0}:e.length===2?{name:e[0],version:e[1]}:{name:e[1],version:e[2]}}function traverseModuleInfo(t,e,r,n,o={},i){const a=getFMId(e),{value:s}=getInfoWithoutType(t,a),l=i||s;if(l&&!sdk.isManifestProvider(l)&&(r(l,e,n),l.remotesInfo)){const c=Object.keys(l.remotesInfo);for(const u of c){if(o[u])continue;o[u]=!0;const d=splitId(u),h=l.remotesInfo[u];traverseModuleInfo(t,{name:d.name,version:h.matchedVersion},r,!1,o,void 0)}}}const isExisted=(t,e)=>document.querySelector(`${t}[${t==="link"?"href":"src"}="${e}"]`);function generatePreloadAssets(t,e,r,n,o){const i=[],a=[],s=[],l=new Set,c=new Set,{options:u}=t,{preloadConfig:d}=e,{depsRemote:h}=d;if(traverseModuleInfo(n,r,(p,g,I)=>{let S;if(I)S=d;else if(Array.isArray(h)){const M=h.find(v=>v.nameOrAlias===g.name||v.nameOrAlias===g.alias);if(!M)return;S=defaultPreloadArgs(M)}else if(h===!0)S=d;else return;const b=sdk.getResourceUrl(p,getRemoteEntryInfoFromSnapshot(p).url);b&&s.push({name:g.name,moduleInfo:{name:g.name,entry:b,type:"remoteEntryType"in p?p.remoteEntryType:"global",entryGlobalName:"globalName"in p?p.globalName:g.name,shareScope:"",version:"version"in p?p.version:void 0},url:b});let y="modules"in p?p.modules:[];const R=normalizePreloadExposes(S.exposes);if(R.length&&"modules"in p){var N;y=p==null||(N=p.modules)==null?void 0:N.reduce((M,v)=>((R==null?void 0:R.indexOf(v.moduleName))!==-1&&M.push(v),M),[])}function T(M){const v=M.map(A=>sdk.getResourceUrl(p,A));return S.filter?v.filter(S.filter):v}if(y){const M=y.length;for(let v=0;v<M;v++){const A=y[v],x=`${g.name}/${A.moduleName}`;t.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:A.moduleName==="."?g.name:x,name:g.name,remoteSnapshot:p,preloadConfig:S,remote:g,origin:t}),!getPreloaded(x)&&(S.resourceCategory==="all"?(i.push(...T(A.assets.css.async)),i.push(...T(A.assets.css.sync)),a.push(...T(A.assets.js.async)),a.push(...T(A.assets.js.sync))):(S.resourceCategory="sync")&&(i.push(...T(A.assets.css.sync)),a.push(...T(A.assets.js.sync))),setPreloaded(x))}}},!0,{},o),o.shared&&o.shared.length>0){const p=(g,I)=>{const S=getRegisteredShare(t.shareScopeMap,I.sharedName,g,t.sharedHandler.hooks.lifecycle.resolveShare);S&&typeof S.lib=="function"&&(I.assets.js.sync.forEach(b=>{l.add(b)}),I.assets.css.sync.forEach(b=>{c.add(b)}))};o.shared.forEach(g=>{var I;const S=(I=u.shared)==null?void 0:I[g.sharedName];if(!S)return;const b=g.version?S.find(R=>R.version===g.version):S;if(!b)return;arrayOptions(b).forEach(R=>{p(R,g)})})}const _=a.filter(p=>!l.has(p)&&!isExisted("script",p));return{cssAssets:i.filter(p=>!c.has(p)&&!isExisted("link",p)),jsAssetsWithoutEntry:_,entryAssets:s.filter(p=>!isExisted("script",p.url))}}const generatePreloadAssetsPlugin=function(){return{name:"generate-preload-assets-plugin",async generatePreloadAssets(t){const{origin:e,preloadOptions:r,remoteInfo:n,remote:o,globalSnapshot:i,remoteSnapshot:a}=t;return sdk.isBrowserEnv()?isRemoteInfoWithEntry(o)&&isPureRemoteEntry(o)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:o.name,url:o.entry,moduleInfo:{name:n.name,entry:o.entry,type:n.type||"global",entryGlobalName:"",shareScope:""}}]}:(assignRemoteInfo(n,a),generatePreloadAssets(e,r,n,i,a)):{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[]}}}};function getGlobalRemoteInfo(t,e){const r=getGlobalSnapshotInfoByModuleInfo({name:e.name,version:e.options.version}),n=r&&"remotesInfo"in r&&r.remotesInfo&&getInfoWithoutType(r.remotesInfo,t.name).value;return n&&n.matchedVersion?{hostGlobalSnapshot:r,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:n.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:getGlobalSnapshot(),remoteSnapshot:getGlobalSnapshotInfoByModuleInfo({name:t.name,version:"version"in t?t.version:void 0})}}class SnapshotHandler{async loadRemoteSnapshotInfo({moduleInfo:e,id:r,expose:n}){const{options:o}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:o,moduleInfo:e});let i=getGlobalSnapshotInfoByModuleInfo({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||"",remoteEntry:"",remotesInfo:{}},addGlobalSnapshot({[this.HostInstance.options.name]:i})),i&&"remotesInfo"in i&&!getInfoWithoutType(i.remotesInfo,e.name).value&&("version"in e||"entry"in e)&&(i.remotesInfo=polyfills._extends({},i==null?void 0:i.remotesInfo,{[e.name]:{matchedVersion:"version"in e?e.version:e.entry}}));const{hostGlobalSnapshot:a,remoteSnapshot:s,globalSnapshot:l}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:u}=await this.hooks.lifecycle.loadSnapshot.emit({options:o,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:s,globalSnapshot:l});let d,h;if(c)if(sdk.isManifestProvider(c)){const m=sdk.isBrowserEnv()?c.remoteEntry:c.ssrRemoteEntry||c.remoteEntry||"",_=await this.getManifestJson(m,e,{}),E=setGlobalSnapshotInfoByModuleInfo(polyfills._extends({},e,{entry:m}),_);d=_,h=E}else{const{remoteSnapshot:m}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:"global"});d=m,h=u}else if(isRemoteInfoWithEntry(e)){const m=await this.getManifestJson(e.entry,e,{}),_=setGlobalSnapshotInfoByModuleInfo(e,m),{remoteSnapshot:E}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:m,from:"global"});d=E,h=_}else error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_007,errorCodes$1.runtimeDescMap,{hostName:e.name,hostVersion:e.version,globalSnapshot:JSON.stringify(u)}));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:r,host:this.HostInstance,options:o,moduleInfo:e,remoteSnapshot:d}),{remoteSnapshot:d,globalSnapshot:h}}getGlobalRemoteInfo(e){return getGlobalRemoteInfo(e,this.HostInstance)}async getManifestJson(e,r,n){const o=async()=>{let a=this.manifestCache.get(e);if(a)return a;try{let s=await this.loaderHook.lifecycle.fetch.emit(e,{});(!s||!(s instanceof Response))&&(s=await fetch(e,{})),a=await s.json()}catch(s){a=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:s,from:"runtime",lifecycle:"afterResolve",origin:this.HostInstance}),a||(delete this.manifestLoading[e],error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_003,errorCodes$1.runtimeDescMap,{manifestUrl:e,moduleName:r.name,hostName:this.HostInstance.options.name},`${s}`)))}return assert(a.metaData&&a.exposes&&a.shared,`${e} is not a federation manifest`),this.manifestCache.set(e,a),a},i=async()=>{const a=await o(),s=sdk.generateSnapshotFromManifest(a,{version:e}),{remoteSnapshot:l}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:r,manifestJson:a,remoteSnapshot:s,manifestUrl:e,from:"manifest"});return l};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(a=>a)),this.manifestLoading[e]}constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new PluginSystem({beforeLoadRemoteSnapshot:new AsyncHook("beforeLoadRemoteSnapshot"),loadSnapshot:new AsyncWaterfallHook("loadGlobalSnapshot"),loadRemoteSnapshot:new AsyncWaterfallHook("loadRemoteSnapshot"),afterLoadSnapshot:new AsyncWaterfallHook("afterLoadSnapshot")}),this.manifestLoading=Global.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}}class SharedHandler{registerShared(e,r){const{shareInfos:n,shared:o}=formatShareConfigs(e,r);return Object.keys(n).forEach(a=>{n[a].forEach(l=>{!getRegisteredShare(this.shareScopeMap,a,l,this.hooks.lifecycle.resolveShare)&&l&&l.lib&&this.setShared({pkgName:a,lib:l.lib,get:l.get,loaded:!0,shared:l,from:r.name})})}),{shareInfos:n,shared:o}}async loadShare(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&await Promise.all(o.scope.map(async c=>{await Promise.all(this.initializeSharing(c,{strategy:o.strategy}))}));const i=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:o,shared:n.options.shared,origin:n}),{shareInfo:a}=i;assert(a,`Cannot find ${e} Share in the ${n.options.name}. Please ensure that the ${e} Share parameters have been injected`);const s=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare),l=c=>{c.useIn||(c.useIn=[]),addUniqueItem(c.useIn,n.options.name)};if(s&&s.lib)return l(s),s.lib;if(s&&s.loading&&!s.loaded){const c=await s.loading;return s.loaded=!0,s.lib||(s.lib=c),l(s),c}else if(s){const u=(async()=>{const d=await s.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0,l(h)),d})();return this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:u}),u}else{if(r!=null&&r.customShareInfo)return!1;const u=(async()=>{const d=await a.get();a.lib=d,a.loaded=!0,l(a);const h=getRegisteredShare(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare);return h&&(h.lib=d,h.loaded=!0),d})();return this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:u}),u}}initializeSharing(e=DEFAULT_SCOPE,r){const{host:n}=this,o=r==null?void 0:r.from,i=r==null?void 0:r.strategy;let a=r==null?void 0:r.initScope;const s=[];if(o!=="build"){const{initTokens:_}=this;a||(a=[]);let E=_[e];if(E||(E=_[e]={from:this.host.name}),a.indexOf(E)>=0)return s;a.push(E)}const l=this.shareScopeMap,c=n.options.name;l[e]||(l[e]={});const u=l[e],d=(_,E)=>{var p;const{version:g,eager:I}=E;u[_]=u[_]||{};const S=u[_],b=S[g],y=!!(b&&(b.eager||(p=b.shareConfig)!=null&&p.eager));(!b||b.strategy!=="loaded-first"&&!b.loaded&&(!I!=!y?I:c>b.from))&&(S[g]=E)},h=_=>_&&_.init&&_.init(l[e],a),m=async _=>{const{module:E}=await n.remoteHandler.getRemoteModuleAndOptions({id:_});if(E.getEntry){let p;try{p=await E.getEntry()}catch(g){p=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:_,error:g,from:"runtime",lifecycle:"beforeLoadShare",origin:n})}E.inited||(await h(p),E.inited=!0)}};return Object.keys(n.options.shared).forEach(_=>{n.options.shared[_].forEach(p=>{p.scope.includes(e)&&d(_,p)})}),(n.options.shareStrategy==="version-first"||i==="version-first")&&n.options.remotes.forEach(_=>{_.shareScope===e&&s.push(m(_.name))}),s}loadShareSync(e,r){const{host:n}=this,o=getTargetSharedOptions({pkgName:e,extraOptions:r,shareInfos:n.options.shared});o!=null&&o.scope&&o.scope.forEach(s=>{this.initializeSharing(s,{strategy:o.strategy})});const i=getRegisteredShare(this.shareScopeMap,e,o,this.hooks.lifecycle.resolveShare),a=s=>{s.useIn||(s.useIn=[]),addUniqueItem(s.useIn,n.options.name)};if(i){if(typeof i.lib=="function")return a(i),i.loaded||(i.loaded=!0,i.from===n.options.name&&(o.loaded=!0)),i.lib;if(typeof i.get=="function"){const s=i.get();if(!(s instanceof Promise))return a(i),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:s,shared:i}),s}}if(o.lib)return o.loaded||(o.loaded=!0),o.lib;if(o.get){const s=o.get();if(s instanceof Promise){const l=(r==null?void 0:r.from)==="build"?errorCodes$1.RUNTIME_005:errorCodes$1.RUNTIME_006;throw new Error(errorCodes$1.getShortErrorMsg(l,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}return o.lib=s,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:o.lib,shared:o}),o.lib}throw new Error(errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_006,errorCodes$1.runtimeDescMap,{hostName:n.options.name,sharedPkgName:e}))}initShareScopeMap(e,r,n={}){const{host:o}=this;this.shareScopeMap[e]=r,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:r,options:o.options,origin:o,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:r,from:n,lib:o,loading:i,loaded:a,get:s}){const{version:l,scope:c="default"}=r,u=polyfills._object_without_properties_loose(r,["version","scope"]);(Array.isArray(c)?c:[c]).forEach(h=>{if(this.shareScopeMap[h]||(this.shareScopeMap[h]={}),this.shareScopeMap[h][e]||(this.shareScopeMap[h][e]={}),!this.shareScopeMap[h][e][l]){this.shareScopeMap[h][e][l]=polyfills._extends({version:l,scope:["default"]},u,{lib:o,loaded:a,loading:i}),s&&(this.shareScopeMap[h][e][l].get=s);return}const m=this.shareScopeMap[h][e][l];i&&!m.loading&&(m.loading=i)})}_setGlobalShareScopeMap(e){const r=getGlobalShareScope(),n=e.id||e.name;n&&!r[n]&&(r[n]=this.shareScopeMap)}constructor(e){this.hooks=new PluginSystem({afterResolve:new AsyncWaterfallHook("afterResolve"),beforeLoadShare:new AsyncWaterfallHook("beforeLoadShare"),loadShare:new AsyncHook,resolveShare:new SyncWaterfallHook("resolveShare"),initContainerShareScopeMap:new SyncWaterfallHook("initContainerShareScopeMap")}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}}class RemoteHandler{formatAndRegisterRemote(e,r){return(r.remotes||[]).reduce((o,i)=>(this.registerRemote(i,o,{force:!1}),o),e.remotes)}setIdToRemoteMap(e,r){const{remote:n,expose:o}=r,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:o},a&&e.startsWith(i)){const s=e.replace(i,a);this.idToRemoteMap[s]={name:n.name,expose:o};return}if(a&&e.startsWith(a)){const s=e.replace(a,i);this.idToRemoteMap[s]={name:n.name,expose:o}}}async loadRemote(e,r){const{host:n}=this;try{const{loadFactory:o=!0}=r||{loadFactory:!0},{module:i,moduleOptions:a,remoteMatchInfo:s}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:l,remote:c,expose:u,id:d,remoteSnapshot:h}=s,m=await i.get(d,u,r,h),_=await this.hooks.lifecycle.onLoad.emit({id:d,pkgNameOrAlias:l,expose:u,exposeModule:o?m:void 0,exposeModuleFactory:o?void 0:m,remote:c,options:a,moduleInstance:i,origin:n});return this.setIdToRemoteMap(e,s),typeof _=="function"?_:m}catch(o){const{from:i="runtime"}=r||{from:"runtime"},a=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:o,from:i,lifecycle:"onLoad",origin:n});if(!a)throw o;return a}}async preloadRemote(e){const{host:r}=this;await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:r.options,origin:r});const n=formatPreloadArgs(r.options.remotes,e);await Promise.all(n.map(async o=>{const{remote:i}=o,a=getRemoteInfo(i),{globalSnapshot:s,remoteSnapshot:l}=await r.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:i}),c=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:r,preloadOptions:o,remote:i,remoteInfo:a,globalSnapshot:s,remoteSnapshot:l});c&&preloadAssets(a,r,c)}))}registerRemotes(e,r){const{host:n}=this;e.forEach(o=>{this.registerRemote(o,n.options.remotes,{force:r==null?void 0:r.force})})}async getRemoteModuleAndOptions(e){const{host:r}=this,{id:n}=e;let o;try{o=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:r.options,origin:r})}catch(_){if(o=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:r.options,origin:r,from:"runtime",error:_,lifecycle:"beforeRequest"}),!o)throw _}const{id:i}=o,a=matchRemoteWithNameAndExpose(r.options.remotes,i);assert(a,errorCodes$1.getShortErrorMsg(errorCodes$1.RUNTIME_004,errorCodes$1.runtimeDescMap,{hostName:r.options.name,requestId:i}));const{remote:s}=a,l=getRemoteInfo(s),c=await r.sharedHandler.hooks.lifecycle.afterResolve.emit(polyfills._extends({id:i},a,{options:r.options,origin:r,remoteInfo:l})),{remote:u,expose:d}=c;assert(u&&d,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let h=r.moduleCache.get(u.name);const m={host:r,remoteInfo:l};return h||(h=new Module(m),r.moduleCache.set(u.name,h)),{module:h,moduleOptions:m,remoteMatchInfo:c}}registerRemote(e,r,n){const{host:o}=this,i=()=>{if(e.alias){const s=r.find(l=>{var c;return e.alias&&(l.name.startsWith(e.alias)||((c=l.alias)==null?void 0:c.startsWith(e.alias)))});assert(!s,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${s&&s.name} name or alias`)}"entry"in e&&sdk.isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:o});const a=r.find(s=>s.name===e.name);if(!a)i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o});else{const s=[`The remote "${e.name}" is already registered.`,"Please note that overriding it may cause unexpected errors."];n!=null&&n.force&&(this.removeRemote(a),i(),r.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:o}),sdk.warn(s.join(" ")))}}removeRemote(e){try{const{host:n}=this,{name:o}=e,i=n.options.remotes.findIndex(s=>s.name===o);i!==-1&&n.options.remotes.splice(i,1);const a=n.moduleCache.get(e.name);if(a){const s=a.remoteInfo,l=s.entryGlobalName;if(CurrentGlobal[l]){var r;(r=Object.getOwnPropertyDescriptor(CurrentGlobal,l))!=null&&r.configurable?delete CurrentGlobal[l]:CurrentGlobal[l]=void 0}const c=getRemoteEntryUniqueKey(a.remoteInfo);globalLoading[c]&&delete globalLoading[c],n.snapshotHandler.manifestCache.delete(s.entry);let u=s.buildVersion?sdk.composeKeyWithSeparator(s.name,s.buildVersion):s.name;const d=CurrentGlobal.__FEDERATION__.__INSTANCES__.findIndex(m=>s.buildVersion?m.options.id===u:m.name===u);if(d!==-1){const m=CurrentGlobal.__FEDERATION__.__INSTANCES__[d];u=m.options.id||u;const _=getGlobalShareScope();let E=!0;const p=[];Object.keys(_).forEach(g=>{const I=_[g];I&&Object.keys(I).forEach(S=>{const b=I[S];b&&Object.keys(b).forEach(y=>{const R=b[y];R&&Object.keys(R).forEach(N=>{const T=R[N];T&&typeof T=="object"&&T.from===s.name&&(T.loaded||T.loading?(T.useIn=T.useIn.filter(M=>M!==s.name),T.useIn.length?E=!1:p.push([g,S,y,N])):p.push([g,S,y,N]))})})})}),E&&(m.shareScopeMap={},delete _[u]),p.forEach(([g,I,S,b])=>{var y,R,N;(N=_[g])==null||(R=N[I])==null||(y=R[S])==null||delete y[b]}),CurrentGlobal.__FEDERATION__.__INSTANCES__.splice(d,1)}const{hostGlobalSnapshot:h}=getGlobalRemoteInfo(e,n);if(h){const m=h&&"remotesInfo"in h&&h.remotesInfo&&getInfoWithoutType(h.remotesInfo,e.name).key;m&&(delete h.remotesInfo[m],Global.__FEDERATION__.__MANIFEST_LOADING__[m]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[m])}n.moduleCache.delete(e.name)}}catch(n){logger.log("removeRemote fail: ",n)}}constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}}const USE_SNAPSHOT=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN=="boolean"?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0;class ModuleFederation{initOptions(e){this.registerPlugins(e.plugins);const r=this.formatOptions(this.options,e);return this.options=r,r}async loadShare(e,r){return this.sharedHandler.loadShare(e,r)}loadShareSync(e,r){return this.sharedHandler.loadShareSync(e,r)}initializeSharing(e=DEFAULT_SCOPE,r){return this.sharedHandler.initializeSharing(e,r)}initRawContainer(e,r,n){const o=getRemoteInfo({name:e,entry:r}),i=new Module({host:this,remoteInfo:o});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}async loadRemote(e,r){return this.remoteHandler.loadRemote(e,r)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,r,n={}){this.sharedHandler.initShareScopeMap(e,r,n)}formatOptions(e,r){const{shared:n}=formatShareConfigs(e,r),{userOptions:o,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:r,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,o),{shared:s}=this.sharedHandler.registerShared(i,o),l=[...i.plugins];o.plugins&&o.plugins.forEach(u=>{l.includes(u)||l.push(u)});const c=polyfills._extends({},e,r,{plugins:l,remotes:a,shared:s});return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){const r=registerPlugins$1(e,this);this.options.plugins=this.options.plugins.reduce((n,o)=>(o&&n&&!n.find(i=>i.name===o.name)&&n.push(o),n),r||[])}registerRemotes(e,r){return this.remoteHandler.registerRemotes(e,r)}registerShared(e){this.sharedHandler.registerShared(this.options,polyfills._extends({},this.options,{shared:e}))}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.17.1",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook,loadEntryError:new AsyncHook,getModuleFactory:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const r=USE_SNAPSHOT?[snapshotPlugin(),generatePreloadAssetsPlugin()]:[],n={id:getBuilderId$1(),name:e.name,plugins:r,remotes:[],shared:{},inBrowser:sdk.isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}var index=Object.freeze({__proto__:null});index_cjs$2.loadScript=sdk.loadScript;index_cjs$2.loadScriptNode=sdk.loadScriptNode;index_cjs$2.CurrentGlobal=CurrentGlobal;index_cjs$2.Global=Global;index_cjs$2.Module=Module;index_cjs$2.ModuleFederation=ModuleFederation;index_cjs$2.addGlobalSnapshot=addGlobalSnapshot;index_cjs$2.assert=assert;index_cjs$2.getGlobalFederationConstructor=getGlobalFederationConstructor;index_cjs$2.getGlobalSnapshot=getGlobalSnapshot;index_cjs$2.getInfoWithoutType=getInfoWithoutType;index_cjs$2.getRegisteredShare=getRegisteredShare;index_cjs$2.getRemoteEntry=getRemoteEntry;index_cjs$2.getRemoteInfo=getRemoteInfo;index_cjs$2.helpers=helpers;index_cjs$2.isStaticResourcesEqual=isStaticResourcesEqual;index_cjs$2.matchRemoteWithNameAndExpose=matchRemoteWithNameAndExpose;index_cjs$2.registerGlobalPlugins=registerGlobalPlugins;index_cjs$2.resetFederationGlobalInfo=resetFederationGlobalInfo;index_cjs$2.safeWrapper=safeWrapper;index_cjs$2.satisfy=satisfy;index_cjs$2.setGlobalFederationConstructor=setGlobalFederationConstructor;index_cjs$2.setGlobalFederationInstance=setGlobalFederationInstance;index_cjs$2.types=index;var utils_cjs={},runtimeCore$1=index_cjs$2;function getBuilderId(){return typeof FEDERATION_BUILD_IDENTIFIER<"u"?FEDERATION_BUILD_IDENTIFIER:""}function getGlobalFederationInstance(t,e){const r=getBuilderId();return runtimeCore$1.CurrentGlobal.__FEDERATION__.__INSTANCES__.find(n=>!!(r&&n.options.id===r||n.options.name===t&&!n.options.version&&!e||n.options.name===t&&e&&n.options.version===e))}utils_cjs.getGlobalFederationInstance=getGlobalFederationInstance;var runtimeCore=index_cjs$2,errorCodes=index_cjs,utils=utils_cjs;function createInstance(t){const e=runtimeCore.getGlobalFederationConstructor()||runtimeCore.ModuleFederation;return new e(t)}let FederationInstance=null;function init(t){const e=utils.getGlobalFederationInstance(t.name,t.version);return e?(e.initOptions(t),FederationInstance||(FederationInstance=e),e):(FederationInstance=createInstance(t),runtimeCore.setGlobalFederationInstance(FederationInstance),FederationInstance)}function loadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadRemote.apply(FederationInstance,t)}function loadShare(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShare.apply(FederationInstance,t)}function loadShareSync(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.loadShareSync.apply(FederationInstance,t)}function preloadRemote(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.preloadRemote.apply(FederationInstance,t)}function registerRemotes(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerRemotes.apply(FederationInstance,t)}function registerPlugins(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerPlugins.apply(FederationInstance,t)}function getInstance(){return FederationInstance}function registerShared(...t){return runtimeCore.assert(FederationInstance,errorCodes.getShortErrorMsg(errorCodes.RUNTIME_009,errorCodes.runtimeDescMap)),FederationInstance.registerShared.apply(FederationInstance,t)}runtimeCore.setGlobalFederationConstructor(runtimeCore.ModuleFederation);index_cjs$3.Module=runtimeCore.Module;index_cjs$3.ModuleFederation=runtimeCore.ModuleFederation;index_cjs$3.getRemoteEntry=runtimeCore.getRemoteEntry;index_cjs$3.getRemoteInfo=runtimeCore.getRemoteInfo;index_cjs$3.loadScript=runtimeCore.loadScript;index_cjs$3.loadScriptNode=runtimeCore.loadScriptNode;index_cjs$3.registerGlobalPlugins=runtimeCore.registerGlobalPlugins;index_cjs$3.createInstance=createInstance;index_cjs$3.getInstance=getInstance;var init_1=index_cjs$3.init=init;index_cjs$3.loadRemote=loadRemote;index_cjs$3.loadShare=loadShare;index_cjs$3.loadShareSync=loadShareSync;index_cjs$3.preloadRemote=preloadRemote;index_cjs$3.registerPlugins=registerPlugins;index_cjs$3.registerRemotes=registerRemotes;index_cjs$3.registerShared=registerShared;let initResolve,initReject;const initPromise=new Promise((t,e)=>{initResolve=t,initReject=e});var vis2Inventwo__mf_v__runtimeInit__mf_v__={initPromise,initResolve,initReject};export{init_1 as a,index_cjs$3 as i,vis2Inventwo__mf_v__runtimeInit__mf_v__ as v};
@@ -1,2 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-efZo-HwM.js","./assets/_commonjsHelpers-B_uApUQq.js","./assets/index-C-Jo2qj7.js","./assets/defaultTheme-B9IKJkvV.js","./assets/vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js","./assets/vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js","./assets/styled-Ddrjhtlo.js","./assets/useTheme-3EfQxciw.js","./assets/createSvgIcon-BVtBa_de.js","./assets/jsx-runtime-C86LZJaJ.js","./assets/tableRowClasses-Bn_tNoU4.js","./assets/index-CdA3nOgT.js","./assets/vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js","./assets/index-DvbC0cIJ.js","./assets/index-f8cx2lwt.js","./assets/index-DGue0Sbd.js"])))=>i.map(i=>d[i]);
2
- import{a as f,v as g}from"./assets/vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";import c from"./assets/virtualExposes-B-vfXZaV.js";import{_ as a}from"./assets/preload-helper-CmmR0tKU.js";(function(){if(!window.inventwoDebugLog){let r=function(o,n){const u=Array.from(n).map(l=>{if(typeof l=="object"&&l!==null)try{return JSON.stringify(l)}catch{return"[object]"}return String(l)}).join(" ");mylog.push({type:o,msg:u})};window.inventwoDebugLog=!0;const e={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let t=!1;["log","warn","error","debug"].forEach(function(o){console[o]=function(...n){r(o,n),e[o].apply(console,n)}}),setInterval(function(){const o=$(".mylog");if(!o||t)return;t=!0;const n=mylog.splice(0,mylog.length);n.forEach(u=>{o.append($("<div>").addClass(u.type).text("["+u.type+"] "+u.msg))}),n.length&&o.scrollTop(o[0].scrollHeight),t=!1},1e3)}})();const s={react:async()=>await a(()=>import("./assets/index-efZo-HwM.js").then(t=>t.i),__vite__mapDeps([0,1]),import.meta.url),"@mui/material":async()=>await a(()=>import("./assets/index-C-Jo2qj7.js"),__vite__mapDeps([2,3,4,1,5,6,7,8,9,10]),import.meta.url),"@iobroker/vis-2-widgets-react-dev":async()=>await a(()=>import("./assets/index-CdA3nOgT.js"),__vite__mapDeps([11,4,1,5,12]),import.meta.url),"@iobroker/adapter-react-v5":async()=>await a(()=>import("./assets/index-DvbC0cIJ.js"),__vite__mapDeps([13,3,4,1,5,12,7]),import.meta.url),"react-dom":async()=>await a(()=>import("./assets/index-f8cx2lwt.js").then(t=>t.i),__vite__mapDeps([14,1,4,5]),import.meta.url),"@mui/icons-material":async()=>await a(()=>import("./assets/index-DGue0Sbd.js"),__vite__mapDeps([15,9,4,1,5,8,6,3]),import.meta.url)},i={react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"vis2Inventwo",async get(){i.react.loaded=!0;const{react:e}=s,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:"vis2Inventwo",async get(){i["@mui/material"].loaded=!0;const{"@mui/material":e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/vis-2-widgets-react-dev":{name:"@iobroker/vis-2-widgets-react-dev",version:"4.0.4",scope:["default"],loaded:!1,from:"vis2Inventwo",async get(){i["@iobroker/vis-2-widgets-react-dev"].loaded=!0;const{"@iobroker/vis-2-widgets-react-dev":e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.7.2",scope:["default"],loaded:!1,from:"vis2Inventwo",async get(){i["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=s,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:"vis2Inventwo",async get(){i["react-dom"].loaded=!0;const{"react-dom":e}=s,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:"vis2Inventwo",async get(){i["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=s,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},v=[],d={},m="default",p="vis2Inventwo";async function b(e={},t=[]){const r=f({name:p,remotes:v,shared:i,plugins:[],shareStrategy:"version-first"});var o=d[m];if(o||(o=d[m]={from:p}),!(t.indexOf(o)>=0)){t.push(o),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(n){console.error(n)}return g.initResolve(r),r}}function k(e){if(!(e in c))throw new Error(`Module ${e} does not exist in container.`);return c[e]().then(t=>()=>t)}export{k as get,b as init};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-CtldE_Jt.js","./assets/defaultTheme-DL-wasCI.js","./assets/vis2Inventwo__loadShare__react__loadShare__-CvH99W-I.js","./assets/_commonjsHelpers-BujWM7Y5.js","./assets/vis2Inventwo__mf_v__runtimeInit__mf_v__-C3oMM7wE.js","./assets/vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-CwpbEbbN.js","./assets/tslib.es6-bbV-5QUe.js","./assets/useTheme-D6kRSJ_1.js","./assets/index-CZmEcmpB.js","./assets/vis2Inventwo__loadShare___mf_0_iobroker_mf_1_adapter_mf_2_react_mf_2_v5__loadShare__-DabLVWRI.js","./assets/index-BD-FQvN5.js","./assets/jsx-runtime-Dt7ToRAj.js","./assets/createSvgIcon-CxCg16Xx.js","./assets/styled-B53MEpUW.js","./assets/index-CaPX8dkd.js","./assets/tableRowClasses-BB2m7w67.js","./assets/index-B7Dbx8oC.js","./assets/index-CSZW0DpR.js"])))=>i.map(i=>d[i]);
2
+ import{a as v,v as _}from"./assets/vis2Inventwo__mf_v__runtimeInit__mf_v__-C3oMM7wE.js";import m from"./assets/virtualExposes-BGZiKeMG.js";import{_ as u}from"./assets/preload-helper-47hLtgXP.js";(function(){if(!window.inventwoDebugLog){let r=function(o,i,n){const l=Array.from(i).map(a=>{if(typeof a=="object"&&a!==null)try{return JSON.stringify(a)}catch{return"[object]"}return String(a)}).join(" ");mylog.push({type:o,msg:l,location:n})};window.inventwoDebugLog=!0;const e={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let t=!1;["log","warn","error","debug"].forEach(function(o){console[o]=function(...i){let n="";try{const l=new Error().stack;if(l){const a=l.split(`
3
+ `),d=a[2]||a[1];d&&(n=d.trim())}}catch{}r(o,i,n),e[o].apply(console,i)}}),setInterval(function(){const o=$(".mylog");if(!o||t)return;t=!0;const i=mylog.splice(0,mylog.length);i.forEach(n=>{o.append($("<div>").addClass(n.type).text("["+n.type+"] "+n.msg+(n.location?" @ "+n.location:"")))}),i.length&&o.scrollTop(o[0].scrollHeight),t=!1},1e3)}})();const c={"@iobroker/adapter-react-v5":async()=>await u(()=>import("./assets/index-CtldE_Jt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),"@iobroker/vis-2-widgets-react-dev":async()=>await u(()=>import("./assets/index-CZmEcmpB.js"),__vite__mapDeps([8,2,3,4,5,9]),import.meta.url),"@mui/icons-material":async()=>await u(()=>import("./assets/index-BD-FQvN5.js"),__vite__mapDeps([10,11,2,3,4,12,13,1]),import.meta.url),"@mui/material":async()=>await u(()=>import("./assets/index-CaPX8dkd.js"),__vite__mapDeps([14,1,2,3,4,13,7,12,11,15]),import.meta.url),react:async()=>await u(()=>import("./assets/index-B7Dbx8oC.js").then(t=>t.i),__vite__mapDeps([16,3]),import.meta.url),"react-dom":async()=>await u(()=>import("./assets/index-CSZW0DpR.js").then(t=>t.i),__vite__mapDeps([17,3,2,4]),import.meta.url)},s={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.7.2",scope:["default"],loaded:!1,from:"vis2Inventwo",async get(){s["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=c,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"@iobroker/vis-2-widgets-react-dev":{name:"@iobroker/vis-2-widgets-react-dev",version:"4.0.4",scope:["default"],loaded:!1,from:"vis2Inventwo",async get(){s["@iobroker/vis-2-widgets-react-dev"].loaded=!0;const{"@iobroker/vis-2-widgets-react-dev":e}=c,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:"vis2Inventwo",async get(){s["@mui/icons-material"].loaded=!0;const{"@mui/icons-material":e}=c,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:"vis2Inventwo",async get(){s["@mui/material"].loaded=!0;const{"@mui/material":e}=c,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:"vis2Inventwo",async get(){s.react.loaded=!0;const{react:e}=c,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:"vis2Inventwo",async get(){s["react-dom"].loaded=!0;const{"react-dom":e}=c,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},w=[],p={},f="default",g="vis2Inventwo";async function h(e={},t=[]){const r=v({name:g,remotes:w,shared:s,plugins:[],shareStrategy:"version-first"});var o=p[f];if(o||(o=p[f]={from:g}),!(t.indexOf(o)>=0)){t.push(o),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(i){console.error(i)}return _.initResolve(r),r}}function I(e){if(!(e in m))throw new Error(`Module ${e} does not exist in container.`);return m[e]().then(t=>()=>t)}export{I as get,h as init};
@@ -1 +0,0 @@
1
- import{v as w,i as v}from"./vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";(function(){if(!window.inventwoDebugLog){let r=function(t,n){const s=Array.from(n).map(o=>{if(typeof o=="object"&&o!==null)try{return JSON.stringify(o)}catch{return"[object]"}return String(o)}).join(" ");mylog.push({type:t,msg:s})};window.inventwoDebugLog=!0;const c={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let e=!1;["log","warn","error","debug"].forEach(function(t){console[t]=function(...n){r(t,n),c[t].apply(console,n)}}),setInterval(function(){const t=$(".mylog");if(!t||e)return;e=!0;const n=mylog.splice(0,mylog.length);n.forEach(s=>{t.append($("<div>").addClass(s.type).text("["+s.type+"] "+s.msg))}),n.length&&t.scrollTop(t[0].scrollHeight),e=!1},1e3)}})();const{loadShare:m}=v,{initPromise:x}=w,y=x.then(c=>m("@iobroker/vis-2-widgets-react-dev",{customShareInfo:{shareConfig:{singleton:!0,strictVersion:!1,requiredVersion:"*"}}})),b=await y.then(c=>c());var I=b;class D extends(window.visRxWidget||I.VisRxWidget){static getI18nPrefix(){return"vis_2_widgets_inventwo_"}constructor(e){super(e),this.groupAttrs=[],this.getWidgetInfo().visAttrs.forEach(t=>{t.fields.forEach(n=>{n.name!==void 0&&(n.name.endsWith("FromWidget")||(this.groupAttrs[t.name]===void 0&&(this.groupAttrs[t.name]=[]),this.groupAttrs[t.name].push(n.name)))})})}onChange(e,r){if(this.props.editMode)return;const t=this.state.rxData.oid;this.props.context.setValue(t,parseFloat(r))}getValue(e){if(e!==void 0&&e!==""&&e!=="nothing_selected")return this.state.values[`${e}.val`]}getStyle(e,r){var s,o,f,a;const t={},n=this.state.rxData[e];if(n){let l=!1;const u=this.props.context.views[this.props.view],h=(o=(s=u==null?void 0:u.widgets)==null?void 0:s[n])==null?void 0:o.data;if(h)r.forEach(i=>t[i]=h[i]),l=!0;else{const i=Object.keys(this.props.context.views);for(let d=0;d<i.length;d++){const g=this.props.context.views[i[d]];if(g!==this.props.view&&((a=(f=g.widgets)==null?void 0:f[n])!=null&&a.data)){const _=g.widgets[n].data;r.forEach(p=>t[p]=_[p]),l=!0;break}}}l||r.forEach(i=>t[i]=this.state.rxData[i])}else r.forEach(l=>t[l]=this.state.rxData[l]);return t}convertValue(e){return e==="true"?!0:e==="false"?!1:isNaN(e)?e:parseFloat(e)}validFieldValue(e){return e!=null&&e!==""}convertRgbToHex(e){if(!e)return null;const r=e.match(/(\d+),(\d+),(\d+),(\d+)/);if(!r)return null;const[t,n,s]=r.slice(1,5).map(parseFloat);function o(f){const a=f.toString(16);return a.length===1?`0${a}`:a}return`#${o(t)}${o(n)}${o(s)}`}isInteractionAllowed(e=null){return!(this.props.editMode||e&&e.target.closest(".IroColorPicker")!==null||e.target.closest(`.inventwo-view-in-widget-wrapper, #${this.props.id}`).classList.contains("inventwo-view-in-widget-wrapper")||this.state.rxData.type==="readonly")}validOid(e){return e!=null&&e!=="nothing_selected"&&e!==""}}export{D as I};
@@ -1 +0,0 @@
1
- import{j as l}from"./jsx-runtime-C86LZJaJ.js";import"./vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js";import{v as r}from"./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js";import{I as c}from"./InventwoGeneric-D4TSslP6.js";import"./_commonjsHelpers-B_uApUQq.js";import"./vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";(function(){if(!window.inventwoDebugLog){let s=function(e,o){const i=Array.from(o).map(a=>{if(typeof a=="object"&&a!==null)try{return JSON.stringify(a)}catch{return"[object]"}return String(a)}).join(" ");mylog.push({type:e,msg:i})};window.inventwoDebugLog=!0;const d={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let t=!1;["log","warn","error","debug"].forEach(function(e){console[e]=function(...o){s(e,o),d[e].apply(console,o)}}),setInterval(function(){const e=$(".mylog");if(!e||t)return;t=!0;const o=mylog.splice(0,mylog.length);o.forEach(i=>{e.append($("<div>").addClass(i.type).text("["+i.type+"] "+i.msg))}),o.length&&e.scrollTop(e[0].scrollHeight),t=!1},1e3)}})();class n extends c{static getWidgetInfo(){return{id:"tplInventwoWidgetCheckbox",visSet:"vis-2-widgets-inventwo",visWidgetLabel:"widget_checkbox",visName:"widget_checkbox",visAttrs:[{name:"common",fields:[{name:"oid",type:"id",label:"oid"},{name:"valueFalse",type:"text",label:"value_false"},{name:"valueTrue",type:"text",label:"value_true"},{name:"textFalse",type:"html",label:"text_false"},{name:"textTrue",type:"html",label:"text_true"},{name:"textPosition",type:"select",options:[{value:"top",label:"top"},{value:"bottom",label:"bottom"},{value:"start",label:"start"},{value:"end",label:"end"}],default:"end",label:"text_position"}]},{name:"attr_group_css_style",label:"attr_group_css_style",fields:[{label:"from_widget",name:"styleFromWidget",type:"widget",tpl:"tplInventwoWidgetCheckbox",all:!0},{name:"boxColor",type:"color",label:"box_color",hidden:"!!data.styleFromWidget"},{name:"boxColorActive",type:"color",label:"box_color_active",hidden:"!!data.styleFromWidget"},{name:"boxSize",type:"slider",min:0,max:50,step:1,default:24,label:"box_size",hidden:"!!data.styleFromWidget"}]}],visDefaultStyle:{overflow:"visible",width:70,height:40},visPrev:"widgets/vis-2-widgets-inventwo/img/vis-widget-inventwo-checkbox.png"}}propertiesUpdate(){}componentDidMount(){super.componentDidMount(),this.propertiesUpdate()}getWidgetInfo(){return n.getWidgetInfo()}onRxDataChanged(){this.propertiesUpdate()}onRxStyleChanged(){}onStateUpdated(t,s){}static getI18nPrefix(){return"vis_2_widgets_inventwo_"}onChange(){if(this.props.editMode)return;const t=this.state.rxData.oid;this.validOid(t)&&(this.getValue(this.state.rxData.oid)===this.convertValue(this.state.rxData.valueTrue,!0)?this.props.context.setValue(t,this.convertValue(this.state.rxData.valueFalse,!1)):this.props.context.setValue(t,this.convertValue(this.state.rxData.valueTrue,!0)))}getValue(t){if(this.validOid(t))return this.state.values[`${t}.val`]}renderWidgetBody(t){super.renderWidgetBody(t);const s=this.state.rxData.oid,e=this.getValue(s),o=this.validOid(s)&&e===this.convertValue(this.state.rxData.valueTrue,!0),i=this.getStyle("styleFromWidget",this.groupAttrs.attr_group_css_style),a={color:i.boxColor,"&.Mui-checked":{color:i.boxColorActive},"& .MuiSvgIcon-root":{fontSize:i.boxSize+"px"}},u={"& .MuiFormControlLabel-label":{fontSize:this.state.rxStyle["font-size"],textShadow:this.state.rxStyle["text-shadow"],fontFamily:this.state.rxStyle["font-family"],fontStyle:this.state.rxStyle["font-style"],fontVariant:this.state.rxStyle["font-variant"],fontWeight:this.state.rxStyle["font-weight"],lineHeight:this.state.rxStyle["line-height"],letterSpacing:this.state.rxStyle["letter-spacing"],wordSpacing:this.state.rxStyle["word-spacing"]}};return l.jsx(r.FormGroup,{children:l.jsx(r.FormControlLabel,{sx:u,control:l.jsx(r.Checkbox,{sx:a,onClick:()=>this.onChange(),checked:o}),label:o?this.state.rxData.textTrue:this.state.rxData.textFalse,labelPlacement:this.state.rxData.textPosition})})}}export{n as default};
@@ -1 +0,0 @@
1
- import{j as h}from"./jsx-runtime-C86LZJaJ.js";import"./vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js";import{v as p}from"./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js";import{I as c}from"./InventwoGeneric-D4TSslP6.js";import"./_commonjsHelpers-B_uApUQq.js";import"./vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";(function(){if(!window.inventwoDebugLog){let t=function(i,r){const e=Array.from(r).map(a=>{if(typeof a=="object"&&a!==null)try{return JSON.stringify(a)}catch{return"[object]"}return String(a)}).join(" ");mylog.push({type:i,msg:e})};window.inventwoDebugLog=!0;const u={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let o=!1;["log","warn","error","debug"].forEach(function(i){console[i]=function(...r){t(i,r),u[i].apply(console,r)}}),setInterval(function(){const i=$(".mylog");if(!i||o)return;o=!0;const r=mylog.splice(0,mylog.length);r.forEach(e=>{i.append($("<div>").addClass(e.type).text("["+e.type+"] "+e.msg))}),r.length&&i.scrollTop(i[0].scrollHeight),o=!1},1e3)}})();class m extends c{constructor(o){super(o),this.state.sliderValue=0}componentDidMount(){super.componentDidMount(),this.setState({sliderValue:this.getValue(this.state.rxData.oid)})}static getWidgetInfo(){return{id:"tplInventwoWidgetSlider",visSet:"vis-2-widgets-inventwo",visWidgetLabel:"widget_slider",visName:"widget_slider",visAttrs:[{name:"common",fields:[{name:"oid",type:"id",label:"oid",onChange:async(o,t,i,r)=>{if(t[o.name]&&t[o.name]!=="nothing_selected"){const e=await r.getObject(t[o.name]);if(e!=null&&e.common){let a=!1;e.common.min!==void 0&&e.common.min!==t.max_value&&(t.max_value=e.common.min,a=!0),e.common.max!==void 0&&e.common.max!==t.min_value&&(t.min_value=e.common.max,a=!0),e.common.step!==void 0&&e.common.step!==t.step&&(t.step=e.common.step,a=!0),a&&i(t)}}}},{name:"minValue",type:"number",label:"min_value",default:0},{name:"maxValue",type:"number",label:"max_value",default:100},{name:"step",type:"number",label:"step",default:1},{name:"orientation",type:"select",options:[{value:"horizontal",label:"horizontal"},{value:"vertical",label:"vertical"}],default:"horizontal",label:"orientation"},{name:"showMinMax",type:"checkbox",label:"show_min_max",default:!0},{type:"delimiter"},{type:"help",text:"vis_2_widgets_inventwo_steps"},{name:"showSteps",type:"checkbox",label:"show_steps",default:!1},{name:"stepMode",type:"select",options:[{value:"auto",label:"auto"},{value:"custom",label:"custom"}],default:"auto",label:"step_mode",hidden:"!data.showSteps"},{name:"stepDisplay",type:"number",label:"step_display",default:10,hidden:'!data.showSteps || data.stepMode != "auto"'},{name:"customSteps",type:"text",label:"custom_steps",hidden:'!data.showSteps || data.stepMode != "custom"',tooltip:"custom_steps_tooltip"}]},{name:"attr_group_css_slider_track",label:"attr_group_css_slider_track",fields:[{label:"from_widget",name:"sliderTrackFromWidget",type:"widget",tpl:"tplInventwoWidgetSlider",all:!0},{name:"sliderRailColor",type:"color",default:"rgb(110,110,110)",label:"slider_rail_color",hidden:"!!data.sliderTrackFromWidget"},{name:"sliderRailActiveColor",type:"color",default:"rgb(94,107,63)",label:"slider_rail_active_color",hidden:"!!data.sliderTrackFromWidget"},{name:"trackBarType",type:"select",options:[{value:"normal",label:"normal"},{value:"inverted",label:"inverted"},{value:!1,label:"none"}],default:"normal",label:"track_bar_type",hidden:"!!data.sliderTrackFromWidget"},{name:"trackWidth",type:"slider",min:1,max:50,step:1,default:10,label:"track_width",hidden:"!!data.sliderTrackFromWidget"},{name:"trackBorderRadius",type:"slider",min:1,max:100,step:1,default:100,label:"track_border_radius",hidden:"!!data.sliderTrackFromWidget"},{type:"delimiter",hidden:"!!data.sliderTrackFromWidget"},{type:"help",text:"vis_2_widgets_inventwo_track_shadow",hidden:"!!data.sliderTrackFromWidget"},{name:"trackShadowX",type:"slider",min:0,max:50,step:1,default:2,label:"x_offset",hidden:"!!data.sliderTrackFromWidget"},{name:"trackShadowY",type:"slider",min:0,max:50,step:1,default:2,label:"y_offset",hidden:"!!data.sliderTrackFromWidget"},{name:"trackShadowBlur",type:"slider",min:0,max:50,step:1,default:2,label:"blur",hidden:"!!data.sliderTrackFromWidget"},{name:"trackShadowSize",type:"slider",min:0,max:50,step:1,default:1,label:"size",hidden:"!!data.sliderTrackFromWidget"},{name:"trackShadowColor",type:"color",default:"rgba(0, 0, 0, 1)",label:"shadow_color",hidden:"!!data.sliderTrackFromWidget"}]},{name:"attr_group_css_slider_slider_thumb",label:"attr_group_css_slider_slider_thumb",fields:[{label:"from_widget",name:"sliderThumbFromWidget",type:"widget",tpl:"tplInventwoWidgetSlider",all:!0},{name:"sliderThumbColor",type:"color",default:"rgba(69, 86, 24, 1)",label:"slider_thumb_color",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbSize",type:"slider",min:1,max:50,step:1,default:16,label:"thumbSize",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbBorderRadius",type:"slider",min:1,max:100,step:1,default:100,label:"thumb_border_radius",hidden:"!!data.sliderThumbFromWidget"},{type:"delimiter",hidden:"!!data.sliderThumbFromWidget"},{type:"help",text:"vis_2_widgets_inventwo_thumb_shadow",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbShadowX",type:"slider",min:0,max:50,step:1,default:2,label:"x_offset",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbShadowY",type:"slider",min:0,max:50,step:1,default:2,label:"y_offset",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbShadowBlur",type:"slider",min:0,max:50,step:1,default:2,label:"blur",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbShadowSize",type:"slider",min:0,max:50,step:1,default:1,label:"size",hidden:"!!data.sliderThumbFromWidget"},{name:"thumbShadowColor",type:"color",default:"rgba(0, 0, 0, 0.5)",label:"shadow_color",hidden:"!!data.sliderThumbFromWidget"}]}],visDefaultStyle:{width:150,overflow:"visible",height:40},visPrev:"widgets/vis-2-widgets-inventwo/img/vis-widget-inventwo-slider.png"}}static getI18nPrefix(){return"vis_2_widgets_inventwo_"}onStateUpdated(o,t){o===this.state.rxData.oid&&t&&t.val!==this.state.sliderValue&&this.setState({sliderValue:t.val})}getWidgetInfo(){return m.getWidgetInfo()}renderWidgetBody(o){super.renderWidgetBody(o);const t=parseFloat(this.state.rxData.minValue),i=parseFloat(this.state.rxData.maxValue),r=[];if(this.state.rxData.showMinMax&&(r.push({value:t,label:t}),r.push({value:i,label:i})),this.state.rxData.showSteps)if(this.state.rxData.stepMode==="auto"){const s=parseFloat(this.state.rxData.stepDisplay);if(s>0)for(let l=t+s;l<i;l+=s)r.push({value:parseFloat(l.toFixed(2).replace(/[.,]00$/,"")),label:l.toFixed(2).replace(/[.,]00$/,"")})}else{let s=this.state.rxData.customSteps;s==null&&(s=""),s=s.split(","),s.forEach(l=>{l=parseInt(l),r.push({value:l,label:l})})}const e=this.getStyle("sliderTrackFromWidget",this.groupAttrs.attr_group_css_slider_track),a=this.getStyle("sliderThumbFromWidget",this.groupAttrs.attr_group_css_slider_slider_thumb),d=e.trackBarType,n={height:this.state.rxData.orientation==="horizontal"?e.trackWidth:"100%",width:this.state.rxData.orientation!=="horizontal"?e.trackWidth:"100%","& .MuiSlider-thumb":{backgroundColor:a.sliderThumbColor,width:a.thumbSize,height:a.thumbSize,borderRadius:`${a.thumbBorderRadius}%`,"&:before":{boxShadow:`${a.thumbShadowX}px ${a.thumbShadowY}px ${a.thumbShadowBlur}px ${a.thumbShadowSize}px ${a.thumbShadowColor}`}},"& .MuiSlider-rail":{backgroundColor:d==="normal"?e.sliderRailColor:d==="inverted"?e.sliderRailActiveColor:"",color:d==="normal"?e.sliderRailColor:d==="inverted"?e.sliderRailActiveColor:"",border:"none",borderRadius:`${e.trackBorderRadius}px`,boxShadow:`${e.trackShadowX}px ${this.state.rxData.trackShadowY}px ${e.trackShadowBlur}px ${e.trackShadowSize}px ${e.trackShadowColor}`},"& .MuiSlider-track":{backgroundColor:d==="normal"?this.state.rxData.sliderRailActiveColor:d==="inverted"?e.sliderRailColor:"",color:d==="normal"?this.state.rxData.sliderRailActiveColor:d==="inverted"?e.sliderRailColor:"",border:"none",borderRadius:`${e.trackBorderRadius}px`},"& .MuiSlider-mark":{color:e.sliderRailActiveColor},"& .MuiSlider-markLabel":{fontSize:this.state.rxStyle["font-size"],color:this.state.rxStyle.color,textShadow:this.state.rxStyle["text-shadow"],fontFamily:this.state.rxStyle["font-family"],fontStyle:this.state.rxStyle["font-style"],fontVariant:this.state.rxStyle["font-variant"],fontWeight:this.state.rxStyle["font-weight"],lineHeight:this.state.rxStyle["line-height"],letterSpacing:this.state.rxStyle["letter-spacing"],wordSpacing:this.state.rxStyle["word-spacing"]}};return this.state.rxData.orientation==="horizontal"?n["& .MuiSlider-markLabel"].top=e.trackWidth+20:n["& .MuiSlider-markLabel"].left=e.trackWidth+20,h.jsx(p.Slider,{disabled:this.props.editMode,sx:n,onChange:(s,l)=>this.setState({sliderValue:l}),onChangeCommitted:(s,l)=>this.setState({sliderValue:l},()=>this.onChange(s,l)),min:this.state.rxData.minValue,max:this.state.rxData.maxValue,step:this.state.rxData.step,value:this.state.sliderValue||0,valueLabelDisplay:"auto",track:e.trackBarType,orientation:this.state.rxData.orientation,marks:r})}}export{m as default};
@@ -1 +0,0 @@
1
- import{j as l}from"./jsx-runtime-C86LZJaJ.js";import"./vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js";import{v as s}from"./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js";import{I as c}from"./InventwoGeneric-D4TSslP6.js";import"./_commonjsHelpers-B_uApUQq.js";import"./vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";(function(){if(!window.inventwoDebugLog){let i=function(r,o){const e=Array.from(o).map(a=>{if(typeof a=="object"&&a!==null)try{return JSON.stringify(a)}catch{return"[object]"}return String(a)}).join(" ");mylog.push({type:r,msg:e})};window.inventwoDebugLog=!0;const h={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let t=!1;["log","warn","error","debug"].forEach(function(r){console[r]=function(...o){i(r,o),h[r].apply(console,o)}}),setInterval(function(){const r=$(".mylog");if(!r||t)return;t=!0;const o=mylog.splice(0,mylog.length);o.forEach(e=>{r.append($("<div>").addClass(e.type).text("["+e.type+"] "+e.msg))}),o.length&&r.scrollTop(r[0].scrollHeight),t=!1},1e3)}})();class d extends c{static getWidgetInfo(){return{id:"tplInventwoWidgetSwitch",visSet:"vis-2-widgets-inventwo",visWidgetLabel:"widget_switch",visName:"widget_switch",visAttrs:[{name:"common",fields:[{name:"oid",type:"id",label:"oid"},{name:"valueFalse",type:"text",label:"value_false"},{name:"valueTrue",type:"text",label:"value_true"},{name:"textFalse",type:"html",label:"text_false"},{name:"textTrue",type:"html",label:"text_true"},{name:"textPosition",type:"select",options:[{value:"top",label:"top"},{value:"bottom",label:"bottom"},{value:"start",label:"start"},{value:"end",label:"end"}],default:"end",label:"text_position"}]},{name:"attr_group_css_track",label:"attr_group_css_track",fields:[{label:"from_widget",name:"trackFromWidget",type:"widget",tpl:"tplInventwoWidgetSwitch",all:!0},{name:"trackColor",type:"color",label:"track_color",hidden:"!!data.trackFromWidget"},{name:"trackColorTrue",type:"color",label:"track_color_true",default:"rgb(143,164,85)",hidden:"!!data.trackFromWidget"},{name:"trackSize",type:"slider",min:1,max:50,step:1,default:12,label:"track_width",hidden:"!!data.trackFromWidget"},{name:"trackBorderRadius",type:"slider",min:1,max:100,step:1,default:100,label:"track_border_radius",hidden:"!!data.trackFromWidget"},{type:"delimiter",hidden:"!!data.trackFromWidget"},{type:"help",text:"vis_2_widgets_inventwo_track_shadow",hidden:"!!data.trackFromWidget"},{name:"trackShadowX",type:"slider",min:0,max:50,step:1,default:2,label:"x_offset",hidden:"!!data.trackFromWidget"},{name:"trackShadowY",type:"slider",min:0,max:50,step:1,default:2,label:"y_offset",hidden:"!!data.trackFromWidget"},{name:"trackShadowBlur",type:"slider",min:0,max:50,step:1,default:2,label:"blur",hidden:"!!data.trackFromWidget"},{name:"trackShadowSize",type:"slider",min:0,max:50,step:1,default:1,label:"size",hidden:"!!data.trackFromWidget"},{name:"trackShadowColor",type:"color",default:"rgba(0, 0, 0, 1)",label:"shadow_color",hidden:"!!data.trackFromWidget"},{name:"trackShadowColorTrue",type:"color",default:"rgba(0, 0, 0, 1)",label:"shadow_color_true",hidden:"!!data.trackFromWidget"}]},{name:"attr_group_css_thumb",label:"attr_group_css_thumb",fields:[{label:"from_widget",name:"thumbFromWidget",type:"widget",tpl:"tplInventwoWidgetSwitch",all:!0},{name:"thumbColor",type:"color",label:"thumb_color",hidden:"!!data.thumbFromWidget"},{name:"thumbColorTrue",type:"color",label:"thumb_color_true",default:"rgb(69,86,24)",hidden:"!!data.thumbFromWidget"},{name:"thumbSize",type:"slider",min:1,max:50,step:1,default:16,label:"thumbSize",hidden:"!!data.thumbFromWidget"},{name:"thumbBorderRadius",type:"slider",min:1,max:100,step:1,default:100,label:"thumb_border_radius",hidden:"!!data.thumbFromWidget"},{type:"delimiter",hidden:"!!data.thumbFromWidget"},{type:"help",text:"vis_2_widgets_inventwo_thumb_shadow",hidden:"!!data.thumbFromWidget"},{name:"thumbShadowX",type:"slider",min:0,max:50,step:1,default:2,label:"x_offset",hidden:"!!data.thumbFromWidget"},{name:"thumbShadowY",type:"slider",min:0,max:50,step:1,default:2,label:"y_offset",hidden:"!!data.thumbFromWidget"},{name:"thumbShadowBlur",type:"slider",min:0,max:50,step:1,default:2,label:"blur",hidden:"!!data.thumbFromWidget"},{name:"thumbShadowSize",type:"slider",min:0,max:50,step:1,default:1,label:"size",hidden:"!!data.thumbFromWidget"},{name:"thumbShadowColor",type:"color",default:"rgba(0, 0, 0, 0.5)",label:"shadow_color",hidden:"!!data.thumbFromWidget"},{name:"thumbShadowColorTrue",type:"color",default:"rgba(0, 0, 0, 0.5)",label:"shadow_color_true",hidden:"!!data.thumbFromWidget"}]}],visDefaultStyle:{overflow:"visible",width:70,height:40},visPrev:"widgets/vis-2-widgets-inventwo/img/vis-widget-inventwo-switch.png"}}propertiesUpdate(){}componentDidMount(){super.componentDidMount(),this.propertiesUpdate()}getWidgetInfo(){return d.getWidgetInfo()}onRxDataChanged(){this.propertiesUpdate()}onRxStyleChanged(){}onStateUpdated(t,i){}static getI18nPrefix(){return"vis_2_widgets_inventwo_"}onChange(){if(this.props.editMode)return;const t=this.state.rxData.oid;this.getValue(this.state.rxData.oid)===d.convertValue(this.state.rxData.valueTrue,!0)?this.props.context.setValue(t,d.convertValue(this.state.rxData.valueFalse,!1)):this.props.context.setValue(t,d.convertValue(this.state.rxData.valueTrue,!0))}getValue(t){if(t!==void 0&&t!==""&&t!=="nothing_selected")return this.state.values[`${t}.val`]}static convertValue(t,i){return t==="true"?!0:t==="false"?!1:isNaN(t)?t==null||t===""?i:t:parseFloat(t)}renderWidgetBody(t){super.renderWidgetBody(t);const i=this.state.rxData.oid,o=this.getValue(i)===d.convertValue(this.state.rxData.valueTrue,!0),e=this.getStyle("trackFromWidget",this.groupAttrs.attr_group_css_track),a=this.getStyle("thumbFromWidget",this.groupAttrs.attr_group_css_thumb);let n=a.thumbShadowColor,u=e.trackShadowColor;o&&(n=a.thumbShadowColorTrue,u=e.trackShadowColorTrue);const m={"&.MuiSwitch-root":{alignItems:"center",height:e.trackSize,width:"34px",boxSizing:"content-box"},"& .MuiSwitch-switchBase":{color:a.thumbColor,top:"unset"},"& .MuiSwitch-thumb":{width:a.thumbSize,height:a.thumbSize,borderRadius:`${a.thumbBorderRadius}%`,boxShadow:`${a.thumbShadowX}px ${a.thumbShadowY}px ${a.thumbShadowBlur}px ${a.thumbShadowSize}px ${n}`},"& .Mui-checked .MuiSwitch-thumb":{color:a.thumbColorTrue},"& .MuiSwitch-track":{backgroundColor:e.trackColor,borderRadius:`${e.trackBorderRadius/2/100*e.trackSize}px`,boxShadow:`${e.trackShadowX}px ${e.trackShadowY}px ${e.trackShadowBlur}px ${e.trackShadowSize}px ${u}`},"& .Mui-checked + .MuiSwitch-track":{backgroundColor:e.trackColorTrue}};return l.jsx(s.FormGroup,{children:l.jsx(s.FormControlLabel,{control:l.jsx(s.Switch,{sx:m,onClick:()=>this.onChange(),checked:o}),label:o?this.state.rxData.textTrue:this.state.rxData.textFalse,labelPlacement:this.state.rxData.textPosition})})}}export{d as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./jsx-runtime-C86LZJaJ.js";import"./vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js";import{v as n}from"./vis2Inventwo__loadShare___mf_0_mui_mf_1_material__loadShare__-BhIpvxbF.js";import{I as z}from"./InventwoGeneric-D4TSslP6.js";import{s as x}from"./styled-Ddrjhtlo.js";import{t as C,a as w}from"./tableRowClasses-Bn_tNoU4.js";import"./_commonjsHelpers-B_uApUQq.js";import"./vis2Inventwo__mf_v__runtimeInit__mf_v__-2uL955SU.js";import"./defaultTheme-B9IKJkvV.js";(function(){if(!window.inventwoDebugLog){let p=function(l,o){const i=Array.from(o).map(d=>{if(typeof d=="object"&&d!==null)try{return JSON.stringify(d)}catch{return"[object]"}return String(d)}).join(" ");mylog.push({type:l,msg:i})};window.inventwoDebugLog=!0;const F={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let m=!1;["log","warn","error","debug"].forEach(function(l){console[l]=function(...o){p(l,o),F[l].apply(console,o)}}),setInterval(function(){const l=$(".mylog");if(!l||m)return;m=!0;const o=mylog.splice(0,mylog.length);o.forEach(i=>{l.append($("<div>").addClass(i.type).text("["+i.type+"] "+i.msg))}),o.length&&l.scrollTop(l[0].scrollHeight),m=!1},1e3)}})();class T extends z{static getWidgetInfo(){return{id:"tplInventwoWidgetTable",visSet:"vis-2-widgets-inventwo",visWidgetLabel:"widget_table",visName:"widget_table",visAttrs:[{name:"common",fields:[{name:"oid",type:"id",label:"oid"},{name:"countColumns",type:"number",default:0,label:"count_columns",hidden:"data.countColumns > 0"},{name:"maxRows",type:"number",min:0,step:1,default:0,label:"max_rows"},{name:"showHead",type:"checkbox",default:!0,label:"show_head"}]},{name:"countColumns",indexFrom:1,indexTo:"countColumns",label:"attr_group_columns",fields:[{name:"columnKey",type:"text",label:"key"},{name:"columnTitle",type:"text",label:"title"},{name:"columnWidth",type:"slider",min:0,max:200,step:1,default:0,label:"width"},{name:"columnPrefix",type:"text",label:"prefix"},{name:"columnSuffix",type:"text",label:"suffix"},{name:"columnPlaceholder",type:"text",label:"placeholder"},{name:"columnTitleAlign",type:"select",options:[{value:"left",label:"left"},{value:"center",label:"center"},{value:"right",label:"right"}],default:"center",label:"title_align"},{name:"columnContentAlign",type:"select",options:[{value:"left",label:"left"},{value:"center",label:"center"},{value:"right",label:"right"}],default:"left",label:"content_align"},{name:"columnValueFormat",type:"select",options:[{value:"text",label:"Text"},{value:"number",label:"Number"},{value:"datetime",label:"datetime"}],default:"text",label:"format"},{name:"columnNumberDecimals",type:"number",label:"decimals",default:0,hidden:'data["columnValueFormat" + index] != "number"'},{name:"columnDatetimeFormat",type:"select",options:[{value:"datetime",label:"Datetime"},{value:"date",label:"Date"},{value:"time",label:"Time"}],default:"datetime",label:"datetime_format",hidden:'data["columnValueFormat" + index] != "datetime"'}]},{name:"attr_content_css_table",label:"attr_content_css_table",fields:[{type:"help",text:"vis_2_widgets_inventwo_colors"},{name:"backgroundHeader",type:"color",label:"background_header"},{name:"backgroundOddRow",type:"color",label:"background_odd_row"},{name:"backgroundEvenRow",type:"color",label:"background_even_row"},{type:"help",text:"vis_2_widgets_inventwo_heights"},{name:"headerHeight",type:"slider",min:0,max:100,step:1,default:50,label:"header_height"},{name:"columnHeight",type:"slider",min:0,max:100,step:1,default:50,label:"column_height"},{type:"help",text:"vis_2_widgets_inventwo_row_border"},{name:"headerBorderWidth",type:"slider",min:0,max:10,step:1,default:1,label:"thickness_header"},{name:"headerBorderColor",type:"color",label:"color_header",default:"rgb(81, 81, 81)"},{name:"rowBorderWidth",type:"slider",min:0,max:10,step:1,default:1,label:"thickness"},{name:"rowBorderColor",type:"color",label:"color",default:"rgb(81, 81, 81)"}]},{name:"attr_group_css_border",label:"attr_group_css_border",fields:[{label:"from_widget",name:"borderStyleFromWidget",type:"widget",tpl:"tplInventwoWidgetTable",all:!0},{name:"borderColor",type:"color",label:"border_color"},{name:"borderSizeTop",type:"slider",min:0,max:10,step:1,default:0,label:"size_top",hidden:"!!data.borderStyleFromWidget"},{name:"borderSizeBottom",type:"slider",min:0,max:10,step:1,default:0,label:"size_bottom",hidden:"!!data.borderStyleFromWidget"},{name:"borderSizeLeft",type:"slider",min:0,max:10,step:1,default:0,label:"size_left",hidden:"!!data.borderStyleFromWidget"},{name:"borderSizeRight",type:"slider",min:0,max:10,step:1,default:0,label:"size_right",hidden:"!!data.borderStyleFromWidget"},{name:"borderStyle",type:"select",options:[{value:"none",label:"none"},{value:"dashed",label:"dashed"},{value:"dotted",label:"dotted"},{value:"double",label:"double"},{value:"groove",label:"groove"},{value:"inset",label:"outset"},{value:"ridge",label:"ridge"},{value:"solid",label:"solid"}],default:"none",label:"border_style",hidden:"!!data.borderStyleFromWidget"}]},{name:"attr_group_css_outer_shadow",label:"attr_group_css_outer_shadow",fields:[{label:"from_widget",name:"outerShadowStyleFromWidget",type:"widget",tpl:"tplInventwoWidgetTable",all:!0},{name:"outerShadowColor",type:"color",label:"outer_shadow_color",default:"rgb(0,0,0)",hidden:"!!data.outerShadowStyleFromWidget"},{name:"outerShadowX",type:"slider",min:0,max:50,step:1,default:2,label:"x_offset",hidden:"!!data.outerShadowStyleFromWidget"},{name:"outerShadowY",type:"slider",min:0,max:50,step:1,default:2,label:"y_offset",hidden:"!!data.outerShadowStyleFromWidget"},{name:"outerShadowBlur",type:"slider",min:0,max:50,step:1,default:2,label:"blur",hidden:"!!data.outerShadowStyleFromWidget"},{name:"outerShadowSize",type:"slider",min:0,max:50,step:1,default:1,label:"size",hidden:"!!data.outerShadowStyleFromWidget"}]}],visDefaultStyle:{overflow:"visible"},visPrev:"widgets/vis-2-widgets-inventwo/img/vis-widget-inventwo-table.png"}}propertiesUpdate(){}componentDidMount(){super.componentDidMount(),this.propertiesUpdate()}static getI18nPrefix(){return"vis_2_widgets_inventwo_"}getWidgetInfo(){return T.getWidgetInfo()}onRxDataChanged(){this.propertiesUpdate()}onRxStyleChanged(){}onStateUpdated(m,p){}renderWidgetBody(m){super.renderWidgetBody(m),this.wrappedContent=!0;const p=this.state.rxData.oid,l=this.getValue(p);let o=null;if(l==null||l==="")return r.jsx("div",{children:"Keine Daten"});try{o=JSON.parse(l)}catch{return r.jsx("div",{children:"Invalides JSON"})}const i=[],d=[],u=this.getStyle("outerShadowStyleFromWidget",this.groupAttrs.attr_group_css_outer_shadow),h=this.getStyle("borderStyleFromWidget",this.groupAttrs.attr_group_css_border),j=x(n.TableRow)(()=>({[`&.${C.root}`]:{height:this.state.rxData.headerHeight+(Number.isNaN(Number(this.state.rxData.headerHeight))?"":"px")}})),S=x(n.TableCell)(()=>({[`&.${w.head}`]:{backgroundColor:this.state.rxData.backgroundHeader},[`&.${w.root}`]:{paddingTop:0,paddingBottom:0,fontSize:this.state.rxStyle["font-size"],color:this.state.rxStyle.color,textShadow:this.state.rxStyle["text-shadow"],fontFamily:this.state.rxStyle["font-family"],fontStyle:this.state.rxStyle["font-style"],fontVariant:this.state.rxStyle["font-variant"],fontWeight:this.state.rxStyle["font-weight"],lineHeight:this.state.rxStyle["line-height"],letterSpacing:this.state.rxStyle["letter-spacing"],wordSpacing:this.state.rxStyle["word-spacing"],borderBottomWidth:this.state.rxData.headerBorderWidth,borderColor:this.state.rxData.headerBorderColor}})),_=x(n.TableCell)(()=>({[`&.${w.root}`]:{paddingTop:0,paddingBottom:0,fontSize:this.state.rxStyle["font-size"],color:this.state.rxStyle.color,textShadow:this.state.rxStyle["text-shadow"],fontFamily:this.state.rxStyle["font-family"],fontStyle:this.state.rxStyle["font-style"],fontVariant:this.state.rxStyle["font-variant"],fontWeight:this.state.rxStyle["font-weight"],lineHeight:this.state.rxStyle["line-height"],letterSpacing:this.state.rxStyle["letter-spacing"],wordSpacing:this.state.rxStyle["word-spacing"],borderBottomWidth:this.state.rxData.rowBorderWidth,borderColor:this.state.rxData.rowBorderColor}})),N=x(n.TableRow)(()=>({"&:nth-of-type(odd)":{backgroundColor:this.state.rxData.backgroundOddRow},"&:nth-of-type(even)":{backgroundColor:this.state.rxData.backgroundEvenRow},[`&.${C.root}`]:{height:this.state.rxData.columnHeight+(Number.isNaN(Number(this.state.rxData.columnHeight))?"":"px")}}));if(o.length>0){const y=this.state.rxData.countColumns;if(y===0)Object.keys(o[0]).forEach((t,s)=>{i.push(r.jsx(S,{children:t},s))});else for(let t=1;t<=this.state.rxData.countColumns;t++){let s=this.state.rxData[`columnTitle${t}`];s===null&&(s=Object.keys(o[0])[t-1]);const c={textAlign:this.state.rxData[`columnTitleAlign${t}`]};this.state.rxData[`columnWidth${t}`]&&(c.width=`${this.state.rxData[`columnWidth${t}`]}${Number.isNaN(Number(this.state.rxData[`columnWidth${t}`]))?"":"px"}`),i.push(r.jsx(S,{style:c,children:s},t))}let b=this.state.rxData.maxRows;b<=0?b=o.length:b=Math.min(b,o.length);for(let t=0;t<b;t++){const s=o[t],c=[];if(y===0)Object.values(s).forEach((e,g)=>{typeof e=="object"&&e!==null&&(e=JSON.stringify(e)),c.push(r.jsx(_,{children:e},`${t}_${g}`))});else for(let e=1;e<=this.state.rxData.countColumns;e++){let g=this.state.rxData[`columnKey${e}`];const k=this.state.rxData[`columnPrefix${e}`],B=this.state.rxData[`columnSuffix${e}`],D=this.state.rxData[`columnPlaceholder${e}`],W=this.state.rxData[`columnValueFormat${e}`];g||(g=Object.keys(o[0])[e-1]);let a=s[g];if((a===null||a==="")&&D)a=D;else if(W==="number")a=new Intl.NumberFormat(navigator.language,{minimumFractionDigits:this.state.rxData[`columnNumberDecimals${e}`]??0,maximumFractionDigits:this.state.rxData[`columnNumberDecimals${e}`]??0}).format(a);else if(W==="datetime"&&a){const f=this.state.rxData[`columnDatetimeFormat${e}`];f==="datetime"?a=new Date(a).toLocaleString():f==="date"?a=new Date(a).toLocaleDateString():f==="time"&&(a=new Date(a).toLocaleTimeString())}typeof a=="object"&&a!==null&&(a=JSON.stringify(a)),c.push(r.jsxs(_,{style:{textAlign:this.state.rxData[`columnContentAlign${e}`]},children:[k,a,B]},`${t}_${e}`))}d.push(r.jsx(N,{sx:{"&:last-child td, &:last-child th":{border:0}},children:c},t))}}let v="";return u.outerShadowColor&&(v+=`${u.outerShadowX}px ${u.outerShadowY}px ${u.outerShadowBlur}px ${u.outerShadowSize}px ${u.outerShadowColor}`),r.jsx("div",{style:{boxShadow:`${v}`,overflow:"visible",height:"100%",borderColor:h.borderColor,borderTopWidth:`${h.borderSizeTop}px`,borderBottomWidth:`${h.borderSizeBottom}px`,borderLeftWidth:`${h.borderSizeLeft}px`,borderRightWidth:`${h.borderSizeRight}px`,borderStyle:h.borderStyle},children:r.jsx(n.TableContainer,{component:n.Paper,style:{height:"100%",background:"transparent"},children:r.jsxs(n.Table,{children:[this.state.rxData.showHead&&r.jsx(n.TableHead,{children:r.jsx(j,{children:i})}),r.jsx(n.TableBody,{children:d})]})})})}}export{T as default};
@@ -1 +0,0 @@
1
- (function(){if(!window.inventwoDebugLog){let i=function(o,n){const t=Array.from(n).map(l=>{if(typeof l=="object"&&l!==null)try{return JSON.stringify(l)}catch{return"[object]"}return String(l)}).join(" ");mylog.push({type:o,msg:t})};window.inventwoDebugLog=!0;const e={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let r=!1;["log","warn","error","debug"].forEach(function(o){console[o]=function(...n){i(o,n),e[o].apply(console,n)}}),setInterval(function(){const o=$(".mylog");if(!o||r)return;r=!0;const n=mylog.splice(0,mylog.length);n.forEach(t=>{o.append($("<div>").addClass(t.type).text("["+t.type+"] "+t.msg))}),n.length&&o.scrollTop(o[0].scrollHeight),r=!1},1e3)}})();var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{s as c,g};
@@ -1 +0,0 @@
1
- import{v as m}from"./vis2Inventwo__loadShare__react__loadShare__-BOPtvDwW.js";import{j as h}from"./jsx-runtime-C86LZJaJ.js";import{p as j,g as P,a as N,s as R}from"./styled-Ddrjhtlo.js";import{b as w}from"./defaultTheme-B9IKJkvV.js";(function(){if(!window.inventwoDebugLog){let e=function(r,t){const s=Array.from(t).map(i=>{if(typeof i=="object"&&i!==null)try{return JSON.stringify(i)}catch{return"[object]"}return String(i)}).join(" ");mylog.push({type:r,msg:s})};window.inventwoDebugLog=!0;const o={log:console.log,warn:console.warn,error:console.error,debug:console.debug};window.mylog=[];let n=!1;["log","warn","error","debug"].forEach(function(r){console[r]=function(...t){e(r,t),o[r].apply(console,t)}}),setInterval(function(){const r=$(".mylog");if(!r||n)return;n=!0;const t=mylog.splice(0,mylog.length);t.forEach(s=>{r.append($("<div>").addClass(s.type).text("["+s.type+"] "+s.msg))}),t.length&&r.scrollTop(r[0].scrollHeight),n=!1},1e3)}})();function C(o){var n,e,r="";if(typeof o=="string"||typeof o=="number")r+=o;else if(typeof o=="object")if(Array.isArray(o)){var t=o.length;for(n=0;n<t;n++)o[n]&&(e=C(o[n]))&&(r&&(r+=" "),r+=e)}else for(e in o)o[e]&&(r&&(r+=" "),r+=e);return r}function _(){for(var o,n,e=0,r="",t=arguments.length;e<t;e++)(o=arguments[e])&&(n=C(o))&&(r&&(r+=" "),r+=n);return r}function b(o,n){const e={...n};for(const r in o)if(Object.prototype.hasOwnProperty.call(o,r)){const t=r;if(t==="components"||t==="slots")e[t]={...o[t],...e[t]};else if(t==="componentsProps"||t==="slotProps"){const s=o[t],i=n[t];if(!i)e[t]=s||{};else if(!s)e[t]=i;else{e[t]={...i};for(const l in s)if(Object.prototype.hasOwnProperty.call(s,l)){const c=l;e[t][c]=b(s[c],i[c])}}}else e[t]===void 0&&(e[t]=o[t])}return e}function T(o,n,e=void 0){const r={};for(const t in o){const s=o[t];let i="",l=!0;for(let c=0;c<s.length;c+=1){const a=s[c];a&&(i+=(l===!0?"":" ")+n(a),l=!1,e&&e[a]&&(i+=" "+e[a]))}r[t]=i}return r}const I=m.createContext(void 0);function J({value:o,children:n}){return h.jsx(I.Provider,{value:o,children:n})}function A(o){const{theme:n,name:e,props:r}=o;if(!n||!n.components||!n.components[e])return r;const t=n.components[e];return t.defaultProps?b(t.defaultProps,r):!t.styleOverrides&&!t.variants?b(t,r):r}function D({props:o,name:n}){const e=m.useContext(I);return A({props:o,name:n,theme:{components:e}})}const x={theme:void 0};function O(o){let n,e;return function(t){let s=n;return(s===void 0||t.theme!==e)&&(x.theme=t.theme,s=j(o(x)),n=s,e=t.theme),s}}const M=O;function E(o){return D(o)}function L(o){return N("MuiSvgIcon",o)}const K=P("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]),U=o=>{const{color:n,fontSize:e,classes:r}=o,t={root:["root",n!=="inherit"&&`color${w(n)}`,`fontSize${w(e)}`]};return T(t,L,r)},k=R("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,n)=>{const{ownerState:e}=o;return[n.root,e.color!=="inherit"&&n[`color${w(e.color)}`],n[`fontSize${w(e.fontSize)}`]]}})(M(({theme:o})=>{var n,e,r,t,s,i,l,c,a,g,u,d,y,p;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(t=(n=o.transitions)==null?void 0:n.create)==null?void 0:t.call(n,"fill",{duration:(r=(e=(o.vars??o).transitions)==null?void 0:e.duration)==null?void 0:r.shorter}),variants:[{props:f=>!f.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((i=(s=o.typography)==null?void 0:s.pxToRem)==null?void 0:i.call(s,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((c=(l=o.typography)==null?void 0:l.pxToRem)==null?void 0:c.call(l,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((g=(a=o.typography)==null?void 0:a.pxToRem)==null?void 0:g.call(a,35))||"2.1875rem"}},...Object.entries((o.vars??o).palette).filter(([,f])=>f&&f.main).map(([f])=>{var v,S;return{props:{color:f},style:{color:(S=(v=(o.vars??o).palette)==null?void 0:v[f])==null?void 0:S.main}}}),{props:{color:"action"},style:{color:(d=(u=(o.vars??o).palette)==null?void 0:u.action)==null?void 0:d.active}},{props:{color:"disabled"},style:{color:(p=(y=(o.vars??o).palette)==null?void 0:y.action)==null?void 0:p.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),z=m.forwardRef(function(n,e){const r=E({props:n,name:"MuiSvgIcon"}),{children:t,className:s,color:i="inherit",component:l="svg",fontSize:c="medium",htmlColor:a,inheritViewBox:g=!1,titleAccess:u,viewBox:d="0 0 24 24",...y}=r,p=m.isValidElement(t)&&t.type==="svg",f={...r,color:i,component:l,fontSize:c,instanceFontSize:n.fontSize,inheritViewBox:g,viewBox:d,hasSvgAsChild:p},v={};g||(v.viewBox=d);const S=U(f);return h.jsxs(k,{as:l,className:_(S.root,s),focusable:"false",color:a,"aria-hidden":u?void 0:!0,role:u?"img":void 0,ref:e,...v,...y,...p&&t.props,ownerState:f,children:[p?t.props.children:t,u?h.jsx("title",{children:u}):null]})});z.muiName="SvgIcon";function W(o,n){function e(r,t){return h.jsx(z,{"data-testid":`${n}Icon`,ref:t,...r,children:o})}return e.muiName=z.muiName,m.memo(m.forwardRef(e))}export{J as D,z as S,T as a,W as b,_ as c,L as g,M as m,b as r,K as s,E as u};