@camstack/addon-admin-ui 1.0.3 → 1.0.4
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/dist/assets/{AddLocationWizard-ty_4uW1H.js → AddLocationWizard-D6tk8U-w.js} +1 -1
- package/dist/assets/{AddonCollectionPage-CIvGYL8Z.js → AddonCollectionPage-CPQWZfC0.js} +1 -1
- package/dist/assets/Addons-BIu0hjHd.js +1 -0
- package/dist/assets/{AdminTabs-7T1CldHN.js → AdminTabs-Ddi8-SQJ.js} +1 -1
- package/dist/assets/{BrokerForm-DzjaLHmG.js → BrokerForm-Jzl9BAMO.js} +1 -1
- package/dist/assets/{BrokerStep-B3pEVZ2L.js → BrokerStep-vbWWE4ss.js} +1 -1
- package/dist/assets/{Capabilities-D2qn1TDV.js → Capabilities-GrzalIOH.js} +1 -1
- package/dist/assets/{CapabilityBadges-BWnECBvl.js → CapabilityBadges-BN0gXK4w.js} +1 -1
- package/dist/assets/{Cluster-BVUZdAyW.js → Cluster-zuSKpmeo.js} +2 -2
- package/dist/assets/{Dashboard-HorCsmCt.js → Dashboard-Dl3BUDju.js} +1 -1
- package/dist/assets/{Data-hispFwBv.js → Data-DJn-KYZI.js} +1 -1
- package/dist/assets/{DetectionIntelligence-BtnTELA6.js → DetectionIntelligence-BhQAT1WX.js} +1 -1
- package/dist/assets/DeviceDetail-C16YaYd6.js +2 -0
- package/dist/assets/{Devices-XIivtEYO.js → Devices-D_zVs1PC.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-CIF0Ft1g.js → EmbedPlayerPage-BjQGYATU.js} +1 -1
- package/dist/assets/{FormBuilder-DVLWBVys.js → FormBuilder-BXQEmfaE.js} +1 -1
- package/dist/assets/{Identity-8krGNqDO.js → Identity-ZvlfZz_A.js} +1 -1
- package/dist/assets/IntegrationDetail-Bnpn2hQ2.js +1 -0
- package/dist/assets/{Integrations-CxuWXvnl.js → Integrations-Bv07bA7c.js} +1 -1
- package/dist/assets/{Integrations-CxFwUmeX.js → Integrations-CsaOfFWR.js} +1 -1
- package/dist/assets/{Logs-DYrcsFh9.js → Logs-DBoE5z_U.js} +1 -1
- package/dist/assets/{MyAccess-C-zxwxTM.js → MyAccess-Bp5Cp_C6.js} +1 -1
- package/dist/assets/Network-Dyg7yTc_.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-B4ru8rzf.js → NodeAddonsSettingsPanel-9HVgS_gw.js} +1 -1
- package/dist/assets/Pipeline-DzZm2XqD.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-Cut8tYhS.js → PrivacyMaskSettings-Cl0lj_PR.js} +1 -1
- package/dist/assets/{ProviderIcon-BpqSF3Hu.js → ProviderIcon-DWSMqwcl.js} +1 -1
- package/dist/assets/{Settings-CriiXyFu.js → Settings-ayyuAbCz.js} +1 -1
- package/dist/assets/{Showroom-KHowYChm.js → Showroom-CQ1h4YKK.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Cus-LW9c.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CS4OeMKk.js} +1 -1
- package/dist/assets/{bell-C1jXqDWz.js → bell-C9HUnDGC.js} +1 -1
- package/dist/assets/circle-check-big-BDdzTa9p.js +1 -0
- package/dist/assets/{copy-tH10joFB.js → copy-BtC330Ic.js} +1 -1
- package/dist/assets/{download-DyMeaCfZ.js → download-CEQQi2pw.js} +1 -1
- package/dist/assets/{hostInit-8PN225l2.js → hostInit-Y3VsYAf_.js} +1 -1
- package/dist/assets/index-DuroU2aU.js +4 -0
- package/dist/assets/{key-round-eCBxaKT6.js → key-round-C1aQCNHE.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-137d5c5b.js → mf-entry-bootstrap-0-3e98f17f.js} +2 -2
- package/dist/assets/{pencil-xW8n5CLs.js → pencil-Dw6owGVy.js} +1 -1
- package/dist/assets/plus-CbaF5MYw.js +1 -0
- package/dist/assets/{radio-CWnAI4na.js → radio-CyBw1Cvj.js} +1 -1
- package/dist/assets/{refresh-cw-BKhUNMXQ.js → refresh-cw-CPqFoliO.js} +1 -1
- package/dist/assets/remoteEntry-BXtCFyvA.js +1 -0
- package/dist/assets/{rotate-ccw-BXu8SIv5.js → rotate-ccw-BJL6I3ju.js} +1 -1
- package/dist/assets/rotate-cw-DZGWB7EU.js +1 -0
- package/dist/assets/search-cFwrysqG.js +1 -0
- package/dist/assets/{server-X3K4ldX4.js → server-BgZ85UtO.js} +1 -1
- package/dist/assets/{sparkles-ChgPFrhX.js → sparkles-Dj3mm_rJ.js} +1 -1
- package/dist/assets/square-D-dTwz52.js +1 -0
- package/dist/assets/{square-check-big-Bzz95oCZ.js → square-check-big-CMEqldHV.js} +1 -1
- package/dist/assets/{src-C5tvi19O.js → src-CqVYgpnN.js} +4 -4
- package/dist/assets/{upload-BeG8PyHB.js → upload-tyMJOOSL.js} +1 -1
- package/dist/assets/useDevice-DTk9eLX5.js +1 -0
- package/dist/assets/{useEventInvalidation-Cf9VIpDW.js → useEventInvalidation-CqPABxEF.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BLisQvKo.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-B1bVOGqv.js} +2 -2
- package/dist/assets/{wifi-DYJHTrlD.js → wifi-Do23YMj8.js} +1 -1
- package/dist/assets/{zap-DLiiHws-.js → zap-CZ68wiP1.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/sw.js +1 -1
- package/dist/workbox-14d7584c.js +1 -0
- package/package.json +1 -1
- package/dist/assets/Addons-CWtFT6QM.js +0 -1
- package/dist/assets/DeviceDetail-OXTiYiO9.js +0 -2
- package/dist/assets/IntegrationDetail-Dyg4wlgs.js +0 -1
- package/dist/assets/Network-D5ppyqPS.js +0 -1
- package/dist/assets/Pipeline-CS6lN8Ww.js +0 -1
- package/dist/assets/circle-check-big-is5GRKO9.js +0 -1
- package/dist/assets/index-CAfPe666.js +0 -4
- package/dist/assets/plus-DVpT3Ja2.js +0 -1
- package/dist/assets/remoteEntry-BOZn_K50.js +0 -1
- package/dist/assets/rotate-cw-BO4D9G2F.js +0 -1
- package/dist/assets/search-DyWYI0Yj.js +0 -1
- package/dist/assets/square-Faey8y7b.js +0 -1
- package/dist/assets/useDevice-B7VwJa4X.js +0 -1
- package/dist/workbox-9c191d2f.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e}from"./index-
|
|
1
|
+
import{B as e}from"./index-DuroU2aU.js";var t=e(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e,pn as t,un as n}from"./src-CqVYgpnN.js";import{W as r,X as i}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js";i();function a(e){return t({addonId:e})}function o(e){return n({deviceId:e},{enabled:Number.isFinite(e)})}var s=3e4,c=2e3;function l(t){let n=r(0);return n.current===0&&(n.current=Date.now()),e({parentDeviceId:t},{enabled:Number.isFinite(t),staleTime:0,refetchOnMount:`always`,refetchInterval:e=>{let t=e.state.data;return t&&t.length>0||Date.now()-n.current>=s?!1:c}})}export{l as n,a as r,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./src-
|
|
1
|
+
import"./src-CqVYgpnN.js";import{G as e,R as t,X as n,o as r}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js";import{p as i}from"./player-overlays-DzZKARlk.js";n();function a(n,a){let o=i(),s=r(),[c,l]=e(o.connectionVersion);t(()=>o.subscribeConnectionEvents((e,t)=>{e===`connected`&&l(t)}),[o]);let u=a.join(`|`),d=JSON.stringify(n);t(()=>{let e=[],t=()=>{let e=JSON.parse(d),t=e.length===1&&Array.isArray(e[0])?e:[e];s.invalidateQueries({queryKey:t})};t();for(let n of u.split(`|`))if(n)try{e.push(o.subscribeEvent(n,t))}catch{}return()=>{for(let t of e)t()}},[o,s,u,d,c])}export{a as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-CGRDjIOZ.js","assets/schemas-CuE8EXQ7.js","assets/src-CrhOk7JL.js","assets/src-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-CGRDjIOZ.js","assets/schemas-CuE8EXQ7.js","assets/src-CrhOk7JL.js","assets/src-CqVYgpnN.js","assets/player-overlays-DzZKARlk.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{t as e}from"./vite-preload-helper-zJ_50EbN.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,``):``},d=(e,t)=>{if(`getPublicPath`in e){let n;return n=e.getPublicPath.startsWith(`function`)?Function(`return `+e.getPublicPath)()():Function(e.getPublicPath)(),`${n}${t}`}else if(`publicPath`in e)return!a()&&!o()&&`ssrPublicPath`in e&&typeof e.ssrPublicPath==`string`?`${e.ssrPublicPath}${t}`:`${e.publicPath}${t}`;else return console.warn(`Cannot get resource URL. If in debug mode, please ignore.`,e,t),``},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(`
|
|
3
3
|
`),n=t.filter(e=>!ne.some(t=>e.includes(t)));return n.length?`Stack trace:\n${n.slice(0,5).join(`
|
|
4
4
|
`)}`: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||=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(`
|
|
5
|
-
`)};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 _e(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ve(e){return e.entry!==void 0}function ye(e){return!e.entry.includes(`.json`)}function be(e){return e&&typeof e==`object`}var xe=Object.prototype.toString;function Se(e){return xe.call(e)===`[object Object]`}function Ce(e){return Array.isArray(e)?e:[e]}function we(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Te=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},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 Ee(e,t){return Object.hasOwnProperty.call(e,t)}Ee(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var E=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function De(e){Ee(e,`__VMOK__`)&&!Ee(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),Ee(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),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}De(S),De(C);function Oe(e){S.__FEDERATION__.__INSTANCES__.push(e)}function ke(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ae(e,t=c()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.5.1`)}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}}}else b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var je=()=>C.__FEDERATION__.moduleInfo,Me=(e,t)=>{let n=D(t,_e(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=_e(n),i=D(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},Ne=e=>Me(e,C.__FEDERATION__.moduleInfo),Pe=(e,t)=>{let n=_e(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Fe=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Ie=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Le=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),ze=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Be=`[0-9A-Za-z-]+`,Ve=`(?:\\+(${Be}(?:\\.${Be})*))`,O=`0|[1-9]\\d*`,k=`[0-9]+`,He=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ue=`(?:${k}|${He})`,We=`(?:-?(${Ue}(?:\\.${Ue})*))`,Ge=`(?:${O}|${He})`,Ke=`(?:-(${Ge}(?:\\.${Ge})*))`,qe=`${O}|x|X|\\*`,A=`[v=\\s]*(${qe})(?:\\.(${qe})(?:\\.(${qe})(?:${Ke})?${Ve}?)?)?`,Je=`^\\s*(${A})\\s+-\\s+(${A})\\s*$`,Ye=`[v=\\s]*${`(${k})\\.(${k})\\.(${k})`}${We}?${Ve}?`,Xe=`((?:<|>)?=?)`,Ze=`(\\s*)${Xe}\\s*(${Ye}|${A})`,Qe=`(?:~>?)`,$e=`(\\s*)${Qe}\\s+`,et=`(?:\\^)`,tt=`(\\s*)${et}\\s+`,nt=`(<|>)?=?\\s*\\*`,rt=`^${et}${A}$`,it=`v?${`(${O})\\.(${O})\\.(${O})`}${Ke}?${Ve}?`,at=`^${Qe}${A}$`,ot=`^${Xe}\\s*${A}$`,st=`^${Xe}\\s*(${it})$|^$`,ct=`^\\s*>=\\s*0.0.0\\s*$`;function j(e){return new RegExp(e)}function M(e){return!e||e.toLowerCase()===`x`||e===`*`}function lt(...e){return t=>e.reduce((e,t)=>t(e),t)}function ut(e){return e.match(j(st))}function dt(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function ft(e){return e.replace(j(Je),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=M(n)?``:M(r)?`>=${n}.0.0`:M(i)?`>=${n}.${r}.0`:`>=${t}`,s=M(c)?``:M(l)?`<${Number(c)+1}.0.0-0`:M(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function pt(e){return e.replace(j(Ze),`$1$2$3`)}function mt(e){return e.replace(j($e),`$1~`)}function ht(e){return e.replace(j(tt),`$1^`)}function gt(e){return e.trim().split(/\s+/).map(e=>e.replace(j(rt),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(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 _t(e){return e.trim().split(/\s+/).map(e=>e.replace(j(at),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(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 vt(e){return e.split(/\s+/).map(e=>e.trim().replace(j(ot),(e,t,n,r,i,a)=>{let o=M(n),s=o||M(r),c=s||M(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 yt(e){return e.trim().replace(j(nt),``)}function bt(e){return e.trim().replace(j(ct),``)}function xt(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?xt(t,i):-1:1}return 0}function N(e,t){return xt(e.major,t.major)||xt(e.minor,t.minor)||xt(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 N(e,t)<0;case`>=`:return Ct(e,t)||N(e,t)<0;case`<`:return N(e,t)>0;case`<=`:return Ct(e,t)||N(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return lt(gt,_t,vt,yt)(e)}function Et(e){return lt(ft,pt,mt,ht)(e.trim()).split(/\s+/).join(` `)}function P(e,t){if(!e)return!1;let n=ut(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:dt(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=>bt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=ut(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:dt(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,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 At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Ce(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 F(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?Nt(e,t):!0:!1}function I(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!!P(n(e),`<=${n(t)}`)}var L=(e,t)=>{let n=t||function(e,t){return I(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=F(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&I(e,t):!1:!0:!jt(i[e])&&I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}var R=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=F(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(R(i[t].treeShaking))return R(i[e].treeShaking)?!!I(e,t):!0;if(R(i[e].treeShaking))return!1}return R(i[t])?R(i[e])?!!I(e,t):!0:R(i[e])?!1:I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function z(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=Dt,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=It(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!P(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:u}}else{if(c===!1||c===`*`||P(l,c))return{shared:r,useTreesShaking:u};let n=F(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(F(i.treeShaking,s?.usedExports)&&P(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(P(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).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[L(t,function(e,n){return!jt(t[e])&&I(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 B=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function V(e,t){return t&&e.treeShaking?e.treeShaking:e}function zt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Bt(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}}else 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}}else if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Vt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ht=`RUNTIME-001`,Ut=`RUNTIME-002`,Wt=`RUNTIME-003`,Gt=`RUNTIME-004`,Kt=`RUNTIME-005`,qt=`RUNTIME-006`,Jt=`RUNTIME-007`,Yt=`RUNTIME-008`,Xt=`RUNTIME-009`,Zt=`RUNTIME-010`,Qt=`RUNTIME-011`,$t=`RUNTIME-012`,en=`RUNTIME-013`,tn=`RUNTIME-014`,nn=`RUNTIME-015`,rn=`TYPE-001`,an=`BUILD-001`,on=`BUILD-002`,H={[Ht]:`Failed to get remoteEntry exports.`,[Ut]:`The remote entry interface does not contain "init"`,[Wt]:`Failed to get manifest.`,[Gt]:`Failed to locate remote.`,[Kt]:`Invalid loadShareSync function call from bundler runtime`,[qt]:`Invalid loadShareSync function call from runtime`,[Jt]:`Failed to get remote snapshot.`,[Yt]:`Failed to load script resources.`,[Xt]:`Please call createInstance first.`,[Zt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[Qt]:`The remoteEntry URL is missing from the remote snapshot.`,[$t]:`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.`,[en]:`The manifest is not a valid Module Federation manifest.`,[tn]:`The remote does not expose the requested module.`,[nn]:`Remote container initialization failed.`},sn={[rn]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},cn={[an]:`Failed to find expose module.`,[on]:`PublicPath is required in prod mode.`};({...H,...sn,...cn});var ln=`.then(callbacks[0]).catch(callbacks[1])`;async function un({entry:t,remoteEntryExports:n}){return new Promise((r,i)=>{try{n?r(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${t}")${ln}`)([r,i]):e(()=>import(t).then(r),[]).catch(i)}catch(e){b(`Failed to load ESM entry from "${t}". ${e instanceof Error?e.message:String(e)}`)}})}async function dn({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}")${ln}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function fn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ie(e,t);return i||b(Ht,H,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function pn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ie(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(()=>fn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b(Yt,H,{remoteName:e,resourceUrl:c},n)})}async function mn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;switch(c){case`esm`:case`module`:return un({entry:a,remoteEntryExports:t});case`system`:return dn({entry:a,remoteEntryExports:t});default:return pn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}}function hn(e){let{entry:t,name:n}=e;return u(n,t)}async function gn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=hn(r);if(n)return n;if(!E[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;E[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||mn({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}),e)).catch(async e=>{let i=hn(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>gn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:E,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return E[s]}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 _n(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function vn(e,t){let n=Le(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e?.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function yn(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?!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(yn)??[],shared:t}}}function bn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function xn(e,t){return t.map(t=>{let n=Vt(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:bn(t)}})}function Sn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Cn(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}}async function wn(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 gn({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,Cn(e)?`timeout`:`error`,e)}}function Tn({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,Cn(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 En({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,Cn(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 K(e,t){return{...e,resourceType:t}}function Dn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(wn(t,e,r,K(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:K(i,`css`)}))})}if(r){let n={rel:`preload`,as:`script`};o.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}else{let n={fetchpriority:`high`,type:e?.type===`module`?`module`:`text/javascript`};o.forEach(r=>{c.push(En({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}}return Promise.all(c)}function On(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 kn(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 An=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await gn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:zt(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return y(t,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}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:a,initScope:o}=kn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});i?.init===void 0&&b(Ut,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 i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(nn,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:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}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(tn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:On(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=Te(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)}}},q=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()}},J=class extends q{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 jn(e,t){if(!be(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Y=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(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(jn(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}},X=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(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&&jn(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)}},Z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){y(Se(e),`Plugin configuration is invalid.`);let n=e.name;y(n,`A name must be provided by the plugin.`),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(t),Object.keys(this.lifecycle).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.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}};function Mn(e,t){let n=we(t);n.url||b(Qt,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 Nn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ve(t)||!ye(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:zt(t.name,r)});Mn(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Dn(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Pn(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 Fn(e,t,n,r,i={},a){let{value:o}=D(e,_e(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=Pn(r),a=s.remotesInfo[r];Fn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var In=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Ln(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(Fn(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=bn(e)}else if(p===!0)i=f;else return;let c=d(t,we(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=Sn(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}),!Re(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))),ze(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=z(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&&Ce(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!In(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!In(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!In(`script`,e.url))}}var Rn=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 ve(i)&&ye(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Mn(r,o),Ln(t,n,r,a,o))}}};function zn(e,t){let n=Ne({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:je(),remoteSnapshot:Ne({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:Ne({name:e.name,version:`version`in e?e.version:void 0})}}var Bn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Z({beforeLoadRemoteSnapshot:new J(`beforeLoadRemoteSnapshot`),loadSnapshot:new X(`loadGlobalSnapshot`),loadRemoteSnapshot:new X(`loadRemoteSnapshot`),afterLoadSnapshot:new X(`afterLoadSnapshot`)}),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=Ne({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Fe({[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=Pe({...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(ve(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Pe(e,r);u=r,d=i}else b(Jt,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 zn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=U(t),i=this.manifestCache.get(e);if(i)return i;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,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],b(Wt,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,W(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&b(en,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.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]}},Vn=class{constructor(e){this.hooks=new Z({beforeRegisterShare:new Y(`beforeRegisterShare`),afterResolve:new X(`afterResolve`),beforeLoadShare:new X(`beforeLoadShare`),loadShare:new J,afterLoadShare:new q(`afterLoadShare`),errorLoadShare:new q(`errorLoadShare`),resolveShare:new Y(`resolveShare`),initContainerShareScopeMap:new Y(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){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})}catch(e){x(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}),this.shareScopeMap[r]?.[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r?.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,y(i,`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 a=i,{shared:o,useTreesShaking:s}=z(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=V(o,s);if(t.lib)return B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}else{let r=(async()=>{let e=await t.get();return B(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}else{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=F(a.treeShaking),i=V(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,B(i,n.options.name);let{shared:r,useTreesShaking:o}=z(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=V(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{let{version:n,eager:r}=t;l[e]=l[e]||{};let i=l[e],a=i[n]&&V(i[n]),o=!!(a&&(`eager`in a&&a.eager||`shareConfig`in a&&a.shareConfig?.eager));(!a||a.strategy!==`loaded-first`&&!a.loaded&&(!r==!o?c>i[n].from:r))&&(i[n]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}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,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r?.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=z(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return B(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return B(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&b(t?.from===`build`?Kt:qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.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:r,error:t}),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)};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)}},Hn=class{constructor(e){this.hooks=new Z({beforeRegisterRemote:new Y(`beforeRegisterRemote`),registerRemote:new Y(`registerRemote`),beforeRequest:new X(`beforeRequest`),afterMatchRemote:new J(`afterMatchRemote`),onLoad:new J(`onLoad`),afterLoadRemote:new J(`afterLoadRemote`),handlePreloadModule:new q(`handlePreloadModule`),errorLoadRemote:new J(`errorLoadRemote`),beforePreloadRemote:new J(`beforePreloadRemote`),generatePreloadAssets:new J(`generatePreloadAssets`),afterPreloadRemote:new J(`afterPreloadRemote`),loadEntry:new J}),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};return}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=Bt(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=xn(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:zt(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 Dn(s,t,l,!0,{initiator:`preloadRemote`,id:i});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})})}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=Bt(t.options.remotes,i);if(!a)try{b(Gt,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 An(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||=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}),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=t.moduleCache.get(e.name);if(i){let n=i.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let a=hn(i.remoteInfo);E[a]&&delete E[a],t.snapshotHandler.manifestCache.delete(n.entry);let o=n.buildVersion?u(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===o:e.name===o);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];o=e.options.id||o;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[o]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}let{hostGlobalSnapshot:c}=zn(e,t);if(c){let t=c&&`remotesInfo`in c&&c.remotesInfo&&D(c.remotesInfo,e.name).key;t&&(delete c.remotesInfo[t],w.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete w.__FEDERATION__.__MANIFEST_LOADING__[t])}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},Un=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN==`boolean`?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Wn=class{constructor(e){this.hooks=new Z({beforeInit:new Y(`beforeInit`),init:new q,beforeInitContainer:new X(`beforeInitContainer`),initContainer:new X(`initContainer`)}),this.version=`2.5.1`,this.moduleCache=new Map,this.loaderHook=new Z({getModuleInfo:new q,createScript:new q,createLink:new q,fetch:new J,loadEntryError:new J,afterLoadEntry:new J(`afterLoadEntry`),beforeInitRemote:new J(`beforeInitRemote`),afterInitRemote:new J(`afterInitRemote`),beforeGetExpose:new J(`beforeGetExpose`),afterGetExpose:new J(`afterGetExpose`),beforeExecuteFactory:new J(`beforeExecuteFactory`),afterExecuteFactory:new J(`afterExecuteFactory`),getModuleFactory:new J}),this.bridgeHook=new Z({beforeBridgeRender:new q,afterBridgeRender:new q,beforeBridgeDestroy:new q,afterBridgeDestroy:new q});let t=Un?[Nn(),Rn()]:[],n={id:_n(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=new Bn(this),this.sharedHandler=new Vn(this),this.remoteHandler=new Hn(this),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(Zt,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=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){let r=U({name:e,entry:t}),i=new An({host:this,remoteInfo:r});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}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{allShareInfos:n}=At(e,t),{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){let t=vn(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};function Gn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Kn(e,t){let n=Gn();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))}function qn(e){let t=new((ke())||Wn)({id:`${e.name}@${e.version||Date.now()}`,...e});return Oe(t),t}var Q=null;function Jn(e){let t=Kn(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),Q||=t,t):(Q=qn(n),Q)}function Yn(...e){return y(Q,Xt,H),Q.loadRemote.apply(Q,e)}function Xn(...e){return y(Q,Xt,H),Q.registerRemotes.apply(Q,e)}function Zn(e){return e?S.__FEDERATION__.__INSTANCES__.find(e)||null:Q}Ae(Wn),typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var Qn=`__mf_init__virtual:mf:__mfe_internal__admin_ui_host__mf_v__runtimeInit__mf_v__.js__`,$n=globalThis[Qn];if(!$n){let e,t,n=new Promise((n,r)=>{e=n,t=r});$n=globalThis[Qn]={initPromise:n,initResolve:e,initReject:t}}var er=$n.initResolve,tr=`__mf_module_cache__`;globalThis[tr]||={share:{},remote:{}},globalThis[tr].share||={},globalThis[tr].remote||={};var $=globalThis[tr],nr={},rr=`default`,ir=`admin_ui_host`,ar,or;async function sr(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}async function cr(){return ar||=sr(()=>e(()=>import(`./_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Cus-LW9c.js`),[])).catch(e=>{throw ar=void 0,e}),ar}async function lr(){return or||=sr(()=>e(()=>import(`./virtualExposes-SIMIW5lI.js`),[])).then(e=>e.default??e).catch(e=>{throw or=void 0,e}),or}async function ur(t={},n=[]){let r=(e,t,n,r)=>{let i=((Array.isArray(r)?r[0]:r)||`default`)+`:`;return t||!n?i+e:i+e+`@`+n},{usedShared:i,usedRemotes:a}=await cr();try{let e=globalThis.__FEDERATION__?.__SHARE__;if(e){let t=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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t};for(let[,n]of Object.entries(e)){let e=n?.default;if(e)for(let[n,a]of Object.entries(e))for(let[e,o]of Object.entries(a)){if(!o.lib)continue;let a=r(n,o.shareConfig?.singleton,e,`default`);if($.share[a]!==void 0)continue;let s=typeof o.lib==`function`?o.lib():o.lib,c=t(await Promise.resolve(s));$.share[a]=c;let l=i?.[n];if(o.shareConfig?.singleton&&l){let e=r(n,l.shareConfig?.singleton,l.version,l.scope);$.share[e]===void 0&&($.share[e]=c)}}}}}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}for(let[e,t]of Object.entries(i)){let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if($.share[n]!==void 0)continue;let i=r(e,!0,t.version,t.scope);$.share[i]!==void 0&&($.share[n]=$.share[i])}if($.share[`default:react`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js`).then(e=>(e.X(),e.Y)),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react`]=r}if($.share[`default:react-dom`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-C1rR7FKs.js`).then(e=>(e.r(),e.n)),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom`]=r}if($.share[`default:react/jsx-runtime`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js`).then(e=>e.S),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react/jsx-runtime`]=r}if($.share[`default:@camstack/types`]===void 0){let t=await e(()=>import(`./dist-CGRDjIOZ.js`),__vite__mapDeps([0,1])),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/types`]=r}if($.share[`default:@camstack/sdk`]===void 0){let t=await e(()=>import(`./dist-mzJ_Pmak.js`),__vite__mapDeps([2,1])),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/sdk`]=r}if($.share[`default:@tanstack/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js`).then(e=>e._),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@tanstack/react-query`]=r}if($.share[`default:@trpc/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js`).then(e=>e.k),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/client`]=r}if($.share[`default:@trpc/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DEeasWo3.js`).then(e=>e.n),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/react-query`]=r}if($.share[`default:konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js`).then(e=>e.t),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:konva`]=r}if($.share[`default:react-konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-PYw2UAZ_.js`).then(e=>e.l),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-konva`]=r}if($.share[`default:@camstack/ui-library`]===void 0){let t=await e(()=>import(`./src-C5tvi19O.js`).then(e=>e.t),__vite__mapDeps([3,1,2,4])),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/ui-library`]=r}if($.share[`default:react-dom/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DQOBkcAT.js`).then(e=>e.n),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom/client`]=r}let o=[],s=globalThis.window===void 0?await Promise.all([]):[],c=Jn({name:ir,remotes:a,shared:i,plugins:[...o,...s],shareStrategy:`version-first`});var l=nr[rr];if(l||=nr[rr]={from:ir},!(n.indexOf(l)>=0)){n.push(l),c.initShareScopeMap(`default`,t),er(c);try{await sr(async()=>{await Promise.all(await c.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}for(let[e,n]of Object.entries(i)){let i=r(e,n.shareConfig?.singleton,n.version,n.scope);if(n.shareConfig?.import!==!1||$.share[i]!==void 0)continue;let a=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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},o=t?.[e],s=o&&o[Object.keys(o)[0]];if(!s)continue;let c=s.lib||(s.loading?await s.loading:await s.get?.()),l=typeof c==`function`?c():c,u=await Promise.resolve(l);$.share[i]=a(u)}return c}}async function dr(e){let t=await lr();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(e=>()=>e)}export{Yn as a,Jn as i,ur as n,Xn as o,Zn as r,dr as t};
|
|
5
|
+
`)};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 _e(e){return`version`in e&&e.version?`${e.name}:${e.version}`:`entry`in e&&e.entry?`${e.name}:${e.entry}`:`${e.name}`}function ve(e){return e.entry!==void 0}function ye(e){return!e.entry.includes(`.json`)}function be(e){return e&&typeof e==`object`}var xe=Object.prototype.toString;function Se(e){return xe.call(e)===`[object Object]`}function Ce(e){return Array.isArray(e)?e:[e]}function we(e){return`remoteEntry`in e?{url:e.remoteEntry,type:e.remoteEntryType,globalName:e.globalName}:{url:``,type:`global`,globalName:``}}var Te=(e,t)=>{let n;return n=e.endsWith(`/`)?e.slice(0,-1):e,t.startsWith(`.`)&&(t=t.slice(1)),n+=t,n},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 Ee(e,t){return Object.hasOwnProperty.call(e,t)}Ee(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`)||T(S,`__GLOBAL_LOADING_REMOTE_ENTRY__`,{});var E=S.__GLOBAL_LOADING_REMOTE_ENTRY__;function De(e){Ee(e,`__VMOK__`)&&!Ee(e,`__FEDERATION__`)&&T(e,`__FEDERATION__`,e.__VMOK__),Ee(e,`__FEDERATION__`)||(T(e,`__FEDERATION__`,{__GLOBAL_PLUGIN__:[],__INSTANCES__:[],moduleInfo:{},__SHARE__:{},__MANIFEST_LOADING__:{},__PRELOADED_MAP__:new Map}),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}De(S),De(C);function Oe(e){S.__FEDERATION__.__INSTANCES__.push(e)}function ke(){return S.__FEDERATION__.__DEBUG_CONSTRUCTOR__}function Ae(e,t=c()){t&&(S.__FEDERATION__.__DEBUG_CONSTRUCTOR__=e,S.__FEDERATION__.__DEBUG_CONSTRUCTOR_VERSION__=`2.5.1`)}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}}}else b(`getInfoWithoutType: "key" must be a string, got ${typeof t} (${JSON.stringify(t)}).`)}var je=()=>C.__FEDERATION__.moduleInfo,Me=(e,t)=>{let n=D(t,_e(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=_e(n),i=D(C.__FEDERATION__.moduleInfo,r).value;if(i?.version===t)return i}},Ne=e=>Me(e,C.__FEDERATION__.moduleInfo),Pe=(e,t)=>{let n=_e(e);return C.__FEDERATION__.moduleInfo[n]=t,C.__FEDERATION__.moduleInfo},Fe=e=>(C.__FEDERATION__.moduleInfo={...C.__FEDERATION__.moduleInfo,...e},()=>{let t=Object.keys(e);for(let e of t)delete C.__FEDERATION__.moduleInfo[e]}),Ie=(e,t)=>{let n=t||`__FEDERATION_${e}:custom__`;return{remoteEntryKey:n,entryExports:S[n]}},Le=()=>C.__FEDERATION__.__GLOBAL_PLUGIN__,Re=e=>S.__FEDERATION__.__PRELOADED_MAP__.get(e),ze=e=>S.__FEDERATION__.__PRELOADED_MAP__.set(e,!0),Be=`[0-9A-Za-z-]+`,Ve=`(?:\\+(${Be}(?:\\.${Be})*))`,O=`0|[1-9]\\d*`,k=`[0-9]+`,He=`\\d*[a-zA-Z-][a-zA-Z0-9-]*`,Ue=`(?:${k}|${He})`,We=`(?:-?(${Ue}(?:\\.${Ue})*))`,Ge=`(?:${O}|${He})`,Ke=`(?:-(${Ge}(?:\\.${Ge})*))`,qe=`${O}|x|X|\\*`,A=`[v=\\s]*(${qe})(?:\\.(${qe})(?:\\.(${qe})(?:${Ke})?${Ve}?)?)?`,Je=`^\\s*(${A})\\s+-\\s+(${A})\\s*$`,Ye=`[v=\\s]*${`(${k})\\.(${k})\\.(${k})`}${We}?${Ve}?`,Xe=`((?:<|>)?=?)`,Ze=`(\\s*)${Xe}\\s*(${Ye}|${A})`,Qe=`(?:~>?)`,$e=`(\\s*)${Qe}\\s+`,et=`(?:\\^)`,tt=`(\\s*)${et}\\s+`,nt=`(<|>)?=?\\s*\\*`,rt=`^${et}${A}$`,it=`v?${`(${O})\\.(${O})\\.(${O})`}${Ke}?${Ve}?`,at=`^${Qe}${A}$`,ot=`^${Xe}\\s*${A}$`,st=`^${Xe}\\s*(${it})$|^$`,ct=`^\\s*>=\\s*0.0.0\\s*$`;function j(e){return new RegExp(e)}function M(e){return!e||e.toLowerCase()===`x`||e===`*`}function lt(...e){return t=>e.reduce((e,t)=>t(e),t)}function ut(e){return e.match(j(st))}function dt(e,t,n,r){let i=`${e}.${t}.${n}`;return r?`${i}-${r}`:i}function ft(e){return e.replace(j(Je),(e,t,n,r,i,a,o,s,c,l,u,d)=>(t=M(n)?``:M(r)?`>=${n}.0.0`:M(i)?`>=${n}.${r}.0`:`>=${t}`,s=M(c)?``:M(l)?`<${Number(c)+1}.0.0-0`:M(u)?`<${c}.${Number(l)+1}.0-0`:d?`<=${c}.${l}.${u}-${d}`:`<=${s}`,`${t} ${s}`.trim()))}function pt(e){return e.replace(j(Ze),`$1$2$3`)}function mt(e){return e.replace(j($e),`$1~`)}function ht(e){return e.replace(j(tt),`$1^`)}function gt(e){return e.trim().split(/\s+/).map(e=>e.replace(j(rt),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(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 _t(e){return e.trim().split(/\s+/).map(e=>e.replace(j(at),(e,t,n,r,i)=>M(t)?``:M(n)?`>=${t}.0.0 <${Number(t)+1}.0.0-0`:M(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 vt(e){return e.split(/\s+/).map(e=>e.trim().replace(j(ot),(e,t,n,r,i,a)=>{let o=M(n),s=o||M(r),c=s||M(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 yt(e){return e.trim().replace(j(nt),``)}function bt(e){return e.trim().replace(j(ct),``)}function xt(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?xt(t,i):-1:1}return 0}function N(e,t){return xt(e.major,t.major)||xt(e.minor,t.minor)||xt(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 N(e,t)<0;case`>=`:return Ct(e,t)||N(e,t)<0;case`<`:return N(e,t)>0;case`<=`:return Ct(e,t)||N(e,t)>0;case void 0:return!0;default:return!1}}function Tt(e){return lt(gt,_t,vt,yt)(e)}function Et(e){return lt(ft,pt,mt,ht)(e.trim()).split(/\s+/).join(` `)}function P(e,t){if(!e)return!1;let n=ut(e);if(!n)return!1;let[,r,,i,a,o,s]=n,c={operator:r,version:dt(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=>bt(e)).filter(Boolean);if(r.length===0)continue;let i=!0;for(let e of r){let t=ut(e);if(!t){i=!1;break}let[,n,,r,a,o,s]=t;if(!wt({operator:n,version:dt(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,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 At(e,t){let n=t.shared||{},r=t.name,i=Object.keys(n).reduce((e,i)=>{let a=Ce(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 F(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?Nt(e,t):!0:!1}function I(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!!P(n(e),`<=${n(t)}`)}var L=(e,t)=>{let n=t||function(e,t){return I(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=F(r),s=function(e,t){return o?i[e].treeShaking?i[t].treeShaking?!jt(i[e].treeShaking)&&I(e,t):!1:!0:!jt(i[e])&&I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}var R=e=>jt(e)||Mt(e);function Ft(e,t,n,r){let i=e[t][n],a=``,o=F(r),s=function(e,t){if(o){if(!i[e].treeShaking)return!0;if(!i[t].treeShaking)return!1;if(R(i[t].treeShaking))return R(i[e].treeShaking)?!!I(e,t):!0;if(R(i[e].treeShaking))return!1}return R(i[t])?R(i[e])?!!I(e,t):!0:R(i[e])?!1:I(e,t)};if(o){if(a=L(e[t][n],s),a)return{version:a,useTreesShaking:o};o=!1}return{version:L(e[t][n],s),useTreesShaking:o}}function It(e){return e===`loaded-first`?Ft:Pt}function z(e,t,n,r){if(!e)return;let{shareConfig:i,scope:a=Dt,strategy:o,treeShaking:s}=n,c=Array.isArray(a)?a:[a];for(let a of c)if(i&&e[a]&&e[a][t]){let{requiredVersion:c}=i,{version:l,useTreesShaking:u}=It(o)(e,a,t,s),d={shareScopeMap:e,scope:a,pkgName:t,version:l,GlobalFederation:w.__FEDERATION__,shareInfo:n,resolver:()=>{let r=e[a][t][l];if(i.singleton){if(typeof c==`string`&&!P(l,c)){let e=`Version ${l} from ${l&&r.from} of shared singleton module ${t} does not satisfy the requirement of ${n.from} which needs ${c})`;i.strictVersion?b(e):x(e)}return{shared:r,useTreesShaking:u}}else{if(c===!1||c===`*`||P(l,c))return{shared:r,useTreesShaking:u};let n=F(s);if(n){for(let[r,i]of Object.entries(e[a][t]))if(F(i.treeShaking,s?.usedExports)&&P(r,c))return{shared:i,useTreesShaking:n}}for(let[n,r]of Object.entries(e[a][t]))if(P(n,c))return{shared:r,useTreesShaking:!1}}}};return(r.emit(d)||d).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[L(t,function(e,n){return!jt(t[e])&&I(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 B=(e,t)=>{e.useIn||=[],ge(e.useIn,t)};function V(e,t){return t&&e.treeShaking?e.treeShaking:e}function zt(e,t){return!t||t===`.`?e:`${e}/${t.replace(/^\.\//,``)}`}function Bt(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}}else 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}}else if(a===``)return{pkgNameOrAlias:n.alias,expose:`.`,remote:n}}}}function Vt(e,t){for(let n of e)if(t===n.name||n.alias&&t===n.alias)return n}var Ht=`RUNTIME-001`,Ut=`RUNTIME-002`,Wt=`RUNTIME-003`,Gt=`RUNTIME-004`,Kt=`RUNTIME-005`,qt=`RUNTIME-006`,Jt=`RUNTIME-007`,Yt=`RUNTIME-008`,Xt=`RUNTIME-009`,Zt=`RUNTIME-010`,Qt=`RUNTIME-011`,$t=`RUNTIME-012`,en=`RUNTIME-013`,tn=`RUNTIME-014`,nn=`RUNTIME-015`,rn=`TYPE-001`,an=`BUILD-001`,on=`BUILD-002`,H={[Ht]:`Failed to get remoteEntry exports.`,[Ut]:`The remote entry interface does not contain "init"`,[Wt]:`Failed to get manifest.`,[Gt]:`Failed to locate remote.`,[Kt]:`Invalid loadShareSync function call from bundler runtime`,[qt]:`Invalid loadShareSync function call from runtime`,[Jt]:`Failed to get remote snapshot.`,[Yt]:`Failed to load script resources.`,[Xt]:`Please call createInstance first.`,[Zt]:`The name option cannot be changed after initialization. If you want to create a new instance with a different name, please use "createInstance" api.`,[Qt]:`The remoteEntry URL is missing from the remote snapshot.`,[$t]:`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.`,[en]:`The manifest is not a valid Module Federation manifest.`,[tn]:`The remote does not expose the requested module.`,[nn]:`Remote container initialization failed.`},sn={[rn]:`Failed to generate type declaration. Execute the below cmd to reproduce and fix the error.`},cn={[an]:`Failed to find expose module.`,[on]:`PublicPath is required in prod mode.`};({...H,...sn,...cn});var ln=`.then(callbacks[0]).catch(callbacks[1])`;async function un({entry:t,remoteEntryExports:n}){return new Promise((r,i)=>{try{n?r(n):typeof FEDERATION_ALLOW_NEW_FUNCTION<`u`?Function(`callbacks`,`import("${t}")${ln}`)([r,i]):e(()=>import(t).then(r),[]).catch(i)}catch(e){b(`Failed to load ESM entry from "${t}". ${e instanceof Error?e.message:String(e)}`)}})}async function dn({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}")${ln}`)([n,r])}catch(t){b(`Failed to load SystemJS entry from "${e}". ${t instanceof Error?t.message:String(t)}`)}})}function fn(e,t,n){let{remoteEntryKey:r,entryExports:i}=Ie(e,t);return i||b(Ht,H,{remoteName:e,remoteEntryUrl:n,remoteEntryKey:r}),i}async function pn({name:e,globalName:t,entry:n,remoteInfo:r,loaderHook:i,getEntryUrl:a,resourceContext:o}){let{entryExports:s}=Ie(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(()=>fn(e,t,n),t=>{let n=t instanceof Error?t.message:String(t);b(Yt,H,{remoteName:e,resourceUrl:c},n)})}async function mn({remoteInfo:e,remoteEntryExports:t,loaderHook:n,getEntryUrl:r,resourceContext:i}){let{entry:a,entryGlobalName:o,name:s,type:c}=e;switch(c){case`esm`:case`module`:return un({entry:a,remoteEntryExports:t});case`system`:return dn({entry:a,remoteEntryExports:t});default:return pn({entry:a,globalName:o,name:s,remoteInfo:e,loaderHook:n,getEntryUrl:r,resourceContext:i})}}function hn(e){let{entry:t,name:n}=e;return u(n,t)}async function gn(e){let{origin:t,remoteEntryExports:n,remoteInfo:r,getEntryUrl:i,resourceContext:a,_inErrorHandling:o=!1}=e,s=hn(r);if(n)return n;if(!E[s]){let e=t.remoteHandler.hooks.lifecycle.loadEntry,c=t.loaderHook;E[s]=e.emit({origin:t,loaderHook:c,remoteInfo:r,remoteEntryExports:n}).then(e=>e||mn({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}),e)).catch(async e=>{let i=hn(r),a=e instanceof Error&&e.message.includes(`ScriptExecutionError`);if(e instanceof Error&&e.message.includes(`RUNTIME-008`)&&!a&&!o){let e=await t.loaderHook.lifecycle.loadEntryError.emit({getRemoteEntry:e=>gn({...e,_inErrorHandling:!0}),origin:t,remoteInfo:r,remoteEntryExports:n,globalLoading:E,uniqueKey:i});if(e)return await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,remoteEntryExports:e,recovered:!0}),e}throw await t.loaderHook.lifecycle.afterLoadEntry.emit({origin:t,remoteInfo:r,error:e}),e})}return E[s]}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 _n(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function vn(e,t){let n=Le(),r=[t.hooks,t.remoteHandler.hooks,t.sharedHandler.hooks,t.snapshotHandler.hooks,t.loaderHook,t.bridgeHook];return n.length>0&&n.forEach(t=>{e?.find(e=>e.name!==t.name)&&e.push(t)}),e&&e.length>0&&e.forEach(e=>{r.forEach(n=>{n.applyPlugin(e,t)})}),e}function yn(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?!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(yn)??[],shared:t}}}function bn(e){return{resourceCategory:`sync`,share:!0,depsRemote:!0,...e}}function xn(e,t){return t.map(t=>{let n=Vt(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:bn(t)}})}function Sn(e){return e?e.map(e=>e===`.`?e:e.startsWith(`./`)?e.replace(`./`,``):e):[]}function Cn(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}}async function wn(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 gn({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,Cn(e)?`timeout`:`error`,e)}}function Tn({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,Cn(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 En({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,Cn(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 K(e,t){return{...e,resourceType:t}}function Dn(e,t,n,r=!0,i={initiator:`preloadRemote`,id:e.name}){let{cssAssets:a,jsAssetsWithoutEntry:o,entryAssets:s}=n,c=[];if(t.options.inBrowser){if(s.forEach(n=>{let{moduleInfo:r}=n;c.push(wn(t,e,r,K(i,`remoteEntry`)))}),r){let n={rel:`preload`,as:`style`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`css`)}))})}else{let n={rel:`stylesheet`,type:`text/css`};a.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,needDeleteLink:!1,context:K(i,`css`)}))})}if(r){let n={rel:`preload`,as:`script`};o.forEach(r=>{c.push(Tn({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}else{let n={fetchpriority:`high`,type:e?.type===`module`?`module`:`text/javascript`};o.forEach(r=>{c.push(En({host:t,remoteInfo:e,url:r,attrs:n,context:K(i,`js`)}))})}}return Promise.all(c)}function On(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 kn(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 An=class{constructor({remoteInfo:e,host:t}){this.inited=!1,this.initing=!1,this.lib=void 0,this.remoteInfo=e,this.host=t}async getEntry(e){if(this.remoteEntryExports)return this.remoteEntryExports;let t=await gn({origin:this.host,remoteInfo:this.remoteInfo,remoteEntryExports:this.remoteEntryExports,resourceContext:{initiator:`loadRemote`,id:zt(this.remoteInfo.name,e),resourceType:`remoteEntry`}});return y(t,`remoteEntryExports is undefined \n ${p(this.remoteInfo)}`),this.remoteEntryExports=t,this.remoteEntryExports}async init(e,t,n,r){let i=await this.getEntry(r);if(this.inited)return await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host}),i;if(this.initPromise){try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,cached:!0,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,cached:!0,origin:this.host}),n}return i}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:a,initScope:o}=kn(this.remoteInfo,this.host.shareScopeMap,n),s=await this.host.hooks.lifecycle.beforeInitContainer.emit({shareScope:a,remoteEntryInitOptions:r,initScope:o,remoteInfo:this.remoteInfo,origin:this.host});i?.init===void 0&&b(Ut,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 i.init(s.shareScope,s.initScope,s.remoteEntryInitOptions)}catch(e){b(nn,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:i}),this.inited=!0})();try{await this.initPromise,await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,origin:this.host})}catch(n){throw await this.host.loaderHook.lifecycle.afterInitRemote.emit({id:e,remoteInfo:this.remoteInfo,remoteSnapshot:t,remoteEntryExports:i,error:n,origin:this.host}),n}finally{this.initing=!1,this.initPromise=void 0}return i}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(tn,H,{hostName:this.host.name,remoteName:this.remoteInfo.name,remoteEntryUrl:this.remoteInfo.entry,expose:t,requestId:e,availableExposes:On(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=Te(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)}}},q=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()}},J=class extends q{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 jn(e,t){if(!be(t))return!1;if(e!==t){for(let n in e)if(!(n in t))return!1}return!0}var Y=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(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(jn(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}},X=class extends q{constructor(e){super(),this.onerror=b,this.type=e}emit(e){be(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&&jn(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)}},Z=class{constructor(e){this.registerPlugins={},this.lifecycle=e,this.lifecycleKeys=Object.keys(e)}applyPlugin(e,t){y(Se(e),`Plugin configuration is invalid.`);let n=e.name;y(n,`A name must be provided by the plugin.`),this.registerPlugins[n]||(this.registerPlugins[n]=e,e.apply?.(t),Object.keys(this.lifecycle).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.`),Object.keys(t).forEach(e=>{e!==`name`&&this.lifecycle[e].remove(t[e])})}};function Mn(e,t){let n=we(t);n.url||b(Qt,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 Nn(){return{name:`snapshot-plugin`,async afterResolve(e){let{remote:t,pkgNameOrAlias:n,expose:r,origin:i,remoteInfo:a,id:o}=e;if(!ve(t)||!ye(t)){let{remoteSnapshot:s,globalSnapshot:c}=await i.snapshotHandler.loadRemoteSnapshotInfo({moduleInfo:t,id:zt(t.name,r)});Mn(a,s);let l={remote:t,preloadConfig:{nameOrAlias:n,exposes:[r],resourceCategory:`sync`,share:!1,depsRemote:!1}},u=await i.remoteHandler.hooks.lifecycle.generatePreloadAssets.emit({origin:i,preloadOptions:l,remoteInfo:a,remote:t,remoteSnapshot:s,globalSnapshot:c});return u&&Dn(a,i,u,!1,{initiator:`loadRemote`,id:o}).catch(()=>void 0),{...e,remoteSnapshot:s}}return e}}}function Pn(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 Fn(e,t,n,r,i={},a){let{value:o}=D(e,_e(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=Pn(r),a=s.remotesInfo[r];Fn(e,{name:t.name,version:a.matchedVersion},n,!1,i,void 0)}}}var In=(e,t)=>document.querySelector(`${e}[${e===`link`?`href`:`src`}="${t}"]`);function Ln(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(Fn(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=bn(e)}else if(p===!0)i=f;else return;let c=d(t,we(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=Sn(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}),!Re(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))),ze(c))}}},!0,{},i),i.shared&&i.shared.length>0){let t=(t,n)=>{let{shared:r}=z(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&&Ce(r).forEach(n=>{t(n,e)})})}let m=o.filter(e=>!c.has(e)&&!In(`script`,e));return{cssAssets:a.filter(e=>!l.has(e)&&!In(`link`,e)),jsAssetsWithoutEntry:m,entryAssets:s.filter(e=>!In(`script`,e.url))}}var Rn=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 ve(i)&&ye(i)?{cssAssets:[],jsAssetsWithoutEntry:[],entryAssets:[{name:i.name,url:i.entry,moduleInfo:{name:r.name,entry:i.entry,type:r.type||`global`,entryGlobalName:``,shareScope:``}}]}:(Mn(r,o),Ln(t,n,r,a,o))}}};function zn(e,t){let n=Ne({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:je(),remoteSnapshot:Ne({name:e.name,version:r.matchedVersion})}:{hostGlobalSnapshot:void 0,globalSnapshot:je(),remoteSnapshot:Ne({name:e.name,version:`version`in e?e.version:void 0})}}var Bn=class{constructor(e){this.loadingHostSnapshot=null,this.manifestCache=new Map,this.hooks=new Z({beforeLoadRemoteSnapshot:new J(`beforeLoadRemoteSnapshot`),loadSnapshot:new X(`loadGlobalSnapshot`),loadRemoteSnapshot:new X(`loadRemoteSnapshot`),afterLoadSnapshot:new X(`afterLoadSnapshot`)}),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=Ne({name:this.HostInstance.options.name,version:this.HostInstance.options.version});i||(i={version:this.HostInstance.options.version||``,remoteEntry:``,remotesInfo:{}},Fe({[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=Pe({...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(ve(e)){let r=await this.loadManifestSnapshot(e.entry,e,{},{initiator:n,id:t||e.name}),i=Pe(e,r);u=r,d=i}else b(Jt,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 zn(e,this.HostInstance)}async getManifestJson(e,t,n,r){return(async()=>{let n=U(t),i=this.manifestCache.get(e);if(i)return i;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,{})),i=await t.json()}catch(r){i=await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:r,from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),i||(delete this.manifestLoading[e],b(Wt,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name},`${r}`,W(this.HostInstance.options)))}let a=[!i.metaData&&`metaData`,!i.exposes&&`exposes`,!i.shared&&`shared`].filter(Boolean);return a.length>0&&await this.HostInstance.remoteHandler.hooks.lifecycle.errorLoadRemote.emit({id:e,error:Error(`"${e}" is not a valid federation manifest for remote "${t.name}". Missing required fields: ${a.join(`, `)}.`),from:`runtime`,lifecycle:`afterResolve`,remote:n,origin:this.HostInstance}),a.length>0&&b(en,H,{manifestUrl:e,moduleName:t.name,hostName:this.HostInstance.options.name,missingFields:a.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]}},Vn=class{constructor(e){this.hooks=new Z({beforeRegisterShare:new Y(`beforeRegisterShare`),afterResolve:new X(`afterResolve`),beforeLoadShare:new X(`beforeLoadShare`),loadShare:new J,afterLoadShare:new q(`afterLoadShare`),errorLoadShare:new q(`errorLoadShare`),resolveShare:new Y(`resolveShare`),initContainerShareScopeMap:new Y(`initContainerShareScopeMap`)}),this.host=e,this.shareScopeMap={},this.initTokens={},this._setGlobalShareScopeMap(e.options)}emitAfterLoadShare({lifecycle:e,pkgName:t,shareInfo:n,selectedShared:r}){try{this.hooks.lifecycle.afterLoadShare.emit({pkgName:t,shareInfo:n,selectedShared:r,shared:this.host.options.shared,shareScopeMap:this.shareScopeMap,lifecycle:e,origin:this.host})}catch(e){x(e)}}emitErrorLoadShare({lifecycle:e,pkgName:t,shareInfo:n,error:r,recovered:i}){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})}catch(e){x(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}),this.shareScopeMap[r]?.[e]||this.setShared({pkgName:e,lib:n.lib,get:n.get,loaded:n.loaded||!!n.lib,shared:n,from:t.name})})})}),{newShareInfos:n,allShareInfos:r}}async loadShare(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared}),i=r;try{r?.scope&&await Promise.all(r.scope.map(async e=>{await Promise.all(this.initializeSharing(e,{strategy:r.strategy}))})),i=(await this.hooks.lifecycle.beforeLoadShare.emit({pkgName:e,shareInfo:r,shared:n.options.shared,origin:n})).shareInfo,y(i,`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 a=i,{shared:o,useTreesShaking:s}=z(this.shareScopeMap,e,i,this.hooks.lifecycle.resolveShare)||{};if(o){let t=V(o,s);if(t.lib)return B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),t.lib;if(t.loading&&!t.loaded){let r=await t.loading;return t.loaded=!0,t.lib||=r,B(t,n.options.name),this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),r}else{let r=(async()=>{let e=await t.get();return B(t,n.options.name),t.loaded=!0,t.lib=e,e})();this.setShared({pkgName:e,loaded:!1,shared:o,from:n.options.name,lib:null,loading:r,treeShaking:s?t:void 0});let i=await r;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:o}),i}}else{if(t?.customShareInfo)return this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,recovered:!0}),!1;let r=F(a.treeShaking),i=V(a,r),o=(async()=>{let t=await i.get();i.lib=t,i.loaded=!0,B(i,n.options.name);let{shared:r,useTreesShaking:o}=z(this.shareScopeMap,e,a,this.hooks.lifecycle.resolveShare)||{};if(r){let e=V(r,o);e.lib=t,e.loaded=!0,r.from=a.from}return t})();this.setShared({pkgName:e,loaded:!1,shared:a,from:n.options.name,lib:null,loading:o,treeShaking:r?i:void 0});let s=await o;return this.emitAfterLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:a,selectedShared:a}),s}}catch(t){throw this.emitErrorLoadShare({lifecycle:`loadShare`,pkgName:e,shareInfo:i,error:t}),t}}initializeSharing(e=Dt,t){let{host:n}=this,r=t?.from,i=t?.strategy,a=t?.initScope,o=[];if(r!==`build`){let{initTokens:t}=this;a||=[];let n=t[e];if(n||=t[e]={from:this.host.name},a.indexOf(n)>=0)return o;a.push(n)}let s=this.shareScopeMap,c=n.options.name;s[e]||(s[e]={});let l=s[e],u=(e,t)=>{let{version:n,eager:r}=t;l[e]=l[e]||{};let i=l[e],a=i[n]&&V(i[n]),o=!!(a&&(`eager`in a&&a.eager||`shareConfig`in a&&a.shareConfig?.eager));(!a||a.strategy!==`loaded-first`&&!a.loaded&&(!r==!o?c>i[n].from:r))&&(i[n]=t)},d=async e=>{let{module:t}=await n.remoteHandler.getRemoteModuleAndOptions({id:e}),r;try{r=await t.getEntry()}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,a))}};return Object.keys(n.options.shared).forEach(t=>{n.options.shared[t].forEach(n=>{n.scope.includes(e)&&u(t,n)})}),(n.options.shareStrategy===`version-first`||i===`version-first`)&&n.options.remotes.forEach(t=>{t.shareScope===e&&o.push(d(t.name))}),o}loadShareSync(e,t){let{host:n}=this,r=Rt({pkgName:e,extraOptions:t,shareInfos:n.options.shared});try{r?.scope&&r.scope.forEach(e=>{this.initializeSharing(e,{strategy:r.strategy})});let{shared:i}=z(this.shareScopeMap,e,r,this.hooks.lifecycle.resolveShare)||{};if(i){if(typeof i.lib==`function`)return B(i,n.options.name),i.loaded||(i.loaded=!0,i.from===n.options.name&&(r.loaded=!0)),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),i.lib;if(typeof i.get==`function`){let t=i.get();if(!(t instanceof Promise))return B(i,n.options.name),this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:t,shared:i}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:i}),t}}if(r.lib)return r.loaded||=!0,this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.lib;if(r.get){let i=r.get();return i instanceof Promise&&b(t?.from===`build`?Kt:qt,H,{hostName:n.options.name,sharedPkgName:e},void 0,W(n.options)),r.lib=i,this.setShared({pkgName:e,loaded:!0,from:n.options.name,lib:r.lib,shared:r}),this.emitAfterLoadShare({lifecycle:`loadShareSync`,pkgName:e,shareInfo:r,selectedShared:r}),r.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:r,error:t}),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)};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)}},Hn=class{constructor(e){this.hooks=new Z({beforeRegisterRemote:new Y(`beforeRegisterRemote`),registerRemote:new Y(`registerRemote`),beforeRequest:new X(`beforeRequest`),afterMatchRemote:new J(`afterMatchRemote`),onLoad:new J(`onLoad`),afterLoadRemote:new J(`afterLoadRemote`),handlePreloadModule:new q(`handlePreloadModule`),errorLoadRemote:new J(`errorLoadRemote`),beforePreloadRemote:new J(`beforePreloadRemote`),generatePreloadAssets:new J(`generatePreloadAssets`),afterPreloadRemote:new J(`afterPreloadRemote`),loadEntry:new J}),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};return}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=Bt(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=xn(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:zt(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 Dn(s,t,l,!0,{initiator:`preloadRemote`,id:i});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})})}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=Bt(t.options.remotes,i);if(!a)try{b(Gt,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 An(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||=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}),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=t.moduleCache.get(e.name);if(i){let n=i.remoteInfo,r=n.entryGlobalName;S[r]&&(Object.getOwnPropertyDescriptor(S,r)?.configurable?delete S[r]:S[r]=void 0);let a=hn(i.remoteInfo);E[a]&&delete E[a],t.snapshotHandler.manifestCache.delete(n.entry);let o=n.buildVersion?u(n.name,n.buildVersion):n.name,s=S.__FEDERATION__.__INSTANCES__.findIndex(e=>n.buildVersion?e.options.id===o:e.name===o);if(s!==-1){let e=S.__FEDERATION__.__INSTANCES__[s];o=e.options.id||o;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[o]),i.forEach(([e,n,r,i])=>{delete t[e]?.[n]?.[r]?.[i]}),S.__FEDERATION__.__INSTANCES__.splice(s,1)}let{hostGlobalSnapshot:c}=zn(e,t);if(c){let t=c&&`remotesInfo`in c&&c.remotesInfo&&D(c.remotesInfo,e.name).key;t&&(delete c.remotesInfo[t],w.__FEDERATION__.__MANIFEST_LOADING__[t]&&delete w.__FEDERATION__.__MANIFEST_LOADING__[t])}t.moduleCache.delete(e.name)}}catch(e){he.error(`removeRemote failed: ${e instanceof Error?e.message:String(e)}`)}}},Un=typeof FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN==`boolean`?!FEDERATION_OPTIMIZE_NO_SNAPSHOT_PLUGIN:!0,Wn=class{constructor(e){this.hooks=new Z({beforeInit:new Y(`beforeInit`),init:new q,beforeInitContainer:new X(`beforeInitContainer`),initContainer:new X(`initContainer`)}),this.version=`2.5.1`,this.moduleCache=new Map,this.loaderHook=new Z({getModuleInfo:new q,createScript:new q,createLink:new q,fetch:new J,loadEntryError:new J,afterLoadEntry:new J(`afterLoadEntry`),beforeInitRemote:new J(`beforeInitRemote`),afterInitRemote:new J(`afterInitRemote`),beforeGetExpose:new J(`beforeGetExpose`),afterGetExpose:new J(`afterGetExpose`),beforeExecuteFactory:new J(`beforeExecuteFactory`),afterExecuteFactory:new J(`afterExecuteFactory`),getModuleFactory:new J}),this.bridgeHook=new Z({beforeBridgeRender:new q,afterBridgeRender:new q,beforeBridgeDestroy:new q,afterBridgeDestroy:new q});let t=Un?[Nn(),Rn()]:[],n={id:_n(),name:e.name,plugins:t,remotes:[],shared:{},inBrowser:!0};this.name=e.name,this.options=n,this.snapshotHandler=new Bn(this),this.sharedHandler=new Vn(this),this.remoteHandler=new Hn(this),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(Zt,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=Dt,t){return this.sharedHandler.initializeSharing(e,t)}initRawContainer(e,t,n){let r=U({name:e,entry:t}),i=new An({host:this,remoteInfo:r});return i.remoteEntryExports=n,this.moduleCache.set(e,i),i}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{allShareInfos:n}=At(e,t),{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){let t=vn(e,this);this.options.plugins=this.options.plugins.reduce((e,t)=>(t&&e&&!e.find(e=>e.name===t.name)&&e.push(t),e),t||[])}registerRemotes(e,t){return this.remoteHandler.registerRemotes(e,t)}registerShared(e){this.sharedHandler.registerShared(this.options,{...this.options,shared:e})}};function Gn(){return typeof FEDERATION_BUILD_IDENTIFIER<`u`?FEDERATION_BUILD_IDENTIFIER:``}function Kn(e,t){let n=Gn();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))}function qn(e){let t=new((ke())||Wn)({id:`${e.name}@${e.version||Date.now()}`,...e});return Oe(t),t}var Q=null;function Jn(e){let t=Kn(e.name,e.version),n={...e,id:e.id||``};return t?(t.initOptions(n),Q||=t,t):(Q=qn(n),Q)}function Yn(...e){return y(Q,Xt,H),Q.loadRemote.apply(Q,e)}function Xn(...e){return y(Q,Xt,H),Q.registerRemotes.apply(Q,e)}function Zn(e){return e?S.__FEDERATION__.__INSTANCES__.find(e)||null:Q}Ae(Wn),typeof __VUE_HMR_RUNTIME__>`u`&&(globalThis.__VUE_HMR_RUNTIME__={createRecord(){},rerender(){},reload(){}});var Qn=`__mf_init__virtual:mf:__mfe_internal__admin_ui_host__mf_v__runtimeInit__mf_v__.js__`,$n=globalThis[Qn];if(!$n){let e,t,n=new Promise((n,r)=>{e=n,t=r});$n=globalThis[Qn]={initPromise:n,initResolve:e,initReject:t}}var er=$n.initResolve,tr=`__mf_module_cache__`;globalThis[tr]||={share:{},remote:{}},globalThis[tr].share||={},globalThis[tr].remote||={};var $=globalThis[tr],nr={},rr=`default`,ir=`admin_ui_host`,ar,or;async function sr(e){for(let t=0;;t++)try{return await e()}catch(e){throw e}}async function cr(){return ar||=sr(()=>e(()=>import(`./_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CS4OeMKk.js`),[])).catch(e=>{throw ar=void 0,e}),ar}async function lr(){return or||=sr(()=>e(()=>import(`./virtualExposes-SIMIW5lI.js`),[])).then(e=>e.default??e).catch(e=>{throw or=void 0,e}),or}async function ur(t={},n=[]){let r=(e,t,n,r)=>{let i=((Array.isArray(r)?r[0]:r)||`default`)+`:`;return t||!n?i+e:i+e+`@`+n},{usedShared:i,usedRemotes:a}=await cr();try{let e=globalThis.__FEDERATION__?.__SHARE__;if(e){let t=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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t};for(let[,n]of Object.entries(e)){let e=n?.default;if(e)for(let[n,a]of Object.entries(e))for(let[e,o]of Object.entries(a)){if(!o.lib)continue;let a=r(n,o.shareConfig?.singleton,e,`default`);if($.share[a]!==void 0)continue;let s=typeof o.lib==`function`?o.lib():o.lib,c=t(await Promise.resolve(s));$.share[a]=c;let l=i?.[n];if(o.shareConfig?.singleton&&l){let e=r(n,l.shareConfig?.singleton,l.version,l.scope);$.share[e]===void 0&&($.share[e]=c)}}}}}catch(e){console.error(`[Module Federation] Failed to bridge external shared modules`,e)}for(let[e,t]of Object.entries(i)){let n=r(e,t.shareConfig?.singleton,t.version,t.scope);if($.share[n]!==void 0)continue;let i=r(e,!0,t.version,t.scope);$.share[i]!==void 0&&($.share[n]=$.share[i])}if($.share[`default:react`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js`).then(e=>(e.X(),e.Y)),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react`]=r}if($.share[`default:react-dom`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-C1rR7FKs.js`).then(e=>(e.r(),e.n)),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom`]=r}if($.share[`default:react/jsx-runtime`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js`).then(e=>e.S),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react/jsx-runtime`]=r}if($.share[`default:@camstack/types`]===void 0){let t=await e(()=>import(`./dist-CGRDjIOZ.js`),__vite__mapDeps([0,1])),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/types`]=r}if($.share[`default:@camstack/sdk`]===void 0){let t=await e(()=>import(`./dist-mzJ_Pmak.js`),__vite__mapDeps([2,1])),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/sdk`]=r}if($.share[`default:@tanstack/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js`).then(e=>e._),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@tanstack/react-query`]=r}if($.share[`default:@trpc/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js`).then(e=>e.k),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/client`]=r}if($.share[`default:@trpc/react-query`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DEeasWo3.js`).then(e=>e.n),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@trpc/react-query`]=r}if($.share[`default:konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js`).then(e=>e.t),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:konva`]=r}if($.share[`default:react-konva`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-PYw2UAZ_.js`).then(e=>e.l),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-konva`]=r}if($.share[`default:@camstack/ui-library`]===void 0){let t=await e(()=>import(`./src-CqVYgpnN.js`).then(e=>e.t),__vite__mapDeps([3,1,2,4])),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:@camstack/ui-library`]=r}if($.share[`default:react-dom/client`]===void 0){let t=await e(()=>import(`./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DQOBkcAT.js`).then(e=>e.n),[]),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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t})(t),r=n===t?{...t}:n;Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),$.share[`default:react-dom/client`]=r}let o=[],s=globalThis.window===void 0?await Promise.all([]):[],c=Jn({name:ir,remotes:a,shared:i,plugins:[...o,...s],shareStrategy:`version-first`});var l=nr[rr];if(l||=nr[rr]={from:ir},!(n.indexOf(l)>=0)){n.push(l),c.initShareScopeMap(`default`,t),er(c);try{await sr(async()=>{await Promise.all(await c.initializeSharing(`default`,{strategy:`version-first`,from:`build`,initScope:n}))})}catch(e){console.error(`[Module Federation]`,e)}for(let[e,n]of Object.entries(i)){let i=r(e,n.shareConfig?.singleton,n.version,n.scope);if(n.shareConfig?.import!==!1||$.share[i]!==void 0)continue;let a=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.keys(t).filter(e=>e!=="default").map(e=>t[e]);if(n.length>0&&n.some(e=>e!==void 0))break;t=e}return t},o=t?.[e],s=o&&o[Object.keys(o)[0]];if(!s)continue;let c=s.lib||(s.loading?await s.loading:await s.get?.()),l=typeof c==`function`?c():c,u=await Promise.resolve(l);$.share[i]=a(u)}return c}}async function dr(e){let t=await lr();if(!(e in t))throw Error(`[Module Federation] Module ${e} does not exist in container.`);return t[e]().then(e=>()=>e)}export{Yn as a,Jn as i,ur as n,Xn as o,Zn as r,dr as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e}from"./index-
|
|
1
|
+
import{B as e}from"./index-DuroU2aU.js";var t=e(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e}from"./index-
|
|
1
|
+
import{B as e}from"./index-DuroU2aU.js";var t=e(`mic`,[[`path`,{d:`M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z`,key:`131961`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`line`,{x1:`12`,x2:`12`,y1:`19`,y2:`22`,key:`x3vr5v`}]]),n=e(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),r=e(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);export{n,t as r,r as t};
|
package/dist/index.html
CHANGED
|
@@ -158,13 +158,13 @@
|
|
|
158
158
|
}
|
|
159
159
|
})()
|
|
160
160
|
</script>
|
|
161
|
-
<script type="module" crossorigin src="/assets/mf-entry-bootstrap-0-
|
|
161
|
+
<script type="module" crossorigin src="/assets/mf-entry-bootstrap-0-3e98f17f.js"></script>
|
|
162
162
|
<link rel="modulepreload" crossorigin href="/assets/schemas-CuE8EXQ7.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="/assets/src-CrhOk7JL.js">
|
|
164
164
|
<link rel="modulepreload" crossorigin href="/assets/player-overlays-DzZKARlk.js">
|
|
165
|
-
<link rel="modulepreload" crossorigin href="/assets/src-
|
|
165
|
+
<link rel="modulepreload" crossorigin href="/assets/src-CqVYgpnN.js">
|
|
166
166
|
<link rel="stylesheet" crossorigin href="/assets/index-CTiiXuB_.css">
|
|
167
|
-
<link rel="modulepreload" crossorigin href="/assets/hostInit-
|
|
167
|
+
<link rel="modulepreload" crossorigin href="/assets/hostInit-Y3VsYAf_.js"><link rel="modulepreload" crossorigin href="/assets/index-DuroU2aU.js"><link rel="modulepreload" crossorigin href="/assets/remoteEntry-BXtCFyvA.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CS4OeMKk.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_client__loadShare__.js-CSJxMxg6.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DEeasWo3.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__konva__loadShare__.js-B7XYY0cV.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-C1rR7FKs.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DQOBkcAT.js"><link rel="modulepreload" crossorigin href="/assets/_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-PYw2UAZ_.js"></head>
|
|
168
168
|
<body>
|
|
169
169
|
<div id="root"></div>
|
|
170
170
|
<!-- Lock the app shell at 1x zoom. iOS Safari ignores `user-scalable=no`
|
package/dist/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let
|
|
1
|
+
if(!self.define){let e,t={};const n=(n,s)=>(n=new URL(n+".js",s).href,t[n]||new Promise(t=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=t,document.head.appendChild(e)}else e=n,importScripts(n),t()}).then(()=>{let e=t[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(s,i)=>{const o=e||("document"in self?document.currentScript.src:"")||location.href;if(t[o])return;let r={};const c=e=>n(e,o),m={module:{uri:o},exports:r,require:c};t[o]=Promise.all(s.map(e=>m[e]||c(e))).then(e=>(i(...e),r))}}define(["./workbox-14d7584c"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.registerRoute(({request:e})=>"navigate"===e.mode,new e.NetworkFirst({cacheName:"camstack-admin-html",networkTimeoutSeconds:5,plugins:[new e.ExpirationPlugin({maxEntries:4})]}),"GET"),e.registerRoute(({url:e})=>e.pathname.startsWith("/assets/")||e.pathname.startsWith("/icons/"),new e.NetworkFirst({cacheName:"camstack-admin-assets",plugins:[new e.ExpirationPlugin({maxEntries:200,maxAgeSeconds:86400})]}),"GET")});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
define(["exports"],function(t){"use strict";try{self["workbox:core:7.4.0"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:7.4.0"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class r{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class i extends r{constructor(t,e,s){super(({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)},e,s)}}class a{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)})}addCacheListener(){self.addEventListener("message",t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map(e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})}));t.waitUntil(s),t.ports&&t.ports[0]&&s.then(()=>t.ports[0].postMessage(!0))}})}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:r,route:i}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=i&&i.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:r})}catch(t){c=Promise.reject(t)}const h=i&&i.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch(async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:r})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n})),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const r=this.t.get(s.method)||[];for(const i of r){let r;const a=i.match({url:t,sameOrigin:e,request:s,event:n});if(a)return r=a,(Array.isArray(r)&&0===r.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(r=void 0),{route:i,params:r}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let o;const c=()=>(o||(o=new a,o.addFetchListener(),o.addCacheListener()),o);const h={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},u=t=>[h.prefix,t,h.suffix].filter(t=>t&&t.length>0).join("-"),l=t=>t||u(h.runtime);function f(t){t.then(()=>{})}const w=new Set;function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)({}).hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t},d.apply(null,arguments)}let p,m;const y=new WeakMap,g=new WeakMap,v=new WeakMap,D=new WeakMap,b=new WeakMap;let q={get(t,e,s){if(t instanceof IDBTransaction){if("done"===e)return g.get(t);if("objectStoreNames"===e)return t.objectStoreNames||v.get(t);if("store"===e)return s.objectStoreNames[1]?void 0:s.objectStore(s.objectStoreNames[0])}return E(t[e])},set:(t,e,s)=>(t[e]=s,!0),has:(t,e)=>t instanceof IDBTransaction&&("done"===e||"store"===e)||e in t};function R(t){return t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(m||(m=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(I(this),e),E(y.get(this))}:function(...e){return E(t.apply(I(this),e))}:function(e,...s){const n=t.call(I(this),e,...s);return v.set(n,e.sort?e.sort():[e]),E(n)}}function x(t){return"function"==typeof t?R(t):(t instanceof IDBTransaction&&function(t){if(g.has(t))return;const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",i),t.removeEventListener("abort",i)},r=()=>{e(),n()},i=()=>{s(t.error||new DOMException("AbortError","AbortError")),n()};t.addEventListener("complete",r),t.addEventListener("error",i),t.addEventListener("abort",i)});g.set(t,e)}(t),e=t,(p||(p=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])).some(t=>e instanceof t)?new Proxy(t,q):t);var e}function E(t){if(t instanceof IDBRequest)return function(t){const e=new Promise((e,s)=>{const n=()=>{t.removeEventListener("success",r),t.removeEventListener("error",i)},r=()=>{e(E(t.result)),n()},i=()=>{s(t.error),n()};t.addEventListener("success",r),t.addEventListener("error",i)});return e.then(e=>{e instanceof IDBCursor&&y.set(e,t)}).catch(()=>{}),b.set(e,t),e}(t);if(D.has(t))return D.get(t);const e=x(t);return e!==t&&(D.set(t,e),b.set(e,t)),e}const I=t=>b.get(t);const B=["get","getKey","getAll","getAllKeys","count"],O=["put","add","delete","clear"],k=new Map;function C(t,e){if(!(t instanceof IDBDatabase)||e in t||"string"!=typeof e)return;if(k.get(e))return k.get(e);const s=e.replace(/FromIndex$/,""),n=e!==s,r=O.includes(s);if(!(s in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!B.includes(s))return;const i=async function(t,...e){const i=this.transaction(t,r?"readwrite":"readonly");let a=i.store;return n&&(a=a.index(e.shift())),(await Promise.all([a[s](...e),r&&i.done]))[0]};return k.set(e,i),i}q=(t=>d({},t,{get:(e,s,n)=>C(e,s)||t.get(e,s,n),has:(e,s)=>!!C(e,s)||t.has(e,s)}))(q);try{self["workbox:expiration:7.4.0"]&&_()}catch(t){}const N="cache-entries",j=t=>{const e=new URL(t,location.href);return e.hash="",e.href};class P{constructor(t){this.h=null,this.u=t}l(t){const e=t.createObjectStore(N,{keyPath:"id"});e.createIndex("cacheName","cacheName",{unique:!1}),e.createIndex("timestamp","timestamp",{unique:!1})}p(t){this.l(t),this.u&&function(t,{blocked:e}={}){const s=indexedDB.deleteDatabase(t);e&&s.addEventListener("blocked",t=>e(t.oldVersion,t)),E(s).then(()=>{})}(this.u)}async setTimestamp(t,e){const s={url:t=j(t),timestamp:e,cacheName:this.u,id:this.m(t)},n=(await this.getDb()).transaction(N,"readwrite",{durability:"relaxed"});await n.store.put(s),await n.done}async getTimestamp(t){const e=await this.getDb(),s=await e.get(N,this.m(t));return null==s?void 0:s.timestamp}async expireEntries(t,e){const s=await this.getDb();let n=await s.transaction(N).store.index("timestamp").openCursor(null,"prev");const r=[];let i=0;for(;n;){const s=n.value;s.cacheName===this.u&&(t&&s.timestamp<t||e&&i>=e?r.push(n.value):i++),n=await n.continue()}const a=[];for(const t of r)await s.delete(N,t.id),a.push(t.url);return a}m(t){return this.u+"|"+j(t)}async getDb(){return this.h||(this.h=await function(t,e,{blocked:s,upgrade:n,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=E(a);return n&&a.addEventListener("upgradeneeded",t=>{n(E(a.result),t.oldVersion,t.newVersion,E(a.transaction),t)}),s&&a.addEventListener("blocked",t=>s(t.oldVersion,t.newVersion,t)),o.then(t=>{i&&t.addEventListener("close",()=>i()),r&&t.addEventListener("versionchange",t=>r(t.oldVersion,t.newVersion,t))}).catch(()=>{}),o}("workbox-expiration",1,{upgrade:this.p.bind(this)})),this.h}}class M{constructor(t,e={}){this.v=!1,this.D=!1,this.q=e.maxEntries,this.R=e.maxAgeSeconds,this.I=e.matchOptions,this.u=t,this.B=new P(t)}async expireEntries(){if(this.v)return void(this.D=!0);this.v=!0;const t=this.R?Date.now()-1e3*this.R:0,e=await this.B.expireEntries(t,this.q),s=await self.caches.open(this.u);for(const t of e)await s.delete(t,this.I);this.v=!1,this.D&&(this.D=!1,f(this.expireEntries()))}async updateTimestamp(t){await this.B.setTimestamp(t,Date.now())}async isURLExpired(t){if(this.R){const e=await this.B.getTimestamp(t),s=Date.now()-1e3*this.R;return void 0===e||e<s}return!1}async delete(){this.D=!1,await this.B.expireEntries(1/0)}}try{self["workbox:strategies:7.4.0"]&&_()}catch(t){}const T={cacheWillUpdate:async({response:t})=>200===t.status||0===t.status?t:null};function U(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class W{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}}function S(t){return"string"==typeof t?new Request(t):t}class A{constructor(t,e){this.O={},Object.assign(this,e),this.event=e.event,this._=t,this.k=new W,this.C=[],this.N=[...t.plugins],this.j=new Map;for(const t of this.N)this.j.set(t,{});this.event.waitUntil(this.k.promise)}async fetch(t){const{event:e}=this;let n=S(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const i=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this._.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:i,response:t});return t}catch(t){throw r&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:r.clone(),request:i.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=S(t);let s;const{cacheName:n,matchOptions:r}=this._,i=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},r),{cacheName:n});s=await caches.match(i,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:r,cachedResponse:s,request:i,event:this.event})||void 0;return s}async cachePut(t,e){const n=S(t);var r;await(r=0,new Promise(t=>setTimeout(t,r)));const i=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(a=i.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.P(e);if(!o)return!1;const{cacheName:c,matchOptions:h}=this._,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const r=U(e.url,s);if(e.url===r)return t.match(e,n);const i=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,i);for(const e of a)if(r===U(e.url,s))return t.match(e,n)}(u,i.clone(),["__WB_REVISION__"],h):null;try{await u.put(i,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of w)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:i,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.O[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=S(await t({mode:e,request:n,event:this.event,params:this.params}));this.O[s]=n}return this.O[s]}hasCallback(t){for(const e of this._.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this._.plugins)if("function"==typeof e[t]){const s=this.j.get(e),n=n=>{const r=Object.assign(Object.assign({},n),{state:s});return e[t](r)};yield n}}waitUntil(t){return this.C.push(t),t}async doneWaiting(){for(;this.C.length;){const t=this.C.splice(0),e=(await Promise.allSettled(t)).find(t=>"rejected"===t.status);if(e)throw e.reason}}destroy(){this.k.resolve(null)}async P(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class L{constructor(t={}){this.cacheName=l(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,r=new A(this,{event:e,request:s,params:n}),i=this.M(r,s,e);return[i,this.T(i,r,s,e)]}async M(t,e,n){let r;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(r=await this.U(e,t),!r||"error"===r.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const i of t.iterateCallbacks("handlerDidError"))if(r=await i({error:s,event:n,request:e}),r)break;if(!r)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))r=await s({event:n,request:e,response:r});return r}async T(t,e,s,n){let r,i;try{r=await t}catch(i){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:r}),await e.doneWaiting()}catch(t){t instanceof Error&&(i=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:r,error:i}),e.destroy(),i)throw i}}t.ExpirationPlugin=class{constructor(t={}){this.cachedResponseWillBeUsed=async({event:t,request:e,cacheName:s,cachedResponse:n})=>{if(!n)return null;const r=this.W(n),i=this.S(s);f(i.expireEntries());const a=i.updateTimestamp(e.url);if(t)try{t.waitUntil(a)}catch(t){}return r?n:null},this.cacheDidUpdate=async({cacheName:t,request:e})=>{const s=this.S(t);await s.updateTimestamp(e.url),await s.expireEntries()},this.A=t,this.R=t.maxAgeSeconds,this.L=new Map,t.purgeOnQuotaError&&function(t){w.add(t)}(()=>this.deleteCacheAndMetadata())}S(t){if(t===l())throw new s("expire-custom-caches-only");let e=this.L.get(t);return e||(e=new M(t,this.A),this.L.set(t,e)),e}W(t){if(!this.R)return!0;const e=this.F(t);if(null===e)return!0;return e>=Date.now()-1e3*this.R}F(t){if(!t.headers.has("date"))return null;const e=t.headers.get("date"),s=new Date(e).getTime();return isNaN(s)?null:s}async deleteCacheAndMetadata(){for(const[t,e]of this.L)await self.caches.delete(t),await e.delete();this.L=new Map}},t.NetworkFirst=class extends L{constructor(t={}){super(t),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(T),this.H=t.networkTimeoutSeconds||0}async U(t,e){const n=[],r=[];let i;if(this.H){const{id:s,promise:a}=this.$({request:t,logs:n,handler:e});i=s,r.push(a)}const a=this.K({timeoutId:i,request:t,logs:n,handler:e});r.push(a);const o=await e.waitUntil((async()=>await e.waitUntil(Promise.race(r))||await a)());if(!o)throw new s("no-response",{url:t.url});return o}$({request:t,logs:e,handler:s}){let n;return{promise:new Promise(e=>{n=setTimeout(async()=>{e(await s.cacheMatch(t))},1e3*this.H)}),id:n}}async K({timeoutId:t,request:e,logs:s,handler:n}){let r,i;try{i=await n.fetchAndCachePut(e)}catch(t){t instanceof Error&&(r=t)}return t&&clearTimeout(t),!r&&i||(i=await n.cacheMatch(e)),i}},t.clientsClaim=function(){self.addEventListener("activate",()=>self.clients.claim())},t.registerRoute=function(t,e,n){let a;if("string"==typeof t){const s=new URL(t,location.href);a=new r(({url:t})=>t.href===s.href,e,n)}else if(t instanceof RegExp)a=new i(t,e,n);else if("function"==typeof t)a=new r(t,e,n);else{if(!(t instanceof r))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}return c().registerRoute(a),a}});
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Bi as t,Ii as n,Ni as r,Q as i,Z as a,_t as o,at as s,ct as c,dr as l,dt as u,et as d,g as ee,ht as f,it as p,lt as te,m,mt as ne,nt as h,ot as re,pt as g,rt as _,tt as ie,ut as v,v as ae,vr as y,vt as oe,yt as b}from"./src-C5tvi19O.js";import{F as x,G as S,L as se,R as C,U as w,W as T,X as E,b as D,o as ce,x as O,y as k}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js";import{p as le}from"./player-overlays-DzZKARlk.js";import{t as A}from"./download-DyMeaCfZ.js";import{t as ue}from"./plus-DVpT3Ja2.js";import{t as j}from"./refresh-cw-BKhUNMXQ.js";import{t as M}from"./search-DyWYI0Yj.js";import{t as N}from"./upload-BeG8PyHB.js";import{A as de,B as P,F,H as fe,P as pe,W as I,b as L,f as me,h as R,i as z,o as B,p as V,s as he,x as H}from"./index-CAfPe666.js";import{t as U}from"./AdminPage-CN6ZMhf0.js";import{t as ge}from"./NodeAddonsSettingsPanel-B4ru8rzf.js";var _e=P(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),W=P(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),ve=P(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),G=P(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]);E();function ye({packageName:e,currentVersion:t,installSource:n,onInstall:r,onClose:i}){let a=n===`upload`||n===`local`,{data:o,isLoading:s}=_({name:e});return O(`div`,{className:`fixed z-50 w-72 rounded-lg border border-border bg-surface shadow-xl overflow-hidden`,style:{top:`auto`,bottom:`auto`},ref:e=>{if(!e)return;let t=e.parentElement?.getBoundingClientRect();if(!t)return;let n=window.innerHeight-t.bottom,r=t.top;n<280&&r>n?(e.style.bottom=`${window.innerHeight-t.top+4}px`,e.style.top=`auto`):(e.style.top=`${t.bottom+4}px`,e.style.bottom=`auto`),e.style.right=`${window.innerWidth-t.right}px`},onClick:e=>e.stopPropagation(),children:[O(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border`,children:[D(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle font-medium`,children:`Versions`}),D(`button`,{type:`button`,onClick:i,className:`text-foreground-subtle hover:text-foreground`,children:D(z,{className:`h-3 w-3`})})]}),a&&O(`div`,{className:`flex items-start gap-2 px-3 py-2 border-b border-border bg-cyan-500/10 text-[10px]`,children:[D(N,{className:`h-3 w-3 mt-0.5 text-cyan-500 shrink-0`}),O(`div`,{className:`text-cyan-700 dark:text-cyan-200`,children:[O(`span`,{className:`font-semibold`,children:[n===`upload`?`Uploaded copy`:`Local copy`,` in place.`]}),` `,`Re-install `,D(`span`,{className:`font-mono`,children:t}),` from npm to track upstream releases again.`]})]}),s&&O(`div`,{className:`flex items-center justify-center gap-2 py-6 text-[10px] text-foreground-subtle`,children:[D(H,{className:`h-3.5 w-3.5 animate-spin`}),`Loading versions...`]}),o&&D(`div`,{className:`max-h-64 overflow-auto divide-y divide-border`,children:o.map(e=>{let n=e.version===t,i=/-(alpha|beta|rc|dev|canary|next)/i.test(e.version);return O(`div`,{className:`flex items-center gap-2 px-3 py-2 text-[11px] ${n?`bg-primary/5`:`hover:bg-surface-hover`} transition-colors`,children:[D(`span`,{className:`font-mono flex-1 ${n?`text-primary font-semibold`:i?`text-amber-400`:`text-foreground`}`,children:e.version}),e.distTags.map(e=>D(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e===`latest`?`bg-emerald-500/15 text-emerald-400`:e===`beta`?`bg-amber-500/15 text-amber-400`:`bg-gray-500/15 text-gray-400`}`,children:e},e)),e.deprecated&&D(`span`,{className:`text-[9px] text-red-400 line-through`,children:`deprecated`}),D(`span`,{className:`text-[9px] text-foreground-subtle shrink-0`,children:new Date(e.publishedAt).toLocaleDateString()}),n&&!a?D(F,{className:`h-3 w-3 text-primary shrink-0`}):D(`button`,{type:`button`,onClick:()=>r(e.version),className:`shrink-0 rounded p-0.5 hover:bg-primary/20 text-foreground-subtle hover:text-primary transition-colors`,title:n?`Re-install ${e.version} from npm`:`Install ${e.version}`,children:D(A,{className:`h-3 w-3`})})]},e.version)})}),o&&o.length===0&&D(`div`,{className:`py-4 text-center text-[10px] text-foreground-subtle`,children:`No versions found`})]})}var K={queued:{icon:W,bg:`bg-muted text-foreground-subtle`,label:`queued`},updating:{icon:H,bg:`bg-primary/10 text-primary`,label:`updating`,spin:!0},"done-pending-restart":{icon:j,bg:`bg-amber-500/10 text-amber-700`,label:`pending restart`},done:{icon:F,bg:`bg-success/10 text-success`,label:`done`},failed:{icon:ve,bg:`bg-danger/10 text-danger`,label:`failed`}};function q({item:e}){let t=K[e.status],n=t.icon;return O(`span`,{className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] rounded ${t.bg}`,title:e.error,children:[D(n,{className:`w-2.5 h-2.5 ${t.spin?`animate-spin`:``}`}),t.label]})}var J=`device-export`;function Y(e){return e.capabilities.some(e=>(typeof e==`string`?e:e.name)===J)}function be({isBundle:e,installSource:t,addonId:n,iconPath:r,color:i}){let[a,o]=S(!1),s=i?{backgroundColor:`${i.startsWith(`#`)?i:`#${i}`}26`}:void 0,c=e?`bg-indigo-500/20 text-indigo-700 dark:text-indigo-300`:`bg-purple-500/20 text-purple-700 dark:text-purple-300`,l=n&&r?`/api/addon-assets/${n}/${r}`:null,u=!!l&&!a;return O(`div`,{className:`relative flex-shrink-0`,children:[D(`div`,{className:`h-9 w-9 rounded-lg flex items-center justify-center ${s?``:c}`,style:s,children:u?D(`img`,{src:l,alt:n,className:`h-5 w-5`,onError:()=>o(!0)}):D(e?G:R,{className:`h-4 w-4`})}),t===`local`&&D(`span`,{className:`absolute -top-1.5 -left-1.5 text-[7px] font-bold leading-none bg-orange-500 text-white px-1 py-0.5 rounded -rotate-12 shadow-sm`,children:`DEV`}),t===`npm`&&D(`span`,{className:`absolute -top-1 -left-1 w-4 h-4 rounded bg-[#cb3837] flex items-center justify-center -rotate-12 shadow-sm`,children:D(`svg`,{viewBox:`0 0 780 250`,className:`w-[11px] h-[11px]`,children:D(`path`,{fill:`#fff`,d:`M240 250h100V50h100v200h340V0H0v250z`})})}),t===`upload`&&D(`span`,{className:`absolute -top-1.5 -left-1.5 flex items-center justify-center h-4 w-4 rounded bg-cyan-500 -rotate-12 shadow-sm`,children:D(N,{className:`h-2.5 w-2.5 text-white`})})]})}function xe({addonId:e}){let t=ce(),{data:n=`inherit`}=d({addonId:e}),r=f({onSuccess:()=>{t.invalidateQueries({queryKey:[[`addons`,`getAddonAutoUpdate`]]})}});return D(`div`,{className:`flex rounded-lg border border-border overflow-hidden text-[10px] font-medium`,children:[`inherit`,`off`,`latest`,`beta`].map(t=>D(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),r.mutate({addonId:e,channel:t})},disabled:r.isPending,className:`px-2.5 py-1 transition-colors capitalize ${n===t?t===`inherit`?`bg-gray-700/50 text-gray-700 dark:text-gray-300`:t===`off`?`bg-gray-700 text-gray-700 dark:text-gray-300`:t===`latest`?`bg-blue-500/20 text-blue-400`:`bg-amber-500/20 text-amber-400`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`} ${t===`inherit`?``:`border-l border-border`}`,children:t},t))})}function Se({addon:e,agents:t=[],clusterStatus:n,hideVersion:i,availableUpdate:a,onUpdate:o,isUpdating:s,bundle:c,bulkItem:l,disabledByBulk:d}){let[f,te]=S(!1),[ne,h]=S(!1),[re,_]=S(!1),[ie,v]=S(!1),[y,b]=S(!1),[x,se]=S(`logs`),C=ce(),w=le(),T=fe(),E=r(),{manifest:M}=e,N=e.installedOn??[],de=!c&&!M.protected&&M.removable!==!1,P=!!c,F=c?.displayName??M.name,I=c?.packageName??M.packageName,L=c?.version??M.packageVersion??M.version,R=c?.installSource??e.installSource,B=c?c.bundle?.description??c.addons[0]?.manifest.description:M.description;!c&&(M.components&&M.components.length>0||t.length);let U=oe({onSuccess:()=>{C.invalidateQueries({queryKey:[[`addons`]]}),C.invalidateQueries({queryKey:[[`addonPages`]]}),C.invalidateQueries({queryKey:[[`capabilities`]]})}}),W=u({onSuccess:()=>{C.invalidateQueries({queryKey:[[`addons`]]})}}),K=p({onSuccess:()=>{C.invalidateQueries({queryKey:[[`addons`]]}),C.invalidateQueries({queryKey:[[`addonPages`]]}),C.invalidateQueries({queryKey:[[`capabilities`]]}),C.invalidateQueries({queryKey:[[`integrations`]]})}}),J=g({onSuccess:()=>{C.invalidateQueries({queryKey:[[`addons`]]}),C.invalidateQueries({queryKey:[[`alerts`]]})}}),X=e.health,Z=X?.phase===`failed`&&!X.inGracePeriod,Ce=Z&&X?.nextRetryAt&&!X.retrying;return O(`div`,{className:`rounded-lg border bg-surface overflow-hidden ${Z?`border-red-500/50`:`border-border`}`,children:[Z&&X&&O(`div`,{className:`bg-danger/10 border-b border-danger/30 px-4 py-2.5 flex items-start gap-2.5`,children:[D(ve,{className:`h-4 w-4 text-danger shrink-0 mt-0.5`}),O(`div`,{className:`flex-1 min-w-0`,children:[O(`div`,{className:`text-xs font-semibold text-danger`,children:[`Failed to load (attempt #`,X.retryCount,`)`]}),D(`div`,{className:`text-[11px] text-foreground mt-0.5 break-words font-mono`,children:X.lastError?.message??`Unknown error`}),Ce&&X.nextRetryAt&&O(`div`,{className:`text-[10px] text-foreground-subtle mt-1`,children:[`Auto-retry at `,new Date(X.nextRetryAt).toLocaleTimeString()]})]}),O(`button`,{type:`button`,disabled:J.isPending||X.retrying,onClick:e=>{e.stopPropagation(),J.mutate({packageName:I})},className:`inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-semibold border border-red-400/40 bg-red-400/10 text-red-700 dark:text-red-300 hover:bg-red-400/20 disabled:opacity-50 disabled:cursor-not-allowed transition-colors shrink-0`,title:`Reset retry counter and force immediate reload`,children:[D(j,{className:`h-3 w-3 ${J.isPending||X.retrying?`animate-spin`:``}`}),`Retry now`]})]}),O(`div`,{className:`flex items-start gap-3 px-4 py-3`,children:[D(be,{isBundle:P||!!M.components&&M.components.length>1,installSource:R,addonId:P?c.addons[0]?.manifest.id:M.id,iconPath:P?c.bundle?.icon??c.addons[0]?.manifest.icon:M.icon,color:P?c.addons[0]?.manifest.color:M.color}),O(`div`,{className:`flex-1 min-w-0`,children:[O(`div`,{className:`flex items-center gap-2`,children:[D(`span`,{className:`text-sm font-semibold text-foreground truncate`,children:F}),O(`span`,{className:`text-[10px] text-foreground-subtle font-mono shrink-0`,children:[`(`,I,`)`]}),P&&O(`span`,{className:`text-[10px] rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium shrink-0 inline-flex items-center gap-1`,children:[D(G,{className:`h-3 w-3`}),c.addons.length]}),l!=null&&D(q,{item:l})]}),B&&D(`p`,{className:`text-[10px] text-foreground-subtle mt-0.5 line-clamp-1`,children:B}),!P&&e.process&&O(`div`,{className:`flex items-center gap-1.5 mt-1`,children:[D(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e.process.mode===`forked`?`bg-blue-500/15 text-blue-400`:`bg-gray-500/15 text-gray-400`}`,children:e.process.mode===`forked`?`forked`:`in-process`}),e.process.pid!=null&&O(`span`,{className:`text-[9px] font-mono text-foreground-subtle`,children:[`PID `,e.process.pid]}),D(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e.process.state===`running`?`bg-emerald-500/15 text-emerald-400`:e.process.state===`crashed`||e.process.state===`failed`?`bg-red-500/15 text-red-400`:`bg-gray-500/15 text-gray-400`}`,children:e.process.state})]})]}),!i&&O(`div`,{className:`relative inline-flex items-center gap-1.5 shrink-0 pt-0.5`,children:[s?O(`span`,{className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-blue-500/30 bg-blue-500/10 text-blue-400`,children:[D(H,{className:`h-3 w-3 animate-spin`}),`Updating to `,a,`…`]}):a&&o?O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),o()},disabled:d,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-semibold border border-primary/40 bg-primary/10 text-primary hover:bg-primary/20 transition-colors animate-pulse disabled:opacity-50 disabled:cursor-not-allowed`,title:`Update to ${a}`,children:[D(A,{className:`h-3 w-3`}),a]}):null,O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),_(e=>!e)},disabled:d,className:[`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-bold font-mono border transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,R===`local`?`border-orange-500/30 bg-orange-500/10 text-orange-400 hover:bg-orange-500/20`:a?`border-amber-500/30 bg-amber-500/10 text-amber-400 hover:bg-amber-500/20`:`border-emerald-500/30 bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20`].join(` `),title:a?`Current ${L} — newer ${a} available`:`View all versions`,children:[L,D(pe,{className:`h-3 w-3 opacity-50`})]}),re&&D(ye,{packageName:I,currentVersion:L,...R?{installSource:R}:{},onInstall:e=>{_(!1),K.mutate({packageName:I,version:e})},onClose:()=>_(!1)})]})]}),!P&&O(`div`,{className:`flex items-center gap-1 px-4 py-1.5 border-t border-border/50 bg-surface-hover/20`,children:[O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),W.mutate({addonId:M.id})},disabled:W.isPending||d,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-border text-foreground-subtle hover:text-blue-400 hover:border-blue-500/30 hover:bg-blue-500/10 disabled:opacity-50 transition-colors`,children:[D(j,{className:`h-3 w-3 ${W.isPending?`animate-spin`:``}`}),`Restart`]}),O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),v(e=>!e)},className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border transition-colors ${ie?`border-primary/30 bg-primary/10 text-primary`:`border-border text-foreground-subtle hover:text-foreground hover:border-primary/30 hover:bg-primary/10`}`,children:[D(V,{className:`h-3 w-3`}),`Logs`]}),!P&&O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),b(!0)},className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border transition-colors ${y?`border-primary/30 bg-primary/10 text-primary`:`border-border text-foreground-subtle hover:text-foreground hover:border-primary/30 hover:bg-primary/10`}`,children:[D(me,{className:`h-3 w-3`}),`Settings`]}),D(`div`,{className:`flex-1`}),de&&O(`button`,{type:`button`,onClick:async e=>{e.stopPropagation(),await E({title:`Uninstall ${M.name}?`,message:`This will remove the addon package and all its data. This action cannot be undone.`,confirmLabel:`Uninstall`,variant:`danger`})&&U.mutate({packageName:M.packageName})},disabled:U.isPending||d,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-border text-foreground-subtle hover:text-red-400 hover:border-red-500/30 hover:bg-red-500/10 disabled:opacity-50 transition-colors`,children:[D(he,{className:`h-3 w-3`}),U.isPending?`Removing...`:`Uninstall`]})]}),n&&n.nodes.length>1&&!P&&O(`div`,{className:`border-t border-border px-4 py-2 bg-muted/10`,children:[D(`div`,{className:`text-[10px] font-medium text-foreground-subtle mb-1.5`,children:`Cluster Deployment`}),D(`div`,{className:`space-y-1`,children:n.nodes.map(e=>O(`div`,{className:`flex items-center gap-2 text-[10px]`,children:[D(`div`,{className:`h-1.5 w-1.5 rounded-full shrink-0 ${e.status===`offline`?`bg-muted-foreground/30`:e.synced?`bg-success`:`bg-amber-500`}`}),D(`span`,{className:`font-medium text-foreground min-w-[60px]`,children:e.name}),D(`span`,{className:`font-mono text-foreground-subtle`,children:e.version}),!e.synced&&e.status!==`offline`&&D(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/20`,children:`outdated`}),e.status===`offline`&&D(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-muted text-muted-foreground`,children:`offline`}),e.synced&&e.status!==`offline`&&D(`span`,{className:`text-[9px] text-success`,children:`synced`})]},e.nodeId))})]}),ie&&!P&&O(`div`,{className:`border-t border-border`,children:[O(`div`,{className:`flex items-center px-4 py-1 bg-surface-hover/20 border-b border-border/50`,children:[O(`div`,{className:`flex rounded border border-border overflow-hidden text-[9px]`,children:[D(`button`,{type:`button`,onClick:()=>se(`logs`),className:`px-2 py-0.5 transition-colors ${x===`logs`?`bg-primary/10 text-primary`:`text-foreground-subtle hover:bg-surface-hover`}`,children:`Logs`}),D(`button`,{type:`button`,onClick:()=>se(`events`),className:`px-2 py-0.5 border-l border-border transition-colors ${x===`events`?`bg-primary/10 text-primary`:`text-foreground-subtle hover:bg-surface-hover`}`,children:`Events`})]}),D(`div`,{className:`flex-1`}),D(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),v(!1)},className:`text-foreground-subtle hover:text-foreground`,children:D(z,{className:`h-3.5 w-3.5`})})]}),x===`logs`&&D(ee,{addonId:M.id,maxHeight:`max-h-64`,showFilters:!1}),x===`events`&&D(m,{addonId:M.id,category:`addon.*`,maxHeight:`max-h-64`})]}),P&&O(k,{children:[D(`button`,{type:`button`,onClick:()=>te(e=>!e),className:`w-full flex items-center justify-center border-t border-border py-1 hover:bg-surface-hover/50 transition-colors`,children:D(f?_e:pe,{className:`h-3.5 w-3.5 text-foreground-subtle`})}),f&&D(`div`,{className:`border-t border-border px-3 py-2 space-y-2`,children:c.addons.map(e=>D(Se,{addon:e,agents:t,hideVersion:!0},e.manifest.id))})]}),y&&!P&&D(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4`,onClick:()=>b(!1),children:O(`div`,{className:`w-full max-w-lg max-h-[80vh] rounded-xl border border-border bg-surface shadow-2xl flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[O(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-border flex-shrink-0`,children:[O(`div`,{className:`flex items-center gap-2`,children:[D(me,{className:`h-4 w-4 text-primary`}),O(`h2`,{className:`text-sm font-semibold text-foreground`,children:[F,` Settings`]})]}),D(`button`,{onClick:()=>b(!1),className:`text-foreground-subtle hover:text-foreground transition-colors p-1 rounded`,children:D(z,{className:`h-4 w-4`})})]}),O(`div`,{className:`flex-1 overflow-y-auto px-5 py-4 space-y-4`,children:[D(ge,{nodeId:`hub`,addonIds:[M.id],level:`global`}),Y(M)&&O(`div`,{children:[D(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Device export`}),D(ae,{addonId:M.id,trpc:w.trpcClient,onOpenDevice:e=>T(`/devices/${e}`)})]}),R===`npm`&&O(`div`,{children:[D(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Auto-Update`}),D(xe,{addonId:M.id})]}),M.components&&M.components.length>0&&O(`div`,{children:[O(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:[`Components (`,M.components.length,`)`]}),D(`div`,{className:`flex flex-wrap gap-1`,children:M.components.map(e=>D(`span`,{className:`text-[10px] rounded bg-background border border-border px-1.5 py-0.5 text-foreground-subtle font-mono`,children:e},e))})]}),t.length>=2&&O(`div`,{children:[D(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Installed on`}),O(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[N.length===0&&D(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Hub (local)`}),N.map(e=>D(`span`,{className:`rounded-full bg-surface-hover border border-border px-2 py-0.5 text-[10px] text-foreground-subtle`,children:e},e)),O(`div`,{className:`relative`,children:[O(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),h(e=>!e)},className:`inline-flex items-center gap-1 rounded-full border border-dashed border-border px-2 py-0.5 text-[10px] text-foreground-subtle hover:text-foreground hover:border-primary transition-colors`,title:`Install on more agents`,children:[D(ue,{className:`h-3 w-3`}),`Add agent`]}),ne&&O(`div`,{className:`absolute left-0 top-full mt-1 z-10 min-w-[160px] rounded-md border border-border bg-surface shadow-lg overflow-hidden`,children:[t.filter(e=>!e.isHub&&!N.includes(e.name)).map(e=>D(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),h(!1)},className:`w-full text-left px-3 py-1.5 text-[10px] text-foreground hover:bg-surface-hover transition-colors`,children:e.name},e.id)),t.filter(e=>!e.isHub&&!N.includes(e.name)).length===0&&D(`div`,{className:`px-3 py-1.5 text-[10px] text-foreground-subtle`,children:`No available agents`})]})]})]})]})]}),D(`div`,{className:`flex items-center justify-end px-5 py-3 border-t border-border flex-shrink-0`,children:D(`button`,{type:`button`,onClick:()=>b(!1),className:`rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,children:`Close`})})]})})]})}function X({addon:e,bulkItem:t,disabledByBulk:n,latestVersion:r,onUpdate:i,onRestart:a,onUninstall:o}){let{isSystem:s}=e,c=r!==null&&r!==e.currentVersion;return O(`tr`,{className:s?`bg-amber-500/5`:``,children:[D(`td`,{className:`px-2 py-1.5`,children:O(`div`,{className:`flex items-center gap-2`,children:[s&&D(L,{className:`w-3 h-3 text-amber-700`,"aria-label":`System package`}),D(`span`,{className:`font-mono text-xs`,children:e.name}),s&&D(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-amber-500/15 text-amber-800 font-medium`,children:`SYSTEM`}),s&&D(`span`,{className:`ml-1 text-[10px] uppercase tracking-wide text-amber-700/80`,title:`Changes require a hub restart`,children:`requires restart`})]})}),D(`td`,{className:`px-2 py-1.5`,children:D(`span`,{className:`font-mono text-xs`,children:e.currentVersion})}),D(`td`,{className:`px-2 py-1.5`,children:D(`span`,{className:`font-mono text-xs`,children:r??`—`})}),D(`td`,{className:`px-2 py-1.5`,children:t!==null&&D(q,{item:t})}),D(`td`,{className:`px-2 py-1.5`,children:O(`div`,{className:`flex items-center gap-1`,children:[c&&D(`button`,{type:`button`,disabled:n,onClick:()=>i(r),className:`text-[10px] px-2 py-0.5 rounded bg-primary/10 text-primary hover:bg-primary/20 disabled:opacity-40`,children:`Update`}),D(`button`,{type:`button`,disabled:n,onClick:a,className:`text-[10px] px-2 py-0.5 rounded bg-muted text-muted-foreground hover:bg-muted/80 disabled:opacity-40`,children:`Restart`}),!s&&D(`button`,{type:`button`,disabled:n,onClick:o,className:`text-[10px] px-2 py-0.5 rounded bg-danger/10 text-danger hover:bg-danger/20 disabled:opacity-40`,children:`Uninstall`})]})})]})}E();var Z=`.tgz,.tar.gz,.zip`;function Ce({onUploadSuccess:e}){let[t,n]=S(!1),r=T(null),i=x(async t=>{n(!0);let r=new FormData;r.append(`file`,t);let i=localStorage.getItem(`camstack_admin_token`)??``;try{(await(await fetch(`/api/addons/upload`,{method:`POST`,headers:{Authorization:`Bearer ${i}`},body:r})).json()).success&&e()}finally{n(!1)}},[e]);return O(k,{children:[D(`input`,{ref:r,type:`file`,accept:Z,onChange:x(e=>{let t=e.target.files?.[0];t&&i(t),e.target.value=``},[i]),className:`hidden`}),O(`button`,{type:`button`,onClick:()=>r.current?.click(),disabled:t,className:`flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,children:[t?D(H,{className:`w-3.5 h-3.5 animate-spin`}):D(N,{className:`w-3.5 h-3.5`}),t?`Uploading...`:`Upload`]})]})}var we={regular:`Updating addons`,system:`Updating system packages`,restarting:`Restarting hub… (~10s)`,finalizing:`Finalizing`};function Te({state:e,onCancel:t}){let n=e.total===0?0:Math.round(e.completed/e.total*100),r=e.phase!==`restarting`&&!e.cancelled&&e.completedAtMs===void 0;return O(`div`,{className:`sticky top-0 z-30 bg-surface border-b border-border px-3 py-2 space-y-1.5`,children:[O(`div`,{className:`flex items-center gap-2 text-xs`,children:[D(H,{className:`w-3.5 h-3.5 animate-spin text-primary`}),D(`span`,{className:`font-medium`,children:we[e.phase]}),D(`span`,{className:`text-foreground-subtle`,children:`·`}),O(`span`,{className:`text-foreground-subtle`,children:[e.completed,`/`,e.total]}),e.current!==null&&O(k,{children:[D(`span`,{className:`text-foreground-subtle`,children:`·`}),D(`span`,{className:`font-mono text-foreground-subtle truncate`,children:e.current})]}),O(`div`,{className:`ml-auto flex items-center gap-2`,children:[e.failed>0&&O(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-danger/10 text-danger`,children:[e.failed,` failed`]}),D(`button`,{type:`button`,onClick:t,disabled:!r,className:`text-[10px] px-2 py-0.5 rounded border border-border hover:bg-surface-hover disabled:opacity-40`,children:`Cancel`})]})]}),D(`div`,{className:`h-1 bg-muted rounded overflow-hidden`,children:D(`div`,{className:`h-full bg-primary transition-[width] duration-200`,style:{width:`${n}%`}})}),e.phase===`system`&&O(`div`,{className:`text-[10px] text-amber-700 flex items-center gap-1`,children:[D(B,{className:`w-3 h-3`}),`System phase: the hub will restart once at the end (~10s).`]})]})}function Ee({pending:e,onCancel:t,onConfirm:n,isPending:r,error:i}){return D(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60`,children:O(`div`,{className:`bg-surface border border-border rounded-md shadow-xl p-5 max-w-md w-full mx-4 space-y-3`,children:[O(`div`,{className:`flex items-center gap-2`,children:[D(B,{className:`w-4 h-4 text-amber-700`}),D(`h3`,{className:`text-sm font-medium text-foreground`,children:`Update system package?`})]}),O(`div`,{className:`space-y-2 text-[11px] text-foreground-subtle`,children:[O(`div`,{children:[D(`span`,{className:`font-mono text-foreground`,children:e.packageName}),D(`span`,{className:`mx-1`,children:`·`}),O(`span`,{className:`font-mono`,children:[`v`,e.fromVersion]}),D(`span`,{className:`mx-1`,children:`→`}),O(`span`,{className:`font-mono text-amber-700`,children:[`v`,e.toVersion]})]}),D(`div`,{className:`rounded border border-amber-500/30 bg-amber-500/10 p-2 text-amber-800`,children:`The hub will restart immediately after the install. Any in-flight requests will be dropped. The reconnect typically takes ~10 seconds.`}),i!==null&&D(`div`,{className:`rounded border border-danger/40 bg-danger/10 p-2 text-danger`,children:i})]}),O(`div`,{className:`flex justify-end gap-2 pt-1`,children:[D(`button`,{type:`button`,onClick:t,disabled:r,className:`px-3 py-1.5 text-[11px] rounded bg-surface hover:bg-surface-hover border border-border disabled:opacity-50`,children:`Cancel`}),O(`button`,{type:`button`,onClick:n,disabled:r,className:`inline-flex items-center gap-1.5 px-3 py-1.5 text-[11px] rounded bg-amber-500/20 text-amber-800 hover:bg-amber-500/30 border border-amber-500/40 font-medium disabled:opacity-50`,children:[r?D(H,{className:`w-3 h-3 animate-spin`}):D(A,{className:`w-3 h-3`}),`Update & restart`]})]})]})})}E();function De(e,t){let n=e??`hub-only`;return n===`any-node`?!0:n===`hub-only`?t:!t}function Oe(e){let t=e;if(!t?.manifest)return null;let n={...t.manifest,name:t.manifest.name??t.manifest.id,version:t.manifest.version??`0.0.0`,capabilities:t.manifest.capabilities??[]},r=t.process,i=r?{pid:r.pid,mode:r.mode===`forked`?`forked`:`in-process`,state:r.state??`unknown`}:void 0,a=t.health,o=t.declaration?.execution,s=t.manifest.execution,c=o?.placement??s?.placement;return{manifest:n,enabled:!0,source:t.source,installSource:t.installSource,installedOn:[],...i?{process:i}:{},hasBackup:t.hasBackup,...a?{health:a}:{},...c?{placement:c}:{}}}function ke(e){let t=new Map,n=[];for(let r of e){let e=r.manifest.packageName;if(!e){n.push(r);continue}let i=t.get(e);if(i)i.addons.push(r);else{let n=r.manifest.bundle,i={packageName:e,displayName:n?.displayName??r.manifest.packageDisplayName??r.manifest.name,version:r.manifest.packageVersion,addons:[r],...r.installSource===void 0?{}:{installSource:r.installSource},...n===void 0?{}:{bundle:n}};t.set(e,i)}}let r=[];for(let e of t.values())e.bundle!==void 0||e.addons.length>=2?r.push({bundle:e,representative:e.addons[0]}):r.push(e.addons[0]);return r.push(...n),r}function Q(e){return`bundle`in e}function Ae({addons:e,clusterStatus:n,selectedNode:r,onRefresh:s,isRefreshing:l}){let u=ce(),[d,ee]=S(``),f=se(d),[m,g]=S(!1),_=T(null);C(()=>{if(!m)return;let e=e=>{_.current&&!_.current.contains(e.target)&&g(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[m]);let{data:v}=te({nodeId:r.id}),ae=w(()=>{let e=new Map;for(let t of v??[])e.set(t.name,t.latestVersion);return e},[v]),[y,oe]=S(null),[E,k]=S(null),le=b({onMutate:e=>{oe(e.name),k(null)},onSuccess:(e,t)=>{oe(null);let n=e;if(n&&n.success===!1){k({name:t.name,message:n.error??`Update failed (no error message returned by server)`});return}u.invalidateQueries({queryKey:[[`addons`]]}),u.invalidateQueries({queryKey:[[`addons`,`listUpdates`]]})},onError:(e,t)=>{oe(null),k({name:t.name,message:e instanceof Error?e.message:String(e)})}}),{data:ue}=ie(void 0),N=a({onSuccess:()=>{u.invalidateQueries({queryKey:[[`addons`,`getAutoUpdateSettings`]]})}}),{data:P,isFetching:fe}=ne({query:f||void 0},{enabled:m}),{data:pe}=re({nodeId:r.id},{staleTime:1/0}),[L,me]=S(null);t(`AddonsBulkUpdateProgress`,e=>{e.data?.nodeId===r.id&&me(e.data)});let R=w(()=>L===null?(pe??[])[0]??null:L,[L,pe]),z=R!==null&&R.completedAtMs===void 0,B=w(()=>R===null?new Map:new Map(R.items.map(e=>[e.name,e])),[R]),V=o(),he=i(),{data:U}=h(void 0),ge=U?.requestedAt,[_e,W]=S(null),[ve,G]=S(!1);C(()=>{if(U?.kind===`framework-bulk-update`&&U.requestedAt!==_e){W(U.requestedAt),G(!0);let e=window.setTimeout(()=>G(!1),6e3);return()=>window.clearTimeout(e)}},[ge,_e,U]);let{data:ye}=c(void 0),[K,q]=S(null),[J,Y]=S(null),be=b({onSuccess:()=>{q(null),u.invalidateQueries({queryKey:[[`addons`]]})},onError:e=>{Y(e instanceof Error?e.message:String(e))}}),xe=x(async()=>{let e=v??[];if(e.length===0)return;let t=e.map(e=>({name:e.name,version:e.latestVersion,isSystem:e.isSystem}));await V.mutateAsync({nodeId:r.id,items:t})},[v,r.id,V]),Z=p({onSuccess:()=>{u.invalidateQueries({queryKey:[[`addons`]]}),u.invalidateQueries({queryKey:[[`addonPages`]]}),u.invalidateQueries({queryKey:[[`capabilities`]]}),u.invalidateQueries({queryKey:[[`integrations`]]})}}),[we,Oe]=S(`type`),[Ae,je]=S(()=>typeof window>`u`?`grouped`:window.localStorage.getItem(`camstack.addons.viewMode`)===`flat`?`flat`:`grouped`),Me=e=>{je(e),typeof window<`u`&&window.localStorage.setItem(`camstack.addons.viewMode`,e)},[Ne,Pe]=I(),$=Ne.get(`capability`),Fe=w(()=>{let t=r.isHub?e:e.filter(e=>De(e.placement,r.isHub));return $&&(t=t.filter(e=>(e.manifest.capabilities??[]).some(e=>(typeof e==`string`?e:e.name)===$))),t},[e,r.isHub,$]),Ie=()=>{let e=new URLSearchParams(Ne);e.delete(`capability`),Pe(e,{replace:!0})},Le=Ae===`flat`?Fe:ke(Fe),Re=w(()=>{let e=[...Le];switch(we){case`type`:e.sort((e,t)=>{let n=+!Q(e),r=+!Q(t);if(n!==r)return n-r;let i=Q(e)?e.bundle.displayName:e.manifest.name,a=Q(t)?t.bundle.displayName:t.manifest.name;return i.localeCompare(a)});break;case`name`:e.sort((e,t)=>{let n=Q(e)?e.bundle.displayName:e.manifest.name,r=Q(t)?t.bundle.displayName:t.manifest.name;return n.localeCompare(r)});break;case`source`:e.sort((e,t)=>{let n=Q(e)?e.bundle.installSource??``:e.installSource??``,r=Q(t)?t.bundle.installSource??``:t.installSource??``;return n.localeCompare(r)});break}return e},[Le,we]);return O(`div`,{className:`space-y-4`,children:[E&&D(`div`,{className:`rounded-md border border-danger/30 bg-danger/5 px-3 py-2 text-[11px]`,children:O(`div`,{className:`flex items-start justify-between gap-3`,children:[O(`div`,{className:`space-y-0.5`,children:[O(`div`,{className:`font-medium text-danger`,children:[`Failed to update `,E.name]}),D(`div`,{className:`text-foreground-subtle font-mono`,children:E.message})]}),D(`button`,{type:`button`,onClick:()=>k(null),className:`text-foreground-subtle hover:text-foreground text-[10px]`,children:`dismiss`})]})}),O(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[O(`div`,{className:`flex items-center gap-1.5`,children:[D(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Sort:`}),O(`select`,{value:we,onChange:e=>Oe(e.target.value),className:`rounded-md border border-border bg-surface px-2 py-1.5 text-[11px] text-foreground focus:outline-none focus:border-primary/50`,children:[D(`option`,{value:`type`,children:`Bundles first`}),D(`option`,{value:`name`,children:`Name`}),D(`option`,{value:`source`,children:`Install source`})]})]}),O(`div`,{className:`flex items-center gap-1.5`,children:[D(`span`,{className:`text-[10px] text-foreground-subtle`,children:`View:`}),D(`div`,{className:`flex rounded-md border border-border overflow-hidden text-[10px] font-medium`,children:[`grouped`,`flat`].map(e=>D(`button`,{type:`button`,onClick:()=>Me(e),className:`px-2.5 py-1.5 transition-colors capitalize ${Ae===e?`bg-primary/10 text-primary`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`}`,title:e===`grouped`?`Group multi-addon packages into a bundle card`:`Show every addon as its own card`,children:e},e))})]}),r.isHub&&O(`div`,{className:`flex items-center gap-1.5`,children:[D(j,{className:`h-3 w-3 text-foreground-subtle`}),D(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Auto-Update:`}),D(`div`,{className:`flex rounded-md border border-border overflow-hidden text-[10px] font-medium`,children:[`off`,`latest`,`beta`].map(e=>D(`button`,{type:`button`,onClick:()=>N.mutate({channel:e}),disabled:N.isPending,className:`px-2.5 py-1.5 transition-colors capitalize ${ue?.channel===e?e===`off`?`bg-gray-700 text-gray-200`:e===`latest`?`bg-blue-500/20 text-blue-400`:`bg-amber-500/20 text-amber-400`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`} ${e===`off`?``:`border-l border-border`}`,children:e},e))})]}),(v?.length??0)>0&&O(`button`,{type:`button`,onClick:()=>void xe(),disabled:V.isPending||z,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 border border-blue-500/30 disabled:opacity-50 transition-colors font-medium`,children:[D(A,{className:`w-3 h-3 ${V.isPending?`animate-bounce`:``}`}),`Update All (`,v.length,`)`]}),O(`button`,{type:`button`,onClick:s,disabled:l||z,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,children:[D(j,{className:`w-3 h-3 ${l?`animate-spin`:``}`}),`Refresh`]})]}),O(`div`,{className:`flex items-center gap-3`,children:[O(`div`,{className:`relative flex-1 min-w-[200px]`,ref:_,children:[D(M,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-foreground-subtle`}),D(`input`,{type:`text`,value:d,onChange:e=>{ee(e.target.value),g(!0)},onFocus:()=>g(!0),placeholder:`Search addons on npm...`,disabled:z,className:`w-full rounded-lg border border-border bg-background pl-9 pr-3 py-2 text-xs text-foreground placeholder:text-foreground-subtle focus:outline-none focus:ring-1 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed`}),fe&&D(H,{className:`absolute right-2.5 top-1/2 -translate-y-1/2 h-3 w-3 text-foreground-subtle animate-spin`}),m&&P&&P.length>0&&O(`div`,{className:`absolute left-0 right-0 top-full mt-1 z-40 rounded-lg border border-border bg-surface shadow-xl overflow-hidden`,children:[P.length>0&&O(`div`,{className:`px-3 py-1.5 text-[10px] uppercase tracking-wide text-foreground-subtle border-b border-border`,children:[`npm results (`,P.length,`)`]}),P&&P.length>0&&D(`div`,{className:`max-h-72 overflow-auto divide-y divide-border`,children:P.map(e=>O(`div`,{className:`flex items-center gap-3 px-3 py-2 hover:bg-surface-hover transition-colors`,children:[D(`div`,{className:`w-6 h-6 rounded-md bg-primary/10 flex items-center justify-center text-primary text-[9px] font-bold shrink-0`,children:e.name.replace(`@camstack/addon-`,``).charAt(0).toUpperCase()}),O(`div`,{className:`flex-1 min-w-0`,children:[O(`div`,{className:`flex items-center gap-2`,children:[D(`span`,{className:`text-[11px] font-semibold truncate`,children:e.name}),O(`span`,{className:`text-[10px] text-foreground-subtle`,children:[`v`,e.version]})]}),e.description&&D(`div`,{className:`text-[10px] text-foreground-subtle truncate`,children:e.description})]}),e.installed?O(`span`,{className:`inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-400 shrink-0`,children:[D(F,{className:`h-3 w-3`}),e.installedVersion??`Installed`]}):O(`button`,{type:`button`,onClick:()=>Z.mutate({packageName:e.name}),disabled:Z.isPending,className:`inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors shrink-0`,children:[Z.isPending?D(H,{className:`h-3 w-3 animate-spin`}):D(A,{className:`h-3 w-3`}),`Install`]})]},e.name))})]})]}),D(Ce,{onUploadSuccess:()=>{u.invalidateQueries({queryKey:[[`addons`]]}),s()}})]}),$&&O(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg bg-primary/10 border border-primary/30 text-sm`,children:[D(`span`,{className:`text-foreground-subtle`,children:`Filtering by capability:`}),D(`span`,{className:`font-mono text-primary font-semibold`,children:$}),D(`button`,{type:`button`,onClick:Ie,className:`ml-auto text-xs text-foreground-subtle hover:text-foreground underline`,children:`Clear`})]}),R!==null&&D(Te,{state:R,onCancel:()=>he.mutate({id:R.id})}),ve&&O(`div`,{className:`fixed top-4 right-4 z-50 flex items-start gap-2 px-3 py-2.5 rounded-md border border-green-500/30 bg-green-500/10 shadow-lg backdrop-blur-sm max-w-sm pointer-events-auto`,children:[D(de,{className:`w-4 h-4 shrink-0 mt-0.5 text-green-400`}),O(`div`,{children:[D(`div`,{className:`text-[11px] font-semibold text-foreground`,children:`Bulk update completed`}),D(`div`,{className:`text-[10px] text-foreground-subtle mt-0.5`,children:`System packages updated — hub restarted successfully.`})]})]}),Fe.length===0&&D(`div`,{className:`text-xs text-foreground-subtle`,children:e.length===0?`No addons installed`:$?`No installed addons declare the "${$}" capability. Browse the npm catalog above to find a compatible addon.`:`No addons compatible with ${r.name} (placement filter active)`}),O(`div`,{className:`space-y-2`,children:[Re.map(e=>{if(Q(e)){let t=e.bundle.packageName,i=ae.get(t);return D(Se,{addon:e.representative,clusterStatus:n?.[e.representative.manifest.id],bundle:e.bundle,availableUpdate:i,isUpdating:y===t,onUpdate:i?()=>le.mutate({name:t,version:i,nodeId:r.id}):void 0,bulkItem:B.get(t)??null,disabledByBulk:z},t)}let t=e.manifest.packageName,i=ae.get(t);return D(Se,{addon:e,clusterStatus:n?.[e.manifest.id],availableUpdate:i,isUpdating:y===t,onUpdate:i?()=>le.mutate({name:e.manifest.packageName,version:i,nodeId:r.id}):void 0,bulkItem:B.get(t)??null,disabledByBulk:z},e.manifest.id)}),r.isHub&&(ye??[]).length>0&&D(`div`,{className:`rounded-md border border-border overflow-x-auto`,children:O(`table`,{className:`w-full text-xs`,children:[D(`thead`,{className:`bg-muted/40`,children:O(`tr`,{className:`text-left text-foreground-subtle`,children:[D(`th`,{className:`px-2 py-1.5 font-medium`,children:`Name`}),D(`th`,{className:`px-2 py-1.5 font-medium`,children:`Current`}),D(`th`,{className:`px-2 py-1.5 font-medium`,children:`Latest`}),D(`th`,{className:`px-2 py-1.5 font-medium`,children:`Status`}),D(`th`,{className:`px-2 py-1.5 font-medium`,children:`Actions`})]})}),D(`tbody`,{children:(ye??[]).map(e=>D(X,{addon:{name:e.packageName,currentVersion:e.currentVersion,isSystem:!0},bulkItem:B.get(e.packageName)??null,disabledByBulk:z,latestVersion:e.latestVersion,onUpdate:t=>{q({packageName:e.packageName,fromVersion:e.currentVersion,toVersion:t})},onRestart:()=>{},onUninstall:()=>{}},e.packageName))})]})})]}),K!==null&&D(Ee,{pending:K,onCancel:()=>{q(null),Y(null)},onConfirm:()=>{Y(null),be.mutate({name:K.packageName,version:K.toVersion})},isPending:be.isPending,error:J})]})}function je(){let t=ce(),{data:r,isLoading:i,isError:a}=s(),{data:o}=l(void 0),{data:c}=y(void 0,{refetchInterval:1e4}),u=w(()=>{let e=new Map;e.set(`hub`,{id:`hub`,name:`Hub`,isHub:!0});for(let t of c??[]){let n=String(t.id??``);n&&e.set(n,{id:n,name:String(t.name??n),isHub:!!t.isHub})}return[...e.values()]},[c]),[d,ee]=S(`hub`),f=u.find(e=>e.id===d)??u[0],p=e(),te=v(),m=p.isPending||te.isPending,ne=async()=>{await p.mutateAsync({nodeId:d}),await te.mutateAsync(),t.invalidateQueries({queryKey:[[`addons`]]})},h=T(p);h.current=p,C(()=>{h.current.mutate({nodeId:`hub`})},[]);let re=(r??[]).map(Oe).filter(e=>e!==null);return O(U,{children:[O(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[D(n,{selectedNodeId:d,onSelect:ee}),O(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[!i&&!a&&O(`span`,{className:`text-[10px] rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium`,children:[re.length,` installed`]}),O(`button`,{type:`button`,onClick:()=>void ne(),disabled:m,className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,title:`Re-fetch addons + check npm for new versions`,children:[D(j,{className:`w-3 h-3 ${m?`animate-spin`:``}`}),`Check for updates`]})]})]}),!f.isHub&&O(`div`,{className:`rounded-md border border-warning/30 bg-warning/5 px-3 py-2 text-[11px] text-foreground-subtle`,children:[`Showing only addons compatible with`,` `,D(`span`,{className:`font-medium text-foreground`,children:f.name}),` — agents only run`,` `,D(`code`,{className:`font-mono`,children:`agent-only`}),` and`,` `,D(`code`,{className:`font-mono`,children:`any-node`}),` addons. Install / uninstall is hub-driven; agents auto-sync from the hub.`]}),i&&D(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:`Loading…`}),a&&D(`div`,{className:`text-xs text-danger`,children:`Failed to load addons`}),!i&&!a&&D(Ae,{addons:re,clusterStatus:o,selectedNode:f,onRefresh:()=>void ne(),isRefreshing:m})]})}export{je as AddonsPage};
|