@ebay/muse-boot-default
Advanced tools
Sorry, the diff of this file is not supported yet
| { | ||
| "name": "@ebay/muse-boot-default", | ||
| "type": "boot", | ||
| "deps": [], | ||
| "branch": "release", | ||
| "sha": "5efeba5f4b9cb2253977c78ce0c0b2dd317169e5", | ||
| "repo": "https://github.com/ebay/Muse", | ||
| "size": { | ||
| "main": 5523, | ||
| "chunks": 5523, | ||
| "media": 20732 | ||
| }, | ||
| "buildTime": 35, | ||
| "esModule": true | ||
| } |
+400
| # Plugin Integration Guide: @ebay/muse-boot-default | ||
| **Generated**: 2026-03-28 | ||
| **Plugin Type**: boot | ||
| --- | ||
| ## 1. Plugin Purpose & Overview | ||
| ### Purpose | ||
| `@ebay/muse-boot-default` is the default bootstrap plugin for MUSE applications. It orchestrates the entire application startup sequence, loading plugins in the correct order and initializing the MUSE runtime environment. | ||
| ### Key Capabilities | ||
| **Bootstrap Orchestration** | ||
| - Loads and executes plugins in the correct order: boot → init → lib → normal | ||
| - Manages the plugin loading lifecycle with parallel loading for optimal performance | ||
| - Provides loading progress feedback to users | ||
| - Handles error states and recovery during bootstrap | ||
| **MUSE Global Environment Setup** | ||
| - Initializes `window.MUSE_GLOBAL` with core utilities and configuration | ||
| - Sets up the shared modules system (`__shared__`) | ||
| - Configures app variables, plugin variables, and configuration merging | ||
| - Provides message engine for parent-child communication (sub-app scenarios) | ||
| **Plugin Loading System** | ||
| - Supports multiple plugin sources: CDN, local development, linked plugins | ||
| - Implements parallel loading for lib and normal plugins | ||
| - Handles ES module and UMD plugin formats | ||
| - Supports `forcePlugins` query parameter for debugging/testing | ||
| **Service Worker Registration** | ||
| - Registers service workers for offline support | ||
| - Manages service worker lifecycle | ||
| **Error Handling & Loading UI** | ||
| - Displays loading progress during bootstrap | ||
| - Shows error messages when bootstrap fails | ||
| - Provides fallback UI for failed states | ||
| ### Integration Role | ||
| As a **boot plugin**, this plugin: | ||
| - **MUST be the first plugin loaded** in any MUSE application | ||
| - Does not use the js-plugin extension point system (it runs before plugins are loaded) | ||
| - Provides the foundational environment that allows other plugins to function | ||
| - Is typically referenced in `index.html` as the entry script | ||
| --- | ||
| ## 2. Extension Points Exposed | ||
| This plugin does not expose extension points. As a boot plugin, it runs before the js-plugin system is initialized and focuses solely on loading other plugins and setting up the runtime environment. | ||
| --- | ||
| ## 3. Extension Points Contributed | ||
| This plugin does not contribute to extension points from other plugins. As the first plugin to load, there are no other plugins available to extend when this plugin runs. | ||
| ### Bootstrap Integration Points | ||
| While this plugin doesn't use extension points, it provides several integration mechanisms through `window.MUSE_GLOBAL`: | ||
| #### `waitForLoaders` | ||
| **Type**: `Array<Promise | AsyncFunction>` | ||
| **File Reference**: `src/boot.js:23, 273-286` | ||
| Plugins can register async loaders that must complete before the app starts: | ||
| ```javascript | ||
| // In an init plugin | ||
| window.MUSE_GLOBAL.waitFor(async () => { | ||
| await performAuth(); | ||
| return true; // Return false to prevent app from starting | ||
| }); | ||
| ``` | ||
| --- | ||
| #### `initEntries` | ||
| **Type**: `Array<{ func: Function, order?: number }>` | ||
| **File Reference**: `src/boot.js:44, 201-208` | ||
| Init plugins can register initialization functions executed after init plugins load: | ||
| ```javascript | ||
| // In an init plugin | ||
| window.MUSE_GLOBAL.initEntries.push({ | ||
| order: 10, | ||
| func: async () => { | ||
| await initialize(); | ||
| // Return false to prevent app from starting | ||
| } | ||
| }); | ||
| ``` | ||
| --- | ||
| #### `appEntries` | ||
| **Type**: `Array<{ name: string, func: Function }>` | ||
| **File Reference**: `src/boot.js:43, 289-314` | ||
| Lib plugins can register app entry points (typically from `@ebay/muse-lib-react`): | ||
| ```javascript | ||
| // In a lib plugin with isAppEntry: true | ||
| window.MUSE_GLOBAL.appEntries.push({ | ||
| name: '@ebay/muse-lib-react', | ||
| func: renderApp | ||
| }); | ||
| ``` | ||
| --- | ||
| #### `pluginEntries` | ||
| **Type**: `Array<{ func: Function }>` | ||
| **File Reference**: `src/boot.js:45, 267-270` | ||
| Build system can register plugin initialization code: | ||
| ```javascript | ||
| window.MUSE_GLOBAL.pluginEntries.push({ | ||
| func: () => { | ||
| // Plugin initialization | ||
| } | ||
| }); | ||
| ``` | ||
| --- | ||
| ## 4. Exported Functionality | ||
| This plugin sets up `window.MUSE_GLOBAL` with the following utilities and systems: | ||
| ### Global Utilities | ||
| #### `msgEngine` | ||
| **File Reference**: `src/boot.js:38`, `src/msgEngine.js` | ||
| **Purpose**: Message passing system for parent-child window communication | ||
| **Why it exists**: Enables MUSE apps embedded in iframes to communicate with their parent windows. | ||
| **Methods**: | ||
| - `sendToParent(message)` - Send message to parent window | ||
| - `addListener(key, handler)` - Listen for messages | ||
| - `removeListener(key)` - Remove message listener | ||
| --- | ||
| #### `loading` | ||
| **File Reference**: `src/boot.js:39`, `src/loading.js` | ||
| **Purpose**: Loading UI management | ||
| **Why it exists**: Provides user feedback during the bootstrap process. | ||
| **Methods**: | ||
| - `init()` - Initialize loading UI | ||
| - `showMessage(message)` - Display loading message | ||
| - `hide()` - Hide loading UI | ||
| --- | ||
| #### `error` | ||
| **File Reference**: `src/boot.js:40`, `src/error.js` | ||
| **Purpose**: Error UI management | ||
| **Why it exists**: Displays error messages when bootstrap fails. | ||
| **Methods**: | ||
| - `showMessage(message)` - Display error message | ||
| --- | ||
| #### `getPublicPath(pluginName, assetPath)` | ||
| **File Reference**: `src/boot.js:51-76` | ||
| **Purpose**: Resolve public asset paths for plugins | ||
| **Why it exists**: Allows plugins to reference their public assets (images, fonts, etc.) correctly regardless of deployment environment. | ||
| **Usage**: | ||
| ```javascript | ||
| const logoUrl = window.MUSE_GLOBAL.getPublicPath('@ebay/my-plugin', 'logo.png'); | ||
| // Returns: /muse-assets/cdn/p/my-plugin/v1.0.0/dist/logo.png | ||
| ``` | ||
| --- | ||
| #### `waitFor(asyncFuncOrPromise)` | ||
| **File Reference**: `src/boot.js:47-49` | ||
| **Purpose**: Register async operations that must complete before app starts | ||
| **Why it exists**: Allows init plugins to perform async initialization (auth, config loading) before the main app renders. | ||
| **Usage**: | ||
| ```javascript | ||
| // In init plugin | ||
| window.MUSE_GLOBAL.waitFor(async () => { | ||
| const user = await fetchUser(); | ||
| window.MUSE_GLOBAL.currentUser = user; | ||
| }); | ||
| ``` | ||
| --- | ||
| #### `getUser()` | ||
| **File Reference**: `src/boot.js:42` | ||
| **Purpose**: Get current user (default returns null, overridden by init plugins) | ||
| **Why it exists**: Provides a standard way to access user information across plugins. | ||
| --- | ||
| ### Shared Modules System | ||
| #### `__shared__` | ||
| **File Reference**: `src/boot.js:78-83` | ||
| **Purpose**: Runtime module sharing container | ||
| **Why it exists**: Enables lib plugins to provide shared modules (React, Redux, etc.) that other plugins consume without bundling. | ||
| **Properties**: | ||
| - `modules` - Container for shared modules | ||
| - `register(id, module)` - Register a shared module | ||
| - `require(id)` - Require a shared module | ||
| - `parseMuseId(id)` - Parse MUSE module identifier | ||
| **Note**: This is managed by `@ebay/muse-modules` package. | ||
| --- | ||
| ### Configuration System | ||
| #### `appConfig` | ||
| **File Reference**: `src/boot.js:27-37` | ||
| **Purpose**: Merged app and environment configuration | ||
| **Why it exists**: Provides a single source of truth for app configuration, with env config overriding app config. | ||
| **Usage**: | ||
| ```javascript | ||
| const routerType = window.MUSE_GLOBAL.appConfig.routerType; | ||
| ``` | ||
| --- | ||
| #### `appVariables` | ||
| **File Reference**: `src/boot.js:35` | ||
| **Purpose**: App-level runtime variables | ||
| --- | ||
| #### `pluginVariables` | ||
| **File Reference**: `src/boot.js:36` | ||
| **Purpose**: Plugin-level runtime variables | ||
| --- | ||
| ### Environment Flags | ||
| #### `isSubApp` | ||
| **File Reference**: `src/boot.js:41` | ||
| **Purpose**: Boolean indicating if app is running in an iframe | ||
| **Why it exists**: Allows plugins to adjust behavior when embedded as a sub-app. | ||
| --- | ||
| #### `isDev` | ||
| **File Reference**: `src/boot.js:86` | ||
| **Purpose**: Boolean indicating development mode | ||
| --- | ||
| #### `isLocal` | ||
| **File Reference**: From `MUSE_GLOBAL` | ||
| **Purpose**: Boolean indicating local development mode | ||
| --- | ||
| #### `isE2eTest` | ||
| **File Reference**: `src/boot.js:86` | ||
| **Purpose**: Boolean indicating E2E test mode | ||
| --- | ||
| ## 5. Integration Examples | ||
| **Note**: This boot plugin does not use the js-plugin extension point system. The examples below show how to integrate with the bootstrap environment it provides. | ||
| ### Example 1: Creating an Init Plugin | ||
| Init plugins run after boot and before lib/normal plugins. They're perfect for authentication, configuration loading, or permission checks. | ||
| ```javascript | ||
| // src/index.js in an init plugin | ||
| const initFunc = async () => { | ||
| // Perform authentication | ||
| const user = await fetch('/api/user').then(r => r.json()); | ||
| // Make user available globally | ||
| window.MUSE_GLOBAL.getUser = () => user; | ||
| // If auth fails, return false to prevent app from starting | ||
| if (!user) { | ||
| window.MUSE_GLOBAL.error.showMessage('Authentication failed'); | ||
| return false; | ||
| } | ||
| return true; // Continue startup | ||
| }; | ||
| // Register init entry | ||
| window.MUSE_GLOBAL.initEntries.push({ | ||
| order: 10, // Lower numbers run first | ||
| func: initFunc | ||
| }); | ||
| ``` | ||
| --- | ||
| ### Example 2: Using waitFor for Async Initialization | ||
| ```javascript | ||
| // In an init plugin | ||
| window.MUSE_GLOBAL.waitFor(async () => { | ||
| // Load configuration from API | ||
| const config = await fetch('/api/config').then(r => r.json()); | ||
| // Store in MUSE_GLOBAL | ||
| window.MUSE_GLOBAL.appVariables.apiEndpoint = config.apiEndpoint; | ||
| // Return false to prevent app start if config fails | ||
| if (!config) return false; | ||
| }); | ||
| ``` | ||
| --- | ||
| ### Example 3: Registering an App Entry (Lib Plugin) | ||
| ```javascript | ||
| // In a lib plugin like @ebay/muse-lib-react | ||
| const renderApp = () => { | ||
| const root = createRoot(document.getElementById('root')); | ||
| root.render(<App />); | ||
| }; | ||
| window.MUSE_GLOBAL.appEntries.push({ | ||
| name: '@ebay/muse-lib-react', | ||
| func: renderApp | ||
| }); | ||
| ``` | ||
| --- | ||
| ### Example 4: Using getPublicPath for Assets | ||
| ```javascript | ||
| // In any plugin after bootstrap | ||
| import React from 'react'; | ||
| const MyComponent = () => { | ||
| const logoPath = window.MUSE_GLOBAL.getPublicPath( | ||
| '@ebay/my-plugin', | ||
| 'images/logo.png' | ||
| ); | ||
| return <img src={logoPath} alt="Logo" />; | ||
| }; | ||
| ``` | ||
| --- | ||
| ### Example 5: Force Loading Specific Plugin Versions | ||
| For debugging or testing, use the `forcePlugins` query parameter: | ||
| ``` | ||
| https://myapp.com?forcePlugins=@ebay/my-plugin@1.2.3;other-plugin@2.0.0 | ||
| ``` | ||
| This overrides the deployed plugin versions with specific versions. | ||
| --- | ||
| ## Notes | ||
| - **This is a boot plugin** (`muse.type: "boot"`) - it MUST be loaded first via `index.html` | ||
| - Does not use js-plugin extension points (runs before plugin system is initialized) | ||
| - Provides the foundational environment for all other plugins | ||
| - Handles plugin loading order: boot → init → lib → normal | ||
| - Init plugins can use `initEntries` or `waitFor` to perform async initialization | ||
| - Lib plugins with `isAppEntry: true` register app entry functions | ||
| - The `forcePlugins` query parameter is useful for debugging specific plugin versions | ||
| - Service worker registration is automatic but can be customized | ||
| - All plugin loading happens in parallel for performance (within each type group) | ||
| - The loading UI provides user feedback during the bootstrap process |
+19
-1
@@ -1,2 +0,20 @@ | ||
| (()=>{var e={30:e=>{"use strict";var n=[];function t(e){for(var t=-1,o=0;o<n.length;o++)if(n[o].identifier===e){t=o;break}return t}function o(e,o){for(var r={},a=[],s=0;s<e.length;s++){var l=e[s],d=o.base?l[0]+o.base:l[0],c=r[d]||0,p="".concat(d," ").concat(c);r[d]=c+1;var u=t(p),A={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)n[u].references++,n[u].updater(A);else{var m=i(A,o);o.byIndex=s,n.splice(s,0,{identifier:p,updater:m,references:1})}a.push(p)}return a}function i(e,n){var t=n.domAPI(n);t.update(e);return function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap&&n.supports===e.supports&&n.layer===e.layer)return;t.update(e=n)}else t.remove()}}e.exports=function(e,i){var r=o(e=e||[],i=i||{});return function(e){e=e||[];for(var a=0;a<r.length;a++){var s=t(r[a]);n[s].references--}for(var l=o(e,i),d=0;d<r.length;d++){var c=t(r[d]);0===n[c].references&&(n[c].updater(),n.splice(c,1))}r=l}}},78:(e,n,t)=>{"use strict";e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},103:e=>{"use strict";e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},104:(e,n,t)=>{e.exports=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof t.g)return t.g;throw new Error("unable to locate global object")}()},122:e=>{"use strict";e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},123:e=>{e.exports=function(e){try{var n;const t=/((^@[^/]+\/)?([^@/]+))@(\d+)\.(\d+)\.(\d+)([^./][^/]*)?\/(.+)$/.exec(e);return t?{name:t[1],path:t[8],id:"".concat(t[1],"/").concat(t[8]),museId:e,version:t.slice(4,7).map(Number),preRelease:null===(n=t[7])||void 0===n?void 0:n.replace("-","")}:null}catch(t){return null}}},142:e=>{"use strict";e.exports=function(e){var n=e[1],t=e[3];if(!t)return n;if("function"===typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(i," */");return[n].concat([r]).join("\n")}return[n].join("\n")}},267:(e,n,t)=>{e.exports={config:t(753),require:t(506),register:t(914),parseMuseId:t(123),findMuseModule:t(734)}},293:e=>{"use strict";var n={};e.exports=function(e,t){var o=function(e){if("undefined"===typeof n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(o){t=null}n[e]=t}return n[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}},487:e=>{"use strict";e.exports=function(e){if("undefined"===typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var o="";t.supports&&(o+="@supports (".concat(t.supports,") {")),t.media&&(o+="@media ".concat(t.media," {"));var i="undefined"!==typeof t.layer;i&&(o+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),o+=t.css,i&&(o+="}"),t.media&&(o+="}"),t.supports&&(o+="}");var r=t.sourceMap;r&&"undefined"!==typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),n.styleTagTransform(o,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},506:(e,n,t)=>{const o=t(734);var i={};e.exports=e=>{var n=i[e];n||(museModule=n,i[e]=o(e));const t=i[e];if(!t)throw new Error("Muse shared module not found: "+e);return t.__require__(t.id)}},733:(e,n,t)=>{const o=t(123);e.exports=function(e){e.cache||(e.cache={}),e.modules||(e.modules={}),Object.keys(e.modules).forEach(n=>{const t=o(n);t&&(e.cache[t.id]||(e.cache[t.id]=[]),e.cache[t.id].push(t))})}},734:(e,n,t)=>{const o=t(123),i=t(733),r=t(753),a=(e,n)=>[0,1,2].map(t=>Math.abs(e[t]-n[t])),s=(e,n)=>{for(let t=0;t<3;t++){if(e[t]<n[t])return!0;if(e[t]>n[t])return!1}return!1},l=(e,n)=>!s(e,n);e.exports=function(e,n){if(e=e.replace(/\\/g,"/").replace(/\/+/g,"/"),n||(n=MUSE_GLOBAL.__shared__),n.modules[e])return n.modules[e];let t=n.cache;t||(i(n),t=n.cache);const d=o(e);if(!d)return null;const c=t[d.id];if(!c)return null;let p=c[0],u=a(d.version,p.version);for(let o=1;o<c.length;o++){const e=c[o];if(d.version.join(".")===e.version.join(".")){p=e;break}if(l(p.version,d.version)&&s(e.version,d.version))continue;const n=a(e.version,d.version);(s(p.version,d.version)&&l(e.version,d.version)||s(n,u))&&(u=n,p=e)}switch(r.matchVersion){case"major":if(0!==u[0])return null;break;case"minor":if(0!==u[0]||0!==u[1])return null;break;case"patch":if(0!==u[0]||0!==u[1]||0!==u[2])return null}return n.modules[p.museId]}},753:()=>{},774:e=>{"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t="",o="undefined"!==typeof n[5];return n[4]&&(t+="@supports (".concat(n[4],") {")),n[2]&&(t+="@media ".concat(n[2]," {")),o&&(t+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),t+=e(n),o&&(t+="}"),n[2]&&(t+="}"),n[4]&&(t+="}"),t}).join("")},n.i=function(e,t,o,i,r){"string"===typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var d=0;d<e.length;d++){var c=[].concat(e[d]);o&&a[c[0]]||("undefined"!==typeof r&&("undefined"===typeof c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),t&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=t):c[2]=t),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),n.push(c))}},n}},860:(e,n,t)=>{"use strict";t.d(n,{A:()=>s});var o=t(142),i=t.n(o),r=t(774),a=t.n(r)()(i());a.push([e.id,"#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n","",{version:3,sources:["webpack://./src/style.css"],names:[],mappings:"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,mCAA2B;UAA3B,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B",sourcesContent:["#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n"],sourceRoot:""}]),a.locals={};const s=a},914:(e,n,t)=>{const o=t(104),i=t(123);e.exports=function(e,n){for(const t in e){if(!i(t))continue;e[t];o.MUSE_GLOBAL.__shared__.modules[t]={id:t,__require__:n}}}}},n={};function t(o){var i=n[o];if(void 0!==i)return i.exports;var r=n[o]={id:o,exports:{}};return e[o](r,r.exports,t),r.exports}t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e;t.g.importScripts&&(e=t.g.location+"");var n=t.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var o=n.getElementsByTagName("script");if(o.length)for(var i=o.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=o[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),t.p=e})(),t.nc=void 0,(()=>{"use strict";function e(n){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(n)}function n(n){var t=function(n,t){if("object"!=e(n)||!n)return n;var o=n[Symbol.toPrimitive];if(void 0!==o){var i=o.call(n,t||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(n,"string");return"symbol"==e(t)?t:t+""}function o(e,t,o){return(t=n(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function r(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach(function(n){o(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var a=t(267),s=t.n(a);const l=t.p+"static/media/logo.0629cb217459ef0a31a2.png",d={init(){var e;const{app:n,cdn:t}=window.MUSE_GLOBAL,o=document.createElement("div"),i=n.iconId?"".concat(t,"/p/app-icon.").concat(n.name,"/v0.0.").concat(n.iconId,"/dist/icon.png"):l;o.innerHTML='\n <div>\n <div class=\'muse-loading-node-inner\'>\n <div class="loadingio-spinner-eclipse-p5fn84x4bh8"><div class="ldio-klconu2768"><div>\n </div></div></div>\n <img src="'.concat(i,'" aria-label="logo" />\n </div>\n <label>Starting...</label>\n </div>\n '),o.id="muse-loading-node",("dark"===(null===(e=n.config)||void 0===e?void 0:e.theme)&&!localStorage.getItem("muse.theme")||localStorage.getItem("muse.theme")&&"dark"===localStorage.getItem("muse.theme"))&&document.body.classList.add("muse-theme-dark"),document.body.appendChild(o),this.mountNode=o,this.labelNode=o.querySelector("label")},hide(){this.mountNode&&(setTimeout(()=>{this.mountNode.style.opacity=0},10),setTimeout(()=>{document.body.removeChild(this.mountNode),delete this.mountNode},800),delete this.labelNode)},showMessage(e){this.labelNode&&(this.labelNode.innerHTML=e||"")}},c={errors:[],init(){const e=document.createElement("div");e.innerHTML="",e.id="muse-error-node",document.body.appendChild(e),this.mountNode=e},showMessage(e){const n=null!==e&&void 0!==e&&e.splice?e:[e];this.errors.push(...n),this.update()},update(){var e;this.mountNode||this.init();const n=1===this.errors.length?"<div>".concat(this.errors[0],"</div>"):"<ul>\n ".concat(this.errors.map(e=>"<li>"+e+"</li>").join(""),"\n </ul>");this.mountNode.innerHTML='\n <div class="muse-error-node-inner">\n <h4>Failed to load:</h4>\n '.concat(n,'\n <p>* Unexpected error happened, please refresh to retry or <a href="').concat((null===(e=window.MUSE_GLOBAL.appConfig)||void 0===e?void 0:e.supportLink)||"#",'">contact support</a>.</p>\n </div>\n ')}};const p=function(){const{serviceWorker:e}=window.MUSE_GLOBAL;if(navigator.serviceWorker)return e&&"https:"===window.location.protocol?(d.showMessage("Registering Muse service worker."),new Promise(n=>{let t=!1;setTimeout(()=>{t||(console.log("Failed to register service worker in 10 seconds. Skip it."),n())},1e4),navigator.serviceWorker.register(e,{}).then(function(){t=!0,console.log("Service Worker register done."),n()}).catch(()=>{t=!0,console.log("Failed to register service worker, skip it."),n()})})):void 0},u=()=>{};async function A(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,t=0;await Promise.all(e.map(async e=>{await function(e,n){if(n=n||u,!e.then||!e.catch)return e.url?new Promise((t,o)=>{const i=document.querySelector("head"),r=document.createElement("script");r.src=e.url,e.esModule&&(r.type="module"),i.appendChild(r),r.onload=()=>{n(),t()},r.onerror=()=>{c.showMessage("Failed to load resource: ".concat(e.url," .")),o()}}):void 0;e.then(n)}(e),n(++t)}))}function m(e){return e.startsWith("@")?e.replace("/","."):e}const f=()=>Math.random().toString(36).substring(2),h={listeners:{},promises:{},iframes:{},register(e,n){this.iframes[e]=n},unregister(e){delete this.iframes[e]},getIframe(e){return"string"===typeof e?this.iframes[e]:e},init(){this.addListener("handle-muse-app-check",(e,n)=>{var t,o,i,r;"assert-muse-app"===(null===e||void 0===e?void 0:e.type)&&"parent"===(null===(t=n.data)||void 0===t||null===(o=t.from)||void 0===o?void 0:o.clientKey)&&(this.sendToParent({promiseId:null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.promiseId,data:{app:window.MUSE_GLOBAL.app.name,env:window.MUSE_GLOBAL.env.name}}),window.MUSE_GLOBAL.parentApp=null===n||void 0===n||null===(r=n.data)||void 0===r?void 0:r.from)}),window.addEventListener("message",e=>{var n,t,o;if("muse"===(null===e||void 0===e||null===(n=e.data)||void 0===n?void 0:n.type)){var i;if(console.log("on muse post msg: ",e),null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&null!==(o=t.payload)&&void 0!==o&&o.promiseId)this.resolvePromise(e.data.payload.promiseId,null===e||void 0===e||null===(i=e.data.payload)||void 0===i?void 0:i.data);Object.entries(this.listeners).forEach(n=>{let[t,o]=n;try{o(e.data.payload,e)}catch(i){console.log('Warning: failed to process message "'.concat(t,'"'),e,i)}})}},!1)},resolve(e,n){},addListener(e,n){this.listeners[e]=n},removeListener(e){delete this.listeners[e]},sendToChild(e,n){let t=null,o=null,i=null;arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&(i=f(),t=new Promise((e,n)=>{o=this.promises[i]={resolve:e,reject:n}}));try{var r,a;null===(r=this.getIframe(n))||void 0===r||null===(a=r.contentWindow)||void 0===a||a.postMessage({type:"muse",promiseId:i,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,clientKey:"parent"},payload:e},"*")}catch(s){console.log("Failed to post message to child: ",e),t&&o.reject(s)}return t},sendToParent(e){let n=null,t=null,o=null;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(o=f(),n=new Promise((e,n)=>{t=this.promises[o]={resolve:e,reject:n}})),window.parent&&window.parent!==window)try{window.parent.postMessage({type:"muse",promiseId:o,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,type:"child"},payload:e},"*")}catch(i){console.log("Failed to send message to parent: ",e),n&&t.reject(i)}return n},assertMuseApp(e){return new Promise((n,t)=>{this.sendToChild({type:"assert-muse-app"},this.getIframe(e),!0).then(n),setTimeout(()=>t(new Error("Muse app check timeout.")),300)})},getParentUrl(){return new Promise((e,n)=>{this.sendToParent({type:"get-parent-url"},!0).then(e),setTimeout(()=>n(new Error("Get parent url timeout.")),300)})},parentNavigate(e){this.sendToParent({type:"parent-navigate",url:e})},resolvePromise(e,n){var t;null===(t=this.promises[e])||void 0===t||t.resolve(n),delete this.promises[e]},resolveParent(e,n){h.sendToParent({promiseId:e,data:n})},resolveChild(e,n,t){h.sendToChild({promiseId:e,data:n},null===t||void 0===t?void 0:t.source)}};h.addListener("handle-muse-app-check",(e,n)=>{var t,o,i;"assert-muse-app"===(null===e||void 0===e?void 0:e.type)&&"parent"===(null===(t=n.data)||void 0===t||null===(o=t.from)||void 0===o?void 0:o.clientKey)&&h.resolveParent(null===n||void 0===n||null===(i=n.data)||void 0===i?void 0:i.promiseId,{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName})}),h.addListener("parent-navigate",e=>{"parent-navigate"===(null===e||void 0===e?void 0:e.type)&&null!==e&&void 0!==e&&e.url&&(window.location.href=e.url)}),h.addListener("get-parent-url",(e,n)=>{var t;"get-parent-url"===(null===e||void 0===e?void 0:e.type)&&(console.log("get-parent-url: ",window.location.href),h.resolveChild(null===n||void 0===n||null===(t=n.data)||void 0===t?void 0:t.promiseId,window.location.href,n))});const g=h,v=e=>{const n=window.history,t=n[e];n[e]=function(n){const o=t.apply(this,arguments),i=new Event("muse_boot_"+e.toLowerCase());return i.state=n,window.dispatchEvent(i),o}};v("pushState"),v("replaceState");const w=()=>{g.sendToParent({type:"child-route-change",path:window.location.href.replace(window.location.origin,"")})};window.addEventListener("popstate",w),window.addEventListener("muse_boot_pushstate",w),window.addEventListener("muse_boot_replacestate",w);var E=t(30),y=t.n(E),b=t(487),C=t.n(b),B=t(293),x=t.n(B),M=t(78),L=t.n(M),k=t(122),S=t.n(k),O=t(103),_=t.n(O),P=t(860),j={base:11914653};j.styleTagTransform=_(),j.setAttributes=L(),j.insert=x().bind(null,"head"),j.domAPI=C(),j.insertStyleElement=S();y()(P.A,j);P.A&&P.A.locals&&P.A.locals;!function(){if(!window.MUSE_GLOBAL)throw new Error("There must be a global window.MUSE_GLOBAL object");d.init(),g.init();const e=Date.now(),n=[];let t,o="success";(async function(){var e,n;const t=window.sessionStorage.getItem("MUSE_TEMP_temp-redirect-url");if(t)return window.sessionStorage.removeItem("MUSE_TEMP_temp-redirect-url"),void(window.location=t);const o=window.MUSE_GLOBAL;d.showMessage("Starting...");const i=o.waitForLoaders||[],a=Object.assign({},null===(e=o.app)||void 0===e?void 0:e.config);Object.entries((null===(n=o.env)||void 0===n?void 0:n.config)||{}).forEach(e=>{let[n,t]=e;null!==t&&void 0!==t&&""!==t&&(a[n]=t)}),Object.assign(o,{appVariables:o.appVariables||{},pluginVariables:o.pluginVariables||{},appConfig:a,msgEngine:g,loading:d,error:c,isSubApp:window.parent!==window,getUser:()=>null,appEntries:o.appEntries||[],initEntries:o.initEntries||[],pluginEntries:o.pluginEntries||[],waitFor:e=>{i.push(e)},getPublicPath:(e,n)=>{var t;if(!n)throw new Error("assetPath is required for getPublicPath method.");n=n.replace(/^\/*/,"");const i=m(e);if(o.isDev){var r;const t=null===(r=o.plugins.find(e=>!!e.localPlugins))||void 0===r?void 0:r.localPlugins;if(t&&t.includes(e))return"/muse-assets/local/p/".concat(i,"/").concat(n)}const a=null===(t=window.MUSE_GLOBAL.plugins)||void 0===t?void 0:t.find(n=>n.name===e);if(!a)return;let{version:s}=a||{};s.startsWith("v")||(s="v".concat(s));let l="".concat(window.MUSE_GLOBAL.cdn,"/p/").concat(i,"/").concat(s);return window.MUSE_GLOBAL.isDev||window.MUSE_GLOBAL.isLocal?l+="/dev/".concat(n):l+="/dist/".concat(n),l},__shared__:{modules:{},register:s().register,require:s().require,parseMuseId:s().parseMuseId}});const{cdn:l="",initEntries:u,pluginEntries:f,appEntries:h,isDev:v=!1,isE2eTest:w=!1}=o;let{plugins:E=[]}=window.MUSE_GLOBAL;window.MUSE_CONFIG=o,g.sendToParent({type:"app-state-change",state:"app-starting"}),p();const y=E.find(e=>"boot"===e.type);y&&console.log("Loading Muse app by ".concat(y.name,"@").concat(y.version||y.url,"..."));const b=new URLSearchParams(window.location.search).get("forcePlugins");if(b){const e=b.split(";").filter(Boolean).reduce((e,n)=>{let t="";n.startsWith("@")&&"@"===n[0]&&(n=n.substring(1),t="@");const o=n.split("@",2);if(2===o.length){const[n,i]=o[0].split("!");e["".concat(t).concat(n)]={version:o[1],type:i}}return e},{});E=E.map(n=>{if(!e[n.name])return n;const t=r(r({},n),{},{version:e[n.name].version});return delete e[n.name],t}).filter(e=>"null"!==e.version);for(const n in e)"null"!==e[n].version&&E.push({name:n,type:e[n].type,version:e[n].version})}console.log("Plugins(".concat(E.length,"):")),E.forEach(e=>{let n="";if(e.linkedTo)n="Linked to: "+e.linkedTo;else if(e.isLocalLib){var t;n="Local:"+((null===(t=/\d{4,}/.exec(e.url))||void 0===t?void 0:t[0])||document.location.port)}else e.url&&(n=e.url);n&&(n=" (".concat(n,")")),console.log(" * ".concat(e.name,"@").concat(e.version||"local").concat(n))}),g.sendToParent({type:"app-state-change",state:"app-loading"});const C=E.filter(e=>"init"===e.type).map(e=>r({url:!e.isLocal&&!e.linkedTo&&(e.url||"".concat(l,"/p/").concat(m(e.name),"/v").concat(e.version,"/dist/main.js"))},e)).filter(Boolean);if(C.length>0&&(d.showMessage("Loading init plugins 1/".concat(C.length,"...")),await A(C,e=>d.showMessage("Loading init plugins ".concat(Math.min(e+1,C.length),"/").concat(C.length,"...")))),u.length>0){d.showMessage("Executing init entries..."),u.sort((e,n)=>(e.order||10)-(n.order||10));for(const e of u)if(!1===await e.func())return}const B=v?"dev":w?"test":"dist",x=E.filter(e=>"boot"!==e.type&&"init"!==e.type).map(e=>r({url:!e.isLocal&&!e.linkedTo&&(e.url||"".concat(l,"/p/").concat(m(e.name),"/v").concat(e.version,"/").concat(B,"/main.js"))},e)).filter(Boolean),M=x.filter(e=>"lib"===e.type);d.showMessage("Loading lib plugins 1/".concat(M.length,"...")),await A(M.filter(e=>!e.esModule),e=>d.showMessage("Loading lib plugins ".concat(Math.min(e+1,M.length),"/").concat(M.length,"...")));const L=x.filter(e=>"normal"===e.type||!e.type);d.showMessage("Loading normal plugins 1/".concat(L.length,"...")),await A(L.filter(e=>!e.esModule),e=>d.showMessage("Loading normal plugins ".concat(Math.min(e+1,L.length),"/").concat(L.length,"...")));const k=x.filter(e=>e.esModule);if(await A(k.filter(e=>e.esModule),e=>d.showMessage("Loading es plugins ".concat(Math.min(e+1,k.length),"/").concat(k.length,"..."))),f.length>0&&(d.showMessage("Executing plugin entries..."),f.forEach(e=>e.func())),i.length>0&&(d.showMessage("Executing custom loaders ..."),(await Promise.all(i.map(async e=>e.then?await e:await e()))).some(e=>!1===e)))return;let S=a.entry;if(!S){if(1!==h.length)throw 0===h.length?new Error("No app entry found. You need a plugin deployed to the app to provide an app entry."):new Error("Multiple entries found: ".concat(h.map(e=>e.name).join(", "),". You need to specify one entry in app config."));S=h[0].name}const O=h.find(e=>e.name===S);if(!O)throw new Error("The specified app entry was not found: ".concat(S,"."));console.log("Starting the app from ".concat(S,"...")),d.showMessage("Starting the app..."),await O.func(),d.hide()})().then(()=>{const n=Date.now();g.sendToParent({type:"app-state-change",state:"app-loaded"}),console.log("Muse app started in ".concat((n-e)/1e3," seconds."))}).catch(e=>{console.log("Failed to start the app."),o="failure",t=(null===e||void 0===e?void 0:e.message)||"App failed to start.",n.push(e),e&&console.error(e),d.hide(),null!==e&&void 0!==e&&e.message&&c.showMessage(e.message),g.sendToParent({type:"app-state-change",state:"app-failed"})}).finally(()=>{const i=new CustomEvent("muse_boot_completed",{detail:{result:o,metrics:[{name:"app-start-result",payload:{duration:Date.now()-e,status:o,errorMsg:t,url:document.location.href}},{name:"app-start-exceptions",payload:n}]}});window.dispatchEvent(i)})}()})()})(); | ||
| (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`#muse-loading-node{z-index:99999;place-items:center;width:100%;height:100%;transition:opacity .3s ease-out;display:grid;position:fixed;top:0%;left:0;line-height:1.5!important}#muse-loading-node .muse-loading-node-inner{place-items:center;display:grid;position:relative}#muse-loading-node .muse-loading-node-inner>img{width:60px;position:absolute}#muse-loading-node div>label{text-align:center;color:#888;font-family:Helvetica,Arial,sans-serif;font-size:13px;display:block}@keyframes ldio-klconu2768{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.ldio-klconu2768 div{transform-origin:70px 72px;border-radius:50%;width:140px;height:140px;animation:1s linear infinite ldio-klconu2768;position:absolute;top:30px;left:30px;box-shadow:0 4px #00b4d8}.loadingio-spinner-eclipse-p5fn84x4bh8{width:200px;height:200px;display:inline-block;overflow:hidden}.ldio-klconu2768{backface-visibility:hidden;transform-origin:0 0;width:100%;height:100%;position:relative;transform:translateZ(0)scale(1)}.ldio-klconu2768 div{box-sizing:content-box}#muse-error-node{color:red;place-items:center;width:100%;height:100%;font-family:Helvetica,Arial,sans-serif;font-size:14px;line-height:150%;display:grid;position:fixed;top:0;left:0}#muse-error-node .muse-error-node-inner{border:1px solid red;border-radius:3px;min-width:500px;max-width:800px;padding:15px}#muse-error-node h4{margin-top:0;margin-bottom:10px;font-size:16px}#muse-error-node li{padding:3px 0}#muse-error-node p{color:#777;font-size:13px;font-style:italic}#muse-error-node p a{color:#039be5;text-decoration:none}#muse-error-node p a:hover{text-decoration:underline}.muse-theme-dark{background-color:#141414}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=o((()=>{})),u=o(((e,t)=>{function n(e){try{let t=/((^@[^/]+\/)?([^@/]+))@(\d+)\.(\d+)\.(\d+)([^./][^/]*)?\/(.+)$/.exec(e);return t?{name:t[1],path:t[8],id:`${t[1]}/${t[8]}`,museId:e,version:t.slice(4,7).map(Number),preRelease:t[7]?.replace(`-`,``)}:null}catch{return null}}t.exports=n})),d=o(((e,t)=>{var n=u();function r(e){e.cache||={},e.modules||={},Object.keys(e.modules).forEach(t=>{let r=n(t);r&&(e.cache[r.id]||(e.cache[r.id]=[]),e.cache[r.id].push(r))})}t.exports=r})),f=o(((e,t)=>{var n=u(),r=d(),i=l(),a=(e,t)=>[0,1,2].map(n=>Math.abs(e[n]-t[n])),o=(e,t)=>{for(let n=0;n<3;n++){if(e[n]<t[n])return!0;if(e[n]>t[n])return!1}return!1},s=(e,t)=>!o(e,t);function c(e,t){if(e=e.replace(/\\/g,`/`).replace(/\/+/g,`/`),t||=MUSE_GLOBAL.__shared__,t.modules[e])return t.modules[e];let c=t.cache;c||=(r(t),t.cache);let l=n(e);if(!l)return null;let u=c[l.id];if(!u)return null;let d=u[0],f=a(l.version,d.version);for(let e=1;e<u.length;e++){let t=u[e];if(l.version.join(`.`)===t.version.join(`.`)){d=t;break}if(s(d.version,l.version)&&o(t.version,l.version))continue;let n=a(t.version,l.version);(o(d.version,l.version)&&s(t.version,l.version)||o(n,f))&&(f=n,d=t)}switch(i.matchVersion){case`major`:if(f[0]!==0)return null;break;case`minor`:if(f[0]!==0||f[1]!==0)return null;break;case`patch`:if(f[0]!==0||f[1]!==0||f[2]!==0)return null;break;case`all`:break;default:break}return t.modules[d.museId]}t.exports=c})),p=o(((e,t)=>{var n=f(),r={};t.exports=e=>{var t=r[e];t||(museModule=t,r[e]=n(e));let i=r[e];if(!i)throw Error(`Muse shared module not found: `+e);return i.__require__(i.id)}})),m=o(((e,t)=>{t.exports=function(){if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof global<`u`)return global;throw Error(`unable to locate global object`)}()})),h=o(((e,t)=>{var n=m(),r=u();function i(e,t){for(let i in e)r(i)&&(e[i],n.MUSE_GLOBAL.__shared__.modules[i]={id:i,__require__:t})}t.exports=i})),g=c(o(((e,t)=>{t.exports={config:l(),require:p(),register:h(),parseMuseId:u(),findMuseModule:f()}}))(),1),_=`/assets/logo-CIFLYZ7b.png`,v={init(){let{app:e,cdn:t}=window.MUSE_GLOBAL,n=document.createElement(`div`);n.innerHTML=` | ||
| <div> | ||
| <div class='muse-loading-node-inner'> | ||
| <div class="loadingio-spinner-eclipse-p5fn84x4bh8"><div class="ldio-klconu2768"><div> | ||
| </div></div></div> | ||
| <img src="${e.iconId?`${t}/p/app-icon.${e.name}/v0.0.${e.iconId}/dist/icon.png`:_}" aria-label="logo" /> | ||
| </div> | ||
| <label>Starting...</label> | ||
| </div> | ||
| `,n.id=`muse-loading-node`,(e.config?.theme===`dark`&&!localStorage.getItem(`muse.theme`)||localStorage.getItem(`muse.theme`)&&localStorage.getItem(`muse.theme`)===`dark`)&&document.body.classList.add(`muse-theme-dark`),document.body.appendChild(n),this.mountNode=n,this.labelNode=n.querySelector(`label`)},hide(){this.mountNode&&(setTimeout(()=>{this.mountNode.style.opacity=0},10),setTimeout(()=>{document.body.removeChild(this.mountNode),delete this.mountNode},800),delete this.labelNode)},showMessage(e){this.labelNode&&(this.labelNode.innerHTML=e||``)}},y={errors:[],init(){let e=document.createElement(`div`);e.innerHTML=``,e.id=`muse-error-node`,document.body.appendChild(e),this.mountNode=e},showMessage(e){let t=e?.splice?e:[e];this.errors.push(...t),this.update()},update(){this.mountNode||this.init();let e=this.errors.length===1?`<div>${this.errors[0]}</div>`:`<ul> | ||
| ${this.errors.map(e=>`<li>`+e+`</li>`).join(``)} | ||
| </ul>`;this.mountNode.innerHTML=` | ||
| <div class="muse-error-node-inner"> | ||
| <h4>Failed to load:</h4> | ||
| ${e} | ||
| <p>* Unexpected error happened, please refresh to retry or <a href="${window.MUSE_GLOBAL.appConfig?.supportLink||`#`}">contact support</a>.</p> | ||
| </div> | ||
| `}};function b(){let{serviceWorker:e}=window.MUSE_GLOBAL;if(navigator.serviceWorker&&e&&window.location.protocol===`https:`)return v.showMessage(`Registering Muse service worker.`),new Promise(t=>{let n=!1;setTimeout(()=>{n||(console.log(`Failed to register service worker in 10 seconds. Skip it.`),t())},1e4),navigator.serviceWorker.register(e,{}).then(function(){n=!0,console.log(`Service Worker register done.`),t()}).catch(()=>{n=!0,console.log(`Failed to register service worker, skip it.`),t()})})}var x=()=>{};function S(e,t){if(t||=x,e.then&&e.catch){e.then(t);return}if(e.url)return new Promise((n,r)=>{let i=document.querySelector(`head`),a=document.createElement(`script`);a.setAttribute(`crossorigin`,`anonymous`),a.src=e.url,a.type=`module`,i.appendChild(a),a.onload=()=>{t(),n()},a.onerror=()=>{y.showMessage(`Failed to load resource: ${e.url} .`),r()}})}async function C(e,t=x){let n=0;await Promise.all(e.map(async e=>{await S(e),t(++n)}))}function w(e){return e.startsWith(`@`)?e.replace(`/`,`.`):e}var T=()=>Math.random().toString(36).substring(2),E={listeners:{},promises:{},iframes:{},register(e,t){this.iframes[e]=t},unregister(e){delete this.iframes[e]},getIframe(e){return typeof e==`string`?this.iframes[e]:e},init(){this.addListener(`handle-muse-app-check`,(e,t)=>{e?.type===`assert-muse-app`&&t.data?.from?.clientKey===`parent`&&(this.sendToParent({promiseId:t?.data?.promiseId,data:{app:window.MUSE_GLOBAL.app.name,env:window.MUSE_GLOBAL.env.name}}),window.MUSE_GLOBAL.parentApp=t?.data?.from)}),window.addEventListener(`message`,e=>{e?.data?.type===`muse`&&(console.log(`on muse post msg: `,e),e?.data?.payload?.promiseId&&this.resolvePromise(e.data.payload.promiseId,e?.data.payload?.data),Object.entries(this.listeners).forEach(([t,n])=>{try{n(e.data.payload,e)}catch(n){console.log(`Warning: failed to process message "${t}"`,e,n)}}))},!1)},resolve(e,t){},addListener(e,t){this.listeners[e]=t},removeListener(e){delete this.listeners[e]},sendToChild(e,t,n=!1){let r=null,i=null,a=null;n&&(a=T(),r=new Promise((e,t)=>{i=this.promises[a]={resolve:e,reject:t}}));try{this.getIframe(t)?.contentWindow?.postMessage({type:`muse`,promiseId:a,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,clientKey:`parent`},payload:e},`*`)}catch(t){console.log(`Failed to post message to child: `,e),r&&i.reject(t)}return r},sendToParent(e,t=!1){let n=null,r=null,i=null;if(t&&(i=T(),n=new Promise((e,t)=>{r=this.promises[i]={resolve:e,reject:t}})),window.parent&&window.parent!==window)try{window.parent.postMessage({type:`muse`,promiseId:i,from:{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName,type:`child`},payload:e},`*`)}catch(t){console.log(`Failed to send message to parent: `,e),n&&r.reject(t)}return n},assertMuseApp(e){return new Promise((t,n)=>{this.sendToChild({type:`assert-muse-app`},this.getIframe(e),!0).then(t),setTimeout(()=>n(Error(`Muse app check timeout.`)),300)})},getParentUrl(){return new Promise((e,t)=>{this.sendToParent({type:`get-parent-url`},!0).then(e),setTimeout(()=>t(Error(`Get parent url timeout.`)),300)})},parentNavigate(e){this.sendToParent({type:`parent-navigate`,url:e})},resolvePromise(e,t){this.promises[e]?.resolve(t),delete this.promises[e]},resolveParent(e,t){E.sendToParent({promiseId:e,data:t})},resolveChild(e,t,n){E.sendToChild({promiseId:e,data:t},n?.source)}};E.addListener(`handle-muse-app-check`,(e,t)=>{e?.type===`assert-muse-app`&&t.data?.from?.clientKey===`parent`&&E.resolveParent(t?.data?.promiseId,{app:window.MUSE_GLOBAL.appName,env:window.MUSE_GLOBAL.envName})}),E.addListener(`parent-navigate`,e=>{e?.type===`parent-navigate`&&e?.url&&(window.location.href=e.url)}),E.addListener(`get-parent-url`,(e,t)=>{e?.type===`get-parent-url`&&(console.log(`get-parent-url: `,window.location.href),E.resolveChild(t?.data?.promiseId,window.location.href,t))});var D=e=>{let t=window.history,n=t[e];t[e]=function(t){let r=n.apply(this,arguments),i=new Event(`muse_boot_`+e.toLowerCase());return i.state=t,window.dispatchEvent(i),r}};D(`pushState`),D(`replaceState`);var O=()=>{E.sendToParent({type:`child-route-change`,path:window.location.href.replace(window.location.origin,``)})};window.addEventListener(`popstate`,O),window.addEventListener(`muse_boot_pushstate`,O),window.addEventListener(`muse_boot_replacestate`,O);async function k(){let e=window.sessionStorage.getItem(`MUSE_TEMP_temp-redirect-url`);if(e){window.sessionStorage.removeItem(`MUSE_TEMP_temp-redirect-url`),window.location=e;return}let t=window.MUSE_GLOBAL;v.showMessage(`Starting...`);let n=t.waitForLoaders||[],r=Object.assign({},t.app?.config);Object.entries(t.env?.config||{}).forEach(([e,t])=>{t!=null&&t!==``&&(r[e]=t)}),Object.assign(t,{appVariables:t.appVariables||{},pluginVariables:t.pluginVariables||{},appConfig:r,msgEngine:E,loading:v,error:y,isSubApp:window.parent!==window,getUser:()=>null,appEntries:t.appEntries||[],initEntries:t.initEntries||[],pluginEntries:t.pluginEntries||[],waitFor:e=>{n.push(e)},getPublicPath:(e,n)=>{if(!n)throw Error(`assetPath is required for getPublicPath method.`);n=n.replace(/^\/*/,``);let r=w(e);if(t.isDev){let i=t.plugins.find(e=>!!e.localPlugins)?.localPlugins;if(i&&i.includes(e))return`/muse-assets/local/p/${r}/${n}`}let i=window.MUSE_GLOBAL.plugins?.find(t=>t.name===e);if(!i)return;let{version:a}=i||{};a.startsWith(`v`)||(a=`v${a}`);let o=`${window.MUSE_GLOBAL.cdn}/p/${r}/${a}`;return window.MUSE_GLOBAL.isDev||window.MUSE_GLOBAL.isLocal?o+=`/dev/${n}`:o+=`/dist/${n}`,o},__shared__:{modules:{},register:g.default.register,require:g.default.require,parseMuseId:g.default.parseMuseId}});let{cdn:i=``,initEntries:a,pluginEntries:o,appEntries:s,isDev:c=!1,isE2eTest:l=!1}=t,{plugins:u=[]}=window.MUSE_GLOBAL;window.MUSE_CONFIG=t,E.sendToParent({type:`app-state-change`,state:`app-starting`}),b();let d=u.find(e=>e.type===`boot`);d&&console.log(`Loading Muse app by ${d.name}@${d.version||d.url}...`);let f=new URLSearchParams(window.location.search).get(`forcePlugins`);if(f){let e=f.split(`;`).filter(Boolean).reduce((e,t)=>{let n=``;t.startsWith(`@`)&&t[0]===`@`&&(t=t.substring(1),n=`@`);let r=t.split(`@`,2);if(r.length===2){let[t,i]=r[0].split(`!`);e[`${n}${t}`]={version:r[1],type:i}}return e},{});u=u.map(t=>{if(!e[t.name])return t;let n={...t,version:e[t.name].version};return delete e[t.name],n}).filter(e=>e.version!==`null`);for(let t in e)e[t].version!==`null`&&u.push({name:t,type:e[t].type,version:e[t].version})}console.log(`Plugins(${u.length}):`),u.forEach(e=>{let t=``;e.linkedTo?t=`Linked to: `+e.linkedTo:e.isLocalLib?t=`Local:`+(/\d{4,}/.exec(e.url)?.[0]||document.location.port):e.url&&(t=e.url),t&&=` (${t})`,console.log(` * ${e.name}@${e.version||`local`}${t}`)}),E.sendToParent({type:`app-state-change`,state:`app-loading`});let p=u.filter(e=>e.type===`init`).map(e=>({url:e.isLocal||e.linkedTo?!1:e.url||`${i}/p/${w(e.name)}/v${e.version}/dist/main.js`,...e})).filter(Boolean);if(p.length>0&&(v.showMessage(`Loading init plugins 1/${p.length}...`),await C(p,e=>v.showMessage(`Loading init plugins ${Math.min(e+1,p.length)}/${p.length}...`))),a.length>0){v.showMessage(`Executing init entries...`),a.sort((e,t)=>(e.order||10)-(t.order||10));for(let e of a)if(await e.func()===!1)return}let m=c?`dev`:l?`test`:`dist`,h={},_=u.filter(e=>e.type!==`boot`&&e.type!==`init`).map(e=>{let t={url:e.isLocal||e.linkedTo?!1:e.url||`${i}/p/${w(e.name)}/v${e.version}/${m}/main.js`,...e};return h[t.url]=!1,t}).filter(Boolean),x=_.filter(e=>e.type===`lib`).sort((e,t)=>t.name.localeCompare(e.name)),S=_.filter(e=>e.type===`normal`||!e.type),T=[...x,...S],D=typeof PerformanceObserver<`u`&&new PerformanceObserver(e=>{let t=Object.keys(h);for(let n of e.getEntries())t.some(e=>n.name.endsWith(e))&&(h[n.name]=!0,v.showMessage(`Loading plugins ${Object.values(h).filter(Boolean).length}/${T.length}...`))});if(D?.observe({type:`resource`,buffered:!0}),v.showMessage(`Loading plugins 1/${T.length}...`),await new Promise((e,n)=>{let r=document.querySelector(`head`),i=document.createElement(`script`);i.setAttribute(`crossorigin`,`anonymous`),i.crossOrigin=`anonymous`,i.type=`module`,t.__onMusePluginsLoaded=e;let a=[],o=new Set,s=Object.fromEntries(x.map(e=>[e.name,e]));function c(e){if(!o.has(e.name)){o.add(e.name);for(let t of e.deps||[])s[t]&&c(s[t]);a.push(e)}}for(let e of x)c(e);i.textContent=[...a,...S].map(e=>`import ${JSON.stringify(e.url)}; // ${e.name}\n`).join(``)+`window.MUSE_GLOBAL.__onMusePluginsLoaded(); | ||
| `,r.appendChild(i)}),D?.disconnect(),o.length>0&&(v.showMessage(`Executing plugin entries...`),o.forEach(e=>e.func())),n.length>0&&(v.showMessage(`Executing custom loaders ...`),(await Promise.all(n.map(async e=>e.then?await e:await e()))).some(e=>e===!1)))return;let O=r.entry;if(!O)if(s.length===1)O=s[0].name;else if(s.length===0)throw Error(`No app entry found. You need a plugin deployed to the app to provide an app entry.`);else throw Error(`Multiple entries found: ${s.map(e=>e.name).join(`, `)}. You need to specify one entry in app config.`);let k=s.find(e=>e.name===O);if(k)console.log(`Starting the app from ${O}...`),v.showMessage(`Starting the app...`),await k.func();else throw Error(`The specified app entry was not found: ${O}.`);v.hide()}function A(){if(!window.MUSE_GLOBAL)throw Error(`There must be a global window.MUSE_GLOBAL object`);v.init(),E.init();let e=Date.now(),t=[],n=`success`,r;k().then(()=>{let t=Date.now();E.sendToParent({type:`app-state-change`,state:`app-loaded`}),console.log(`Muse app started in ${(t-e)/1e3} seconds.`)}).catch(e=>{console.log(`Failed to start the app.`),n=`failure`,r=e?.message||`App failed to start.`,t.push(e),e&&console.error(e),v.hide(),e?.message&&y.showMessage(e.message),E.sendToParent({type:`app-state-change`,state:`app-failed`})}).finally(()=>{let i=new CustomEvent(`muse_boot_completed`,{detail:{result:n,metrics:[{name:`app-start-result`,payload:{duration:Date.now()-e,status:n,errorMsg:r,url:document.location.href}},{name:`app-start-exceptions`,payload:t}]}});window.dispatchEvent(i)})}A(); | ||
| //# sourceMappingURL=boot.js.map |
+20
-44
| { | ||
| "name": "@ebay/muse-boot-default", | ||
| "version": "1.3.5", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/ebay/Muse", | ||
| "directory": "ui-plugins/muse-boot-default" | ||
| }, | ||
| "version": "2.0.0", | ||
| "main": "index.js", | ||
| "license": "MIT", | ||
| "type": "module", | ||
| "muse": { | ||
| "type": "boot", | ||
| "devConfig": { | ||
| "app": "musemanager", | ||
| "env": "staging", | ||
| "remotePlugins": [ | ||
| "*" | ||
| ] | ||
| } | ||
| "type": "boot" | ||
| }, | ||
| "files": [ | ||
| "build" | ||
| "build", | ||
| "MUSE_README.md" | ||
| ], | ||
| "devDependencies": { | ||
| "@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
| "@babel/plugin-transform-react-jsx": "^7.25.9", | ||
| "@changesets/cli": "^2.23.2", | ||
| "@craco/craco": "7.1.0", | ||
| "@ebay/muse-cra-patch": "^1.0.3", | ||
| "@ebay/muse-craco-plugin": "^3.0.30", | ||
| "@ebay/muse-modules": "^1.0.28", | ||
| "@testing-library/jest-dom": "^6.1.4", | ||
| "@testing-library/react": "^14.0.0", | ||
| "@ebay/muse-modules": "^1.0.29", | ||
| "@ebay/muse-vanilla-vite-plugin": "link:../../workspace/packages/muse-vanilla-vite-plugin", | ||
| "@vitest/coverage-v8": "2.1.9", | ||
| "cross-env": "^7.0.3", | ||
| "eslint": "^8.20.0", | ||
| "react": "^18.2.0", | ||
| "react-scripts": "^5.0.1" | ||
| "jsdom": "^25.0.0", | ||
| "vite": "^8.0.0", | ||
| "vitest": "^2.0.0" | ||
| }, | ||
| "browserslist": { | ||
| "production": [ | ||
| ">0.2%", | ||
| "not dead", | ||
| "not op_mini all" | ||
| ], | ||
| "development": [ | ||
| "last 1 chrome version", | ||
| "last 1 firefox version", | ||
| "last 1 safari version" | ||
| ] | ||
| }, | ||
| "dependencies": { | ||
| "@ebay/muse-dev-utils": "^1.0.64", | ||
| "@jridgewell/gen-mapping": "0.3.8", | ||
| "base64-inline-loader": "^2.0.1" | ||
| }, | ||
| "scripts": { | ||
| "start": "muse-cra-patch && craco start", | ||
| "build": "muse-cra-patch && craco build", | ||
| "build:dev": "muse-cra-patch && cross-env NODE_ENV=development FAST_REFRESH=false craco build", | ||
| "test": "muse-cra-patch && craco test --ci --watchAll=false --passWithNoTests --coverage", | ||
| "test:dev": "muse-cra-patch && craco test --coverage", | ||
| "postbuild": "cp MUSE_README.md ./build" | ||
| "start": "vite", | ||
| "build": "vite build", | ||
| "postbuild": "cp MUSE_README.md ./build", | ||
| "test": "vitest run" | ||
| } | ||
| } |
| { | ||
| "files": { | ||
| "main.js": "/boot.js", | ||
| "static/media/logo.png": "/static/media/logo.0629cb217459ef0a31a2.png", | ||
| "boot.js.map": "/boot.js.map" | ||
| }, | ||
| "entrypoints": [ | ||
| "boot.js" | ||
| ] | ||
| } |
Sorry, the diff of this file is too big to display
| {"version":3,"file":"boot.js","mappings":";;;;;;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACxBA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;;;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACNA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAEA;AACA;;;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtIA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpFA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;;AAEA;AACA;AACA;AACA;AAGA;;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAOA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AAIA;AACA;AACA;;AAGA;AACA;AACA;AACA;AAUA;AACA;AACA;;AAUA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACzXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAEA;;;;;;;;;;;;;;;;ACnCA;AAEA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AClDA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;ACzLA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC1BA;AACA;AACA;;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC9BA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AClBA;;;;;;;;;;;;;ACAA;AACA;AAEA","sources":["/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/buildCache.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/config.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/findMuseModule.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/getGlobal.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/index.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/museRequire.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/parseMuseId.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/@ebay+muse-modules@1.0.29/node_modules/@ebay/muse-modules/register.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/style.css","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/boot.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/error.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/loading.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/msgEngine.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/registerSw.js","webpack://@ebay/muse-boot-default/./src/style.css?9935","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/urlListener.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/utils.js","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/bootstrap","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/compat get default export","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/define property getters","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/global","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/hasOwnProperty shorthand","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/make namespace object","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/publicPath","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/webpack/runtime/nonce","/home/runner/work/Muse/Muse/ui-plugins/muse-boot-default/src/index.js"],"sourcesContent":["const parseMuseId = require('./parseMuseId');\n\n/* \n Group modules by module's id (pkgName/path) to support multiple versions.\n For example:\n cache: {\n 'loadash/lib/get.js': [\n { moduleId: 'lodash@1.0.1/lib/get.js, name, version, ...},\n { moduleId: 'lodash@4.0.0/lib/get.js, name, version, ...},\n ]\n }\n*/\nfunction buildCache(obj) {\n if (!obj.cache) obj.cache = {};\n if (!obj.modules) obj.modules = {};\n\n Object.keys(obj.modules).forEach((mid) => {\n const m = parseMuseId(mid);\n if (!m) return;\n if (!obj.cache[m.id]) obj.cache[m.id] = [];\n obj.cache[m.id].push(m);\n });\n}\n\nmodule.exports = buildCache;\n","const config = {\n matchVersion: 'all', // all|major|minor|patch\n};\n","const parseMuseId = require('./parseMuseId');\nconst buildCache = require('./buildCache');\nconst config = require('./config');\n\n// Get the version diff, e.g: [1,2,3] - [1,2,4] = [0,0,1]\nconst verDiff = (v1, v2) => [0, 1, 2].map((i) => Math.abs(v1[i] - v2[i]));\n\n// Whether ver1 is less than ver2, e.g: [1,2,3] < [1,2,4]\n// This can also be used to compare version diff from verDiff()\nconst lt = (v1, v2) => {\n for (let i = 0; i < 3; i++) {\n if (v1[i] < v2[i]) return true;\n if (v1[i] > v2[i]) return false;\n }\n return false;\n};\n\nconst gt = (v1, v2) => !lt(v1, v2);\n\n/**\n * Resolve module to the greater and closest semantic version.\n * If there is only one version, use it.\n * If there are multiple versions, use the closest but greater one.\n *\n * NOTE: it doesn't support prerelease versions. e.g: 1.0.0-beta.1 will be treated as 1.0.0\n *\n * @param {String} museId example: @ebay/nice-modal-react@1.0.0/src/index.js\n * @param {*} museSharedModules { modules, cache }\n * @returns\n */\nfunction findMuseModule(museId, museShared) {\n museId = museId.replace(/\\\\/g, '/').replace(/\\/+/g, '/');\n if (!museShared) museShared = MUSE_GLOBAL.__shared__;\n\n if (museShared.modules[museId]) {\n return museShared.modules[museId];\n }\n\n let cache = museShared.cache;\n\n if (!cache) {\n // group different versions by module id\n buildCache(museShared);\n cache = museShared.cache;\n }\n\n const m = parseMuseId(museId);\n\n if (!m) return null;\n const candidates = cache[m.id];\n if (!candidates) return null;\n let picked = candidates[0];\n let minDiff = verDiff(m.version, picked.version);\n\n for (let i = 1; i < candidates.length; i++) {\n const c = candidates[i];\n\n // if same version, use it\n if (m.version.join('.') === c.version.join('.')) {\n picked = c;\n break;\n }\n\n // apply match version config\n\n // Ensure picked version is grater than target version\n if (gt(picked.version, m.version) && lt(c.version, m.version)) continue;\n\n // The version diff between the current version and the target version\n const currentDiff = verDiff(c.version, m.version);\n\n if ((lt(picked.version, m.version) && gt(c.version, m.version)) || lt(currentDiff, minDiff)) {\n minDiff = currentDiff;\n picked = c;\n }\n }\n\n switch (config.matchVersion) {\n case 'major':\n if (minDiff[0] !== 0) return null;\n break;\n case 'minor':\n if (minDiff[0] !== 0 || minDiff[1] !== 0) return null;\n break;\n case 'patch':\n if (minDiff[0] !== 0 || minDiff[1] !== 0 || minDiff[2] !== 0) return null;\n break;\n case 'all':\n break;\n default:\n break;\n }\n\n return museShared.modules[picked.museId];\n}\n\nmodule.exports = findMuseModule;\n","const getGlobal = function () {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n};\n\nmodule.exports = getGlobal();\n","module.exports = {\n config: require('./config'),\n require: require('./museRequire'),\n register: require('./register'),\n parseMuseId: require('./parseMuseId'),\n findMuseModule: require('./findMuseModule'),\n};\n","const findMuseModule = require('./findMuseModule');\n\nvar __muse_module_cache__ = {};\nmodule.exports = (museId) => {\n // Check if module is in cache\n var cachedModule = __muse_module_cache__[museId];\n if (!cachedModule) {\n museModule = cachedModule;\n __muse_module_cache__[museId] = findMuseModule(museId);\n }\n\n // Use module's require method to get the final module\n const m = __muse_module_cache__[museId];\n if (!m) throw new Error('Muse shared module not found: ' + museId);\n\n return m.__require__(m.id);\n};\n","/**\n * moduleId: muse module id example:\n * - lib1@1.0.3/src/index.js\n * - @ebay/nice-modal@1.2.3/src/index.ts // scoped package\n * - @ebay/nice-modal@1.2.3-alpha.1/src/index.ts // scoped package\n */\nfunction parseMuseId(museId) {\n try {\n const m = /((^@[^/]+\\/)?([^@/]+))@(\\d+)\\.(\\d+)\\.(\\d+)([^./][^/]*)?\\/(.+)$/.exec(museId);\n if (!m) return null;\n return {\n name: m[1],\n path: m[8],\n id: `${m[1]}/${m[8]}`,\n museId,\n version: m.slice(4, 7).map(Number),\n preRelease: m[7]?.replace('-', ''),\n };\n } catch (err) {\n return null;\n }\n}\n\nmodule.exports = parseMuseId;\n","const theGlobal = require('./getGlobal');\nconst parseMuseId = require('./parseMuseId');\n/**\n * Register modules to muse module system.\n *\n * @param {Object} modules Key value object for Muse modules.\n * @param {Function} __require__ used to require the actual module, for example: __webpack_require__\n */\nfunction register(modules, __require__) {\n for (const mid in modules) {\n // If it's not muse module, continue\n if (!parseMuseId(mid)) continue;\n const m = modules[mid];\n theGlobal.MUSE_GLOBAL.__shared__.modules[mid] = {\n id: mid,\n __require__,\n };\n }\n}\nmodule.exports = register;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `#muse-loading-node {\n position: fixed;\n display: grid;\n place-items: center;\n left: 0;\n top: 0%;\n width: 100%;\n height: 100%;\n z-index: 99999;\n /* background-color: #fff; */\n transition: opacity ease-out 0.3s;\n line-height: 1.5 !important;\n}\n\n#muse-loading-node .muse-loading-node-inner {\n position: relative;\n display: grid;\n place-items: center;\n}\n\n/* #muse-loading-node .muse-loading-node-inner > svg {\n width: 120px;\n height: 120px;\n} */\n\n#muse-loading-node .muse-loading-node-inner > img {\n position: absolute;\n width: 60px;\n}\n\n#muse-loading-node div > label {\n display: block;\n text-align: center;\n font-family: Helvetica, Arial, sans-serif;\n color: #888;\n font-size: 13px;\n}\n\n@keyframes ldio-klconu2768 {\n 0% {\n transform: rotate(0deg);\n }\n 50% {\n transform: rotate(180deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ldio-klconu2768 div {\n position: absolute;\n animation: ldio-klconu2768 1s linear infinite;\n width: 140px;\n height: 140px;\n top: 30px;\n left: 30px;\n border-radius: 50%;\n box-shadow: 0 4px 0 0 #00b4d8;\n transform-origin: 70px 72px;\n}\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\n width: 200px;\n height: 200px;\n display: inline-block;\n overflow: hidden;\n}\n.ldio-klconu2768 {\n width: 100%;\n height: 100%;\n position: relative;\n transform: translateZ(0) scale(1);\n backface-visibility: hidden;\n transform-origin: 0 0; /* see note above */\n}\n.ldio-klconu2768 div {\n box-sizing: content-box;\n}\n/* generated by https://loading.io/ */\n\n#muse-error-node {\n position: fixed;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n font-family: Helvetica, Arial, sans-serif;\n color: red;\n line-height: 150%;\n font-size: 14px;\n display: grid;\n place-items: center;\n}\n\n#muse-error-node .muse-error-node-inner {\n min-width: 500px;\n max-width: 800px;\n border: 1px solid red;\n border-radius: 3px;\n padding: 15px;\n}\n#muse-error-node h4 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 16px;\n}\n#muse-error-node li {\n padding: 3px 0;\n}\n#muse-error-node p {\n color: #777;\n font-style: italic;\n font-size: 13px;\n}\n\n#muse-error-node p a {\n color: #039be5;\n text-decoration: none;\n}\n\n#muse-error-node p a:hover {\n text-decoration: underline;\n}\n\n.muse-theme-dark {\n background-color: #141414;\n}\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,eAAe;EACf,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,2BAA2B;AAC7B;;AAEA;EACE,kBAAkB;EAClB,aAAa;EACb,mBAAmB;AACrB;;AAEA;;;GAGG;;AAEH;EACE,kBAAkB;EAClB,WAAW;AACb;;AAEA;EACE,cAAc;EACd,kBAAkB;EAClB,yCAAyC;EACzC,WAAW;EACX,eAAe;AACjB;;AAEA;EACE;IACE,uBAAuB;EACzB;EACA;IACE,yBAAyB;EAC3B;EACA;IACE,yBAAyB;EAC3B;AACF;AACA;EACE,kBAAkB;EAClB,6CAA6C;EAC7C,YAAY;EACZ,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,6BAA6B;EAC7B,2BAA2B;AAC7B;AACA;EACE,YAAY;EACZ,aAAa;EACb,qBAAqB;EACrB,gBAAgB;AAClB;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB,iCAAiC;EACjC,2BAA2B;EAC3B,qBAAqB,EAAE,mBAAmB;AAC5C;AACA;EACE,uBAAuB;AACzB;AACA,qCAAqC;;AAErC;EACE,eAAe;EACf,OAAO;EACP,MAAM;EACN,YAAY;EACZ,WAAW;EACX,yCAAyC;EACzC,UAAU;EACV,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,gBAAgB;EAChB,qBAAqB;EACrB,kBAAkB;EAClB,aAAa;AACf;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,eAAe;AACjB;AACA;EACE,cAAc;AAChB;AACA;EACE,WAAW;EACX,kBAAkB;EAClB,eAAe;AACjB;;AAEA;EACE,cAAc;EACd,qBAAqB;AACvB;;AAEA;EACE,0BAA0B;AAC5B;;AAEA;EACE,yBAAyB;AAC3B\",\"sourcesContent\":[\"#muse-loading-node {\\n position: fixed;\\n display: grid;\\n place-items: center;\\n left: 0;\\n top: 0%;\\n width: 100%;\\n height: 100%;\\n z-index: 99999;\\n /* background-color: #fff; */\\n transition: opacity ease-out 0.3s;\\n line-height: 1.5 !important;\\n}\\n\\n#muse-loading-node .muse-loading-node-inner {\\n position: relative;\\n display: grid;\\n place-items: center;\\n}\\n\\n/* #muse-loading-node .muse-loading-node-inner > svg {\\n width: 120px;\\n height: 120px;\\n} */\\n\\n#muse-loading-node .muse-loading-node-inner > img {\\n position: absolute;\\n width: 60px;\\n}\\n\\n#muse-loading-node div > label {\\n display: block;\\n text-align: center;\\n font-family: Helvetica, Arial, sans-serif;\\n color: #888;\\n font-size: 13px;\\n}\\n\\n@keyframes ldio-klconu2768 {\\n 0% {\\n transform: rotate(0deg);\\n }\\n 50% {\\n transform: rotate(180deg);\\n }\\n 100% {\\n transform: rotate(360deg);\\n }\\n}\\n.ldio-klconu2768 div {\\n position: absolute;\\n animation: ldio-klconu2768 1s linear infinite;\\n width: 140px;\\n height: 140px;\\n top: 30px;\\n left: 30px;\\n border-radius: 50%;\\n box-shadow: 0 4px 0 0 #00b4d8;\\n transform-origin: 70px 72px;\\n}\\n.loadingio-spinner-eclipse-p5fn84x4bh8 {\\n width: 200px;\\n height: 200px;\\n display: inline-block;\\n overflow: hidden;\\n}\\n.ldio-klconu2768 {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n transform: translateZ(0) scale(1);\\n backface-visibility: hidden;\\n transform-origin: 0 0; /* see note above */\\n}\\n.ldio-klconu2768 div {\\n box-sizing: content-box;\\n}\\n/* generated by https://loading.io/ */\\n\\n#muse-error-node {\\n position: fixed;\\n left: 0;\\n top: 0;\\n height: 100%;\\n width: 100%;\\n font-family: Helvetica, Arial, sans-serif;\\n color: red;\\n line-height: 150%;\\n font-size: 14px;\\n display: grid;\\n place-items: center;\\n}\\n\\n#muse-error-node .muse-error-node-inner {\\n min-width: 500px;\\n max-width: 800px;\\n border: 1px solid red;\\n border-radius: 3px;\\n padding: 15px;\\n}\\n#muse-error-node h4 {\\n margin-top: 0;\\n margin-bottom: 10px;\\n font-size: 16px;\\n}\\n#muse-error-node li {\\n padding: 3px 0;\\n}\\n#muse-error-node p {\\n color: #777;\\n font-style: italic;\\n font-size: 13px;\\n}\\n\\n#muse-error-node p a {\\n color: #039be5;\\n text-decoration: none;\\n}\\n\\n#muse-error-node p a:hover {\\n text-decoration: underline;\\n}\\n\\n.muse-theme-dark {\\n background-color: #141414;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {};\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import museModules from '@ebay/muse-modules';\nimport loading from './loading';\nimport error from './error';\nimport registerSw from './registerSw';\nimport { loadInParallel, getPluginId } from './utils';\nimport msgEngine from './msgEngine';\nimport './urlListener';\nimport './style.css';\n\nasync function start() {\n // If MUSE_TEMP_temp-redirect-url has a value, then redirect to that url.\n // This is a one time redirect, so remove the value after redirecting.\n // It's used for sub app login flow.\n const tempRedirectUrl = window.sessionStorage.getItem('MUSE_TEMP_temp-redirect-url');\n if (tempRedirectUrl) {\n window.sessionStorage.removeItem('MUSE_TEMP_temp-redirect-url');\n window.location = tempRedirectUrl;\n return;\n }\n\n const mg = window.MUSE_GLOBAL;\n loading.showMessage('Starting...');\n const waitForLoaders = mg.waitForLoaders || [];\n\n // Get the config from both app and env\n // That is, app.config is the default, env.config can override any value on app.config\n const appConfig = Object.assign({}, mg.app?.config);\n Object.entries(mg.env?.config || {}).forEach(([key, value]) => {\n if (value !== null && value !== undefined && value !== '') {\n appConfig[key] = value;\n }\n });\n\n Object.assign(mg, {\n appVariables: mg.appVariables || {},\n pluginVariables: mg.pluginVariables || {},\n appConfig,\n msgEngine,\n loading,\n error,\n isSubApp: window.parent !== window,\n getUser: () => null,\n appEntries: mg.appEntries || [], // entries to start the app\n initEntries: mg.initEntries || [], // entries from init plugins\n pluginEntries: mg.pluginEntries || [], // entries from lib or normal plugins\n // Allow to register some func to wait for before starting the app\n waitFor: (asyncFuncOrPromise) => {\n waitForLoaders.push(asyncFuncOrPromise);\n },\n // TODO: get plugin assets public paths (assets in public folder)\n getPublicPath: (pluginName, assetPath) => {\n if (!assetPath) throw new Error('assetPath is required for getPublicPath method.');\n assetPath = assetPath.replace(/^\\/*/, '');\n const pluginId = getPluginId(pluginName);\n\n if (mg.isDev) {\n // for dev, check if there's local plugins\n const names = mg.plugins.find((p) => !!p.localPlugins)?.localPlugins;\n if (names && names.includes(pluginName)) {\n return `/muse-assets/local/p/${pluginId}/${assetPath}`;\n }\n }\n const currentPlugin = window.MUSE_GLOBAL.plugins?.find((p) => p.name === pluginName);\n if (!currentPlugin) return;\n let { version } = currentPlugin || {};\n if (!version.startsWith('v')) {\n version = `v${version}`;\n }\n let publicPath = `${window.MUSE_GLOBAL.cdn}/p/${pluginId}/${version}`;\n if (window.MUSE_GLOBAL.isDev || window.MUSE_GLOBAL.isLocal) {\n publicPath = publicPath + `/dev/${assetPath}`;\n } else {\n publicPath = publicPath + `/dist/${assetPath}`;\n }\n return publicPath;\n },\n // Muse shared modules global methods\n __shared__: {\n modules: {},\n register: museModules.register,\n require: museModules.require,\n parseMuseId: museModules.parseMuseId,\n },\n });\n\n const { cdn = '', initEntries, pluginEntries, appEntries, isDev = false, isE2eTest = false } = mg;\n let { plugins = [] } = window.MUSE_GLOBAL;\n\n // MUSE_CONFIG is for backward compatibility\n window.MUSE_CONFIG = mg;\n\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-starting',\n // url: document.location.href,\n });\n\n registerSw();\n\n // Print app plugins in dev console\n const bootPlugin = plugins.find((p) => p.type === 'boot');\n if (bootPlugin) {\n console.log(\n `Loading Muse app by ${bootPlugin.name}@${bootPlugin.version || bootPlugin.url}...`,\n );\n }\n\n /* Handle forcePlugins query parameter */\n const searchParams = new URLSearchParams(window.location.search);\n const forcePluginStr = searchParams.get('forcePlugins');\n if (forcePluginStr) {\n const forcePluginById = forcePluginStr\n .split(';')\n .filter(Boolean)\n .reduce((p, c) => {\n const separator = '@';\n const limit = 2;\n let prefix = '';\n if (c.startsWith('@') && c[0] === separator) {\n // Starts with @, means it's a scoped plugin\n c = c.substring(1);\n prefix = '@';\n }\n const arr = c.split(separator, limit);\n if (arr.length === limit) {\n const [name, type] = arr[0].split('!');\n p[`${prefix}${name}`] = {\n version: arr[1],\n type: type,\n };\n }\n return p;\n }, {});\n // Update or remove plugins from the list based on forcePlugins\n plugins = plugins\n .map((p) => {\n if (!forcePluginById[p.name]) return p;\n const newPlugin = { ...p, version: forcePluginById[p.name].version };\n delete forcePluginById[p.name];\n return newPlugin;\n })\n .filter((p) => p.version !== 'null');\n\n // Need to get the type of plugin from muse registry directly.\n for (const p in forcePluginById) {\n if (forcePluginById[p].version !== 'null') {\n plugins.push({\n name: p,\n type: forcePluginById[p].type,\n version: forcePluginById[p].version,\n });\n }\n }\n }\n\n console.log(`Plugins(${plugins.length}):`);\n // If a plugin has isLocal, it means its bundle is loaded somewhere else.\n // The registered plugin item is used to provide configurations. e.g plugin variables.\n plugins.forEach((p) => {\n let source = '';\n if (p.linkedTo) source = 'Linked to: ' + p.linkedTo;\n else if (p.isLocalLib) {\n source = 'Local:' + (/\\d{4,}/.exec(p.url)?.[0] || document.location.port); // find port number\n } else if (p.url) source = p.url;\n if (source) source = ` (${source})`;\n\n console.log(` * ${p.name}@${p.version || 'local'}${source}`);\n });\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loading',\n });\n // Load init plugins\n // Init plugins should be small and not depend on each other\n const initPluginsToLoad = plugins\n .filter((p) => p.type === 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/dist/main.js`,\n ...p,\n };\n })\n .filter(Boolean);\n\n // Load init plugins\n if (initPluginsToLoad.length > 0) {\n loading.showMessage(`Loading init plugins 1/${initPluginsToLoad.length}...`);\n await loadInParallel(initPluginsToLoad, (loadedCount) =>\n loading.showMessage(\n `Loading init plugins ${Math.min(loadedCount + 1, initPluginsToLoad.length)}/${\n initPluginsToLoad.length\n }...`,\n ),\n );\n }\n\n // Exec init entries\n if (initEntries.length > 0) {\n loading.showMessage(`Executing init entries...`);\n initEntries.sort((a, b) => (a.order || 10) - (b.order || 10)); // sort by order\n for (const initEntry of initEntries) {\n // Allow an init entry to break the start of the app\n if ((await initEntry.func()) === false) return;\n }\n }\n\n // NOTE: init plugins have the opportunity to modify plugins list.\n // It's an expected behavior for some permission control.\n\n // Load normal and lib plugins\n const bundleDir = isDev ? 'dev' : isE2eTest ? 'test' : 'dist';\n const pluginsToLoad = plugins\n .filter((p) => p.type !== 'boot' && p.type !== 'init')\n .map((p) => {\n return {\n url:\n p.isLocal || p.linkedTo\n ? false\n : p.url || `${cdn}/p/${getPluginId(p.name)}/v${p.version}/${bundleDir}/main.js`,\n ...p, // if a plugin already has url, always use it\n };\n })\n .filter(Boolean);\n\n // Load plugin bundles\n const libPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'lib');\n loading.showMessage(`Loading lib plugins 1/${libPluginsToLoad.length}...`);\n await loadInParallel(\n libPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading lib plugins ${Math.min(loadedCount + 1, libPluginsToLoad.length)}/${\n libPluginsToLoad.length\n }...`,\n ),\n );\n\n const normalPluginsToLoad = pluginsToLoad.filter((p) => p.type === 'normal' || !p.type);\n loading.showMessage(`Loading normal plugins 1/${normalPluginsToLoad.length}...`);\n await loadInParallel(\n normalPluginsToLoad.filter((p) => !p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading normal plugins ${Math.min(loadedCount + 1, normalPluginsToLoad.length)}/${\n normalPluginsToLoad.length\n }...`,\n ),\n );\n\n // TODO: why we need to load esModule plugins separately?\n const esPluginsToLoad = pluginsToLoad.filter((p) => p.esModule);\n await loadInParallel(\n esPluginsToLoad.filter((p) => p.esModule),\n (loadedCount) =>\n loading.showMessage(\n `Loading es plugins ${Math.min(loadedCount + 1, esPluginsToLoad.length)}/${\n esPluginsToLoad.length\n }...`,\n ),\n );\n\n // Exec plugin entries which are generated by building process\n // This ensures a fixed order for plugins to initialize\n if (pluginEntries.length > 0) {\n loading.showMessage(`Executing plugin entries...`);\n pluginEntries.forEach((entry) => entry.func());\n }\n\n // Wait for loader\n if (waitForLoaders.length > 0) {\n loading.showMessage(`Executing custom loaders ...`);\n const arr = await Promise.all(\n waitForLoaders.map(async (loader) => {\n // Usually a plugin waitFor a promise so that it doesn't need to wait for all plugins loaded before executing\n if (loader.then) return await loader;\n // If pass an async function, it executes while all plugins are loaded.\n else return await loader();\n }),\n );\n // If a loader returns false, then don't continue starting\n // NOTE: if a loader needs to show an error message, just throw an error.\n if (arr.some((s) => s === false)) return;\n }\n\n // Start the application\n let entryName = appConfig.entry;\n if (!entryName) {\n // If there isn't entry defined and there's only one app entry from the plugins list.\n // Then just use the only one.\n if (appEntries.length === 1) {\n entryName = appEntries[0].name;\n } else if (appEntries.length === 0) {\n throw new Error(\n 'No app entry found. You need a plugin deployed to the app to provide an app entry.',\n );\n } else {\n throw new Error(\n `Multiple entries found: ${appEntries\n .map((e) => e.name)\n .join(', ')}. You need to specify one entry in app config.`,\n );\n }\n }\n const entryApp = appEntries.find((e) => e.name === entryName);\n if (entryApp) {\n console.log(`Starting the app from ${entryName}...`);\n loading.showMessage(`Starting the app...`);\n await entryApp.func();\n } else {\n throw new Error(`The specified app entry was not found: ${entryName}.`);\n }\n loading.hide();\n}\n\nexport function bootstrap() {\n if (!window.MUSE_GLOBAL) {\n throw new Error('There must be a global window.MUSE_GLOBAL object');\n }\n\n loading.init();\n msgEngine.init();\n\n const timeStart = Date.now();\n const appStartExceptions = [];\n let status = 'success';\n let errorMsg;\n start()\n .then(() => {\n const timeEnd = Date.now();\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-loaded',\n });\n console.log(`Muse app started in ${(timeEnd - timeStart) / 1000} seconds.`);\n })\n .catch((err) => {\n console.log('Failed to start the app.');\n status = 'failure';\n errorMsg = err?.message || 'App failed to start.';\n appStartExceptions.push(err);\n\n err && console.error(err);\n loading.hide();\n if (err?.message) {\n error.showMessage(err.message);\n }\n msgEngine.sendToParent({\n type: 'app-state-change',\n state: 'app-failed',\n });\n })\n .finally(() => {\n const bootCompleteEvent = new CustomEvent('muse_boot_completed', {\n detail: {\n result: status,\n metrics: [\n {\n name: 'app-start-result',\n payload: {\n duration: Date.now() - timeStart,\n status,\n errorMsg,\n url: document.location.href,\n },\n },\n {\n name: 'app-start-exceptions',\n payload: appStartExceptions,\n },\n ],\n },\n });\n window.dispatchEvent(bootCompleteEvent);\n });\n}\n","const error = {\n errors: [],\n init() {\n const errorDiv = document.createElement('div');\n errorDiv.innerHTML = ``;\n errorDiv.id = 'muse-error-node';\n document.body.appendChild(errorDiv);\n this.mountNode = errorDiv;\n },\n showMessage(msg) {\n const arr = msg?.splice ? msg : [msg];\n this.errors.push(...arr);\n this.update();\n },\n update() {\n if (!this.mountNode) this.init();\n\n const content =\n this.errors.length === 1\n ? `<div>${this.errors[0]}</div>`\n : `<ul>\n ${this.errors.map((err) => '<li>' + err + '</li>').join('')}\n </ul>`;\n this.mountNode.innerHTML = `\n <div class=\"muse-error-node-inner\">\n <h4>Failed to load:</h4>\n ${content}\n <p>* Unexpected error happened, please refresh to retry or <a href=\"${\n window.MUSE_GLOBAL.appConfig?.supportLink || '#'\n }\">contact support</a>.</p>\n </div>\n `;\n },\n};\n\nexport default error;\n","import logo from './logo.png';\n\nconst loading = {\n init() {\n const { app, cdn } = window.MUSE_GLOBAL;\n const loadingDiv = document.createElement('div');\n const logoUrl = app.iconId\n ? `${cdn}/p/app-icon.${app.name}/v0.0.${app.iconId}/dist/icon.png`\n : logo;\n loadingDiv.innerHTML = `\n <div>\n <div class='muse-loading-node-inner'>\n <div class=\"loadingio-spinner-eclipse-p5fn84x4bh8\"><div class=\"ldio-klconu2768\"><div>\n </div></div></div>\n <img src=\"${logoUrl}\" aria-label=\"logo\" />\n </div>\n <label>Starting...</label>\n </div>\n `;\n loadingDiv.id = 'muse-loading-node';\n if (\n (app.config?.theme === 'dark' && !localStorage.getItem('muse.theme')) ||\n (localStorage.getItem('muse.theme') && localStorage.getItem('muse.theme') === 'dark')\n ) {\n document.body.classList.add('muse-theme-dark');\n }\n document.body.appendChild(loadingDiv);\n this.mountNode = loadingDiv;\n this.labelNode = loadingDiv.querySelector('label');\n },\n\n hide() {\n if (!this.mountNode) return;\n setTimeout(() => {\n this.mountNode.style.opacity = 0;\n }, 10);\n\n setTimeout(() => {\n document.body.removeChild(this.mountNode);\n delete this.mountNode;\n }, 800);\n\n delete this.labelNode;\n },\n\n showMessage(msg) {\n if (this.labelNode) this.labelNode.innerHTML = msg || '';\n },\n};\n\nexport default loading;\n","// Message engine is used to communicate between main app and sub app via postMessage\nconst makeId = () => Math.random().toString(36).substring(2);\n\nconst msgEngine = {\n listeners: {},\n promises: {},\n iframes: {},\n register(key, iframe) {\n this.iframes[key] = iframe;\n },\n unregister(key) {\n delete this.iframes[key];\n },\n getIframe(iframe) {\n if (typeof iframe === 'string') return this.iframes[iframe];\n return iframe;\n },\n init() {\n // Assert a client is a Muse app\n this.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n this.sendToParent({\n promiseId: msg?.data?.promiseId,\n data: {\n app: window.MUSE_GLOBAL.app.name,\n env: window.MUSE_GLOBAL.env.name,\n },\n });\n\n window.MUSE_GLOBAL.parentApp = msg?.data?.from;\n }\n });\n\n window.addEventListener(\n 'message',\n (msg) => {\n if (msg?.data?.type !== 'muse') return;\n console.log('on muse post msg: ', msg);\n if (msg?.data?.payload?.promiseId) {\n this.resolvePromise(msg.data.payload.promiseId, msg?.data.payload?.data);\n }\n Object.entries(this.listeners).forEach(([id, func]) => {\n try {\n func(msg.data.payload, msg);\n } catch (err) {\n console.log(`Warning: failed to process message \"${id}\"`, msg, err);\n }\n });\n },\n false,\n );\n },\n resolve(promiseId, payload) {\n // Todo: send\n },\n // a component could listen messages from other apps\n addListener(id, callback) {\n this.listeners[id] = callback;\n },\n removeListener(id) {\n delete this.listeners[id];\n },\n sendToChild(msg, iframe, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n try {\n this.getIframe(iframe)?.contentWindow?.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n clientKey: 'parent',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log(`Failed to post message to child: `, msg);\n if (promise) promiseHandler.reject(err);\n }\n return promise;\n },\n\n sendToParent(msg, isPromise = false) {\n let promise = null;\n let promiseHandler = null;\n let id = null;\n if (isPromise) {\n id = makeId();\n promise = new Promise((resolve, reject) => {\n promiseHandler = this.promises[id] = { resolve, reject };\n });\n }\n if (window.parent && window.parent !== window) {\n try {\n window.parent.postMessage(\n {\n type: 'muse',\n promiseId: id,\n from: {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n type: 'child',\n },\n payload: msg,\n },\n '*',\n );\n } catch (err) {\n console.log('Failed to send message to parent: ', msg);\n if (promise) promiseHandler.reject(err);\n }\n }\n return promise;\n },\n\n // assert the app in iframe is a muse app\n assertMuseApp(iframe) {\n return new Promise((resolve, reject) => {\n this.sendToChild({ type: 'assert-muse-app' }, this.getIframe(iframe), true).then(resolve);\n setTimeout(() => reject(new Error('Muse app check timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n getParentUrl() {\n return new Promise((resolve, reject) => {\n this.sendToParent({ type: 'get-parent-url' }, true).then(resolve);\n setTimeout(() => reject(new Error('Get parent url timeout.')), 300); // if no response in 300ms (normally 30ms), it means it's not a Muse app.\n });\n },\n\n parentNavigate(url) {\n this.sendToParent({ type: 'parent-navigate', url });\n },\n\n resolvePromise(promiseId, payload) {\n this.promises[promiseId]?.resolve(payload);\n delete this.promises[promiseId];\n },\n resolveParent(promiseId, payload) {\n msgEngine.sendToParent({ promiseId: promiseId, data: payload });\n },\n\n resolveChild(promiseId, payload, msg) {\n msgEngine.sendToChild({ promiseId: promiseId, data: payload }, msg?.source);\n },\n};\n\n// Assert a client is a Muse app\nmsgEngine.addListener('handle-muse-app-check', (payload, msg) => {\n if (payload?.type === 'assert-muse-app' && msg.data?.from?.clientKey === 'parent') {\n // Tell parent I'm a Muse app.\n msgEngine.resolveParent(msg?.data?.promiseId, {\n app: window.MUSE_GLOBAL.appName,\n env: window.MUSE_GLOBAL.envName,\n });\n }\n});\n\n// Allow to navigate from sub app\nmsgEngine.addListener('parent-navigate', (payload) => {\n if (payload?.type === 'parent-navigate' && payload?.url) {\n window.location.href = payload.url;\n }\n});\n\n// Allow to get url from parent\nmsgEngine.addListener('get-parent-url', (payload, msg) => {\n if (payload?.type === 'get-parent-url') {\n console.log('get-parent-url: ', window.location.href);\n msgEngine.resolveChild(msg?.data?.promiseId, window.location.href, msg);\n }\n});\n\nexport default msgEngine;\n","// Try to register service worker.\nimport loading from './loading';\n\nfunction registerSw() {\n const { serviceWorker } = window.MUSE_GLOBAL;\n if (!navigator.serviceWorker) return;\n if (serviceWorker && window.location.protocol === 'https:') {\n loading.showMessage('Registering Muse service worker.');\n return new Promise((resolve) => {\n let resolved = false;\n setTimeout(() => {\n if (!resolved) {\n console.log('Failed to register service worker in 10 seconds. Skip it.');\n resolve();\n }\n }, 10000);\n navigator.serviceWorker\n .register(serviceWorker, {})\n .then(function () {\n resolved = true;\n console.log('Service Worker register done.');\n resolve();\n })\n .catch(() => {\n resolved = true;\n console.log('Failed to register service worker, skip it.');\n resolve(); // Tolerate failures\n });\n });\n }\n}\n\nexport default registerSw;\n","\n import API from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/.pnpm/style-loader@3.3.4_webpack@5.102.1/node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {\"base\":11914653};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/.pnpm/css-loader@6.11.0_webpack@5.102.1/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[1]!../node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.102.1/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[5].use[2]!../node_modules/.pnpm/source-map-loader@3.0.2_webpack@5.102.1/node_modules/source-map-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","// Notify the parent of the url change\n// subapp => parent\n// In muse-react/src/common/history handle url change msg\n\nimport msgEngine from './msgEngine';\n\nconst patchHistoryMethod = (method) => {\n const history = window.history;\n const original = history[method];\n\n history[method] = function (state) {\n const result = original.apply(this, arguments);\n const event = new Event('muse_boot_' + method.toLowerCase());\n event.state = state;\n window.dispatchEvent(event);\n return result;\n };\n};\n\npatchHistoryMethod('pushState');\npatchHistoryMethod('replaceState');\n\nconst handleUrlChange = () => {\n msgEngine.sendToParent({\n type: 'child-route-change',\n path: window.location.href.replace(window.location.origin, ''),\n });\n};\nwindow.addEventListener('popstate', handleUrlChange);\nwindow.addEventListener('muse_boot_pushstate', handleUrlChange);\nwindow.addEventListener('muse_boot_replacestate', handleUrlChange);\n","import error from './error';\nconst noop = () => {};\n\nexport function load(plugin, callback) {\n callback = callback || noop;\n if (plugin.then && plugin.catch) {\n plugin.then(callback);\n return;\n }\n\n if (plugin.url) {\n return new Promise((resolve, reject) => {\n const head = document.querySelector('head');\n const script = document.createElement('script');\n script.src = plugin.url;\n if (plugin.esModule) script.type = 'module';\n head.appendChild(script);\n script.onload = () => {\n callback();\n resolve();\n };\n // from unit tests, we resolve this Promise immediately. This is needed, as jest will never run the script.onload() function,\n // as it's not a real browser, making the Promise never resolve.\n if (process.env.NODE_ENV === 'test') {\n resolve();\n }\n script.onerror = () => {\n error.showMessage(`Failed to load resource: ${plugin.url} .`);\n reject();\n };\n });\n }\n}\n\nexport async function loadInParallel(items, callback = noop) {\n let count = 0;\n await Promise.all(\n items.map(async (item) => {\n await load(item);\n callback(++count);\n }),\n );\n}\n\nexport function joinPath(p1, p2) {\n if (!p1.endsWith('/')) p1 += '/';\n if (p2.startsWith('/')) p2 = p2.replace(/^\\/+/, '');\n return p1 + p2;\n}\n\nexport function getPluginId(name) {\n if (name.startsWith('@')) return name.replace('/', '.');\n return name;\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.nc = undefined;","// boot plugin is used to load other plugins based on the app config\nimport { bootstrap } from './boot';\n\nbootstrap();\n"],"names":[],"sourceRoot":""} |
Sorry, the diff of this file is not supported yet
| { | ||
| "files": { | ||
| "main.js": "/boot.js", | ||
| "static/media/logo.png": "/static/media/logo.0629cb217459ef0a31a2.png", | ||
| "boot.js.map": "/boot.js.map" | ||
| }, | ||
| "entrypoints": [ | ||
| "boot.js" | ||
| ] | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
0
-100%8
-38.46%1
-87.5%1
-50%Yes
NaN110646
-62.11%9
-18.18%90
-95%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed