@next-bricks/form-platform 0.1.1 → 0.1.2

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.
Files changed (71) hide show
  1. package/dist/bricks.json +1 -1
  2. package/dist/chunks/{1646.15e769ed.js → 1646.ed804838.js} +2 -2
  3. package/dist/chunks/{1646.15e769ed.js.map → 1646.ed804838.js.map} +1 -1
  4. package/dist/chunks/1874.190a10fc.js +2 -0
  5. package/dist/chunks/1874.190a10fc.js.map +1 -0
  6. package/dist/chunks/3458.3db271de.js +2 -0
  7. package/dist/chunks/{8691.7b30fb8e.js.map → 3458.3db271de.js.map} +1 -1
  8. package/dist/chunks/{4049.d0aaa25b.js → 4049.9e43519d.js} +2 -2
  9. package/dist/chunks/4049.9e43519d.js.map +1 -0
  10. package/dist/chunks/443.ddee2ed3.js +2 -0
  11. package/dist/chunks/443.ddee2ed3.js.map +1 -0
  12. package/dist/chunks/4717.36c87a44.js.map +1 -1
  13. package/dist/chunks/4991.a570e346.js +2 -0
  14. package/dist/chunks/4991.a570e346.js.map +1 -0
  15. package/dist/chunks/{5151.c2b57bdf.js → 5151.c8d90a84.js} +2 -2
  16. package/dist/chunks/5151.c8d90a84.js.map +1 -0
  17. package/dist/chunks/5202.406083e3.js.map +1 -1
  18. package/dist/chunks/{5725.5aa43e8a.js → 5725.aa674b66.js} +2 -2
  19. package/dist/chunks/{7672.06b13df8.js.map → 5725.aa674b66.js.map} +1 -1
  20. package/dist/chunks/6205.70bdba79.js +2 -0
  21. package/dist/chunks/{6205.7102ad44.js.map → 6205.70bdba79.js.map} +1 -1
  22. package/dist/chunks/{6473.64c6f123.js → 6473.22acffbe.js} +2 -2
  23. package/dist/chunks/{6473.64c6f123.js.map → 6473.22acffbe.js.map} +1 -1
  24. package/dist/chunks/714.69e54307.js.map +1 -1
  25. package/dist/chunks/7164.cf6aecd8.js +2 -0
  26. package/dist/chunks/{7164.d143d878.js.map → 7164.cf6aecd8.js.map} +1 -1
  27. package/dist/chunks/{7672.06b13df8.js → 7672.7ae23e52.js} +2 -2
  28. package/dist/chunks/{5725.5aa43e8a.js.map → 7672.7ae23e52.js.map} +1 -1
  29. package/dist/chunks/{7746.2f1136b9.js → 7746.36be9723.js} +2 -2
  30. package/dist/chunks/{7746.2f1136b9.js.map → 7746.36be9723.js.map} +1 -1
  31. package/dist/chunks/7782.f0eb0fd7.js +2 -0
  32. package/dist/chunks/7782.f0eb0fd7.js.map +1 -0
  33. package/dist/chunks/8498.b7e6d18a.js.map +1 -1
  34. package/dist/chunks/8553.9801a85a.js +3 -0
  35. package/dist/chunks/8553.9801a85a.js.map +1 -0
  36. package/dist/chunks/8691.d656e38a.js +2 -0
  37. package/dist/chunks/{3458.de6bfe67.js.map → 8691.d656e38a.js.map} +1 -1
  38. package/dist/chunks/9549.d3a078f4.js.map +1 -1
  39. package/dist/chunks/eo-user-or-user-group-select.50337fc3.js +3 -0
  40. package/dist/chunks/eo-user-or-user-group-select.50337fc3.js.LICENSE.txt +3 -0
  41. package/dist/chunks/eo-user-or-user-group-select.50337fc3.js.map +1 -0
  42. package/dist/chunks/main.fd721e87.js +2 -0
  43. package/dist/chunks/main.fd721e87.js.map +1 -0
  44. package/dist/index.af4ff684.js +2 -0
  45. package/dist/index.af4ff684.js.map +1 -0
  46. package/package.json +4 -4
  47. package/dist/chunks/1874.e1acf168.js +0 -2
  48. package/dist/chunks/1874.e1acf168.js.map +0 -1
  49. package/dist/chunks/1909.b23e9585.js +0 -3
  50. package/dist/chunks/1909.b23e9585.js.map +0 -1
  51. package/dist/chunks/2386.00bf76a9.js +0 -2
  52. package/dist/chunks/2386.00bf76a9.js.map +0 -1
  53. package/dist/chunks/2754.66ac1595.js +0 -2
  54. package/dist/chunks/2754.66ac1595.js.map +0 -1
  55. package/dist/chunks/2993.e1ed15e5.js +0 -2
  56. package/dist/chunks/2993.e1ed15e5.js.map +0 -1
  57. package/dist/chunks/3458.de6bfe67.js +0 -2
  58. package/dist/chunks/4049.d0aaa25b.js.map +0 -1
  59. package/dist/chunks/5151.c2b57bdf.js.map +0 -1
  60. package/dist/chunks/6205.7102ad44.js +0 -2
  61. package/dist/chunks/7164.d143d878.js +0 -2
  62. package/dist/chunks/7782.0ad7fbe8.js +0 -2
  63. package/dist/chunks/7782.0ad7fbe8.js.map +0 -1
  64. package/dist/chunks/8691.7b30fb8e.js +0 -2
  65. package/dist/chunks/eo-user-or-user-group-select.c95de601.js +0 -2
  66. package/dist/chunks/eo-user-or-user-group-select.c95de601.js.map +0 -1
  67. package/dist/chunks/main.743428ee.js +0 -2
  68. package/dist/chunks/main.743428ee.js.map +0 -1
  69. package/dist/index.6ed8d941.js +0 -2
  70. package/dist/index.6ed8d941.js.map +0 -1
  71. /package/dist/chunks/{1909.b23e9585.js.LICENSE.txt → 8553.9801a85a.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"chunks/7746.2f1136b9.js","mappings":"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","sources":["webpack:///../../node_modules/react-dom/client.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///../../node_modules/@next-core/react-element/dist/esm/ReactNextElement.js","webpack:///../../node_modules/@next-core/react-element/dist/esm/wrapBrick.js"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","export default function _classPrivateMethodGet(receiver, privateSet, fn) {\n if (!privateSet.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return fn;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _classPrivateMethodInitSpec from \"@babel/runtime/helpers/classPrivateMethodInitSpec\";\nimport _classPrivateFieldInitSpec from \"@babel/runtime/helpers/classPrivateFieldInitSpec\";\nimport _classPrivateMethodGet from \"@babel/runtime/helpers/classPrivateMethodGet\";\nimport _classPrivateFieldSet from \"@babel/runtime/helpers/classPrivateFieldSet\";\nimport _classPrivateFieldGet from \"@babel/runtime/helpers/classPrivateFieldGet\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { NextElement, supportsAdoptingStyleSheets } from \"@next-core/element\";\nvar _root = /*#__PURE__*/new WeakMap();\nvar _createRoot = /*#__PURE__*/new WeakSet();\nexport class ReactNextElement extends NextElement {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _createRoot);\n _classPrivateFieldInitSpec(this, _root, {\n writable: true,\n value: void 0\n });\n }\n connectedCallback() {\n super._markConnectedCallbackCalled();\n _classPrivateMethodGet(this, _createRoot, _createRoot2).call(this);\n this._render();\n }\n disconnectedCallback() {\n var _classPrivateFieldGet2;\n (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _root)) === null || _classPrivateFieldGet2 === void 0 ? void 0 : _classPrivateFieldGet2.render(null);\n }\n _render() {\n if (!this.isConnected || !_classPrivateFieldGet(this, _root)) {\n return;\n }\n var ctor = this.constructor;\n if (ctor.shadowOptions) {\n var _ctor$styleTexts;\n _classPrivateFieldGet(this, _root).render(supportsAdoptingStyleSheets() || !((_ctor$styleTexts = ctor.styleTexts) !== null && _ctor$styleTexts !== void 0 && _ctor$styleTexts.length) ? this.render() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"style\", null, ctor.styleTexts.join(\"\\n\")), this.render()));\n } else {\n _classPrivateFieldGet(this, _root).render(this.render());\n }\n }\n}\nfunction _createRoot2() {\n if (_classPrivateFieldGet(this, _root)) {\n return;\n }\n var ctor = this.constructor;\n if (ctor.shadowOptions) {\n var shadowRoot = this.attachShadow(ctor.shadowOptions);\n if (supportsAdoptingStyleSheets()) {\n var _ctor$styleTexts2;\n if ((_ctor$styleTexts2 = ctor.styleTexts) !== null && _ctor$styleTexts2 !== void 0 && _ctor$styleTexts2.length) {\n var styleSheet = new CSSStyleSheet();\n styleSheet.replaceSync(ctor.styleTexts.join(\"\"));\n shadowRoot.adoptedStyleSheets = [styleSheet];\n }\n }\n _classPrivateFieldSet(this, _root, createRoot(shadowRoot));\n } else {\n var _ctor$styleTexts3;\n if (process.env.NODE_ENV !== \"production\" && (_ctor$styleTexts3 = ctor.styleTexts) !== null && _ctor$styleTexts3 !== void 0 && _ctor$styleTexts3.length) {\n throw new Error(\"Use `styleTexts` with `shadowOptions: false` is not supported\");\n }\n _classPrivateFieldSet(this, _root, createRoot(this));\n }\n}\n//# sourceMappingURL=ReactNextElement.js.map","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"],\n _excluded2 = [\"children\"];\nimport React, { forwardRef } from \"react\";\nexport function wrapLocalBrick(brick, eventsMapping) {\n // istanbul ignore next\n if (process.env.NODE_ENV === \"development\") {\n if (typeof brick === \"string\" && !customElements.get(brick)) {\n throw new Error(\"Brick \".concat(brick, \" is not defined while using `wrapLocalBrick`.\"));\n }\n }\n return /*#__PURE__*/forwardRef(function BrickReactWrapper(_ref, ref) {\n var {\n children\n } = _ref,\n props = _objectWithoutProperties(_ref, _excluded);\n var WebComponent = typeof brick === \"string\" ? brick : brick.__tagName;\n var properties = getMappedProperties(props, eventsMapping);\n return /*#__PURE__*/React.createElement(WebComponent, _extends({}, properties, {\n ref: ref\n }), children);\n });\n}\nexport function wrapBrick(BrickName, eventsMapping) {\n return /*#__PURE__*/forwardRef(function BrickReactWrapper(_ref2, ref) {\n var {\n children\n } = _ref2,\n props = _objectWithoutProperties(_ref2, _excluded2);\n var properties = getMappedProperties(props, eventsMapping);\n return /*#__PURE__*/React.createElement(BrickName, _extends({}, properties, {\n ref: ref\n }), children);\n });\n}\nfunction getMappedProperties(props, eventsMapping) {\n var properties;\n if (eventsMapping) {\n properties = {};\n for (var [propName, propValue] of Object.entries(props)) {\n if (Object.prototype.hasOwnProperty.call(eventsMapping, propName)) {\n properties[\"on\".concat(eventsMapping[propName])] = propValue;\n } else {\n properties[propName] = propValue;\n }\n }\n } else {\n properties = props;\n }\n return properties;\n}\n//# sourceMappingURL=wrapBrick.js.map"],"names":["m","exports","createRoot","hydrateRoot","_classPrivateMethodGet","receiver","privateSet","fn","has","TypeError","_classPrivateMethodInitSpec","obj","add","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_root","WeakMap","_createRoot","WeakSet","ReactNextElement","NextElement","constructor","super","writable","value","connectedCallback","_markConnectedCallbackCalled","_createRoot2","_render","disconnectedCallback","_classPrivateFieldGet2","render","isConnected","_ctor$styleTexts","ctor","shadowOptions","supportsAdoptingStyleSheets","styleTexts","join","_ctor$styleTexts2","shadowRoot","attachShadow","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","_excluded","_excluded2","wrapLocalBrick","brick","eventsMapping","forwardRef","_ref","ref","children","props","WebComponent","__tagName","properties","getMappedProperties","wrapBrick","BrickName","_ref2","propName","propValue","entries","concat"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/7746.36be9723.js","mappings":"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","sources":["webpack:///../../node_modules/react-dom/client.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack:///../../node_modules/@next-core/react-element/dist/esm/ReactNextElement.js","webpack:///../../node_modules/@next-core/react-element/dist/esm/wrapBrick.js"],"sourcesContent":["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n","export default function _classPrivateMethodGet(receiver, privateSet, fn) {\n if (!privateSet.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return fn;\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateMethodInitSpec(obj, privateSet) {\n checkPrivateRedeclaration(obj, privateSet);\n privateSet.add(obj);\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import _classPrivateMethodInitSpec from \"@babel/runtime/helpers/classPrivateMethodInitSpec\";\nimport _classPrivateFieldInitSpec from \"@babel/runtime/helpers/classPrivateFieldInitSpec\";\nimport _classPrivateMethodGet from \"@babel/runtime/helpers/classPrivateMethodGet\";\nimport _classPrivateFieldSet from \"@babel/runtime/helpers/classPrivateFieldSet\";\nimport _classPrivateFieldGet from \"@babel/runtime/helpers/classPrivateFieldGet\";\nvar _class;\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { NextElement, supportsAdoptingStyleSheets } from \"@next-core/element\";\nvar _root = /*#__PURE__*/new WeakMap();\nvar _createRoot = /*#__PURE__*/new WeakSet();\nexport class ReactNextElement extends NextElement {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _createRoot);\n _classPrivateFieldInitSpec(this, _root, {\n writable: true,\n value: void 0\n });\n }\n connectedCallback() {\n super._markConnectedCallbackCalled();\n _classPrivateMethodGet(this, _createRoot, _createRoot2).call(this);\n this._render();\n }\n disconnectedCallback() {\n var _classPrivateFieldGet2;\n (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _root)) === null || _classPrivateFieldGet2 === void 0 || _classPrivateFieldGet2.render(null);\n }\n _render() {\n if (!this.isConnected || !_classPrivateFieldGet(this, _root)) {\n return;\n }\n var ctor = this.constructor;\n if (ctor.shadowOptions) {\n var _ctor$styleTexts;\n _classPrivateFieldGet(this, _root).render(supportsAdoptingStyleSheets() || !((_ctor$styleTexts = ctor.styleTexts) !== null && _ctor$styleTexts !== void 0 && _ctor$styleTexts.length) ? this.render() : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"style\", null, ctor.styleTexts.join(\"\\n\")), this.render()));\n } else {\n _classPrivateFieldGet(this, _root).render(this.render());\n }\n }\n}\n_class = ReactNextElement;\nfunction _createRoot2() {\n if (_classPrivateFieldGet(this, _root)) {\n return;\n }\n var ctor = this.constructor;\n if (ctor.shadowOptions) {\n var shadowRoot = this.attachShadow(ctor.shadowOptions);\n if (supportsAdoptingStyleSheets()) {\n var _ctor$styleTexts2;\n if ((_ctor$styleTexts2 = ctor.styleTexts) !== null && _ctor$styleTexts2 !== void 0 && _ctor$styleTexts2.length) {\n var styleSheet = new CSSStyleSheet();\n styleSheet.replaceSync(ctor.styleTexts.join(\"\"));\n shadowRoot.adoptedStyleSheets = [styleSheet];\n }\n }\n _classPrivateFieldSet(this, _root, createRoot(shadowRoot));\n } else {\n var _ctor$styleTexts3;\n if (process.env.NODE_ENV !== \"production\" && (_ctor$styleTexts3 = ctor.styleTexts) !== null && _ctor$styleTexts3 !== void 0 && _ctor$styleTexts3.length) {\n throw new Error(\"Use `styleTexts` with `shadowOptions: false` is not supported\");\n }\n _classPrivateFieldSet(this, _root, createRoot(this));\n }\n}\n//# sourceMappingURL=ReactNextElement.js.map","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"],\n _excluded2 = [\"children\"];\nimport React, { forwardRef } from \"react\";\nexport function wrapLocalBrick(brick, eventsMapping) {\n // istanbul ignore next\n if (process.env.NODE_ENV === \"development\") {\n if (typeof brick === \"string\" && !customElements.get(brick)) {\n throw new Error(\"Brick \".concat(brick, \" is not defined while using `wrapLocalBrick`.\"));\n }\n }\n return /*#__PURE__*/forwardRef(function BrickReactWrapper(_ref, ref) {\n var {\n children\n } = _ref,\n props = _objectWithoutProperties(_ref, _excluded);\n var WebComponent = typeof brick === \"string\" ? brick : brick.__tagName;\n var properties = getMappedProperties(props, eventsMapping);\n return /*#__PURE__*/React.createElement(WebComponent, _extends({}, properties, {\n ref: ref\n }), children);\n });\n}\nexport function wrapBrick(BrickName, eventsMapping) {\n return /*#__PURE__*/forwardRef(function BrickReactWrapper(_ref2, ref) {\n var {\n children\n } = _ref2,\n props = _objectWithoutProperties(_ref2, _excluded2);\n var properties = getMappedProperties(props, eventsMapping);\n return /*#__PURE__*/React.createElement(BrickName, _extends({}, properties, {\n ref: ref\n }), children);\n });\n}\nfunction getMappedProperties(props, eventsMapping) {\n var properties;\n if (eventsMapping) {\n properties = {};\n for (var [propName, propValue] of Object.entries(props)) {\n if (Object.prototype.hasOwnProperty.call(eventsMapping, propName)) {\n properties[\"on\".concat(eventsMapping[propName])] = propValue;\n } else {\n properties[propName] = propValue;\n }\n }\n } else {\n properties = props;\n }\n return properties;\n}\n//# sourceMappingURL=wrapBrick.js.map"],"names":["m","exports","createRoot","hydrateRoot","_classPrivateMethodGet","receiver","privateSet","fn","has","TypeError","_classPrivateMethodInitSpec","obj","add","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_objectWithoutProperties","excluded","sourceKeys","keys","indexOf","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_root","WeakMap","_createRoot","WeakSet","ReactNextElement","NextElement","constructor","super","writable","value","connectedCallback","_markConnectedCallbackCalled","_createRoot2","_render","disconnectedCallback","_classPrivateFieldGet2","render","isConnected","_ctor$styleTexts","ctor","shadowOptions","supportsAdoptingStyleSheets","styleTexts","join","_ctor$styleTexts2","shadowRoot","attachShadow","styleSheet","CSSStyleSheet","replaceSync","adoptedStyleSheets","_excluded","_excluded2","wrapLocalBrick","brick","eventsMapping","forwardRef","_ref","ref","children","props","WebComponent","__tagName","properties","getMappedProperties","wrapBrick","BrickName","_ref2","propName","propValue","entries","concat"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_next_bricks_form_platform=self.webpackChunk_next_bricks_form_platform||[]).push([[7782],{6171:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r.d(t,{Z:()=>n})},5866:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(5863);function a(e,t){(0,n.Z)(e,t),t.add(e)}},2159:(e,t,r)=>{function n(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{Z:()=>n})},7782:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>ar,Notification:()=>dr,StoryboardFunctionRegistryFactory:()=>fe,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>Ua,batchSetAppsLocalTheme:()=>re,checkIfByTransform:()=>Tt,checkIfOfComputed:()=>At,createHistory:()=>Z,createRuntime:()=>Ca,customProcessors:()=>x,customTemplates:()=>Pe,fetchByProvider:()=>ja,getAuth:()=>Na,getBasePath:()=>v,getCssPropertyValue:()=>le,getCurrentMode:()=>ie,getCurrentTheme:()=>ee,getHistory:()=>I,getPageInfo:()=>Gn,getRuntime:()=>Ta,handleHttpError:()=>ur,httpErrorToString:()=>or,isLoggedIn:()=>$a,isUnauthenticatedError:()=>ir,logout:()=>Fa,matchPath:()=>Dt,registerWidgetFunctions:()=>Le,registerWidgetI18n:()=>U,unstable_createRoot:()=>Da});var n={};r.r(n),r.d(n,{getAddedContracts:()=>so,getAllContextValues:()=>ao,getBrickPackagesById:()=>oo,getContextValue:()=>no,getRenderId:()=>io,legacyDoTransform:()=>qa,mountUseBrick:()=>Ha,renderUseBrick:()=>Wa,unmountUseBrick:()=>za,updateSnippetPreviewSettings:()=>to,updateStoryboard:()=>Ga,updateStoryboardByRoute:()=>Ja,updateStoryboardBySnippet:()=>eo,updateStoryboardByTemplate:()=>Qa,updateTemplatePreviewSettings:()=>Ya});var a=r(3028),o=r(4795),i=r(3395),s=r(381),l=r(687),c=r(33),u=r(9386),d=r(8177),p=r(8874),f=(r(8525),r(7857));function v(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}var h=r(2159),m=r(5178);function g(e,t){var r=(0,m.orderBy)(e,(e=>{var t,r;return null!==(t=null===(r=e.app.homepage)||void 0===r?void 0:r.length)&&void 0!==t?t:0}),"desc");for(var n of r){var a=n.app.homepage;if("string"==typeof a&&"/"===a[0]&&y(a,t))return n}}function y(e,t){return"/"===e?t===e:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(e.replace(/\/+$/,""),"/"))}function b(e){var t;return!e||(null===(t=Ta().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var w,S=["extraQuery","clear","keepHash"],E=!1;function k(e,t){t(!(E=!confirm(e)))}function Z(){if(!w){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:k});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function o(e,t,n){E=!1,r(e,t),null==n||n(E)}function i(e,t,r){E=!1,n(e,t),null==r||r(E)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:l,keepHash:c}=n,u=(0,h.Z)(n,S),d=new URLSearchParams(l?"":e.location.search),p={};for(var[f,v]of(Object.assign(p,r,s),Object.entries(p)))if(Array.isArray(v))for(var m of(d.delete(f),v))d.append(f,m);else null==v||""===v?d.delete(f):d.set(f,v);("push"===t?o:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,a)}}return(0,a.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){o((0,a.Z)((0,a.Z)({},e.location),{},{key:void 0,hash:t,state:(0,a.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,a.Z)((0,a.Z)({},e.location),{},{state:(0,a.Z)((0,a.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(a,o,i){var s,l="string"==typeof a;return"string"==typeof(s=l?(0,f.parsePath)(a).pathname:a.pathname)&&s.startsWith("/")&&b(function(e){var t,r;return g(null!==(t=null===(r=ka)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?v()+a.substring(1):e.createHref(a)):("push"===n?t:r)(a,o,i)}}return{push:n("push"),replace:n("replace")}}((0,a.Z)((0,a.Z)({},e),{},{push:o,replace:i})))}(e)),w=e}return w}function I(){var e;return null!==(e=w)&&void 0!==e?e:function(){var{dll:e}=window;if("function"==typeof e)return e("tYg3").getHistory()}()}var A=r(5866),C=r(6171),T=r(5564),R=r(231),O=r(8898),P=r(4635),_=r(1950),M=new WeakMap,x=new class{constructor(){(0,i.Z)(this,M,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),a=(0,l.Z)(this,M).get(r);if(a||(a=new Map,(0,l.Z)(this,M).set(r,a)),a.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));a.set(n,t)}get(e){return(0,l.Z)(this,M).get(e)}};function B(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=L("app",t.id),a=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;c.i18n.addResourceBundle(t,n,r),a.push(t)})),()=>{for(var e of a)c.i18n.removeResourceBundle(e,n)}}}function L(e,t){return"".concat(e,"/").concat(t)}function U(e,t){var r=L("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;c.i18n.addResourceBundle(t,r,n)}))}function N(e){return c.i18n.getFixedT(null,L("widget",e))}var F,$="brick-next-devtools-panel",j="devtools-frame-active-change",K="devtools-panel-change",D=!0;function W(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var V=()=>{throw new Error("Can't modify read-only proxy object")},H={set:V,defineProperty:V,deleteProperty:V,setPrototypeOf:V};function z(e){return new Proxy(e,H)}function q(e){var{get:t,ownKeys:r}=e;return W()?z(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var G="light",J=new d.JsonStorage(localStorage),Q="apps-theme";function Y(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));G=e}function X(){return G}function ee(){return document.documentElement.dataset.theme}function te(e){e?Y(e):e=X(),e!==ee()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function re(e){J.setItem(Q,(0,a.Z)((0,a.Z)({},ne()),e))}function ne(){var e,t;try{t=J.getItem(Q)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var ae="default";function oe(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));ae=e}function ie(){return document.documentElement.dataset.mode}function se(e){e?oe(e):e=ae,e!==ie()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function le(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return r&&(null===(t=window.getComputedStyle(r))||void 0===t?void 0:t.getPropertyValue(e))||""}function ce(e,t){var r={};for(var n of e){var a=ue(n,t);void 0!==a&&(r[n]=a)}return r}function ue(e,t){var r,n,a,{collectCoverage:o,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:u,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return o?"/next":v().replace(/\/$/,"");case"FN":return d;case"IMG":return o?{get:e=>"mock/images/".concat(e)}:i?null==Ia||null===(r=Ia.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==Ia||null===(n=Ia.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return o?m.identity:i?N(i):c.i18n.getFixedT(null,[u,L("app",l.id)].filter(Boolean));case"I18N_TEXT":return o?de:c.i18nText;case"PERMISSIONS":return z({check:o?pe:null==Ia||null===(a=Ia.checkPermissions)||void 0===a?void 0:a.checkPermissions});case"THEME":return z({getTheme:o?()=>"light":X});case"console":return p?z(console):void 0;case"location":return o?{href:"http://localhost:3000/functions/test",origin:"http://localhost:3000",host:"localhost:3000",hostname:"localhost"}:{href:location.href,origin:location.origin,host:location.host,hostname:location.hostname}}}function de(e){return null==e?void 0:e.en}function pe(){return!0}function fe(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Map,i=new Proxy(Object.freeze({}),{get:(a,s)=>function(a){var s,l=o.get(a);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(a));var c=(0,R.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,R.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,_.supply)(c.attemptToVisitGlobals,ce(c.attemptToVisitGlobals,{collectCoverage:n,widgetId:t,widgetVersion:r,app:e,storyboardFunctions:i,isStoryboardFunction:!0}),!!n),hooks:s&&{beforeEvaluate:s.beforeEvaluate,beforeCall:s.beforeCall,beforeBranch:s.beforeBranch}}),l.processed=!0,l.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),o.clear(),Array.isArray(t))for(var n of t){var a=(0,O.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,O.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");o.set(n.name,{source:n.source,typescript:n.typescript,deps:a,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,a.Z)((0,a.Z)({},t),{},{name:e}),n=(0,O.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,O.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=o.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:ve,registerStoryboardFunctions:he,checkPermissionsUsage:me}=fe(),ge={};try{ge.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,a=o.prototype;function o(){t.set(this,r(null))}function i(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}function s(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}i(a,"addEventListener",(function(e,r,n){for(var a=t.get(this),o=a[e]||(a[e]=[]),i=0,s=o.length;i<s;i++)if(o[i].listener===r)return;o.push({target:this,listener:r,options:n})})),i(a,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(i(e,"target",this),i(e,"currentTarget",this),r.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(a,"removeEventListener",(function(e,r){for(var n=t.get(this),a=n[e]||(n[e]=[]),o=0,i=a.length;o<i;o++)if(a[o].listener===r)return void a.splice(o,1)})),ge.EventTarget=o}(Object,new WeakMap)}const ye=ge.EventTarget;var be=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),we=new Map([[be.xLarge,"1920px"],[be.large,"1600px"],[be.medium,"1280px"],[be.small,"1024px"],[be.xSmall,0]]),Se=new ye,Ee={},ke={};function Ze(e,t){var r=!1;for(var[n]of(Ee[t]=e.matches,we))if(Ee[n]&&ke.breakpoint!==n){ke.breakpoint=n,r=!0;break}r&&Se.dispatchEvent(new CustomEvent("change",{detail:ke}))}we.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));Ze(r,t),r.addEventListener?r.addEventListener("change",(e=>{Ze(e,t)})):r.addListener((e=>{Ze(e,t)}))}));var Ie=()=>ke;function Ae(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}function Ce(e){var t,r;return!(null===(t=e?e.flags:null===(r=Ta())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Te(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];var o=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(o),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(o),...n)}var Re=new Set(["prefix"]),Oe=new WeakMap,Pe=new class{constructor(){(0,i.Z)(this,Oe,{writable:!0,value:new Map})}define(e,t){var r,n,o,i,s=(0,l.Z)(this,Oe).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var c=Ce(),u=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},d=[],p=[];for(var[f,v]of Object.entries(u))v.asVariable?(Te(c,"Template `asVariable`",e,f),c||p.push(f)):v.mergeProperty||v.refTransform?console.error("Template `mergeProperty` and `refTransform` are dropped in v3:",e,f):v.ref&&d.push([f,v]);var h=(0,a.Z)((0,a.Z)({},t),{},{proxy:(0,a.Z)((0,a.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?c?t.state:t.state.map((e=>(0,a.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,l.Z)(this,Oe).set(e,(0,a.Z)((0,a.Z)({},h),{},{name:e}));var g,y,b=(g=h.state,(0,m.uniq)(null!==(y=null==g?void 0:g.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==y?y:[])),w=Object.entries(null!==(o=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==o?o:{}),S=b.concat(d.map((e=>e[0]))),E=w.map((e=>e[0])),k=S.concat(E).filter((e=>e in HTMLElement.prototype&&!Re.has(e)));if(k.length>0&&(Te(c,"Using native HTMLElement properties as template properties or methods",e,...k),c))throw new Error('In custom template "'.concat(e,'", ').concat(k.map((e=>'"'.concat(e,'"'))).join(", ")," are native HTMLElement properties, and should be avoid to be used as brick properties or methods."));if(!s){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return S}static get _dev_only_definedMethods(){return E}$$getElementByRef(e){var t;return null===(t=this.$$tplStateStore)||void 0===t||null===(t=t.hostBrick)||void 0===t||null===(t=t.tplHostMetadata)||void 0===t||null===(t=t.internalBricksByRef.get(e))||void 0===t?void 0:t.element}connectedCallback(){var e=this.shadowRoot;e||(e=this.attachShadow({mode:"open"}));var t=document.createDocumentFragment(),r=document.createElement("style");r.textContent=":host{display:block}:host([hidden]){display:none}";var n=document.createElement("slot");t.appendChild(r),t.appendChild(n),e.appendChild(t)}disconnectedCallback(){this.shadowRoot&&(this.shadowRoot.textContent="")}}var Z=function(r){if(d.some((e=>e[0]===r)))return console.error('Cannot define an exposed state that is also a proxy property: "'.concat(r,'" in ').concat(e)),1;Object.defineProperty(t.prototype,r,{get(){return this.$$tplStateStore.getValue(r)},set(e){var t;null===(t=this.$$tplStateStore)||void 0===t||t.updateValue(r,e,"replace")},enumerable:!0})};for(var I of b)Z(I);var A=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,a,o=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);o&&(o[null!==(a=r.refProperty)&&void 0!==a?a:e]=t)},enumerable:!0})};for(var[C,T]of d)A(C,T);var R=function(e,r){Object.defineProperty(t.prototype,e,{value(){var t;this.$$getElementByRef(r.ref)[null!==(t=r.refMethod)&&void 0!==t?t:e](...arguments)},enumerable:!0})};for(var[O,P]of w)R(O,P);customElements.define(e,t)}}get(e){return(0,l.Z)(this,Oe).get(e)}};function _e(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}function Me(e,t,r){var n=_e(e,t,r).hostBrick.element;if(!n)throw new Error('Template host element is gone when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return n}var xe=new Map,Be=new Proxy(Object.freeze({}),{get:(e,t)=>xe.get(t)});function Le(e,t,r){if(xe.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:a}=fe({widgetId:e,widgetVersion:r});xe.set(e,n),a(t)}const Ue=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ne=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Ue);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Fe=e=>"*"===e||"x"===e||"X"===e,$e=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},je=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])($e(e),$e(t));return r>n?1:r<n?-1:0},Ke=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=je(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},De=(e,t,r)=>{He(r);const n=((e,t)=>{const r=Ne(e),n=Ne(t),a=r.pop(),o=n.pop(),i=Ke(r,n);return 0!==i?i:a&&o?Ke(a.split("."),o.split(".")):a||o?a?-1:1:0})(e,t);return We[r].includes(n)},We={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ve=Object.keys(We),He=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===Ve.indexOf(e))throw new Error(`Invalid operator, expected one of ${Ve.join("|")}`)};function ze(e,t){var r=La(e);if(!r&&null!=Ia&&Ia.checkInstalledApps&&(r=Ia.checkInstalledApps.getCheckedApp(e)),!r||"running"===r.installStatus)return!1;if(!t||!r.currentVersion)return!0;var n=t.match(/^([><]=?|=)(.*)$/);try{if(!n)throw new TypeError("Invalid match version: ".concat(t));return De(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function qe(e,t,r){var{formStateStoreId:n,formStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Form state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}var Ge=new Map;function Je(e){return Qe.apply(this,arguments)}function Qe(){return Qe=(0,o.Z)((function*(e){var t,r=null==Ia||null===(t=Ia.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=Ia.flowApi.FLOW_API_PROVIDER);var n=Ge.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)Ia.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],_a()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),Ge.set(e,n),n})),Qe.apply(this,arguments)}var Ye=new WeakSet;function Xe(e){if((0,d.isObject)(e)&&!et(e))if(Ye.add(e),Array.isArray(e))e.forEach(Xe);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Xe)}}function et(e){return Ye.has(e)}var tt=new Map;function rt(e,t,r){return nt.apply(this,arguments)}function nt(){return(nt=(0,o.Z)((function*(e,t,r){var{useProvider:n,method:o="resolve",args:i=[],onReject:s}=e,{provider:l,field:c}=e;if(l&&!n)throw new Error("You're using \"provider: ".concat(l,'" which is dropped in v3, please use "useProvider" instead'));var u=null!=c;if(u){var d=Ce();if(Te(d,"`resolve.field`"),d)throw new Error("Using deprecated `resolve.field`")}var p,[f,v]=yield Promise.all([Je(n),yt(i,t)]),h=at(f,n,o,v,r,i),{transform:g}=e;try{var y=yield h;Xe(p=u?(0,m.get)(y,c):y)}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;g=s.transform,p=e}return g?"string"==typeof g?{[g]:p}:yt(g,(0,a.Z)((0,a.Z)({},t),{},{data:p})):p}))).apply(this,arguments)}function at(e,t,r,n,a,o){return ot.apply(this,arguments)}function ot(){return ot=(0,o.Z)((function*(e,t,r,n,a,i){var s,l;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==a?void 0:a.cache)&&(l=tt.get(s)),l||(l=(0,o.Z)((function*(){var a,o=null!=Ia&&null!==(a=Ia.flowApi)&&void 0!==a&&a.isFlowApiProvider(t)?yield Ia.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...o)}))(),tt.set(s,l)),l})),ot.apply(this,arguments)}var it=Symbol.for("pre.evaluated.raw"),st=Symbol.for("pre.evaluated.context");function lt(e){return!(null==e||!e[it])}function ct(e){return e[it]}function ut(e){return"string"==typeof e?(0,R.shouldAllowRecursiveEvaluations)(e):(0,R.shouldAllowRecursiveEvaluations)(e[it])}var dt=new WeakSet([SyntaxError,TypeError,ReferenceError]);function pt(e){return dt.has(e.constructor)?e.constructor:TypeError}function ft(){return(ft=(0,o.Z)((function*(e,t,r){var{blockingList:n,run:a}=vt(e,t,r,!0);return yield Promise.all(n),a()}))).apply(this,arguments)}function vt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,a.Z)((0,a.Z)({},e[st]),i),e=e[it]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,R.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,O.collectAppGetMenuUsage)(l,e,t),(0,O.collectInstalledAppsHasUsage)(c,e,t)}}})}catch(t){var p="".concat(t.message,', in "').concat(e,'"');throw new(pt(t))(p)}if(l.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is prohibited in v3, check your expression: "'.concat(e,'"'));if(c.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is prohibited in v3, check your expression: "'.concat(e,'"'));var f,v,h,g,y={},{attemptToVisitGlobals:b}=s;if(r.lazy||b.has("EVENT")&&!(0,d.hasOwnProperty)(t,"event")||b.has("DATA")&&!(0,d.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[it]:e,[st]:t}:e};var w,S,E=Ce(t);(b.has("STATE")||!E&&b.has("TPL"))&&(g=_e(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(S=qe(t,"FORM_STATE",': "'.concat(e,'"')));var k=W();if(n||k){if(b.has("CTX")&&(f=(0,O.strictCollectMemberUsage)(e,"CTX"),n&&o.push(t.ctxStore.waitFor(f))),g){if(h=(0,O.strictCollectMemberUsage)(e,"STATE"),!E){var Z=(0,O.strictCollectMemberUsage)(e,"TPL");for(var I of Z)h.add(I)}n&&o.push(g.waitFor(h))}S&&(w=(0,O.strictCollectMemberUsage)(e,"FORM_STATE"),n&&o.push(S.waitFor(w))),b.has("PROCESSORS")&&(v=(0,O.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&o.push((0,u.loadProcessorsImperatively)(v,_a())))}if(n){var A,C=b.has("PERMISSIONS");if(!C&&b.has("FN")){var T=[...(0,O.strictCollectMemberUsage)(e,"FN")];C=me(T)}if(C&&o.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=Ia&&Ia.menu){var P=[...l.usedArgs];o.push(Promise.all(P.map((e=>Ia.menu.fetchMenuById(e,t,{getStoryboardByAppId:Ba,resolveData:rt,asyncComputeRealValue:yt})))))}c.usedArgs.size>0&&o.push(null==Ia||null===(A=Ia.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...c.usedArgs]))}return{blockingList:o,run(){var r,n,o,i,{app:l,location:c,query:u,match:p,flags:k,sys:Z,ctxStore:I,data:A,event:C}=t,T=null!==(r=t.overrideApp)&&void 0!==r?r:l;for(var O of b)switch(O){case"ANCHOR":y[O]=c.hash?c.hash.substring(1):null;break;case"APP":y[O]=(0,a.Z)((0,a.Z)({},(0,m.cloneDeep)(T)),{},{getMenu:null==Ia||null===(n=Ia.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[O]=q({get:(e,t)=>I.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[O]=A;break;case"EVENT":y[O]=C;break;case"FLAGS":y[O]=z(k);break;case"FORM_STATE":y[O]=q({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[O]=c.hash;break;case"INSTALLED_APPS":y[O]=z({has:ze});break;case"ITEM":case"INDEX":var P="ITEM"===O?"forEachItem":"forEachIndex";(0,d.hasOwnProperty)(t,P)?y[O]=t[P]:console.error("Using `".concat(O,'` but no `:forEach` is found, check your expression: "').concat(e,'"'));break;case"LOCAL_STORAGE":y[O]=z({getItem:Ae("local")});break;case"MEDIA":y[O]=z(Ie());break;case"MISC":y[O]=Ta().getMiscSettings();break;case"PARAMS":y[O]=new URLSearchParams(u);break;case"PATH":y[O]=z(null!==(o=null==p?void 0:p.params)&&void 0!==o?o:{});break;case"PATH_NAME":y[O]=c.pathname;break;case"PROCESSORS":y[O]=q({get(e,t){var r=x.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return q({get:(e,t)=>r.get(t),ownKeys:()=>Array.from(r.keys())})},ownKeys(){var e=new Set;for(var t of v){var r=t.split(".")[0];e.add(r)}return Array.from(e)}});break;case"QUERY":y[O]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":y[O]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":y[O]=z({getItem:Ae("session")});break;case"TPL":if(Te(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":y[O]=q({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[O]=z(null!=Z?Z:{});break;case"__WIDGET_FN__":y[O]=Be;break;case"__WIDGET_IMG__":y[O]=null==Ia||null===(i=Ia.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":y[O]=N}Object.assign(y,ce(s.attemptToVisitGlobals,{storyboardFunctions:ve,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{var M=(0,R.cook)(s.expression,s.source,{globalVariables:(0,_.supply)(s.attemptToVisitGlobals,y)});return function(e,t){var r=W();if(r&&D&&(!F||"Evaluations"===F)){var n=()=>{var n;null===(n=r.emit)||void 0===n||n.call(r,{type:e,payload:t})};"function"==typeof window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,0)}}("evaluation",{raw:e,context:y,result:M}),M}catch(t){var B="".concat(t.message,', in "').concat(e,'"');throw new(pt(t))(B)}}}}var ht=function(e){return e[e.INITIAL=0]="INITIAL",e[e.USE_BRICK=1]="USE_BRICK",e[e.USE_BRICK_ITEM=2]="USE_BRICK_ITEM",e[e.USE_BRICK_PROPERTIES=3]="USE_BRICK_PROPERTIES",e[e.USE_BRICK_TRANSFORM=4]="USE_BRICK_TRANSFORM",e[e.USE_BRICK_EVENTS=5]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=6]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=7]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=8]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=9]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=10]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=11]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=12]="USE_BRICK_DATA_SOURCE",e}({});function mt(e){switch(e){case ht.USE_BRICK_PROPERTIES:case ht.USE_BRICK_TRANSFORM:case ht.USE_BRICK_EVENTS:case ht.USE_BRICK_IF:case ht.USE_BRICK_LIFECYCLE:case ht.USE_BRICK_DATA_SOURCE:return!0}return!1}function gt(e,t,r){if(mt(e))return e;if(t)switch(e){case ht.USE_BRICK:return ht.USE_BRICK_ITEM;case ht.USE_BRICK_SLOTS_ITEM_BRICKS:return ht.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case ht.INITIAL:if("useBrick"===r)return ht.USE_BRICK;break;case ht.USE_BRICK:case ht.USE_BRICK_ITEM:case ht.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return ht.USE_BRICK_PROPERTIES;case"transform":return ht.USE_BRICK_TRANSFORM;case"dataSource":return ht.USE_BRICK_DATA_SOURCE;case"events":return ht.USE_BRICK_EVENTS;case"slots":return ht.USE_BRICK_SLOTS;case"children":return ht.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return ht.USE_BRICK_IF;case"lifeCycle":return ht.USE_BRICK_LIFECYCLE}break;case ht.USE_BRICK_SLOTS:return ht.USE_BRICK_SLOTS_ITEM;case ht.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return ht.USE_BRICK_SLOTS_ITEM_BRICKS}return ht.INITIAL}function yt(e,t){return bt.apply(this,arguments)}function bt(){return bt=(0,o.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=lt(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&mt(r.$$stateOfUseBrick),i=o;return n||(0,R.isEvaluable)(e)?(a=yield function(e,t,r){return ft.apply(this,arguments)}(e,t,{lazy:o}),i=ut(e)):a=o?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?P.transform:P.transformAndInject:r.noInject?Et:P.inject)(e,t),i||Xe(a),a}if(!(0,d.isObject)(e)||et(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=St(r,!0);return Promise.all(e.map((e=>yt(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,a]=e;return Promise.all([yt(n,t),yt(a,t,St(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),bt.apply(this,arguments)}function wt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=lt(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&mt(r.$$stateOfUseBrick),i=o;return n||(0,R.isEvaluable)(e)?(a=function(e,t,r){var{run:n}=vt(e,t,void 0,!1);return n()}(e,t),i=ut(e)):a=o?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?P.transform:P.transformAndInject:r.noInject?Et:P.inject)(e,t),i||Xe(a),a}if(!(0,d.isObject)(e)||et(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=St(r,!0);return e.map((e=>wt(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;return[wt(n,t),wt(a,t,St(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function St(e,t,r){return e.$$lazyForUseBrick?(0,a.Z)((0,a.Z)({},e),{},{$$stateOfUseBrick:gt(e.$$stateOfUseBrick,t,r)}):e}function Et(e){return e}function kt(e,t){return Zt.apply(this,arguments)}function Zt(){return(Zt=(0,o.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||lt(e.if)?yield yt(e.if,t):e.if)}))).apply(this,arguments)}function It(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||lt(e.if)?wt(e.if,t):e.if)}function At(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function Ct(){return(Ct=(0,o.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!lt(e.if)?At(yield rt(e.if,t)):kt(e,t)}))).apply(this,arguments)}function Tt(e,t){return It(e,{data:t})}function Rt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,R.isEvaluable)(e):lt(e)){var a="string"==typeof e?e:ct(e);if((0,R.isTrackAll)(a)){var o=(0,O.trackAll)(a);o&&(t=o.context,r=o.state,n=o.formState)}else t=(0,O.track)(a,"track context","CTX"),r=(0,O.track)(a,"track state","STATE"),n=(0,O.track)(a,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function Ot(e,t){return Pt.apply(this,arguments)}function Pt(){return(Pt=(0,o.Z)((function*(e,t){for(var[r,n,a]of e)if(r===t){var o=yield n;if(void 0!==o||!a)return o}}))).apply(this,arguments)}function _t(e){return Mt.apply(this,arguments)}function Mt(){return(Mt=(0,o.Z)((function*(e){var t={};for(var[r,n,a]of e){var o=yield n;void 0===o&&a||!("style"!==r&&"dataset"!==r||(0,d.isObject)(o))||(t[r]=o)}return t}))).apply(this,arguments)}function xt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[a,o]of Object.entries(n))e[r][a]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function Bt(e,t,r){var n=function(e,t){return(0,d.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[r,n]=e,a=wt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?ht.USE_BRICK:ht.INITIAL});if("style"!==r&&"dataset"!==r||(0,d.isObject)(a))return[r,a]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{xt(e,n)}))}function Lt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ut(e){return e&&e.sensitive?"":"i"}function Nt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,a=void 0!==n&&n,o=r.start,i=void 0===o||o,s=r.end,l=void 0===s||s,c=r.encode,u=void 0===c?function(e){return e}:c,d=r.delimiter,p=void 0===d?"/#?":d,f=r.endsWith,v="[".concat(Lt(void 0===f?"":f),"]|$"),h="[".concat(Lt(p),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var b=y[g];if("string"==typeof b)m+=Lt(u(b));else{var w=Lt(u(b.prefix)),S=Lt(u(b.suffix));if(b.pattern)if(t&&t.push(b),w||S)if("+"===b.modifier||"*"===b.modifier){var E="*"===b.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(S).concat(w,"(?:").concat(b.pattern,"))*)").concat(S,")").concat(E)}else m+="(?:".concat(w,"(").concat(b.pattern,")").concat(S,")").concat(b.modifier);else"+"===b.modifier||"*"===b.modifier?m+="((?:".concat(b.pattern,")").concat(b.modifier,")"):m+="(".concat(b.pattern,")").concat(b.modifier);else m+="(?:".concat(w).concat(S,")").concat(b.modifier)}}if(l)a||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var k=e[e.length-1],Z="string"==typeof k?h.indexOf(k[k.length-1])>-1:void 0===k;a||(m+="(?:".concat(h,"(?=").concat(v,"))?")),Z||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,Ut(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var a=1,o="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--a){s++;break}}else if("("===e[s]&&(a++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=e[s++]}else o+=e[s++]+e[s++];if(a)throw new TypeError("Unbalanced pattern at ".concat(r));if(!o)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:o}),r=s}else{for(var i="",s=r+1;s<e.length;){var l=e.charCodeAt(s);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,a=void 0===n?"./":n,o="[^".concat(Lt(t.delimiter||"/#?"),"]+?"),i=[],s=0,l=0,c="",u=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var n=r[l],a=n.type,o=n.index;throw new TypeError("Unexpected ".concat(a," at ").concat(o,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===a.indexOf(m)&&(c+=m,m=""),c&&(i.push(c),c=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||o,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)c+=g;else if(c&&(i.push(c),c=""),u("OPEN")){m=p();var y=u("NAME")||"",b=u("PATTERN")||"",w=p();d("CLOSE"),i.push({name:y||(b?s++:""),pattern:y&&!b?o:b,prefix:m,suffix:w,modifier:u("MODIFIER")||""})}else d("END")}}return i}(e,r),t,r)}function Ft(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return Ft(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),Ut(r))}(e,t,r):Nt(e,t,r)}var $t=new Map,jt=1e4,Kt=0;function Dt(e,t){var{path:r,exact:n=!1,strict:a=!1,sensitive:o=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=$t.get(r);n||$t.set(r,n=new Map);var a=n.get(e);if(a)return a;var o=[],i={regexp:Ft(e,o,t),keys:o};return Kt<jt&&(n.set(e,i),Kt++),i}(r,{end:n,strict:a,sensitive:o}),l=i.exec(e);if(!l)return null;var[c,...u]=l,d=e===c;return n&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function Wt(){return(Wt=(0,o.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=Vt(r,t.app.homepage,t.location.pathname);if(n&&(yield kt(r,t)))return t.app.noAuthGuard||r.public||null==Ia||!Ia.auth||Ia.auth.isLoggedIn()?{match:n,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}function Vt(e,t,r){return Dt(r,{path:e.path.replace(/^\$\{APP.homepage\}/,t),exact:e.exact})}var Ht,zt=Symbol.for("tpl.asyncComputedPropsFromHost"),qt=Symbol.for("tpl.stateStoreId"),Gt=Symbol.for("tpl.externalForEachItem"),Jt=Symbol.for("tpl.externalForEachIndex"),Qt=r(6666),Yt=new Set,Xt=function(e){return e.REQUEST_FAILED="REQUEST_FAILED",e.SOMETHING_WENT_WRONG="SOMETHING_WENT_WRONG",e.LOGIN_TIMEOUT_MESSAGE="LOGIN_TIMEOUT_MESSAGE",e.NETWORK_ERROR="NETWORK_ERROR",e}({}),er={[Xt.REQUEST_FAILED]:"Request Failed",[Xt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Xt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Xt.NETWORK_ERROR]:"Network error, please check your network."},tr={[Xt.REQUEST_FAILED]:"请求失败",[Xt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Xt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Xt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},rr="core/runtime",nr={en:er,zh:tr},ar=Object.freeze({show:function(e){return Ht?Ht.resolve(e):"confirm"===e.type?confirm(e.content)?new Promise((e=>setTimeout((()=>{e()}),1))):new Promise(((e,t)=>setTimeout((()=>{t()}),1))):(alert(e.content),new Promise((e=>setTimeout((()=>{e()}),1e3))))}});function or(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof T.HttpFetchError)return c.i18n.t("".concat(rr,":").concat(Xt.NETWORK_ERROR));if(e instanceof T.HttpResponseError&&e.responseJson){if("string"==typeof e.responseJson.error)return e.responseJson.error;if("string"==typeof e.responseJson.msg)return e.responseJson.msg}return null==e?"Unknown error":e.toString()}function ir(e){return e instanceof T.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var sr,lr,cr=!1;function ur(e){if(!(e instanceof T.HttpAbortError)){if(ir(e)&&!window.NO_AUTH_GUARD){if(cr)return;return cr=!0,void ar.show({type:"confirm",content:c.i18n.t("".concat(rr,":").concat(Xt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=Ta().getFeatureFlags()["sso-enabled"],(t=I()).push(e?"/sso-auth/login":"/auth/login",{from:(0,a.Z)((0,a.Z)({},t.location),{},{state:void 0})}),cr=!1}),(()=>{cr=!1}))}console.error(e);var t=or(e);t!==sr&&(sr=t,ar.show({type:"error",title:c.i18n.t("".concat(rr,":").concat(Xt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{sr=void 0})))}}var dr=Object.freeze({show:function(e){lr?lr.resolve(e):alert(e.message)}});function pr(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,a]=t,o=gr(a,r,{element:e});for(var i of(e.addEventListener(n,o),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,o]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(a)))e.$$eventListeners.push([n,null,i])}))}function fr(e){return"string"==typeof e.action}function vr(e){return"string"==typeof e.useProvider}function hr(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function mr(e){return!!e.then}function gr(e,t,r){return function(n){var o,i;for(var s of[].concat(e))if(It(s,(0,a.Z)((0,a.Z)({},t),{},{event:n})))if(mr(s))gr(s.then,t,r)(n);else if(fr(s)){var[l,c]=s.action.split(".");switch(s.action){case"history.push":case"history.replace":case"history.pushQuery":case"history.replaceQuery":case"history.pushAnchor":case"history.block":case"history.goBack":case"history.goForward":case"history.reload":case"history.unblock":kr(n,c,s.args,s.callback,t);break;case"window.open":Zr(n,s.args,t);break;case"location.reload":case"location.assign":Rr(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Or(n,l,c,s.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":Pr(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":_r(n,c,s.args,t);break;case"handleHttpError":ur(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":Ar(n,c,s.args,null===(o=s.batch)||void 0===o||o,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":Cr(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Lr(s.args,t,n);Me(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":Tr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":Mr(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":te("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=Lr(s.args,t,n);te(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":se("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else vr(s)?yr(n,s,t,r):hr(s)?wr(n,s,t,r):console.error("unknown event handler:",s);else s.else&&gr(s.else,t,r)(n)}}function yr(e,t,r,n){return br.apply(this,arguments)}function br(){return(br=(0,o.Z)((function*(e,t,r,n){try{Sr(e,yield Je(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(or(e))}}))).apply(this,arguments)}function wr(e,t,r,n){var o=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,R.isEvaluable)(i):lt(i))&&(l=wt(i,(0,a.Z)((0,a.Z)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)o.push(n.element);else if(t.multiple)o=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&o.push(c)}else if(l)l instanceof HTMLElement?o.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,R.isEvaluable)(s):lt(s))&&(u=wt(s,(0,a.Z)((0,a.Z)({},r),{},{event:e})));var d=[].concat(u),p=Me(r,"targetRef",": ".concat(d.join(", ")));o.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((a=>{Sr(e,a,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Bt(o,t.properties,(0,a.Z)((0,a.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function Sr(e,t,r,n,a,o,i){return Er.apply(this,arguments)}function Er(){return Er=(0,o.Z)((function*(e,t,r,n,i,s,l){var c;if("function"==typeof t[n]){var u=function(){var a=(0,o.Z)((function*(){var a,o=Lr(r.args,i,e,l);return vr(r)&&null!=Ia&&null!==(a=Ia.flowApi)&&void 0!==a&&a.isFlowApiProvider(r.useProvider)&&(o=yield Ia.flowApi.getArgsOfFlowApi(r.useProvider,o,n)),t[n](...o)}));return function(){return a.apply(this,arguments)}}();if(r.callback){var d,p=Br(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(vr(r)&&(d=wt(r.poll,(0,a.Z)((0,a.Z)({},i),{},{event:e}))),null!==(c=d)&&void 0!==c&&c.enabled)!function(e,t,r){var n,{progress:a,success:i,error:s,finally:l}=t,{interval:c,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=Ma();function m(){return g.apply(this,arguments)}function g(){return(g=(0,o.Z)((function*(){var t;Yt.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==Ma())||(null==a||a(r),null!=f&&f(r)?(p&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==l||l()):y(null!=c?c:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==Ma())||(null==s||s(e),d?y(null!=c?c:3e3):null==l||l())}finally{p&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),Yt.add(n)}y(null!=u?u:0),p&&window.dispatchEvent(new Event("request.start"))}(u,f,d);else try{var v=yield u();f.success(v)}catch(e){f.error(e)}finally{f.finally()}}else u()}else console.error("target has no method:",{target:t,method:n})})),Er.apply(this,arguments)}function kr(e,t,r,n,a){var o=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":o=2,i=!0;break;case"reload":i=!0;break;case"block":o=1,s="setBlockMessage"}var l=[];if(o>0&&((l=Lr(r,a,e,{useEventDetailAsDefault:!0})).length=o),i&&n){var c=Br(n,a,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}I()[s](...l)}function Zr(e,t,r){var[n,a,o]=Lr(t,r,e);window.open(n,a||"_self",o)}function Ir(e,t,r,n,a,o){t?n.updateValues(e,r,(e=>Lr(e,a,o)[0])):e.forEach((e=>{var{name:t,value:i}=Lr([e],a,o)[0];n.updateValue(t,i,r)}))}function Ar(e,t,r,n,a,o){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Lr(r,o,e);o.ctxStore.updateValue(i,s,t,a,o)}else Ir(r,n,t,o.ctxStore,o,e)}function Cr(e,t,r,n,a,o){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)Ir(r,n,"replace",_e(o,"state.".concat(t),": ".concat(JSON.stringify(r))),o,e);else{var[i,s]=Lr(r,o,e);_e(o,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,a,o)}}function Tr(e,t,r,n){var[a,o]=Lr(t,n,e);qe(n,"formstate.update",": ".concat(a)).updateValue(a,o,"replace",r,n)}function Rr(e,t,r,n){if("assign"===t){var[a]=Lr(r,n,e);location.assign(a)}else location[t]()}function Or(e,t,r,n,a){var o="localStorage"===t?localStorage:sessionStorage,[i,s]=Lr(n,a,e);"setItem"===r?void 0!==s&&o.setItem(i,JSON.stringify(s)):o.removeItem(i)}function Pr(e,t,r,n){console[t](...Lr(r,n,e,{useEventAsDefault:!0}))}function _r(e,t,r,n){var a=Lr(r,n,e,{useEventAsDefault:!0});dr.show({type:t,message:a[0]})}function Mr(e,t,r,n,a,o){return xr.apply(this,arguments)}function xr(){return(xr=(0,o.Z)((function*(e,t,r,n,a,o){var i=()=>{var a,o=Lr(r,n,e);return null==Ia||null===(a=Ia.messageDispatcher)||void 0===a?void 0:a[t](...o)};if(o){var s=Br(o,n,a);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function Br(e,t,r){return function(n){return function(a){var o=null==e?void 0:e[n];if(o)try{var i=new CustomEvent("callback.".concat(n),{detail:a});gr(o,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",a)}}}function Lr(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?wt(e,(0,a.Z)((0,a.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}var Ur=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Nr{constructor(e,t,r){(0,Qt.Z)(this,"type",void 0),(0,Qt.Z)(this,"data",new Map),(0,Qt.Z)(this,"changeEventType",void 0),(0,Qt.Z)(this,"pendingStack",[]),(0,Qt.Z)(this,"hostBrick",void 0),(0,Qt.Z)(this,"batchUpdate",!1),(0,Qt.Z)(this,"batchUpdateContextsNames",[]),(0,Qt.Z)(this,"rendererContext",void 0),(0,Qt.Z)(this,"routeMap",new WeakMap),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t,this.rendererContext=r}getAllValues(){return Object.fromEntries([...this.data.entries()].map((e=>{var[t,{value:r}]=e;return[t,r]})))}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}getAffectListByContext(e){var t=[e];return this.data.forEach(((e,r)=>{e.deps&&e.deps.some((e=>t.includes(e)))&&t.push(r)&&t.push(...this.getAffectListByContext(r))})),t.shift(),[...new Set(t)]}updateValues(e,t,r){if(this.batchUpdate=!0,this.batchUpdateContextsNames=e.map((e=>e.name)),[...new Set(this.batchUpdateContextsNames)].length!==this.batchUpdateContextsNames.length)throw new Error("Batch update not allow to update same item");var n={},a={},o=[];e.forEach((e=>{var{name:a,value:i}=r([e]),s=this.data.get(a);o.push(...this.getAffectListByContext(a)),s&&(n[a]=s),this.updateValue(a,i,t)})),o.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(a[e]=t)}));var i=e=>{for(var t in e){var r,n=e[t];null===(r=n.eventTarget)||void 0===r||r.dispatchEvent(new CustomEvent(this.changeEventType,{detail:n.value}))}};i(n),i(a),this.batchUpdate=!1}updateValue(e,t,r,n,o){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,d.isObject)(i.value)?Object.assign(i.value,t):(console.warn('Non-object current value of "'.concat(this.type,".").concat(e,'" for "context.assign", try "context.replace" instead.')),i.value=t),this.batchUpdate||i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,a.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||ur(e)})),n){var l=Br(n,o);s.then((e=>{l("success")({value:e}),l("finally")()}),(e=>{l("error")(e),l("finally")()}))}}}define(e,t,r,n){if(Array.isArray(e)&&e.length>0){var a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"CTX",n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CTX",r=new Map;for(var n of e){var a=(0,O.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,a)}return r}(e,r),a=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;a.set(i,(null!==(s=a.get(i))&&void 0!==s?s:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),c=new WeakSet,u=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{u.set(e,{resolve:t,reject:r})}))]))),p=function(){var e=(0,o.Z)((function*(e){var r;c.add(e);var o=yield t(e);n.delete(e);var i=null!==(r=a.get(e.name))&&void 0!==r?r:0;if(o){if(u.get(e.name).resolve(),a.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),a.delete(e.name)):a.set(e.name,i-1);yield v()}));return function(t){return e.apply(this,arguments)}}(),f=l;function v(){return h.apply(this,arguments)}function h(){return h=(0,o.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(a,f)).map((e=>e[0])).filter((e=>!c.has(e)));yield Promise.all(e.map(p))})),h.apply(this,arguments)}return{pendingResult:v().then((0,o.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),a=()=>{var e=!1;for(var[t,o]of r.entries())[...o.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&a()};if(a(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),f=!0,yield v()),u.values()))e.resolve()}))).catch((e=>{for(var t of u.values())t.reject(e);throw e})),pendingContexts:d}}(e,(e=>this.resolve(e,t,r,n)),this.type);this.pendingStack.push(a)}}onChange(e,t){var r;null===(r=this.data.get(e))||void 0===r||r.eventTarget.addEventListener(this.changeEventType,t)}waitFor(e){var t=this;return(0,o.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,o.Z)((function*(){for(var{pendingContexts:t}of e.pendingStack)for(var r of t.values())r.catch((()=>{}));for(var{pendingResult:n}of e.pendingStack)yield n}))()}mountAsyncData(e){this.data.forEach((t=>{var r;if(t.async&&(!e||null!==(r=this.routeMap.get(e))&&void 0!==r&&r.has(t.name))){if(t.asyncMounted)return void console.error('Async data "'.concat(t.name,'" already mounted. This is a bug of Brick Next, please report it.'));t.asyncMounted=!0,t.loading.then((e=>{t.loaded=!0,t.value=e,t.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:e}))}))}}))}resolve(e,t,r,n){var i=this;return(0,o.Z)((function*(){if(!(yield kt(e,t)))return!1;var s,l,c;r&&("STATE"===i.type?e.expose:"FORM_STATE"===i.type)&&(s=yield Ot(r,e.name));var u="eager";if(void 0===s){if(e.resolve){var p=(0,a.Z)({transform:"value"},e.resolve);if(yield kt(e.resolve,t))l=function(){var e=(0,o.Z)((function*(e){return(yield rt(p,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),"eager"==(u=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?s=yield l():"async"===u&&(c=l());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}l&&"eager"===u||void 0===e.value||(s=yield yt(e.value,t))}var f={name:e.name,value:s,eventTarget:new ye,load:l,loaded:"eager"===u,loading:c,async:"async"===u,deps:[]};if("lazy"===u){var v,{trigger:h}=e.resolve;h&&Ur.includes(h)&&(null===(v=i.rendererContext)||void 0===v||v.registerArbitraryLifeCycle(h,(()=>{i.updateValue(e.name,void 0,"load")})))}if(e.onChange&&f.eventTarget.addEventListener(i.changeEventType,gr(e.onChange,t)),e.track){var m=(0,O.strictCollectMemberUsage)(l?e.resolve:e.value,i.type);for(var g of(!l&&(f.deps=[...m]),m))i.onChange(g,i.batchAddListener((()=>{l?i.updateValue(e.name,{cache:"default"},"refresh"):i.updateValue(e.name,wt(e.value,t),"replace")}),e))}if(i.data.has(e.name))throw new Error("".concat(i.type," '").concat(e.name,"' has already been declared"));if(i.data.set(e.name,f),Array.isArray(n))for(var y of n){var b=i.routeMap.get(y);b?b.add(e.name):i.routeMap.set(y,new Set([e.name]))}return!0}))()}disposeDataInRoutes(e){for(var t of e){var r=this.routeMap.get(t);if(void 0!==r)for(var n of r)this.data.delete(n)}}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function Fr(e,t,r){var n,a,{reversedProxies:o,asyncHostPropertyEntries:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&o){var u=o.properties.get(t);u&&(a=i,n=u.map((e=>{var{from:t,to:r}=e,n=a.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,Ot(n,t),!0]})).filter(Boolean));var p=o.slots.get(t);if(p&&s){var f=new Map;for(var{from:v,to:h}of p){var g,y,b,w,S=null!==(g=null===(y=s[v])||void 0===y?void 0:y.bricks)&&void 0!==g?g:[];if(S.length){var E=null!==(b=h.refSlot)&&void 0!==b?b:v,k=f.get(E);if(!k){k=[];for(var Z=(0,d.hasOwnProperty)(r,E)?r[E].bricks.length+1:1,I=0;I<Z;I+=1)k.push([]);f.set(E,k)}var A=null!==(w=h.refPosition)&&void 0!==w?w:-1;k[(0,m.clamp)(A<0?k.length+A:A,0,k.length-1)].push(...(0,d.hasOwnProperty)(c.runtimeContext,"forEachItem")?$r(S,c.runtimeContext.forEachItem,c.runtimeContext.forEachIndex):S)}}var C=function(){(0,d.hasOwnProperty)(r,T)||(r[T]={type:"bricks",bricks:[]});var e=r[T];e.bricks=R.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[T]};for(var[T,R]of f.entries())C()}}return{[zt]:n,[qt]:l}}function $r(e,t,r){return e.map((e=>{var n;return(0,a.Z)((0,a.Z)({},e),{},{[Gt]:t,[Jt]:r,slots:Object.fromEntries(Object.entries(null!==(n=e.slots)&&void 0!==n?n:{}).map((e=>{var n,[a,o]=e;return[a,"routes"===o.type?{type:"routes",routes:jr(o.routes,t,r)}:{type:"bricks",bricks:$r(null!==(n=o.bricks)&&void 0!==n?n:[],t,r)}]})))})}))}function jr(e,t,r){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,a.Z)((0,a.Z)({},e),{},{bricks:$r(e.bricks,t,r)})))}var Kr=["properties","slots","children"];function Dr(e,t){function r(e){return(0,d.isObject)(e)&&"function"!=typeof e?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,a]=e;return(0,d.isObject)(a)&&"useBrick"===t?Array.isArray(a)?[t,a.map(n)]:[t,n(a)]:[t,r(a)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:o,slots:i,children:s}=e,l=(0,h.Z)(e,Kr),c=gn(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t,[r,a]=e;return[r,{type:"bricks",bricks:(null!==(t=a.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,a.Z)((0,a.Z)({},l),{},{properties:r(o),slots:u},Fr(t,l.ref,u))}return r(e)}var Wr=["slots","children"],Vr=["properties","slots","children"];function Hr(e,t,r,n,o){var i,s=(0,m.uniqueId)("tpl-state-"),l=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.forEachIndex,delete l.formStateStoreId;var c=new Nr("STATE",r,o);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Pe.get(e);null==Ia||null===(i=Ia.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:g}=t,y=(0,h.Z)(t,Wr),b=(0,a.Z)((0,a.Z)({},y),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:s,proxy:d};var w={properties:new Map,slots:new Map};if(null!=d&&d.properties)for(var[S,E]of Object.entries(d.properties)){var k=w.properties.get(E.ref);k||(k=[],w.properties.set(E.ref,k)),k.push({from:S,to:E})}if(null!=d&&d.slots)for(var[Z,I]of Object.entries(d.slots)){var A=w.slots.get(I.ref);A||(A=[],w.slots.set(I.ref,A)),A.push({from:Z,to:I})}var C={reversedProxies:w,asyncHostPropertyEntries:n,externalSlots:gn(g,v),tplStateStoreId:s,hostBrick:r};return b.slots={"":{type:"bricks",bricks:u.map((e=>zr(e,C)))}},b}function zr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:o}=e,i=(0,h.Z)(e,Vr),s=gn(o,n),l=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,a]=e;return[n,{type:"bricks",bricks:(null!==(r=a.bricks)&&void 0!==r?r:[]).map((e=>zr(e,t)))}]})));return(0,a.Z)((0,a.Z)({},i),{},{properties:Dr(r,t),slots:l},Fr(t,i.ref,l))}var qr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Gr="form-renderer.form-renderer",Jr=Symbol.for("form.stateStoreId"),Qr=["forms.general-form","form.general-form","eo-form"];function Yr(e,t,r){var{id:n,bricks:o,events:i,context:s,mountPoint:l,instanceId:c}=e,{brick:u,properties:p}=e,f=t.find((e=>e.fieldId===n));if(f){var v=function(e){var t,r={id:e.fieldId,name:e.fieldId,label:e.name,dataset:{testid:e.fieldId}},n=()=>{var t,r;return{readOnly:null===(t=e.limit)||void 0===t?void 0:t.includes("READONLY"),required:null===(r=e.limit)||void 0===r?void 0:r.includes("REQUIRED")}};switch(e.fieldType){case"INT":t={brick:"forms.general-input-number",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,a.Z)((0,a.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUMS":t={brick:"forms.general-select",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{mode:"multiple",options:[{label:"选项一",value:1},{label:"选项二",value:2}],placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"DATE":case"TIME":t={brick:"forms.general-date-picker",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description,pattern:"((^s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))s*$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*$))",message:{pattern:"输入字符不匹配IP格式"}})};break;case"JSON":t={brick:"forms.general-textarea",properties:(0,a.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,a.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,a.Z)((0,a.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,a.Z)((0,a.Z)((0,a.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,a.Z)((0,a.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:c,slot:l,events:i,context:s,children:Xr(o,t,r),[Jr]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Xr(e,t,r){if(Array.isArray(e))return e.map((e=>Yr(e,t,r)))}var en=["blockingList","node","menuRequests","hasTrackingControls"],tn=["if","permissionsPreCheck"],rn=["formData"],nn=["src"],an=["href"];function on(e,t,r,n,a,o,i){return sn.apply(this,arguments)}function sn(){return sn=(0,o.Z)((function*(e,t,r,n,o,i,s){var l=yield function(e,t){return Wt.apply(this,arguments)}(t,r),c={blockingList:[],menuRequests:[]};switch(l){case"missed":break;case"unauthenticated":c.unauthenticated=!0;break;default:var d,p=c.route=l.route,f=(0,a.Z)((0,a.Z)({},r),{},{match:l.match});s&&f.ctxStore.disposeDataInRoutes(t);var v=o.concat(p);f.ctxStore.define(p.context,f,void 0,v),f.pendingPermissionsPreCheck.push(null==Ia||null===(d=Ia.checkPermissions)||void 0===d?void 0:d.preCheckPermissionsForBrickOrRoute(p,(e=>yt(e,f))));var{preLoadBricks:h}=p;if(Array.isArray(h)&&c.blockingList.push((0,u.loadBricksImperatively)(h,_a())),"redirect"===p.type){var m;if("string"!=typeof(m="string"==typeof p.redirect?yield yt(p.redirect,f):(yield rt((0,a.Z)({transform:"redirect"},p.redirect),f)).redirect))throw console.error("Unexpected redirect result:",m),new Error("Unexpected type of redirect result: ".concat(typeof m));c.redirect={path:m}}else{var g=function(e,t){if(e){if("brick"===e.type)throw console.error("Set menu with brick is dropped in v3:",e),new Error("Set menu with brick is dropped in v3");if("resolve"!==e.type)return yt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}(p.menu,f);g&&c.menuRequests.push(g),"routes"===p.type?mn(c,yield on(e,p.routes,f,n,v,i)):mn(c,yield ln(e,p.bricks,f,n,v,i)),e.tag===qr.BRICK&&n.memoizeMenuRequests(p,c.menuRequests)}}return c})),sn.apply(this,arguments)}function ln(e,t,r,n,a,o,i,s){return cn.apply(this,arguments)}function cn(){return(cn=(0,o.Z)((function*(e,t,r,n,a,o,i,s){var l={blockingList:[],menuRequests:[]},c=null!=s?s:[];return(yield Promise.all(t.map(((t,s)=>un(e,t,r,n,a,o,c.concat(s),i&&new Map(i)))))).forEach(((t,r)=>{t.hasTrackingControls&&n.memoize(o,c.concat(r),t.node,e),mn(l,t)})),l}))).apply(this,arguments)}function un(e,t,r,n,a,o){return dn.apply(this,arguments)}function dn(){return dn=(0,o.Z)((function*(e,t,r,n,i,s){var l,c,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:new Map,v={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),v;var{if:g,permissionsPreCheck:b}=t,w=(0,h.Z)(t,tn);if(function(e){return"string"==typeof e?(0,R.isTrackAll)(e):lt(e)&&(0,R.isTrackAll)(ct(e))}(g))return un(e,(0,a.Z)({brick:":if",dataSource:g,permissionsPreCheck:b,slots:{"":{type:"bricks",bricks:[w]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,a.Z)((0,a.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p,f);var S=t[qt],E=t[Jr],k=(0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:S,formStateStoreId:E});(0,d.hasOwnProperty)(t,Gt)&&(k.forEachItem=t[Gt],k.forEachIndex=t[Jt]);var{context:Z}=t;if(Array.isArray(Z)&&Z.length>0){var I=Ce(k);Te(I,"Defining context on bricks","check your brick:",t),I||k.ctxStore.define(Z,k)}if(k.pendingPermissionsPreCheck.push(null==Ia||null===(l=Ia.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>yt(e,k)))),!(yield function(e,t){return Ct.apply(this,arguments)}(t,k)))return v;var A=t.brick;if(A.startsWith(":")){var C;!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(A);var{dataSource:T}=t,P=function(){var r=(0,o.Z)((function*(r){var a,o=yield yt(T,r),l=":forEach"===A?"":":switch"===A?String(o):o?"":"else",c=gn(t.children,t.slots),u=c&&(0,d.hasOwnProperty)(c,l)&&(null===(a=c[l])||void 0===a?void 0:a.bricks);if(!Array.isArray(u))return v;switch(A){case":forEach":return Array.isArray(o)?function(e,t,r,n,a,o,i,s,l){return pn.apply(this,arguments)}(e,o,u,r,n,i,s,f,p):v;case":if":case":switch":return ln(e,u,r,n,i,s,f,p)}}));return function(e){return r.apply(this,arguments)}}(),_=yield P(k),{onMount:M,onUnmount:x}=null!==(C=t.lifeCycle)&&void 0!==C?C:{},{contextNames:B,stateNames:L}=Rt(T);if(B||L){_.hasTrackingControls=!0;var U=0,N=function(){var t=(0,o.Z)((function*(){var t=++U,[r,a,o]=hn(k),i=yield P(r),l=[...a,...o];if(yield vn(i,r,l),U===t)for(var c of(x&&gr(x,k)(new CustomEvent("unmount",{detail:{rerender:!0}})),n.reRender(s,p,i.node,e),M&&gr(M,r)(new CustomEvent("mount",{detail:{rerender:!0}})),l))c.mountAsyncData()}));return function(){return t.apply(this,arguments)}}(),F=(0,m.debounce)(N);if(B)for(var $ of B)k.ctxStore.onChange($,F);if(L)for(var j of L)_e(k,"STATE",': "'.concat(T,'"')).onChange(j,F)}return M&&n.registerArbitraryLifeCycle("onMount",(()=>{gr(M,k)(new CustomEvent("mount",{detail:{rerender:!1}}))})),x&&n.registerArbitraryLifeCycle("onUnmount",(()=>{gr(x,k)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),_}/\.tpl-/.test(A)&&!Pe.get(A)&&(yield yn((0,u.loadBricksImperatively)([A],_a()),"brick",A,n.unknownBricks));var K,D,W=function(e,t){if(!e.includes(".")&&e.startsWith("tpl-")&&t){var r="".concat(t,".").concat(e);if(Pe.get(r))return r}return!!Pe.get(e)&&e}(A,null===(c=k.app)||void 0===c?void 0:c.id);if(W){var V,H=null!==(V=f.get(W))&&void 0!==V?V:0;if(H>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(W,'"'));f.set(W,H+1)}else A.includes("-")&&!customElements.get(A)&&(A===Gr?customElements.define(Gr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):v.blockingList.push(yn((0,u.enqueueStableLoadBricks)([A],_a()),"brick",A,n.unknownBricks)));if(A===Gr){var z,q=null!==(z=t.properties)&&void 0!==z?z:{};({formData:K}=q),D=(0,h.Z)(q,rn)}else D=t.properties;var G=[],J=function(e,t,r){return(0,d.isObject)(e)?Object.entries(e).map((e=>{var[n,a]=e,{contextNames:o,stateNames:i,formStateNames:s}=Rt(a);return(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a}),[n,yt(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?ht.USE_BRICK:ht.INITIAL})]})):[]}(D,k,G),Q=t[zt];Q&&J.push(...Q);var Y="script"===A;if(Y||"link"===A){var X=yield _t(J);if(Y?X.src:"stylesheet"===X.rel&&X.href){var ee,te=null!==(ee=window.PUBLIC_ROOT)&&void 0!==ee?ee:"";if(Y){var{src:re}=X,ne=(0,h.Z)(X,nn);yield yn((0,u.loadScript)(re,te,ne),"script",re,"silent")}else{var{href:ae}=X;ne=(0,h.Z)(X,an),yield yn((0,u.loadStyle)(ae,te,ne),"stylesheet",ae,"silent")}return v}}var oe={tag:qr.BRICK,type:W||A,return:e,slotId:s,events:t.events,runtimeContext:k,portal:t.portal,iid:t.iid,ref:t.ref};v.node=oe;var ie=(0,O.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);ie.size>0&&v.blockingList.push(yn((0,u.loadProcessorsImperatively)(ie,_a()),"processors",[...ie].join(", "),n.unknownBricks));var se=[],le=function(){var e=(0,o.Z)((function*(){oe.properties=yield _t(J),function(e,t){var r=function(t){var r=()=>{e.element&&Bt(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var a=_e(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var o of t.stateNames)a.onChange(o,r)}if(t.formStateNames){var i=qe(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}(oe,G)}));return function(){return e.apply(this,arguments)}}();se.push(le()),n.registerBrickLifeCycle(oe,t.lifeCycle);var ce,ue=t;W?ue=Hr(W,t,oe,J,n):A===Gr&&(ue=function(e,t,r,n,o){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),u=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.forEachIndex,delete u.tplStateStoreId;var p=new Nr("FORM_STATE",void 0,o);u.formStateStoreMap.set(c,p),u.formStateStoreScope&&u.formStateStoreScope.push(p);var f=null!==(i=l.context)&&void 0!==i?i:[];f.some((e=>"params"===e.name))||f.push({name:"params"}),p.define(f,u,n);var v=Yr(l.formSchema,l.fields,c);return Qr.includes(v.brick)&&t.events&&(v.events=function(e,t){var r=null!=e?e:{};for(var[n,a]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],a].flat():a;return r}(v.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,a.Z)((0,a.Z)({},t),{},{slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[v]}]}):(0,a.Z)((0,a.Z)({},t),{},{slots:void 0,children:[v]})}(K,t,oe,J,n)),ue.portal&&(oe.slotId=void 0),W?(delete(ce=(0,a.Z)({},k)).forEachItem,delete ce.forEachIndex):ce=k;var de=function(){var e=(0,o.Z)((function*(){var e=gn(ue.children,ue.slots);if(e){var t=new Set,r=yield Promise.all(Object.entries(e).map(((e,r)=>{var[s,l]=e;return"routes"!==l.type?ln(oe,l.bricks,ce,n,i,s,f):(k.flags["incremental-sub-route-rendering"]&&(t.add(r),n.performIncrementalRender(function(){var e=(0,o.Z)((function*(e){var{homepage:t}=ce.app,{pathname:r}=e;if(!y(t,r)||!i.every((e=>Vt(e,t,r))))return!1;var o,[c,u,d]=hn((0,a.Z)((0,a.Z)({},ce),{},{location:e,query:new URLSearchParams(e.search)})),p=!1,f=[];try{if(!(o=yield on(oe,l.routes,c,n,i,s,!0)).route)return!1;if(n.reBailout(o))return!0;f=[...u,...d],yield vn(o,c,[c.ctxStore,...f]),yield n.reMergeMenuRequests(l.routes,o.route,o.menuRequests)}catch(e){console.error("Incremental sub-router failed:",e);var v=n.reCatch(e,oe);if(!v)return!0;({failed:p,output:o}=v),yield n.reMergeMenuRequests(l.routes,o.route,o.menuRequests)}if(n.reRender(s,[],o.node,oe),!p)for(var h of(c.ctxStore.mountAsyncData(o.route),f))h.mountAsyncData();return!0}));return function(t){return e.apply(this,arguments)}}())),on(oe,l.routes,ce,n,i,s))}))),l=(0,a.Z)((0,a.Z)({},v),{},{node:void 0,blockingList:[],menuRequests:[]});r.forEach(((e,r)=>{t.has(r)&&n.memoize(s,[],e.node,oe),mn(l,e)})),l.node&&(oe.child=l.node),mn(v,(0,a.Z)((0,a.Z)({},l),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return se.push(de()),yield Promise.all(se),v})),dn.apply(this,arguments)}function pn(){return(pn=(0,o.Z)((function*(e,t,r,n,o,i,s,l,c){var u={blockingList:[],menuRequests:[]},d=t.length;return(yield Promise.all(t.map(((t,u)=>Promise.all(r.map(((r,p)=>un(e,r,(0,a.Z)((0,a.Z)({},n),{},{forEachItem:t,forEachIndex:u}),o,i,s,c.concat(u*d+p),l&&new Map(l))))))))).flat().forEach(((t,r)=>{t.hasTrackingControls&&o.memoize(s,c.concat(r),t.node,e),mn(u,t)})),u}))).apply(this,arguments)}function fn(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function vn(e,t,r){return(0,u.flushStableLoadBricks)(),Promise.all([...e.blockingList,...r.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function hn(e){var t=[],r=[];return[(0,a.Z)((0,a.Z)({},e),{},{tplStateStoreScope:t,formStateStoreScope:r}),t,r]}function mn(e,t){var{blockingList:r,node:n,menuRequests:a,hasTrackingControls:o}=t,i=(0,h.Z)(t,en);if(e.blockingList.push(...r),e.menuRequests.push(...a),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function gn(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var a,o=null!==(a=n.slot)&&void 0!==a?a:"";(0,d.hasOwnProperty)(r,o)||(r[o]={type:"bricks",bricks:[]}),r[o].bricks.push(n)}return r}function yn(e,t,r,n){return"silent"===n?e.catch((e=>{console.error("Load ".concat(t,' "').concat(r,'" failed:'),e)})):e}function bn(e){var t,{ref:r,runtimeContext:n,element:a}=e;if(r&&n.tplStateStoreId){var{hostBrick:o}=_e(n,"bindTemplateProxy"),i=o.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var l=function(e){if(u.ref===r){var t,n,i,s=t=>{t.bubbles&&t.stopPropagation(),o.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(t=u.refEvent)&&void 0!==t?t:e;a.addEventListener(l,s),null!==(i=(n=a).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),a.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function wn(e){var{ref:t,runtimeContext:r,element:n}=e;if(null!=r&&r.tplStateStoreId&&t){var{hostBrick:a}=_e(r,"unbindTemplateProxy"),o=a.tplHostMetadata;for(var[i,s]of(o.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function Sn(e){e.replaceChildren()}function En(e,t){for(var r=e.child,n=[];r;){var a,o=r.type;o.includes("-")&&!customElements.get(o)&&console.error("Undefined custom element: ".concat(o)),"basic-bricks.script-brick"===o&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var i=t&&r===e.child?t:document.createElement(o);if(r.element=i,r.slotId&&i.setAttribute("slot",r.slotId),r.iid&&(i.dataset.iid=r.iid),null!==(a=r.tplHostMetadata)&&void 0!==a&&a.tplStateStoreId&&(i.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),xt(i,r.properties),pr(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=_e({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),bn(r),r.portal?n.push(i):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(i)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var s,l=r.return;l;){var c;if(l.childElements)l.tag===qr.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===qr.ROOT&&n.length>0&&("function"==typeof l.createPortal?l.createPortal():l.createPortal).append(...n),l.sibling)break;l=l.return}r=null===(s=l)||void 0===s?void 0:s.sibling}}}var kn,Zn,In=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],An=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],Cn=new WeakMap,Tn=new WeakMap,Rn=new WeakMap,On=new WeakMap,Pn=new WeakMap,_n=new WeakMap,Mn=new WeakMap,xn=new WeakMap,Bn=new WeakMap,Ln=new WeakSet,Un=new WeakSet,Nn=new WeakSet,Fn=new WeakSet;class $n{constructor(e,t){var r;(0,A.Z)(this,Fn),(0,A.Z)(this,Nn),(0,A.Z)(this,Un),(0,A.Z)(this,Ln),(0,Qt.Z)(this,"scope",void 0),(0,Qt.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,Cn,{writable:!0,value:void 0}),(0,i.Z)(this,Tn,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}}),(0,i.Z)(this,Rn,{writable:!0,value:new Map}),(0,i.Z)(this,On,{writable:!0,value:void 0}),(0,i.Z)(this,Pn,{writable:!0,value:new Map}),(0,i.Z)(this,_n,{writable:!0,value:void 0}),(0,i.Z)(this,Mn,{writable:!0,value:void 0}),(0,i.Z)(this,xn,{writable:!0,value:void 0}),(0,i.Z)(this,Bn,{writable:!0,value:[]}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw",(0,s.Z)(this,Cn,null==t?void 0:t.routeHelper)}setInitialMenuRequests(e){(0,s.Z)(this,Mn,e)}memoizeMenuRequests(e,t){(0,l.Z)(this,xn)||(0,s.Z)(this,xn,new WeakMap),(0,l.Z)(this,xn).set(e,t[0])}reMergeMenuRequests(e,t,r){var n=this;return(0,o.Z)((function*(){var a,o;for(var i of e)if(a=(0,l.Z)(n,xn).get(i)){o=i;break}var s=(0,l.Z)(n,Mn),c=a?s.indexOf(a):-1;if(-1===c){if(!r.length)return;s.push(...r)}else s.splice(c,s.length-c,...r);o&&o!==t&&(0,l.Z)(n,xn).delete(o),yield(0,l.Z)(n,Cn).mergeMenus(s)}))()}reBailout(e){return(0,l.Z)(this,Cn).bailout(e)}reCatch(e,t){return(0,l.Z)(this,Cn).catch(e,t)}didPerformIncrementalRender(e){var t=this;return(0,o.Z)((function*(){return(yield Promise.all((0,l.Z)(t,Bn).map((t=>t(e))))).some((e=>e))}))()}performIncrementalRender(e){(0,l.Z)(this,Bn).push(e)}registerBrickLifeCycle(e,t){if(t){var r=[...In,..."page"===this.scope?An:[]];for(var n of r){var a=t[n];a&&(0,l.Z)(this,Tn)[n].push({brick:e,handlers:a})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,l.Z)(this,Pn).get(e);r?r.add(t):(0,l.Z)(this,Pn).set(e,new Set([t]))}memoize(e,t,r,n){(0,l.Z)(this,_n)||(0,s.Z)(this,_n,new WeakMap);var a=[null!=e?e:"",...t].join("."),o=(0,l.Z)(this,_n).get(n);o||(o=new Map,(0,l.Z)(this,_n).set(n,o)),o.set(a,{node:r,last:Vn(r),lastNormal:Hn(r),lastPortal:zn(r)})}reRender(e,t,r,n){var a,o,i,s,c,u=[null!=e?e:"",...t].join("."),d=(0,l.Z)(this,_n).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(a=null==v||null===(o=v.element)||void 0===o?void 0:o.nextSibling)&&void 0!==a?a:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=Vn(r);d.node=r,d.last=y,d.lastNormal=Hn(r),d.lastPortal=zn(r);for(var b=n.child;b&&b!==f;){if(b.sibling===p){c=b;break}b=b.sibling}var w=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:qr.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=qn(p,f);for((0,C.Z)(this,Ln,jn).call(this,I),En(E),c?c.sibling=r:n.child=r,y&&(y.sibling=null==f?void 0:f.sibling),b=r;b;)b.return=n,b=b.sibling;if(n.tag===qr.ROOT?null===(k=n.container)||void 0===k||k.insertBefore(w,m):null===(Z=n.element)||void 0===Z||Z.insertBefore(w,m),S.childNodes.length>0){for(var A,T=r;T&&T.return;)T=T.return;if((null===(A=T)||void 0===A?void 0:A.tag)!==qr.ROOT)throw new Error("Cannot find render root node");("function"==typeof T.createPortal?T.createPortal():T.createPortal).insertBefore(S,g)}var R=qn(r,y);(0,C.Z)(this,Un,Kn).call(this,R)}dispose(){for(var e of Object.values((0,l.Z)(this,Tn)))e.length=0;for(var t of(0,l.Z)(this,Rn).values()){for(var r of t)r.disconnect();t.length=0}(0,l.Z)(this,Rn).clear(),(0,l.Z)(this,On)&&(Se.removeEventListener("change",(0,l.Z)(this,On)),(0,s.Z)(this,On,void 0)),(0,s.Z)(this,_n,void 0),(0,s.Z)(this,Mn,void 0),(0,s.Z)(this,xn,void 0),(0,l.Z)(this,Pn).clear(),(0,l.Z)(this,Bn).length=0}dispatchBeforePageLoad(){(0,C.Z)(this,Nn,Dn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,C.Z)(this,Nn,Dn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,C.Z)(this,Nn,Dn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,C.Z)(this,Nn,Dn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=I().location;e&&"#"!==e?(0,C.Z)(this,Nn,Dn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,C.Z)(this,Nn,Dn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,l.Z)(this,Tn).onScrollIntoView)(0,C.Z)(this,Fn,Wn).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,On,(e=>{(0,C.Z)(this,Nn,Dn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:z(e.detail)}))})),Se.addEventListener("change",(0,l.Z)(this,On))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==Ia||null===(r=Ia.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{gr(t.handlers,e.runtimeContext,e)(new CustomEvent("message.push",{detail:r}))}))};for(var r of[].concat(n))t(r)};for(var{brick:r,handlers:n}of(0,l.Z)(this,Tn).onMessage)t(r);null==Ia||null===(e=Ia.messageDispatcher)||void 0===e||e.onClose((()=>{(0,C.Z)(this,Nn,Dn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,C.Z)(this,Nn,Dn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,C.Z)(this,Nn,Dn).call(this,"onUnmount",new CustomEvent("unmount"))}}function jn(e){var t=[...In,..."page"===this.scope?An:[]],r=[];for(var n of t){var a=(0,m.remove)((0,l.Z)(this,Tn)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...a)}for(var o of e){var i,s,c=(0,l.Z)(this,Rn).get(o);if(null!=c&&c.length){for(var u of c)u.disconnect();c.length=0,(0,l.Z)(this,Rn).delete(o)}wn(o),null===(i=o.element)||void 0===i||delete i.$$tplStateStore,null===(s=o.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)gr(f,p.runtimeContext,p)(d)}function Kn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,l.Z)(this,Tn).onMount)e.has(r)&&gr(n,r.runtimeContext,r)(t);for(var{brick:a,handlers:o}of(0,l.Z)(this,Tn).onScrollIntoView)e.has(a)&&(0,C.Z)(this,Fn,Wn).call(this,a,o)}function Dn(e,t){for(var{brick:r,handlers:n}of(0,l.Z)(this,Tn)[e])gr(n,r.runtimeContext,r)(t);var a=(0,l.Z)(this,Pn).get(e);if(a)for(var o of a)o()}function Wn(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,a=new IntersectionObserver(((r,a)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(gr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),a.disconnect())}))}),{threshold:n});a.observe(e.element);var o=(0,l.Z)(this,Rn).get(e);o||(o=[],(0,l.Z)(this,Rn).set(e,o)),o.push(a)}function Vn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function Hn(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function zn(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,a=r.return;a&&!a.sibling;)a=a.return;r=null===(n=a)||void 0===n?void 0:n.sibling}return t}function qn(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&o!==t&&!o.sibling;)o=o.return;if(o===t)break;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}function Gn(){if(!kn){if(kn={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){kn.isInIframe=!0;try{if(window.origin===window.parent.origin){kn.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");kn.isInIframeOfNext=0==(Number(e)^Number(r)),kn.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),kn.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(kn)}return kn}function Jn(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var a=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Pe.define(a,n)}}}function Qn(){return Qn=(0,o.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Yn.apply(this,arguments)}(e)),e.$$fulfilling})),Qn.apply(this,arguments)}function Yn(){return(Yn=(0,o.Z)((function*(e){var t;yield null==Ia||null===(t=Ia.fulfilStoryboard)||void 0===t?void 0:t.call(Ia,e),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Xn=new WeakMap,ea=new WeakMap,ta=new WeakMap,ra=new WeakMap,na=new WeakMap,aa=new WeakMap,oa=new WeakMap,ia=new WeakMap,sa=new WeakMap,la=new WeakMap,ca=new WeakMap,ua=new WeakMap,da=new WeakSet,pa=new WeakSet,fa=new WeakSet,va=new WeakSet;class ha{constructor(e){(0,A.Z)(this,va),(0,A.Z)(this,fa),(0,A.Z)(this,pa),(0,A.Z)(this,da),(0,i.Z)(this,Xn,{writable:!0,value:void 0}),(0,i.Z)(this,ea,{writable:!0,value:!1}),(0,i.Z)(this,ta,{writable:!0,value:void 0}),(0,i.Z)(this,ra,{writable:!0,value:void 0}),(0,i.Z)(this,na,{writable:!0,value:void 0}),(0,i.Z)(this,aa,{writable:!0,value:void 0}),(0,i.Z)(this,oa,{writable:!0,value:new Set}),(0,i.Z)(this,ia,{writable:!0,value:0}),(0,i.Z)(this,sa,{writable:!0,value:void 0}),(0,i.Z)(this,la,{writable:!0,value:void 0}),(0,i.Z)(this,ca,{writable:!0,value:void 0}),(0,i.Z)(this,ua,{writable:!0,value:void 0}),(0,s.Z)(this,Xn,e);var t=I();window.addEventListener("beforeunload",(e=>{(0,C.Z)(this,da,ma).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,C.Z)(this,da,ma).call(this,{location:e,action:t})))}getRenderId(){return(0,l.Z)(this,sa)}getRuntimeContext(){return(0,l.Z)(this,na)}getRecentApps(){return{currentApp:(0,l.Z)(this,la),previousApp:(0,l.Z)(this,ca)}}getNavConfig(){return(0,l.Z)(this,ua)}bootstrap(){var e=this;window.AbortController&&(Zn=new AbortController,T.http.interceptors.request.use((e=>{var t;return(0,a.Z)((0,a.Z)({},e),{},{options:(0,a.Z)((0,a.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:Zn.signal})})})));var t=I();(0,s.Z)(this,ta,t.location);var r=0;return t.listen(function(){var t=(0,o.Z)((function*(t,n){var o,i,c,u,d,p=++r,v={hash:void 0,state:void 0};if(void 0!==t.key&&("POP"!==n||void 0!==(0,l.Z)(e,ta).key&&!1!==(null===(o=(0,l.Z)(e,ta).state)||void 0===o?void 0:o.notify))||(v.key=void 0),((0,f.locationsAreEqual)((0,a.Z)((0,a.Z)({},(0,l.Z)(e,ta)),v),(0,a.Z)((0,a.Z)({},t),v))||"POP"!==n&&!1===(null===(i=t.state)||void 0===i?void 0:i.notify))&&(u=!0),u||(u=yield null===(d=(0,l.Z)(e,aa))||void 0===d?void 0:d.didPerformIncrementalRender(t)),r===p)if(u)(0,s.Z)(e,ta,t);else{if(Zn&&(Zn.abort(),Zn=new AbortController),(0,s.Z)(e,ta,t),null===(c=(0,l.Z)(e,aa))||void 0===c||c.dispatchPageLeave(),"POP"===n&&b(g((0,l.Z)(e,Xn),t.pathname)))return void window.location.reload();(0,l.Z)(e,ea)?(0,s.Z)(e,ra,t):(0,C.Z)(e,fa,ya).call(e,t).catch(ur)}}));return function(e,r){return t.apply(this,arguments)}}()),(0,C.Z)(this,fa,ya).call(this,t.location)}}function ma(e){var t,r=I(),n=r.getBlockMessage();null===(t=(0,l.Z)(this,aa))||void 0===t||t.dispatchBeforePageLeave(e);var a=r.getBlockMessage();return!n&&a&&r.unblock(),a}function ga(e,t,r){var n,a;if((0,s.Z)(this,ia,(n=(0,l.Z)(this,ia),a=n++,n)),a>10){var o='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(o)}I().replace(e,t)}function ya(e){return ba.apply(this,arguments)}function ba(){return(ba=(0,o.Z)((function*(e){(0,s.Z)(this,ea,!0);try{yield(0,C.Z)(this,va,wa).call(this,e)}finally{if((0,s.Z)(this,ea,!1),(0,l.Z)(this,ra)){var t=(0,l.Z)(this,ra);(0,s.Z)(this,ra,void 0),yield(0,C.Z)(this,fa,ya).call(this,t)}}}))).apply(this,arguments)}function wa(e){return Sa.apply(this,arguments)}function Sa(){return Sa=(0,o.Z)((function*(e){var t,r,n=this;(0,s.Z)(this,sa,(0,m.uniqueId)("render-id-1")),Ye=new WeakSet,tt.clear(),null==Ia||null===(t=Ia.flowApi)||void 0===t||t.clearCollectWidgetContract(),I().unblock();var i=performance.now(),c=g((0,l.Z)(this,Xn),e.pathname),u=null===(r=(0,l.Z)(this,na))||void 0===r?void 0:r.app;null!=c&&c.app&&(yield function(e){return Qn.apply(this,arguments)}(c));var d,p=(0,s.Z)(this,la,null==c?void 0:c.app),f=u&&p?u.id!==p.id:u!==p,v=Ta().getFeatureFlags(),h=(0,l.Z)(this,aa),y=(t,r)=>{(0,l.Z)(this,oa).add(h),(0,C.Z)(this,pa,ga).call(this,t,r,e)},b=()=>{var t=v["sso-enabled"]?"/sso-auth/login":"/auth/login";y(t,{from:e})},w=document.querySelector("#main-mount-point"),S=document.querySelector("#portal-mount-point"),E={tag:qr.ROOT,container:w,createPortal:S},k=()=>{var e;for(var t of(Sn(w),Sn(S),(0,l.Z)(this,oa).add(h),(0,l.Z)(this,oa)))t&&(t.dispatchOnUnmount(),t.dispose());(0,l.Z)(this,oa).clear(),null==Ia||null===(e=Ia.messageDispatcher)||void 0===e||e.reset(),f&&((0,s.Z)(this,ca,u),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:u,currentApp:p}})))};if(Y(p&&(ne()[p.id]||p.theme)||"light"),oe("default"),p){var Z,A,R,O,P,_;null==Ia||null===(Z=Ia.checkInstalledApps)||void 0===Z||Z.preCheckInstalledApps(c,(e=>!!La(e)));var M={bailout:e=>e.unauthenticated?(b(),!0):e.redirect?(y(e.redirect.path,e.redirect.state),!0):void(0,s.Z)(this,ia,0),mergeMenus:(d=(0,o.Z)((function*(e){var t=yield Promise.all(e);(0,s.Z)(n,ua,function(e){var t={breadcrumb:[]};for(var r of e){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(t))})),function(e){return d.apply(this,arguments)}),catch:(t,r)=>{if(!ir(t)||window.NO_AUTH_GUARD){if(!(t instanceof T.HttpAbortError)){var n=Ta().getMiscSettings().noAuthGuardLoginPath;return ir(t)&&n?void y(n,{from:e}):{failed:!0,output:{node:{tag:qr.BRICK,type:"div",properties:{textContent:or(t)},runtimeContext:null,return:r},blockingList:[],menuRequests:[]}}}(0,l.Z)(this,oa).add(h)}else b()}},x=(0,s.Z)(this,aa,new $n("page",{routeHelper:M})),B=(0,s.Z)(this,na,{app:p,location:e,query:new URLSearchParams(e.search),flags:v,sys:(0,a.Z)((0,a.Z)((0,a.Z)({},null==Ia||null===(A=Ia.auth)||void 0===A?void 0:A.getAuth()),Gn()),{},{settings:{brand:Ta().getBrandSettings()}}),ctxStore:new Nr("CTX",void 0,x),pendingPermissionsPreCheck:[null==Ia||null===(R=Ia.checkPermissions)||void 0===R?void 0:R.preCheckPermissions(c)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,s.Z)(this,ua,void 0),Jn(c),he(null===(O=c.meta)||void 0===O?void 0:O.functions,p),null==Ia||null===(P=Ia.flowApi)||void 0===P||P.collectContract(null===(_=c.meta)||void 0===_?void 0:_.contracts);var L,U=!1,N=[];try{if(L=yield on(E,function(e){if(window.parent===window)return e;var t=e,r=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/template-preview/")));t=[...t.slice(0,r+1),{path:"${APP.homepage}/_dev_only_/template-preview/:templateId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(r+1)];var n=(0,m.findLastIndex)(t,(e=>e.path.startsWith("${APP.homepage}/_dev_only_/snippet-preview/")));return[...t.slice(0,n+1),{path:"${APP.homepage}/_dev_only_/snippet-preview/:snippetId",bricks:[{brick:"span"}],menu:!1,exact:!0},...t.slice(n+1)]}(c.routes),B,x,[]),M.bailout(L))return;N=fn(B),yield vn(L,B,N),yield M.mergeMenus(L.menuRequests),x.setInitialMenuRequests(L.menuRequests)}catch(e){console.error("Router failed:",e);var F=M.catch(e,E);if(!F)return;({failed:U,output:L}=F)}if(E.child=L.node,k(),L.route&&"routes"!==L.route.type||U){if(U||x.dispatchBeforePageLoad(),te(),se(),En(E),window.scrollTo(0,0),!U)for(var $ of(x.dispatchPageLoad(),x.dispatchAnchorLoad(),x.dispatchOnMount(),x.initializeScrollIntoView(),x.initializeMediaChange(),x.initializeMessageDispatcher(),N))$.mountAsyncData();var j=performance.now()-i;return void window.dispatchEvent(new CustomEvent("route.render",{detail:{renderTime:j}}))}}else{if(!window.NO_AUTH_GUARD&&null!=Ia&&Ia.auth&&!Ia.auth.isLoggedIn())return void b();k()}te(),se();var K={tag:qr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:E};E.child=K,En(E),window.scrollTo(0,0)})),Sa.apply(this,arguments)}var Ea,ka,Za,Ia,Aa="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function Ca(e){if(Ea)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===$){var r=t.payload;switch(null==r?void 0:r.type){case j:D=r.active;break;case K:F=r.panel}}})),Ia=null==e?void 0:e.hooks,(0,c.initializeI18n)(rr,nr),p.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{p.locale(c.i18n.language)})),Z(),Ea=new Pa}function Ta(){return Ea}var Ra=new WeakMap,Oa=new WeakMap;class Pa{constructor(){(0,i.Z)(this,Ra,{writable:!0,value:!1}),(0,i.Z)(this,Oa,{writable:!0,value:!1})}initialize(e){var t,r;if((0,l.Z)(this,Ra))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,Ra,!0),function(e){if(Array.isArray(e.storyboards)){var t=function(){if(r.locales){var e="tmp/".concat(r.id);Object.entries(r.locales).forEach((t=>{var[r,n]=t;c.i18n.addResourceBundle(r,e,n)})),r.localeName=c.i18n.getFixedT(null,e)("name",r.name),Object.keys(r.locales).forEach((t=>{c.i18n.removeResourceBundle(t,e)}))}else r.localeName=r.name};for(var{app:r}of e.storyboards)t()}(0,d.isObject)(e.settings)&&(0,d.deepFreeze)(e.settings),e.brickPackages&&(0,d.deepFreeze)(e.brickPackages)}(e),ka=e;var n,{notification:a,dialog:o}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==a&&(n=null!=a?a:"basic.show-notification",(0,this.loadBricks)([n]).then((()=>{lr=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==o&&function(e,t){t([e]).then((()=>{Ht=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=o?o:"basic.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,o.Z)((function*(){if(e&&t.initialize(e),(0,l.Z)(t,Oa))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,Oa,!0),Za=new ha(ka.storyboards),yield Za.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=Za)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=Za)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return ze(e,t)}getFeatureFlags(){var e,t;return(0,a.Z)((0,a.Z)((0,a.Z)({},null===(e=ka)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=Za)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t;return(0,a.Z)((0,a.Z)({},null===(e=ka)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=Za)||void 0===t||null===(t=t.getRecentApps().currentApp)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.misc)}getBrandSettings(){var e;return(0,a.Z)({base_title:"DevOps 管理专家"},null===(e=ka)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand)}getLaunchpadSettings(){var e;return(0,a.Z)({columns:7,rows:4},null===(e=ka)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=ka)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=ka)||void 0===t?void 0:t.siteSort)&&void 0!==e?e:[]}toggleLaunchpadEffect(e){document.body.classList.toggle("launchpad-open",e)}applyPageTitle(e){var t=this.getBrandSettings().base_title;document.title=e?"".concat(e," - ").concat(t):t}getNavConfig(){var e;return null===(e=Za)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,_a())}}function _a(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=null===(n=ka)||void 0===n?void 0:n.brickPackages)&&void 0!==r?r:Aa)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function Ma(){var e;return null===(e=Za)||void 0===e?void 0:e.getRenderId()}function xa(){var e;return null===(e=Za)||void 0===e?void 0:e.getRuntimeContext()}function Ba(e){var t;return null===(t=ka)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function La(e){var t;return null===(t=Ba(e))||void 0===t?void 0:t.app}function Ua(){for(var e,t,r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];null==Ia||null===(e=Ia.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function Na(){var e;return null==Ia||null===(e=Ia.auth)||void 0===e?void 0:e.getAuth()}function Fa(){var e,t;return null==Ia||null===(e=Ia.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function $a(){var e;return null==Ia||null===(e=Ia.auth)||void 0===e?void 0:e.isLoggedIn()}function ja(e,t,r){return Ka.apply(this,arguments)}function Ka(){return(Ka=(0,o.Z)((function*(e,t,r){return at(yield Je(e),e,"resolve",t,r)}))).apply(this,arguments)}function Da(e){var t,{portal:r,scope:n="fragment",unknownBricks:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;t=r||(()=>((i=document.createElement("div")).style.position="absolute",i.style.width=i.style.height="0",document.body.append(i),i));var s,l,c=!1;return{render(r){var u=arguments;return(0,o.Z)((function*(){var{theme:o,context:d,functions:p,templates:f,i18n:v}=u.length>1&&void 0!==u[1]?u[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var h=[].concat(r),m=s;s=new $n(n,{unknownBricks:a});var g={ctxStore:new Nr("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},y={tag:qr.ROOT,container:e,createPortal:t};if("page"===n){var b;Y(null!=o?o:"light"),oe("default");var w={id:"demo",homepage:"/demo"};g.app=w;var S={app:w,meta:{i18n:v,customTemplates:f}};null===(b=l)||void 0===b||b(),l=B(S),Jn(S),he(p,w)}g.ctxStore.define(d,g);var E,k=!1,Z=[];try{E=yield ln(y,h,g,s,[]),Z=fn(g),yield vn(E,g,Z)}catch(e){k=!0,E={node:{tag:qr.BRICK,type:"div",properties:{textContent:or(e)},return:y,runtimeContext:null},blockingList:[],menuRequests:[]}}if(y.child=E.node,null==m||m.dispatchOnUnmount(),null==m||m.dispose(),Sn(e),i&&Sn(i),"page"===n&&(k||s.dispatchBeforePageLoad(),te(),se()),En(y),"page"===n&&window.scrollTo(0,0),!k){for(var I of Z)I.mountAsyncData();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,Sn(e),i&&(Sn(i),r||i.remove()))}}}function Wa(e,t){return Va.apply(this,arguments)}function Va(){return(Va=(0,o.Z)((function*(e,t){var r,n,o,[i,s,l]=hn((0,a.Z)((0,a.Z)({},xa()),{},{data:t,pendingPermissionsPreCheck:[]}));null!==(r=i.tplStateStoreMap)&&void 0!==r||(i.tplStateStoreMap=new Map),null!==(n=i.formStateStoreMap)&&void 0!==n||(i.formStateStoreMap=new Map);var c=new $n("fragment"),u={tag:qr.ROOT,createPortal:null},d=e.transform,p=Ce();d&&Te(p,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var f=yield un(u,p?e:(0,a.Z)((0,a.Z)({},e),{},{properties:(0,a.Z)((0,a.Z)({},e.properties),d)}),i,c,[]),v=[...s,...l];if(yield vn(f,i,v),null!==(o=f.node)&&void 0!==o&&o.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return u.child=f.node,{tagName:f.node?f.node.type:null,renderRoot:u,rendererContext:c,scopedStores:v}}))).apply(this,arguments)}function Ha(e,t){var r,{renderRoot:n,rendererContext:a,scopedStores:o}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},En(n,t),a.dispatchOnMount(),a.initializeScrollIntoView(),a.initializeMediaChange(),a.initializeMessageDispatcher(),o))i.mountAsyncData();return{portal:r}}function za(e,t){var{rendererContext:r}=e;t.portal&&(Sn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function qa(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return wt(t,(0,a.Z)((0,a.Z)({},xa()),{},{data:e}),{noInject:!0})}function Ga(e,t){var r=Ba(e);Object.assign(r,(0,a.Z)((0,a.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),B(r)}function Ja(e,t){var r=Ba(e),n=!1,a=e=>"".concat(e.path,".").concat(e.exact),o=(e,r)=>e.map((e=>{var i=a(e);return"routes"===e.type?(e.routes=o(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=o(r.routes,a(t)),n||r.routes.unshift(t)}function Qa(e,t,r){var n="".concat(e,".").concat(t.name);Pe.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Ya(e,t.name,r)}function Ya(e,t,r){ro(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,a.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Xa(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function eo(e,t){var r;ro(e,Xa(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}],t.context)}var to=eo;function ro(e,t,r,n){var{routes:a}=Ba(e),o=a.findIndex((e=>e.path===t)),i={path:t,bricks:r,context:n,menu:!1,exact:!0};-1===o?a.unshift(i):a.splice(o,1,i)}function no(e,t){var{tplStateStoreId:r}=t,n=xa();return r?_e((0,a.Z)((0,a.Z)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function ao(e){var{tplStateStoreId:t}=e,r=xa();return t?_e((0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function oo(e){return _a().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function io(){return Ma()}function so(e,t){return lo.apply(this,arguments)}function lo(){return(lo=(0,o.Z)((function*(e,t){var r,{appId:n,updateStoryboardType:a,provider:o}=t,i=Ba(n);if("route"===a)r={routes:[e]};else if("template"===a)r={meta:{customTemplates:[e]}};else if("snippet"===a){var s,l=Xa(e.snippetId);r={routes:[null==i||null===(s=i.routes)||void 0===s?void 0:s.find((e=>e.path===l))]}}var c=[];if(r&&o){yield(0,u.loadBricksImperatively)([o],_a());var d=document.createElement(o);(yield d.resolve(r)).forEach((e=>{var t,[r,n,a]=e.match(/(.*)@(.*):\d\.\d\.\d/);null!=i&&null!==(t=i.meta)&&void 0!==t&&null!==(t=t.contracts)&&void 0!==t&&t.some((e=>e.namespaceId===n&&e.name===a))||c.push(e)}))}return c}))).apply(this,arguments)}}}]);
2
+ //# sourceMappingURL=7782.f0eb0fd7.js.map