@next-bricks/nav 1.25.0 → 1.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +11 -11
- package/dist/chunks/{1685.437940d7.js → 1685.4468328d.js} +2 -2
- package/dist/chunks/{1685.437940d7.js.map → 1685.4468328d.js.map} +1 -1
- package/dist/chunks/2241.11d61042.js +3 -0
- package/dist/chunks/{2241.e6e34a55.js.map → 2241.11d61042.js.map} +1 -1
- package/dist/chunks/{3171.367df14c.js → 3171.3651f844.js} +2 -2
- package/dist/chunks/{3171.367df14c.js.map → 3171.3651f844.js.map} +1 -1
- package/dist/chunks/3944.7690ce12.js +2 -0
- package/dist/chunks/{3944.a7f7cffe.js.map → 3944.7690ce12.js.map} +1 -1
- package/dist/chunks/{4765.63943e2d.js → 4765.73431265.js} +2 -2
- package/dist/chunks/{4765.63943e2d.js.map → 4765.73431265.js.map} +1 -1
- package/dist/chunks/4837.45038636.js +2 -0
- package/dist/chunks/{7218.623deb5b.js.map → 4837.45038636.js.map} +1 -1
- package/dist/chunks/{5552.6fa4b6df.js → 5552.8c304ab0.js} +2 -2
- package/dist/chunks/{5552.6fa4b6df.js.map → 5552.8c304ab0.js.map} +1 -1
- package/dist/chunks/{5655.a02d92d1.js → 5655.de131f04.js} +2 -2
- package/dist/chunks/{5655.a02d92d1.js.map → 5655.de131f04.js.map} +1 -1
- package/dist/chunks/6128.60331a2a.js +2 -0
- package/dist/chunks/{6128.3912671f.js.map → 6128.60331a2a.js.map} +1 -1
- package/dist/chunks/6502.058666e4.js +2 -0
- package/dist/chunks/{6502.9ac6b169.js.map → 6502.058666e4.js.map} +1 -1
- package/dist/chunks/{7146.d52a68a3.js → 7146.3d4e2b18.js} +2 -2
- package/dist/chunks/{7146.d52a68a3.js.map → 7146.3d4e2b18.js.map} +1 -1
- package/dist/chunks/7218.fc5b2303.js +2 -0
- package/dist/chunks/{4837.d06f1908.js.map → 7218.fc5b2303.js.map} +1 -1
- package/dist/chunks/{8097.20e092c4.js → 8097.b5c8d700.js} +2 -2
- package/dist/chunks/{8097.20e092c4.js.map → 8097.b5c8d700.js.map} +1 -1
- package/dist/chunks/9118.ef4d8081.js +3 -0
- package/dist/chunks/{9118.c70241ba.js.map → 9118.ef4d8081.js.map} +1 -1
- package/dist/chunks/9363.06df54ed.js +3 -0
- package/dist/chunks/{9363.cb610e3e.js.map → 9363.06df54ed.js.map} +1 -1
- package/dist/chunks/948.5f812985.js +3 -0
- package/dist/chunks/948.5f812985.js.map +1 -0
- package/dist/chunks/easyops-navbar-alerts.a0672659.js +2 -0
- package/dist/chunks/{easyops-navbar-alerts.cc7090db.js.map → easyops-navbar-alerts.a0672659.js.map} +1 -1
- package/dist/chunks/{eo-directory-tree.2ba780f8.js → eo-directory-tree.88ac8dce.js} +3 -3
- package/dist/chunks/{eo-directory-tree.2ba780f8.js.map → eo-directory-tree.88ac8dce.js.map} +1 -1
- package/dist/chunks/eo-directory.96899794.js +3 -0
- package/dist/chunks/{eo-directory.a0e99853.js.map → eo-directory.96899794.js.map} +1 -1
- package/dist/chunks/{eo-frame-breadcrumb.a2d98877.js → eo-frame-breadcrumb.37f12f2c.js} +2 -2
- package/dist/chunks/{eo-frame-breadcrumb.a2d98877.js.map → eo-frame-breadcrumb.37f12f2c.js.map} +1 -1
- package/dist/chunks/{eo-launchpad-button-v2.aa05077e.js → eo-launchpad-button-v2.9aee7338.js} +3 -3
- package/dist/chunks/{eo-launchpad-button-v2.aa05077e.js.map → eo-launchpad-button-v2.9aee7338.js.map} +1 -1
- package/dist/chunks/{eo-launchpad-button.b8b7bcff.js → eo-launchpad-button.51a5ded5.js} +3 -3
- package/dist/chunks/{eo-launchpad-button.b8b7bcff.js.map → eo-launchpad-button.51a5ded5.js.map} +1 -1
- package/dist/chunks/{eo-launchpad-quick-access.b0a48525.js → eo-launchpad-quick-access.f1b29121.js} +3 -3
- package/dist/chunks/{eo-launchpad-quick-access.b0a48525.js.map → eo-launchpad-quick-access.f1b29121.js.map} +1 -1
- package/dist/chunks/eo-nav-menu.30edd233.js +2 -0
- package/dist/chunks/{eo-nav-menu.64183ee8.js.map → eo-nav-menu.30edd233.js.map} +1 -1
- package/dist/chunks/{eo-search-launchpad.8d4e293c.js → eo-search-launchpad.b1c12ae7.js} +2 -2
- package/dist/chunks/{eo-search-launchpad.8d4e293c.js.map → eo-search-launchpad.b1c12ae7.js.map} +1 -1
- package/dist/chunks/eo-sidebar-menu-group.a099dd1a.js +3 -0
- package/dist/chunks/{eo-sidebar-menu-group.01ac76d3.js.map → eo-sidebar-menu-group.a099dd1a.js.map} +1 -1
- package/dist/chunks/{eo-sidebar-menu-submenu.5cb414f6.js → eo-sidebar-menu-submenu.7144caa0.js} +3 -3
- package/dist/chunks/{eo-sidebar-menu-submenu.5cb414f6.js.map → eo-sidebar-menu-submenu.7144caa0.js.map} +1 -1
- package/dist/chunks/{eo-sidebar-menu.48f4f3a7.js → eo-sidebar-menu.f2d2b295.js} +2 -2
- package/dist/chunks/{eo-sidebar-menu.48f4f3a7.js.map → eo-sidebar-menu.f2d2b295.js.map} +1 -1
- package/dist/chunks/eo-sidebar-sub-menu.b1736cc6.js +3 -0
- package/dist/chunks/{eo-sidebar-sub-menu.70c71ea9.js.map → eo-sidebar-sub-menu.b1736cc6.js.map} +1 -1
- package/dist/chunks/eo-sidebar.56ecf80d.js +3 -0
- package/dist/chunks/{eo-sidebar.ad2491ee.js.map → eo-sidebar.56ecf80d.js.map} +1 -1
- package/dist/chunks/{get-menu-config-options.5803223a.js → get-menu-config-options.6b508dcd.js} +2 -2
- package/dist/chunks/{get-menu-config-options.5803223a.js.map → get-menu-config-options.6b508dcd.js.map} +1 -1
- package/dist/chunks/{get-menu-config-tree.d139c301.js → get-menu-config-tree.f70d0693.js} +2 -2
- package/dist/chunks/{get-menu-config-tree.d139c301.js.map → get-menu-config-tree.f70d0693.js.map} +1 -1
- package/dist/chunks/launchpad-config.c50d5f7e.js +3 -0
- package/dist/chunks/{launchpad-config.bd938fce.js.map → launchpad-config.c50d5f7e.js.map} +1 -1
- package/dist/chunks/main.fcb661d8.js +2 -0
- package/dist/chunks/{main.7c9a2c63.js.map → main.fcb661d8.js.map} +1 -1
- package/dist/chunks/{nav-logo.96de5e52.js → nav-logo.58e14db0.js} +2 -2
- package/dist/chunks/{nav-logo.96de5e52.js.map → nav-logo.58e14db0.js.map} +1 -1
- package/dist/chunks/{poll-announce.bb9bd6d1.js → poll-announce.3e4d3681.js} +3 -3
- package/dist/chunks/{poll-announce.bb9bd6d1.js.map → poll-announce.3e4d3681.js.map} +1 -1
- package/dist/chunks/query-search.7d839ce3.js +3 -0
- package/dist/chunks/{query-search.0c3c3518.js.map → query-search.7d839ce3.js.map} +1 -1
- package/dist/index.96f417c0.js +2 -0
- package/dist/index.96f417c0.js.map +1 -0
- package/dist/manifest.json +12 -12
- package/package.json +2 -2
- package/dist/chunks/2241.e6e34a55.js +0 -3
- package/dist/chunks/3944.a7f7cffe.js +0 -2
- package/dist/chunks/4837.d06f1908.js +0 -2
- package/dist/chunks/6128.3912671f.js +0 -2
- package/dist/chunks/6502.9ac6b169.js +0 -2
- package/dist/chunks/7218.623deb5b.js +0 -2
- package/dist/chunks/9118.c70241ba.js +0 -3
- package/dist/chunks/9363.cb610e3e.js +0 -3
- package/dist/chunks/948.8641bd00.js +0 -3
- package/dist/chunks/948.8641bd00.js.map +0 -1
- package/dist/chunks/easyops-navbar-alerts.cc7090db.js +0 -2
- package/dist/chunks/eo-directory.a0e99853.js +0 -3
- package/dist/chunks/eo-nav-menu.64183ee8.js +0 -2
- package/dist/chunks/eo-sidebar-menu-group.01ac76d3.js +0 -3
- package/dist/chunks/eo-sidebar-sub-menu.70c71ea9.js +0 -3
- package/dist/chunks/eo-sidebar.ad2491ee.js +0 -3
- package/dist/chunks/launchpad-config.bd938fce.js +0 -3
- package/dist/chunks/main.7c9a2c63.js +0 -2
- package/dist/chunks/query-search.0c3c3518.js +0 -3
- package/dist/index.715d54c7.js +0 -2
- package/dist/index.715d54c7.js.map +0 -1
- /package/dist/chunks/{2241.e6e34a55.js.LICENSE.txt → 2241.11d61042.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9118.c70241ba.js.LICENSE.txt → 9118.ef4d8081.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9363.cb610e3e.js.LICENSE.txt → 9363.06df54ed.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{948.8641bd00.js.LICENSE.txt → 948.5f812985.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-directory-tree.2ba780f8.js.LICENSE.txt → eo-directory-tree.88ac8dce.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-directory.a0e99853.js.LICENSE.txt → eo-directory.96899794.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-launchpad-button-v2.aa05077e.js.LICENSE.txt → eo-launchpad-button-v2.9aee7338.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-launchpad-button.b8b7bcff.js.LICENSE.txt → eo-launchpad-button.51a5ded5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-launchpad-quick-access.b0a48525.js.LICENSE.txt → eo-launchpad-quick-access.f1b29121.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar-menu-group.01ac76d3.js.LICENSE.txt → eo-sidebar-menu-group.a099dd1a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar-menu-submenu.5cb414f6.js.LICENSE.txt → eo-sidebar-menu-submenu.7144caa0.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar-sub-menu.70c71ea9.js.LICENSE.txt → eo-sidebar-sub-menu.b1736cc6.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar.ad2491ee.js.LICENSE.txt → eo-sidebar.56ecf80d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{launchpad-config.bd938fce.js.LICENSE.txt → launchpad-config.c50d5f7e.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{poll-announce.bb9bd6d1.js.LICENSE.txt → poll-announce.3e4d3681.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{query-search.0c3c3518.js.LICENSE.txt → query-search.7d839ce3.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/8097.
|
|
1
|
+
{"version":3,"file":"chunks/8097.b5c8d700.js","mappings":"sOAEA,IAAIA,GAAc,EACX,SAASC,EAAoBC,EAAIC,IACtC,IAAAC,gBAAeF,EAAIC,GACdH,IACHA,GAAc,EACd,EAAAK,iBAAiBC,KAAK,EAAAC,MAE1B,C","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/react.js"],"sourcesContent":["import { i18n, initializeI18n } from \"@next-core/i18n\";\nimport { initReactI18next, useTranslation } from \"react-i18next\";\nlet initialized = false;\nexport function initializeReactI18n(NS, locales) {\n initializeI18n(NS, locales);\n if (!initialized) {\n initialized = true;\n initReactI18next.init(i18n);\n }\n}\nexport { useTranslation };\n//# sourceMappingURL=react.js.map"],"names":["initialized","initializeReactI18n","NS","locales","initializeI18n","initReactI18next","init","i18n"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 9118.ef4d8081.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_nav=globalThis.webpackChunk_next_bricks_nav||[]).push([[9118],{829:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2559);function o(e,t){return e.get((0,r.A)(e,t))}},918:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2016);function o(e,t,n){(0,r.A)(e,t),t.set(e,n)}},2016:(e,t,n)=>{function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{A:()=>r})},2559:(e,t,n)=>{function r(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}n.d(t,{A:()=>r})},4586:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(1369);function o(e,t,n){return(t=(0,r.A)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},4635:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2016);function o(e,t){(0,r.A)(e,t),t.add(e)}},5536:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2559);function o(e,t,n){return n((0,r.A)(e,t))}},6121:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2559);function o(e,t,n){return e.set((0,r.A)(e,t),n),n}},6330:(e,t,n)=>{function r(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var s=e.apply(t,n);function a(e){r(s,o,i,a,c,"next",e)}function c(e){r(s,o,i,a,c,"throw",e)}a(void 0)}))}}n.d(t,{A:()=>o})},9118:(e,t,n)=>{n.r(t),n.d(t,{analytics:()=>u,auth:()=>vt,checkInstalledApps:()=>o,checkPermissions:()=>mt,flowApi:()=>i,menu:()=>s,messageDispatcher:()=>gt});var r={};n.r(r),n.d(r,{addPathToBlackList:()=>S,authenticate:()=>A,getAuth:()=>w,isBlockedHref:()=>O,isBlockedPath:()=>I,isBlockedUrl:()=>P,isLoggedIn:()=>b,logout:()=>y});var o={};n.r(o),n.d(o,{getCheckedApp:()=>ae,preCheckInstalledApps:()=>ie,waitForCheckingApps:()=>se});var i={};n.r(i),n.d(i,{FLOW_API_PROVIDER:()=>ue,clearCollectWidgetContract:()=>be,clearDebugContract:()=>Ie,collectContract:()=>we,collectDebugContract:()=>Se,collectWidgetContract:()=>ye,getArgsOfFlowApi:()=>ke,isFlowApiProvider:()=>Oe,registerFlowApiProvider:()=>de});var s={};n.r(s),n.d(s,{fetchMenuById:()=>Ke,getMenuById:()=>Ye});var a={};n.r(a),n.d(a,{onRequest:()=>lt,onResponse:()=>pt,onResponseError:()=>dt});var c={};n.r(c),n.d(c,{create:()=>ht});var u={};n.r(u),n.d(u,{http:()=>a,initialize:()=>ct,pageView:()=>c});var l=n(9655),p=n(6330),d=n(1361),f=function(){var e=(0,p.A)((function*(e,t){return(yield d.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}(),h=n(348),m=n(1732);const g={};let v=new Set;function A(e){var t;Object.assign(g,{org:e.org,username:e.username,userInstanceId:e.userInstanceId,loginFrom:e.loginFrom,accessRule:e.accessRule,isAdmin:e.isAdmin,csrfToken:e.csrfToken,license:e.license,accessToken:e.accessToken,userShowValue:e.userShowValue}),v=new Set(null===(t=e.license)||void 0===t?void 0:t.blackList)}function w(){return{...g}}function y(){for(const e of Object.keys(g))g[e]=void 0;k.clear(),E.length=0,C.clear()}function b(){return void 0!==g.username}function S(e){v.add(e)}function I(e){return[...v].some((t=>(0,h.matchPath)(e,{path:t})))}function P(e){const t=("string"==typeof e?(0,m.createLocation)(e):e).pathname;return"string"==typeof t&&I(t)}function O(e){const t=(0,h.getBasePath)(),n=new URL(e,`${location.origin}${t}`);return!(n.origin!==location.origin||!n.pathname.startsWith(t))&&I(n.pathname.substring(t.length-1))}const k=new Map,E=[],C=new Map;function M(e){if(b()&&!w().isAdmin)return T((0,l.scanPermissionActionsInAny)(e))}async function T(e){const t=e.filter((e=>!E.includes(e)));if(0===t.length)return;const n=[],r=[];for(const e of t){const t=k.get(e);t?n.push(t):r.push(e)}if(r.length>0){const e=(async()=>{try{const e=await f({actions:r},{noAbortOnRouteChange:!0});for(const t of e.actions)C.set(t.action,t.authorizationStatus),"undefined"===t.authorizationStatus&&console.error(`Undefined permission action: "${t.action}"`)}catch(e){console.error("Pre-check permissions failed",e)}finally{E.push(...r)}})();for(const t of r)k.set(t,e);n.push(e)}await Promise.all(n)}var _=n(4635),j=n(918),N=n(5536),$=n(2559),R=n(6121),D=n(829),L=n(1030),B=new WeakMap,W=new WeakMap,x=new WeakMap,U=new WeakMap,F=new WeakMap,q=new WeakMap,z=new WeakMap,H=new WeakSet;class G{constructor(e){(0,_.A)(this,H),(0,j.A)(this,B,void 0),(0,j.A)(this,W,void 0),(0,j.A)(this,x,[]),(0,j.A)(this,U,new Set),(0,j.A)(this,F,new Set),(0,j.A)(this,q,0),(0,j.A)(this,z,!1),(0,R.A)(B,this,e)}send(e){(0,D.A)(W,this)||(0,R.A)(W,this,(0,$.A)(H,this,J).call(this));const t=JSON.stringify(e);(0,D.A)(W,this).readyState===WebSocket.OPEN?(0,D.A)(W,this).send(t):(0,D.A)(x,this).push(t)}onMessage(e){return(0,D.A)(U,this).add(e),()=>{(0,D.A)(U,this).delete(e)}}onClose(e){return(0,D.A)(F,this).add(e),()=>{(0,D.A)(F,this).delete(e)}}reset(){(0,D.A)(x,this).length=0,(0,D.A)(U,this).clear(),(0,D.A)(F,this).clear()}close(){var e;(0,R.A)(z,this,!0),(null===(e=(0,D.A)(W,this))||void 0===e?void 0:e.readyState)===WebSocket.OPEN&&(0,D.A)(W,this).close()}}function J(){console.log("WebSocket connecting ...");const e=new WebSocket((0,D.A)(B,this));let t;return e.addEventListener("open",(n=>{console.log("WebSocket open:",n),t=setTimeout((()=>{t=void 0,(0,R.A)(q,this,0)}),1e3);for(const t of(0,D.A)(x,this))e.send(t);(0,D.A)(x,this).length=0})),e.addEventListener("close",(e=>{(0,D.A)(z,this)||(void 0!==t&&clearTimeout(t),console.log("WebSocket close:",e),1e3!==e.code&&(0,$.A)(H,this,V).call(this))})),e.addEventListener("error",(e=>{console.error("WebSocket error:",e)})),e.addEventListener("message",(e=>{const t=JSON.parse(e.data);for(const e of(0,D.A)(U,this))e(t)})),e}function V(){if((0,D.A)(q,this)>=5){console.error("WebSocket connect retry limit exceeded");for(const e of(0,D.A)(F,this))e();return}const e=1e3*Math.pow(2,(0,D.A)(q,this));console.log("WebSocket will reconnect after %d seconds",e/1e3),setTimeout((()=>{var e;(0,R.A)(q,this,(e=(0,D.A)(q,this),++e)),(0,R.A)(W,this,(0,$.A)(H,this,J).call(this))}),e)}var Y=new WeakMap,K=new WeakMap,Q=new WeakMap,X=new WeakSet;function Z(e){if(!(0,D.A)(Y,e)){const t=`${"https:"===location.protocol?"wss:":"ws:"}//${window.location.host}${(0,h.getBasePath)()}api/websocket_service/v1/ws`;(0,R.A)(Y,e,new G(t))}return(0,D.A)(Y,e)}function ee(e,t,n,r){const o=(0,D.A)(K,this)[e].get(r);if(o)return o;const i={event:"sub"===e?"TOPIC.SUB":"TOPIC.UNSUB",payload:n},s=new Promise(((t,r)=>{const o=te(n),s=(0,N.A)(X,this,Z).onMessage((n=>{const i=n.event===("sub"===e?"TOPIC.SUB_SUCCESS":"TOPIC.UNSUB_SUCCESS"),c=n.event===("sub"===e?"TOPIC.SUB_FAILED":"TOPIC.UNSUB_FAILED");(i||c)&&o===te(n.payload)&&((i?t:r)(n),s(),a())})),a=(0,N.A)(X,this,Z).onClose((()=>{r({retryCount:5}),s(),a()}));(0,N.A)(X,this,Z).send(i)}));return"sub"===e&&(0,D.A)(Q,this).set(t,r),(0,D.A)(K,this)[e].set(r,s),s}function te(e){const{system:t,topic:n}=e;return JSON.stringify({system:t,topic:n})}var ne=function(){var e=(0,p.A)((function*(e,t){return(yield d.http.post("api/gateway/micro_app_standalone.runtime.SearchMicroAppStandalone/api/v1/micro_app_standalone/search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();const re=new Map,oe=new Map;function ie(e,t){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){const n=function(e){var t;const n={usedArgs:new Set},{customTemplates:r,menus:o}=null!==(t=e.meta)&&void 0!==t?t:{};return(0,l.traverseStoryboardExpressions)([e.routes,r,o],((e,t)=>{(0,l.collectInstalledAppsHasUsage)(n,e,t)}),"INSTALLED_APPS"),[...n.usedArgs]}(e),r=[];for(const e of n)re.has(e)||t(e)||r.push(e);if(0===r.length)return;const o=ne({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]},{noAbortOnRouteChange:!0}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)}));for(const e of r)re.set(e,o.then((t=>{var n;const r=null==t||null===(n=t.list)||void 0===n?void 0:n.find((t=>t.appId===e)),o=r?{...r,id:e}:void 0;return oe.set(e,o),o})))}}async function se(e){await Promise.all(e.map((e=>re.get(e))))}function ae(e){if(window.STANDALONE_MICRO_APPS)return oe.get(e)}var ce=n(7019);const ue="core.provider-flow-api";function le(e,t){return null==e?void 0:e.some((e=>e.source===t))}async function pe(e){let{url:t,originalUri:n,method:r="GET",responseWrapper:o=!0,ext_fields:i,request:s,isFileType:a,stream:c}=e;const u=["get","delete","head"].includes(r.toLowerCase()),l=a?{responseType:"blob"}:{};let p;for(var f=arguments.length,h=new Array(f>1?f-1:0),m=1;m<f;m++)h[m-1]=arguments[m];if(u){var g,v,A,w;let e,o;var y,b;if(n&&"object"===(null==s?void 0:s.type)&&(null!==(g=null===(v=n.match(/:([^/]+)/g))||void 0===v?void 0:v.length)&&void 0!==g?g:0)===(null!==(A=null===(w=s.fields)||void 0===w?void 0:w.length)&&void 0!==A?A:0)?[o]=h:[e,o]=h,c)return await(0,ce.createSSEStream)(d.http.getUrlWithParams(t,e),{...l,...o,method:r,headers:Object.fromEntries([...new Headers(null!==(y=null===(b=o)||void 0===b?void 0:b.headers)&&void 0!==y?y:{}).entries()])});p=await d.http.simpleRequest(r,t,{params:e,...l,...o})}else{const e=function(e){if("object"!==(null==e?void 0:e.type))return!1;const t=e=>!(0,L.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(s),n=function(e){const t=le(e,"query");for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(t){if(le(e,"body")){const[e,t,n]=r;return{data:e,options:{params:t,...n}}}const[t,n]=r;return{data:{},options:{params:t,...n}}}const[i,s]=r;return{data:i,options:s}}(i,...h),o=e?function(e){if(e instanceof FormData)return e;const t=new FormData;for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach((e=>{t.append(n,e)})):!(0,L.isObject)(r)||r instanceof Blob||r instanceof Date?t.append(n,r):Object.entries(r).forEach((e=>{let[r,o]=e;t.append(`${n}[${r}]`,o)}));return t}(n.data):n.data;if(c){var S;const{body:e,headers:i}=d.http.getBodyAndHeaders(o,null===(S=n.options)||void 0===S?void 0:S.headers);return await(0,ce.createSSEStream)(t,{...l,...n.options,method:r,headers:Object.fromEntries([...new Headers(null!=i?i:{}).entries()]),body:e})}p=await d.http.requestWithBody(r,t,o,{...l,...n.options})}return!a&&o?p.data:p}function de(){customElements.define(ue,(0,ce.createProviderClass)(pe))}var fe=n(5310);const he=async(e,t)=>(await d.http.post("api/gateway/next_builder.contract_center.BatchSearchContract/api/v1/contract/batch_search",e,t)).data,me=new Map,ge=new Map,ve=new Map,Ae=(e,t)=>{null==e||e.forEach((e=>{t.set(`${e.namespaceId}.${e.name}`,e)}))};function we(e){Ae(e,me)}function ye(e){Ae(e,ge)}function be(){ge.clear()}function Se(e){Ae(e,ve)}function Ie(){ve.clear()}const Pe=new Map;function Oe(e){return e.includes("@")}async function ke(e,t,n,r){if(!e.includes(":"))throw new Error(`You're using legacy Custom API "${e}" which is dropped in v3, please use Flow API instead`);const o=await async function(e){const[t,n]=e.split("@"),[r,o]=n.split(":"),i=function(e){return me.get(e)||ge.get(e)||ve.get(e)}(`${t}.${r}`);if(i)return{name:i.name,namespace:i.namespaceId,serviceName:i.serviceName,version:i.version,contract:{endpoint:i.endpoint,response:i.response,request:i.request}};let s=Pe.get(e);return s||(s=async function(e,t,n){let r;const o=`${e}@${t}`;let i;try{const{list:e}=await he({contract:[{fullContractName:o,version:n}]});r=e[0]}catch(e){i=e}return r?{name:r.name,namespace:r.namespaceId,serviceName:r.serviceName,version:r.version,contract:{endpoint:r.endpoint,response:r.response,request:r.request}}:(console.error(`Failed to fetch Flow API definition for "${o}:${n}"`,null!=i?i:"Contract not found"),null)}(t,r,o),Pe.set(e,s)),s}(e);if(!o)throw new Ee(`Flow API not found: "${e}"`);const i=function(e,t){var n,r;const o="string"==typeof t.contract?fe.safeLoad(t.contract,{schema:fe.JSON_SCHEMA,json:!0}):t.contract,{uri:i,method:s="GET",ext_fields:a}=null!==(n=null==o?void 0:o.endpoint)&&void 0!==n?n:{},c=!(null==o||!o.response)&&!1!==o.response.wrapper;if(!i)throw new Error(`Missing endpoint.uri in contract of provider "${e}"`);return{uri:i,method:"list"===s.toLowerCase()?"get":s,ext_fields:a,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==o||null===(r=o.response)||void 0===r?void 0:r.type),responseWrapper:c,request:null==o?void 0:o.request}}(e,o);return function(e,t,n,r){const{uri:o,method:i,ext_fields:s,responseWrapper:a,isFileType:c,request:u}=e,l="saveAs"===n;let p,d=t;l&&(Array.isArray(t)?(d=t.slice(),p=d.shift()):p=t.filename);const{url:f,args:h}=function(e,t){const{uri:n,name:r,namespace:o,serviceName:i,version:s,method:a="GET",request:c,ext_fields:u}=e,l=s?"logic.api.gateway"===i||null!=i&&i.startsWith("logic.api.gateway.")?"":i?`api/gateway/${i}`:`api/gateway/${o}.${r}@${s}`:`api/gateway/api_service.${o}.${r}`;let p,d=[];if(Array.isArray(t))d=t.slice(),p=n.replace(/:([^/]+)/g,(()=>d.shift()));else{const e={...t.params};if(p=n.replace(/:([^/]+)/g,((t,n)=>{if((0,ce.hasOwnProperty)(e,n)){const t=e[n];return delete e[n],t}throw new Error(`Missing required param: "${n}"`)})),["get","delete","head"].includes(a.toLowerCase())){var f,h,m,g;"object"===(null==c?void 0:c.type)&&(null!==(f=null===(h=n.match(/:([^/]+)/g))||void 0===h?void 0:h.length)&&void 0!==f?f:0)===(null!==(m=null===(g=c.fields)||void 0===g?void 0:g.length)&&void 0!==m?m:0)||d.push(e)}else{const t=null==u?void 0:u.find((e=>"body"===e.source));if(t){let n;t.name&&(0,ce.hasOwnProperty)(e,t.name)&&(n=e[t.name],delete e[t.name]),d.push(n)}const n=null==u?void 0:u.find((e=>"query"===e.source));if(n){let t;n.name&&(0,ce.hasOwnProperty)(e,n.name)&&(t=e[n.name],delete e[n.name]),d.push(t)}t||n||d.push(e)}t.options&&d.push(t.options)}return{url:l?l+p:p.replace(/^\//,""),args:d}}(e,d);return[...l?[p]:[],{url:f,originalUri:o,method:i,ext_fields:s,responseWrapper:a,request:u,isFileType:c,stream:r},...h]}(i,t,n,r)}class Ee extends Error{constructor(e){super(e),this.name="FlowApiNotFoundError",Error.captureStackTrace&&Error.captureStackTrace(this,Ee)}}var Ce=function(){var e=(0,p.A)((function*(e,t,n){return(yield d.http.post("api/gateway/cmdb.instance.PostSearch/object/".concat(e,"/instance/_search"),t,n)).data}));return function(t,n,r){return e.apply(this,arguments)}}(),Me=n(9740),Te=function(){var e=(0,p.A)((function*(e,t,n){return(yield d.http.get("api/gateway/micro_app.installed_micro_app.GetMenusInfo/api/v1/micro-app/menus/".concat(e),(0,Me.A)((0,Me.A)({},n),{},{params:t}))).data}));return function(t,n,r){return e.apply(this,arguments)}}(),_e=n(2616);const je=Symbol("appId"),Ne=Symbol("menuI18nNamespace"),$e=Symbol("overrideApp");async function Re(e,t,n){const r=e.find((e=>"inject"!==e.type));if(!r)return;const o=[],i=new Map,s=new WeakMap;for(const t of e)if(t.i18n){const e=`menu/${t.menuId}~${t.app[0].appId}+${t.instanceId}`;Object.entries(t.i18n).forEach((t=>{let[n,r]=t;_e.i18n.addResourceBundle(n,e,r)})),s.set(t,e)}await Promise.all(e.map((e=>async function(e,t,n,r){if(e.dynamicItems&&e.itemsResolve){const i=e.app[0].appId,s={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,M(e.itemsResolve)]};var o;i!==t.app.id&&(s.overrideApp=window.STANDALONE_MICRO_APPS?e.overrideApp:null===(o=r.getStoryboardByAppId(i))||void 0===o?void 0:o.app,s.appendI18nNamespace=n.get(e));const a=await r.resolveData({transform:"items",...e.itemsResolve},s);e.items=a.items}}(e,t,s,n))));for(const t of e){var a;if(null!==(a=t.items)&&void 0!==a&&a.length)if("inject"===t.type&&t.injectMenuGroupId){let e=i.get(t.injectMenuGroupId);e||(e=[],i.set(t.injectMenuGroupId,e)),e.push(t)}else o.push(t)}return{...r,items:o.flatMap((e=>De(e.items,e,i,s))),[Ne]:s.get(r),[$e]:r.overrideApp}}function De(e,t,n,r){return null==e?void 0:e.map((e=>{var o;const i=e.groupId&&n.get(e.groupId);return i&&n.delete(e.groupId),{...e,children:(null!==(o=De(e.children,t,n,r))&&void 0!==o?o:[]).concat(i?i.flatMap((e=>De(e.items,e,n,r))):[]),[je]:t.app[0].appId,[Ne]:r.get(t),[$e]:t.overrideApp}}))}function Le(e){e.items=Be(e.items)}function Be(e){return function(e){return(0,L.sortBy)(e,(e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}))}(e).map((e=>({...e,children:Be(e.children)})))}var We=n(9933),xe=n(1321);function Ue(e,t,n,r){if("titleDataSource"in e&&(0,ce.isObject)(e.titleDataSource)&&Object.entries(e.titleDataSource).every((e=>{let[,t]=e;return null===t||""===t}))&&delete e.titleDataSource,"if"in e&&null===e.if&&delete e.if,"to"in e&&e.to&&!(0,xe.isEvaluable)(e.to)){const t=We.pipes.yaml(e.to);(0,ce.isObject)(t)&&["pathname","search","hash"].some((e=>(0,ce.hasOwnProperty)(t,e)))&&(e.to=t)}let o=n;if(t!==n.app.id){var i;const s=window.STANDALONE_MICRO_APPS?e[$e]:null===(i=r.getStoryboardByAppId(t))||void 0===i?void 0:i.app;o={...n,overrideApp:s,appendI18nNamespace:e[Ne]}}return r.asyncComputeRealValue(e,o,{ignoreSymbols:!0})}function Fe(e,t,n){return Promise.all(e.map((async e=>{let{children:r,...o}=e;const[i,s]=await Promise.all([Ue(o,o[je],t,n),r&&await Fe(r,t,n)]);return{...i,children:s}})))}var qe=function(){var e=(0,p.A)((function*(e,t,n,r){return(yield d.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),(0,Me.A)((0,Me.A)({},r),{},{params:n}))).data}));return function(t,n,r,o){return e.apply(this,arguments)}}();const ze=new Map;async function He(e){if(e.title||(0,L.isEmpty)(e.titleDataSource))return e.title;const t=JSON.stringify(e.titleDataSource),n=ze.get(t);if(void 0!==n)return n;const{objectId:r,instanceId:o,attributeId:i}=e.titleDataSource,s=null!=i?i:"name",a=await qe(r,o,{fields:s});let c;if("#showKey"===i&&Array.isArray(a[s])){const[e,...t]=a[s];c=t.length>0?`${e}(${t.join(",")})`:String(e)}else c=String(a[s]);return ze.set(t,c),c}const Ge=new Map,Je=new Map;function Ve(e){return null==e?void 0:e.filter(h.checkIfOfComputed).map((e=>{const t=Ve(e.children);return"group"===e.type?{type:"group",title:e.text,childLayout:e.childLayout,items:t,groupId:e.groupId,groupFrom:e.groupFrom}:null!=t&&t.length?{type:"subMenu",childLayout:e.childLayout,title:e.text,icon:e.icon,items:t,defaultExpanded:e.defaultExpanded}:function(e){return e.href?O(e.href):!!e.to&&P(e.to)}(e)?null:(0,L.omit)(e,["type","items","children"])})).filter(Boolean)}function Ye(e){return Je.get(e)}function Ke(e,t,n){let r=Ge.get(e);return r||(r=async function(e,t,n){const r=window.STANDALONE_MICRO_APPS?function(e,t,n){var r,o,i,s;const a=n.getStoryboardByAppId(t);return(null!==(r=null!==(o=null===(i=a.meta)||void 0===i?void 0:i.injectMenus)&&void 0!==o?o:null===(s=a.meta)||void 0===s?void 0:s.menus)&&void 0!==r?r:[]).filter((t=>t.menuId===e)).map((e=>{var n;return{...e,...null!==(n=e.app)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&n.appId?{}:{app:[{appId:t}]}}}))}(e,t.app.id,n):t.flags["three-level-menu-layout"]?(await Te(e,{menuObjectId:"EASYOPS_STORYBOARD_MENU"})).menus:(await Ce("EASYOPS_STORYBOARD_MENU",{page:1,page_size:200,fields:{menuId:!0,title:!0,icon:!0,link:!0,titleDataSource:!0,defaultCollapsed:!0,defaultCollapsedBreakpoint:!0,type:!0,injectMenuGroupId:!0,dynamicItems:!0,itemsResolve:!0,items:!0,i18n:!0,"items.children":!0,"app.appId":!0},query:{menuId:{$eq:e},app:{$size:{$gt:0}}}})).list,o=await Re(r,t,n);if(!o)throw new Error(`Menu not found: ${e}`);Le(o);const{items:i,app:s,...a}=o,c={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,M([i,a])]};delete c.tplStateStoreId,delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize;const u=s[0].appId,[l,p]=await Promise.all([Ue(a,u,c,n),Fe(i,c,n)]),d={title:await He(l),...(0,L.pick)(l,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"]),menuItems:Ve(p)};Je.set(e,d)}(e,t,n)),r}const Qe=[];let Xe=null;const Ze={maxWaitingTime:5e3,maxLoggedEvents:10};function et(){clearTimeout(Xe),Qe.length>Ze.maxLoggedEvents?tt():Xe=setTimeout(tt,Ze.maxWaitingTime)}function tt(){if(0===Qe.length)return;const e={model:"easyops.FRONTEND_STAT",columns:["_ver","st","et","lt","size","time","traceId","code","duration","page","uid","username","api","type","msg","status","pageId","route","apiCount","maxApiTimeCost","apiSizeCost","pageTitle"],data:Qe.splice(0,Ze.maxLoggedEvents)};var t;!function(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});window.navigator.sendBeacon(e,n)}(Ze.api,e),Qe.length&&(t=tt,(window.requestIdleCallback||window.requestAnimationFrame||(e=>setTimeout(e,17)))(t))}function nt(){window.addEventListener("beforeunload",tt,!1)}let rt,ot=!1,it=null,st=!0;const at=[];function ct(e){ot||(ot=!0,rt||(rt=function(e,t){return Object.assign(Ze,{...t,api:e}),{sendOnExit:nt,emit:et}}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),rt.sendOnExit()))}const ut=Symbol("HttpAnalytics");function lt(e){const t=Math.round(performance.now()),n=Date.now();return e[ut]={st:n,time:Math.round(n/1e3),perfStartTime:t},e}function pt(e,t){return ft(!1,e,t)}function dt(e,t){return ft(!0,e,t)}function ft(e,t,n){const r=Math.round(performance.now()),o=Date.now(),{[ut]:i,url:s}=n;if(i&&!(e&&t instanceof d.HttpAbortError)){delete n[ut];const{st:c,time:u,perfStartTime:l}=i,{userInstanceId:p,username:f}=w();let h,m,g,v,A,y,b;if(e){const e=t instanceof d.HttpResponseError;(e||t instanceof d.HttpParseError)&&(({status:A,headers:y}=t.response),e&&(b=t.responseJson))}else({status:A,data:b,headers:y}=t);(0,ce.isObject)(b)&&({code:h,message:m}=b),y instanceof Headers&&(g=y.get("x-b3-traceid"),v=y.get("content-length")),a={st:c,_ver:c,uid:p,username:f,time:u,et:o,page:location.href,duration:r-l,api:s,type:"api",code:null!=h?h:-1,msg:null!=m?m:"",status:A,traceId:null!=g?g:"",size:v?Number(v):-1},it?Qe.push({...a,type:"apiRequest",...it}):at.push(a)}var a;return e?Promise.reject(t):t}function ht(){const e=Math.round(performance.now()),t=Date.now();return at.length=0,it=null,function(n){let{status:r,path:o,pageTitle:i}=n;if("ok"!==r)return Qe.push(...at),void(at.length=0);const s=Math.round(performance.now())-e,a=Date.now(),{username:c}=w();(function(e){const t=function(){const e=URL.createObjectURL(new Blob([]));let t=e.substring(e.lastIndexOf("/")+1);return URL.revokeObjectURL(e),st&&(t="88-"+t,st=!1),t}(),{lt:n,route:r}=e;it={lt:n,route:r,pageId:t},Qe.push({...e,pageId:t,apiCount:at.length,maxApiTimeCost:Math.max(0,...at.map((e=>e.duration))),size:at.map((e=>e.size)).filter((e=>e>0)).reduce(((e,t)=>e+t),0)});for(const e of at)Qe.push({...e,...it});at.length=0,rt.emit()})({type:"page",page:location.href,_ver:t,time:Math.round(t/1e3),st:t,et:a,lt:s,pageTitle:i,username:c,route:o}),window.dispatchEvent(new CustomEvent("route.render",{detail:{renderTime:s}}))}}const mt=Object.freeze({checkPermissions:function(){if(!b())return!1;if(w().isAdmin)return!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const e of t)switch(C.get(e)){case"unauthorized":case"undefined":return!1;case void 0:return console.error(`Un-checked permission action: "${e}", please make sure the permission to check is defined in permissionsPreCheck.`),!1}return!0},preCheckPermissions:function(e){if(b()&&!w().isAdmin)return T((0,l.scanPermissionActionsInStoryboard)(e))},preCheckPermissionsForBrickOrRoute:async function(e,t){if(b()&&!w().isAdmin&&Array.isArray(e.permissionsPreCheck))return T(await t(e.permissionsPreCheck))}}),gt=new class{constructor(){(0,_.A)(this,X),(0,j.A)(this,Y,void 0),(0,j.A)(this,K,{sub:new Map,unsub:new Map}),(0,j.A)(this,Q,new Map)}subscribe(e,t){const n=JSON.stringify(t);return(0,$.A)(X,this,ee).call(this,"sub",e,t,n)}unsubscribe(e){const t=(0,D.A)(Q,this).get(e);if(!t){const t=`The message channel to unsubscribe "${e}" is not found`;return console.error(t),Promise.reject(new Error(t))}const n=JSON.parse(t),r=(0,$.A)(X,this,ee).call(this,"unsub",e,n,t);return(0,D.A)(K,this).sub.delete(t),r.then((()=>{(0,D.A)(Q,this).delete(e)})),r}onMessage(e,t){let n=(0,D.A)(Q,this).get(e),r=!1;return(0,N.A)(X,this,Z).onMessage((o=>{n||(n=(0,D.A)(Q,this).get(e)),n?"MESSAGE.PUSH"===o.event&&function(e,t){const n=JSON.parse(e);return n.system===t.system&&(n.topic===t.topic||"string"==typeof n.topic&&n.topic.includes("*")&&new RegExp(`^${n.topic.replace(/([^*]*)\*([^*]*)/g,((e,t,n)=>`${(0,L.escapeRegExp)(t)}[^/]*${(0,L.escapeRegExp)(n)}`))}$`).test(t.topic))}(n,o.payload)&&t(o.payload.message):r||(console.error(`Message channel: "${e}" not found`),r=!0)}))}onClose(e){return(0,N.A)(X,this,Z).onClose(e)}reset(){var e;(0,D.A)(K,this).sub.clear(),(0,D.A)(K,this).unsub.clear(),(0,D.A)(Q,this).clear(),null===(e=(0,D.A)(Y,this))||void 0===e||e.reset()}},vt=function(){const e=(0,h.getV2RuntimeFromDll)();if(e)return Object.freeze((0,L.pick)(e,["authenticate","getAuth","isLoggedIn","logout","addPathToBlackList","isBlockedPath","isBlockedUrl","isBlockedHref"]))}()||r},9740:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(4586);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}}}]);
|
|
3
|
+
//# sourceMappingURL=9118.ef4d8081.js.map
|