@next-bricks/nav 1.12.0 → 1.13.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 +12 -8
- package/dist/chunks/{114.6a43b0f6.js → 114.7a9769ca.js} +2 -2
- package/dist/chunks/{114.6a43b0f6.js.map → 114.7a9769ca.js.map} +1 -1
- package/dist/chunks/1370.cbe87896.js +2 -0
- package/dist/chunks/{1370.531076d0.js.map → 1370.cbe87896.js.map} +1 -1
- package/dist/chunks/{2133.8d7b5fdf.js → 2133.57afe59f.js} +2 -2
- package/dist/chunks/{2133.8d7b5fdf.js.map → 2133.57afe59f.js.map} +1 -1
- package/dist/chunks/2140.2e870601.js +3 -0
- package/dist/chunks/2140.2e870601.js.LICENSE.txt +23 -0
- package/dist/chunks/2140.2e870601.js.map +1 -0
- package/dist/chunks/{2252.307d6b0e.js → 2252.a4907dbe.js} +3 -3
- package/dist/chunks/{2252.307d6b0e.js.map → 2252.a4907dbe.js.map} +1 -1
- package/dist/chunks/3751.93edf303.js +2 -0
- package/dist/chunks/3751.93edf303.js.map +1 -0
- package/dist/chunks/{4837.93cd1f47.js → 4837.4de613c0.js} +2 -2
- package/dist/chunks/{7218.23cd4106.js.map → 4837.4de613c0.js.map} +1 -1
- package/dist/chunks/5009.21202648.js +3 -0
- package/dist/chunks/5009.21202648.js.map +1 -0
- package/dist/chunks/5399.59a46cfe.js +2 -0
- package/dist/chunks/5399.59a46cfe.js.map +1 -0
- package/dist/chunks/{6256.1d74d5ae.js → 6256.5623ff67.js} +3 -3
- package/dist/chunks/{6256.1d74d5ae.js.map → 6256.5623ff67.js.map} +1 -1
- package/dist/chunks/6595.582896fb.js +2 -0
- package/dist/chunks/6595.582896fb.js.map +1 -0
- package/dist/chunks/6773.b8de20f0.js +2 -0
- package/dist/chunks/6773.b8de20f0.js.map +1 -0
- package/dist/chunks/{7218.23cd4106.js → 7218.99c42e66.js} +2 -2
- package/dist/chunks/{4837.93cd1f47.js.map → 7218.99c42e66.js.map} +1 -1
- package/dist/chunks/{7733.897a3dcc.js → 7733.1c59f07a.js} +2 -2
- package/dist/chunks/{7733.897a3dcc.js.map → 7733.1c59f07a.js.map} +1 -1
- package/dist/chunks/{8518.92aaa235.js → 8518.4a921b6e.js} +2 -2
- package/dist/chunks/{8518.92aaa235.js.map → 8518.4a921b6e.js.map} +1 -1
- package/dist/chunks/884.57ecb139.js +2 -0
- package/dist/chunks/884.57ecb139.js.map +1 -0
- package/dist/chunks/9149.6ca3f62d.js +2 -0
- package/dist/chunks/9149.6ca3f62d.js.map +1 -0
- package/dist/chunks/{easyops-navbar-alerts.d21fc6d9.js → easyops-navbar-alerts.af2663da.js} +2 -2
- package/dist/chunks/{easyops-navbar-alerts.d21fc6d9.js.map → easyops-navbar-alerts.af2663da.js.map} +1 -1
- package/dist/chunks/{eo-directory-tree.1c463aaf.js → eo-directory-tree.719990de.js} +2 -2
- package/dist/chunks/{eo-directory-tree.1c463aaf.js.map → eo-directory-tree.719990de.js.map} +1 -1
- package/dist/chunks/{eo-directory.bd369082.js → eo-directory.8ba6c6d0.js} +3 -3
- package/dist/chunks/{eo-directory.bd369082.js.map → eo-directory.8ba6c6d0.js.map} +1 -1
- package/dist/chunks/{eo-frame-breadcrumb.093f0480.js → eo-frame-breadcrumb.83f52c77.js} +2 -2
- package/dist/chunks/{eo-frame-breadcrumb.093f0480.js.map → eo-frame-breadcrumb.83f52c77.js.map} +1 -1
- package/dist/chunks/eo-launchpad-button-v2.07be5183.js +3 -0
- package/dist/chunks/eo-launchpad-button-v2.07be5183.js.map +1 -0
- package/dist/chunks/eo-launchpad-button.e103d796.js +3 -0
- package/dist/chunks/eo-launchpad-button.e103d796.js.map +1 -0
- package/dist/chunks/{eo-nav-menu.1d01b159.js → eo-nav-menu.f2e0363a.js} +2 -2
- package/dist/chunks/{eo-nav-menu.1d01b159.js.map → eo-nav-menu.f2e0363a.js.map} +1 -1
- package/dist/chunks/{eo-sidebar-menu-group.1d22d9c5.js → eo-sidebar-menu-group.972dc19f.js} +3 -3
- package/dist/chunks/{eo-sidebar-menu-group.1d22d9c5.js.map → eo-sidebar-menu-group.972dc19f.js.map} +1 -1
- package/dist/chunks/{eo-sidebar-menu-submenu.94692ea6.js → eo-sidebar-menu-submenu.1dc3020e.js} +3 -3
- package/dist/chunks/{eo-sidebar-menu-submenu.94692ea6.js.map → eo-sidebar-menu-submenu.1dc3020e.js.map} +1 -1
- package/dist/chunks/{eo-sidebar-menu.17700c2e.js → eo-sidebar-menu.090d1998.js} +2 -2
- package/dist/chunks/{eo-sidebar-menu.17700c2e.js.map → eo-sidebar-menu.090d1998.js.map} +1 -1
- package/dist/chunks/{eo-sidebar-sub-menu.19672455.js → eo-sidebar-sub-menu.d9d77c4d.js} +3 -3
- package/dist/chunks/{eo-sidebar-sub-menu.19672455.js.map → eo-sidebar-sub-menu.d9d77c4d.js.map} +1 -1
- package/dist/chunks/{eo-sidebar.61bc9b78.js → eo-sidebar.37543a7e.js} +3 -3
- package/dist/chunks/{eo-sidebar.61bc9b78.js.map → eo-sidebar.37543a7e.js.map} +1 -1
- package/dist/chunks/{launchpad-config.23e62dea.js → launchpad-config.246a5be8.js} +3 -3
- package/dist/chunks/{launchpad-config.23e62dea.js.map → launchpad-config.246a5be8.js.map} +1 -1
- package/dist/chunks/main.c675ac30.js +2 -0
- package/dist/chunks/main.c675ac30.js.map +1 -0
- package/dist/chunks/{nav-logo.0f27b8c0.js → nav-logo.53e00cac.js} +2 -2
- package/dist/chunks/{nav-logo.0f27b8c0.js.map → nav-logo.53e00cac.js.map} +1 -1
- package/dist/chunks/poll-announce.66b095cb.js +3 -0
- package/dist/chunks/poll-announce.66b095cb.js.LICENSE.txt +5 -0
- package/dist/chunks/poll-announce.66b095cb.js.map +1 -0
- package/dist/examples.json +3 -0
- package/dist/index.066a83be.js +2 -0
- package/dist/index.066a83be.js.map +1 -0
- package/dist/manifest.json +56 -20
- package/dist/types.json +86 -0
- package/dist-types/bootstrap.d.ts +1 -0
- package/dist-types/poll-announce/i18n.d.ts +15 -0
- package/dist-types/poll-announce/index.d.ts +39 -0
- package/docs/poll-announce.md +23 -0
- package/package.json +2 -3
- package/dist/chunks/1370.531076d0.js +0 -2
- package/dist/chunks/3413.34289625.js +0 -3
- package/dist/chunks/3413.34289625.js.map +0 -1
- package/dist/chunks/3751.573b450c.js +0 -2
- package/dist/chunks/3751.573b450c.js.map +0 -1
- package/dist/chunks/5399.16e2bd79.js +0 -2
- package/dist/chunks/5399.16e2bd79.js.map +0 -1
- package/dist/chunks/6773.4adb9d56.js +0 -2
- package/dist/chunks/6773.4adb9d56.js.map +0 -1
- package/dist/chunks/8171.7737a47f.js +0 -3
- package/dist/chunks/8171.7737a47f.js.map +0 -1
- package/dist/chunks/9043.01c7dd1e.js +0 -3
- package/dist/chunks/9043.01c7dd1e.js.LICENSE.txt +0 -3
- package/dist/chunks/9043.01c7dd1e.js.map +0 -1
- package/dist/chunks/9155.e3bb67fc.js +0 -3
- package/dist/chunks/9155.e3bb67fc.js.map +0 -1
- package/dist/chunks/eo-launchpad-button-v2.fb4da932.js +0 -2
- package/dist/chunks/eo-launchpad-button-v2.fb4da932.js.map +0 -1
- package/dist/chunks/eo-launchpad-button.8ee6d3fe.js +0 -2
- package/dist/chunks/eo-launchpad-button.8ee6d3fe.js.map +0 -1
- package/dist/chunks/main.afc0d726.js +0 -2
- package/dist/chunks/main.afc0d726.js.map +0 -1
- package/dist/index.477d9af4.js +0 -2
- package/dist/index.477d9af4.js.map +0 -1
- /package/dist/chunks/{2252.307d6b0e.js.LICENSE.txt → 2252.a4907dbe.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{3413.34289625.js.LICENSE.txt → 5009.21202648.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{6256.1d74d5ae.js.LICENSE.txt → 6256.5623ff67.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-directory.bd369082.js.LICENSE.txt → eo-directory.8ba6c6d0.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{8171.7737a47f.js.LICENSE.txt → eo-launchpad-button-v2.07be5183.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9155.e3bb67fc.js.LICENSE.txt → eo-launchpad-button.e103d796.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar-menu-group.1d22d9c5.js.LICENSE.txt → eo-sidebar-menu-group.972dc19f.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar-menu-submenu.94692ea6.js.LICENSE.txt → eo-sidebar-menu-submenu.1dc3020e.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar-sub-menu.19672455.js.LICENSE.txt → eo-sidebar-sub-menu.d9d77c4d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-sidebar.61bc9b78.js.LICENSE.txt → eo-sidebar.37543a7e.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{launchpad-config.23e62dea.js.LICENSE.txt → launchpad-config.246a5be8.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/2140.2e870601.js","mappings":";0NAQO,SAASA,EAAgBC,EAAUC,GACxC,IAIIC,EAASC,OAAOC,OAAO,MAO3B,OANIJ,GAAU,EAAAK,SAASC,IAAIN,GAAU,SAAUO,GAC7C,OAAOA,CACT,IAAGC,SAAQ,SAAUC,GAEnBP,EAAOO,EAAMC,KATF,SAAgBD,GAC3B,OAAOR,IAAS,IAAAU,gBAAeF,GAASR,EAAMQ,GAASA,CACzD,CAOsBG,CAAOH,EAC7B,IACOP,CACT,CAiEA,SAASW,EAAQJ,EAAOK,EAAMC,GAC5B,OAAsB,MAAfA,EAAMD,GAAgBC,EAAMD,GAAQL,EAAMM,MAAMD,EACzD,CAaO,SAASE,EAAoBC,EAAWC,EAAkBC,GAC/D,IAAIC,EAAmBrB,EAAgBkB,EAAUjB,UAC7CA,EA/DC,SAA4BqB,EAAMC,GAIvC,SAASC,EAAeb,GACtB,OAAOA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:///../../node_modules/react-transition-group/esm/utils/ChildMapping.js","webpack:///../../node_modules/react-transition-group/esm/TransitionGroup.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@next-api-sdk/cmdb-sdk/dist/esm/api/cmdb/instance/postSearchV3.js","webpack:///../../node_modules/@next-api-sdk/sys-setting-sdk/dist/esm/api/sys_setting/announce/ignoreAnnounce.js","webpack:///../../node_modules/@next-api-sdk/sys-setting-sdk/dist/esm/api/sys_setting/announce/listEffectiveAnnounce.js","webpack:///../../node_modules/@next-api-sdk/sys-setting-sdk/dist/esm/api/sys_setting/announce/pollAnnounce.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/launchpad/createCollection.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/launchpad/createCollectionV2.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/launchpad/deleteCollection.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/launchpad/deleteCollectionV2.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/launchpad/listCollection.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/launchpad/listCollectionV2.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/my_collection/listMyCollection.js","webpack:///../../node_modules/@next-api-sdk/user-service-sdk/dist/esm/api/user_service/my_collection/upsertMyCollection.js"],"sourcesContent":["import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateGetter(s, r, a) {\n return a(assertClassBrand(s, r));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 搜索实例V3 (支持多属性排序)\n * @endpoint POST /v3/object/:objectId/instance/_search\n */\nexport var InstanceApi_postSearchV3 = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (objectId, data, options) {\n return (/**! @contract easyops.api.cmdb.instance.PostSearchV3@1.1.0 */(yield http.post(\"api/gateway/cmdb.instance.PostSearchV3/v3/object/\".concat(objectId, \"/instance/_search\"), data, options)).data\n );\n });\n return function InstanceApi_postSearchV3(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=postSearchV3.js.map","import { http } from \"@next-core/http\";\n/**\n * @description 批量忽略公告\n * @endpoint POST /api/sys_setting/v1/announce/ignore\n */\nexport const AnnounceApi_ignoreAnnounce = (data, options) => /**! @contract easyops.api.sys_setting.announce.IgnoreAnnounce@1.0.1 */http.post(\"api/gateway/sys_setting.announce.IgnoreAnnounce/api/sys_setting/v1/announce/ignore\", data, options);\n//# sourceMappingURL=ignoreAnnounce.js.map","import { http } from \"@next-core/http\";\n/**\n * @description 查找当前用户的有效公告\n * @endpoint LIST /api/sys_setting/v1/announce/effective\n */\nexport const AnnounceApi_listEffectiveAnnounce = async (params, options) => /**! @contract easyops.api.sys_setting.announce.ListEffectiveAnnounce@1.0.1 */(await http.get(\"api/gateway/sys_setting.announce.ListEffectiveAnnounce/api/sys_setting/v1/announce/effective\", {\n ...options,\n params\n})).data;\n//# sourceMappingURL=listEffectiveAnnounce.js.map","import { http } from \"@next-core/http\";\n/**\n * @description 获取实时公告,长链接\n * @endpoint GET /api/sys_setting/v1/announce/poll\n */\nexport const AnnounceApi_pollAnnounce = async options => /**! @contract easyops.api.sys_setting.announce.PollAnnounce@1.0.0 */(await http.get(\"api/gateway/sys_setting.announce.PollAnnounce/api/sys_setting/v1/announce/poll\", options)).data;\n//# sourceMappingURL=pollAnnounce.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 新增我的收藏\n * @endpoint POST /api/v1/launchpad/collection\n */\nexport var LaunchpadApi_createCollection = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (data, options) {\n return (/**! @contract easyops.api.user_service.launchpad.CreateCollection@1.0.0 */(yield http.post(\"api/gateway/user_service.launchpad.CreateCollection/api/v1/launchpad/collection\", data, options)).data\n );\n });\n return function LaunchpadApi_createCollection(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=createCollection.js.map","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 新增我的收藏V2\n * @endpoint POST /api/v2/launchpad/collection\n */\nexport var LaunchpadApi_createCollectionV2 = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (data, options) {\n return (/**! @contract easyops.api.user_service.launchpad.CreateCollectionV2@1.0.0 */(yield http.post(\"api/gateway/user_service.launchpad.CreateCollectionV2/api/v2/launchpad/collection\", data, options)).data\n );\n });\n return function LaunchpadApi_createCollectionV2(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=createCollectionV2.js.map","import { http } from \"@next-core/http\";\n\n/**\n * @description 删除我的收藏\n * @endpoint DELETE /api/v1/launchpad/collection/:instanceId\n */\nexport var LaunchpadApi_deleteCollection = (instanceId, options) => /**! @contract easyops.api.user_service.launchpad.DeleteCollection@1.0.0 */http.delete(\"api/gateway/user_service.launchpad.DeleteCollection/api/v1/launchpad/collection/\".concat(instanceId), options);\n//# sourceMappingURL=deleteCollection.js.map","import { http } from \"@next-core/http\";\n\n/**\n * @description 删除我的收藏V2\n * @endpoint DELETE /api/v2/launchpad/collection/:instanceId\n */\nexport var LaunchpadApi_deleteCollectionV2 = (instanceId, options) => /**! @contract easyops.api.user_service.launchpad.DeleteCollectionV2@1.0.0 */http.delete(\"api/gateway/user_service.launchpad.DeleteCollectionV2/api/v2/launchpad/collection/\".concat(instanceId), options);\n//# sourceMappingURL=deleteCollectionV2.js.map","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 获取我的收藏列表\n * @endpoint LIST /api/v1/launchpad/collection\n */\nexport var LaunchpadApi_listCollection = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (params, options) {\n return (/**! @contract easyops.api.user_service.launchpad.ListCollection@1.0.0 */(yield http.get(\"api/gateway/user_service.launchpad.ListCollection/api/v1/launchpad/collection\", _objectSpread(_objectSpread({}, options), {}, {\n params\n }))).data\n );\n });\n return function LaunchpadApi_listCollection(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=listCollection.js.map","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 获取我的收藏列表V2\n * @endpoint LIST /api/v2/launchpad/collection\n */\nexport var LaunchpadApi_listCollectionV2 = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (params, options) {\n return (/**! @contract easyops.api.user_service.launchpad.ListCollectionV2@1.0.0 */(yield http.get(\"api/gateway/user_service.launchpad.ListCollectionV2/api/v2/launchpad/collection\", _objectSpread(_objectSpread({}, options), {}, {\n params\n }))).data\n );\n });\n return function LaunchpadApi_listCollectionV2(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=listCollectionV2.js.map","import _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nimport { http } from \"@next-core/http\";\n/**\n * @description 获取我的收藏列表\n * @endpoint GET /api/v1/user_service/my_collection/collections\n */\nexport var MyCollectionApi_listMyCollection = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (params, options) {\n return (/**! @contract easyops.api.user_service.my_collection.ListMyCollection@1.0.0 */(yield http.get(\"api/gateway/user_service.my_collection.ListMyCollection/api/v1/user_service/my_collection/collections\", _objectSpread(_objectSpread({}, options), {}, {\n params\n }))).data\n );\n });\n return function MyCollectionApi_listMyCollection(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\n//# sourceMappingURL=listMyCollection.js.map","import { http } from \"@next-core/http\";\n/**\n * @description 更新/新增我的收藏,这个接口用于全量更新单实例\n * @endpoint POST /api/v1/user_service/my_collection/upsert_collections\n */\nexport var MyCollectionApi_upsertMyCollection = (data, options) => /**! @contract easyops.api.user_service.my_collection.UpsertMyCollection@1.0.0 */http.post(\"api/gateway/user_service.my_collection.UpsertMyCollection/api/v1/user_service/my_collection/upsert_collections\", data, options);\n//# sourceMappingURL=upsertMyCollection.js.map"],"names":["getChildMapping","children","mapFn","result","Object","create","Children","map","c","forEach","child","key","isValidElement","mapper","getProp","prop","props","getNextChildMapping","nextProps","prevChildMapping","onExited","nextChildMapping","prev","next","getValueForKey","i","nextKeysPending","pendingKeys","prevKey","length","push","childMapping","nextKey","pendingNextKey","mergeChildMappings","keys","hasPrev","hasNext","prevChild","isLeaving","in","cloneElement","bind","exit","enter","values","obj","k","TransitionGroup","_React$Component","context","_this","handleExited","call","this","state","contextValue","isMounting","firstRender","_proto","prototype","componentDidMount","mounted","setState","componentWillUnmount","getDerivedStateFromProps","_ref","appear","node","currentChildMapping","render","_this$props","Component","component","childFactory","TransitionGroupContext","Provider","value","propTypes","defaultProps","_assertClassBrand","e","t","n","has","arguments","TypeError","_assertThisInitialized","self","ReferenceError","_checkPrivateRedeclaration","privateCollection","_classPrivateFieldGet2","s","a","get","_classPrivateFieldInitSpec","privateMap","set","_classPrivateFieldSet2","r","_classPrivateGetter","_classPrivateMethodInitSpec","privateSet","add","InstanceApi_postSearchV3","objectId","data","options","http","post","concat","_x","_x2","_x3","apply","AnnounceApi_ignoreAnnounce","AnnounceApi_listEffectiveAnnounce","async","params","AnnounceApi_pollAnnounce","LaunchpadApi_createCollection","LaunchpadApi_createCollectionV2","LaunchpadApi_deleteCollection","instanceId","delete","LaunchpadApi_deleteCollectionV2","LaunchpadApi_listCollection","LaunchpadApi_listCollectionV2","MyCollectionApi_listMyCollection","MyCollectionApi_upsertMyCollection"],"sourceRoot":""}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 2252.
|
|
2
|
-
"use strict";(globalThis.webpackChunk_next_bricks_nav=globalThis.webpackChunk_next_bricks_nav||[]).push([[2252],{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})},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})},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})},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)}},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}},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))}},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)}},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}},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}},2252:(e,t,n)=>{n.r(t),n.d(t,{analytics:()=>u,auth:()=>mt,checkInstalledApps:()=>o,checkPermissions:()=>ft,flowApi:()=>i,menu:()=>s,messageDispatcher:()=>ht});var r={};n.r(r),n.d(r,{authenticate:()=>m,getAuth:()=>g,isLoggedIn:()=>A,logout:()=>v});var o={};n.r(o),n.d(o,{getCheckedApp:()=>oe,preCheckInstalledApps:()=>ne,waitForCheckingApps:()=>re});var i={};n.r(i),n.d(i,{FLOW_API_PROVIDER:()=>ae,clearCollectWidgetContract:()=>we,clearDebugContract:()=>be,collectContract:()=>ve,collectDebugContract:()=>ye,collectWidgetContract:()=>Ae,getArgsOfFlowApi:()=>Oe,isFlowApiProvider:()=>Ie,registerFlowApiProvider:()=>pe});var s={};n.r(s),n.d(s,{fetchMenuById:()=>Ve,getMenuById:()=>Je});var a={};n.r(a),n.d(a,{onRequest:()=>ct,onResponse:()=>ut,onResponseError:()=>pt});var c={};n.r(c),n.d(c,{create:()=>dt});var u={};n.r(u),n.d(u,{http:()=>a,initialize:()=>st,pageView:()=>c});var p=n(877),l=n(6330),d=n(6730),f=function(){var e=(0,l.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)}}();const h={};function m(e){Object.assign(h,{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})}function g(){return{...h}}function v(){for(const e of Object.keys(h))h[e]=void 0;w.clear(),y.length=0,b.clear()}function A(){return void 0!==h.username}const w=new Map,y=[],b=new Map;function S(e){if(A()&&!g().isAdmin)return I((0,p.scanPermissionActionsInAny)(e))}async function I(e){const t=e.filter((e=>!y.includes(e)));if(0===t.length)return;const n=[],r=[];for(const e of t){const t=w.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)b.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{y.push(...r)}})();for(const t of r)w.set(t,e);n.push(e)}await Promise.all(n)}var O=n(4635),P=n(918),E=n(5536),k=n(2559),M=n(6121),C=n(829),_=n(9435),T=n(1030);const j=1e3,N=6;var D=new WeakMap,$=new WeakMap,R=new WeakMap,W=new WeakMap,x=new WeakMap,L=new WeakMap,U=new WeakMap,B=new WeakSet;class F{constructor(e){(0,O.A)(this,B),(0,P.A)(this,D,void 0),(0,P.A)(this,$,void 0),(0,P.A)(this,R,[]),(0,P.A)(this,W,new Set),(0,P.A)(this,x,new Set),(0,P.A)(this,L,0),(0,P.A)(this,U,!1),(0,M.A)(D,this,e)}send(e){(0,C.A)($,this)||(0,M.A)($,this,(0,k.A)(B,this,q).call(this));const t=JSON.stringify(e);(0,C.A)($,this).readyState===WebSocket.OPEN?(0,C.A)($,this).send(t):(0,C.A)(R,this).push(t)}onMessage(e){(0,C.A)(W,this).add(e)}onClose(e){(0,C.A)(x,this).add(e)}reset(){(0,C.A)(R,this).length=0,(0,C.A)(W,this).clear(),(0,C.A)(x,this).clear()}close(){var e;(0,M.A)(U,this,!0),(null===(e=(0,C.A)($,this))||void 0===e?void 0:e.readyState)===WebSocket.OPEN&&(0,C.A)($,this).close()}}function q(){console.log("WebSocket connecting ...");const e=new WebSocket((0,C.A)(D,this));return e.addEventListener("open",(t=>{console.log("WebSocket open:",t),(0,M.A)(L,this,0);for(const t of(0,C.A)(R,this))e.send(t);(0,C.A)(R,this).length=0})),e.addEventListener("close",(e=>{if(!(0,C.A)(U,this)){console.log("WebSocket close:",e);for(const e of(0,C.A)(x,this))e();1e3!==e.code&&(0,k.A)(B,this,z).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,C.A)(W,this))e(t)})),e}function z(){if((0,C.A)(L,this)>=N)return void console.error("WebSocket connect retry limit exceeded");const e=Math.pow(2,(0,C.A)(L,this))*j;console.log("WebSocket will reconnect after %d seconds",e/1e3),setTimeout((()=>{var e;(0,M.A)(L,this,(e=(0,C.A)(L,this),++e)),(0,M.A)($,this,(0,k.A)(B,this,q).call(this))}),e)}var H=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakSet;function Y(e){if(!(0,C.A)(H,e)){const t=`${"https:"===location.protocol?"wss:":"ws:"}//${window.location.host}${(0,_.getBasePath)()}api/websocket_service/v1/ws`;(0,M.A)(H,e,new F(t))}return(0,C.A)(H,e)}function K(e,t,n,r){const o=(0,C.A)(G,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=Q(n);(0,E.A)(V,this,Y).onMessage((n=>{const i=n.event===("sub"===e?"TOPIC.SUB_SUCCESS":"TOPIC.UNSUB_SUCCESS"),s=n.event===("sub"===e?"TOPIC.SUB_FAILED":"TOPIC.UNSUB_FAILED");(i||s)&&o===Q(n.payload)&&(i?t:r)(n)})),(0,E.A)(V,this,Y).send(i)}));return"sub"===e&&(0,C.A)(J,this).set(t,r),(0,C.A)(G,this)[e].set(r,s),s}function Q(e){const{system:t,topic:n}=e;return JSON.stringify({system:t,topic:n})}var X=n(3496),Z=function(){var e=(0,l.A)((function*(e,t){return(yield X.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 ee=new Map,te=new Map;function ne(e,t){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){const n=function(e){const t={usedArgs:new Set},{customTemplates:n,menus:r}=e.meta??{};return(0,p.traverseStoryboardExpressions)([e.routes,n,r],((e,n)=>{(0,p.collectInstalledAppsHasUsage)(t,e,n)}),"INSTALLED_APPS"),[...t.usedArgs]}(e),r=[];for(const e of n)ee.has(e)||t(e)||r.push(e);if(0===r.length)return;const o=Z({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)}));for(const e of r)ee.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 te.set(e,o),o})))}}async function re(e){await Promise.all(e.map((e=>ee.get(e))))}function oe(e){if(window.STANDALONE_MICRO_APPS)return te.get(e)}var ie=n(279),se=n(9422);const ae="core.provider-flow-api";function ce(e,t){return e.some((e=>e.source===t))}async function ue(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()),p=a?{responseType:"blob"}:{};let l;for(var d=arguments.length,f=new Array(d>1?d-1:0),h=1;h<d;h++)f[h-1]=arguments[h];if(u){var m,g;let e,o;var v;if(n&&"object"===(null==s?void 0:s.type)&&((null===(m=n.match(/:([^/]+)/g))||void 0===m?void 0:m.length)??0)===((null===(g=s.fields)||void 0===g?void 0:g.length)??0)?[o]=f:[e,o]=f,c)return await(0,ie.createSSEStream)(se.http.getUrlWithParams(t,e),{...p,...o,method:r,headers:Object.fromEntries([...new Headers((null===(v=o)||void 0===v?void 0:v.headers)??{}).entries()])});l=await se.http.simpleRequest(r,t,{params:e,...p,...o})}else{const e=function(e){if(!e||"object"!==e.type)return!1;const t=e=>!(0,T.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(s),n=function(e){const t=ce(e,"query"),n=ce(e,"body");for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(t){if(n){const[e,t,n]=o;return{data:e,options:{params:t,...n}}}const[e,t]=o;return{data:{},options:{params:e,...t}}}const[s,a]=o;return{data:s,options:a}}(i,...f),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,T.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 A;const{body:e,headers:i}=se.http.getBodyAndHeaders(o,null===(A=n.options)||void 0===A?void 0:A.headers);return await(0,ie.createSSEStream)(t,{...p,...n.options,method:r,headers:Object.fromEntries([...new Headers(i??{}).entries()]),body:e})}l=await se.http.requestWithBody(r,t,o,{...p,...n.options})}return!a&&o?l.data:l}function pe(){customElements.define(ae,(0,ie.createProviderClass)(ue))}var le=n(8679),de=function(){var e=(0,l.A)((function*(e,t){return(yield d.http.post("api/contract/single_search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();const fe=new Map,he=new Map,me=new Map,ge=(e,t)=>{null==e||e.forEach((e=>{t.set(`${e.namespaceId}.${e.name}`,e)}))};function ve(e){ge(e,fe)}function Ae(e){ge(e,he)}function we(){he.clear()}function ye(e){ge(e,me)}function be(){me.clear()}const Se=new Map;function Ie(e){return e.includes("@")}async function Oe(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 fe.get(e)||he.get(e)||me.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=Se.get(e);return s||(s=async function(e,t,n){var r;const{contractData:o}=await de({contractName:`${e}.${t}`,version:n});return o?{name:o.name,namespace:null===(r=o.namespace)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.name,serviceName:o.serviceName,version:o.version,contract:{endpoint:o.endpoint,response:o.response,request:o.request}}:null}(t,r,o),Se.set(e,s)),s}(e);if(!o)throw new Pe(`Flow API not found: "${e}"`);const i=function(e,t){var n;const r="string"==typeof t.contract?le.safeLoad(t.contract,{schema:le.JSON_SCHEMA,json:!0}):t.contract,{uri:o,method:i="GET",ext_fields:s}=(null==r?void 0:r.endpoint)??{},a=!(null==r||!r.response)&&!1!==r.response.wrapper;if(!o)throw new Error(`Missing endpoint.uri in contract of provider "${e}"`);return{uri:o,method:"list"===i.toLowerCase()?"get":i,ext_fields:s,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==r||null===(n=r.response)||void 0===n?void 0:n.type),responseWrapper:a,request:null==r?void 0:r.request}}(e,o);return function(e,t,n,r){let{uri:o,method:i,ext_fields:s,name:a,namespace:c,serviceName:u,responseWrapper:p,version:l,isFileType:d,request:f}=e;const h="saveAs"===n;let m;h&&(m=t.shift());const{url:g,args:v}=function(e,t,n,r,o,i){const s=i?"logic.api.gateway"===o||null!=o&&o.startsWith("logic.api.gateway.")?"":o?`api/gateway/${o}`:`api/gateway/${r}.${n}@${i}`:`api/gateway/api_service.${r}.${n}`,a=t.slice(),c=e.replace(/:([^/]+)/g,(()=>a.shift()));return{url:s?s+c:c.replace(/^\//,""),args:a}}(o,t,a,c,u,l);return[...h?[m]:[],{url:g,originalUri:o,method:i,ext_fields:s,responseWrapper:p,request:f,isFileType:d,stream:r},...v]}(i,t,n,r)}class Pe extends Error{constructor(e){super(e),this.name="FlowApiNotFoundError",Error.captureStackTrace&&Error.captureStackTrace(this,Pe)}}var Ee=function(){var e=(0,l.A)((function*(e,t,n){return(yield X.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)}}(),ke=n(9740),Me=function(){var e=(0,l.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,ke.A)((0,ke.A)({},n),{},{params:t}))).data}));return function(t,n,r){return e.apply(this,arguments)}}(),Ce=n(7318);const _e=Symbol("appId"),Te=Symbol("menuI18nNamespace"),je=Symbol("overrideApp");async function Ne(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;Ce.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,S(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))),[Te]:s.get(r),[je]:r.overrideApp}}function De(e,t,n,r){return null==e?void 0:e.map((e=>{const o=e.groupId&&n.get(e.groupId);return o&&n.delete(e.groupId),{...e,children:(De(e.children,t,n,r)??[]).concat(o?o.flatMap((e=>De(e.items,e,n,r))):[]),[_e]:t.app[0].appId,[Te]:r.get(t),[je]:t.overrideApp}}))}function $e(e){e.items=Re(e.items)}function Re(e){return function(e){return(0,T.sortBy)(e,(e=>e.sort??-1/0))}(e).map((e=>({...e,children:Re(e.children)})))}var We=n(4285),xe=n(8897);function Le(e,t,n,r){if("titleDataSource"in e&&(0,ie.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,ie.isObject)(t)&&["pathname","search","hash"].some((e=>(0,ie.hasOwnProperty)(t,e)))&&(e.to=t)}let o=n;if(t!==n.app.id){var i;const s=window.STANDALONE_MICRO_APPS?e[je]:null===(i=r.getStoryboardByAppId(t))||void 0===i?void 0:i.app;o={...n,overrideApp:s,appendI18nNamespace:e[Te]}}return r.asyncComputeRealValue(e,o,{ignoreSymbols:!0})}function Ue(e,t,n){return Promise.all(e.map((async e=>{let{children:r,...o}=e;const[i,s]=await Promise.all([Le(o,o[_e],t,n),r&&await Ue(r,t,n)]);return{...i,children:s}})))}var Be=function(){var e=(0,l.A)((function*(e,t,n,r){return(yield X.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),(0,ke.A)((0,ke.A)({},r),{},{params:n}))).data}));return function(t,n,r,o){return e.apply(this,arguments)}}();const Fe=new Map;async function qe(e){if(e.title||(0,T.isEmpty)(e.titleDataSource))return e.title;const t=JSON.stringify(e.titleDataSource),n=Fe.get(t);if(void 0!==n)return n;const{objectId:r,instanceId:o,attributeId:i}=e.titleDataSource,s=i??"name",a=await Be(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 Fe.set(t,c),c}const ze=new Map,He=new Map;function Ge(e){return null==e?void 0:e.filter(_.checkIfOfComputed).map((e=>{const t=Ge(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}:(0,T.omit)(e,["type","items","children"])}))}function Je(e){return He.get(e)}function Ve(e,t,n){let r=ze.get(e);return r||(r=async function(e,t,n){const r=window.STANDALONE_MICRO_APPS?function(e,t,n){var r,o;const i=n.getStoryboardByAppId(t);return((null===(r=i.meta)||void 0===r?void 0:r.injectMenus)??(null===(o=i.meta)||void 0===o?void 0:o.menus)??[]).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 Me(e,{menuObjectId:"EASYOPS_STORYBOARD_MENU"})).menus:(await Ee("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 Ne(r,t,n);if(!o)throw new Error(`Menu not found: ${e}`);$e(o);const{items:i,app:s,...a}=o,c={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,S([i,a])]};delete c.tplStateStoreId,delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize;const u=s[0].appId,[p,l]=await Promise.all([Le(a,u,c,n),Ue(i,c,n)]),d={title:await qe(p),...(0,T.pick)(p,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"]),menuItems:Ge(l)};He.set(e,d)}(e,t,n)),r}const Ye=[];let Ke=null;const Qe={maxWaitingTime:5e3,maxLoggedEvents:10};function Xe(){clearTimeout(Ke),Ye.length>Qe.maxLoggedEvents?Ze():Ke=setTimeout(Ze,Qe.maxWaitingTime)}function Ze(){if(0===Ye.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:Ye.splice(0,Qe.maxLoggedEvents)};var t;!function(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});window.navigator.sendBeacon(e,n)}(Qe.api,e),Ye.length&&(t=Ze,(window.requestIdleCallback||window.requestAnimationFrame||(e=>setTimeout(e,17)))(t))}function et(){window.addEventListener("beforeunload",Ze,!1)}let tt,nt=!1,rt=null,ot=!0;const it=[];function st(e){nt||(nt=!0,tt||(tt=function(e,t){return Object.assign(Qe,{...t,api:e}),{sendOnExit:et,emit:Xe}}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),tt.sendOnExit()))}const at=Symbol("HttpAnalytics");function ct(e){const t=Math.round(performance.now()),n=Date.now();return e[at]={st:n,time:Math.round(n/1e3),perfStartTime:t},e}function ut(e,t){return lt(!1,e,t)}function pt(e,t){return lt(!0,e,t)}function lt(e,t,n){const r=Math.round(performance.now()),o=Date.now(),{[at]:i,url:s}=n;if(i&&!(e&&t instanceof se.HttpAbortError)){delete n[at];const{st:c,time:u,perfStartTime:p}=i,{userInstanceId:l,username:d}=g();let f,h,m,v,A,w,y;if(e){const e=t instanceof se.HttpResponseError;(e||t instanceof se.HttpParseError)&&(({status:A,headers:w}=t.response),e&&(y=t.responseJson))}else({status:A,data:y,headers:w}=t);(0,ie.isObject)(y)&&({code:f,message:h}=y),w instanceof Headers&&(m=w.get("x-b3-traceid"),v=w.get("content-length")),a={st:c,_ver:c,uid:l,username:d,time:u,et:o,page:location.href,duration:r-p,api:s,type:"api",code:f??-1,msg:h??"",status:A,traceId:m??"",size:v?Number(v):-1},rt?Ye.push({...a,type:"apiRequest",...rt}):it.push(a)}var a;return e?Promise.reject(t):t}function dt(){const e=Math.round(performance.now()),t=Date.now();return it.length=0,rt=null,function(n){let{status:r,path:o,pageTitle:i}=n;if("ok"!==r)return Ye.push(...it),void(it.length=0);const s=Math.round(performance.now())-e,a=Date.now(),{username:c}=g();(function(e){const t=function(){const e=URL.createObjectURL(new Blob([]));let t=e.substring(e.lastIndexOf("/")+1);return URL.revokeObjectURL(e),ot&&(t="88-"+t,ot=!1),t}(),{lt:n,route:r}=e;rt={lt:n,route:r,pageId:t},Ye.push({...e,pageId:t,apiCount:it.length,maxApiTimeCost:Math.max(0,...it.map((e=>e.duration))),size:it.map((e=>e.size)).filter((e=>e>0)).reduce(((e,t)=>e+t),0)});for(const e of it)Ye.push({...e,...rt});it.length=0,tt.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 ft=Object.freeze({checkPermissions:function(){if(!A())return!1;if(g().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(b.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(A()&&!g().isAdmin)return I((0,p.scanPermissionActionsInStoryboard)(e))},preCheckPermissionsForBrickOrRoute:async function(e,t){if(A()&&!g().isAdmin&&Array.isArray(e.permissionsPreCheck))return I(await t(e.permissionsPreCheck))}}),ht=new class{constructor(){(0,O.A)(this,V),(0,P.A)(this,H,void 0),(0,P.A)(this,G,{sub:new Map,unsub:new Map}),(0,P.A)(this,J,new Map)}subscribe(e,t){const n=JSON.stringify(t);return(0,k.A)(V,this,K).call(this,"sub",e,t,n)}unsubscribe(e){const t=(0,C.A)(J,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,k.A)(V,this,K).call(this,"unsub",e,n,t);return(0,C.A)(G,this).sub.delete(t),r.then((()=>{(0,C.A)(J,this).delete(e)})),r}onMessage(e,t){let n=(0,C.A)(J,this).get(e),r=!1;(0,E.A)(V,this,Y).onMessage((o=>{n||(n=(0,C.A)(J,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,T.escapeRegExp)(t)}[^/]*${(0,T.escapeRegExp)(n)}`))}$`).test(t.topic))}(n,o.payload)&&t(o.payload.message):r||(console.error(`Message channel: "${e}" not found`),r=!0)}))}onClose(e){(0,E.A)(V,this,Y).onClose(e)}reset(){var e;(0,C.A)(G,this).sub.clear(),(0,C.A)(G,this).unsub.clear(),(0,C.A)(J,this).clear(),null===(e=(0,C.A)(H,this))||void 0===e||e.reset()}},mt=function(){const e=(0,_.getV2RuntimeFromDll)();if(e)return Object.freeze((0,T.pick)(e,["authenticate","getAuth","isLoggedIn","logout"]))}()||r}}]);
|
|
3
|
-
//# sourceMappingURL=2252.
|
|
1
|
+
/*! For license information please see 2252.a4907dbe.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_nav=globalThis.webpackChunk_next_bricks_nav||[]).push([[2252],{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})},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})},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})},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)}},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}},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))}},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)}},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}},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}},2252:(e,t,n)=>{n.r(t),n.d(t,{analytics:()=>u,auth:()=>mt,checkInstalledApps:()=>o,checkPermissions:()=>ft,flowApi:()=>i,menu:()=>s,messageDispatcher:()=>ht});var r={};n.r(r),n.d(r,{authenticate:()=>m,getAuth:()=>g,isLoggedIn:()=>A,logout:()=>v});var o={};n.r(o),n.d(o,{getCheckedApp:()=>oe,preCheckInstalledApps:()=>ne,waitForCheckingApps:()=>re});var i={};n.r(i),n.d(i,{FLOW_API_PROVIDER:()=>ae,clearCollectWidgetContract:()=>we,clearDebugContract:()=>be,collectContract:()=>ve,collectDebugContract:()=>ye,collectWidgetContract:()=>Ae,getArgsOfFlowApi:()=>Oe,isFlowApiProvider:()=>Ie,registerFlowApiProvider:()=>pe});var s={};n.r(s),n.d(s,{fetchMenuById:()=>Ve,getMenuById:()=>Je});var a={};n.r(a),n.d(a,{onRequest:()=>ct,onResponse:()=>ut,onResponseError:()=>pt});var c={};n.r(c),n.d(c,{create:()=>dt});var u={};n.r(u),n.d(u,{http:()=>a,initialize:()=>st,pageView:()=>c});var p=n(877),l=n(6330),d=n(6730),f=function(){var e=(0,l.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)}}();const h={};function m(e){Object.assign(h,{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})}function g(){return{...h}}function v(){for(const e of Object.keys(h))h[e]=void 0;w.clear(),y.length=0,b.clear()}function A(){return void 0!==h.username}const w=new Map,y=[],b=new Map;function S(e){if(A()&&!g().isAdmin)return I((0,p.scanPermissionActionsInAny)(e))}async function I(e){const t=e.filter((e=>!y.includes(e)));if(0===t.length)return;const n=[],r=[];for(const e of t){const t=w.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)b.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{y.push(...r)}})();for(const t of r)w.set(t,e);n.push(e)}await Promise.all(n)}var O=n(4635),P=n(918),E=n(5536),k=n(2559),M=n(6121),C=n(829),_=n(8581),T=n(1030);const j=1e3,N=6;var D=new WeakMap,$=new WeakMap,R=new WeakMap,W=new WeakMap,x=new WeakMap,L=new WeakMap,U=new WeakMap,B=new WeakSet;class F{constructor(e){(0,O.A)(this,B),(0,P.A)(this,D,void 0),(0,P.A)(this,$,void 0),(0,P.A)(this,R,[]),(0,P.A)(this,W,new Set),(0,P.A)(this,x,new Set),(0,P.A)(this,L,0),(0,P.A)(this,U,!1),(0,M.A)(D,this,e)}send(e){(0,C.A)($,this)||(0,M.A)($,this,(0,k.A)(B,this,q).call(this));const t=JSON.stringify(e);(0,C.A)($,this).readyState===WebSocket.OPEN?(0,C.A)($,this).send(t):(0,C.A)(R,this).push(t)}onMessage(e){(0,C.A)(W,this).add(e)}onClose(e){(0,C.A)(x,this).add(e)}reset(){(0,C.A)(R,this).length=0,(0,C.A)(W,this).clear(),(0,C.A)(x,this).clear()}close(){var e;(0,M.A)(U,this,!0),(null===(e=(0,C.A)($,this))||void 0===e?void 0:e.readyState)===WebSocket.OPEN&&(0,C.A)($,this).close()}}function q(){console.log("WebSocket connecting ...");const e=new WebSocket((0,C.A)(D,this));return e.addEventListener("open",(t=>{console.log("WebSocket open:",t),(0,M.A)(L,this,0);for(const t of(0,C.A)(R,this))e.send(t);(0,C.A)(R,this).length=0})),e.addEventListener("close",(e=>{if(!(0,C.A)(U,this)){console.log("WebSocket close:",e);for(const e of(0,C.A)(x,this))e();1e3!==e.code&&(0,k.A)(B,this,z).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,C.A)(W,this))e(t)})),e}function z(){if((0,C.A)(L,this)>=N)return void console.error("WebSocket connect retry limit exceeded");const e=Math.pow(2,(0,C.A)(L,this))*j;console.log("WebSocket will reconnect after %d seconds",e/1e3),setTimeout((()=>{var e;(0,M.A)(L,this,(e=(0,C.A)(L,this),++e)),(0,M.A)($,this,(0,k.A)(B,this,q).call(this))}),e)}var H=new WeakMap,G=new WeakMap,J=new WeakMap,V=new WeakSet;function Y(e){if(!(0,C.A)(H,e)){const t=`${"https:"===location.protocol?"wss:":"ws:"}//${window.location.host}${(0,_.getBasePath)()}api/websocket_service/v1/ws`;(0,M.A)(H,e,new F(t))}return(0,C.A)(H,e)}function K(e,t,n,r){const o=(0,C.A)(G,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=Q(n);(0,E.A)(V,this,Y).onMessage((n=>{const i=n.event===("sub"===e?"TOPIC.SUB_SUCCESS":"TOPIC.UNSUB_SUCCESS"),s=n.event===("sub"===e?"TOPIC.SUB_FAILED":"TOPIC.UNSUB_FAILED");(i||s)&&o===Q(n.payload)&&(i?t:r)(n)})),(0,E.A)(V,this,Y).send(i)}));return"sub"===e&&(0,C.A)(J,this).set(t,r),(0,C.A)(G,this)[e].set(r,s),s}function Q(e){const{system:t,topic:n}=e;return JSON.stringify({system:t,topic:n})}var X=n(3496),Z=function(){var e=(0,l.A)((function*(e,t){return(yield X.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 ee=new Map,te=new Map;function ne(e,t){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){const n=function(e){const t={usedArgs:new Set},{customTemplates:n,menus:r}=e.meta??{};return(0,p.traverseStoryboardExpressions)([e.routes,n,r],((e,n)=>{(0,p.collectInstalledAppsHasUsage)(t,e,n)}),"INSTALLED_APPS"),[...t.usedArgs]}(e),r=[];for(const e of n)ee.has(e)||t(e)||r.push(e);if(0===r.length)return;const o=Z({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)}));for(const e of r)ee.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 te.set(e,o),o})))}}async function re(e){await Promise.all(e.map((e=>ee.get(e))))}function oe(e){if(window.STANDALONE_MICRO_APPS)return te.get(e)}var ie=n(279),se=n(9422);const ae="core.provider-flow-api";function ce(e,t){return e.some((e=>e.source===t))}async function ue(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()),p=a?{responseType:"blob"}:{};let l;for(var d=arguments.length,f=new Array(d>1?d-1:0),h=1;h<d;h++)f[h-1]=arguments[h];if(u){var m,g;let e,o;var v;if(n&&"object"===(null==s?void 0:s.type)&&((null===(m=n.match(/:([^/]+)/g))||void 0===m?void 0:m.length)??0)===((null===(g=s.fields)||void 0===g?void 0:g.length)??0)?[o]=f:[e,o]=f,c)return await(0,ie.createSSEStream)(se.http.getUrlWithParams(t,e),{...p,...o,method:r,headers:Object.fromEntries([...new Headers((null===(v=o)||void 0===v?void 0:v.headers)??{}).entries()])});l=await se.http.simpleRequest(r,t,{params:e,...p,...o})}else{const e=function(e){if(!e||"object"!==e.type)return!1;const t=e=>!(0,T.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(s),n=function(e){const t=ce(e,"query"),n=ce(e,"body");for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];if(t){if(n){const[e,t,n]=o;return{data:e,options:{params:t,...n}}}const[e,t]=o;return{data:{},options:{params:e,...t}}}const[s,a]=o;return{data:s,options:a}}(i,...f),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,T.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 A;const{body:e,headers:i}=se.http.getBodyAndHeaders(o,null===(A=n.options)||void 0===A?void 0:A.headers);return await(0,ie.createSSEStream)(t,{...p,...n.options,method:r,headers:Object.fromEntries([...new Headers(i??{}).entries()]),body:e})}l=await se.http.requestWithBody(r,t,o,{...p,...n.options})}return!a&&o?l.data:l}function pe(){customElements.define(ae,(0,ie.createProviderClass)(ue))}var le=n(8679),de=function(){var e=(0,l.A)((function*(e,t){return(yield d.http.post("api/contract/single_search",e,t)).data}));return function(t,n){return e.apply(this,arguments)}}();const fe=new Map,he=new Map,me=new Map,ge=(e,t)=>{null==e||e.forEach((e=>{t.set(`${e.namespaceId}.${e.name}`,e)}))};function ve(e){ge(e,fe)}function Ae(e){ge(e,he)}function we(){he.clear()}function ye(e){ge(e,me)}function be(){me.clear()}const Se=new Map;function Ie(e){return e.includes("@")}async function Oe(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 fe.get(e)||he.get(e)||me.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=Se.get(e);return s||(s=async function(e,t,n){var r;const{contractData:o}=await de({contractName:`${e}.${t}`,version:n});return o?{name:o.name,namespace:null===(r=o.namespace)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.name,serviceName:o.serviceName,version:o.version,contract:{endpoint:o.endpoint,response:o.response,request:o.request}}:null}(t,r,o),Se.set(e,s)),s}(e);if(!o)throw new Pe(`Flow API not found: "${e}"`);const i=function(e,t){var n;const r="string"==typeof t.contract?le.safeLoad(t.contract,{schema:le.JSON_SCHEMA,json:!0}):t.contract,{uri:o,method:i="GET",ext_fields:s}=(null==r?void 0:r.endpoint)??{},a=!(null==r||!r.response)&&!1!==r.response.wrapper;if(!o)throw new Error(`Missing endpoint.uri in contract of provider "${e}"`);return{uri:o,method:"list"===i.toLowerCase()?"get":i,ext_fields:s,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==r||null===(n=r.response)||void 0===n?void 0:n.type),responseWrapper:a,request:null==r?void 0:r.request}}(e,o);return function(e,t,n,r){let{uri:o,method:i,ext_fields:s,name:a,namespace:c,serviceName:u,responseWrapper:p,version:l,isFileType:d,request:f}=e;const h="saveAs"===n;let m;h&&(m=t.shift());const{url:g,args:v}=function(e,t,n,r,o,i){const s=i?"logic.api.gateway"===o||null!=o&&o.startsWith("logic.api.gateway.")?"":o?`api/gateway/${o}`:`api/gateway/${r}.${n}@${i}`:`api/gateway/api_service.${r}.${n}`,a=t.slice(),c=e.replace(/:([^/]+)/g,(()=>a.shift()));return{url:s?s+c:c.replace(/^\//,""),args:a}}(o,t,a,c,u,l);return[...h?[m]:[],{url:g,originalUri:o,method:i,ext_fields:s,responseWrapper:p,request:f,isFileType:d,stream:r},...v]}(i,t,n,r)}class Pe extends Error{constructor(e){super(e),this.name="FlowApiNotFoundError",Error.captureStackTrace&&Error.captureStackTrace(this,Pe)}}var Ee=function(){var e=(0,l.A)((function*(e,t,n){return(yield X.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)}}(),ke=n(9740),Me=function(){var e=(0,l.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,ke.A)((0,ke.A)({},n),{},{params:t}))).data}));return function(t,n,r){return e.apply(this,arguments)}}(),Ce=n(7318);const _e=Symbol("appId"),Te=Symbol("menuI18nNamespace"),je=Symbol("overrideApp");async function Ne(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;Ce.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,S(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))),[Te]:s.get(r),[je]:r.overrideApp}}function De(e,t,n,r){return null==e?void 0:e.map((e=>{const o=e.groupId&&n.get(e.groupId);return o&&n.delete(e.groupId),{...e,children:(De(e.children,t,n,r)??[]).concat(o?o.flatMap((e=>De(e.items,e,n,r))):[]),[_e]:t.app[0].appId,[Te]:r.get(t),[je]:t.overrideApp}}))}function $e(e){e.items=Re(e.items)}function Re(e){return function(e){return(0,T.sortBy)(e,(e=>e.sort??-1/0))}(e).map((e=>({...e,children:Re(e.children)})))}var We=n(4285),xe=n(8897);function Le(e,t,n,r){if("titleDataSource"in e&&(0,ie.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,ie.isObject)(t)&&["pathname","search","hash"].some((e=>(0,ie.hasOwnProperty)(t,e)))&&(e.to=t)}let o=n;if(t!==n.app.id){var i;const s=window.STANDALONE_MICRO_APPS?e[je]:null===(i=r.getStoryboardByAppId(t))||void 0===i?void 0:i.app;o={...n,overrideApp:s,appendI18nNamespace:e[Te]}}return r.asyncComputeRealValue(e,o,{ignoreSymbols:!0})}function Ue(e,t,n){return Promise.all(e.map((async e=>{let{children:r,...o}=e;const[i,s]=await Promise.all([Le(o,o[_e],t,n),r&&await Ue(r,t,n)]);return{...i,children:s}})))}var Be=function(){var e=(0,l.A)((function*(e,t,n,r){return(yield X.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),(0,ke.A)((0,ke.A)({},r),{},{params:n}))).data}));return function(t,n,r,o){return e.apply(this,arguments)}}();const Fe=new Map;async function qe(e){if(e.title||(0,T.isEmpty)(e.titleDataSource))return e.title;const t=JSON.stringify(e.titleDataSource),n=Fe.get(t);if(void 0!==n)return n;const{objectId:r,instanceId:o,attributeId:i}=e.titleDataSource,s=i??"name",a=await Be(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 Fe.set(t,c),c}const ze=new Map,He=new Map;function Ge(e){return null==e?void 0:e.filter(_.checkIfOfComputed).map((e=>{const t=Ge(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}:(0,T.omit)(e,["type","items","children"])}))}function Je(e){return He.get(e)}function Ve(e,t,n){let r=ze.get(e);return r||(r=async function(e,t,n){const r=window.STANDALONE_MICRO_APPS?function(e,t,n){var r,o;const i=n.getStoryboardByAppId(t);return((null===(r=i.meta)||void 0===r?void 0:r.injectMenus)??(null===(o=i.meta)||void 0===o?void 0:o.menus)??[]).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 Me(e,{menuObjectId:"EASYOPS_STORYBOARD_MENU"})).menus:(await Ee("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 Ne(r,t,n);if(!o)throw new Error(`Menu not found: ${e}`);$e(o);const{items:i,app:s,...a}=o,c={...t,pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,S([i,a])]};delete c.tplStateStoreId,delete c.forEachItem,delete c.forEachIndex,delete c.forEachSize;const u=s[0].appId,[p,l]=await Promise.all([Le(a,u,c,n),Ue(i,c,n)]),d={title:await qe(p),...(0,T.pick)(p,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"]),menuItems:Ge(l)};He.set(e,d)}(e,t,n)),r}const Ye=[];let Ke=null;const Qe={maxWaitingTime:5e3,maxLoggedEvents:10};function Xe(){clearTimeout(Ke),Ye.length>Qe.maxLoggedEvents?Ze():Ke=setTimeout(Ze,Qe.maxWaitingTime)}function Ze(){if(0===Ye.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:Ye.splice(0,Qe.maxLoggedEvents)};var t;!function(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"});window.navigator.sendBeacon(e,n)}(Qe.api,e),Ye.length&&(t=Ze,(window.requestIdleCallback||window.requestAnimationFrame||(e=>setTimeout(e,17)))(t))}function et(){window.addEventListener("beforeunload",Ze,!1)}let tt,nt=!1,rt=null,ot=!0;const it=[];function st(e){nt||(nt=!0,tt||(tt=function(e,t){return Object.assign(Qe,{...t,api:e}),{sendOnExit:et,emit:Xe}}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),tt.sendOnExit()))}const at=Symbol("HttpAnalytics");function ct(e){const t=Math.round(performance.now()),n=Date.now();return e[at]={st:n,time:Math.round(n/1e3),perfStartTime:t},e}function ut(e,t){return lt(!1,e,t)}function pt(e,t){return lt(!0,e,t)}function lt(e,t,n){const r=Math.round(performance.now()),o=Date.now(),{[at]:i,url:s}=n;if(i&&!(e&&t instanceof se.HttpAbortError)){delete n[at];const{st:c,time:u,perfStartTime:p}=i,{userInstanceId:l,username:d}=g();let f,h,m,v,A,w,y;if(e){const e=t instanceof se.HttpResponseError;(e||t instanceof se.HttpParseError)&&(({status:A,headers:w}=t.response),e&&(y=t.responseJson))}else({status:A,data:y,headers:w}=t);(0,ie.isObject)(y)&&({code:f,message:h}=y),w instanceof Headers&&(m=w.get("x-b3-traceid"),v=w.get("content-length")),a={st:c,_ver:c,uid:l,username:d,time:u,et:o,page:location.href,duration:r-p,api:s,type:"api",code:f??-1,msg:h??"",status:A,traceId:m??"",size:v?Number(v):-1},rt?Ye.push({...a,type:"apiRequest",...rt}):it.push(a)}var a;return e?Promise.reject(t):t}function dt(){const e=Math.round(performance.now()),t=Date.now();return it.length=0,rt=null,function(n){let{status:r,path:o,pageTitle:i}=n;if("ok"!==r)return Ye.push(...it),void(it.length=0);const s=Math.round(performance.now())-e,a=Date.now(),{username:c}=g();(function(e){const t=function(){const e=URL.createObjectURL(new Blob([]));let t=e.substring(e.lastIndexOf("/")+1);return URL.revokeObjectURL(e),ot&&(t="88-"+t,ot=!1),t}(),{lt:n,route:r}=e;rt={lt:n,route:r,pageId:t},Ye.push({...e,pageId:t,apiCount:it.length,maxApiTimeCost:Math.max(0,...it.map((e=>e.duration))),size:it.map((e=>e.size)).filter((e=>e>0)).reduce(((e,t)=>e+t),0)});for(const e of it)Ye.push({...e,...rt});it.length=0,tt.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 ft=Object.freeze({checkPermissions:function(){if(!A())return!1;if(g().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(b.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(A()&&!g().isAdmin)return I((0,p.scanPermissionActionsInStoryboard)(e))},preCheckPermissionsForBrickOrRoute:async function(e,t){if(A()&&!g().isAdmin&&Array.isArray(e.permissionsPreCheck))return I(await t(e.permissionsPreCheck))}}),ht=new class{constructor(){(0,O.A)(this,V),(0,P.A)(this,H,void 0),(0,P.A)(this,G,{sub:new Map,unsub:new Map}),(0,P.A)(this,J,new Map)}subscribe(e,t){const n=JSON.stringify(t);return(0,k.A)(V,this,K).call(this,"sub",e,t,n)}unsubscribe(e){const t=(0,C.A)(J,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,k.A)(V,this,K).call(this,"unsub",e,n,t);return(0,C.A)(G,this).sub.delete(t),r.then((()=>{(0,C.A)(J,this).delete(e)})),r}onMessage(e,t){let n=(0,C.A)(J,this).get(e),r=!1;(0,E.A)(V,this,Y).onMessage((o=>{n||(n=(0,C.A)(J,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,T.escapeRegExp)(t)}[^/]*${(0,T.escapeRegExp)(n)}`))}$`).test(t.topic))}(n,o.payload)&&t(o.payload.message):r||(console.error(`Message channel: "${e}" not found`),r=!0)}))}onClose(e){(0,E.A)(V,this,Y).onClose(e)}reset(){var e;(0,C.A)(G,this).sub.clear(),(0,C.A)(G,this).unsub.clear(),(0,C.A)(J,this).clear(),null===(e=(0,C.A)(H,this))||void 0===e||e.reset()}},mt=function(){const e=(0,_.getV2RuntimeFromDll)();if(e)return Object.freeze((0,T.pick)(e,["authenticate","getAuth","isLoggedIn","logout"]))}()||r}}]);
|
|
3
|
+
//# sourceMappingURL=2252.a4907dbe.js.map
|