@next-bricks/data-view 0.15.7 → 0.15.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +3 -3
- package/dist/chunks/{1646.00f8ddfc.js → 1646.800c5e56.js} +2 -2
- package/dist/chunks/{7746.66872fcf.js.map → 1646.800c5e56.js.map} +1 -1
- package/dist/chunks/1874.a273dacc.js +2 -0
- package/dist/chunks/1874.a273dacc.js.map +1 -0
- package/dist/chunks/{2502.f7f556e2.js → 2502.d12fe43c.js} +2 -2
- package/dist/chunks/2502.d12fe43c.js.map +1 -0
- package/dist/chunks/3458.3f529505.js +2 -0
- package/dist/chunks/{3458.49e46648.js.map → 3458.3f529505.js.map} +1 -1
- package/dist/chunks/{4049.06228157.js → 4049.f3c6fa2c.js} +2 -2
- package/dist/chunks/4049.f3c6fa2c.js.map +1 -0
- package/dist/chunks/443.5c72124e.js +2 -0
- package/dist/chunks/443.5c72124e.js.map +1 -0
- package/dist/chunks/4991.165874d4.js +2 -0
- package/dist/chunks/4991.165874d4.js.map +1 -0
- package/dist/chunks/5114.f11910ec.js +2 -0
- package/dist/chunks/{5114.b49c7ffd.js.map → 5114.f11910ec.js.map} +1 -1
- package/dist/chunks/{5151.1c92f05d.js → 5151.5b1df597.js} +2 -2
- package/dist/chunks/5151.5b1df597.js.map +1 -0
- package/dist/chunks/5202.ff1675ae.js.map +1 -1
- package/dist/chunks/{5381.926a90e0.js → 5381.67057e34.js} +2 -2
- package/dist/chunks/{5381.926a90e0.js.map → 5381.67057e34.js.map} +1 -1
- package/dist/chunks/{5636.8046938c.js → 5636.e0080dc9.js} +2 -2
- package/dist/chunks/{5636.8046938c.js.map → 5636.e0080dc9.js.map} +1 -1
- package/dist/chunks/{5725.4e31534a.js → 5725.a33cc67f.js} +2 -2
- package/dist/chunks/{5725.4e31534a.js.map → 5725.a33cc67f.js.map} +1 -1
- package/dist/chunks/6205.e0ca5723.js +2 -0
- package/dist/chunks/{6205.fe7ef46f.js.map → 6205.e0ca5723.js.map} +1 -1
- package/dist/chunks/6301.d76aa7db.js +2 -0
- package/dist/chunks/6301.d76aa7db.js.map +1 -0
- package/dist/chunks/{6473.5bb88c66.js → 6473.033bb65d.js} +2 -2
- package/dist/chunks/{6473.5bb88c66.js.map → 6473.033bb65d.js.map} +1 -1
- package/dist/chunks/{6660.e3a0fca8.js → 6660.35d15a5a.js} +2 -2
- package/dist/chunks/{6660.e3a0fca8.js.map → 6660.35d15a5a.js.map} +1 -1
- package/dist/chunks/7164.d5fa73ec.js +2 -0
- package/dist/chunks/{7164.5ceba161.js.map → 7164.d5fa73ec.js.map} +1 -1
- package/dist/chunks/{7672.87ae5be6.js → 7672.2c894e14.js} +2 -2
- package/dist/chunks/{7672.87ae5be6.js.map → 7672.2c894e14.js.map} +1 -1
- package/dist/chunks/{7746.66872fcf.js → 7746.c5074280.js} +2 -2
- package/dist/chunks/{1646.00f8ddfc.js.map → 7746.c5074280.js.map} +1 -1
- package/dist/chunks/7782.2a51fa60.js +2 -0
- package/dist/chunks/7782.2a51fa60.js.map +1 -0
- package/dist/chunks/8498.8821e938.js.map +1 -1
- package/dist/chunks/8588.38b4d80c.js +2 -0
- package/dist/chunks/8588.38b4d80c.js.map +1 -0
- package/dist/chunks/8691.fa598c6a.js +2 -0
- package/dist/chunks/{8691.1f6ac1b8.js.map → 8691.fa598c6a.js.map} +1 -1
- package/dist/chunks/9549.223583b0.js.map +1 -1
- package/dist/chunks/app-wall-card-item.66073883.js +3 -0
- package/dist/chunks/app-wall-card-item.66073883.js.map +1 -0
- package/dist/chunks/app-wall-relation-line.b465193b.js +3 -0
- package/dist/chunks/app-wall-relation-line.b465193b.js.map +1 -0
- package/dist/chunks/app-wall-system-card.0f4c459b.js +2 -0
- package/dist/chunks/app-wall-system-card.0f4c459b.js.map +1 -0
- package/dist/chunks/app-wall.97e70d76.js +2 -0
- package/dist/chunks/app-wall.97e70d76.js.map +1 -0
- package/dist/chunks/battery-chart.83bdf03f.js +2 -0
- package/dist/chunks/battery-chart.83bdf03f.js.map +1 -0
- package/dist/chunks/brick-notification.c5b64b84.js +2 -0
- package/dist/chunks/brick-notification.c5b64b84.js.map +1 -0
- package/dist/chunks/cabinet-app-layer.2497f75d.js +3 -0
- package/dist/chunks/cabinet-app-layer.2497f75d.js.map +1 -0
- package/dist/chunks/cabinet-button.b7c691c4.js +2 -0
- package/dist/chunks/cabinet-button.b7c691c4.js.map +1 -0
- package/dist/chunks/cabinet-container.c7fedd36.js +3 -0
- package/dist/chunks/cabinet-container.c7fedd36.js.map +1 -0
- package/dist/chunks/cabinet-graph.c542ef6e.js +2 -0
- package/dist/chunks/cabinet-graph.c542ef6e.js.map +1 -0
- package/dist/chunks/cabinet-node.4cfbd18d.js +3 -0
- package/dist/chunks/cabinet-node.4cfbd18d.js.map +1 -0
- package/dist/chunks/cabinet-thumbnail.7d897c3a.js +3 -0
- package/dist/chunks/cabinet-thumbnail.7d897c3a.js.map +1 -0
- package/dist/chunks/complex-search.a31b8d52.js +2 -0
- package/dist/chunks/complex-search.a31b8d52.js.map +1 -0
- package/dist/chunks/dropdown-menu.5f4a483a.js +3 -0
- package/dist/chunks/dropdown-menu.5f4a483a.js.map +1 -0
- package/dist/chunks/gauge-chart.a350ab36.js +2 -0
- package/dist/chunks/gauge-chart.a350ab36.js.map +1 -0
- package/dist/chunks/gear-background.234ee2d9.js +2 -0
- package/dist/chunks/gear-background.234ee2d9.js.map +1 -0
- package/dist/chunks/graph-layout-grid.e3e65333.js +2 -0
- package/dist/chunks/graph-layout-grid.e3e65333.js.map +1 -0
- package/dist/chunks/graph-node.f706e033.js +2 -0
- package/dist/chunks/graph-node.f706e033.js.map +1 -0
- package/dist/chunks/graph-text.db252964.js +2 -0
- package/dist/chunks/graph-text.db252964.js.map +1 -0
- package/dist/chunks/grid-background.a3f86d68.js +2 -0
- package/dist/chunks/grid-background.a3f86d68.js.map +1 -0
- package/dist/chunks/hi-tech-button.60b508d3.js +2 -0
- package/dist/chunks/hi-tech-button.60b508d3.js.map +1 -0
- package/dist/chunks/lights-component-title.66d2917b.js +2 -0
- package/dist/chunks/lights-component-title.66d2917b.js.map +1 -0
- package/dist/chunks/loading-panel.3550101b.js +2 -0
- package/dist/chunks/loading-panel.3550101b.js.map +1 -0
- package/dist/chunks/main.ffd01c4c.js +2 -0
- package/dist/chunks/main.ffd01c4c.js.map +1 -0
- package/dist/chunks/modern-style-component-title.5ffd3936.js +2 -0
- package/dist/chunks/modern-style-component-title.5ffd3936.js.map +1 -0
- package/dist/chunks/modern-style-page-title.a71d5704.js +2 -0
- package/dist/chunks/modern-style-page-title.a71d5704.js.map +1 -0
- package/dist/chunks/modern-style-treemap.f604b3cc.js +3 -0
- package/dist/chunks/modern-style-treemap.f604b3cc.js.map +1 -0
- package/dist/chunks/particle-animation.5cdf0004.js +2 -0
- package/dist/chunks/particle-animation.5cdf0004.js.map +1 -0
- package/dist/chunks/radar-chart.cedd89b0.js +2 -0
- package/dist/chunks/radar-chart.cedd89b0.js.map +1 -0
- package/dist/chunks/tabs-drawer.126f7cec.js +3 -0
- package/dist/chunks/tabs-drawer.126f7cec.js.map +1 -0
- package/dist/chunks/tabs-page-title.9c6318ac.js +3 -0
- package/dist/chunks/tabs-page-title.9c6318ac.js.map +1 -0
- package/dist/chunks/tech-mesh-base-view.de782fc2.js +2 -0
- package/dist/chunks/tech-mesh-base-view.de782fc2.js.map +1 -0
- package/dist/chunks/title-text.f14ab430.js +2 -0
- package/dist/chunks/title-text.f14ab430.js.map +1 -0
- package/dist/chunks/top-title-bar.34d11dd5.js +2 -0
- package/dist/chunks/top-title-bar.34d11dd5.js.map +1 -0
- package/dist/examples.json +4 -4
- package/dist/index.73fee407.js +2 -0
- package/dist/index.73fee407.js.map +1 -0
- package/dist/manifest.json +22 -22
- package/dist/types.json +46 -46
- package/package.json +4 -4
- package/dist/chunks/1874.00bcad23.js +0 -2
- package/dist/chunks/1874.00bcad23.js.map +0 -1
- package/dist/chunks/2502.f7f556e2.js.map +0 -1
- package/dist/chunks/2618.3b734d5a.js +0 -2
- package/dist/chunks/2618.3b734d5a.js.map +0 -1
- package/dist/chunks/2754.63e58b26.js +0 -2
- package/dist/chunks/2754.63e58b26.js.map +0 -1
- package/dist/chunks/3458.49e46648.js +0 -2
- package/dist/chunks/4049.06228157.js.map +0 -1
- package/dist/chunks/4770.7549442e.js +0 -2
- package/dist/chunks/4770.7549442e.js.map +0 -1
- package/dist/chunks/4791.ff1d135f.js +0 -2
- package/dist/chunks/4791.ff1d135f.js.map +0 -1
- package/dist/chunks/5114.b49c7ffd.js +0 -2
- package/dist/chunks/5151.1c92f05d.js.map +0 -1
- package/dist/chunks/6205.fe7ef46f.js +0 -2
- package/dist/chunks/6301.901eb313.js +0 -2
- package/dist/chunks/6301.901eb313.js.map +0 -1
- package/dist/chunks/7164.5ceba161.js +0 -2
- package/dist/chunks/7782.3293aac7.js +0 -2
- package/dist/chunks/7782.3293aac7.js.map +0 -1
- package/dist/chunks/8691.1f6ac1b8.js +0 -2
- package/dist/chunks/app-wall-card-item.940bfb27.js +0 -3
- package/dist/chunks/app-wall-card-item.940bfb27.js.map +0 -1
- package/dist/chunks/app-wall-relation-line.7d23426d.js +0 -3
- package/dist/chunks/app-wall-relation-line.7d23426d.js.map +0 -1
- package/dist/chunks/app-wall-system-card.bde6830e.js +0 -2
- package/dist/chunks/app-wall-system-card.bde6830e.js.map +0 -1
- package/dist/chunks/app-wall.7cdabbf0.js +0 -2
- package/dist/chunks/app-wall.7cdabbf0.js.map +0 -1
- package/dist/chunks/battery-chart.a80664a9.js +0 -2
- package/dist/chunks/battery-chart.a80664a9.js.map +0 -1
- package/dist/chunks/brick-notification.921c2ed3.js +0 -2
- package/dist/chunks/brick-notification.921c2ed3.js.map +0 -1
- package/dist/chunks/cabinet-app-layer.f6d22c56.js +0 -3
- package/dist/chunks/cabinet-app-layer.f6d22c56.js.map +0 -1
- package/dist/chunks/cabinet-button.6b3d36f2.js +0 -2
- package/dist/chunks/cabinet-button.6b3d36f2.js.map +0 -1
- package/dist/chunks/cabinet-container.254c9686.js +0 -3
- package/dist/chunks/cabinet-container.254c9686.js.map +0 -1
- package/dist/chunks/cabinet-graph.c81b9297.js +0 -2
- package/dist/chunks/cabinet-graph.c81b9297.js.map +0 -1
- package/dist/chunks/cabinet-node.9c0cd3b5.js +0 -3
- package/dist/chunks/cabinet-node.9c0cd3b5.js.map +0 -1
- package/dist/chunks/cabinet-thumbnail.239c0a33.js +0 -3
- package/dist/chunks/cabinet-thumbnail.239c0a33.js.map +0 -1
- package/dist/chunks/complex-search.c5435741.js +0 -2
- package/dist/chunks/complex-search.c5435741.js.map +0 -1
- package/dist/chunks/dropdown-menu.122b99af.js +0 -3
- package/dist/chunks/dropdown-menu.122b99af.js.map +0 -1
- package/dist/chunks/gauge-chart.97728202.js +0 -2
- package/dist/chunks/gauge-chart.97728202.js.map +0 -1
- package/dist/chunks/gear-background.aa9c8881.js +0 -2
- package/dist/chunks/gear-background.aa9c8881.js.map +0 -1
- package/dist/chunks/graph-layout-grid.9945798d.js +0 -2
- package/dist/chunks/graph-layout-grid.9945798d.js.map +0 -1
- package/dist/chunks/graph-node.3b722d4b.js +0 -2
- package/dist/chunks/graph-node.3b722d4b.js.map +0 -1
- package/dist/chunks/graph-text.9e3f6f43.js +0 -2
- package/dist/chunks/graph-text.9e3f6f43.js.map +0 -1
- package/dist/chunks/grid-background.5500a391.js +0 -2
- package/dist/chunks/grid-background.5500a391.js.map +0 -1
- package/dist/chunks/hi-tech-button.fc429ec7.js +0 -2
- package/dist/chunks/hi-tech-button.fc429ec7.js.map +0 -1
- package/dist/chunks/lights-component-title.87c1f519.js +0 -2
- package/dist/chunks/lights-component-title.87c1f519.js.map +0 -1
- package/dist/chunks/loading-panel.e90ef9a2.js +0 -2
- package/dist/chunks/loading-panel.e90ef9a2.js.map +0 -1
- package/dist/chunks/main.8dc5a4db.js +0 -2
- package/dist/chunks/main.8dc5a4db.js.map +0 -1
- package/dist/chunks/modern-style-component-title.122c04c8.js +0 -2
- package/dist/chunks/modern-style-component-title.122c04c8.js.map +0 -1
- package/dist/chunks/modern-style-page-title.9c5b4fe4.js +0 -2
- package/dist/chunks/modern-style-page-title.9c5b4fe4.js.map +0 -1
- package/dist/chunks/modern-style-treemap.fe91c398.js +0 -3
- package/dist/chunks/modern-style-treemap.fe91c398.js.map +0 -1
- package/dist/chunks/particle-animation.cc736d30.js +0 -2
- package/dist/chunks/particle-animation.cc736d30.js.map +0 -1
- package/dist/chunks/radar-chart.5de4e675.js +0 -2
- package/dist/chunks/radar-chart.5de4e675.js.map +0 -1
- package/dist/chunks/tabs-drawer.000b4e3e.js +0 -3
- package/dist/chunks/tabs-drawer.000b4e3e.js.map +0 -1
- package/dist/chunks/tabs-page-title.d7f34cdf.js +0 -3
- package/dist/chunks/tabs-page-title.d7f34cdf.js.map +0 -1
- package/dist/chunks/tech-mesh-base-view.e6d45c37.js +0 -2
- package/dist/chunks/tech-mesh-base-view.e6d45c37.js.map +0 -1
- package/dist/chunks/title-text.1dac106c.js +0 -2
- package/dist/chunks/title-text.1dac106c.js.map +0 -1
- package/dist/chunks/top-title-bar.0a07a3e1.js +0 -2
- package/dist/chunks/top-title-bar.0a07a3e1.js.map +0 -1
- package/dist/index.9de5fa0d.js +0 -2
- package/dist/index.9de5fa0d.js.map +0 -1
- /package/dist/chunks/{app-wall-card-item.940bfb27.js.LICENSE.txt → app-wall-card-item.66073883.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{app-wall-relation-line.7d23426d.js.LICENSE.txt → app-wall-relation-line.b465193b.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-app-layer.f6d22c56.js.LICENSE.txt → cabinet-app-layer.2497f75d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-container.254c9686.js.LICENSE.txt → cabinet-container.c7fedd36.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-node.9c0cd3b5.js.LICENSE.txt → cabinet-node.4cfbd18d.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{cabinet-thumbnail.239c0a33.js.LICENSE.txt → cabinet-thumbnail.7d897c3a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{dropdown-menu.122b99af.js.LICENSE.txt → dropdown-menu.5f4a483a.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{modern-style-treemap.fe91c398.js.LICENSE.txt → modern-style-treemap.f604b3cc.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{tabs-drawer.000b4e3e.js.LICENSE.txt → tabs-drawer.126f7cec.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{tabs-page-title.d7f34cdf.js.LICENSE.txt → tabs-page-title.9c6318ac.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[7164,6205],{7164:(e,n,i)=>{i.r(n),i.d(n,{i18n:()=>l,i18nText:()=>f,initializeI18n:()=>o});var t=i(3239),a=i(5188),r=i(6473),s=!1,u=new Set;function o(e,n){if(s||(s=!0,a.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!u.has(e))for(var[i,t]of(u.add(e),Object.entries(n)))a.i18n.addResourceBundle(i,e,t)}var c=i(2019);function f(e){var n;if(e){var i=null!==(n=a.i18n.language)&&void 0!==n?n:"zh-CN";if((0,c.hasOwnProperty)(e,i))return e[i];var t=i.split("-")[0];if(t!==i)return(0,c.hasOwnProperty)(e,t)?e[t]:void 0;var r="".concat(t,"-");for(var s of Object.keys(e))if(s.startsWith(r))return e[s]}}var l=t.default}}]);
|
|
2
|
-
//# sourceMappingURL=7164.5ceba161.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[7782],{5863:(e,t,r)=>{function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}r.d(t,{Z:()=>n})},175:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{Z:()=>n})},687:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,n.Z)(e,t,"get"))}},3395:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5863);function o(e,t,r){(0,n.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(175);function o(e,t,r){return function(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}(e,(0,n.Z)(e,t,"set"),r),r}},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:()=>o});var n=r(5863);function o(e,t){(0,n.Z)(e,t),t.add(e)}},6666:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(5850);function o(e,t,r){return(t=(0,n.Z)(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},3028:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(6666);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}},2159:(e,t,r)=>{function n(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}r.d(t,{Z:()=>n})},5850:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(6522);function o(e){var t=function(e,t){if("object"!==(0,n.Z)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==(0,n.Z)(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,n.Z)(t)?t:String(t)}},6522:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r.d(t,{Z:()=>n})},7782:(e,t,r)=>{r.r(t),r.d(t,{Dialog:()=>nr,Notification:()=>ur,StoryboardFunctionRegistryFactory:()=>fe,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>te,authenticate:()=>Uo,batchSetAppsLocalTheme:()=>re,checkIfByTransform:()=>Tt,checkIfOfComputed:()=>At,createHistory:()=>Z,createRuntime:()=>Co,customProcessors:()=>x,customTemplates:()=>Pe,fetchByProvider:()=>$o,getAuth:()=>No,getBasePath:()=>v,getCssPropertyValue:()=>le,getCurrentMode:()=>ie,getCurrentTheme:()=>ee,getHistory:()=>I,getPageInfo:()=>qn,getRuntime:()=>To,handleHttpError:()=>cr,httpErrorToString:()=>or,isLoggedIn:()=>jo,isUnauthenticatedError:()=>ar,logout:()=>Fo,matchPath:()=>Dt,registerWidgetFunctions:()=>Le,registerWidgetI18n:()=>U,unstable_createRoot:()=>Do});var n={};r.r(n),r.d(n,{getAddedContracts:()=>sa,getAllContextValues:()=>oa,getBrickPackagesById:()=>aa,getContextValue:()=>na,getRenderId:()=>ia,legacyDoTransform:()=>qo,mountUseBrick:()=>Ho,renderUseBrick:()=>Wo,unmountUseBrick:()=>zo,updateSnippetPreviewSettings:()=>ta,updateStoryboard:()=>Go,updateStoryboardByRoute:()=>Jo,updateStoryboardBySnippet:()=>ea,updateStoryboardByTemplate:()=>Qo,updateTemplatePreviewSettings:()=>Yo});var o=r(3028),a=r(4795),i=r(3395),s=r(381),l=r(687),c=r(5188),u=r(8609),d=r(2019),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 o=n.app.homepage;if("string"==typeof o&&"/"===o[0]&&y(o,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=To().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 a(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]:{},o=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?a:i)("?".concat(d.toString()).concat(c?e.location.hash:""),u,o)}}return(0,o.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){a((0,o.Z)((0,o.Z)({},e.location),{},{key:void 0,hash:t,state:(0,o.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,o.Z)((0,o.Z)({},e.location),{},{state:(0,o.Z)((0,o.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(o,a,i){var s,l="string"==typeof o;return"string"==typeof(s=l?(0,f.parsePath)(o).pathname:o.pathname)&&s.startsWith("/")&&b(function(e){var t,r;return g(null!==(t=null===(r=ko)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](l?v()+o.substring(1):e.createHref(o)):("push"===n?t:r)(o,a,i)}}return{push:n("push"),replace:n("replace")}}((0,o.Z)((0,o.Z)({},e),{},{push:a,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(8633),O=r(8440),R=r(3695),P=r(9482),_=r(534),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("."),o=(0,l.Z)(this,M).get(r);if(o||(o=new Map,(0,l.Z)(this,M).set(r,o)),o.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));o.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),o=[];return Object.entries(r.i18n).forEach((e=>{var[t,r]=e;c.i18n.addResourceBundle(t,n,r),o.push(t)})),()=>{for(var e of o)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,j="brick-next-devtools-panel",$="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,o.Z)((0,o.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 oe="default";function ae(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));oe=e}function ie(){return document.documentElement.dataset.mode}function se(e){e?ae(e):e=oe,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 o=ue(n,t);void 0!==o&&(r[n]=o)}return r}function ue(e,t){var r,n,o,{collectCoverage:a,widgetId:i,widgetVersion:s,app:l,appendI18nNamespace:u,storyboardFunctions:d,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return a?"/next":v().replace(/\/$/,"");case"FN":return d;case"IMG":return a?{get:e=>"mock/images/".concat(e)}:i?null==Io||null===(r=Io.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==Io||null===(n=Io.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return a?m.identity:i?N(i):c.i18n.getFixedT(null,[u,L("app",l.id)].filter(Boolean));case"I18N_TEXT":return a?de:c.i18nText;case"PERMISSIONS":return z({check:a?pe:null==Io||null===(o=Io.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return z({getTheme:a?()=>"light":X});case"console":return p?z(console):void 0;case"location":return a?{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]:{},a=new Map,i=new Proxy(Object.freeze({}),{get:(o,s)=>function(o){var s,l=a.get(o);if(l){if(l.processed)return l.cooked;n&&(s=n.createCollector(o));var c=(0,O.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,O.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),a.clear(),Array.isArray(t))for(var n of t){var o=(0,R.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");a.set(n.name,{source:n.source,typescript:n.typescript,deps:o,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,o.Z)((0,o.Z)({},t),{},{name:e}),n=(0,R.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,R.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");a.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=a.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,o=a.prototype;function a(){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(o,"addEventListener",(function(e,r,n){for(var o=t.get(this),a=o[e]||(o[e]=[]),i=0,s=a.length;i<s;i++)if(a[i].listener===r)return;a.push({target:this,listener:r,options:n})})),i(o,"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(o,"removeEventListener",(function(e,r){for(var n=t.get(this),o=n[e]||(n[e]=[]),a=0,i=o.length;a<i;a++)if(o[a].listener===r)return void o.splice(a,1)})),ge.EventTarget=a}(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=To())||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),o=2;o<r;o++)n[o-2]=arguments[o];var a=0===n.length?"":",";e?console.error("".concat(t," is dropped in v3 strict mode").concat(a),...n):console.warn("".concat(t," is deprecated in v3 and will be dropped in strict mode").concat(a),...n)}var Oe=new Set(["prefix"]),Re=new WeakMap,Pe=new class{constructor(){(0,i.Z)(this,Re,{writable:!0,value:new Map})}define(e,t){var r,n,a,i,s=(0,l.Z)(this,Re).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,o.Z)((0,o.Z)({},t),{},{proxy:(0,o.Z)((0,o.Z)({},t.proxy),{},{properties:Object.fromEntries(d)}),state:(t.state?c?t.state:t.state.map((e=>(0,o.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,l.Z)(this,Re).set(e,(0,o.Z)((0,o.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!==(a=null===(i=h.proxy)||void 0===i?void 0:i.methods)&&void 0!==a?a:{}),S=b.concat(d.map((e=>e[0]))),E=w.map((e=>e[0])),k=S.concat(E).filter((e=>e in HTMLElement.prototype&&!Oe.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)),"continue";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,o,a=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);a&&(a[null!==(o=r.refProperty)&&void 0!==o?o:e]=t)},enumerable:!0})};for(var[C,T]of d)A(C,T);var O=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[R,P]of w)O(R,P);customElements.define(e,t)}}get(e){return(0,l.Z)(this,Re).get(e)}};function _e(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var a=o.get(n);if(!a)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 a}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:o}=fe({widgetId:e,widgetVersion:r});xe.set(e,n),o(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,je=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},$e=(e,t)=>{if(Fe(e)||Fe(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(je(e),je(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=$e(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),o=r.pop(),a=n.pop(),i=Ke(r,n);return 0!==i?i:o&&a?Ke(o.split("."),a.split(".")):o||a?o?-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=Lo(e);if(!r&&null!=Io&&Io.checkInstalledApps&&(r=Io.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:o}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of form renderer').concat(null!=r?r:""));var a=o.get(n);if(!a)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 a}var Ge=new Map;function Je(e){return Qe.apply(this,arguments)}function Qe(){return Qe=(0,a.Z)((function*(e){var t,r=null==Io||null===(t=Io.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=Io.flowApi.FLOW_API_PROVIDER);var n=Ge.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)Io.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],_o()),!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,a.Z)((function*(e,t,r){var{useProvider:n,method:a="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=ot(f,n,a,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,o.Z)((0,o.Z)({},t),{},{data:p})):p}))).apply(this,arguments)}function ot(e,t,r,n,o,a){return at.apply(this,arguments)}function at(){return at=(0,a.Z)((function*(e,t,r,n,o,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==o?void 0:o.cache)&&(l=tt.get(s)),l||(l=(0,a.Z)((function*(){var o,a=null!=Io&&null!==(o=Io.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?yield Io.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...a)}))(),tt.set(s,l)),l})),at.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,O.shouldAllowRecursiveEvaluations)(e):(0,O.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,a.Z)((function*(e,t,r){var{blockingList:n,run:o}=vt(e,t,r,!0);return yield Promise.all(n),o()}))).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,a=[];if("string"!=typeof e){var i=(0,m.omit)(t,["pendingPermissionsPreCheck","tplStateStoreMap","tplStateStoreScope","formStateStoreMap","formStateStoreScope"]);t=(0,o.Z)((0,o.Z)({},e[st]),i),e=e[it]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,O.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){(0,R.collectAppGetMenuUsage)(l,e,t),(0,R.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:a,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,R.strictCollectMemberUsage)(e,"CTX"),n&&a.push(t.ctxStore.waitFor(f))),g){if(h=(0,R.strictCollectMemberUsage)(e,"STATE"),!E){var Z=(0,R.strictCollectMemberUsage)(e,"TPL");for(var I of Z)h.add(I)}n&&a.push(g.waitFor(h))}S&&(w=(0,R.strictCollectMemberUsage)(e,"FORM_STATE"),n&&a.push(S.waitFor(w))),b.has("PROCESSORS")&&(v=(0,R.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&a.push((0,u.loadProcessorsImperatively)(v,_o())))}if(n){var A,C=b.has("PERMISSIONS");if(!C&&b.has("FN")){var T=[...(0,R.strictCollectMemberUsage)(e,"FN")];C=me(T)}if(C&&a.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=Io&&Io.menu){var P=[...l.usedArgs];a.push(Promise.all(P.map((e=>Io.menu.fetchMenuById(e,t,{getStoryboardByAppId:Bo,resolveData:rt,asyncComputeRealValue:yt})))))}c.usedArgs.size>0&&a.push(null==Io||null===(A=Io.checkInstalledApps)||void 0===A?void 0:A.waitForCheckingApps([...c.usedArgs]))}return{blockingList:a,run(){var r,n,a,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 R of b)switch(R){case"ANCHOR":y[R]=c.hash?c.hash.substring(1):null;break;case"APP":y[R]=(0,o.Z)((0,o.Z)({},(0,m.cloneDeep)(T)),{},{getMenu:null==Io||null===(n=Io.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[R]=q({get:(e,t)=>I.getValue(t),ownKeys:()=>Array.from(f)});break;case"DATA":y[R]=A;break;case"EVENT":y[R]=C;break;case"FLAGS":y[R]=z(k);break;case"FORM_STATE":y[R]=q({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[R]=c.hash;break;case"INSTALLED_APPS":y[R]=z({has:ze});break;case"ITEM":(0,d.hasOwnProperty)(t,"forEachItem")?y[R]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":y[R]=z({getItem:Ae("local")});break;case"MEDIA":y[R]=z(Ie());break;case"MISC":y[R]=To().getMiscSettings();break;case"PARAMS":y[R]=new URLSearchParams(u);break;case"PATH":y[R]=z(null!==(a=null==p?void 0:p.params)&&void 0!==a?a:{});break;case"PATH_NAME":y[R]=c.pathname;break;case"PROCESSORS":y[R]=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[R]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.get(e)])));break;case"QUERY_ARRAY":y[R]=Object.fromEntries(Array.from(u.keys()).map((e=>[e,u.getAll(e)])));break;case"SESSION_STORAGE":y[R]=z({getItem:Ae("session")});break;case"TPL":if(Te(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":y[R]=q({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[R]=z(null!=Z?Z:{});break;case"__WIDGET_FN__":y[R]=Be;break;case"__WIDGET_IMG__":y[R]=null==Io||null===(i=Io.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":y[R]=N}Object.assign(y,ce(s.attemptToVisitGlobals,{storyboardFunctions:ve,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{var P=(0,O.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:P}),P}catch(t){var M="".concat(t.message,', in "').concat(e,'"');throw new(pt(t))(M)}}}}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,a.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=lt(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&mt(r.$$stateOfUseBrick),i=a;return n||(0,O.isEvaluable)(e)?(o=yield function(e,t,r){return ft.apply(this,arguments)}(e,t,{lazy:a}),i=ut(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?P.transform:P.transformAndInject:r.noInject?Et:P.inject)(e,t),i||Xe(o),o}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,o]=e;return Promise.all([yt(n,t),yt(o,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 o,a=r.$$lazyForUseBrick&&mt(r.$$stateOfUseBrick),i=a;return n||(0,O.isEvaluable)(e)?(o=function(e,t,r){var{run:n}=vt(e,t,void 0,!1);return n()}(e,t),i=ut(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?P.transform:P.transformAndInject:r.noInject?Et:P.inject)(e,t),i||Xe(o),o}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,o]=e;return[wt(n,t),wt(o,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,o.Z)((0,o.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,a.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,a.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 Ot(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,O.isEvaluable)(e):lt(e)){var o="string"==typeof e?e:ct(e);if((0,O.isTrackAll)(o)){var a=(0,R.trackAll)(o);a&&(t=a.context,r=a.state,n=a.formState)}else t=(0,R.track)(o,"track context","CTX"),r=(0,R.track)(o,"track state","STATE"),n=(0,R.track)(o,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function Rt(e,t){return Pt.apply(this,arguments)}function Pt(){return(Pt=(0,a.Z)((function*(e,t){for(var[r,n,o]of e)if(r===t){var a=yield n;if(void 0!==a||!o)return a}}))).apply(this,arguments)}function _t(e){return Mt.apply(this,arguments)}function Mt(){return(Mt=(0,a.Z)((function*(e){var t={};for(var[r,n,o]of e){var a=yield n;void 0===a&&o||!("style"!==r&&"dataset"!==r||(0,d.isObject)(a))||(t[r]=a)}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[o,a]of Object.entries(n))e[r][o]=a;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,o=wt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?ht.USE_BRICK:ht.INITIAL});if("style"!==r&&"dataset"!==r||(0,d.isObject)(o))return[r,o]})).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,o=void 0!==n&&n,a=r.start,i=void 0===a||a,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)o||(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;o||(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 o=1,a="";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==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));a+=e[s++]}else a+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!a)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:a}),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,o=void 0===n?"./":n,a="[^".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],o=n.type,a=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(a,", 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===o.indexOf(m)&&(c+=m,m=""),c&&(i.push(c),c=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||a,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?a: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,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=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 jt=new Map,$t=1e4,Kt=0;function Dt(e,t){var{path:r,exact:n=!1,strict:o=!1,sensitive:a=!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=jt.get(r);n||jt.set(r,n=new Map);var o=n.get(e);if(o)return o;var a=[],i={regexp:Ft(e,a,t),keys:a};return Kt<$t&&(n.set(e,i),Kt++),i}(r,{end:n,strict:o,sensitive:a}),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,a.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==Io||!Io.auth||Io.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=r(6666),Qt=new Set,Yt=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}({}),Xt={[Yt.REQUEST_FAILED]:"Request Failed",[Yt.SOMETHING_WENT_WRONG]:"Something went wrong!",[Yt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[Yt.NETWORK_ERROR]:"Network error, please check your network."},er={[Yt.REQUEST_FAILED]:"请求失败",[Yt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[Yt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[Yt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},tr="core/runtime",rr={en:Xt,zh:er},nr=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(tr,":").concat(Yt.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 ar(e){return e instanceof T.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var ir,sr,lr=!1;function cr(e){if(!(e instanceof T.HttpAbortError)){if(ar(e)&&!window.NO_AUTH_GUARD){if(lr)return;return lr=!0,void nr.show({type:"confirm",content:c.i18n.t("".concat(tr,":").concat(Yt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=To().getFeatureFlags()["sso-enabled"],(t=I()).push(e?"/sso-auth/login":"/auth/login",{from:(0,o.Z)((0,o.Z)({},t.location),{},{state:void 0})}),lr=!1}),(()=>{lr=!1}))}console.error(e);var t=or(e);t!==ir&&(ir=t,nr.show({type:"error",title:c.i18n.t("".concat(tr,":").concat(Yt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{ir=void 0})))}}var ur=Object.freeze({show:function(e){sr?sr.resolve(e):alert(e.message)}});function dr(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=mr(o,r,{element:e});for(var i of(e.addEventListener(n,a),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,a]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(o)))e.$$eventListeners.push([n,null,i])}))}function pr(e){return"string"==typeof e.action}function fr(e){return"string"==typeof e.useProvider}function vr(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function hr(e){return!!e.then}function mr(e,t,r){return function(n){var a,i;for(var s of[].concat(e))if(It(s,(0,o.Z)((0,o.Z)({},t),{},{event:n})))if(hr(s))mr(s.then,t,r)(n);else if(pr(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":Er(n,c,s.args,s.callback,t);break;case"window.open":kr(n,s.args,t);break;case"location.reload":case"location.assign":Tr(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":Rr(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Pr(n,c,s.args,t);break;case"handleHttpError":cr(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":Ir(n,c,s.args,null===(a=s.batch)||void 0===a||a,s.callback,t);break;case"state.update":case"state.refresh":case"state.load":Ar(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=Br(s.args,t,n);Me(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":Cr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":_r(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]=Br(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 fr(s)?gr(n,s,t,r):vr(s)?br(n,s,t,r):console.error("unknown event handler:",s);else s.else&&mr(s.else,t,r)(n)}}function gr(e,t,r,n){return yr.apply(this,arguments)}function yr(){return(yr=(0,a.Z)((function*(e,t,r,n){try{wr(e,yield Je(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(or(e))}}))).apply(this,arguments)}function br(e,t,r,n){var a=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,O.isEvaluable)(i):lt(i))&&(l=wt(i,(0,o.Z)((0,o.Z)({},r),{},{event:e}))),"string"==typeof l)if("_self"===l)a.push(n.element);else if(t.multiple)a=Array.from(document.querySelectorAll(l));else{var c=document.querySelector(l);null!==c&&a.push(c)}else if(l)l instanceof HTMLElement?a.push(l):console.error("unexpected target:",l);else if(s){var u=s;("string"==typeof s?(0,O.isEvaluable)(s):lt(s))&&(u=wt(s,(0,o.Z)((0,o.Z)({},r),{},{event:e})));var d=[].concat(u),p=Me(r,"targetRef",": ".concat(d.join(", ")));a.push(...d.map((e=>{var t;return null===(t=p.$$getElementByRef)||void 0===t?void 0:t.call(p,e)})).filter(Boolean))}0!==a.length?function(e){return!!e.method}(t)?a.forEach((o=>{wr(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Bt(a,t.properties,(0,o.Z)((0,o.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function wr(e,t,r,n,o,a,i){return Sr.apply(this,arguments)}function Sr(){return Sr=(0,a.Z)((function*(e,t,r,n,i,s,l){var c;if("function"==typeof t[n]){var u=function(){var o=(0,a.Z)((function*(){var o,a=Br(r.args,i,e,l);return fr(r)&&null!=Io&&null!==(o=Io.flowApi)&&void 0!==o&&o.isFlowApiProvider(r.useProvider)&&(a=yield Io.flowApi.getArgsOfFlowApi(r.useProvider,a,n)),t[n](...a)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var d,p=xr(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(fr(r)&&(d=wt(r.poll,(0,o.Z)((0,o.Z)({},i),{},{event:e}))),null!==(c=d)&&void 0!==c&&c.enabled)!function(e,t,r){var n,{progress:o,success:i,error:s,finally:l}=t,{interval:c,leadingRequestDelay:u,continueOnError:d,delegateLoadingBar:p,expectPollEnd:f,expectPollStopImmediately:v}=r,h=Mo();function m(){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((function*(){var t;Qt.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==Mo())||(null==o||o(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!==Mo())||(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),Qt.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})})),Sr.apply(this,arguments)}function Er(e,t,r,n,o){var a=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":a=2,i=!0;break;case"reload":i=!0;break;case"block":a=1,s="setBlockMessage"}var l=[];if(a>0&&((l=Br(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var c=xr(n,o,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}I()[s](...l)}function kr(e,t,r){var[n,o,a]=Br(t,r,e);window.open(n,o||"_self",a)}function Zr(e,t,r,n,o,a){t?n.updateValues(e,r,(e=>Br(e,o,a)[0])):e.forEach((e=>{var{name:t,value:i}=Br([e],o,a)[0];n.updateValue(t,i,r)}))}function Ir(e,t,r,n,o,a){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=Br(r,a,e);a.ctxStore.updateValue(i,s,t,o,a)}else Zr(r,n,t,a.ctxStore,a,e)}function Ar(e,t,r,n,o,a){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)Zr(r,n,"replace",_e(a,"state.".concat(t),": ".concat(JSON.stringify(r))),a,e);else{var[i,s]=Br(r,a,e);_e(a,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,o,a)}}function Cr(e,t,r,n){var[o,a]=Br(t,n,e);qe(n,"formstate.update",": ".concat(o)).updateValue(o,a,"replace",r,n)}function Tr(e,t,r,n){if("assign"===t){var[o]=Br(r,n,e);location.assign(o)}else location[t]()}function Or(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=Br(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Rr(e,t,r,n){console[t](...Br(r,n,e,{useEventAsDefault:!0}))}function Pr(e,t,r,n){var o=Br(r,n,e,{useEventAsDefault:!0});ur.show({type:t,message:o[0]})}function _r(e,t,r,n,o,a){return Mr.apply(this,arguments)}function Mr(){return(Mr=(0,a.Z)((function*(e,t,r,n,o,a){var i=()=>{var o,a=Br(r,n,e);return null==Io||null===(o=Io.messageDispatcher)||void 0===o?void 0:o[t](...a)};if(a){var s=xr(a,n,o);try{var l=yield i();s("success")(l)}catch(e){s("error")(e)}finally{s("finally")()}}else i()}))).apply(this,arguments)}function xr(e,t,r){return function(n){return function(o){var a=null==e?void 0:e[n];if(a)try{var i=new CustomEvent("callback.".concat(n),{detail:o});mr(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function Br(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?wt(e,(0,o.Z)((0,o.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}var Lr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class Ur{constructor(e,t,r){(0,Jt.Z)(this,"type",void 0),(0,Jt.Z)(this,"data",new Map),(0,Jt.Z)(this,"changeEventType",void 0),(0,Jt.Z)(this,"pendingStack",[]),(0,Jt.Z)(this,"hostBrick",void 0),(0,Jt.Z)(this,"batchUpdate",!1),(0,Jt.Z)(this,"batchUpdateContextsNames",[]),(0,Jt.Z)(this,"rendererContext",void 0),(0,Jt.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={},o={},a=[];e.forEach((e=>{var{name:o,value:i}=r([e]),s=this.data.get(o);a.push(...this.getAffectListByContext(o)),s&&(n[o]=s),this.updateValue(o,i,t)})),a.filter((e=>!n[e])).forEach((e=>{var t=this.data.get(e);t&&(o[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(o),this.batchUpdate=!1}updateValue(e,t,r,n,a){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,o.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||cr(e)})),n){var l=xr(n,a);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 o=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 o=(0,R.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,o)}return r}(e,r),o=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var s;o.set(i,(null!==(s=o.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,a.Z)((function*(e){var r;c.add(e);var a=yield t(e);n.delete(e);var i=null!==(r=o.get(e.name))&&void 0!==r?r:0;if(a){if(u.get(e.name).resolve(),o.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(u.get(e.name).resolve(),o.delete(e.name)):o.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,a.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)))}(o,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,a.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))),o=()=>{var e=!1;for(var[t,a]of r.entries())[...a.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&o()};if(o(),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(o)}}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,a.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,a.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,a.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 Rt(r,e.name));var u="eager";if(void 0===s){if(e.resolve){var p=(0,o.Z)({transform:"value"},e.resolve);if(yield kt(e.resolve,t))l=function(){var e=(0,a.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&&Lr.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,mr(e.onChange,t)),e.track){var m=(0,R.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 Nr(e,t,r){var n,o,{reversedProxies:a,asyncHostPropertyEntries:i,externalSlots:s,tplStateStoreId:l,hostBrick:c}=e;if(t&&a){var u=a.properties.get(t);u&&(o=i,n=u.map((e=>{var{from:t,to:r}=e,n=o.filter((e=>e[0]===t));if(n.length>0&&r.refProperty)return[r.refProperty,Rt(n,t),!0]})).filter(Boolean));var p=a.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")?Fr(S,c.runtimeContext.forEachItem):S)}}var C=function(){(0,d.hasOwnProperty)(r,T)||(r[T]={type:"bricks",bricks:[]});var e=r[T];e.bricks=O.flatMap(((t,r)=>r<e.bricks.length?t.concat(e.bricks[r]):t)),0===e.bricks.length&&delete r[T]};for(var[T,O]of f.entries())C()}}return{[zt]:n,[qt]:l}}function Fr(e,t){return e.map((e=>{var r;return(0,o.Z)((0,o.Z)({},e),{},{[Gt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,o]=e;return[n,"routes"===o.type?{type:"routes",routes:jr(o.routes,t)}:{type:"bricks",bricks:Fr(null!==(r=o.bricks)&&void 0!==r?r:[],t)}]})))})}))}function jr(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,o.Z)((0,o.Z)({},e),{},{bricks:Fr(e.bricks,t)})))}var $r=["properties","slots","children"];function Kr(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,o]=e;return(0,d.isObject)(o)&&"useBrick"===t?Array.isArray(o)?[t,o.map(n)]:[t,n(o)]:[t,r(o)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:a,slots:i,children:s}=e,l=(0,h.Z)(e,$r),c=mn(s,i),u=Object.fromEntries(Object.entries(null!=c?c:{}).map((e=>{var t,[r,o]=e;return[r,{type:"bricks",bricks:(null!==(t=o.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,o.Z)((0,o.Z)({},l),{},{properties:r(a),slots:u},Nr(t,l.ref,u))}return r(e)}var Dr=["slots","children"],Wr=["properties","slots","children"];function Vr(e,t,r,n,a){var i,s=(0,m.uniqueId)("tpl-state-"),l=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{tplStateStoreId:s});delete l.forEachItem,delete l.formStateStoreId;var c=new Ur("STATE",r,a);l.tplStateStoreMap.set(s,c),l.tplStateStoreScope&&l.tplStateStoreScope.push(c);var{bricks:u,proxy:d,state:p,contracts:f}=Pe.get(e);null==Io||null===(i=Io.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:g}=t,y=(0,h.Z)(t,Dr),b=(0,o.Z)((0,o.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:mn(g,v),tplStateStoreId:s,hostBrick:r};return b.slots={"":{type:"bricks",bricks:u.map((e=>Hr(e,C)))}},b}function Hr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,h.Z)(e,Wr),s=mn(a,n),l=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,o]=e;return[n,{type:"bricks",bricks:(null!==(r=o.bricks)&&void 0!==r?r:[]).map((e=>Hr(e,t)))}]})));return(0,o.Z)((0,o.Z)({},i),{},{properties:Kr(r,t),slots:l},Nr(t,i.ref,l))}var zr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),qr="form-renderer.form-renderer",Gr=Symbol.for("form.stateStoreId"),Jr=["forms.general-form","form.general-form","eo-form"];function Qr(e,t,r){var{id:n,bricks:a,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,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,precision:0,inputBoxStyle:{width:"100%"}})};break;case"BOOLEAN":t={brick:"forms.general-switch",properties:(0,o.Z)((0,o.Z)({},r),n())};break;case"FLOAT":t={brick:"forms.general-input-number",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description,inputBoxStyle:{width:"100%"}})};break;case"ENUM":t={brick:"forms.general-select",properties:(0,o.Z)((0,o.Z)((0,o.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,o.Z)((0,o.Z)((0,o.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,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})};break;case"IP":t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.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,o.Z)({},r)};break;case"ARRAY":t={brick:"forms.general-select",properties:(0,o.Z)({},r)};break;case"STRUCTURE":case"STRUCTURE_ARRAY":t={brick:"forms.cmdb-instance-select-panel",properties:(0,o.Z)((0,o.Z)({},r),n())};break;default:t={brick:"forms.general-input",properties:(0,o.Z)((0,o.Z)((0,o.Z)({},r),n()),{},{placeholder:e.description})}}return t}(f);u||(u=v.brick),p=(0,o.Z)((0,o.Z)({},v.properties),p)}var h={brick:u,properties:p,iid:c,slot:l,events:i,context:s,children:Yr(a,t,r),[Gr]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function Yr(e,t,r){if(Array.isArray(e))return e.map((e=>Qr(e,t,r)))}var Xr=["blockingList","node","menuRequests","hasTrackingControls"],en=["if","permissionsPreCheck"],tn=["formData"],rn=["src"],nn=["href"];function on(e,t,r,n,o,a,i){return an.apply(this,arguments)}function an(){return an=(0,a.Z)((function*(e,t,r,n,a,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,o.Z)((0,o.Z)({},r),{},{match:l.match});s&&f.ctxStore.disposeDataInRoutes(t);var v=a.concat(p);f.ctxStore.define(p.context,f,void 0,v),f.pendingPermissionsPreCheck.push(null==Io||null===(d=Io.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,_o())),"redirect"===p.type){var m;if("string"!=typeof(m="string"==typeof p.redirect?yield yt(p.redirect,f):(yield rt((0,o.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?hn(c,yield on(e,p.routes,f,n,v,i)):hn(c,yield sn(e,p.bricks,f,n,v,i)),e.tag===zr.BRICK&&n.memoizeMenuRequests(p,c.menuRequests)}}return c})),an.apply(this,arguments)}function sn(e,t,r,n,o,a,i,s){return ln.apply(this,arguments)}function ln(){return(ln=(0,a.Z)((function*(e,t,r,n,o,a,i,s){var l={blockingList:[],menuRequests:[]},c=null!=s?s:[];return(yield Promise.all(t.map(((t,s)=>cn(e,t,r,n,o,a,c.concat(s),i&&new Map(i)))))).forEach(((t,r)=>{t.hasTrackingControls&&n.memoize(a,c.concat(r),t.node,e),hn(l,t)})),l}))).apply(this,arguments)}function cn(e,t,r,n,o,a){return un.apply(this,arguments)}function un(){return un=(0,a.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,en);if(function(e){return"string"==typeof e?(0,O.isTrackAll)(e):lt(e)&&(0,O.isTrackAll)(ct(e))}(g))return cn(e,(0,o.Z)({brick:":if",dataSource:g,permissionsPreCheck:b,slots:{"":{type:"bricks",bricks:[w]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,o.Z)((0,o.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p,f);var S=t[qt],E=t[Gr],k=(0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:S,formStateStoreId:E});(0,d.hasOwnProperty)(t,Gt)&&(k.forEachItem=t[Gt]);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==Io||null===(l=Io.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,a.Z)((function*(r){var o,a=yield yt(T,r),l=":forEach"===A?"":":switch"===A?String(a):a?"":"else",c=mn(t.children,t.slots),u=c&&(0,d.hasOwnProperty)(c,l)&&(null===(o=c[l])||void 0===o?void 0:o.bricks);if(!Array.isArray(u))return v;switch(A){case":forEach":return Array.isArray(a)?function(e,t,r,n,o,a,i,s,l){return dn.apply(this,arguments)}(e,a,u,r,n,i,s,f,p):v;case":if":case":switch":return sn(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}=Ot(T);if(B||L){_.hasTrackingControls=!0;var U=0,N=function(){var t=(0,a.Z)((function*(){var t=++U,[r,o,a]=vn(k),i=yield P(r),l=[...o,...a];if(yield fn(i,r,l),U===t)for(var c of(x&&mr(x,k)(new CustomEvent("unmount",{detail:{rerender:!0}})),n.reRender(s,p,i.node,e),M&&mr(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 j of B)k.ctxStore.onChange(j,F);if(L)for(var $ of L)_e(k,"STATE",': "'.concat(T,'"')).onChange($,F)}return M&&n.registerArbitraryLifeCycle("onMount",(()=>{mr(M,k)(new CustomEvent("mount",{detail:{rerender:!1}}))})),x&&n.registerArbitraryLifeCycle("onUnmount",(()=>{mr(x,k)(new CustomEvent("unmount",{detail:{rerender:!1}}))})),_}/\.tpl-/.test(A)&&!Pe.get(A)&&(yield gn((0,u.loadBricksImperatively)([A],_o()),"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===qr?customElements.define(qr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):v.blockingList.push(gn((0,u.enqueueStableLoadBricks)([A],_o()),"brick",A,n.unknownBricks)));if(A===qr){var z,q=null!==(z=t.properties)&&void 0!==z?z:{};({formData:K}=q),D=(0,h.Z)(q,tn)}else D=t.properties;var G=[],J=function(e,t,r){return(0,d.isObject)(e)?Object.entries(e).map((e=>{var[n,o]=e,{contextNames:a,stateNames:i,formStateNames:s}=Ot(o);return(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o}),[n,yt(o,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,rn);yield gn((0,u.loadScript)(re,te,ne),"script",re,"silent")}else{var{href:oe}=X;ne=(0,h.Z)(X,nn),yield gn((0,u.loadStyle)(oe,te,ne),"stylesheet",oe,"silent")}return v}}var ae={tag:zr.BRICK,type:W||A,return:e,slotId:s,events:t.events,runtimeContext:k,portal:t.portal,iid:t.iid,ref:t.ref};v.node=ae;var ie=(0,R.strictCollectMemberUsage)([t.events,t.lifeCycle],"PROCESSORS",2);ie.size>0&&v.blockingList.push(gn((0,u.loadProcessorsImperatively)(ie,_o()),"processors",[...ie].join(", "),n.unknownBricks));var se=[],le=function(){var e=(0,a.Z)((function*(){ae.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 o=_e(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,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)}(ae,G)}));return function(){return e.apply(this,arguments)}}();se.push(le()),n.registerBrickLifeCycle(ae,t.lifeCycle);var ce,ue=t;W?ue=Vr(W,t,ae,J,n):A===qr&&(ue=function(e,t,r,n,a){var i,s,l="string"==typeof e?JSON.parse(e):e,c=(0,m.uniqueId)("form-state-"),u=(0,o.Z)((0,o.Z)({},r.runtimeContext),{},{formStateStoreId:c});delete u.forEachItem,delete u.tplStateStoreId;var p=new Ur("FORM_STATE",void 0,a);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=Qr(l.formSchema,l.fields,c);return Jr.includes(v.brick)&&t.events&&(v.events=function(e,t){var r=null!=e?e:{};for(var[n,o]of Object.entries(t))r[n]=(0,d.hasOwnProperty)(r,n)?[r[n],o].flat():o;return r}(v.events,t.events)),"boolean"!=typeof(null===(s=t.properties)||void 0===s?void 0:s.renderRoot)||t.properties.renderRoot?(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[{brick:"eo-micro-view",properties:{style:{padding:"12px"}},children:[v]}]}):(0,o.Z)((0,o.Z)({},t),{},{slots:void 0,children:[v]})}(K,t,ae,J,n)),ue.portal&&(ae.slotId=void 0),W?delete(ce=(0,o.Z)({},k)).forEachItem:ce=k;var de=function(){var e=(0,a.Z)((function*(){var e=mn(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?sn(ae,l.bricks,ce,n,i,s,f):(k.flags["incremental-sub-route-rendering"]&&(t.add(r),n.performIncrementalRender(function(){var e=(0,a.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 a,[c,u,d]=vn((0,o.Z)((0,o.Z)({},ce),{},{location:e,query:new URLSearchParams(e.search)})),p=!1,f=[];try{if(!(a=yield on(ae,l.routes,c,n,i,s,!0)).route)return!1;if(n.reBailout(a))return!0;f=[...u,...d],yield fn(a,c,[c.ctxStore,...f]),yield n.reMergeMenuRequests(l.routes,a.route,a.menuRequests)}catch(e){console.error("Incremental sub-router failed:",e);var v=n.reCatch(e,ae);if(!v)return!0;({failed:p,output:a}=v),yield n.reMergeMenuRequests(l.routes,a.route,a.menuRequests)}if(n.reRender(s,[],a.node,ae),!p)for(var h of(c.ctxStore.mountAsyncData(a.route),f))h.mountAsyncData();return!0}));return function(t){return e.apply(this,arguments)}}())),on(ae,l.routes,ce,n,i,s))}))),l=(0,o.Z)((0,o.Z)({},v),{},{node:void 0,blockingList:[],menuRequests:[]});r.forEach(((e,r)=>{t.has(r)&&n.memoize(s,[],e.node,ae),hn(l,e)})),l.node&&(ae.child=l.node),hn(v,(0,o.Z)((0,o.Z)({},l),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return se.push(de()),yield Promise.all(se),v})),un.apply(this,arguments)}function dn(){return(dn=(0,a.Z)((function*(e,t,r,n,a,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)=>cn(e,r,(0,o.Z)((0,o.Z)({},n),{},{forEachItem:t}),a,i,s,c.concat(u*d+p),l&&new Map(l))))))))).flat().forEach(((t,r)=>{t.hasTrackingControls&&a.memoize(s,c.concat(r),t.node,e),hn(u,t)})),u}))).apply(this,arguments)}function pn(e){return[e.ctxStore,...e.tplStateStoreMap.values(),...e.formStateStoreMap.values()]}function fn(e,t,r){return(0,u.flushStableLoadBricks)(),Promise.all([...e.blockingList,...r.map((e=>e.waitForAll())),...t.pendingPermissionsPreCheck])}function vn(e){var t=[],r=[];return[(0,o.Z)((0,o.Z)({},e),{},{tplStateStoreScope:t,formStateStoreScope:r}),t,r]}function hn(e,t){var{blockingList:r,node:n,menuRequests:o,hasTrackingControls:a}=t,i=(0,h.Z)(t,Xr);if(e.blockingList.push(...r),e.menuRequests.push(...o),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 mn(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var o,a=null!==(o=n.slot)&&void 0!==o?o:"";(0,d.hasOwnProperty)(r,a)||(r[a]={type:"bricks",bricks:[]}),r[a].bricks.push(n)}return r}function gn(e,t,r,n){return"silent"===n?e.catch((e=>{console.error("Load ".concat(t,' "').concat(r,'" failed:'),e)})):e}function yn(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=_e(n,"bindTemplateProxy"),i=a.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(),a.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;o.addEventListener(l,s),null!==(i=(n=o).$$proxyListeners)&&void 0!==i||(n.$$proxyListeners=[]),o.$$proxyListeners.push([l,s])}};for(var[c,u]of Object.entries(s))l(c)}}}function bn(e){var{ref:t,runtimeContext:r,element:n}=e;if(null!=r&&r.tplStateStoreId&&t){var{hostBrick:o}=_e(r,"unbindTemplateProxy"),a=o.tplHostMetadata;for(var[i,s]of(a.internalBricksByRef.delete(t),null!==(l=n.$$proxyListeners)&&void 0!==l?l:[])){var l;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function wn(e){e.replaceChildren()}function Sn(e,t){for(var r=e.child,n=[];r;){var o,a=r.type;a.includes("-")&&!customElements.get(a)&&console.error("Undefined custom element: ".concat(a)),"basic-bricks.script-brick"===a&&console.warn("`basic-bricks.script-brick` is deprecated, please take caution when using it");var i=t&&r===e.child?t:document.createElement(a);if(r.element=i,r.slotId&&i.setAttribute("slot",r.slotId),r.iid&&(i.dataset.iid=r.iid),null!==(o=r.tplHostMetadata)&&void 0!==o&&o.tplStateStoreId&&(i.dataset.tplStateStoreId=r.tplHostMetadata.tplStateStoreId),xt(i,r.properties),dr(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=_e({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),yn(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===zr.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===zr.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 En,kn,Zn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],In=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],An=new WeakMap,Cn=new WeakMap,Tn=new WeakMap,On=new WeakMap,Rn=new WeakMap,Pn=new WeakMap,_n=new WeakMap,Mn=new WeakMap,xn=new WeakMap,Bn=new WeakSet,Ln=new WeakSet,Un=new WeakSet,Nn=new WeakSet;class Fn{constructor(e,t){var r;(0,A.Z)(this,Nn),(0,A.Z)(this,Un),(0,A.Z)(this,Ln),(0,A.Z)(this,Bn),(0,Jt.Z)(this,"scope",void 0),(0,Jt.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,An,{writable:!0,value:void 0}),(0,i.Z)(this,Cn,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}}),(0,i.Z)(this,Tn,{writable:!0,value:new Map}),(0,i.Z)(this,On,{writable:!0,value:void 0}),(0,i.Z)(this,Rn,{writable:!0,value:new Map}),(0,i.Z)(this,Pn,{writable:!0,value:void 0}),(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:[]}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw",(0,s.Z)(this,An,null==t?void 0:t.routeHelper)}setInitialMenuRequests(e){(0,s.Z)(this,_n,e)}memoizeMenuRequests(e,t){(0,l.Z)(this,Mn)||(0,s.Z)(this,Mn,new WeakMap),(0,l.Z)(this,Mn).set(e,t[0])}reMergeMenuRequests(e,t,r){var n=this;return(0,a.Z)((function*(){var o,a;for(var i of e)if(o=(0,l.Z)(n,Mn).get(i)){a=i;break}var s=(0,l.Z)(n,_n),c=o?s.indexOf(o):-1;if(-1===c){if(!r.length)return;s.push(...r)}else s.splice(c,s.length-c,...r);a&&a!==t&&(0,l.Z)(n,Mn).delete(a),yield(0,l.Z)(n,An).mergeMenus(s)}))()}reBailout(e){return(0,l.Z)(this,An).bailout(e)}reCatch(e,t){return(0,l.Z)(this,An).catch(e,t)}didPerformIncrementalRender(e){var t=this;return(0,a.Z)((function*(){return(yield Promise.all((0,l.Z)(t,xn).map((t=>t(e))))).some((e=>e))}))()}performIncrementalRender(e){(0,l.Z)(this,xn).push(e)}registerBrickLifeCycle(e,t){if(t){var r=[...Zn,..."page"===this.scope?In:[]];for(var n of r){var o=t[n];o&&(0,l.Z)(this,Cn)[n].push({brick:e,handlers:o})}(0,m.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is dropped in v3:",t)}}registerArbitraryLifeCycle(e,t){var r=(0,l.Z)(this,Rn).get(e);r?r.add(t):(0,l.Z)(this,Rn).set(e,new Set([t]))}memoize(e,t,r,n){(0,l.Z)(this,Pn)||(0,s.Z)(this,Pn,new WeakMap);var o=[null!=e?e:"",...t].join("."),a=(0,l.Z)(this,Pn).get(n);a||(a=new Map,(0,l.Z)(this,Pn).set(n,a)),a.set(o,{node:r,last:Wn(r),lastNormal:Vn(r),lastPortal:Hn(r)})}reRender(e,t,r,n){var o,a,i,s,c,u=[null!=e?e:"",...t].join("."),d=(0,l.Z)(this,Pn).get(n).get(u),{node:p,last:f,lastNormal:v,lastPortal:h}=d,m=null!==(o=null==v||null===(a=v.element)||void 0===a?void 0:a.nextSibling)&&void 0!==o?o:null,g=null!==(i=null==h||null===(s=h.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=Wn(r);d.node=r,d.last=y,d.lastNormal=Vn(r),d.lastPortal=Hn(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:zr.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=zn(p,f);for((0,C.Z)(this,Bn,jn).call(this,I),Sn(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===zr.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)!==zr.ROOT)throw new Error("Cannot find render root node");("function"==typeof T.createPortal?T.createPortal():T.createPortal).insertBefore(S,g)}var O=zn(r,y);(0,C.Z)(this,Ln,$n).call(this,O)}dispose(){for(var e of Object.values((0,l.Z)(this,Cn)))e.length=0;for(var t of(0,l.Z)(this,Tn).values()){for(var r of t)r.disconnect();t.length=0}(0,l.Z)(this,Tn).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,Pn,void 0),(0,s.Z)(this,_n,void 0),(0,s.Z)(this,Mn,void 0),(0,l.Z)(this,Rn).clear(),(0,l.Z)(this,xn).length=0}dispatchBeforePageLoad(){(0,C.Z)(this,Un,Kn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,C.Z)(this,Un,Kn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,C.Z)(this,Un,Kn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,C.Z)(this,Un,Kn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=I().location;e&&"#"!==e?(0,C.Z)(this,Un,Kn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,C.Z)(this,Un,Kn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,l.Z)(this,Cn).onScrollIntoView)(0,C.Z)(this,Nn,Dn).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,On,(e=>{(0,C.Z)(this,Un,Kn).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==Io||null===(r=Io.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{mr(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,Cn).onMessage)t(r);null==Io||null===(e=Io.messageDispatcher)||void 0===e||e.onClose((()=>{(0,C.Z)(this,Un,Kn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,C.Z)(this,Un,Kn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,C.Z)(this,Un,Kn).call(this,"onUnmount",new CustomEvent("unmount"))}}function jn(e){var t=[...Zn,..."page"===this.scope?In:[]],r=[];for(var n of t){var o=(0,m.remove)((0,l.Z)(this,Cn)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var i,s,c=(0,l.Z)(this,Tn).get(a);if(null!=c&&c.length){for(var u of c)u.disconnect();c.length=0,(0,l.Z)(this,Tn).delete(a)}bn(a),null===(i=a.element)||void 0===i||delete i.$$tplStateStore,null===(s=a.element)||void 0===s||s.remove()}var d=new CustomEvent("unmount");for(var{brick:p,handlers:f}of r)mr(f,p.runtimeContext,p)(d)}function $n(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,l.Z)(this,Cn).onMount)e.has(r)&&mr(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,l.Z)(this,Cn).onScrollIntoView)e.has(o)&&(0,C.Z)(this,Nn,Dn).call(this,o,a)}function Kn(e,t){for(var{brick:r,handlers:n}of(0,l.Z)(this,Cn)[e])mr(n,r.runtimeContext,r)(t);var o=(0,l.Z)(this,Rn).get(e);if(o)for(var a of o)a()}function Dn(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,o=new IntersectionObserver(((r,o)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(mr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,l.Z)(this,Tn).get(e);a||(a=[],(0,l.Z)(this,Tn).set(e,a)),a.push(o)}function Wn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function Vn(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Hn(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,o=r.return;o&&!o.sibling;)o=o.return;r=null===(n=o)||void 0===n?void 0:n.sibling}return t}function zn(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 o,a=n.return;a&&a!==t&&!a.sibling;)a=a.return;if(a===t)break;n=null===(o=a)||void 0===o?void 0:o.sibling}}return r}function qn(){if(!En){if(En={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){En.isInIframe=!0;try{if(window.origin===window.parent.origin){En.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");En.isInIframeOfNext=0==(Number(e)^Number(r)),En.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),En.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(En)}return En}function Gn(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 o=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);Pe.define(o,n)}}}function Jn(){return Jn=(0,a.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return Qn.apply(this,arguments)}(e)),e.$$fulfilling})),Jn.apply(this,arguments)}function Qn(){return(Qn=(0,a.Z)((function*(e){var t;yield null==Io||null===(t=Io.fulfilStoryboard)||void 0===t?void 0:t.call(Io,e),B(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var Yn=new WeakMap,Xn=new WeakMap,eo=new WeakMap,to=new WeakMap,ro=new WeakMap,no=new WeakMap,oo=new WeakMap,ao=new WeakMap,io=new WeakMap,so=new WeakMap,lo=new WeakMap,co=new WeakMap,uo=new WeakSet,po=new WeakSet,fo=new WeakSet,vo=new WeakSet;class ho{constructor(e){(0,A.Z)(this,vo),(0,A.Z)(this,fo),(0,A.Z)(this,po),(0,A.Z)(this,uo),(0,i.Z)(this,Yn,{writable:!0,value:void 0}),(0,i.Z)(this,Xn,{writable:!0,value:!1}),(0,i.Z)(this,eo,{writable:!0,value:void 0}),(0,i.Z)(this,to,{writable:!0,value:void 0}),(0,i.Z)(this,ro,{writable:!0,value:void 0}),(0,i.Z)(this,no,{writable:!0,value:void 0}),(0,i.Z)(this,oo,{writable:!0,value:new Set}),(0,i.Z)(this,ao,{writable:!0,value:0}),(0,i.Z)(this,io,{writable:!0,value:void 0}),(0,i.Z)(this,so,{writable:!0,value:void 0}),(0,i.Z)(this,lo,{writable:!0,value:void 0}),(0,i.Z)(this,co,{writable:!0,value:void 0}),(0,s.Z)(this,Yn,e);var t=I();window.addEventListener("beforeunload",(e=>{(0,C.Z)(this,uo,mo).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,C.Z)(this,uo,mo).call(this,{location:e,action:t})))}getRenderId(){return(0,l.Z)(this,io)}getRuntimeContext(){return(0,l.Z)(this,ro)}getRecentApps(){return{currentApp:(0,l.Z)(this,so),previousApp:(0,l.Z)(this,lo)}}getNavConfig(){return(0,l.Z)(this,co)}bootstrap(){var e=this;window.AbortController&&(kn=new AbortController,T.http.interceptors.request.use((e=>{var t;return(0,o.Z)((0,o.Z)({},e),{},{options:(0,o.Z)((0,o.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:kn.signal})})})));var t=I();(0,s.Z)(this,eo,t.location);var r=0;return t.listen(function(){var t=(0,a.Z)((function*(t,n){var a,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,eo).key&&!1!==(null===(a=(0,l.Z)(e,eo).state)||void 0===a?void 0:a.notify))||(v.key=void 0),((0,f.locationsAreEqual)((0,o.Z)((0,o.Z)({},(0,l.Z)(e,eo)),v),(0,o.Z)((0,o.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,no))||void 0===d?void 0:d.didPerformIncrementalRender(t)),r===p)if(u)(0,s.Z)(e,eo,t);else{if(kn&&(kn.abort(),kn=new AbortController),(0,s.Z)(e,eo,t),null===(c=(0,l.Z)(e,no))||void 0===c||c.dispatchPageLeave(),"POP"===n&&b(g((0,l.Z)(e,Yn),t.pathname)))return void window.location.reload();(0,l.Z)(e,Xn)?(0,s.Z)(e,to,t):(0,C.Z)(e,fo,yo).call(e,t).catch(cr)}}));return function(e,r){return t.apply(this,arguments)}}()),(0,C.Z)(this,fo,yo).call(this,t.location)}}function mo(e){var t,r=I(),n=r.getBlockMessage();null===(t=(0,l.Z)(this,no))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function go(e,t,r){var n,o;if((0,s.Z)(this,ao,(n=(0,l.Z)(this,ao),o=n++,n)),o>10){var a='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(a)}I().replace(e,t)}function yo(e){return bo.apply(this,arguments)}function bo(){return(bo=(0,a.Z)((function*(e){(0,s.Z)(this,Xn,!0);try{yield(0,C.Z)(this,vo,wo).call(this,e)}finally{if((0,s.Z)(this,Xn,!1),(0,l.Z)(this,to)){var t=(0,l.Z)(this,to);(0,s.Z)(this,to,void 0),yield(0,C.Z)(this,fo,yo).call(this,t)}}}))).apply(this,arguments)}function wo(e){return So.apply(this,arguments)}function So(){return So=(0,a.Z)((function*(e){var t,r,n=this;(0,s.Z)(this,io,(0,m.uniqueId)("render-id-1")),Ye=new WeakSet,tt.clear(),null==Io||null===(t=Io.flowApi)||void 0===t||t.clearCollectWidgetContract(),I().unblock();var i=performance.now(),c=g((0,l.Z)(this,Yn),e.pathname),u=null===(r=(0,l.Z)(this,ro))||void 0===r?void 0:r.app;null!=c&&c.app&&(yield function(e){return Jn.apply(this,arguments)}(c));var d,p=(0,s.Z)(this,so,null==c?void 0:c.app),f=u&&p?u.id!==p.id:u!==p,v=To().getFeatureFlags(),h=(0,l.Z)(this,no),y=(t,r)=>{(0,l.Z)(this,oo).add(h),(0,C.Z)(this,po,go).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:zr.ROOT,container:w,createPortal:S},k=()=>{var e;for(var t of(wn(w),wn(S),(0,l.Z)(this,oo).add(h),(0,l.Z)(this,oo)))t&&(t.dispatchOnUnmount(),t.dispose());(0,l.Z)(this,oo).clear(),null==Io||null===(e=Io.messageDispatcher)||void 0===e||e.reset(),f&&((0,s.Z)(this,lo,u),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:u,currentApp:p}})))};if(Y(p&&(ne()[p.id]||p.theme)||"light"),ae("default"),p){var Z,A,O,R,P,_;null==Io||null===(Z=Io.checkInstalledApps)||void 0===Z||Z.preCheckInstalledApps(c,(e=>!!Lo(e)));var M={bailout:e=>e.unauthenticated?(b(),!0):e.redirect?(y(e.redirect.path,e.redirect.state),!0):void(0,s.Z)(this,ao,0),mergeMenus:(d=(0,a.Z)((function*(e){var t=yield Promise.all(e);(0,s.Z)(n,co,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(!ar(t)||window.NO_AUTH_GUARD){if(!(t instanceof T.HttpAbortError)){var n=To().getMiscSettings().noAuthGuardLoginPath;return ar(t)&&n?void y(n,{from:e}):{failed:!0,output:{node:{tag:zr.BRICK,type:"div",properties:{textContent:or(t)},runtimeContext:null,return:r},blockingList:[],menuRequests:[]}}}(0,l.Z)(this,oo).add(h)}else b()}},x=(0,s.Z)(this,no,new Fn("page",{routeHelper:M})),B=(0,s.Z)(this,ro,{app:p,location:e,query:new URLSearchParams(e.search),flags:v,sys:(0,o.Z)((0,o.Z)((0,o.Z)({},null==Io||null===(A=Io.auth)||void 0===A?void 0:A.getAuth()),qn()),{},{settings:{brand:To().getBrandSettings()}}),ctxStore:new Ur("CTX",void 0,x),pendingPermissionsPreCheck:[null==Io||null===(O=Io.checkPermissions)||void 0===O?void 0:O.preCheckPermissions(c)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,s.Z)(this,co,void 0),Gn(c),he(null===(R=c.meta)||void 0===R?void 0:R.functions,p),null==Io||null===(P=Io.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=pn(B),yield fn(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(),Sn(E),window.scrollTo(0,0),!U)for(var j of(x.dispatchPageLoad(),x.dispatchAnchorLoad(),x.dispatchOnMount(),x.initializeScrollIntoView(),x.initializeMediaChange(),x.initializeMessageDispatcher(),N))j.mountAsyncData();var $=performance.now()-i;return void window.dispatchEvent(new CustomEvent("route.render",{detail:{renderTime:$}}))}}else{if(!window.NO_AUTH_GUARD&&null!=Io&&Io.auth&&!Io.auth.isLoggedIn())return void b();k()}te(),se();var K={tag:zr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:E};E.child=K,Sn(E),window.scrollTo(0,0)})),So.apply(this,arguments)}var Eo,ko,Zo,Io,Ao="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function Co(e){if(Eo)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===j){var r=t.payload;switch(null==r?void 0:r.type){case $:D=r.active;break;case K:F=r.panel}}})),Io=null==e?void 0:e.hooks,(0,c.initializeI18n)(tr,rr),p.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{p.locale(c.i18n.language)})),Z(),Eo=new Po}function To(){return Eo}var Oo=new WeakMap,Ro=new WeakMap;class Po{constructor(){(0,i.Z)(this,Oo,{writable:!0,value:!1}),(0,i.Z)(this,Ro,{writable:!0,value:!1})}initialize(e){var t,r;if((0,l.Z)(this,Oo))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,Oo,!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),ko=e;var n,{notification:o,dialog:a}=null!==(t=null===(r=e.settings)||void 0===r?void 0:r.presetBricks)&&void 0!==t?t:{};!1!==o&&(n=null!=o?o:"basic.show-notification",(0,this.loadBricks)([n]).then((()=>{sr=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==a&&function(e,t){t([e]).then((()=>{Ht=document.createElement(e)}),(e=>{console.error("Load dialog service failed:",e)}))}(null!=a?a:"basic.show-dialog",this.loadBricks)}bootstrap(e){var t=this;return(0,a.Z)((function*(){if(e&&t.initialize(e),(0,l.Z)(t,Ro))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,Ro,!0),Zo=new ho(ko.storyboards),yield Zo.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=Zo)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=Zo)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return ze(e,t)}getFeatureFlags(){var e,t;return(0,o.Z)((0,o.Z)((0,o.Z)({},null===(e=ko)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=Zo)||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,o.Z)((0,o.Z)({},null===(e=ko)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=Zo)||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,o.Z)({base_title:"DevOps 管理专家"},null===(e=ko)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.brand)}getLaunchpadSettings(){var e;return(0,o.Z)({columns:7,rows:4},null===(e=ko)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=ko)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=ko)||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=Zo)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,_o())}}function _o(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=null===(n=ko)||void 0===n?void 0:n.brickPackages)&&void 0!==r?r:Ao)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function Mo(){var e;return null===(e=Zo)||void 0===e?void 0:e.getRenderId()}function xo(){var e;return null===(e=Zo)||void 0===e?void 0:e.getRuntimeContext()}function Bo(e){var t;return null===(t=ko)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function Lo(e){var t;return null===(t=Bo(e))||void 0===t?void 0:t.app}function Uo(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null==Io||null===(e=Io.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function No(){var e;return null==Io||null===(e=Io.auth)||void 0===e?void 0:e.getAuth()}function Fo(){var e,t;return null==Io||null===(e=Io.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function jo(){var e;return null==Io||null===(e=Io.auth)||void 0===e?void 0:e.isLoggedIn()}function $o(e,t,r){return Ko.apply(this,arguments)}function Ko(){return(Ko=(0,a.Z)((function*(e,t,r){return ot(yield Je(e),e,"resolve",t,r)}))).apply(this,arguments)}function Do(e){var t,{portal:r,scope:n="fragment",unknownBricks:o}=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,a.Z)((function*(){var{theme:a,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 Fn(n,{unknownBricks:o});var g={ctxStore:new Ur("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},y={tag:zr.ROOT,container:e,createPortal:t};if("page"===n){var b;Y(null!=a?a:"light"),ae("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),Gn(S),he(p,w)}g.ctxStore.define(d,g);var E,k=!1,Z=[];try{E=yield sn(y,h,g,s,[]),Z=pn(g),yield fn(E,g,Z)}catch(e){k=!0,E={node:{tag:zr.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(),wn(e),i&&wn(i),"page"===n&&(k||s.dispatchBeforePageLoad(),te(),se()),Sn(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,wn(e),i&&(wn(i),r||i.remove()))}}}function Wo(e,t){return Vo.apply(this,arguments)}function Vo(){return(Vo=(0,a.Z)((function*(e,t){var r,n,a,[i,s,l]=vn((0,o.Z)((0,o.Z)({},xo()),{},{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 Fn("fragment"),u={tag:zr.ROOT,createPortal:null},d=e.transform,p=Ce();d&&Te(p,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var f=yield cn(u,p?e:(0,o.Z)((0,o.Z)({},e),{},{properties:(0,o.Z)((0,o.Z)({},e.properties),d)}),i,c,[]),v=[...s,...l];if(yield fn(f,i,v),null!==(a=f.node)&&void 0!==a&&a.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 Ho(e,t){var r,{renderRoot:n,rendererContext:o,scopedStores:a}=e;for(var i of(n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},Sn(n,t),o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher(),a))i.mountAsyncData();return{portal:r}}function zo(e,t){var{rendererContext:r}=e;t.portal&&(wn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function qo(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return wt(t,(0,o.Z)((0,o.Z)({},xo()),{},{data:e}),{noInject:!0})}function Go(e,t){var r=Bo(e);Object.assign(r,(0,o.Z)((0,o.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),B(r)}function Jo(e,t){var r=Bo(e),n=!1,o=e=>"".concat(e.path,".").concat(e.exact),a=(e,r)=>e.map((e=>{var i=o(e);return"routes"===e.type?(e.routes=a(e.routes,r),e):i===r?(n=!0,t):e}));r.routes=a(r.routes,o(t)),n||r.routes.unshift(t)}function Qo(e,t,r){var n="".concat(e,".").concat(t.name);Pe.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),Yo(e,t.name,r)}function Yo(e,t,r){ra(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Xo(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function ea(e,t){var r;ra(e,Xo(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}],t.context)}var ta=ea;function ra(e,t,r,n){var{routes:o}=Bo(e),a=o.findIndex((e=>e.path===t)),i={path:t,bricks:r,context:n,menu:!1,exact:!0};-1===a?o.unshift(i):o.splice(a,1,i)}function na(e,t){var{tplStateStoreId:r}=t,n=xo();return r?_e((0,o.Z)((0,o.Z)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function oa(e){var{tplStateStoreId:t}=e,r=xo();return t?_e((0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function aa(e){return _o().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function ia(){return Mo()}function sa(e,t){return la.apply(this,arguments)}function la(){return(la=(0,a.Z)((function*(e,t){var r,{appId:n,updateStoryboardType:o,provider:a}=t,i=Bo(n);if("route"===o)r={routes:[e]};else if("template"===o)r={meta:{customTemplates:[e]}};else if("snippet"===o){var s,l=Xo(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&&a){yield(0,u.loadBricksImperatively)([a],_o());var d=document.createElement(a);(yield d.resolve(r)).forEach((e=>{var t,[r,n,o]=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===o))||c.push(e)}))}return c}))).apply(this,arguments)}}}]);
|
|
2
|
-
//# sourceMappingURL=7782.3293aac7.js.map
|