signalk-questdb 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coderabbit.yaml +19 -15
- package/.release-please-manifest.json +1 -1
- package/CLAUDE.md +4 -3
- package/README.md +94 -5
- package/dist/api-contract.d.ts +46 -0
- package/dist/archive.d.ts +44 -0
- package/dist/archive.js +117 -0
- package/dist/archive.js.map +1 -0
- package/dist/config/schema.d.ts +3 -0
- package/dist/config/schema.js +27 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/container-env.js +11 -0
- package/dist/container-env.js.map +1 -1
- package/dist/gpx-import-session.d.ts +69 -0
- package/dist/gpx-import-session.js +218 -0
- package/dist/gpx-import-session.js.map +1 -0
- package/dist/gpx-import.d.ts +135 -0
- package/dist/gpx-import.js +452 -0
- package/dist/gpx-import.js.map +1 -0
- package/dist/history-v1.d.ts +2 -1
- package/dist/history-v1.js +77 -19
- package/dist/history-v1.js.map +1 -1
- package/dist/history-v2.d.ts +2 -1
- package/dist/history-v2.js +54 -26
- package/dist/history-v2.js.map +1 -1
- package/dist/ilp-writer.d.ts +1 -1
- package/dist/ilp-writer.js +4 -2
- package/dist/ilp-writer.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +239 -10
- package/dist/index.js.map +1 -1
- package/dist/query-client.js +27 -0
- package/dist/query-client.js.map +1 -1
- package/dist/retention.d.ts +28 -1
- package/dist/retention.js +152 -12
- package/dist/retention.js.map +1 -1
- package/package.json +2 -1
- package/public/assets/PluginConfigurationPanel-DR-y5e3d.js +11 -0
- package/public/assets/{_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-D-Le-Wxu.js → _virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BUtmcsA-.js} +1 -1
- package/public/assets/{dist-BI-Ygd_Z.js → dist-C5M3fhBw.js} +1 -1
- package/public/assets/helpers-oIxDNnZJ.js +1 -0
- package/public/assets/{hostInit-CdqUOHAJ.js → hostInit-B3lIJd9C.js} +1 -1
- package/public/assets/{index-mvK71Kw7.js → index-eAjx9ZuX.js} +2 -2
- package/public/assets/{pendingShares-BI6kviiM.js → pendingShares-PvyVL1Z8.js} +2 -2
- package/public/assets/utils-v9GZlbdk.js +4 -0
- package/public/remoteEntry.js +2 -2
- package/public/assets/PluginConfigurationPanel-JR1rvS7f.js +0 -9
- package/public/assets/helpers-CsBAxMau.js +0 -1
- package/public/assets/utils-BRGuweMc.js +0 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var e={AT:`@`,HYPHEN:`-`,SLASH:`/`},t={[e.AT]:`scope_`,[e.HYPHEN]:`_`,[e.SLASH]:`__`};t[e.AT],e.AT,t[e.HYPHEN],e.HYPHEN,t[e.SLASH],e.SLASH;var n=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function r(){return!0}function i(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function a(){try{if(r()&&window.localStorage)return!!localStorage.getItem(`FEDERATION_DEBUG`)}catch{return!1}return!1}function o(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:a()}var s=`[ Federation Runtime ]`,c=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function l(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!r()&&!i()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``)}var u=e=>{console.warn(`${s}: ${e}`)};function d(e){try{return JSON.stringify(e,null,2)}catch{return``}}var f=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function p(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function m(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?p(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:m={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:ee},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:te}=e,ne={version:i||``,buildVersion:ee,globalName:h,remoteEntry:f(l,u),remoteEntryType:d,remoteTypes:f(m.path,m.name),remoteTypesZip:m.zip||``,remoteTypesAPI:m.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:te?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={...ne,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={...ne,getPublicPath:o()},g){let e=f(g.path,g.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=g.type||`commonjs-module`}return a}function ee(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var h=`[ Module Federation ]`,g=console,te=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function ne(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
2
|
+
`),n=t.filter(e=>!te.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
3
|
+
`)}`:void 0}catch{return}}var re=class{constructor(e,t=g){this.prefix=e,this.delegate=t??g}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??g}emit(e,t){let n=this.delegate,r=o()?ne():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=g[e];if(typeof t==`function`){t.call(g,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){o()&&this.emit(`debug`,e)}};function ie(e){return new re(e)}function ae(e){let t=new re(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ie(h),ae(h);async function oe(e,t){try{return await e()}catch(e){!t&&u(e);return}}function se(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function ce(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&se(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&se(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,oe(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function le(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&se(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,oe(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function ue(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=ce({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var de=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,fe=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(de(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
4
|
+
`)};function pe(e,t,n,r,i,a){return r(fe(e,t,n,i))}var _=`[ Federation Runtime ]`,me=ie(_);function v(e,t,n,r,i){e||(n===void 0?y(t):y(t,n,r,void 0,i))}function y(e,t,n,r,i){if(t!==void 0)return pe(e,t,n??{},e=>{throw Error(`${_}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(_)||(a.message=`${_}: ${a.message}`),a):Error(`${_}: ${a}`)}function b(e){e instanceof Error&&(e.message.startsWith(_)||(e.message=`${_}: ${e.message}`)),me.warn(e)}function he(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function x(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ge(e){return e.entry!==void 0}function _e(e){return!e.entry.includes(`.json`)}function ve(e){return e&&typeof e==`object`}var ye=Object.prototype.toString;function be(e){return ye.call(e)===`[object Object]`}function xe(e){return Array.isArray(e)?e:[e]}function Se(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Ce=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},we=2e3,S=typeof globalThis==`object`?globalThis:window,C=(()=>{try{return document.defaultView}catch{return S}})(),w=C;function T(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function E(e,t){return Object.hasOwnProperty.call(e,t)}E(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var D=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function Te(e){E(e,`__VMOK__`)&&!E(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),E(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),T(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}Te(S),Te(C);function Ee(){S.__FEDERATION__.__GLOBAL_PLUGIN__=[],S.__FEDERATION__.__INSTANCES__=[],S.__FEDERATION__.moduleInfo={},S.__FEDERATION__.__SHARE__={},S.__FEDERATION__.__MANIFEST_LOADING__={},S.__FEDERATION__.__PRELOADED_ASSETS__.clear(),Object.keys(D).forEach(e=>{delete D[e]})}function De(e){S.__FEDERATION__.__INSTANCES__.push(e)}function Oe(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function ke(e,t=o()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.2`)}function O(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}y(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Ae=()=>C.__FEDERATION__.moduleInfo,je=(e,t)=>{let n=O(t,x(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=x(n),i=O(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},k=e=>je(e,C.__FEDERATION__.moduleInfo),Me=(e,t)=>{let n=x(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Ne=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Pe=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Fe=e=>{let{__GLOBAL_PLUGIN__:t}=C.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):b(`The plugin ${e.name} has been registered.`)})},Ie=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Le=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),ze=e=>S.__FEDERATION__.__PRELOADED_ASSETS__.has(e),Be=e=>{let t=S.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>we){let e=t.values().next().value;e!==void 0&&t.delete(e)}},Ve=`[0-9A-Za-z-]+`,He=`(?:\\+(${Ve}(?:\\.${Ve})*))`,A=`0|[1-9]\\d*`,j=`[0-9]+`,Ue=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,We=`(?:${j}|${Ue})`,Ge=`(?:-?(${We}(?:\\.${We})*))`,Ke=`(?:${A}|${Ue})`,qe=`(?:-(${Ke}(?:\\.${Ke})*))`,Je=`${A}|x|X|\\*`,M=`[v=\\s]*(${Je})(?:\\.(${Je})(?:\\.(${Je})(?:${qe})?${He}?)?)?`,Ye=`^\\s*(${M})\\s+-\\s+(${M})\\s*$`,Xe=`[v=\\s]*${`(${j})\\.(${j})\\.(${j})`}${Ge}?${He}?`,Ze=`((?:<|>)?=?)`,Qe=`(\\s*)${Ze}\\s*(${Xe}|${M})`,$e=`(?:~>?)`,et=`(\\s*)${$e}\\s+`,tt=`(?:\\^)`,nt=`(\\s*)${tt}\\s+`,rt=`(<|>)?=?\\s*\\*`,it=`^${tt}${M}$`,at=`v?${`(${A})\\.(${A})\\.(${A})`}${qe}?${He}?`,ot=`^${$e}${M}$`,st=`^${Ze}\\s*${M}$`,ct=`^${Ze}\\s*(${at})$|^$`,lt=`^\\s*>=\\s*0.0.0\\s*$`;function N(e){return new RegExp(e)}function P(e){return!e||e.toLowerCase()===`x`||e===`*`}function ut(...e){return t=>e.reduce((e,t)=>t(e),t)}function dt(e){return e.match(N(ct))}function ft(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function pt(e){return e.replace(N(Ye),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=P(n)?``:P(r)?`>=${n}.0.0`:P(i)?`>=${n}.${r}.0`:`>=${t}`,s=P(c)?``:P(l)?`<${Number(c)+1}.0.0-0`:P(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function mt(e){return e.replace(N(Qe),`$1$2$3`)}function ht(e){return e.replace(N(et),`$1~`)}function gt(e){return e.replace(N(nt),`$1^`)}function _t(e){return e.trim().split(/\s+/).map(e=>e.replace(N(it),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function vt(e){return e.trim().split(/\s+/).map(e=>e.replace(N(ot),(e,t,n,r,i)=>P(t)?``:P(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:P(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function yt(e){return e.split(/\s+/).map(e=>e.trim().replace(N(st),(e,t,n,r,i,a)=>{let o=P(n),s=o||P(r),c=s||P(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function bt(e){return e.trim().replace(N(rt),``)}function xt(e){return e.trim().replace(N(lt),``)}function F(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function St(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?F(t,i):-1:1}return 0}function I(e,t){return F(e.major,t.major)||F(e.minor,t.minor)||F(e.patch,t.patch)||St(e,t)}function Ct(e,t){return e.version===t.version}function wt(e,t){switch(e.operator){case``:case`=`:return Ct(e,t);case`>`:return I(e,t)<0;case`>=`:return Ct(e,t)||I(e,t)<0;case`<`:return I(e,t)>0;case`<=`:return Ct(e,t)||I(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return ut(_t,vt,yt,bt)(e)}function Et(e){return ut(pt,mt,ht,gt)(e.trim()).split(/\s+/).join(` `)}function L(e,t){if(!e)return!1;let n=dt(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ft(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=Et(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>Tt(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>xt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=dt(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:ft(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var Dt=`default`,Ot=`global`;function kt(e,t,r,i){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{y(`Cannot get shared "${r}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&y(`Invalid shared config for "${r}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:a,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??i)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??n.UNKNOWN,useIn:[]}:void 0}}function At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=xe(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(kt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function R(e,t){if(!e)return!1;let{status:r,mode:i}=e;return r===n.NO_USE?!1:r===n.CALCULATED?!0:i===`runtime-infer`?!t||Nt(e,t):!1}function z(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!L(n(e),`<=${n(t)}`)}var B=(e,t)=>{let n=t||function(e,t){return z(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},jt=e=>!!e.loaded||typeof e.lib==`function`,Mt=e=>!!e.loading,Nt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Pt(e,t,n,r){let i=e[t][n],a=``,o=R(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&z(e,t):!1:!0:!jt(i[e])&&z(e,t)};if(o){if(a=B(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:B(e[t][n],s),useTreesShaking:o}}var V=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=R(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(V(i[t].treeShaking))return!V(i[e].treeShaking)||!!z(e,t);if(V(i[e].treeShaking))return!1}return V(i[t])?!V(i[e])||!!z(e,t):!V(i[e])&&z(e,t)};if(o){if(a=B(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:B(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function H(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=Dt,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=It(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!L(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?y(e):b(e)}return{shared:r,useTreesShaking:d}}{if(l===!1||l===`*`||L(u,l))return{shared:r,useTreesShaking:d};let n=R(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(R(i.treeShaking,c?.usedExports)&&L(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(L(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function Lt(){return w.__FEDERATION__.__SHARE__}function Rt(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[B(t,function(e,n){return!jt(t[e])&&z(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var U=(e,t)=>{e.useIn||=[],he(e.useIn,t)};function zt(e,t){return t&&e.treeShaking?e.treeShaking:e}function Bt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Vt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Ht(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ut=`RUNTIME-001`,Wt=`RUNTIME-002`,Gt=`RUNTIME-003`,Kt=`RUNTIME-004`,qt=`RUNTIME-005`,Jt=`RUNTIME-006`,Yt=`RUNTIME-007`,Xt=`RUNTIME-008`,Zt=`RUNTIME-009`,Qt=`RUNTIME-010`,$t=`RUNTIME-011`,en=`RUNTIME-012`,tn=`RUNTIME-013`,nn=`RUNTIME-014`,rn=`RUNTIME-015`,an=`TYPE-001`,on=`BUILD-001`,sn=`BUILD-002`,W={[Ut]:`Failed to get remoteEntry exports.`,[Wt]:`The remote entry interface does not contain "init"`,[Gt]:`Failed to get manifest.`,[Kt]:`Failed to locate remote.`,[qt]:`Invalid loadShareSync function call from bundler runtime`,[Jt]:`Invalid loadShareSync function call from runtime`,[Yt]:`Failed to get remote snapshot.`,[Xt]:`Failed to load script resources.`,[Zt]:`Please call createInstance first.`,[Qt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[$t]:`The remoteEntry URL is missing from the remote snapshot.`,[en]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[tn]:`The manifest is not a valid Module Federation manifest.`,[nn]:`The remote does not expose the requested module.`,[rn]:`Remote container initialization failed.`},cn={[an]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},ln={[on]:`Failed to find expose module.`,[sn]:`PublicPath is required in prod mode.`};({...W,...cn,...ln});var un=`.then(callbacks[0]).catch(callbacks[1])`,dn=new WeakMap,fn=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function pn(e){return e instanceof TypeError&&fn.some(t=>e.message.includes(t))}function mn(e){return e===`esm`||e===`module`}async function hn({entry:e,remoteEntryExports:t,name:n,getEntryUrl:r}){return new Promise((i,a)=>{let o=e=>{if(pn(e)){let t=e instanceof Error?e.message:String(e);try{y(Xt,W,{remoteName:n,resourceUrl:s},t)}catch(e){a(e);return}}a(e)},s=r?r(e):e;try{t?i(t):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${s}")${un}`)([i,o]):import(s).then(i).catch(o)}catch(e){y(`Failed to load ESM entry from "${s}". ${e instanceof Error?e.message:String(e)}`)}})}async function gn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${un}`)([n,r])}catch(t){y(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function _n(e,t,n){let{remoteEntryKey:r,entryExports:i}=Pe(e,t);return i||y(Ut,W,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function vn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Pe(e,t);if(s)return s;let c=a?a(n):n;return ue(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>_n(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);y(Xt,W,{remoteName:e,resourceUrl:c},n)})}async function yn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return mn(c)?hn({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?gn({entry:a,remoteEntryExports:t}):vn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function bn(e){let{entry:t,name:n}=e;return c(n,t)}async function xn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=bn(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!D[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook,l=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||yn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>xn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:D,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e});D[s]=l,l.then(void 0,()=>{D[s]===l&&delete D[s]}),dn.set(l,t)}let c=D[s];if(dn.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function G(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function Sn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Cn(e){let t=new Map;return[...e||[],...Ie()].forEach(e=>{e&&(v(be(e),`Plugin configuration is invalid.`),v(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function wn(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function Tn(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return Cn(e).forEach(e=>{if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let i=wn(e,e.apply?.(t));r.forEach(e=>{e.applyPlugin(i)})}),Array.from(n.values())}function En(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function K(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(En)??[],shared:t}}}function Dn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function On(e,t){return t.map(t=>{let n=Ht(e,t.nameOrAlias);return v(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&d({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:Dn(t)}})}function kn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function An(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function q(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function jn(e,t,n,r){return n?ze(t)?Promise.resolve(q(e,t,`cached`)):(Be(t),r()):r()}async function Mn(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return q(r,a,`cached`);try{if(!await xn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return q(r,a,`success`)}catch(e){return q(r,a,An(e)?`timeout`:`error`,e)}}function Nn({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=le({url:n,cb:()=>{o(q(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(q(i,n,An(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Pn({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=ce({url:n,cb:()=>{a(q(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(q(i,n,An(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function Fn(e,t){return{...e,resourceType:t}}function In(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(Mn(t,e,r,Fn(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=Fn(i,`css`);l.push(jn(o,r,a,()=>Nn({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=Fn(i,`css`);l.push(jn(o,r,a,()=>Nn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=Pn,u={fetchpriority:`high`,type:`text/javascript`};r?(n=Nn,u={rel:`preload`,as:`script`}):mn(e.type)&&(n=Nn,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=Fn(i,`js`);l.push(jn(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}var Ln={global:{Global:w,nativeGlobal:C,resetFederationGlobalInfo:Ee,setGlobalFederationInstance:De,getGlobalFederationConstructor:Oe,setGlobalFederationConstructor:ke,getInfoWithoutType:O,getGlobalSnapshot:Ae,getTargetSnapshotInfoByModuleInfo:je,getGlobalSnapshotInfoByModuleInfo:k,setGlobalSnapshotInfoByModuleInfo:Me,addGlobalSnapshot:Ne,getRemoteEntryExports:Pe,registerGlobalPlugins:Fe,getGlobalHostPlugins:Ie,getPreloaded:Le,setPreloaded:Re},share:{getRegisteredShare:H,getGlobalShareScope:Lt},utils:{matchRemoteWithNameAndExpose:Vt,preloadAssets:In,getRemoteInfo:G}};function Rn(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function zn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Bn=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:Bt(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await xn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return v(r,`remoteEntryExports is undefined \n ${d(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=zn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});a?.init===void 0&&y(Wt,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,K(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){y(rn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,K(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||y(nn,W,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Rn(r)},void 0,K(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=Ce(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){v(be(e),`Plugin configuration is invalid.`);let t=e.name;v(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){v(e,`A name is required.`);let t=this.registerPlugins[e];v(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},Y=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},X=class extends Y{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Vn(e,t){if(!ve(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Z=class extends Y{constructor(e){super(),this.onerror=y,this.type=e}emit(e){ve(e)||y(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Vn(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){b(e),this.onerror(e)}return e}},Q=class extends Y{constructor(e){super(),this.onerror=y,this.type=e}emit(e){ve(e)||y(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(b(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Vn(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},$=`Remote loading is disabled by experiments.optimization.disableRemote.`,Hn=class{constructor(){this.hooks=new J({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error($)}preloadRemote(){throw Error($)}registerRemotes(){throw Error($)}getRemoteModuleAndOptions(){throw Error($)}initRawContainer(){throw Error($)}};function Un(e,t){let n=Se(t);n.url||y($t,W,{remoteName:e.name});let r=l(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Wn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ge(t)||!_e(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Bt(t.name,r)});Un(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&In(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function Gn(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Kn(e,t,n,r,i={},a){let{value:o}=O(e,x(t)),s=a||o;if(s&&!ee(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=Gn(r),a=s.remotesInfo[r];Kn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var qn=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Jn(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,u=new Set,{options:d}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Kn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=Dn(e)}else if(p===!0)i=f;else return;let c=l(t,Se(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let u=`modules`in t?t.modules:[],d=kn(i.exposes);d.length&&`modules`in t&&(u=t?.modules?.reduce((e,t)=>(d?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>l(t,e));return i.filter?n.filter(i.filter):n}if(u){let r=u.length;for(let s=0;s<r;s++){let r=u[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!Le(c)&&(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Re(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=H(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{u.add(e)}))};i.shared.forEach(e=>{let n=d.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&xe(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!qn(`script`,e));return{cssAssets:a.filter(e=>!u.has(e)&&!qn(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!qn(`script`,e.url))}}var Yn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return ge(i)&&_e(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Un(r,o),Jn(t,n,r,a,o))}}};function Xn(e,t){let n=k({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&O(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Ae(),remoteSnapshot:k({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ae(),remoteSnapshot:k({name:e.name,version:`version`in e?e.version:void 0})}}var Zn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new X(`beforeLoadRemoteSnapshot`),loadSnapshot:new Q(`loadGlobalSnapshot`),loadRemoteSnapshot:new Q(`loadRemoteSnapshot`),afterLoadSnapshot:new Q(`afterLoadSnapshot`),beforeLoadManifest:new X(`beforeLoadManifest`),afterLoadManifest:new X(`afterLoadManifest`)}),this.manifestLoading=w.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=k({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Ne({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!O(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(ee(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Me({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(ge(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Me(e,r);u=r,d=i}else y(Yt,W,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,K(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Xn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=G(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);t&&t instanceof Response||(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),y(Gt,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,K(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&y(tn,W,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,K(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=m(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},Qn=class{constructor(){this.hooks=new J({})}},$n=class{constructor(e){this.hooks=new J({beforeRegisterShare:new Z(`beforeRegisterShare`),afterRegisterShare:new Y(`afterRegisterShare`),afterResolve:new Q(`afterResolve`),beforeLoadShare:new Q(`beforeLoadShare`),loadShare:new X,afterLoadShare:new Y(`afterLoadShare`),errorLoadShare:new Y(`errorLoadShare`),resolveShare:new Z(`resolveShare`),initContainerShareScopeMap:new Z(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){b(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){b(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=At(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let i=this.shareScopeMap[r]?.[e],a=i?.[n.version];i||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:a,registeredShared:this.shareScopeMap[r]?.[e]?.[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t?.context,i=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i?.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,v(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=H(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=zt(c,l);if(t.lib)return U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,U(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}{let i=(async()=>{let e=await t.get();return U(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=R(s.treeShaking),a=zt(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,U(a,n.options.name);let{shared:i,useTreesShaking:o}=H(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=zt(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.context?.trigger||r||`runtime`,o=t?.initScope,s=[];if(r!==`build`){let{initTokens:t}=this;o||=[];let n=t[e];if(n||=t[e]={from:this.host.name},o.indexOf(n)>=0)return s;o.push(n)}let c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});let u=c[e],d=(t,n)=>{let{version:r,eager:i}=n;u[t]=u[t]||{};let o=u[t],s=o[r],c=s&&zt(s),d=!!(c&&(`eager`in c&&c.eager||`shareConfig`in c&&c.shareConfig?.eager));(!c||c.strategy!==`loaded-first`&&!c.loaded&&(!i==!d?l>o[r].from:i))&&(o[r]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:s,registeredShared:o[r],trigger:a})},f=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{r=await t.getEntry(void 0,i)}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,o,void 0,i))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&d(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&s.push(f(t.name))}),s}loadShareSync(e,t){let{host:n}=this,r=t?.context,i=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i?.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t?.from,context:r})});let{shared:a}=H(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return U(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return U(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&y(t?.from===`build`?qt:Jt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}y(Jt,W,{hostName:n.options.name,sharedPkgName:e},void 0,K(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Lt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},er=class{constructor(){this.shareScopeMap={},this.hooks=new J({afterResolve:new Q(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},tr=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new Z(`beforeRegisterRemote`),registerRemote:new Z(`registerRemote`),beforeRequest:new Q(`beforeRequest`),afterMatchRemote:new X(`afterMatchRemote`),onLoad:new X(`onLoad`),afterLoadRemote:new X(`afterLoadRemote`),handlePreloadModule:new Y(`handlePreloadModule`),errorLoadRemote:new X(`errorLoadRemote`),beforePreloadRemote:new X(`beforePreloadRemote`),generatePreloadAssets:new X(`generatePreloadAssets`),afterPreloadRemote:new X(`afterPreloadRemote`),loadEntry:new X}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r}}else if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Vt(n.options.remotes,e),i=e,a=r?.expose,o=r?G(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=G(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=On(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Bt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=G(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await In(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Bn({host:r,remoteInfo:G({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Vt(t.options.remotes,i);if(!a)try{y(Kt,W,{hostName:t.options.name,requestId:i},void 0,K(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=G(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;v(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Bn(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));v(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=Dt,e.type||=Ot};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),u(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=O(S.__FEDERATION__.moduleInfo,x(e)).key;delete S.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete w.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Xn(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&O(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let i=bn(o.remoteInfo);D[i]&&delete D[i];let a=n.buildVersion?c(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=Lt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){me.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},nr=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,rr=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,ir=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,ar=class{constructor(e){this.hooks=new J({beforeInit:new Z(`beforeInit`),init:new Y,beforeInitContainer:new Q(`beforeInitContainer`),initContainer:new Q(`initContainer`)}),this.version=`2.9.2`,this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new Y,createScript:new Y,createLink:new Y,fetch:new X,loadEntryError:new X,afterLoadEntry:new X(`afterLoadEntry`),beforeInitRemote:new X(`beforeInitRemote`),afterInitRemote:new X(`afterInitRemote`),beforeGetExpose:new X(`beforeGetExpose`),afterGetExpose:new X(`afterGetExpose`),beforeExecuteFactory:new X(`beforeExecuteFactory`),afterExecuteFactory:new X(`afterExecuteFactory`),getModuleFactory:new X}),this.bridgeHook=new J({beforeBridgeRender:new Y,afterBridgeRender:new Y,beforeBridgeDestroy:new Y,afterBridgeDestroy:new Y,afterBridgeRouteSync:new Y});let t=rr&&nr?[Wn(),Yn()]:[],n={id:Sn(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=rr?new Zn(this):new Qn,this.sharedHandler=ir?new $n(this):new er,this.remoteHandler=rr?new tr(this):new Hn,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&y(fe(Qt,W)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=ir?At(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=Tn(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},or=Ln;function sr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function cr(e,t){let n=sr();return S.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}export{ke as a,Oe as i,or as n,De as o,ar as r,cr as t};
|
package/public/remoteEntry.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t as e}from"./assets/vite-preload-helper-CRzLMJPS.js";import{t}from"./assets/dist-BI-Ygd_Z.js";import{t as n}from"./assets/helpers-CsBAxMau.js";var r={},i=new Set,a=new Map;function o(e,t){let n=a.get(e);return n||(n=Promise.resolve().then(t).catch(t=>{throw a.delete(e),t}),a.set(e,n)),n}async function s(e){if(typeof document>`u`)return;let t=r[e]||[];await Promise.all(t.map(e=>{let t=new URL(e,import.meta.url).href;return i.has(t)||(i.add(t),document.querySelector(`link[rel="stylesheet"][href="${t}"]`))?Promise.resolve():new Promise((e,n)=>{let r=document.createElement(`link`);r.rel=`stylesheet`,r.href=t,r.onload=()=>e(),r.onerror=()=>n(Error(`[Module Federation] Failed to load CSS asset: ${t}`)),document.head.appendChild(r)})}))}var c={"./PluginConfigurationPanel":async()=>{await s(`./PluginConfigurationPanel`),await Promise.all([]);let t=await o(`./PluginConfigurationPanel`,()=>e(()=>import(`./assets/PluginConfigurationPanel-JR1rvS7f.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r},"./AppPanel":async()=>{await s(`./AppPanel`),await Promise.all([]);let t=await o(`./AppPanel`,()=>e(()=>import(`./assets/AppPanel-Fvhb8xTK.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r}};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__196689844091135__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var d=u.initResolve,{initReject:f}=u,p=e=>{throw f(e),e},m=`__mf_module_cache__`;globalThis[m]||={share:{},remote:{}},globalThis[m].share||={},globalThis[m].remote||={};var h=globalThis[m];for(let e of Object.keys(h.share))if(e.startsWith(`default:`)){let t=e.slice(8);h.share[t]===void 0&&(h.share[t]=h.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;h.share[t]===void 0&&(h.share[t]=h.share[e])}var g={},_=Array.isArray(`default`)?`default`:[`default`],v=`default`,y=`signalk_questdb`,b=[[`react`]],x,S;async function C(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var w=Symbol(`mf.originalSharedProvider`),T={emit:e=>e},E=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],D=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[w]:r});return n},O=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},k=(e,t,r,i)=>{if(!e||!r)return;let a=Object.fromEntries(Object.entries(e).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=E(r),s=D(a,i),c={};for(let e of o)c[e||`default`]={[t]:s};let l=n.getRegisteredShare(c,t,{...r,scope:o,strategy:i},T)?.shared;return l?.[w]||l},A=(e,t,n,r)=>{let i=e=>j(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)&&e?.shareConfig?.import!==!1));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=k(a,t,n,r);return i(o)?void 0:o},j=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),M=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(j(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?M(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||j(u,s)))return{provider:u,scopeRootProvider:l}};async function N(){return x||=C(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-D-Le-Wxu.js`),[],import.meta.url)).catch(e=>{throw x=void 0,e}),x}async function P(){return c}async function F(e={},n=[],r={}){let i=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},a=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},o=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),c=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},l=(e,t)=>e[s]?.[t.canonical],f=e=>{let t=[e,e?.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},m=(e,t)=>{if(e===t)return!0;let n=f(e),r=f(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},x=(e,t,n,r)=>{let i=a(e,t);if(i!==void 0&&m(i,n))return n;e[t.canonical]=n;let l=t.aliases||[];for(let t of l)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let u=e[s];r===void 0?u&&delete u[t.canonical]:c(e)[t.canonical]=r;let d=e[o]?.[t.canonical];if(d)for(let e of d)e(n);return n},w=Symbol.for(`module-federation.tree-shaking-shared-cache`),T=e=>{let t=e[w];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,w,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},E=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=T(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},D=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),M=e=>{let t=e[D];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,D,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},P=(e,t,n)=>{let r=a(e,t);return r===void 0?e[D]?.[t.canonical]?.[n]:r},F=(e,t,n,r)=>{let i=M(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},I=globalThis.__FEDERATION__?.__INSTANCES__||[],te=n.find(e=>e?.from)?.from,ne=I.find(t=>t?.options?.name===te&&t?.shareScopeMap?.default===e)||I.find(t=>t?.options?.name!==y&&t?.shareScopeMap?.default===e),re=Object.create(null),ie=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},ae=(e,t)=>{for(let[n,r]of Object.entries(G.shareScopeMap?.[e]||{}))for(let[e,i]of Object.entries(r||{})){if(!i||i.get===R[n]?.get)continue;let r=t[n]||={};r[e]===void 0&&(r[e]=i)}},oe=(e,t)=>{ae(e,t);let n=!ne&&Object.values(t||{}).some(e=>Object.values(e||{}).some(z)),r=n?ie(t):t;return re[e]={host:t,runtime:r,isWebpackScope:n},r},se=()=>{let e=Object.values(re).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},L=Object.create(null);for(let[t,n]of Object.entries(e)){let e=L[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:R,usedRemotes:ce}=await N();function z(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let le=Object.values(L).some(e=>Object.values(e||{}).some(z)),ue=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},B=(t,n,r,i)=>{if(typeof A!=`function`)return;let a=ue(t),o=!i||a===t?[[t,n]]:[[t,n],[a,R[a]]];for(let[n,i]of o){if(!i)continue;let a=A(r?n===t?r:L[n]:L[n]??e[n],n,i,`version-first`);if(a)return a}},de=(e,t,n)=>{let r=B(e,t,n,!0);return r&&z(r)&&!r.lib&&!r.loaded?r:void 0};var V=g[v];if(V||=g[v]={from:y},n.indexOf(V)>=0)return;n.push(V);let fe=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},pe=[],me=globalThis.window===void 0?await Promise.all([]):[],H=`__mf_vite_runtime_share_load_id__`,he=0,U=new Map,W=new Map,G=t({name:y,remotes:ce,shared:R,plugins:[ge(),_e(),...pe,...me],shareStrategy:`version-first`});G.initShareScopeMap(`default`,oe(`default`,e));function ge(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[H],n=t===void 0?void 0:W.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function _e(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ve=G.sharedHandler.hooks.lifecycle.resolveShare;G.__mfKeepAdoptedProviders||(G.__mfKeepAdoptedProviders=!0,G.sharedHandler?.hooks?.lifecycle?.afterRegisterShare?.on?.(e=>{let{shared:t,previousShared:n,registeredShared:r}=e||{},i=G.shareScopeMap?.[e.scope]?.[e.pkgName];t&&i&&(t.shareConfig?.import===!1?r===t&&n&&n.shareConfig?.import!==!1&&i[t.version]===t&&(i[t.version]=n):r!==t&&r?.shareConfig?.import===!1&&!r.loaded&&i[t.version]===r&&(i[t.version]=t))}));let K=new WeakMap;ve.on(e=>{let t=e.shareInfo?.[H],n=e.resolver;return typeof n==`function`&&(e.resolver=(...r)=>{let i=n(...r);if(i?.shared?.shareConfig?.import===!1&&typeof k==`function`&&R[e.pkgName]){let t=k(e.shareScopeMap?.[e.scope]?.[e.pkgName],e.pkgName,R[e.pkgName],`version-first`);t&&t.shareConfig?.import!==!1&&(i={shared:t,useTreesShaking:i.useTreesShaking})}let a=i?.shared;return a&&(typeof a==`object`||typeof a==`function`)&&!K.has(a)&&K.set(a,{from:a.from}),t!==void 0&&a&&U.set(t,a),i}),e});let ye=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},be=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),xe=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},Se=async(e,t,n)=>{let r=++he;W.set(r,{pinned:n});try{let n=await G.loadShare(e,{customShareInfo:{shareConfig:t,[H]:r}});return{factory:n===!1?void 0:n,selectedProvider:U.get(r)}}finally{U.delete(r),W.delete(r)}},Ce=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=ye(n,r,i,a);if(!c)return;let l;try{l=await Se(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=be(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=K.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??xe(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=K.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},q=new Set,J=new Map,we=async(t,n,r)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=A(r,t,n,`version-first`),c=O(r,s);if(!c||n.shareConfig?.import===!1&&j(s,n)||s?.shareConfig?.import===!1)return;let{version:l}=c;if(!o&&l!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let u=i(t,o,n.version,n.scope);if(a(h.share,u)!==void 0)return;let d=e[t],f=d?.[l];if(c.registered&&!j(f,s))return;let p,m=s.lib;if(!m&&z(s)||(!m&&s.loading&&(m=await s.loading),!m&&s.loaded&&typeof s.get==`function`&&(m=await s.get()),!m))return;let g=typeof m==`function`?m():m,_=await Promise.resolve(g),v=c.registered?f:s;p={provider:v,selection:{provider:v,version:l,from:s.from,registered:c.registered},resolved:_};let y=p?.provider,b=p?.selection;if(!b)return;let S=p?.resolved;if(S===void 0||a(h.share,u)!==void 0||b.registered&&d?.[b.version]!==y)return;x(h.share,u,fe(S),b.from),q.add(y)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},Y=async(t,n,r,o,s)=>{try{let c=i(t,n.shareConfig?.singleton,n.version,n.scope),u=a(h.share,c),d=l(h.share,c),f=A(r,t,n,`version-first`),p=f||k(r,t,n,`version-first`)||n,m=O(r,p);if(!m)return;let g=j(p,n),{version:_}=m;if(!n.shareConfig?.singleton&&_!==n.version)return;let v=o?.[_],b=ee(I,ne,e,`default`,t,m,f,v,`version-first`);if(!b&&!g)return;let{provider:S,scopeRootProvider:C}=b||{provider:p,scopeRootProvider:void 0};if(n.canLiveRebind===!1||n.shareConfig?.import===!1&&j(S,n)||S?.shareConfig?.import===!1||u!==void 0&&d!==y)return;let w=e[t],T=w?.[_];if(m.registered&&!C&&!j(T,S))return;let E=await Ce(t,n.shareConfig,w,_,T,S,m.registered&&!g),D=E?.provider,M=E?.selection;if(!M||j(D,n)||s&&(s.version!==M.version||!j({from:M.from},s.provider))||q.has(D))return;let N=E?.resolved;if(N===void 0)return;let P=a(h.share,c),F=l(h.share,c);if(P!==void 0&&F!==y||M.registered&&w?.[M.version]!==D)return;s||J.set(t,{version:M.version,provider:{from:M.from}}),q.add(D);let te=fe(N);x(h.share,c,te,M.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of b)await Promise.all(e.map(async e=>{let t=R[e];t&&t.materialize!==!1&&!t.treeShaking&&await we(e,t,L[e])}));for(let[e,t]of Object.entries(R)){if(t.treeShaking)continue;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(a(h.share,n)!==void 0)continue;let r=i(e,!0,t.version,t.scope),o=a(h.share,r);o!==void 0&&x(h.share,n,o,l(h.share,r))}let Te=[`react`],Ee=[[`react`]],X=new Map(Te.map((e,t)=>[e,t])),De={},Z=Te.filter(e=>R[e]&&(R[e].materialize!==!1||R[e].shareConfig?.import===!1&&!R[e].lazy));h.providerInit||=new Map;let Oe=(e,t)=>{let n=h.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return h.providerInit.set(e,r),r.catch(()=>h.providerInit.delete(e)),r};var ke=async e=>{let t=new Set(e);for(let e of Ee)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||a(h.share,n)!==void 0)return;let r=i(e,!0,t.version,t.scope),o=a(h.share,r);if(o!==void 0){x(h.share,n,o,l(h.share,r));return}let s=typeof B==`function`?B(e,t):void 0;if(s){let r=s.lib;if(!r&&s.loading&&(r=await s.loading),!r&&s.loaded&&typeof s.get==`function`&&(r=await s.get()),r){let e=typeof r==`function`?r():r,t=await Promise.resolve(e);x(h.share,n,(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(t),s.from);return}if(typeof z==`function`&&z(s)&&(t.shareConfig?.singleton||O(L[e],s)?.version===t.version))return}let c=n.canonical,u=await Oe(c,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)});for(let n of G.options.shared?.[e]||[])n.get===t.get&&(n.eager=!0);let d=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(u),f=d===u?{...u}:d;f.__esModule!==!0&&Object.defineProperty(f,"__esModule",{value:!0,enumerable:!1}),x(h.share,n,f,y)}))};let Q=e=>{let t=R[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?P(h.share,n,y)===void 0&&a(h.share,n)===void 0:a(h.share,n)===void 0},Ae=e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?P(h.share,n,y)??a(h.share,n):a(h.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof A==`function`&&!!A(L[e],e,t,`version-first`):!1},je=e=>{let t=!0;for(;t;){t=!1;for(let n of Z){let r=X.get(n);e.has(r)||(De[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Me=je(new Set(Z.filter(Ae).map(e=>X.get(e)))),Ne=Z.filter(e=>!Me.has(X.get(e)));var Pe=Z.filter(e=>Me.has(X.get(e)));await ke(Ne).catch(p);try{await C(async()=>{await Promise.all(await G.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}se();let Fe=async()=>{for(let t of b)await Promise.all(t.map(async t=>{let n=R[t];n&&n.materialize!==!1&&!n.treeShaking&&await Y(t,n,e[t],L[t],void 0)}))};le?S=Fe:await Fe();try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of _){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=R?.[e],i=L[e],a=J.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!j(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of b)await Promise.all(e.map(async e=>{let n=t[e];n&&await Y(e,R[e],n,L[e],J.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Ie=async()=>{},Le=async(t,n)=>{let r=i(t,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?P(h.share,r,y):a(h.share,r);if(n.shareConfig?.import!==!1||o!==void 0||de(t,n,L[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},c=e?.[t],l=k(c,t,n,`version-first`)||n,u=O(c,l);if(!u)return;let d=e=>e===n||e?.shareConfig?.import===!1;if(d(l))return;let{version:f}=u,p=c?.[f],m=await Ce(t,n.shareConfig,c,f,p,l,u.registered),g=m?.selection,_=m?.provider,v=m?.resolved;if(!g||d(_)||v===void 0||(n.treeShaking?P(h.share,r,y):a(h.share,r))!==void 0||g.registered&&c?.[g.version]!==_)return;let b=s(v);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];E(h.share,r,e,b),F(h.share,r,y,b)}else x(h.share,r,b,g.from)},Re=[],ze=new Set;for(let e of Pe){let t=R[e],n=X.get(e);if(Q(e))try{t.treeShaking?await Ie(e,t):t.shareConfig?.import===!1&&await Le(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}Q(e)&&ze.add(n)}je(ze),Re.push(...Pe.filter(e=>!ze.has(X.get(e)))),await ke(Re).catch(p);let $=new Map;return u.loadLazyShares=async t=>{let n=new Set(t);for(let t of b)await Promise.all(t.filter(e=>n.has(e)).map(t=>{let n=R[t];if(!n||!n.lazy||!Q(t))return;let r=$.get(t);return r||(r=Y(t,n,e[t],L[t],void 0).then(()=>Q(t)?Le(t,n):void 0),r.catch(()=>$.delete(t)),$.set(t,r)),r}))},d(G),G}async function I(e){let t=await P();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return S&&await S(),h.pendingShareLoads&&await Promise.all(h.pendingShareLoads),t[e]().then(e=>()=>e)}export{I as get,F as init};
|
|
1
|
+
import{t as e}from"./assets/vite-preload-helper-CRzLMJPS.js";import{t}from"./assets/dist-C5M3fhBw.js";import{t as n}from"./assets/helpers-oIxDNnZJ.js";var r={},i=new Set,a=new Map;function o(e,t){let n=a.get(e);return n||(n=Promise.resolve().then(t).catch(t=>{throw a.delete(e),t}),a.set(e,n)),n}async function s(e){if(typeof document>`u`)return;let t=r[e]||[];await Promise.all(t.map(e=>{let t=new URL(e,import.meta.url).href;return i.has(t)||(i.add(t),document.querySelector(`link[rel="stylesheet"][href="${t}"]`))?Promise.resolve():new Promise((e,n)=>{let r=document.createElement(`link`);r.rel=`stylesheet`,r.href=t,r.onload=()=>e(),r.onerror=()=>n(Error(`[Module Federation] Failed to load CSS asset: ${t}`)),document.head.appendChild(r)})}))}var c={"./PluginConfigurationPanel":async()=>{await s(`./PluginConfigurationPanel`),await Promise.all([]);let t=await o(`./PluginConfigurationPanel`,()=>e(()=>import(`./assets/PluginConfigurationPanel-DR-y5e3d.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r},"./AppPanel":async()=>{await s(`./AppPanel`),await Promise.all([]);let t=await o(`./AppPanel`,()=>e(()=>import(`./assets/AppPanel-Fvhb8xTK.js`),[],import.meta.url)),n=t&&t.__mf_remote_dependency_pending;n&&typeof n.then==`function`&&await n;let r={};return Object.assign(r,t),Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),r}};typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var l=`__mf_init__virtual:mf:__mfe_internal__signalk_questdb__mf_owner__196689844091135__mf_v__runtimeInit__mf_v__.js__`,u=globalThis[l];if(!u){let e,t,n=new Promise((n,r)=>{e=n,t=r});u=globalThis[l]={initPromise:n,initResolve:e,initReject:t}}var d=u.initResolve,{initReject:f}=u,p=e=>{throw f(e),e},m=`__mf_module_cache__`;globalThis[m]||={share:{},remote:{}},globalThis[m].share||={},globalThis[m].remote||={};var h=globalThis[m];for(let e of Object.keys(h.share))if(e.startsWith(`default:`)){let t=e.slice(8);h.share[t]===void 0&&(h.share[t]=h.share[e])}else if(!e.includes(`:`)){let t=`default:`+e;h.share[t]===void 0&&(h.share[t]=h.share[e])}var g={},_=Array.isArray(`default`)?`default`:[`default`],v=`default`,y=`signalk_questdb`,b=[[`react`]],x,S;async function C(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}var w=Symbol(`mf.originalSharedProvider`),T={emit:e=>e},E=e=>Array.isArray(e.scope)?e.scope:[e.scope||`default`],D=(e,t)=>{if(t!==`version-first`)return e;let n={};for(let[t,r]of Object.entries(e))n[t]=Object.assign({},r,{[w]:r});return n},O=(e,t)=>{if(!t)return;let n=Object.entries(e||{}),r=n.find(([,e])=>e===t);if(r)return{version:r[0],provider:t,registered:!0};if(typeof t.version==`string`&&t.version)return{version:t.version,provider:t,registered:!1};let i=n.filter(([,e])=>e===t||!!(t.from&&e?.from===t.from));if(i.length===1)return{version:i[0][0],provider:t,registered:!1}},k=(e,t,r,i)=>{if(!e||!r)return;let a=Object.fromEntries(Object.entries(e).filter(([,e])=>e?.shareConfig?.import!==!1));if(Object.keys(a).length===0)return;let o=E(r),s=D(a,i),c={};for(let e of o)c[e||`default`]={[t]:s};let l=n.getRegisteredShare(c,t,{...r,scope:o,strategy:i},T)?.shared;return l?.[w]||l},A=(e,t,n,r)=>{let i=e=>j(e,n),a=Object.fromEntries(Object.entries(e||{}).filter(([,e])=>!i(e)&&e?.shareConfig?.import!==!1));n?.version&&n.shareConfig?.import!==!1&&(a[n.version]||(a[n.version]=n));let o=k(a,t,n,r);return i(o)?void 0:o},j=(e,t)=>e===t||!!(t?.from&&e?.from===t.from),M=(e,t,n,r,i,a,o,s,c)=>{if(c!==`version-first`||!s)return;let l=t?.options?.shared?.[i],u=Array.isArray(l)?l.find(e=>e?.version===a):void 0,d=(s?.from===t?.options?.name?s:void 0)||(j(u,s)?u:t?void 0:s);if(d)return e.some(e=>e!==t&&e?.options?.name===o?.from&&e?.shareScopeMap?.[r]===n)?d:void 0},ee=(e,t,n,r,i,a,o,s,c)=>{let l=a.registered?M(e,t,n,r,i,a.version,a.provider,s,c):void 0,u=l||o;if(u&&(!a.registered||j(u,s)))return{provider:u,scopeRootProvider:l}};async function N(){return x||=C(()=>e(()=>import(`./assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BUtmcsA-.js`),[],import.meta.url)).catch(e=>{throw x=void 0,e}),x}async function P(){return c}async function F(e={},n=[],r={}){let i=(e,t,n,r)=>{let i=(Array.isArray(r)?r[0]:r)||`default`,a=t||!n?e:e+`@`+n,o={canonical:i+`:`+a};return i==="default"&&(o.aliases=[a]),o},a=(e,t)=>{let n=e[t.canonical];if(n!==void 0)return n;let r=t.aliases||[];for(let n of r){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=e[n];if(r!==void 0)return e[t.canonical]=r,r}},o=Symbol.for(`module-federation.shared-cache-listeners`),s=Symbol.for(`module-federation.shared-cache-owners`),c=e=>{let t=e[s];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,s,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},l=(e,t)=>e[s]?.[t.canonical],f=e=>{let t=[e,e?.default];for(let e of t)if(e&&typeof e==`object`){for(let t of[`__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE`,`__TEST_INTERNALS`,`__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED`]){let n=e[t];if(n&&typeof n==`object`)return{internals:n}}if(typeof e.useState==`function`)return{hook:e.useState}}},m=(e,t)=>{if(e===t)return!0;let n=f(e),r=f(t);if(!n||!r)return!1;let i=n.internals,a=r.internals;return i!==void 0||a!==void 0?i!==void 0&&i===a:typeof n.hook==`function`&&n.hook===r.hook},x=(e,t,n,r)=>{let i=a(e,t);if(i!==void 0&&m(i,n))return n;e[t.canonical]=n;let l=t.aliases||[];for(let t of l)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});let u=e[s];r===void 0?u&&delete u[t.canonical]:c(e)[t.canonical]=r;let d=e[o]?.[t.canonical];if(d)for(let e of d)e(n);return n},w=Symbol.for(`module-federation.tree-shaking-shared-cache`),T=e=>{let t=e[w];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,w,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},E=(e,t,n,r)=>{if(!Array.isArray(n))return r;let i=[...new Set(n)].sort(),a=T(e),o=a[t.canonical]||=[],s=o.find(e=>e.providedExports.length===i.length&&e.providedExports.every((e,t)=>e===i[t]));return s?s.value=r:o.push({providedExports:i,value:r}),r},D=Symbol.for(`module-federation.tree-shaking-shared-selection-cache`),M=e=>{let t=e[D];return t===void 0&&(t=Object.create(null),Object.defineProperty(e,D,{value:t,enumerable:!1,configurable:!1,writable:!1})),t},P=(e,t,n)=>{let r=a(e,t);return r===void 0?e[D]?.[t.canonical]?.[n]:r},F=(e,t,n,r)=>{let i=M(e),a=i[t.canonical]||=Object.create(null);return a[n]=r,r},I=globalThis.__FEDERATION__?.__INSTANCES__||[],te=n.find(e=>e?.from)?.from,ne=I.find(t=>t?.options?.name===te&&t?.shareScopeMap?.default===e)||I.find(t=>t?.options?.name!==y&&t?.shareScopeMap?.default===e),re=Object.create(null),ie=e=>{let t=Object.create(null);for(let[n,r]of Object.entries(e||{}))t[n]=Object.assign(Object.create(null),r);return t},ae=(e,t)=>{for(let[n,r]of Object.entries(G.shareScopeMap?.[e]||{}))for(let[e,i]of Object.entries(r||{})){if(!i||i.get===R[n]?.get)continue;let r=t[n]||={};r[e]===void 0&&(r[e]=i)}},oe=(e,t)=>{ae(e,t);let n=!ne&&Object.values(t||{}).some(e=>Object.values(e||{}).some(z)),r=n?ie(t):t;return re[e]={host:t,runtime:r,isWebpackScope:n},r},se=()=>{let e=Object.values(re).filter(({isWebpackScope:e})=>e);if(e.length!==0)for(let{host:t,runtime:n}of e)for(let[e,r]of Object.entries(t||{})){let t=n[e]||=Object.create(null);for(let[e,n]of Object.entries(r||{}))t[e]=n}},L=Object.create(null);for(let[t,n]of Object.entries(e)){let e=L[t]=Object.create(null);for(let[t,r]of Object.entries(n))e[t]=Object.assign({},r)}let{usedShared:R,usedRemotes:ce}=await N();function z(e){if(typeof e?.get!=`function`)return!1;let t=Function.prototype.toString.call(e.get);return t.includes(`__webpack_require__`)||/\.\s*e\s*\([^)]*\)\s*\.then\s*\(/.test(t)}let le=Object.values(L).some(e=>Object.values(e||{}).some(z)),ue=e=>{let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]},B=(t,n,r,i)=>{if(typeof A!=`function`)return;let a=ue(t),o=!i||a===t?[[t,n]]:[[t,n],[a,R[a]]];for(let[n,i]of o){if(!i)continue;let a=A(r?n===t?r:L[n]:L[n]??e[n],n,i,`version-first`);if(a)return a}},de=(e,t,n)=>{let r=B(e,t,n,!0);return r&&z(r)&&!r.lib&&!r.loaded?r:void 0};var V=g[v];if(V||=g[v]={from:y},n.indexOf(V)>=0)return;n.push(V);let fe=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},pe=[],me=globalThis.window===void 0?await Promise.all([]):[],H=`__mf_vite_runtime_share_load_id__`,he=0,U=new Map,W=new Map,G=t({name:y,remotes:ce,shared:R,plugins:[ge(),_e(),...pe,...me],shareStrategy:`version-first`});G.initShareScopeMap(`default`,oe(`default`,e));function ge(){return{name:`vite-share-pin-lifecycle-plugin`,resolveShare(e){let t=e.shareInfo?.[H],n=t===void 0?void 0:W.get(t);if(!n)return e;let r=e.resolver;return e.resolver=(...e)=>(n.pinned.reapply(),r(...e)),n.pinned.reveal(),e}}}function _e(){return{name:`vite-real-name-snapshot-plugin`,afterLoadSnapshot(e){let t=e&&e.remoteSnapshot,n=t&&t.globalName,r=t&&t.version;if(!n||!r||!t.remoteEntry)return e;let i=globalThis.__FEDERATION__&&globalThis.__FEDERATION__.moduleInfo,a=n+`:`+r;return i&&!i[a]&&(i[a]=t),e}}}let ve=G.sharedHandler.hooks.lifecycle.resolveShare;G.__mfKeepAdoptedProviders||(G.__mfKeepAdoptedProviders=!0,G.sharedHandler?.hooks?.lifecycle?.afterRegisterShare?.on?.(e=>{let{shared:t,previousShared:n,registeredShared:r}=e||{},i=G.shareScopeMap?.[e.scope]?.[e.pkgName];t&&i&&(t.shareConfig?.import===!1?r===t&&n&&n.shareConfig?.import!==!1&&i[t.version]===t&&(i[t.version]=n):r!==t&&r?.shareConfig?.import===!1&&!r.loaded&&i[t.version]===r&&(i[t.version]=t))}));let K=new WeakMap;ve.on(e=>{let t=e.shareInfo?.[H],n=e.resolver;return typeof n==`function`&&(e.resolver=(...r)=>{let i=n(...r);if(i?.shared?.shareConfig?.import===!1&&typeof k==`function`&&R[e.pkgName]){let t=k(e.shareScopeMap?.[e.scope]?.[e.pkgName],e.pkgName,R[e.pkgName],`version-first`);t&&t.shareConfig?.import!==!1&&(i={shared:t,useTreesShaking:i.useTreesShaking})}let a=i?.shared;return a&&(typeof a==`object`||typeof a==`function`)&&!K.has(a)&&K.set(a,{from:a.from}),t!==void 0&&a&&U.set(t,a),i}),e});let ye=(e,t,n,r)=>{if(!e||e[t]!==n)return;let i=Object.assign({},r,{version:r.version??t,scope:r.scope??n?.scope??[`default`],strategy:`loaded-first`}),a=r.from;e[t]=i;let o=()=>n===void 0?e[t]===void 0:e[t]===n;return{provider:i,reveal(){return e[t]===i&&(n===void 0?delete e[t]:e[t]=n,!0)},reapply(){return o()?(e[t]=i,!0):!1},release(s,c=!0){return r.from=a,e[t]===i?c?s?(i.from=a,s&&i.lib&&(i.loaded=!0),r.strategy===void 0?delete i.strategy:i.strategy=r.strategy,!0):(n===void 0?delete e[t]:e[t]=n,!1):(n===void 0?delete e[t]:e[t]=n,!0):!c&&o()}}},be=e=>Object.entries(e||{}).map(([e,t])=>({provider:t,version:e,from:t.from,registered:!0})),xe=(e,t)=>{if(t===void 0)return;let n;for(let r of e){let e=r.provider,i=e.treeShaking||e;if(r.loadedFactory===t||e.lib===t||i.lib===t){if(n)return;n=r}}return n},Se=async(e,t,n)=>{let r=++he;W.set(r,{pinned:n});try{let n=await G.loadShare(e,{customShareInfo:{shareConfig:t,[H]:r}});return{factory:n===!1?void 0:n,selectedProvider:U.get(r)}}finally{U.delete(r),W.delete(r)}},Ce=async(e,t,n,r,i,a,o=!0)=>{let s=a.from,c=ye(n,r,i,a);if(!c)return;let l;try{l=await Se(e,t,c)}catch(e){throw c.release(!1),e}let u=l?.factory;if(u===void 0){c.release(!1);return}let d=be(n),f=c.provider.treeShaking||c.provider,p=c.provider.lib===u||f.lib===u;if(!o&&p){let e=d.findIndex(e=>e.provider===c.provider);e!==-1&&d.splice(e,1)}!o&&!d.some(e=>e.provider===a)&&d.push({provider:a,version:r,from:s,registered:!1,loadedFactory:p?u:void 0});let m=!o&&l.selectedProvider===c.provider&&p?a:l.selectedProvider;if(m&&!d.some(e=>e.provider===m)){let e=K.get(m),t=typeof m.version==`string`&&m.version?m.version:r;d.push({provider:m,version:t,from:e?e.from:m.from,registered:n?.[t]===m,loadedFactory:u})}let h=d.find(e=>e.provider===m)??xe(d,u);if(!c.release(!0,h?.provider===c.provider)||!h)return;let g=K.get(h.provider);h.from=h.provider===a?s:g?g.from:h.provider.from,g&&(h.provider.from=g.from);let _=typeof u==`function`?u():u,v=await Promise.resolve(_);if(!(h.registered&&n?.[h.version]!==h.provider))return{provider:h.provider,selection:h,resolved:v}},q=new Set,J=new Map,we=async(t,n,r)=>{let o=!!n.shareConfig?.singleton;if(!o&&n.canLiveRebind!==!1)try{let s=A(r,t,n,`version-first`),c=O(r,s);if(!c||n.shareConfig?.import===!1&&j(s,n)||s?.shareConfig?.import===!1)return;let{version:l}=c;if(!o&&l!==n.version||!s.lib&&!s.loading&&!(s.loaded&&typeof s.get==`function`))return;let u=i(t,o,n.version,n.scope);if(a(h.share,u)!==void 0)return;let d=e[t],f=d?.[l];if(c.registered&&!j(f,s))return;let p,m=s.lib;if(!m&&z(s)||(!m&&s.loading&&(m=await s.loading),!m&&s.loaded&&typeof s.get==`function`&&(m=await s.get()),!m))return;let g=typeof m==`function`?m():m,_=await Promise.resolve(g),v=c.registered?f:s;p={provider:v,selection:{provider:v,version:l,from:s.from,registered:c.registered},resolved:_};let y=p?.provider,b=p?.selection;if(!b)return;let S=p?.resolved;if(S===void 0||a(h.share,u)!==void 0||b.registered&&d?.[b.version]!==y)return;x(h.share,u,fe(S),b.from),q.add(y)}catch(e){console.error(`[Module Federation] Failed to bridge materialized shared module "`+t+`"`,e)}},Y=async(t,n,r,o,s)=>{try{let c=i(t,n.shareConfig?.singleton,n.version,n.scope),u=a(h.share,c),d=l(h.share,c),f=A(r,t,n,`version-first`),p=f||k(r,t,n,`version-first`)||n,m=O(r,p);if(!m)return;let g=j(p,n),{version:_}=m;if(!n.shareConfig?.singleton&&_!==n.version)return;let v=o?.[_],b=ee(I,ne,e,`default`,t,m,f,v,`version-first`);if(!b&&!g)return;let{provider:S,scopeRootProvider:C}=b||{provider:p,scopeRootProvider:void 0};if(n.canLiveRebind===!1||n.shareConfig?.import===!1&&j(S,n)||S?.shareConfig?.import===!1||u!==void 0&&d!==y)return;let w=e[t],T=w?.[_];if(m.registered&&!C&&!j(T,S))return;let E=await Ce(t,n.shareConfig,w,_,T,S,m.registered&&!g),D=E?.provider,M=E?.selection;if(!M||j(D,n)||s&&(s.version!==M.version||!j({from:M.from},s.provider))||q.has(D))return;let N=E?.resolved;if(N===void 0)return;let P=a(h.share,c),F=l(h.share,c);if(P!==void 0&&F!==y||M.registered&&w?.[M.version]!==D)return;s||J.set(t,{version:M.version,provider:{from:M.from}}),q.add(D);let te=fe(N);x(h.share,c,te,M.from)}catch(e){console.error(`[Module Federation] Failed to bridge external shared module "`+t+`"`,e)}};for(let e of b)await Promise.all(e.map(async e=>{let t=R[e];t&&t.materialize!==!1&&!t.treeShaking&&await we(e,t,L[e])}));for(let[e,t]of Object.entries(R)){if(t.treeShaking)continue;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(a(h.share,n)!==void 0)continue;let r=i(e,!0,t.version,t.scope),o=a(h.share,r);o!==void 0&&x(h.share,n,o,l(h.share,r))}let Te=[`react`],Ee=[[`react`]],X=new Map(Te.map((e,t)=>[e,t])),De={},Z=Te.filter(e=>R[e]&&(R[e].materialize!==!1||R[e].shareConfig?.import===!1&&!R[e].lazy));h.providerInit||=new Map;let Oe=(e,t)=>{let n=h.providerInit.get(e);if(n)return n;let r=Promise.resolve().then(t);return h.providerInit.set(e,r),r.catch(()=>h.providerInit.delete(e)),r};var ke=async e=>{let t=new Set(e);for(let e of Ee)await Promise.all(e.filter(e=>t.has(e)).map(async e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);if(t.shareConfig?.import===!1||t.treeShaking||a(h.share,n)!==void 0)return;let r=i(e,!0,t.version,t.scope),o=a(h.share,r);if(o!==void 0){x(h.share,n,o,l(h.share,r));return}let s=typeof B==`function`?B(e,t):void 0;if(s){let r=s.lib;if(!r&&s.loading&&(r=await s.loading),!r&&s.loaded&&typeof s.get==`function`&&(r=await s.get()),r){let e=typeof r==`function`?r():r,t=await Promise.resolve(e);x(h.share,n,(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(t),s.from);return}if(typeof z==`function`&&z(s)&&(t.shareConfig?.singleton||O(L[e],s)?.version===t.version))return}let c=n.canonical,u=await Oe(c,async()=>{let e=await t.get(),n=typeof e==`function`?e():e;return Promise.resolve(n)});for(let n of G.options.shared?.[e]||[])n.get===t.get&&(n.eager=!0);let d=(e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t})(u),f=d===u?{...u}:d;f.__esModule!==!0&&Object.defineProperty(f,"__esModule",{value:!0,enumerable:!1}),x(h.share,n,f,y)}))};let Q=e=>{let t=R[e];if(!t.treeShaking&&t.shareConfig?.import!==!1)return!1;let n=i(e,t.shareConfig?.singleton,t.version,t.scope);return t.treeShaking?P(h.share,n,y)===void 0&&a(h.share,n)===void 0:a(h.share,n)===void 0},Ae=e=>{let t=R[e],n=i(e,t.shareConfig?.singleton,t.version,t.scope);return(t.treeShaking?P(h.share,n,y)??a(h.share,n):a(h.share,n))===void 0?t.treeShaking||t.shareConfig?.import===!1?!0:typeof A==`function`&&!!A(L[e],e,t,`version-first`):!1},je=e=>{let t=!0;for(;t;){t=!1;for(let n of Z){let r=X.get(n);e.has(r)||(De[r]||[]).some(t=>e.has(t))&&(e.add(r),t=!0)}}return e},Me=je(new Set(Z.filter(Ae).map(e=>X.get(e)))),Ne=Z.filter(e=>!Me.has(X.get(e)));var Pe=Z.filter(e=>Me.has(X.get(e)));await ke(Ne).catch(p);try{await C(async()=>{await Promise.all(await G.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}se();let Fe=async()=>{for(let t of b)await Promise.all(t.map(async t=>{let n=R[t];n&&n.materialize!==!1&&!n.treeShaking&&await Y(t,n,e[t],L[t],void 0)}))};le?S=Fe:await Fe();try{let e=globalThis.__FEDERATION__?.__SHARE__,t=Object.create(null);if(e)for(let[,n]of Object.entries(e))for(let e of _){let r=n?.[e];if(r)for(let[e,n]of Object.entries(r)){let r=R?.[e],i=L[e],a=J.get(e);if(!r||!i||!a||r.treeShaking)continue;let o=t[e]||(t[e]=Object.create(null));for(let[e,t]of Object.entries(n)){if(!t.lib||a.version!==e||!j(t,a.provider))continue;let n=i[e];(t===n||n?.from&&t.from===n.from)&&(t===r||r.from&&t.from===r.from||o[e]===void 0&&(o[e]=t))}}}for(let e of b)await Promise.all(e.map(async e=>{let n=t[e];n&&await Y(e,R[e],n,L[e],J.get(e))}))}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}let Ie=async()=>{},Le=async(t,n)=>{let r=i(t,n.shareConfig?.singleton,n.version,n.scope),o=n.treeShaking?P(h.share,r,y):a(h.share,r);if(n.shareConfig?.import!==!1||o!==void 0||de(t,n,L[t]))return;let s=e=>{let t=e;for(let e=0;e<5;e++){let e=t?.default;if(!e||typeof e!=`object`||Object.keys(e).length===0)break;let n=Object.getPrototypeOf(e);if(n!==null&&n!==Object.prototype)break;let r=Object.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(r.length>0&&r.some(e=>e!==void 0))break;t=e}return t},c=e?.[t],l=k(c,t,n,`version-first`)||n,u=O(c,l);if(!u)return;let d=e=>e===n||e?.shareConfig?.import===!1;if(d(l))return;let{version:f}=u,p=c?.[f],m=await Ce(t,n.shareConfig,c,f,p,l,u.registered),g=m?.selection,_=m?.provider,v=m?.resolved;if(!g||d(_)||v===void 0||(n.treeShaking?P(h.share,r,y):a(h.share,r))!==void 0||g.registered&&c?.[g.version]!==_)return;let b=s(v);if(n.treeShaking){let e=n.treeShaking.providedExports??n.treeShaking.usedExports??[];E(h.share,r,e,b),F(h.share,r,y,b)}else x(h.share,r,b,g.from)},Re=[],ze=new Set;for(let e of Pe){let t=R[e],n=X.get(e);if(Q(e))try{t.treeShaking?await Ie(e,t):t.shareConfig?.import===!1&&await Le(e,t)}catch(t){console.error(`[Module Federation] Failed to resolve runtime-only shared module "${e}"`,t)}Q(e)&&ze.add(n)}je(ze),Re.push(...Pe.filter(e=>!ze.has(X.get(e)))),await ke(Re).catch(p);let $=new Map;return u.loadLazyShares=async t=>{let n=new Set(t);for(let t of b)await Promise.all(t.filter(e=>n.has(e)).map(t=>{let n=R[t];if(!n||!n.lazy||!Q(t))return;let r=$.get(t);return r||(r=Y(t,n,e[t],L[t],void 0).then(()=>Q(t)?Le(t,n):void 0),r.catch(()=>$.delete(t)),$.set(t,r)),r}))},d(G),G}async function I(e){let t=await P();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return S&&await S(),h.pendingShareLoads&&await Promise.all(h.pendingShareLoads),t[e]().then(e=>()=>e)}export{I as get,F as init};
|
|
2
2
|
if (typeof document !== 'undefined' && document.head) {
|
|
3
3
|
try {
|
|
4
|
-
for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-
|
|
4
|
+
for (const __mfWarmupPath of ["assets/_virtual_mf-localSharedImportMap___mfe_internal__signalk_questdb__mf_owner__1-BUtmcsA-.js","assets/vite-preload-helper-CRzLMJPS.js","assets/dist-C5M3fhBw.js","assets/utils-v9GZlbdk.js"]) {
|
|
5
5
|
const __mfWarmupLink = document.createElement('link');
|
|
6
6
|
__mfWarmupLink.rel = 'modulepreload';
|
|
7
7
|
__mfWarmupLink.crossOrigin = '';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,r,t as i}from"./_virtual_mf___mfe_internal__signalk_questdb__mf_owner__196689844091135__loadShare__shared-BRI06Lxu.js";var a={root:{fontFamily:`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif`,color:`#333`,padding:`16px 0`},sectionToggle:{color:`#555`,display:`flex`,alignItems:`center`,gap:6,width:`100%`,textAlign:`left`,background:`none`,border:`none`,padding:0,cursor:`pointer`,userSelect:`none`},sectionMarker:{fontSize:11,transition:`transform 0.15s`},sectionTitle:{fontSize:13,fontWeight:600,color:`#888`,textTransform:`uppercase`,letterSpacing:`0.05em`,marginBottom:10,marginTop:24},btn:{display:`inline-flex`,alignItems:`center`,gap:8,padding:`8px 16px`,border:`none`,borderRadius:6,fontSize:13,fontWeight:600,cursor:`pointer`},btnPrimary:{background:`#3b82f6`,color:`#fff`},btnSecondary:{background:`#f1f5f9`,color:`#475569`,border:`1px solid #e2e8f0`},btnWarn:{background:`#f59e0b`,color:`#fff`},btnDanger:{background:`#ef4444`,color:`#fff`},btnDisabled:{opacity:.5,cursor:`not-allowed`},btnSmall:{padding:`4px 12px`,fontSize:12},status:{marginTop:8,fontSize:12,minHeight:18},card:{display:`flex`,alignItems:`center`,gap:14,padding:`14px 18px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:12},cardIcon:{width:44,height:44,borderRadius:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,fontWeight:700,flexShrink:0},cardInfo:{flex:1},cardTitle:{fontSize:15,fontWeight:600,color:`#333`},cardMeta:{fontSize:12,color:`#888`},stateIndicator:{width:10,height:10,borderRadius:`50%`,flexShrink:0},fieldRow:{display:`flex`,alignItems:`center`,gap:12,marginBottom:10},label:{fontSize:13,fontWeight:500,color:`#555`,width:180,flexShrink:0},select:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,minWidth:200},input:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:200},inputSmall:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,background:`#fff`,color:`#333`,width:80},checkbox:{width:16,height:16,accentColor:`#3b82f6`},hint:{fontSize:11,color:`#aaa`,marginLeft:8},link:{color:`#3b82f6`,textDecoration:`none`,fontSize:13,fontWeight:600},textarea:{padding:`6px 10px`,borderRadius:6,border:`1px solid #ccc`,fontSize:13,fontFamily:`monospace`,background:`#fff`,color:`#333`,width:`100%`,minHeight:70,boxSizing:`border-box`,resize:`vertical`},empty:{textAlign:`center`,padding:`30px 16px`,color:`#999`,fontSize:13},tag:{display:`inline-block`,padding:`2px 8px`,borderRadius:4,fontSize:10,fontWeight:600,marginLeft:8},tagPre:{background:`#fef3c7`,color:`#92400e`},tagLatest:{background:`#dcfce7`,color:`#166534`},warnBanner:{padding:`12px 16px`,background:`#fef2f2`,border:`1px solid #fecaca`,borderRadius:10,marginBottom:12,fontSize:13,color:`#991b1b`,lineHeight:1.5},warnBannerTitle:{fontWeight:700,marginBottom:4},infoBanner:{padding:`12px 16px`,background:`#fffbeb`,border:`1px solid #fde68a`,borderRadius:10,marginBottom:12,fontSize:13,color:`#92400e`,lineHeight:1.5},bannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},statsGrid:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(140px, 1fr))`,gap:10,marginBottom:12},statCard:{padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,textAlign:`center`},statValue:{fontSize:22,fontWeight:700,color:`#333`},statLabel:{fontSize:11,color:`#888`,marginTop:2}},o={ok:`#10b981`,warn:`#f59e0b`,error:`#ef4444`};function s(e,t){if(!e)return{versions:null,versionsError:`⚠ Could not reach GitHub — showing last known versions, retry`};let n=t&&typeof t==`object`?t:{},r=Array.isArray(n)?n:Array.isArray(n.versions)?n.versions:[],i=!Array.isArray(n)&&n.sources&&typeof n.sources==`object`?n.sources:{},a=``;return i.prImages===`rate-limited`?a=`⚠ GitHub rate-limited — PR test images temporarily unavailable, retry shortly`:i.releases===`rate-limited`?a=`⚠ GitHub rate-limited — some versions temporarily unavailable, retry shortly`:(i.prImages===`error`||i.releases===`error`)&&(a=`⚠ Could not fetch some versions from GitHub, retry`),{versions:r,versionsError:a}}function c(e,t={}){let{stableCount:n=5,preCount:r=3}=t,i=e.filter(e=>typeof e.pr==`number`),a=e.filter(e=>typeof e.pr!=`number`);return{prVersions:i,stableVersions:a.filter(e=>!e.prerelease).slice(0,n),preVersions:a.filter(e=>e.prerelease).slice(0,r)}}function l(e,t=[`latest`],n={}){let{prVersions:r,stableVersions:i,preVersions:a}=c(e,n);return new Set([...t,...a.map(e=>e.tag),...i.map(e=>e.tag),...r.map(e=>e.tag)])}function u(e,t,n=[`latest`],r={}){return e?l(t,n,r).has(e)?null:e:null}function d(e){return e==null?`—`:e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function f(e,a={}){let{intervalMs:o=5e3}=a,[s,c]=t(null),[l,u]=t(!0),d=r(0),f=r(a.fallback??null),p=i(async t=>{let n=++d.current,r=f.current;try{let n=await(await fetch(e,{signal:t})).json().catch(()=>null);n&&typeof n==`object`&&(r=n)}catch{}n===d.current&&(c(r),u(!1))},[e]);return n(()=>{let e=!1,t=null,n=new AbortController,r=async()=>{await p(n.signal),!e&&o>0&&(t=setTimeout(()=>void r(),o))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[p,o]),{status:s,loading:l,refresh:()=>p()}}function p(e){let[a,o]=t([]),[c,l]=t(``),[u,d]=t(!1),f=r(0),p=i(async()=>{let t=++f.current;d(!0);try{let n=await fetch(e),r=await n.json().catch(()=>null),i=s(n.ok,r);if(t!==f.current)return;i.versions!==null&&o(i.versions),l(i.versionsError)}catch{if(t!==f.current)return;l(`⚠ Offline — showing last known versions`)}d(!1)},[e]);return n(()=>{p()},[p]),{versions:a,versionsError:c,loading:u,refresh:p}}function m({children:t,color:n}){return e.createElement(`span`,{style:{...a.hint,...n?{color:n}:{}}},t)}function h({state:t=`ok`,color:n,title:r,style:i}){return e.createElement(`div`,{style:{...a.stateIndicator,background:n??o[t],...i},title:r})}function ee({icon:t,iconBackground:n,iconColor:r,title:i,meta:s,state:c=`ok`,stateTitle:l,link:u,children:d}){let f=c===`error`&&!n;return e.createElement(`div`,{style:a.card},e.createElement(`div`,{style:{...a.cardIcon,background:f?`#fef2f2`:n??`#3b82f6`,color:f?o.error:r??`#fff`}},t),e.createElement(`div`,{style:a.cardInfo},e.createElement(`div`,{style:a.cardTitle},i),s!=null&&e.createElement(`div`,{style:a.cardMeta},s)),d,u&&e.createElement(`a`,{href:u.href,target:`_blank`,rel:`noopener noreferrer`,style:a.link},u.label),e.createElement(h,{state:c,title:l}))}function g({title:n,defaultOpen:r=!1,children:i}){let[o,s]=t(r);return e.createElement(`div`,null,e.createElement(`button`,{type:`button`,"aria-expanded":o,style:{...a.sectionTitle,...a.sectionToggle},onClick:()=>s(!o)},e.createElement(`span`,{style:{...a.sectionMarker,transform:o?`rotate(90deg)`:`rotate(0deg)`}},`▶`),n),o&&e.createElement(`div`,{style:{marginBottom:16}},i))}var _={primary:a.btnPrimary,secondary:a.btnSecondary,warn:a.btnWarn,danger:a.btnDanger};function v({variant:t=`primary`,small:n=!1,busy:r=!1,busyLabel:i,disabled:o=!1,onClick:s,title:c,style:l,children:u}){let d=o||r;return e.createElement(`button`,{type:`button`,style:{...a.btn,..._[t],...n?a.btnSmall:{},...d?a.btnDisabled:{},...l},onClick:s,disabled:d,title:c},r?i??u:u)}function te({message:t,error:n=!1,style:r}){return t?e.createElement(`div`,{style:{...a.status,color:n?o.error:o.ok,marginTop:16,...r}},t):null}var ne=[{tag:`latest`,label:`latest (recommended)`}];function re({value:t,onChange:n,versions:r,floatingOptions:i=ne,stableCount:s,preCount:l,loading:d=!1,error:f,onRefresh:p,disabled:h=!1,style:ee}){let g={stableCount:s,preCount:l},{prVersions:_,stableVersions:te,preVersions:re}=c(r,g),y=u(t,r,i.map(e=>e.tag),g);return e.createElement(e.Fragment,null,e.createElement(`select`,{style:{...a.select,...ee},value:t,onChange:e=>n(e.target.value),disabled:h},i.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.label??t.tag)),re.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,` (pre-release)`)),te.map((t,n)=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,n===0?` (current stable)`:``)),_.length>0&&e.createElement(`optgroup`,{label:`PR test images`},_.map(t=>e.createElement(`option`,{key:t.tag,value:t.tag},t.tag,t.title?` — ${t.title}`:``))),y&&e.createElement(`option`,{value:y},y,` (running)`)),d&&e.createElement(m,null,`loading releases...`),p&&e.createElement(v,{small:!0,style:{padding:`4px 10px`,fontSize:11},onClick:p,title:`Refresh available versions`},`↻`),f&&e.createElement(m,{color:o.error},f))}var y={...a,warnBannerCode:{display:`block`,marginTop:8,padding:`8px 10px`,background:`#fff`,border:`1px solid #fecaca`,borderRadius:6,fontFamily:`monospace`,fontSize:12,color:`#7f1d1d`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},fieldHelp:{fontSize:12,color:`#666`,marginTop:6,lineHeight:1.5},migrationItem:{display:`flex`,alignItems:`center`,gap:12,padding:`12px 16px`,background:`#f8f9fa`,border:`1px solid #e0e0e0`,borderRadius:10,marginBottom:8},migrationActions:{display:`flex`,gap:8,alignItems:`center`}},b=e=>typeof e==`object`&&!!e;function ie(e){let t=b(e)?e.sources:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.type==`string`&&typeof e.url==`string`&&typeof e.status==`string`&&(e.version===void 0||typeof e.version==`string`)):[]}function ae(e){let t=b(e)?e.buckets:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.name==`string`&&(e.id===void 0||typeof e.id==`string`)&&(e.retentionSeconds===void 0||typeof e.retentionSeconds==`number`)):[]}function oe(e){let t=b(e)?e.measurements:void 0;return Array.isArray(t)?t.filter(e=>b(e)&&typeof e.name==`string`&&Array.isArray(e.fields)):[]}function x(e){let t=b(e)?e.run:void 0;if(!b(t)||typeof t.id!=`string`||typeof t.state!=`string`)return;let n=t.state;if(n!==`running`&&n!==`done`&&n!==`failed`&&n!==`cancelled`)return;let r=b(t.progress)?t.progress:{},i=e=>typeof e==`number`&&Number.isFinite(e)?e:0,a=e=>typeof e==`string`?e:void 0;return{id:t.id,state:n,url:a(t.url)??``,bucket:a(t.bucket)??``,startedAt:a(t.startedAt)??``,finishedAt:a(t.finishedAt),error:a(t.error),resumedFrom:b(t.resumedFrom)?{measurement:a(t.resumedFrom.measurement),windowStart:a(t.resumedFrom.windowStart)}:void 0,progress:{read:i(r.read),written:i(r.written),skipped:i(r.skipped),measurementsDone:i(r.measurementsDone),measurementsTotal:i(r.measurementsTotal),currentMeasurement:a(r.currentMeasurement),currentWindowStart:a(r.currentWindowStart)}}}function se(e){let t=e=>typeof e==`number`&&Number.isFinite(e)&&e>0?Math.floor(e):0;return{rows:t(b(e)?e.rows:void 0),dropped:t(b(e)?e.dropped:void 0)}}function ce(e){let t=b(e)&&Array.isArray(e.contexts)?e.contexts.filter(e=>typeof e==`string`&&!!e):[],n=b(e)&&typeof e.self==`string`&&t.includes(e.self)?e.self:void 0;return{contexts:t,self:n,selfBy:n!==void 0&&b(e)&&(e.selfBy===`tag`||e.selfBy===`identity`)?e.selfBy:void 0}}function S(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function le(e){let t=b(e)?e.interrupted:void 0;if(b(t)&&typeof t.url==`string`&&typeof t.type==`string`&&typeof t.bucket==`string`&&typeof t.from==`string`&&typeof t.to==`string`&&typeof t.updatedAt==`string`)return{url:t.url,type:t.type,bucket:t.bucket,from:t.from,to:t.to,updatedAt:t.updatedAt,measurementsDone:typeof t.measurementsDone==`number`&&Number.isFinite(t.measurementsDone)?t.measurementsDone:0,measurement:typeof t.measurement==`string`?t.measurement:void 0,windowStart:typeof t.windowStart==`string`?t.windowStart:void 0}}function ue(e,t){let n=new Date(e),r=new Date(t);return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())?{error:`Enter a valid From and To date for the import.`}:r<=n?{error:`The To date must be after the From date.`}:{from:n.toISOString(),to:r.toISOString()}}function C(e){return e instanceof Error?e.message:String(e)}function w(e,t){return e??t}var de=[`none`,`lz4`,`zstd`],fe={padding:`4px 12px`,fontSize:12};function pe(e){return de.includes(e)?e:`lz4`}function me({configuration:a,save:o}){let s=a||{},[c,l]=t(s.questdbHost||`127.0.0.1`),[u,m]=t(s.questdbIlpPort||9009),[h,_]=t(s.questdbHttpPort||9e3),[ne,b]=t(s.questdbPgPort||8812),[de,me]=t(s.questdbVersion||`latest`),[T,he]=t(s.managedContainer!==!1),[ge,_e]=t(s.recordSelf!==!1),[ve,ye]=t(s.recordOthers!==!1),[be,xe]=t(s.restoreOnStart===!0),[Se,Ce]=t(s.enableConsole!==!1),[we,Te]=t(s.historySourcePolicyAll===!0),[Ee,De]=t((s.restoreMaxAgeMinutes??0)>0?s.restoreMaxAgeMinutes:9),[Oe,ke]=t(s.defaultSamplingRate??2e3),[Ae,je]=t(String(s.ilpFlushIntervalMs??5e3)),[Me,Ne]=t(String(s.unchangedHeartbeatSeconds??300)),[Pe,Fe]=t(s.retentionDays||0),[Ie,Le]=t(s.pathFilter?.mode===`include`?`include`:`exclude`),[Re,ze]=t((Array.isArray(s.pathFilter?.paths)?s.pathFilter.paths:[]).join(`
|
|
2
|
-
`)),[Be,Ve]=t(s.compression||`lz4`),[He,Ue]=t(s.compressionLevel||3),[We,Ge]=t(s.networkName||`sk-network`),[E,Ke]=t(s.exposeToContainers||!1),{versions:qe,versionsError:Je,loading:Ye,refresh:Xe}=p(`/plugins/signalk-questdb/api/versions`),{status:D,loading:Ze,refresh:O}=f(`/plugins/signalk-questdb/api/status`,{fallback:{status:`not_running`},intervalMs:5e3}),[k,Qe]=t(null),[$e,et]=t(!1),[A,tt]=t(``),[j,nt]=t(null),[rt,it]=t(``),[at,ot]=t(``),[st,ct]=t(``),[lt,ut]=t(``),[dt,ft]=t(null),[M,N]=t(``),[P,pt]=t(null),[mt,F]=t(!1),[ht,gt]=t(!1),[I,_t]=t(null),[vt,yt]=t(``),[bt,xt]=t(!0),[St,Ct]=t(``),[wt,Tt]=t(``),[L,R]=t(null),[Et,z]=t(!1),[B,Dt]=t(null),[Ot,kt]=t(!1),[V,H]=t(null),[At,U]=t(``),[jt,W]=t(!1),[G,Mt]=t(null),[Nt,Pt]=t(!1),[Ft,It]=t(!1),[Lt,Rt]=t(!1),[zt,Bt]=t(!1),[Vt,K]=t(``),[q,Ht]=t(null),[Ut,J]=t(!1),Y=r(0),[Wt,Gt]=t(!1),X=i(async e=>{let t=++Y.current;try{let n=await fetch(`/plugins/signalk-questdb/api/wal-diagnosis`,{signal:e});if(t!==Y.current)return;if(n.ok){let e=await n.json();if(t!==Y.current)return;Ht(e),J(!1)}else J(!0)}catch{t===Y.current&&J(!0)}},[]),Kt=!!(D&&D.status===`running`&&(D.suspendedTables||[]).length>0);n(()=>{if(!Kt){Ht(null),J(!1);return}let e=!1,t=null,n=new AbortController,r=async()=>{await X(n.signal),e||(t=setTimeout(r,15e3))};return r(),()=>{e=!0,n.abort(),t&&clearTimeout(t)}},[Kt,X]);let qt=async(e,t)=>{let n=t.tailSkip?`
|
|
3
|
-
|
|
4
|
-
WARNING: this is the newest pending segment — skipping it drops the ENTIRE pending backlog.`:``;if(window.confirm(`Skip the unreadable WAL segment on ${e}?\n\nThis permanently loses ${d(t.skippedTxns)} transaction(s) recorded between ${t.skipWindowStart} and ${t.skipWindowEnd}. Everything after the skipped segment is replayed without loss.`+n)){Gt(!0),K(``);try{let n=await fetch(`/plugins/signalk-questdb/api/resume-wal/skip`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({table:e,confirmPlan:t})}),r=await n.json().catch(()=>({error:n.statusText}));n.ok?K(r.message??``):K(`Skip failed: ${w(r.error,`unknown error`)}`),O(),X()}catch(e){K(`Skip failed: ${C(e)}`)}Gt(!1)}},Jt=async()=>{Pt(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/update/check`);e.ok&&Mt(await e.json())}catch{}Pt(!1)},Yt=async()=>{It(!0),U(`Pulling new image and restarting...`),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/update/apply`,{method:`POST`});if(e.ok){let t=await e.json();U(t.message??``),Mt(null),t.newVersion&&me(t.newVersion),O()}else{let t=await e.json().catch(()=>({error:e.statusText}));U(`Update failed: ${w(t.error,`unknown error`)}`),W(!0)}}catch(e){U(`Update failed: ${C(e)}`),W(!0)}It(!1)},Xt=async()=>{if(window.confirm(`Remove the QuestDB container and DELETE ALL recorded data? This cannot be undone.`)){Rt(!0),U(`Removing QuestDB container and data...`),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/purge-data`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));e.ok?(U(t.message??``),O()):(U(`Remove failed: ${w(t.error,`unknown error`)}`),W(!0))}catch(e){U(`Remove failed: ${C(e)}`),W(!0)}Rt(!1)}},Zt=async()=>{Bt(!0),K(``);try{let e=await fetch(`/plugins/signalk-questdb/api/resume-wal`,{method:`POST`}),t=await e.json().catch(()=>({error:e.statusText}));if(e.ok){let e=(t.results||[]).filter(e=>!e.ok);K(e.length===0?`${w(t.message,`Resume requested`)}. Recording resumes as the backlog drains — the banner clears once tables catch up.`:`${w(t.message,`Resume requested`)}. `+e.map(e=>`${e.table}: ${e.error}`).join(` · `)),O(),X()}else K(`Resume failed: ${w(t.error,`unknown error`)}`)}catch(e){K(`Resume failed: ${C(e)}`)}Bt(!1)},Qt=async()=>{et(!0),U(``);try{let e=A?`?url=${encodeURIComponent(A)}`:``,t=await fetch(`/plugins/signalk-questdb/api/migration/detect${e}`);if(t.ok){let e=ie(await t.json().catch(()=>null));Qe(e),e.length===0&&(U(A?`No InfluxDB found at ${A}.`:`No InfluxDB instances detected on localhost:8086.`),W(!1))}}catch(e){U(`Detection failed: `+C(e)),W(!0)}et(!1)},Z=i(()=>({token:rt||void 0,org:at||void 0,username:st||void 0,password:lt||void 0}),[rt,at,st,lt]),$t=i(async(e,t=Z())=>{F(!0),U(``),N(``);try{let n=await fetch(`/plugins/signalk-questdb/api/migration/buckets`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e.url,type:e.type,...t})}),r=await n.json().catch(()=>null),i=ae(r);ft(i),n.ok?i.length===0?(U(`No buckets found. InfluxDB 2.x needs an API token with read access.`),W(!0)):i.length===1&&N(i[0].name):(U(r?.error??`Could not list buckets.`),W(!0))}catch(e){U(`Could not list buckets: `+C(e)),W(!0)}F(!1)},[Z]),en=r(Z);n(()=>{en.current=Z},[Z]),n(()=>{if(_t(null),yt(``),gt(!1),!j||!M)return;let e=!1;return gt(!0),(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/contexts`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...en.current()})}),n=await t.json().catch(()=>null);if(e)return;if(!t.ok){U(n?.error??`Could not list the vessels.`),W(!0);return}let r=ce(n);_t(r),yt(r.self??(r.contexts.length===1?r.contexts[0]:``))}catch(t){if(e)return;U(`Could not list the vessels: `+C(t)),W(!0)}finally{e||gt(!1)}})(),()=>{e=!0}},[j,M]);let tn=i(async()=>{if(j&&M){F(!0);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/measurements`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Z()})}),t=await e.json().catch(()=>null),n=oe(t);pt(n),e.ok||(U(t?.error??`Could not list measurements.`),W(!0))}catch(e){U(`Could not list measurements: `+C(e)),W(!0)}F(!1)}},[j,M,Z]),nn=async()=>{if(!j||!M)return;let e=ue(St,wt);if(`error`in e)U(e.error),W(!0);else{z(!0),U(``);try{let t=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:j.url,type:j.type,bucket:M,...Z(),from:e.from,to:e.to,sourceSelfContext:vt||void 0,others:bt?`keep`:`skip`})}),n=await t.json().catch(()=>null);t.ok?(R(x(n)??null),H(null)):(U(n?.error??`Could not start migration.`),W(!0))}catch(e){U(`Could not start migration: `+C(e)),W(!0)}z(!1)}},rn=async()=>{z(!0),U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/start`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({resume:!0,...Z()})}),t=await e.json().catch(()=>null);e.ok?(R(x(t)??null),H(null)):(U(t?.error??`Could not resume the import.`),W(!0))}catch(e){U(`Could not resume the import: `+C(e)),W(!0)}z(!1)},an=async()=>{if(window.confirm(`Discard the saved position? The import will then start again from the beginning. Rows already imported are kept and are not duplicated.`)){U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/discard`,{method:`POST`});if(e.ok)H(null);else{let t=await e.json().catch(()=>null);U(t?.error??`Could not discard the saved position.`),W(!0)}}catch(e){U(`Could not discard: `+C(e)),W(!0)}}},on=async()=>{try{let e=await(await fetch(`/plugins/signalk-questdb/api/migration/cancel`,{method:`POST`})).json().catch(()=>null);R(x(e)??L)}catch(e){U(`Could not cancel: `+C(e)),W(!0)}};n(()=>{if(L?.state!==`running`)return;let e=!1,t,n=async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/status`),n=await t.json().catch(()=>null),r=x(n);if(!e){if(r)R(r),H(le(n)??null);else if(t.ok){let e=le(n)??null;R(null),H(e),U(e?`The import stopped because the Signal K server restarted. It can be resumed from its saved position below.`:`The import stopped because the Signal K server restarted before a position was saved. Start it again — already-imported rows are not duplicated.`),W(!0)}}}catch{}e||(t=setTimeout(n,1e3))};return t=setTimeout(n,1e3),()=>{e=!0,clearTimeout(t)}},[L?.state]),n(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows`),{rows:n}=se(await t.json().catch(()=>null));!e&&t.ok&&Dt(n)}catch{}})(),()=>{e=!0}},[]);let sn=async()=>{if(B&&window.confirm(`Remove ${d(B)} rows imported under suffixed paths?\n\nThis rebuilds the string table without them, which can take a few minutes on a large database. Recording continues meanwhile. Run the import again afterwards to get these rows under their real paths.`)){kt(!0),U(``),W(!1);try{let e=await fetch(`/plugins/signalk-questdb/api/migration/legacy-rows/remove`,{method:`POST`}),t=await e.json().catch(()=>null);if(e.ok){let{rows:e,dropped:n}=se(t);Dt(0),U(`Removed ${d(e)} rows. Run the import again to get them under their real paths.`+(n>0?` ${d(n)} live samples could not be kept while the table was swapped.`:``)),n>0&&W(!0)}else U(t?.error??`Could not remove the rows.`),W(!0)}catch(e){U(`Could not remove the rows: `+C(e)),W(!0)}kt(!1)}};n(()=>{let e=!1;return(async()=>{try{let t=await(await fetch(`/plugins/signalk-questdb/api/migration/status`)).json().catch(()=>null),n=x(t);if(e)return;n&&R(n),H(le(t)??null)}catch{}})(),()=>{e=!0}},[]);let[Q,cn]=t(``),[ln,un]=t(``),[dn,fn]=t(`parquet`),[pn,mn]=t(!1),hn=()=>{let e=Number(Ae);if(Ae===``||!Number.isFinite(e)||e<500||e>3e5){U(`Write batch interval must be 500–300000 ms.`),W(!0);return}let t=Number(Me);Me===``||!Number.isFinite(t)||t<0?(U(`Unchanged-value heartbeat must be 0 or more seconds (0 = off).`),W(!0)):(o({...s,questdbHost:c,questdbIlpPort:u,questdbHttpPort:h,questdbPgPort:ne,questdbVersion:de,managedContainer:T,defaultSamplingRate:Oe,ilpFlushIntervalMs:e,unchangedHeartbeatSeconds:t,recordSelf:ge,recordOthers:ve,restoreOnStart:be,historySourcePolicyAll:we,enableConsole:Se,restoreMaxAgeMinutes:Ee,retentionDays:Pe,compression:Be,compressionLevel:He,networkName:We,exposeToContainers:E,pathFilter:{mode:Ie,paths:Re.split(`
|
|
5
|
-
`).map(e=>e.trim()).filter(Boolean)},samplingRates:s.samplingRates||{}}),U(`Saved! Plugin will restart with new configuration.`),W(!1))},gn=async()=>{if(!Q||!ln)U(`Set both from and to dates for export.`),W(!0);else{mn(!0),U(`Exporting ${dn.toUpperCase()}...`),W(!1);try{let e=`/plugins/signalk-questdb/api/export?from=${encodeURIComponent(Q)}&to=${encodeURIComponent(ln)}&format=${dn}`,t=await fetch(e);if(!t.ok){let e=await t.json().catch(()=>({error:t.statusText}));U(`Export failed: ${w(e.error,`unknown error`)}`),W(!0),mn(!1);return}let n=await t.blob(),r=dn===`parquet`?`parquet`:`csv`,i=document.createElement(`a`);i.href=URL.createObjectURL(n),i.download=`signalk-export-${Q.slice(0,10)}.${r}`,i.click(),URL.revokeObjectURL(i.href),U(`Exported ${(n.size/1024/1024).toFixed(1)} MB`)}catch(e){U(`Export failed: ${C(e)}`),W(!0)}mn(!1)}},_n=D&&D.status===`running`,vn=_n&&D.suspendedTables||[],yn=vn.length>0,bn=_n&&D.schemaMismatch||!1,$=_n&&D.ulimitClamp||null,xn=$!==null&&$.granted<=0,Sn=D?.hostMaxMapCount?.tooLow&&D.hostMaxMapCount||null;return e.createElement(`div`,{style:y.root},e.createElement(`div`,{style:y.sectionTitle},`QuestDB Status`),Sn&&e.createElement(`div`,{style:y.infoBanner},e.createElement(`div`,{style:y.warnBannerTitle},`Host vm.max_map_count is low — `,d(Sn.current),` `,`(QuestDB recommends `,d(Sn.recommended),`)`),`QuestDB memory-maps every partition and WAL segment it touches. As the database grows, this kernel limit can run out — mmap then fails with out-of-memory errors even though RAM is free, which shows up as slow or failing history queries, can suspend recording, and can take QuestDB down entirely. Run this in a shell on the host machine — not inside the QuestDB container, which can neither change the kernel-global limit nor has sudo (takes effect immediately, no restart needed):`,e.createElement(`code`,{style:y.warnBannerCode},`echo 'vm.max_map_count=${Sn.recommended}' | sudo tee /etc/sysctl.d/99-questdb.conf && sudo sysctl --system`)),Ze?e.createElement(`div`,{style:y.empty},`Checking QuestDB...`):_n?e.createElement(e.Fragment,null,yn&&e.createElement(`div`,{style:y.warnBanner},e.createElement(`div`,{style:y.warnBannerTitle},`QuestDB WAL suspended — recording stalled`),`Rows are arriving but no longer commit, so the counts below have stopped advancing. This follows an error while QuestDB applied the write-ahead log — see the reason reported per table below. Resuming replays every pending transaction, so no data is lost.`,e.createElement(`code`,{style:y.warnBannerCode},vn.map(e=>{let t=String(e.errorMessage||e.errorTag||`reason not reported`).replace(/[\r\n]+/g,` `),n=(q?.tables||[]).find(t=>t.name===e.name),r=n?.suspendedSince?` — frozen since ${n.suspendedSince}`:``;return`${e.name}: ${d(e.txnLag)} txns behind — ${t}${r}`}).join(`
|
|
6
|
-
`)),(q?.tables||[]).filter(e=>e.applyError).map(t=>e.createElement(`div`,{key:t.name,style:{marginTop:8,fontSize:12}},`QuestDB's own log reports the apply failure on`,` `,e.createElement(`code`,null,t.name),` as:`,e.createElement(`code`,{style:y.warnBannerCode},t.applyError))),e.createElement(`div`,{style:{marginTop:10}},e.createElement(v,{variant:`primary`,busy:zt,busyLabel:`Resuming...`,disabled:Wt,onClick:Zt},`Resume recording`)),vn.filter(e=>e.autoResume===`failed`).map(t=>{let n=(q?.tables||[]).find(e=>e.name===t.name);if(n?.partitionOpenFailure)return e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:y.warnBannerTitle},t.name,`: table data damaged — automatic repair not possible`),`QuestDB fails while opening this table's stored data, before it reaches any pending transaction. That means the commit record on disk describes rows whose data never made it to storage — the signature of a power loss during a write. Skipping transactions cannot fix this (the failure happens before them) and would discard the `,d(t.txnLag),` pending transactions for nothing, so no repair button is offered. Recovering this table means repairing its commit record by hand; please open an issue with the error above. Recording continues into the other tables, and “Resume recording” will re-suspend this one within milliseconds — it is safe to press, but it cannot repair this damage.`);let r=n?.skipPlan;return r?e.createElement(`div`,{key:t.name,style:{marginTop:12}},e.createElement(`div`,{style:y.warnBannerTitle},t.name,`: automatic resume failed — WAL segment unreadable`),`A lossless resume was attempted and the table re-suspended at the same transaction: the write-ahead-log segment at the stall point cannot be read back (typically corrupted by an unclean shutdown mid-write). Replaying can never get past it. The only repair is to skip the unreadable segment, losing`,` `,e.createElement(`b`,null,d(r.skippedTxns),` transaction(s)`),` `,`recorded between `,e.createElement(`b`,null,r.skipWindowStart),` and`,` `,e.createElement(`b`,null,r.skipWindowEnd),r.tailSkip?` — and this is the newest pending segment, so skipping it drops the ENTIRE pending backlog`:` — everything after the skipped segment (${d(Math.max(0,t.txnLag-r.skippedTxns))} txns) is replayed without loss`,`.`,e.createElement(`div`,{style:{marginTop:8}},e.createElement(v,{variant:`danger`,busy:Wt,busyLabel:`Skipping...`,disabled:zt||Ut,onClick:()=>qt(t.name,r)},`Skip unreadable segment (loses data)`),Ut&&e.createElement(`div`,{style:{marginTop:6,fontSize:12}},`The diagnosis could not be refreshed — the numbers above may be stale. The skip re-enables once a refresh succeeds.`))):null}),e.createElement(`div`,{style:{marginTop:8,fontSize:12}},`Manual fallback in the QuestDB SQL console (`,e.createElement(`code`,null,`:9000`),`), one statement at a time — avoid running it from several tabs, the console retries a busy statement forever:`,e.createElement(`code`,{style:y.warnBannerCode},vn.map(e=>{let t=`"${String(e.name).replace(/"/g,`""`)}"`,n=(q?.tables||[]).find(t=>t.name===e.name),r=[`ALTER TABLE ${t} RESUME WAL;`];return e.autoResume===`failed`&&n?.skipPlan&&!Ut&&r.push(`-- if the resume re-suspends: skip the unreadable segment (loses ${d(n.skipPlan.skippedTxns)} txns)`,`ALTER TABLE ${t} RESUME WAL FROM TXN ${n.skipPlan.skipToTxn};`),r.join(`
|
|
7
|
-
`)}).join(`
|
|
8
|
-
`)))),Vt&&e.createElement(`div`,{style:y.infoBanner},Vt),bn&&e.createElement(`div`,{style:y.warnBanner},e.createElement(`div`,{style:y.warnBannerTitle},`QuestDB table schema mismatch — data not readable`),`A QuestDB table was re-created by ILP ingestion with the wrong timestamp column, so rows are being stored but reads filtering on time (history, Grafana, and the counts above) return nothing. The plugin rebuilds the affected table with the correct schema automatically within a minute; if this persists, restart the plugin. (The few rows written into the wrong-schema table are lost — they were unreadable anyway.)`),$&&e.createElement(`div`,{style:y.infoBanner},e.createElement(`div`,{style:y.warnBannerTitle},xn?`QuestDB open-files request rejected by the host`:`QuestDB open-files limit capped by the host`),xn?e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,$.ulimit),` limit of`,` `,d($.requested),`, but the container host rejected it, so QuestDB is running with the runtime's default limits. This is typical for podman machine on macOS, where the limits live inside the VM and cannot be read from here. Raise the limits of the service that runs the container runtime (on macOS: inside the VM, via`,` `,e.createElement(`code`,null,`podman machine ssh`),`), then remove the container once with `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` and restart Signal K — a restart alone cannot re-grant a rejected ask.`):e.createElement(e.Fragment,null,`QuestDB requested a `,e.createElement(`code`,null,$.ulimit),` limit of`,` `,d($.requested),`, but this host only allows `,d($.granted),`, so it was capped. QuestDB is running on the lower limit. To grant the full value, raise the host limit for the user running the container runtime — under rootless Podman that means a systemd`,` `,e.createElement(`code`,null,`user@.service`),` `,e.createElement(`code`,null,`LimitNOFILE`),` drop-in (editing `,e.createElement(`code`,null,`/etc/security/limits.conf`),` alone is usually not enough) — then restart the Signal K server so the plugin can re-create the QuestDB container with the raised limit (signalk-container 1.25.3+; on older versions remove the container once with`,` `,e.createElement(`code`,null,`podman rm -f sk-signalk-questdb`),` instead).`),` `,`This warning clears itself once the container is running with the full value.`,` `,e.createElement(`a`,{href:xn?`https://github.com/dirkwa/signalk-questdb#questdb-container-never-starts-on-macos-podman-machine`:`https://github.com/dirkwa/signalk-container#raising-the-open-files-limit-nofile`,target:`_blank`,rel:`noreferrer`,style:{color:`#92400e`,textDecoration:`underline`}},`Step-by-step instructions`),`.`),e.createElement(ee,{icon:`Q`,iconBackground:`#7c3aed`,iconColor:`#fff`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,D?.endpoint||`${c}:${h}`,` `,`· `,yn?`WAL suspended`:`Recording`),state:yn?`error`:`ok`,stateTitle:yn?`WAL suspended`:`Running`}),e.createElement(`div`,{style:y.statsGrid},e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},d(D.totalRows)),e.createElement(`div`,{style:y.statLabel},`Total Rows`)),e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},d(D.activePathsToday)),e.createElement(`div`,{style:y.statLabel},`Active Paths Today`)),D.restore&&e.createElement(`div`,{style:y.statCard},e.createElement(`div`,{style:y.statValue},D.restore.failed?`—`:d(D.restore.contexts)),e.createElement(`div`,{style:y.statLabel},D.restore.failed?`Restore failed`:`Vessels Restored`))),e.createElement(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:12}},G&&G.updateAvailable?e.createElement(e.Fragment,null,e.createElement(`span`,{style:{fontSize:13}},`v`,G.currentVersion,` →`,` `,e.createElement(`strong`,null,`v`,G.latestVersion),` available`),e.createElement(v,{variant:`primary`,busy:Ft,busyLabel:`Updating...`,onClick:Yt,style:fe},`Update QuestDB`)):G&&!G.updateAvailable?e.createElement(`span`,{style:{fontSize:12,color:`#888`}},`v`,G.currentVersion,` (up to date)`):e.createElement(v,{variant:`secondary`,busy:Nt,busyLabel:`Checking...`,onClick:Jt,style:fe},`Check for updates`))):e.createElement(ee,{icon:`Q`,title:`QuestDB`,meta:e.createElement(e.Fragment,null,D?.status===`unhealthy`?`Not responding`:`Not running`,T?` — enable plugin to start container`:``),state:`error`}),e.createElement(`div`,{style:y.sectionTitle},`Image Version`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB version`),e.createElement(re,{value:de,onChange:me,versions:qe,loading:Ye,onRefresh:()=>void Xe(),error:Je,stableCount:3,preCount:2})),e.createElement(`div`,{style:y.sectionTitle},`Connection`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Managed container`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:T,onChange:e=>he(e.target.checked)}),e.createElement(`span`,{style:y.hint},T?`signalk-container manages QuestDB`:`Connect to external QuestDB`)),!T&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB host`),e.createElement(`input`,{style:y.input,value:c,onChange:e=>l(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`HTTP port (queries)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:h,onChange:e=>_(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ILP port (writes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))}))),T&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Bind to 0.0.0.0`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:E,onChange:e=>Ke(e.target.checked)}),e.createElement(`span`,{style:{...y.hint,color:E?`#ef4444`:void 0}},E?`Caution! This exposes your data to the network`:`Signal K reaches QuestDB automatically — only enable to reach it from another machine or a separate-Docker Grafana`)),T&&E&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`HTTP port (queries)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:h,onChange:e=>_(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ILP port (writes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:u,onChange:e=>m(Number(e.target.value))})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`PostgreSQL wire port`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:ne,onChange:e=>b(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`for Grafana`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Container network`),e.createElement(`input`,{style:y.input,value:We,onChange:e=>Ge(e.target.value)}),e.createElement(`span`,{style:y.hint},`shared with signalk-grafana`))),e.createElement(`div`,{style:y.sectionTitle},`Recording`),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Default sampling rate (ms)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:Oe,onChange:e=>ke(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`1000 = max 1 write/sec per path (0 = every update)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Unchanged-value heartbeat (s)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:0,"aria-label":`Unchanged-value heartbeat in seconds`,value:Me,onChange:e=>Ne(e.target.value)}),e.createElement(`span`,{style:y.hint},`a value that has not changed is written once per this many seconds; changes are written at the sampling rate (default 300, 0 = every sample)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Write batch interval (ms)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:500,max:3e5,"aria-label":`Write batch interval in milliseconds`,value:Ae,onChange:e=>je(e.target.value)}),e.createElement(`span`,{style:y.hint},`one QuestDB transaction per table per interval; longer = bigger batches, but up to this many ms lost on a hard crash (default 5000)`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Record own vessel`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:ge,onChange:e=>_e(e.target.checked)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Record AIS targets`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,checked:ve,onChange:e=>ye(e.target.checked)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Restore vessels on startup`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`Restore vessels on startup`,checked:be,onChange:e=>xe(e.target.checked)}),e.createElement(`span`,{style:y.hint},`replay each vessel's last recorded position after a restart, so AIS targets appear at once instead of only when they next transmit`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Allow sourcePolicy=all`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`Allow sourcePolicy=all in the History API`,checked:we,onChange:e=>Te(e.target.checked)}),e.createElement(`span`,{style:y.hint},`let History API callers split a path into one column per recording source. Off by default: a path recorded by four receivers becomes four queries and four columns, which is markedly more work on a Pi-class host. Requests that name a source explicitly are unaffected`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`QuestDB console webapp`),e.createElement(`input`,{type:`checkbox`,style:y.checkbox,"aria-label":`QuestDB console webapp`,checked:Se,onChange:e=>Ce(e.target.checked)}),e.createElement(`span`,{style:y.hint},`serve QuestDB's own console inside the Signal K admin UI (admin only). It is a full SQL client — unlike the read-only query endpoint it can modify and delete recorded data`)),be&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Restore max age (minutes)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:1,"aria-label":`Restore max age (minutes)`,value:Ee,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&t>=1&&De(t)}}),e.createElement(`span`,{style:y.hint},`only replay values this recent (default 9, matching Freeboard's AIS expiry); higher puts staler positions on the chart`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Retention (days)`),e.createElement(`input`,{style:y.inputSmall,type:`number`,value:Pe,onChange:e=>Fe(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`0 = keep forever`)),e.createElement(g,{title:`Path filtering`,defaultOpen:Re.trim()!==``},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Filter mode`),e.createElement(`select`,{style:y.select,value:Ie,onChange:e=>Le(e.target.value===`include`?`include`:`exclude`)},e.createElement(`option`,{value:`exclude`},`Exclude matching paths`),e.createElement(`option`,{value:`include`},`Include only matching paths`))),e.createElement(`div`,{style:{marginBottom:10}},e.createElement(`div`,{style:{...y.label,width:`auto`,marginBottom:6}},`Path patterns (one per line, glob supported) — optional`),e.createElement(`textarea`,{style:y.textarea,value:Re,onChange:e=>ze(e.target.value),placeholder:`notifications.*
|
|
9
|
-
environment.wind.*`}),e.createElement(`div`,{style:y.fieldHelp},`Empty = record everything (the default). Nothing is filtered out unless you list a pattern here.`),e.createElement(`div`,{style:{...y.hint,marginLeft:0}},Ie===`exclude`?`These paths are NOT recorded; everything else is.`:`ONLY these paths are recorded; everything else is dropped.`))),e.createElement(g,{title:`Compression (on-disk)`},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Compression codec`),e.createElement(`select`,{style:y.select,value:Be,onChange:e=>Ve(pe(e.target.value))},e.createElement(`option`,{value:`none`},`None`),e.createElement(`option`,{value:`lz4`},`LZ4 (fast)`),e.createElement(`option`,{value:`zstd`},`ZSTD (smaller)`)),e.createElement(`span`,{style:y.hint},`applies to new data after save`)),Be===`zstd`&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`ZSTD level`),e.createElement(`input`,{style:y.inputSmall,type:`number`,min:`1`,max:`22`,value:He,onChange:e=>Ue(Number(e.target.value))}),e.createElement(`span`,{style:y.hint},`1 (fast) to 22 (smallest)`))),e.createElement(g,{title:`InfluxDB Migration`},B!==null&&B>0&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,d(B),` rows from an earlier import`),` `,`sit under paths nothing reads`),e.createElement(`div`,{style:y.fieldHelp},`Imports made before 2.1.5 from a signalk-to-influxdb 1.x database filed strings, booleans and positions under paths ending in`,` `,e.createElement(`code`,null,`.stringValue`),`, `,e.createElement(`code`,null,`.boolValue`),` or`,` `,e.createElement(`code`,null,`.jsonValue`),`. Removing them rebuilds the string table without them; run the import again afterwards and they land under their real paths.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`danger`,busy:Ot,busyLabel:`Removing...`,disabled:L?.state===`running`,onClick:sn},`Remove these rows`))),V&&L?.state!==`running`&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`,marginBottom:12}},e.createElement(`div`,null,e.createElement(`strong`,null,`An import was interrupted`),` — ${V.bucket} from ${V.url}`),e.createElement(`div`,{style:y.cardMeta},S(V.from),` to`,` `,S(V.to),`.`,` `,V.measurementsDone,` measurements finished`,V.measurement?`, stopped in ${V.measurement}`+(V.windowStart?` at ${S(V.windowStart)}`:``):``,`. Position saved `,S(V.updatedAt),`.`),e.createElement(`div`,{style:y.fieldHelp},`Resuming continues from the saved position; rows already imported are not duplicated. If InfluxDB needs credentials, select the instance and enter them first — they are never stored.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`primary`,busy:Et,busyLabel:`Resuming...`,onClick:rn},`Resume import`),e.createElement(v,{variant:`danger`,onClick:an},`Discard saved position`))),e.createElement(`div`,{style:{display:`flex`,gap:10,alignItems:`center`,marginBottom:10}},e.createElement(v,{variant:`primary`,busy:$e,busyLabel:`Detecting...`,onClick:Qt},`Detect InfluxDB`),e.createElement(`span`,{style:y.hint},`Checks localhost:8086 for InfluxDB 1.x and 2.x`)),k&&k.length>0&&e.createElement(`div`,null,k.map((t,n)=>{let r=j?.url===t.url&&j?.type===t.type,i=()=>{nt(t),ft(null),N(``),pt(null),it(``),ot(``),ct(``),ut(``),t.type!==`influxdb2`&&$t(t,{token:void 0,org:void 0,username:void 0,password:void 0})};return e.createElement(`div`,{key:n,role:`button`,tabIndex:0,"aria-pressed":r,style:{...y.migrationItem,cursor:`pointer`,outline:r?`2px solid #22adf6`:void 0},onClick:i,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i())}},e.createElement(`div`,{style:{...y.cardIcon,width:36,height:36,fontSize:16,background:t.type===`influxdb2`?`#020a47`:`#22adf6`,color:`#fff`}},t.type===`influxdb2`?`2`:`1`),e.createElement(`div`,{style:y.cardInfo},e.createElement(`div`,{style:y.cardTitle},`InfluxDB `,t.type===`influxdb2`?`2.x`:`1.x`,e.createElement(`span`,{style:{...y.tag,...y.tagLatest}},t.status)),e.createElement(`div`,{style:y.cardMeta},t.url,` · v`,t.version)),e.createElement(`div`,{style:y.cardMeta},r?`selected`:`click to select`))})),e.createElement(`div`,{style:{...y.fieldRow,marginTop:10}},e.createElement(`span`,{style:y.label},`Manual InfluxDB URL`),e.createElement(`input`,{style:y.input,placeholder:`http://192.168.1.100:8086`,"aria-label":`Manual InfluxDB URL`,value:A,onChange:e=>tt(e.target.value)}),e.createElement(`span`,{style:y.hint},`for remote instances`)),k&&k.length===0&&!$e&&e.createElement(`div`,{style:{...y.empty,padding:`16px`,textAlign:`left`}},`No InfluxDB found on localhost. Use manual URL above for remote instances.`),j&&e.createElement(`div`,{style:{marginTop:14}},e.createElement(`div`,{style:y.fieldHelp},j.type===`influxdb2`?`InfluxDB 2.x needs an API token with read access to the bucket, and the organisation name.`:`InfluxDB 1.x needs a username and password only if the server has authentication enabled.`),j.type===`influxdb2`?e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`API token`),e.createElement(`input`,{style:y.input,type:`password`,"aria-label":`InfluxDB API token`,value:rt,onChange:e=>it(e.target.value)}),e.createElement(`span`,{style:y.hint},`not stored`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Organisation`),e.createElement(`input`,{style:y.input,"aria-label":`InfluxDB organisation`,value:at,onChange:e=>ot(e.target.value)}))):e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Username`),e.createElement(`input`,{style:y.input,"aria-label":`InfluxDB username`,value:st,onChange:e=>ct(e.target.value)}),e.createElement(`span`,{style:y.hint},`blank if auth is off`)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Password`),e.createElement(`input`,{style:y.input,type:`password`,"aria-label":`InfluxDB password`,value:lt,onChange:e=>ut(e.target.value)}),e.createElement(`span`,{style:y.hint},`not stored`))),e.createElement(`div`,{style:{...y.fieldRow,marginTop:4}},e.createElement(`span`,{style:y.label}),e.createElement(v,{busy:mt,busyLabel:`Loading...`,onClick:()=>void $t(j)},j.type===`influxdb2`?`List buckets`:`List databases`)),dt&&dt.length>0&&e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},j.type===`influxdb2`?`Bucket`:`Database`),e.createElement(`select`,{style:y.select,"aria-label":`InfluxDB bucket or database to import from`,value:M,onChange:e=>{N(e.target.value),pt(null)}},e.createElement(`option`,{value:``},`Select...`),dt.map(t=>e.createElement(`option`,{key:t.name,value:t.name},t.name))),e.createElement(v,{busy:mt,busyLabel:`...`,onClick:()=>void tn()},`Preview paths`)),ht&&e.createElement(`div`,{style:y.fieldHelp},`Listing the vessels in the bucket... On a large bucket this takes a while; the import waits for it.`),I&&I.contexts.length>0&&e.createElement(e.Fragment,null,e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Your vessel`),e.createElement(`select`,{style:y.select,"aria-label":`Which vessel in the source is this one`,value:vt,onChange:e=>yt(e.target.value)},I.contexts.length>1&&e.createElement(`option`,{value:``},`Select...`),I.contexts.map(t=>e.createElement(`option`,{key:t,value:t},t,t===I.self?I.selfBy===`tag`?` (recorded as the own vessel)`:` (this server)`:``)))),I.contexts.length>1&&e.createElement(e.Fragment,null,!I.self&&e.createElement(`div`,{style:y.fieldHelp},`The source holds `,I.contexts.length,` `,`vessels, does not say which was its own, and none of them is this server's identity. Pick the one the recording server used for this boat; its history is imported as this vessel.`),e.createElement(`label`,{style:{...y.fieldHelp,display:`block`}},e.createElement(`input`,{type:`checkbox`,checked:bt,onChange:e=>xt(e.target.checked)}),` `,`Also import the other vessels (AIS targets), each under its own context`))),P&&e.createElement(`div`,{style:y.fieldHelp},P.length,` measurement`,P.length===1?``:`s`,` found`,P.length>0&&e.createElement(e.Fragment,null,` `,`— e.g.`,` `,P.slice(0,3).map(e=>e.name).join(`, `),P.length>3?`, ...`:``)),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`From`),e.createElement(`input`,{style:y.input,type:`datetime-local`,"aria-label":`Import range start`,value:St,onChange:e=>Ct(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`To`),e.createElement(`input`,{style:y.input,type:`datetime-local`,"aria-label":`Import range end`,value:wt,onChange:e=>Tt(e.target.value)})),e.createElement(`div`,{style:y.fieldHelp},`Imported rows are tagged `,e.createElement(`code`,null,`source=influxdb-import`),` and written with their original timestamps, so re-running the same range overwrites rather than duplicating.`),e.createElement(`div`,{style:{...y.migrationActions,marginTop:10}},e.createElement(v,{variant:`primary`,busy:Et,busyLabel:`Starting...`,disabled:!M||!St||!wt||ht||(I?.contexts.length??0)>1&&!vt||L?.state===`running`,onClick:nn},`Start import`),L?.state===`running`&&e.createElement(v,{variant:`danger`,onClick:on},`Cancel`))),L&&e.createElement(`div`,{style:{...y.empty,padding:`12px`,textAlign:`left`}},e.createElement(`div`,null,e.createElement(`strong`,null,L.state===`running`?`Importing`:L.state===`done`?`Import complete`:L.state===`cancelled`?`Import cancelled`:`Import failed`),L.bucket?` from ${L.bucket}`:``),L.resumedFrom&&e.createElement(`div`,{style:y.cardMeta},`Resumed`,L.resumedFrom.measurement?` in ${L.resumedFrom.measurement}`+(L.resumedFrom.windowStart?` at ${S(L.resumedFrom.windowStart)}`:``):` from the saved position`,`; the totals include the earlier run.`),e.createElement(`div`,{style:y.cardMeta},d(L.progress.written),` written,`,` `,d(L.progress.skipped),` skipped,`,` `,L.progress.measurementsDone,`/`,L.progress.measurementsTotal,` measurements`,L.progress.currentMeasurement?` — ${L.progress.currentMeasurement}`:``),L.error&&e.createElement(`div`,{style:{...y.cardMeta,color:`#b91c1c`}},L.error))),e.createElement(g,{title:`Data Export`},e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`From`),e.createElement(`input`,{style:y.input,type:`datetime-local`,value:Q,onChange:e=>cn(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`To`),e.createElement(`input`,{style:y.input,type:`datetime-local`,value:ln,onChange:e=>un(e.target.value)})),e.createElement(`div`,{style:y.fieldRow},e.createElement(`span`,{style:y.label},`Format`),e.createElement(`select`,{style:y.select,value:dn,onChange:e=>fn(e.target.value)},e.createElement(`option`,{value:`parquet`},`Parquet`),e.createElement(`option`,{value:`csv`},`CSV`))),e.createElement(v,{variant:`primary`,busy:pn,busyLabel:`Exporting...`,onClick:gn},`Export Data`)),s.managedContainer!==!1&&e.createElement(g,{title:`Danger zone`},e.createElement(`div`,{style:{fontSize:13,color:`#555`,marginBottom:10}},`Remove the QuestDB container and permanently delete all recorded data. Use this to fully reset QuestDB — Signal K's plugin-uninstall cannot delete this data on rootless Podman. This cannot be undone.`),e.createElement(v,{variant:`danger`,busy:Lt,busyLabel:`Removing...`,onClick:Xt},`Remove container & all data`)),e.createElement(te,{message:At,error:jt,style:{marginTop:16}}),e.createElement(`div`,{style:{marginTop:24}},e.createElement(v,{onClick:hn},`Save Configuration`)))}export{me as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./utils-BRGuweMc.js";({...e.global});var t=e.share;e.utils;export{t};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./vite-preload-helper-CRzLMJPS.js";var t=`FEDERATION_DEBUG`,n={AT:`@`,HYPHEN:`-`,SLASH:`/`},r={[n.AT]:`scope_`,[n.HYPHEN]:`_`,[n.SLASH]:`__`};r[n.AT],n.AT,r[n.HYPHEN],n.HYPHEN,r[n.SLASH],n.SLASH;var i=function(e){return e[e.UNKNOWN=1]=`UNKNOWN`,e[e.CALCULATED=2]=`CALCULATED`,e[e.NO_USE=0]=`NO_USE`,e}({});function a(){return!0}function o(){return typeof navigator<`u`&&navigator?.product===`ReactNative`}function s(){try{if(a()&&window.localStorage)return!!localStorage.getItem(t)}catch{return!1}return!1}function c(){return typeof process<`u`&&{}.FEDERATION_DEBUG?!!{}.FEDERATION_DEBUG:typeof FEDERATION_DEBUG<`u`&&FEDERATION_DEBUG?!0:s()}var l=`[ Federation Runtime ]`,u=function(...e){return e.length?e.reduce((e,t)=>t?e?`${e}:${t}`:t:e,``):``};function d(e,t){if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}return`publicPath`in e?!a()&&!o()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`:(console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``)}var f=e=>{console.warn(`${l}: ${e}`)};function p(e){try{return JSON.stringify(e,null,2)}catch{return``}}var m=(e,t)=>{if(!e)return t;let n=(e=>{if(e===`.`)return``;if(e.startsWith(`./`))return e.replace(`./`,``);if(e.startsWith(`/`)){let t=e.slice(1);return t.endsWith(`/`)?t.slice(0,-1):t}return e})(e);return n?n.endsWith(`/`)?`${n}${t}`:`${n}/${t}`:t};function ee(e){return e.replace(/#.*$/,``).replace(/\?.*$/,``).replace(/\/[^\/]+$/,`/`)}function h(e,t={}){let{remotes:n={},overrides:r={},version:i}=t,a,o=()=>`publicPath`in e.metaData?(e.metaData.publicPath===`auto`||e.metaData.publicPath===``)&&i?ee(i):e.metaData.publicPath:e.metaData.getPublicPath,s=Object.keys(r),c={};Object.keys(n).length||(c=e.remotes?.reduce((e,t)=>{let n,i=t.federationContainerName;return n=s.includes(i)?r[i]:`version`in t?t.version:t.entry,e[i]={matchedVersion:n},e},{})||{}),Object.keys(n).forEach(e=>c[e]={matchedVersion:s.includes(e)?r[e]:n[e]});let{remoteEntry:{path:l,name:u,type:d},types:f={path:``,name:``,zip:``,api:``},buildInfo:{buildVersion:p},globalName:h,ssrRemoteEntry:g}=e.metaData,{exposes:te}=e,_={version:i||``,buildVersion:p,globalName:h,remoteEntry:m(l,u),remoteEntryType:d,remoteTypes:m(f.path,f.name),remoteTypesZip:f.zip||``,remoteTypesAPI:f.api||``,remotesInfo:c,shared:e?.shared.map(e=>({assets:e.assets,sharedName:e.name,version:e.version,usedExports:e.referenceExports||[]})),modules:te?.map(e=>({moduleName:e.name,modulePath:e.path,assets:e.assets}))};if(`publicPath`in e.metaData?(a={..._,publicPath:o()},typeof e.metaData.ssrPublicPath==`string`&&(a.ssrPublicPath=e.metaData.ssrPublicPath)):a={..._,getPublicPath:o()},g){let e=m(g.path,g.name);a.ssrRemoteEntry=e,a.ssrRemoteEntryType=g.type||`commonjs-module`}return a}function g(e){return!!(`remoteEntry`in e&&e.remoteEntry.includes(`.json`))}var te=`[ Module Federation ]`,_=console,ne=[`logger.ts`,`logger.js`,`captureStackTrace`,`Logger.emit`,`Logger.log`,`Logger.info`,`Logger.warn`,`Logger.error`,`Logger.debug`];function re(){try{let e=Error().stack;if(!e)return;let[,...t]=e.split(`
|
|
2
|
-
`),n=t.filter(e=>!ne.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
3
|
-
`)}`:void 0}catch{return}}var ie=class{constructor(e,t=_){this.prefix=e,this.delegate=t??_}setPrefix(e){this.prefix=e}setDelegate(e){this.delegate=e??_}emit(e,t){let n=this.delegate,r=c()?re():void 0,i=r?[...t,r]:t,a=(()=>{switch(e){case`log`:return[`log`,`info`];case`info`:return[`info`,`log`];case`warn`:return[`warn`,`info`,`log`];case`error`:return[`error`,`warn`,`log`];default:return[`debug`,`log`]}})();for(let e of a){let t=n[e];if(typeof t==`function`){t.call(n,this.prefix,...i);return}}for(let e of a){let t=_[e];if(typeof t==`function`){t.call(_,this.prefix,...i);return}}}log(...e){this.emit(`log`,e)}warn(...e){this.emit(`warn`,e)}error(...e){this.emit(`error`,e)}success(...e){this.emit(`info`,e)}info(...e){this.emit(`info`,e)}ready(...e){this.emit(`info`,e)}debug(...e){c()&&this.emit(`debug`,e)}};function ae(e){return new ie(e)}function oe(e){let t=new ie(e);return Object.defineProperty(t,"__mf_infrastructure_logger__",{value:!0,enumerable:!1,configurable:!1}),t}ae(te),oe(te);async function se(e,t){try{return await e()}catch(e){!t&&f(e);return}}function ce(e,t){let n=/^(https?:)?\/\//i;return e.replace(n,``).replace(/\/$/,``)===t.replace(n,``).replace(/\/$/,``)}function le(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`script`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`src`);if(o&&ce(o,e.url)){t=i,n=!1;break}}if(!t){let n=e.attrs;t=document.createElement(`script`),t.type=n?.type===`module`?`module`:`text/javascript`;let i;e.createScriptHook&&(i=e.createScriptHook(e.url,e.attrs),i instanceof HTMLScriptElement?t=i:typeof i==`object`&&(`script`in i&&i.script&&(t=i.script),`timeout`in i&&i.timeout&&(r=i.timeout))),t.src||(t.src=e.url),n&&!i&&Object.keys(n).forEach(e=>{t&&(e===`async`||e===`defer`?t[e]=n[e]:t.getAttribute(e)||t.setAttribute(e,n[e]))})}let o=null,s=typeof window<`u`?t=>{if(t.filename&&ce(t.filename,e.url)){let n=Error(`ScriptExecutionError: Script "${e.url}" loaded but threw a runtime error during execution: ${t.message} (${t.filename}:${t.lineno}:${t.colno})`);n.name=`ScriptExecutionError`,o=n}}:null;s&&window.addEventListener(`error`,s);let c=async(n,r)=>{clearTimeout(i),s&&window.removeEventListener(`error`,s);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`ScriptNetworkError: Script "${e.url}" timed out.`:`ScriptNetworkError: Failed to load script "${e.url}" - the script URL is unreachable or the server returned an error (network failure, 404, CORS, etc.)`);t.name=`ScriptNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else o?e?.onErrorCallback&&e?.onErrorCallback(o):e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteScript:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n&&typeof n==`function`)){let e=n(r);if(e instanceof Promise){let t=await e;return a(),t}return a(),e}a()};return t.onerror=c.bind(null,t.onerror),t.onload=c.bind(null,t.onload),i=setTimeout(()=>{c(null,{type:`error`,isTimeout:!0})},r),{script:t,needAttach:n}}function ue(e){let t=null,n=!0,r=2e4,i,a=document.getElementsByTagName(`link`);for(let r=0;r<a.length;r++){let i=a[r],o=i.getAttribute(`href`),s=i.getAttribute(`rel`);if(o&&ce(o,e.url)&&s===e.attrs.rel){t=i,n=!1;break}}if(!t){t=document.createElement(`link`),t.setAttribute(`href`,e.url);let n,i=!0,a=e.attrs;e.createLinkHook&&(n=e.createLinkHook(e.url,a),n instanceof HTMLLinkElement?(t=n,i=!1):typeof n==`object`&&(`link`in n&&n.link&&(t=n.link,i=!1),`timeout`in n&&n.timeout&&(r=n.timeout))),a&&i&&Object.keys(a).forEach(e=>{t&&!t.getAttribute(e)&&t.setAttribute(e,a[e])})}if(!n)return Promise.resolve().then(()=>{e?.cb&&e?.cb()}),{link:t,needAttach:n};let o=(n,r)=>{i&&clearTimeout(i);let a=()=>{if(r?.type===`error`){let t=Error(r?.isTimeout?`LinkNetworkError: Link "${e.url}" timed out.`:`LinkNetworkError: Failed to load link "${e.url}" - the URL is unreachable or the server returned an error.`);t.name=`LinkNetworkError`,e?.onErrorCallback&&e?.onErrorCallback(t)}else e?.cb&&e?.cb()};if(t&&(t.onerror=null,t.onload=null,se(()=>{let{needDeleteLink:n=!0}=e;n&&t?.parentNode&&t.parentNode.removeChild(t)}),n)){let e=n(r);return a(),e}a()};return t.onerror=o.bind(null,t.onerror),t.onload=o.bind(null,t.onload),i=setTimeout(()=>{o(null,{type:`error`,isTimeout:!0})},r),{link:t,needAttach:n}}function de(e,t){let{attrs:n={},createScriptHook:r}=t;return new Promise((t,i)=>{let{script:a,needAttach:o}=le({url:e,cb:t,onErrorCallback:i,attrs:{fetchpriority:`high`,...n},createScriptHook:r,needDeleteScript:!0});o&&document.head.appendChild(a)})}var fe=e=>`View the docs to see how to solve: https://module-federation.io/guide/troubleshooting/${e.split(`-`)[0].toLowerCase()}#${e.toLowerCase()}`,pe=(e,t,n,r)=>{let i=[`${[t[e]]} #${e}`];return n&&i.push(`args: ${JSON.stringify(n)}`),i.push(fe(e)),r&&i.push(`Original Error Message:\n ${r}`),i.join(`
|
|
4
|
-
`)};function me(e,t,n,r,i,a){return r(pe(e,t,n,i))}var v=`[ Federation Runtime ]`,he=ae(v);function y(e,t,n,r,i){e||(n===void 0?b(t):b(t,n,r,void 0,i))}function b(e,t,n,r,i){if(t!==void 0)return me(e,t,n??{},e=>{throw Error(`${v}: ${e}`)},r,i);let a=e;throw a instanceof Error?(a.message.startsWith(v)||(a.message=`${v}: ${a.message}`),a):Error(`${v}: ${a}`)}function x(e){e instanceof Error&&(e.message.startsWith(v)||(e.message=`${v}: ${e.message}`)),he.warn(e)}function ge(e,t){return e.findIndex(e=>e===t)===-1&&e.push(t),e}function S(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function _e(e){return e.entry!==void 0}function ve(e){return!e.entry.includes(`.json`)}function ye(e){return e&&typeof e==`object`}var be=Object.prototype.toString;function xe(e){return be.call(e)===`[object Object]`}function Se(e){return Array.isArray(e)?e:[e]}function Ce(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var we=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},Te=2e3,C=typeof globalThis==`object`?globalThis:window,w=(()=>{try{return document.defaultView}catch{return C}})(),T=w;function Ee(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!1,writable:!0})}function De(e,t){return Object.hasOwnProperty.call(e,t)}De(C,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||Ee(C,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var E=C.__GLOBAL_LOADING_REMOTE_ENTRY__;function Oe(e){De(e,`__VMOK__`)&&!De(e,`__FEDERATION__`)&&Ee(e,`__FEDERATION__`,e.__VMOK__),De(e,`__FEDERATION__`)||(Ee(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map,__PRELOADED_ASSETS__:new Set}),Ee(e,`__VMOK__`,e.__FEDERATION__)),e.__FEDERATION__.__GLOBAL_PLUGIN__??=[],e.__FEDERATION__.__INSTANCES__??=[],e.__FEDERATION__.moduleInfo??={},e.__FEDERATION__.__SHARE__??={},e.__FEDERATION__.__MANIFEST_LOADING__??={},e.__FEDERATION__.__PRELOADED_MAP__??=new Map,e.__FEDERATION__.__PRELOADED_ASSETS__??=new Set}Oe(C),Oe(w);function ke(){C.__FEDERATION__.__GLOBAL_PLUGIN__=[],C.__FEDERATION__.__INSTANCES__=[],C.__FEDERATION__.moduleInfo={},C.__FEDERATION__.__SHARE__={},C.__FEDERATION__.__MANIFEST_LOADING__={},C.__FEDERATION__.__PRELOADED_ASSETS__.clear(),Object.keys(E).forEach(e=>{delete E[e]})}function Ae(e){C.__FEDERATION__.__INSTANCES__.push(e)}function je(){return C.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Me(e,t=c()){t&&(C.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,C.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.9.2`)}function D(e,t){if(typeof t==`string`){if(e[t])return{value:e[t],key:t};{let n=Object.keys(e);for(let r of n){let[n,i]=r.split(`:`),a=`${n}:${t}`,o=e[a];if(o)return{value:o,key:a}}return{value:void 0,key:t}}}b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var Ne=()=>w.__FEDERATION__.moduleInfo,Pe=(e,t)=>{let n=D(t,S(e)).value;if(n&&!n.version&&`version`in e&&e.version&&(n.version=e.version),n)return n;if(`version`in e&&e.version){let{version:t,...n}=e,r=S(n),i=D(w.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},O=e=>Pe(e,w.__FEDERATION__.moduleInfo),Fe=(e,t)=>{let n=S(e);return w.__FEDERATION__.moduleInfo[n]=t,w.__FEDERATION__.moduleInfo},Ie=e=>(w.__FEDERATION__.moduleInfo={...w.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete w.__FEDERATION__.moduleInfo[e]}),Le=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:C[n]}},Re=e=>{let{__GLOBAL_PLUGIN__:t}=w.__FEDERATION__;e.forEach(e=>{t.findIndex(t=>t.name===e.name)===-1?t.push(e):x(`The plugin ${e.name} has been registered.`)})},ze=()=>w.__FEDERATION__.__GLOBAL_PLUGIN__,Be=e=>C.__FEDERATION__.__PRELOADED_MAP__.get(e),Ve=e=>C.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),He=e=>C.__FEDERATION__.__PRELOADED_ASSETS__.has(e),Ue=e=>{let t=C.__FEDERATION__.__PRELOADED_ASSETS__;if(t.add(e),t.size>Te){let e=t.values().next().value;e!==void 0&&t.delete(e)}},We=`[0-9A-Za-z-]+`,Ge=`(?:\\+(${We}(?:\\.${We})*))`,k=`0|[1-9]\\d*`,A=`[0-9]+`,Ke=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,qe=`(?:${A}|${Ke})`,Je=`(?:-?(${qe}(?:\\.${qe})*))`,Ye=`(?:${k}|${Ke})`,Xe=`(?:-(${Ye}(?:\\.${Ye})*))`,Ze=`${k}|x|X|\\*`,j=`[v=\\s]*(${Ze})(?:\\.(${Ze})(?:\\.(${Ze})(?:${Xe})?${Ge}?)?)?`,Qe=`^\\s*(${j})\\s+-\\s+(${j})\\s*$`,$e=`[v=\\s]*${`(${A})\\.(${A})\\.(${A})`}${Je}?${Ge}?`,et=`((?:<|>)?=?)`,tt=`(\\s*)${et}\\s*(${$e}|${j})`,nt=`(?:~>?)`,rt=`(\\s*)${nt}\\s+`,it=`(?:\\^)`,at=`(\\s*)${it}\\s+`,ot=`(<|>)?=?\\s*\\*`,st=`^${it}${j}$`,ct=`v?${`(${k})\\.(${k})\\.(${k})`}${Xe}?${Ge}?`,lt=`^${nt}${j}$`,ut=`^${et}\\s*${j}$`,dt=`^${et}\\s*(${ct})$|^$`,ft=`^\\s*>=\\s*0.0.0\\s*$`;function M(e){return new RegExp(e)}function N(e){return!e||e.toLowerCase()===`x`||e===`*`}function pt(...e){return t=>e.reduce((e,t)=>t(e),t)}function mt(e){return e.match(M(dt))}function ht(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function gt(e){return e.replace(M(Qe),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=N(n)?``:N(r)?`>=${n}.0.0`:N(i)?`>=${n}.${r}.0`:`>=${t}`,s=N(c)?``:N(l)?`<${Number(c)+1}.0.0-0`:N(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function _t(e){return e.replace(M(tt),`$1$2$3`)}function vt(e){return e.replace(M(rt),`$1~`)}function yt(e){return e.replace(M(at),`$1^`)}function bt(e){return e.trim().split(/\s+/).map(e=>e.replace(M(st),(e,t,n,r,i)=>N(t)?``:N(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:N(r)?t===`0`?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.0 <${Number(t)+1}.0.0-0`:i?t===`0`?n===`0`?`>=${t}.${n}.${r}-${i} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r}-${i} <${Number(t)+1}.0.0-0`:t===`0`?n===`0`?`>=${t}.${n}.${r} <${t}.${n}.${Number(r)+1}-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${Number(t)+1}.0.0-0`)).join(` `)}function xt(e){return e.trim().split(/\s+/).map(e=>e.replace(M(lt),(e,t,n,r,i)=>N(t)?``:N(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:N(r)?`>=${t}.${n}.0 <${t}.${Number(n)+1}.0-0`:i?`>=${t}.${n}.${r}-${i} <${t}.${Number(n)+1}.0-0`:`>=${t}.${n}.${r} <${t}.${Number(n)+1}.0-0`)).join(` `)}function St(e){return e.split(/\s+/).map(e=>e.trim().replace(M(ut),(e,t,n,r,i,a)=>{let o=N(n),s=o||N(r),c=s||N(i);return t===`=`&&c&&(t=``),a=``,o?t===`>`||t===`<`?`<0.0.0-0`:`*`:t&&c?(s&&(r=0),i=0,t===`>`?(t=`>=`,s?(n=Number(n)+1,r=0,i=0):(r=Number(r)+1,i=0)):t===`<=`&&(t=`<`,s?n=Number(n)+1:r=Number(r)+1),t===`<`&&(a=`-0`),`${t+n}.${r}.${i}${a}`):s?`>=${n}.0.0${a} <${Number(n)+1}.0.0-0`:c?`>=${n}.${r}.0${a} <${n}.${Number(r)+1}.0-0`:e})).join(` `)}function Ct(e){return e.trim().replace(M(ot),``)}function wt(e){return e.trim().replace(M(ft),``)}function P(e,t){return e=Number(e)||e,t=Number(t)||t,e>t?1:e===t?0:-1}function Tt(e,t){let{preRelease:n}=e,{preRelease:r}=t;if(n===void 0&&r)return 1;if(n&&r===void 0)return-1;if(n===void 0&&r===void 0)return 0;for(let e=0,t=n.length;e<=t;e++){let t=n[e],i=r[e];if(t!==i)return t===void 0&&i===void 0?0:t?i?P(t,i):-1:1}return 0}function Et(e,t){return P(e.major,t.major)||P(e.minor,t.minor)||P(e.patch,t.patch)||Tt(e,t)}function Dt(e,t){return e.version===t.version}function Ot(e,t){switch(e.operator){case``:case`=`:return Dt(e,t);case`>`:return Et(e,t)<0;case`>=`:return Dt(e,t)||Et(e,t)<0;case`<`:return Et(e,t)>0;case`<=`:return Dt(e,t)||Et(e,t)>0;case void 0:return!0;default:return!1}}function kt(e){return pt(bt,xt,St,Ct)(e)}function At(e){return pt(gt,_t,vt,yt)(e.trim()).split(/\s+/).join(` `)}function F(e,t){if(!e)return!1;let n=mt(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:ht(i,a,o,s),major:i,minor:a,patch:o,preRelease:s?.split(`.`)},l=t.split(`||`);for(let e of l){let t=e.trim();if(!t||t===`*`||t===`x`)return!0;try{let e=At(t);if(!e.trim())return!0;let n=e.split(` `).map(e=>kt(e)).join(` `);if(!n.trim())return!0;let r=n.split(/\s+/).map(e=>wt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=mt(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!Ot({operator:n,version:ht(r,a,o,s),major:r,minor:a,patch:o,preRelease:s?.split(`.`)},c)){i=!1;break}}if(i)return!0}catch(e){console.error(`[semver] Error processing range part "${t}":`,e);continue}}return!1}var jt=`default`,Mt=`global`;function Nt(e,t,n,r){let a;return a=`get`in e?e.get:`lib`in e?()=>Promise.resolve(e.lib):()=>Promise.resolve(()=>{b(`Cannot get shared "${n}" from "${t}": neither "get" nor "lib" is provided in the share config.`)}),e.shareConfig?.eager&&e.treeShaking?.mode&&b(`Invalid shared config for "${n}" from "${t}": cannot use both "eager: true" and "treeShaking.mode" simultaneously. Choose one strategy.`),{deps:[],useIn:[],from:t,loading:null,...e,shareConfig:{requiredVersion:`^${e.version}`,singleton:!1,eager:!1,strictVersion:!1,...e.shareConfig},get:a,loaded:e?.loaded||`lib`in e?!0:void 0,version:e.version??`0`,scope:Array.isArray(e.scope)?e.scope:[e.scope??`default`],strategy:(e.strategy??r)||`version-first`,treeShaking:e.treeShaking?{...e.treeShaking,mode:e.treeShaking.mode??`server-calc`,status:e.treeShaking.status??i.UNKNOWN,useIn:[]}:void 0}}function Pt(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Se(n[i]);return e[i]=e[i]||[],a.forEach(n=>{e[i].push(Nt(n,r,i,t.shareStrategy))}),e},{}),a={...e.shared};return Object.keys(i).forEach(e=>{a[e]?i[e].forEach(t=>{a[e].find(e=>e.version===t.version)||a[e].push(t)}):a[e]=i[e]}),{allShareInfos:a,newShareInfos:i}}function I(e,t){if(!e)return!1;let{status:n,mode:r}=e;return n===i.NO_USE?!1:n===i.CALCULATED?!0:r===`runtime-infer`?!t||Lt(e,t):!1}function L(e,t){let n=e=>{if(!Number.isNaN(Number(e))){let t=e.split(`.`),n=e;for(let e=0;e<3-t.length;e++)n+=`.0`;return n}return e};return!!F(n(e),`<=${n(t)}`)}var R=(e,t)=>{let n=t||function(e,t){return L(e,t)};return Object.keys(e).reduce((e,t)=>!e||n(e,t)||e===`0`?t:e,0)},Ft=e=>!!e.loaded||typeof e.lib==`function`,It=e=>!!e.loading,Lt=(e,t)=>{if(!e||!t)return!1;let{usedExports:n}=e;return n?!!t.every(e=>n.includes(e)):!1};function Rt(e,t,n,r){let i=e[t][n],a=``,o=I(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!Ft(i[e].treeShaking)&&L(e,t):!1:!0:!Ft(i[e])&&L(e,t)};if(o){if(a=R(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:R(e[t][n],s),useTreesShaking:o}}var z=e=>Ft(e)||It(e);function zt(e,t,n,r){let i=e[t][n],a=``,o=I(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(z(i[t].treeShaking))return!z(i[e].treeShaking)||!!L(e,t);if(z(i[e].treeShaking))return!1}return z(i[t])?!z(i[e])||!!L(e,t):!z(i[e])&&L(e,t)};if(o){if(a=R(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:R(e[t][n],s),useTreesShaking:o}}function Bt(e){return e===`loaded-first`?zt:Rt}function B(e,t,n,r,i){if(!e)return;let{shareConfig:a,scope:o=jt,strategy:s,treeShaking:c}=n,l=Array.isArray(o)?o:[o];for(let o of l)if(a&&e[o]&&e[o][t]){let{requiredVersion:l}=a,{version:u,useTreesShaking:d}=Bt(s)(e,o,t,c),f={shareScopeMap:e,scope:o,pkgName:t,version:u,GlobalFederation:T.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[o][t][u];if(a.singleton){if(typeof l==`string`&&!F(u,l)){let e=`Version ${u} from ${u&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${l})`;a.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:d}}{if(l===!1||l===`*`||F(u,l))return{shared:r,useTreesShaking:d};let n=I(c);if(n){for(let[r,i]of Object.entries(e[o][t]))if(I(i.treeShaking,c?.usedExports)&&F(r,l))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[o][t]))if(F(n,l))return{shared:r,useTreesShaking:!1}}},loadContext:i};return(r.emit(f)||f).resolver()}}function Vt(){return T.__FEDERATION__.__SHARE__}function Ht(e){let{pkgName:t,extraOptions:n,shareInfos:r}=e,i=n?.resolver??(e=>{if(!e)return;let t={};return e.forEach(e=>{t[e.version]=e}),t[R(t,function(e,n){return!Ft(t[e])&&L(e,n)})]}),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=(...e)=>{let t={};for(let n of e)if(n)for(let[e,r]of Object.entries(n)){let n=t[e];a(n)&&a(r)?t[e]=o(n,r):r!==void 0&&(t[e]=r)}return t};return o(i(r[t]),n?.customShareInfo)}var V=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function Ut(e,t){return t&&e.treeShaking?e.treeShaking:e}function Wt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Gt(e,t){for(let n of e){let e=t.startsWith(n.name),r=t.replace(n.name,``);if(e){if(r.startsWith(`/`)){let e=n.name;return r=`.${r}`,{pkgNameOrAlias:e,expose:r,remote:n}}if(r===``)return{pkgNameOrAlias:n.name,expose:`.`,remote:n}}let i=n.alias&&t.startsWith(n.alias),a=n.alias&&t.replace(n.alias,``);if(n.alias&&i){if(a&&a.startsWith(`/`)){let e=n.alias;return a=`.${a}`,{pkgNameOrAlias:e,expose:a,remote:n}}if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Kt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var qt=`RUNTIME-001`,Jt=`RUNTIME-002`,Yt=`RUNTIME-003`,Xt=`RUNTIME-004`,Zt=`RUNTIME-005`,Qt=`RUNTIME-006`,$t=`RUNTIME-007`,en=`RUNTIME-008`,tn=`RUNTIME-009`,nn=`RUNTIME-010`,rn=`RUNTIME-011`,an=`RUNTIME-012`,on=`RUNTIME-013`,sn=`RUNTIME-014`,cn=`RUNTIME-015`,ln=`TYPE-001`,un=`BUILD-001`,dn=`BUILD-002`,H={[qt]:`Failed to get remoteEntry exports.`,[Jt]:`The remote entry interface does not contain "init"`,[Yt]:`Failed to get manifest.`,[Xt]:`Failed to locate remote.`,[Zt]:`Invalid loadShareSync function call from bundler runtime`,[Qt]:`Invalid loadShareSync function call from runtime`,[$t]:`Failed to get remote snapshot.`,[en]:`Failed to load script resources.`,[tn]:`Please call createInstance first.`,[nn]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[rn]:`The remoteEntry URL is missing from the remote snapshot.`,[an]:`The getter for the shared module is not a function. This may be caused by setting "shared.import: false" without the host providing the corresponding lib.`,[on]:`The manifest is not a valid Module Federation manifest.`,[sn]:`The remote does not expose the requested module.`,[cn]:`Remote container initialization failed.`},fn={[ln]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},pn={[un]:`Failed to find expose module.`,[dn]:`PublicPath is required in prod mode.`};({...H,...fn,...pn});var mn=`.then(callbacks[0]).catch(callbacks[1])`,hn=new WeakMap,gn=[`Failed to fetch dynamically imported module`,`Importing a module script failed`,`error loading dynamically imported module`];function _n(e){return e instanceof TypeError&&gn.some(t=>e.message.includes(t))}function vn(e){return e===`esm`||e===`module`}async function yn({entry:t,remoteEntryExports:n,name:r,getEntryUrl:i}){return new Promise((a,o)=>{let s=e=>{if(_n(e)){let t=e instanceof Error?e.message:String(e);try{b(en,H,{remoteName:r,resourceUrl:c},t)}catch(e){o(e);return}}o(e)},c=i?i(t):t;try{n?a(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${c}")${mn}`)([a,s]):e(()=>import(c).then(a),[],import.meta.url).catch(s)}catch(e){b(`Failed to load ESM entry from "${c}". ${e instanceof Error?e.message:String(e)}`)}})}async function bn({entry:e,remoteEntryExports:t}){return new Promise((n,r)=>{try{t?n(t):typeof __system_context__>`u`?System.import(e).then(n).catch(r):Function(`callbacks`,`System.import("${e}")${mn}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function xn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Le(e,t);return i||b(qt,H,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function Sn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Le(e,t);if(s)return s;let c=a?a(n):n;return de(c,{attrs:{},createScriptHook:(e,t)=>{let n=i.lifecycle.createScript.emit({url:e,attrs:t,remoteInfo:r,resourceContext:o?{...o,url:e}:void 0});if(n&&(n instanceof HTMLScriptElement||`script`in n||`timeout`in n))return n}}).then(()=>xn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b(en,H,{remoteName:e,resourceUrl:c},n)})}async function Cn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;return vn(c)?yn({entry:a,remoteEntryExports:t,name:s,getEntryUrl:r}):c===`system`?bn({entry:a,remoteEntryExports:t}):Sn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}function wn(e){let{entry:t,name:n}=e;return u(n,t)}async function Tn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=wn(r);if(n)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:n,resourceContext:a,cached:!0}),n;if(!E[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook,l=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n,resourceContext:a}).then(e=>e||Cn({remoteInfo:r,remoteEntryExports:n,loaderHook:c,getEntryUrl:i,resourceContext:a})).then(async e=>(await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e)).catch(async e=>{let i=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!i&&!o){let i=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>Tn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:E,uniqueKey:s});if(i)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:i,resourceContext:a,error:e,recovered:!0}),i}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e});E[s]=l,l.then(void 0,()=>{E[s]===l&&delete E[s]}),hn.set(l,t)}let c=E[s];if(hn.get(c)!==t)try{let e=await c;return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,resourceContext:a}),e}catch(e){throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,resourceContext:a,error:e}),e}return c}function U(e){return{...e,entry:`entry`in e?e.entry:``,type:e.type||`global`,entryGlobalName:e.entryGlobalName||e.name,shareScope:e.shareScope||`default`}}function En(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Dn(e){let t=new Map;return[...e||[],...ze()].forEach(e=>{e&&(y(xe(e),`Plugin configuration is invalid.`),y(e.name,`A name must be provided by the plugin.`),t.has(e.name)||t.set(e.name,e))}),Array.from(t.values())}function On(e,t){return t===void 0?e:{...t,name:e.name,version:e.version}}function kn(e,t){let n=new Map;t.options.plugins.forEach(e=>{e&&n.set(e.name,e)});let r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return Dn(e).forEach(e=>{if(n.set(e.name,e),t.hooks.registerPlugins[e.name])return;let i=On(e,e.apply?.(t));r.forEach(e=>{e.applyPlugin(i)})}),Array.from(n.values())}function An(e){return{name:e.name,alias:e.alias,entry:`entry`in e?e.entry:void 0,version:`version`in e?e.version:void 0,type:e.type,entryGlobalName:e.entryGlobalName,shareScope:e.shareScope}}function W(e){let t={};for(let[n,r]of Object.entries(e.shared)){let e=r[0];e&&(t[n]={version:e.version,singleton:e.shareConfig?.singleton,requiredVersion:e.shareConfig?.requiredVersion!==!1&&e.shareConfig?.requiredVersion,eager:e.eager,strictVersion:e.shareConfig?.strictVersion})}return{project:{name:e.name,mfRole:e.remotes?.length>0?`host`:`unknown`},mfConfig:{name:e.name,remotes:e.remotes?.map(An)??[],shared:t}}}function jn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,recordPreloadedAssets:!0,...e}}function Mn(e,t){return t.map(t=>{let n=Kt(e,t.nameOrAlias);return y(n,`Unable to preload ${t.nameOrAlias} as it is not included in ${!n&&p({remoteInfo:n,remotes:e})}`),{remote:n,preloadConfig:jn(t)}})}function Nn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Pn(e){return e instanceof Error?e.message.includes(`timed out`)||e.name.includes(`Timeout`):!1}function G(e,t,n,r){return{url:t,status:n,resourceType:e.resourceType,initiator:e.initiator,id:e.id,error:r}}function Fn(e,t,n,r){return n?He(t)?Promise.resolve(G(e,t,`cached`)):(Ue(t),r()):r()}async function In(e,t,n,r){let i=e.moduleCache.get(n.name),a=n.entry;if(i?.remoteEntryExports)return G(r,a,`cached`);try{if(!await Tn({origin:e,remoteInfo:n,remoteEntryExports:i?.remoteEntryExports,resourceContext:{...r,url:a}}))throw Error(`Failed to load remoteEntry "${a}".`);return G(r,a,`success`)}catch(e){return G(r,a,Pn(e)?`timeout`:`error`,e)}}function K({host:e,remoteInfo:t,url:n,attrs:r,context:i,needDeleteLink:a}){return new Promise(o=>{let{link:s,needAttach:c}=ue({url:n,cb:()=>{o(G(i,n,c?`success`:`cached`))},onErrorCallback:e=>{o(G(i,n,Pn(e)?`timeout`:`error`,e))},attrs:r,createLinkHook:(n,r)=>{let a=e.loaderHook.lifecycle.createLink.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLLinkElement,a},needDeleteLink:a});c&&document.head.appendChild(s)})}function Ln({host:e,remoteInfo:t,url:n,attrs:r,context:i}){return new Promise(a=>{let{script:o,needAttach:s}=le({url:n,cb:()=>{a(G(i,n,s?`success`:`cached`))},onErrorCallback:e=>{a(G(i,n,Pn(e)?`timeout`:`error`,e))},attrs:r,createScriptHook:(n,r)=>{let a=e.loaderHook.lifecycle.createScript.emit({url:n,attrs:r,remoteInfo:t,resourceContext:{...i,url:n}});return a instanceof HTMLScriptElement,a},needDeleteScript:!0});s&&document.head.appendChild(o)})}function q(e,t){return{...e,resourceType:t}}function Rn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name},a=!0){let{cssAssets:o,jsAssetsWithoutEntry:s,entryAssets:c}=n,l=[];if(t.options.inBrowser){if(c.forEach(n=>{let{moduleInfo:r}=n;l.push(In(t,e,r,q(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};o.forEach(r=>{let o=q(i,`css`);l.push(Fn(o,r,a,()=>K({host:t,remoteInfo:e,url:r,attrs:n,context:o})))})}else{let n={rel:`stylesheet`,type:`text/css`};o.forEach(r=>{let o=q(i,`css`);l.push(Fn(o,r,a,()=>K({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:o})))})}let n=Ln,u={fetchpriority:`high`,type:`text/javascript`};r?(n=K,u={rel:`preload`,as:`script`}):vn(e.type)&&(n=K,u={rel:`modulepreload`,fetchpriority:`high`}),s.forEach(r=>{let o=q(i,`js`);l.push(Fn(o,r,a,()=>n({host:t,remoteInfo:e,url:r,attrs:u,context:o})))})}return Promise.all(l)}var zn={global:{Global:T,nativeGlobal:w,resetFederationGlobalInfo:ke,setGlobalFederationInstance:Ae,getGlobalFederationConstructor:je,setGlobalFederationConstructor:Me,getInfoWithoutType:D,getGlobalSnapshot:Ne,getTargetSnapshotInfoByModuleInfo:Pe,getGlobalSnapshotInfoByModuleInfo:O,setGlobalSnapshotInfoByModuleInfo:Fe,addGlobalSnapshot:Ie,getRemoteEntryExports:Le,registerGlobalPlugins:Re,getGlobalHostPlugins:ze,getPreloaded:Be,setPreloaded:Ve},share:{getRegisteredShare:B,getGlobalShareScope:Vt},utils:{matchRemoteWithNameAndExpose:Gt,preloadAssets:Rn,getRemoteInfo:U}};function Bn(e){if(!e||!(`modules`in e)||!Array.isArray(e.modules))return;let t=e.modules.map(e=>e.moduleName).filter(Boolean);return t.length?t.join(`,`):void 0}function Vn(e,t,n){let r=t,i=Array.isArray(e.shareScope)?e.shareScope:[e.shareScope];i.length||i.push(`default`),i.forEach(e=>{r[e]||(r[e]={})});let a={version:e.version||``,shareScopeKeys:Array.isArray(e.shareScope)?i:e.shareScope||`default`};return Object.defineProperty(a,"shareScopeMap",{value:r,enumerable:!1}),{remoteEntryInitOptions:a,shareScope:r[i[0]],initScope:n??[]}}var Hn=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e,t){let n=t||{initiator:`loadRemote`,id:Wt(this.remoteInfo.name,e),resourceType:`remoteEntry`,url:this.remoteInfo.entry,expose:e},r=await Tn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:n});return y(r,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=r,this.remoteEntryExports}async init(e,t,n,r,i){let a=await this.getEntry(r,i);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host}),a;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,cached:!0,origin:this.host}),n}return a}this.initing=!0,this.initPromise=(async()=>{await this.host.loaderHook.lifecycle.beforeInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,origin:this.host});let{remoteEntryInitOptions:r,shareScope:i,initScope:o}=Vn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:i,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});a?.init===void 0&&b(Jt,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName},void 0,W(this.host.options));try{await a.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(cn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,remoteEntryKey:this.remoteInfo.entryGlobalName,shareScope:this.remoteInfo.shareScope},`${e}`,W(this.host.options))}await this.host.hooks.lifecycle.initContainer.emit({...s,id:e,remoteSnapshot:t,remoteEntryExports:a}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:a,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return a}async get(e,t,n,r){let{loadFactory:i=!0}=n||{loadFactory:!0},a=await this.init(e,r,void 0,t);this.lib=a,await this.host.loaderHook.lifecycle.beforeGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,origin:this.host});let o;try{let n=await this.host.loaderHook.lifecycle.getModuleFactory.emit({remoteEntryExports:a,expose:t,moduleInfo:this.remoteInfo});o=typeof n==`function`?n:void 0,o||=await a.get(t),o||b(sn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:Bn(r)},void 0,W(this.host.options)),await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,moduleFactory:o,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterGetExpose.emit({id:e,expose:t,moduleInfo:this.remoteInfo,remoteEntryExports:a,error:n,origin:this.host}),n}let s=we(this.remoteInfo.name,t),c=this.wraperFactory(o,s);if(!i)return c;await this.host.loaderHook.lifecycle.beforeExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,origin:this.host});try{let n=await c();return await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,exposeModule:n,origin:this.host}),n}catch(n){throw await this.host.loaderHook.lifecycle.afterExecuteFactory.emit({id:e,expose:t,moduleInfo:this.remoteInfo,loadFactory:i,error:n,origin:this.host}),n}}wraperFactory(e,t){function n(e,t){e&&typeof e==`object`&&Object.isExtensible(e)&&!Object.getOwnPropertyDescriptor(e,Symbol.for(`mf_module_id`))&&Object.defineProperty(e,Symbol.for(`mf_module_id`),{value:t,enumerable:!1})}return()=>{let r=e();return r instanceof Promise?r.then(e=>(n(e,t),e)):(n(r,t),r)}}},J=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e){y(xe(e),`Plugin configuration is invalid.`);let t=e.name;y(t,`A name must be provided by the plugin.`),this.registerPlugins[t]||(this.registerPlugins[t]=e,this.lifecycleKeys.forEach(t=>{let n=e[t];n&&this.lifecycle[t].on(n)}))}removePlugin(e){y(e,`A name is required.`);let t=this.registerPlugins[e];y(t,`The plugin "${e}" is not registered.`),this.lifecycleKeys.forEach(e=>{let n=t[e];n&&this.lifecycle[e].remove(n)}),delete this.registerPlugins[e]}},Y=class{constructor(e){this.type=``,this.listeners=new Set,e&&(this.type=e)}on(e){typeof e==`function`&&this.listeners.add(e)}once(e){let t=this;this.on(function n(...r){return t.remove(n),e.apply(null,r)})}emit(...e){let t;return this.listeners.size>0&&this.listeners.forEach(n=>{let r=n(...e);r!==void 0&&(t=r)}),t}remove(e){this.listeners.delete(e)}removeAll(){this.listeners.clear()}},X=class extends Y{emit(...e){let t,n=Array.from(this.listeners);if(n.length>0){let r=0,i=t=>t===!1?!1:r<n.length?Promise.resolve(n[r++].apply(null,e)).then(n=>n===void 0||e.length===1&&n===e[0]?i(t):i(n)):t;t=i()}return Promise.resolve(t)}};function Un(e,t){if(!ye(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Z=class extends Y{constructor(e){super(),this.onerror=b,this.type=e}emit(e){ye(e)||b(`The data for the "${this.type}" hook should be an object.`);for(let t of this.listeners)try{let n=t(e);if(n===void 0)continue;if(Un(e,n))e=n;else{this.onerror(`A plugin returned an unacceptable value for the "${this.type}" type.`);break}}catch(e){x(e),this.onerror(e)}return e}},Q=class extends Y{constructor(e){super(),this.onerror=b,this.type=e}emit(e){ye(e)||b(`The response data for the "${this.type}" hook must be an object.`);let t=Array.from(this.listeners);if(t.length>0){let n=0,r=t=>(x(t),this.onerror(t),e),i=a=>{if(a!==void 0&&Un(e,a))e=a;else if(a!==void 0)return this.onerror(`A plugin returned an incorrect value for the "${this.type}" type.`),e;if(n<t.length)try{return Promise.resolve(t[n++](e)).then(i,r)}catch(e){return r(e)}return e};return Promise.resolve(i(e))}return Promise.resolve(e)}},$=`Remote loading is disabled by experiments.optimization.disableRemote.`,Wn=class{constructor(){this.hooks=new J({})}formatAndRegisterRemote(){return[]}loadRemote(){throw Error($)}preloadRemote(){throw Error($)}registerRemotes(){throw Error($)}getRemoteModuleAndOptions(){throw Error($)}initRawContainer(){throw Error($)}};function Gn(e,t){let n=Ce(t);n.url||b(rn,H,{remoteName:e.name});let r=d(t,n.url);e.type=n.type,e.entryGlobalName=n.globalName,e.entry=r,e.version=t.version,e.buildVersion=t.buildVersion}function Kn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!_e(t)||!ve(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:Wt(t.name,r)});Gn(a,s);let l=[{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1,recordPreloadedAssets:!0}];await i.remoteHandler.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:l,options:i.options,origin:i});let[u]=l;if(u){let e={remote:t,preloadConfig:u},n=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:e,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});n&&Rn(a,i,n,!1,{initiator:`loadRemote`,id:o},u.recordPreloadedAssets).catch(()=>void 0)}return{...e,remoteSnapshot:s}}return e}}}function qn(e){let t=e.split(`:`);return t.length===1?{name:t[0],version:void 0}:t.length===2?{name:t[0],version:t[1]}:{name:t[1],version:t[2]}}function Jn(e,t,n,r,i={},a){let{value:o}=D(e,S(t)),s=a||o;if(s&&!g(s)&&(n(s,t,r),s.remotesInfo)){let t=Object.keys(s.remotesInfo);for(let r of t){if(i[r])continue;i[r]=!0;let t=qn(r),a=s.remotesInfo[r];Jn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var Yn=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Xn(e,t,n,r,i){let a=[],o=[],s=[],c=new Set,l=new Set,{options:u}=e,{preloadConfig:f}=t,{depsRemote:p}=f;if(Jn(r,n,(t,n,r)=>{let i;if(r)i=f;else if(Array.isArray(p)){let e=p.find(e=>e.nameOrAlias===n.name||e.nameOrAlias===n.alias);if(!e)return;i=jn(e)}else if(p===!0)i=f;else return;let c=d(t,Ce(t).url);c&&s.push({name:n.name,moduleInfo:{name:n.name,entry:c,type:`remoteEntryType`in t?t.remoteEntryType:`global`,entryGlobalName:`globalName`in t?t.globalName:n.name,shareScope:``,version:`version`in t?t.version:void 0},url:c});let l=`modules`in t?t.modules:[],u=Nn(i.exposes);u.length&&`modules`in t&&(l=t?.modules?.reduce((e,t)=>(u?.indexOf(t.moduleName)!==-1&&e.push(t),e),[]));function m(e){let n=e.map(e=>d(t,e));return i.filter?n.filter(i.filter):n}if(l){let r=l.length;for(let s=0;s<r;s++){let r=l[s],c=`${n.name}/${r.moduleName}`;e.remoteHandler.hooks.lifecycle.handlePreloadModule.emit({id:r.moduleName===`.`?n.name:c,name:n.name,remoteSnapshot:t,preloadConfig:i,remote:n,origin:e}),!Be(c)&&(i.resourceCategory===`all`?(a.push(...m(r.assets.css.async)),a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.async)),o.push(...m(r.assets.js.sync))):i.resourceCategory===`sync`&&(a.push(...m(r.assets.css.sync)),o.push(...m(r.assets.js.sync))),Ve(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=B(e.shareScopeMap,n.sharedName,t,e.sharedHandler.hooks.lifecycle.resolveShare)||{};r&&typeof r.lib==`function`&&(n.assets.js.sync.forEach(e=>{c.add(e)}),n.assets.css.sync.forEach(e=>{l.add(e)}))};i.shared.forEach(e=>{let n=u.shared?.[e.sharedName];if(!n)return;let r=e.version?n.find(t=>t.version===e.version):n;r&&Se(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!Yn(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!Yn(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!Yn(`script`,e.url))}}var Zn=function(){return{name:`generate-preload-assets-plugin`,async generatePreloadAssets(e){let{origin:t,preloadOptions:n,remoteInfo:r,remote:i,globalSnapshot:a,remoteSnapshot:o}=e;return _e(i)&&ve(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Gn(r,o),Xn(t,n,r,a,o))}}};function Qn(e,t){let n=O({name:t.name,version:t.options.version}),r=n&&`remotesInfo`in n&&n.remotesInfo&&D(n.remotesInfo,e.name).value;return r&&r.matchedVersion?{hostGlobalSnapshot:n,globalSnapshot:Ne(),remoteSnapshot:O({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:Ne(),remoteSnapshot:O({name:e.name,version:`version`in e?e.version:void 0})}}var $n=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new J({beforeLoadRemoteSnapshot:new X(`beforeLoadRemoteSnapshot`),loadSnapshot:new Q(`loadGlobalSnapshot`),loadRemoteSnapshot:new Q(`loadRemoteSnapshot`),afterLoadSnapshot:new Q(`afterLoadSnapshot`),beforeLoadManifest:new X(`beforeLoadManifest`),afterLoadManifest:new X(`afterLoadManifest`)}),this.manifestLoading=T.__FEDERATION__.__MANIFEST_LOADING__,this.HostInstance=e,this.loaderHook=e.loaderHook}async loadRemoteSnapshotInfo({moduleInfo:e,id:t,initiator:n=`loadRemote`}){let{options:r}=this.HostInstance;await this.hooks.lifecycle.beforeLoadRemoteSnapshot.emit({options:r,moduleInfo:e,origin:this.HostInstance});let i=O({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Ie({[this.HostInstance.options.name]:i})),i&&`remotesInfo`in i&&!D(i.remotesInfo,e.name).value&&(`version`in e||`entry`in e)&&(i.remotesInfo={...i?.remotesInfo,[e.name]:{matchedVersion:`version`in e?e.version:e.entry}});let{hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}=this.getGlobalRemoteInfo(e),{remoteSnapshot:c,globalSnapshot:l}=await this.hooks.lifecycle.loadSnapshot.emit({options:r,moduleInfo:e,hostGlobalSnapshot:a,remoteSnapshot:o,globalSnapshot:s}),u,d;if(c){if(g(c)){let r=c.remoteEntry,i=await this.loadManifestSnapshot(r,e,{},{initiator:n,id:t||e.name}),a=Fe({...e,entry:r},i);u=i,d=a}else{let{remoteSnapshot:t}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:e,remoteSnapshot:c,from:`global`});u=t,d=l}}else if(_e(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Fe(e,r);u=r,d=i}else b($t,H,{remoteName:e.name,remoteVersion:e.version,hostName:this.HostInstance.options.name,globalSnapshot:JSON.stringify(l)},void 0,W(this.HostInstance.options));return await this.hooks.lifecycle.afterLoadSnapshot.emit({id:t,host:this.HostInstance,options:r,moduleInfo:e,remoteSnapshot:u}),{remoteSnapshot:u,globalSnapshot:d}}getGlobalRemoteInfo(e){return Qn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=U(t),i=this.manifestCache.get(e);if(i)return await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,cached:!0,origin:this.HostInstance}),i;await this.hooks.lifecycle.beforeLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,origin:this.HostInstance});let a,o,s=!1;try{let t=await this.loaderHook.lifecycle.fetch.emit(e,{},n,r?{...r,url:e,resourceType:`manifest`}:void 0);(!t||!(t instanceof Response))&&(t=await fetch(e,{})),a=t,i=await t.json()}catch(c){o=c,i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:c,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,response:a,error:c,origin:this.HostInstance}),b(Yt,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${c}`,W(this.HostInstance.options))),s=!0}let c=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean),l=c.length>0?Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${c.join(`, `)}.`):void 0;return l&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:l,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),await this.hooks.lifecycle.afterLoadManifest.emit({manifestUrl:e,moduleInfo:t,resourceOptions:r,manifestJson:i,response:a,error:l||o,recovered:l?void 0:s||void 0,origin:this.HostInstance}),l&&b(on,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:c.join(`,`)},void 0,W(this.HostInstance.options)),this.manifestCache.set(e,i),i})()}async loadManifestSnapshot(e,t,n,r){let i=async()=>{let i=await this.getManifestJson(e,t,n,r),a=h(i,{version:e}),{remoteSnapshot:o}=await this.hooks.lifecycle.loadRemoteSnapshot.emit({options:this.HostInstance.options,moduleInfo:t,manifestJson:i,remoteSnapshot:a,manifestUrl:e,from:`manifest`});return o};return this.manifestLoading[e]||(this.manifestLoading[e]=i().then(e=>e)),this.manifestLoading[e]}},er=class{constructor(){this.hooks=new J({})}},tr=class{constructor(e){this.hooks=new J({beforeRegisterShare:new Z(`beforeRegisterShare`),afterRegisterShare:new Y(`afterRegisterShare`),afterResolve:new Q(`afterResolve`),beforeLoadShare:new Q(`beforeLoadShare`),loadShare:new X,afterLoadShare:new Y(`afterLoadShare`),errorLoadShare:new Y(`errorLoadShare`),resolveShare:new Z(`resolveShare`),initContainerShareScopeMap:new Z(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterRegisterShare(e,t){this.hooks.lifecycle.afterRegisterShare.emit({pkgName:e,...t,shareScopeMap:this.shareScopeMap,origin:this.host})}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r,loadContext:i}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,loadContext:i,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i,loadContext:a}){try{this.hooks.lifecycle.errorLoadShare.emit({pkgName:t,shareInfo:n,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host,error:r,recovered:i,loadContext:a})}catch(e){x(e)}}registerShared(e,t){let{newShareInfos:n,allShareInfos:r}=Pt(e,t);return Object.keys(n).forEach(e=>{n[e].forEach(n=>{n.scope.forEach(r=>{this.hooks.lifecycle.beforeRegisterShare.emit({origin:this.host,pkgName:e,shared:n});let i=this.shareScopeMap[r]?.[e],a=i?.[n.version];i||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name}),this.emitAfterRegisterShare(e,{scope:r,shared:n,previousShared:a,registeredShared:this.shareScopeMap[r]?.[e]?.[n.version],trigger:`runtime`})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=t?.context,i=Ht({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),a=i;try{i?.scope&&await Promise.all(i.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:i.strategy,context:r}))}));let o=await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:i,shared:n.options.shared,origin:n,loadContext:r});a=o.shareInfo,r=o.loadContext||r,y(a,`Cannot find shared "${e}" in host "${n.options.name}". Ensure the shared config for "${e}" is declared in the federation plugin options and the host has been initialized before loading shares.`);let s=a,{shared:c,useTreesShaking:l}=B(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare,r)||{};if(c){let t=Ut(c,l);if(t.lib)return V(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),t.lib;if(t.loading&&!t.loaded){let i=await t.loading;return t.loaded=!0,t.lib||=i,V(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),i}{let i=(async()=>{let e=await t.get();return V(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:c,from:n.options.name,lib:null,loading:i,treeShaking:l?t:void 0});let a=await i;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:c,loadContext:r}),a}}{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,recovered:!0,loadContext:r}),!1;let i=I(s.treeShaking),a=Ut(s,i),o=(async()=>{let t=await a.get();a.lib=t,a.loaded=!0,V(a,n.options.name);let{shared:i,useTreesShaking:o}=B(this.shareScopeMap,e,s,this.hooks.lifecycle.resolveShare,r)||{};if(i){let e=Ut(i,o);e.lib=t,e.loaded=!0,i.from=s.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:s,from:n.options.name,lib:null,loading:o,treeShaking:i?a:void 0});let c=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:s,selectedShared:s,loadContext:r}),c}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,error:t,loadContext:r}),t}}initializeSharing(e=jt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.context?.trigger||r||`runtime`,o=t?.initScope,s=[];if(r!==`build`){let{initTokens:t}=this;o||=[];let n=t[e];if(n||=t[e]={from:this.host.name},o.indexOf(n)>=0)return s;o.push(n)}let c=this.shareScopeMap,l=n.options.name;c[e]||(c[e]={});let u=c[e],d=(t,n)=>{let{version:r,eager:i}=n;u[t]=u[t]||{};let o=u[t],s=o[r],c=s&&Ut(s),d=!!(c&&(`eager`in c&&c.eager||`shareConfig`in c&&c.shareConfig?.eager));(!c||c.strategy!==`loaded-first`&&!c.loaded&&(!i==!d?l>o[r].from:i))&&(o[r]=n),this.emitAfterRegisterShare(t,{scope:e,shared:n,previousShared:s,registeredShared:o[r],trigger:a})},f=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r,i={initiator:`loadShare`,id:e,resourceType:`remoteEntry`,url:t.remoteInfo.entry};try{r=await t.getEntry(void 0,i)}catch(i){if(r=await n.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:i,from:`runtime`,lifecycle:`beforeLoadShare`,remote:t.remoteInfo,origin:n}),!r)return}finally{r?.init&&!t.initing&&(t.remoteEntryExports=r,await t.init(void 0,void 0,o,void 0,i))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&d(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&s.push(f(t.name))}),s}loadShareSync(e,t){let{host:n}=this,r=t?.context,i=Ht({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{i?.scope&&i.scope.forEach(e=>{this.initializeSharing(e,{strategy:i.strategy,from:t?.from,context:r})});let{shared:a}=B(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare,r)||{};if(a){if(typeof a.lib==`function`)return V(a,n.options.name),a.loaded||(a.loaded=!0,a.from===n.options.name&&(i.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),a.lib;if(typeof a.get==`function`){let t=a.get();if(!(t instanceof Promise))return V(a,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:a}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:a,loadContext:r}),t}}if(i.lib)return i.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib;if(i.get){let a=i.get();return a instanceof Promise&&b(t?.from===`build`?Zt:Qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options)),i.lib=a,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:i.lib,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,selectedShared:i,loadContext:r}),i.lib}b(Qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options))}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:i,error:t,loadContext:r}),t}}initShareScopeMap(e,t,n={}){let{host:r}=this;this.shareScopeMap[e]=t,this.hooks.lifecycle.initContainerShareScopeMap.emit({shareScope:t,options:r.options,origin:r,scopeName:e,hostShareScopeMap:n.hostShareScopeMap})}setShared({pkgName:e,shared:t,from:n,lib:r,loading:i,loaded:a,get:o,treeShaking:s}){let{version:c,scope:l=`default`,...u}=t,d=Array.isArray(l)?l:[l],f=e=>{let t=(e,t,n)=>{n&&!e[t]&&(e[t]=n)},n=s?e.treeShaking:e;t(n,`loaded`,a),t(n,`loading`,i),t(n,`get`,o),t(n,`lib`,r)};d.forEach(t=>{this.shareScopeMap[t]||(this.shareScopeMap[t]={}),this.shareScopeMap[t][e]||(this.shareScopeMap[t][e]={}),this.shareScopeMap[t][e][c]||(this.shareScopeMap[t][e][c]={version:c,scope:[t],...u,lib:r});let i=this.shareScopeMap[t][e][c];f(i),n&&i.from!==n&&(i.from=n)})}_setGlobalShareScopeMap(e){let t=Vt(),n=e.id||e.name;n&&!t[n]&&(t[n]=this.shareScopeMap)}},nr=class{constructor(){this.shareScopeMap={},this.hooks=new J({afterResolve:new Q(`afterResolve`)})}registerShared(){return{newShareInfos:{},allShareInfos:{}}}loadShare(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}loadShareSync(){throw Error(`Shared dependency loading is disabled by experiments.optimization.disableShared.`)}initializeSharing(){return[]}initShareScopeMap(e,t){this.shareScopeMap[e]=t}},rr=class{constructor(e){this.hooks=new J({beforeRegisterRemote:new Z(`beforeRegisterRemote`),registerRemote:new Z(`registerRemote`),beforeRequest:new Q(`beforeRequest`),afterMatchRemote:new X(`afterMatchRemote`),onLoad:new X(`onLoad`),afterLoadRemote:new X(`afterLoadRemote`),handlePreloadModule:new Y(`handlePreloadModule`),errorLoadRemote:new X(`errorLoadRemote`),beforePreloadRemote:new X(`beforePreloadRemote`),generatePreloadAssets:new X(`generatePreloadAssets`),afterPreloadRemote:new X(`afterPreloadRemote`),loadEntry:new X}),this.host=e,this.idToRemoteMap={}}formatAndRegisterRemote(e,t){return(t.remotes||[]).reduce((e,t)=>(this.registerRemote(t,e,{force:!1}),e),e.remotes)}setIdToRemoteMap(e,t){let{remote:n,expose:r}=t,{name:i,alias:a}=n;if(this.idToRemoteMap[e]={name:n.name,expose:r},a&&e.startsWith(i)){let t=e.replace(i,a);this.idToRemoteMap[t]={name:n.name,expose:r}}else if(a&&e.startsWith(a)){let t=e.replace(a,i);this.idToRemoteMap[t]={name:n.name,expose:r}}}async loadRemote(e,t){let{host:n}=this,r=Gt(n.options.remotes,e),i=e,a=r?.expose,o=r?U(r.remote):void 0,s;try{let{loadFactory:r=!0}=t||{loadFactory:!0},{module:c,moduleOptions:l,remoteMatchInfo:u}=await this.getRemoteModuleAndOptions({id:e}),{pkgNameOrAlias:d,remote:f,expose:p,id:m,remoteSnapshot:ee}=u;i=m,a=p,o=U(f);let h=await c.get(m,p,t,ee),g=await this.hooks.lifecycle.onLoad.emit({id:m,pkgNameOrAlias:d,expose:p,exposeModule:r?h:void 0,exposeModuleFactory:r?void 0:h,remote:f,options:l,moduleInstance:c,origin:n});return this.setIdToRemoteMap(e,u),s={id:i,expose:a,remote:o,options:t,origin:n},typeof g==`function`?g:h}catch(r){let{from:c=`runtime`}=t||{from:`runtime`},l;try{l=await this.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:c,lifecycle:`onLoad`,expose:a,remote:o,origin:n})}catch(e){throw s={id:i,expose:a,remote:o,options:t,error:e,origin:n},e}if(!l)throw s={id:i,expose:a,remote:o,options:t,error:r,origin:n},r;return s={id:i,expose:a,remote:o,options:t,error:r,origin:n,recovered:!0},l}finally{s&&await this.hooks.lifecycle.afterLoadRemote.emit(s)}}async preloadRemote(e){let{host:t}=this,n=[];await this.hooks.lifecycle.beforePreloadRemote.emit({preloadOps:e,options:t.options,origin:t});let r=Mn(t.options.remotes,e),i=e=>{let{preloadConfig:t,remote:n}=e,r=t.exposes||[];return r.length?r.map(r=>({ops:{...e,preloadConfig:{...t,exposes:[r]}},id:Wt(n.name,r)})):[{ops:e,id:`${n.name}/*`}]},a;await Promise.all(r.flatMap(i).map(async e=>{let{ops:r,id:i}=e,{remote:a,preloadConfig:o}=r,s=U(a);try{let{globalSnapshot:e,remoteSnapshot:c}=await t.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:a,id:i,initiator:`preloadRemote`}),l=await this.hooks.lifecycle.generatePreloadAssets.emit({origin:t,preloadOptions:r,remote:a,remoteInfo:s,globalSnapshot:e,remoteSnapshot:c});if(!l)return;let u=await Rn(s,t,l,!0,{initiator:`preloadRemote`,id:i},o.recordPreloadedAssets);n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:u})}catch(e){n.push({remote:a,remoteInfo:s,preloadConfig:o,id:i,results:[{url:s.entry,status:`error`,resourceType:/\.json(?:$|[?#])/i.test(s.entry)?`manifest`:`remoteEntry`,initiator:`preloadRemote`,id:i,error:e}]})}}));let o=n.flatMap(e=>e.results.filter(e=>e.status===`error`||e.status===`timeout`));if(o.length>0&&(a=Error(`preloadRemote failed to load ${o.length} resource(s).`),Object.assign(a,{results:n,failedResults:o})),await this.hooks.lifecycle.afterPreloadRemote.emit({preloadOps:e,options:t.options,origin:t,results:n,error:a}),a)throw a}registerRemotes(e,t){let{host:n}=this;e.forEach(e=>{this.registerRemote(e,n.options.remotes,{force:t?.force})})}initRawContainer(e,t,n){let{host:r}=this,i=new Hn({host:r,remoteInfo:U({name:e,entry:t})});return i.remoteEntryExports=n,r.moduleCache.set(e,i),i}async getRemoteModuleAndOptions(e){let{host:t}=this,{id:n}=e,r;try{r=await this.hooks.lifecycle.beforeRequest.emit({id:n,options:t.options,origin:t})}catch(e){if(r=await this.hooks.lifecycle.errorLoadRemote.emit({id:n,options:t.options,origin:t,from:`runtime`,error:e,lifecycle:`beforeRequest`}),!r)throw e}let{id:i}=r,a=Gt(t.options.remotes,i);if(!a)try{b(Xt,H,{hostName:t.options.name,requestId:i},void 0,W(t.options))}catch(e){throw await this.hooks.lifecycle.afterMatchRemote.emit({id:i,options:t.options,error:e,origin:t}),e}let{remote:o}=a,s=U(o);await this.hooks.lifecycle.afterMatchRemote.emit({id:i,...a,options:t.options,remoteInfo:s,origin:t});let c=await t.sharedHandler.hooks.lifecycle.afterResolve.emit({id:i,...a,options:t.options,origin:t,remoteInfo:s}),{remote:l,expose:u}=c;y(l&&u,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${i}.`);let d=t.moduleCache.get(l.name),f={host:t,remoteInfo:s};return d||(d=new Hn(f),t.moduleCache.set(l.name,d)),{module:d,moduleOptions:f,remoteMatchInfo:c}}registerRemote(e,t,n){let{host:r}=this,i=()=>{if(e.alias){let n=t.find(t=>e.alias&&(t.name.startsWith(e.alias)||t.alias?.startsWith(e.alias)));y(!n,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${n&&n.name} name or alias`)}`entry`in e&&typeof window<`u`&&!e.entry.startsWith(`http`)&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||=jt,e.type||=Mt};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});let a=t.find(t=>t.name===e.name);if(!a)i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{let o=[`The remote "${e.name}" is already registered.`,`Please note that overriding it may cause unexpected errors.`];n?.force&&(this.removeRemote(a),i(),t.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r}),f(o.join(` `)))}}removeRemote(e){try{let{host:t}=this,{name:n}=e,r=t.options.remotes.findIndex(e=>e.name===n);r!==-1&&t.options.remotes.splice(r,1);let i=D(C.__FEDERATION__.moduleInfo,S(e)).key;delete C.__FEDERATION__.moduleInfo[i],`entry`in e&&(t.snapshotHandler.manifestCache.delete(e.entry),delete T.__FEDERATION__.__MANIFEST_LOADING__[e.entry]);let{hostGlobalSnapshot:a}=Qn(e,t);if(a){let t=a&&`remotesInfo`in a&&a.remotesInfo&&D(a.remotesInfo,e.name).key;t&&delete a.remotesInfo[t]}let o=t.moduleCache.get(e.name);if(o){let n=o.remoteInfo,r=n.entryGlobalName;C[r]&&(Object.getOwnPropertyDescriptor(C,r)?.configurable?delete C[r]:C[r]=void 0);let i=wn(o.remoteInfo);E[i]&&delete E[i];let a=n.buildVersion?u(n.name,n.buildVersion):n.name,s=C.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===a:e.name===a);if(s!==-1){let e=C.__FEDERATION__.__INSTANCES__[s];a=e.options.id||a;let t=Vt(),r=!0,i=[];Object.keys(t).forEach(e=>{let a=t[e];a&&Object.keys(a).forEach(t=>{let o=a[t];o&&Object.keys(o).forEach(a=>{let s=o[a];s&&Object.keys(s).forEach(o=>{let c=s[o];c&&typeof c==`object`&&c.from===n.name&&(c.loaded||c.loading?(c.useIn=c.useIn.filter(e=>e!==n.name),c.useIn.length?r=!1:i.push([e,t,a,o])):i.push([e,t,a,o]))})})})}),r&&(e.shareScopeMap={},delete t[a]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),C.__FEDERATION__.__INSTANCES__.splice(s,1)}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},ir=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN!=`boolean`||!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN,ar=typeof FEDERATION_OPTIMIZE_NO_REMOTE!=`boolean`||!FEDERATION_OPTIMIZE_NO_REMOTE,or=typeof FEDERATION_OPTIMIZE_NO_SHARED!=`boolean`||!FEDERATION_OPTIMIZE_NO_SHARED,sr=class{constructor(e){this.hooks=new J({beforeInit:new Z(`beforeInit`),init:new Y,beforeInitContainer:new Q(`beforeInitContainer`),initContainer:new Q(`initContainer`)}),this.version=`2.9.2`,this.moduleCache=new Map,this.loaderHook=new J({getModuleInfo:new Y,createScript:new Y,createLink:new Y,fetch:new X,loadEntryError:new X,afterLoadEntry:new X(`afterLoadEntry`),beforeInitRemote:new X(`beforeInitRemote`),afterInitRemote:new X(`afterInitRemote`),beforeGetExpose:new X(`beforeGetExpose`),afterGetExpose:new X(`afterGetExpose`),beforeExecuteFactory:new X(`beforeExecuteFactory`),afterExecuteFactory:new X(`afterExecuteFactory`),getModuleFactory:new X}),this.bridgeHook=new J({beforeBridgeRender:new Y,afterBridgeRender:new Y,beforeBridgeDestroy:new Y,afterBridgeDestroy:new Y,afterBridgeRouteSync:new Y});let t=ar&&ir?[Kn(),Zn()]:[],n={id:En(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=ar?new $n(this):new er,this.sharedHandler=or?new tr(this):new nr,this.remoteHandler=ar?new rr(this):new Wn,this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}initOptions(e){e.name&&e.name!==this.options.name&&b(pe(nn,H)),this.registerPlugins(e.plugins);let t=this.formatOptions(this.options,e);return this.options=t,t}async loadShare(e,t){return this.sharedHandler.loadShare(e,t)}loadShareSync(e,t){return this.sharedHandler.loadShareSync(e,t)}initializeSharing(e=jt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){return this.remoteHandler.initRawContainer(e,t,n)}async loadRemote(e,t){return this.remoteHandler.loadRemote(e,t)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,t,n={}){this.sharedHandler.initShareScopeMap(e,t,n)}formatOptions(e,t){let n=or?Pt(e,t).allShareInfos:{},{userOptions:r,options:i}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:t,options:e,shareInfo:n}),a=this.remoteHandler.formatAndRegisterRemote(i,r),{allShareInfos:o}=this.sharedHandler.registerShared(i,r),s=[...i.plugins];r.plugins&&r.plugins.forEach(e=>{s.includes(e)||s.push(e)});let c={...e,...t,plugins:s,remotes:a,shared:o,id:r.id||e.id};return this.hooks.lifecycle.init.emit({origin:this,options:c}),c}registerPlugins(e){this.options.plugins=kn(e,this)}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}},cr=zn;function lr(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function ur(e,t){let n=lr();return C.__FEDERATION__.__INSTANCES__.find(r=>!!(n&&r.options.id===n||r.options.name===e&&!r.options.version&&!t||r.options.name===e&&t&&r.options.version===t))}export{Me as a,je as i,cr as n,Ae as o,sr as r,ur as t};
|