@next-bricks/data-view 0.14.1 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/{3458.4c99153d.js → 3458.49e46648.js} +2 -2
  3. package/dist/chunks/{8691.dcf26a0c.js.map → 3458.49e46648.js.map} +1 -1
  4. package/dist/chunks/3494.2ac2c572.js +2 -0
  5. package/dist/chunks/3494.2ac2c572.js.map +1 -0
  6. package/dist/chunks/4550.18341e69.js +2 -0
  7. package/dist/chunks/4550.18341e69.js.map +1 -0
  8. package/dist/chunks/{5636.e1796a6a.js → 5636.8046938c.js} +2 -2
  9. package/dist/chunks/{5636.e1796a6a.js.map → 5636.8046938c.js.map} +1 -1
  10. package/dist/chunks/{6205.47b27d26.js → 6205.fe7ef46f.js} +2 -2
  11. package/dist/chunks/{6205.47b27d26.js.map → 6205.fe7ef46f.js.map} +1 -1
  12. package/dist/chunks/6301.1f3fd7fe.js +2 -0
  13. package/dist/chunks/6301.1f3fd7fe.js.map +1 -0
  14. package/dist/chunks/{7164.272521bc.js → 7164.5ceba161.js} +2 -2
  15. package/dist/chunks/{7164.272521bc.js.map → 7164.5ceba161.js.map} +1 -1
  16. package/dist/chunks/7782.cc445401.js +2 -0
  17. package/dist/chunks/7782.cc445401.js.map +1 -0
  18. package/dist/chunks/7822.aee914cb.js +2 -0
  19. package/dist/chunks/7822.aee914cb.js.map +1 -0
  20. package/dist/chunks/{8691.dcf26a0c.js → 8691.1f6ac1b8.js} +2 -2
  21. package/dist/chunks/{3458.4c99153d.js.map → 8691.1f6ac1b8.js.map} +1 -1
  22. package/dist/chunks/{complex-search.9df082ca.js → complex-search.e46ab236.js} +2 -2
  23. package/dist/chunks/{complex-search.9df082ca.js.map → complex-search.e46ab236.js.map} +1 -1
  24. package/dist/chunks/{graph-text.e6e84fc4.js → graph-text.9e3f6f43.js} +2 -2
  25. package/dist/chunks/{graph-text.e6e84fc4.js.map → graph-text.9e3f6f43.js.map} +1 -1
  26. package/dist/chunks/{main.1cc50c45.js → main.239ba5f2.js} +2 -2
  27. package/dist/chunks/{main.1cc50c45.js.map → main.239ba5f2.js.map} +1 -1
  28. package/dist/chunks/modern-style-treemap.6dd5618b.js +3 -0
  29. package/dist/chunks/modern-style-treemap.6dd5618b.js.map +1 -0
  30. package/dist/{index.6404f146.js → index.1f94ec29.js} +2 -2
  31. package/dist/{index.6404f146.js.map → index.1f94ec29.js.map} +1 -1
  32. package/dist/manifest.json +55 -55
  33. package/dist/types.json +131 -131
  34. package/package.json +2 -2
  35. package/dist/chunks/3494.b3abd8ab.js +0 -2
  36. package/dist/chunks/3494.b3abd8ab.js.map +0 -1
  37. package/dist/chunks/6301.be3f60e6.js +0 -2
  38. package/dist/chunks/6301.be3f60e6.js.map +0 -1
  39. package/dist/chunks/7782.bb582139.js +0 -2
  40. package/dist/chunks/7782.bb582139.js.map +0 -1
  41. package/dist/chunks/7822.fef16e7a.js +0 -2
  42. package/dist/chunks/7822.fef16e7a.js.map +0 -1
  43. package/dist/chunks/9526.b1b920ff.js +0 -2
  44. package/dist/chunks/9526.b1b920ff.js.map +0 -1
  45. package/dist/chunks/modern-style-treemap.52ca84fd.js +0 -3
  46. package/dist/chunks/modern-style-treemap.52ca84fd.js.map +0 -1
  47. package/dist-types/utils/debounceByAnimationFrame.d.ts +0 -4
  48. package/dist-types/utils/debounceByAnimationFrame.spec.d.ts +0 -1
  49. /package/dist/chunks/{modern-style-treemap.52ca84fd.js.LICENSE.txt → modern-style-treemap.6dd5618b.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
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(4594),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(1433);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.272521bc.js.map
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 +1 @@
1
- {"version":3,"file":"chunks/7164.272521bc.js","mappings":"sOAEIA,GAAc,EACdC,EAAwB,IAAIC,IACzB,SAASC,EAAeC,EAAIC,GAyBjC,GAxBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAIjD,IAAK,IAAKgB,EAAMF,KADhBjB,EAAsBoB,IAAIjB,GACIkB,OAAOC,QAAQlB,IAC3C,EAAAC,KAAKkB,kBAAkBJ,EAAMhB,EAAIc,EAErC,C,cClCO,SAASO,EAASC,GACvB,IAAIC,EACJ,GAAKD,EAAL,CAGA,IAAIE,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAEzG,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,IAAIE,EAAkBF,EAASG,MAAM,KAAK,GAC1C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,IAAIC,EAAS,GAAGC,OAAOJ,EAAiB,KACxC,IAAK,IAAIK,KAAOb,OAAOc,KAAKV,GAC1B,GAAIS,EAAIE,WAAWJ,GACjB,OAAOP,EAAKS,EAnBhB,CAsBF,CC3BO,IAAI7B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nvar initialized = false;\nvar initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (var [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n var language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n var primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n var prefix = \"\".concat(primaryLanguage, \"-\");\n for (var key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport var i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","lang","add","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","concat","key","keys","startsWith"],"sourceRoot":""}
1
+ {"version":3,"file":"chunks/7164.5ceba161.js","mappings":"sOAEIA,GAAc,EACdC,EAAwB,IAAIC,IACzB,SAASC,EAAeC,EAAIC,GAyBjC,GAxBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAGfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAIjD,IAAK,IAAKgB,EAAMF,KADhBjB,EAAsBoB,IAAIjB,GACIkB,OAAOC,QAAQlB,IAC3C,EAAAC,KAAKkB,kBAAkBJ,EAAMhB,EAAIc,EAErC,C,cClCO,SAASO,EAASC,GACvB,IAAIC,EACJ,GAAKD,EAAL,CAGA,IAAIE,EAAgD,QAApCD,EAAiB,EAAArB,KAAKsB,gBAAyC,IAAnBD,EAA4BA,EAAiB,QAEzG,IAAI,IAAAE,gBAAeH,EAAME,GACvB,OAAOF,EAAKE,GAGd,IAAIE,EAAkBF,EAASG,MAAM,KAAK,GAC1C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeH,EAAMI,GAAmBJ,EAAKI,QAAmBE,EAKzE,IAAIC,EAAS,GAAGC,OAAOJ,EAAiB,KACxC,IAAK,IAAIK,KAAOb,OAAOc,KAAKV,GAC1B,GAAIS,EAAIE,WAAWJ,GACjB,OAAOP,EAAKS,EAnBhB,CAsBF,CC3BO,IAAI7B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nvar initialized = false;\nvar initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (var [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n var _i18n$language;\n if (!data) {\n return;\n }\n var language = (_i18n$language = i18n.language) !== null && _i18n$language !== void 0 ? _i18n$language : \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n var primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n var prefix = \"\".concat(primaryLanguage, \"-\");\n for (var key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport var i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","lang","add","Object","entries","addResourceBundle","i18nText","data","_i18n$language","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","concat","key","keys","startsWith"],"sourceRoot":""}
@@ -0,0 +1,2 @@
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:()=>er,Notification:()=>sr,StoryboardFunctionRegistryFactory:()=>pe,__secret_internals:()=>n,__test_only:()=>{},applyTheme:()=>ee,authenticate:()=>Ao,batchSetAppsLocalTheme:()=>te,checkIfByTransform:()=>Ct,checkIfOfComputed:()=>It,createHistory:()=>k,createRuntime:()=>mo,customProcessors:()=>M,customTemplates:()=>Pe,fetchByProvider:()=>Po,getAuth:()=>Co,getBasePath:()=>v,getCssPropertyValue:()=>se,getCurrentMode:()=>ae,getCurrentTheme:()=>X,getHistory:()=>Z,getPageInfo:()=>Un,getRuntime:()=>go,handleHttpError:()=>ir,httpErrorToString:()=>tr,isLoggedIn:()=>Oo,isUnauthenticatedError:()=>rr,logout:()=>To,matchPath:()=>$t,registerWidgetFunctions:()=>Be,registerWidgetI18n:()=>L,unstable_createRoot:()=>_o});var n={};r.r(n),r.d(n,{getAddedContracts:()=>Jo,getAllContextValues:()=>zo,getBrickPackagesById:()=>Go,getContextValue:()=>Ho,getRenderId:()=>qo,legacyDoTransform:()=>Uo,mountUseBrick:()=>Bo,renderUseBrick:()=>Mo,unmountUseBrick:()=>Lo,updateSnippetPreviewSettings:()=>Vo,updateStoryboard:()=>No,updateStoryboardByRoute:()=>Fo,updateStoryboardBySnippet:()=>Do,updateStoryboardByTemplate:()=>jo,updateTemplatePreviewSettings:()=>$o});var o=r(3028),a=r(4795),i=r(3395),s=r(381),l=r(687),c=r(5188),u=r(993),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)||void 0===r||null===(r=r.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]&&("/"===o?t===o:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(o.replace(/\/+$/,""),"/"))))return n}}function y(e){var t;return!e||(null===(t=go().getCurrentApp())||void 0===t?void 0:t.id)!==e.app.id&&!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var b,w=["extraQuery","clear","keepHash"],S=!1;function E(e,t){t(!(S=!confirm(e)))}function k(){if(!b){var e=(0,f.createBrowserHistory)({basename:v().replace(/\/$/,""),getUserConfirmation:E});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function a(e,t,n){S=!1,r(e,t),null==n||n(S)}function i(e,t,r){S=!1,n(e,t),null==r||r(S)}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,w),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("/")&&y(function(e){var t,r;return g(null!==(t=null===(r=po)||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)),b=e}return b}function Z(){var e;return null!==(e=b)&&void 0!==e?e:function(){var{dll:e}=window;if("function"==typeof e)return e("tYg3").getHistory()}()}var I=r(5866),A=r(6171),C=r(5566),T=r(8440),O=r(9482),P=r(534),R=r(3695),_=new WeakMap,M=new class{constructor(){(0,i.Z)(this,_,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),o=(0,l.Z)(this,_).get(r);if(o||(o=new Map,(0,l.Z)(this,_).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,_).get(e)}};function x(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=B("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 B(e,t){return"".concat(e,"/").concat(t)}function L(e,t){var r=B("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;c.i18n.addResourceBundle(t,r,n)}))}function U(e){return c.i18n.getFixedT(null,B("widget",e))}var N,F="brick-next-devtools-panel",j="devtools-frame-active-change",$="devtools-panel-change",K=!0;function D(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var V=()=>{throw new Error("Can't modify read-only proxy object")},W={set:V,defineProperty:V,deleteProperty:V,setPrototypeOf:V};function H(e){return new Proxy(e,W)}function z(e){var{get:t,ownKeys:r}=e;return D()?H(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var G="light",q=new d.JsonStorage(localStorage),J="apps-theme";function Q(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));G=e}function Y(){return G}function X(){return document.documentElement.dataset.theme}function ee(e){e?Q(e):e=Y(),e!==X()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function te(e){q.setItem(J,(0,o.Z)((0,o.Z)({},re()),e))}function re(){var e,t;try{t=q.getItem(J)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var ne="default";function oe(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));ne=e}function ae(){return document.documentElement.dataset.mode}function ie(e){e?oe(e):e=ne,e!==ae()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function se(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 le(e,t){var r={};for(var n of e){var o=ce(n,t);void 0!==o&&(r[n]=o)}return r}function ce(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==vo||null===(r=vo.images)||void 0===r?void 0:r.widgetImagesFactory(i,s):null==vo||null===(n=vo.images)||void 0===n?void 0:n.imagesFactory(l.id,l.isBuildPush,l.currentVersion);case"I18N":return a?m.identity:i?U(i):c.i18n.getFixedT(null,[u,B("app",l.id)].filter(Boolean));case"I18N_TEXT":return a?ue:c.i18nText;case"PERMISSIONS":return H({check:a?de:null==vo||null===(o=vo.checkPermissions)||void 0===o?void 0:o.checkPermissions});case"THEME":return H({getTheme:a?()=>"light":Y});case"console":return p?H(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 ue(e){return null==e?void 0:e.en}function de(){return!0}function pe(){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,T.precookFunction)(l.source,{typescript:l.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return l.cooked=(0,T.cook)(c.function,l.source,{rules:{noVar:!0},globalVariables:(0,P.supply)(c.attemptToVisitGlobals,le(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:fe,registerStoryboardFunctions:ve,checkPermissionsUsage:he}=pe(),me={};try{me.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)})),me.EventTarget=a}(Object,new WeakMap)}const ge=me.EventTarget;var ye=function(e){return e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall",e}({}),be=new Map([[ye.xLarge,"1920px"],[ye.large,"1600px"],[ye.medium,"1280px"],[ye.small,"1024px"],[ye.xSmall,0]]),we=new ge,Se={},Ee={};function ke(e,t){var r=!1;for(var[n]of(Se[t]=e.matches,be))if(Se[n]&&Ee.breakpoint!==n){Ee.breakpoint=n,r=!0;break}r&&we.dispatchEvent(new CustomEvent("change",{detail:Ee}))}be.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));ke(r,t),r.addEventListener?r.addEventListener("change",(e=>{ke(e,t)})):r.addListener((e=>{ke(e,t)}))}));var Ze=()=>Ee;function Ie(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 Ae(e){var t,r;return!(null===(t=e?e.flags:null===(r=go())||void 0===r?void 0:r.getFeatureFlags())||void 0===t||!t["brick-next-v3-strict-mode"])}function Ce(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 Te=new Set(["prefix"]),Oe=new WeakMap,Pe=new class{constructor(){(0,i.Z)(this,Oe,{writable:!0,value:new Map})}define(e,t){var r,n,a,i,s=(0,l.Z)(this,Oe).has(e);s?console.warn('Custom template of "'.concat(e,'" already registered.')):(s=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var c=Ae(),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?(Ce(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,Oe).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&&!Te.has(e)));if(k.length>0&&(Ce(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[P,R]of w)O(P,R);customElements.define(e,t)}}get(e){return(0,l.Z)(this,Oe).get(e)}};function Re(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 _e(e,t,r){var n=Re(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 Me=new Map,xe=new Proxy(Object.freeze({}),{get:(e,t)=>Me.get(t)});function Be(e,t,r){if(Me.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:o}=pe({widgetId:e,widgetVersion:r});Me.set(e,n),o(t)}const Le=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Ue=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(Le);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Ne=e=>"*"===e||"x"===e||"X"===e,Fe=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},je=(e,t)=>{if(Ne(e)||Ne(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(Fe(e),Fe(t));return r>n?1:r<n?-1:0},$e=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=je(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},Ke=(e,t,r)=>{We(r);const n=((e,t)=>{const r=Ue(e),n=Ue(t),o=r.pop(),a=n.pop(),i=$e(r,n);return 0!==i?i:o&&a?$e(o.split("."),a.split(".")):o||a?o?-1:1:0})(e,t);return De[r].includes(n)},De={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Ve=Object.keys(De),We=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 He(e,t){var r=Io(e);if(!r&&null!=vo&&vo.checkInstalledApps&&(r=vo.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 Ke(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}function ze(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 qe(e){return Je.apply(this,arguments)}function Je(){return Je=(0,a.Z)((function*(e){var t,r=null==vo||null===(t=vo.flowApi)||void 0===t?void 0:t.isFlowApiProvider(e);r&&(e=vo.flowApi.FLOW_API_PROVIDER);var n=Ge.get(e);if(n)return n;if(e.includes("-")&&!customElements.get(e))if(r)vo.flowApi.registerFlowApiProvider();else if(yield(0,u.loadBricksImperatively)([e],So()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'));return n=document.createElement(e),Ge.set(e,n),n})),Je.apply(this,arguments)}var Qe=new WeakSet;function Ye(e){if((0,d.isObject)(e)&&!Xe(e))if(Qe.add(e),Array.isArray(e))e.forEach(Ye);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Ye)}}function Xe(e){return Qe.has(e)}var et=new Map;function tt(e,t,r){return rt.apply(this,arguments)}function rt(){return(rt=(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=Ae();if(Ce(d,"`resolve.field`"),d)throw new Error("Using deprecated `resolve.field`")}var p,[f,v]=yield Promise.all([qe(n),gt(i,t)]),h=nt(f,n,a,v,r,i),{transform:g}=e;try{var y=yield h;Ye(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}:gt(g,(0,o.Z)((0,o.Z)({},t),{},{data:p})):p}))).apply(this,arguments)}function nt(e,t,r,n,o,a){return ot.apply(this,arguments)}function ot(){return ot=(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=et.get(s)),l||(l=(0,a.Z)((function*(){var o,a=null!=vo&&null!==(o=vo.flowApi)&&void 0!==o&&o.isFlowApiProvider(t)?yield vo.flowApi.getArgsOfFlowApi(t,n,r):n;return e.resolve(...a)}))(),et.set(s,l)),l})),ot.apply(this,arguments)}var at=Symbol.for("pre.evaluated.raw"),it=Symbol.for("pre.evaluated.context");function st(e){return!(null==e||!e[at])}function lt(e){return e[at]}function ct(e){return"string"==typeof e?(0,T.shouldAllowRecursiveEvaluations)(e):(0,T.shouldAllowRecursiveEvaluations)(e[at])}var ut=new WeakSet([SyntaxError,TypeError,ReferenceError]);function dt(e){return ut.has(e.constructor)?e.constructor:TypeError}function pt(){return(pt=(0,a.Z)((function*(e,t,r){var{blockingList:n,run:o}=ft(e,t,r,!0);return yield Promise.all(n),o()}))).apply(this,arguments)}function ft(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[it]),i),e=e[at]}var s,l={usedArgs:new Set},c={usedArgs:new Set};try{s=(0,T.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(dt(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?{[at]:e,[it]:t}:e};var w,S,E=Ae(t);(b.has("STATE")||!E&&b.has("TPL"))&&(g=Re(t,"STATE",': "'.concat(e,'"'))),b.has("FORM_STATE")&&(S=ze(t,"FORM_STATE",': "'.concat(e,'"')));var k=D();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,So())))}if(n){var A,C=b.has("PERMISSIONS");if(!C&&b.has("FN")){var O=[...(0,R.strictCollectMemberUsage)(e,"FN")];C=he(O)}if(C&&a.push(...t.pendingPermissionsPreCheck),l.usedArgs.size>0&&null!=vo&&vo.menu){var _=[...l.usedArgs];a.push(Promise.all(_.map((e=>vo.menu.fetchMenuById(e,t,{getStoryboardByAppId:Zo,resolveData:tt,asyncComputeRealValue:gt})))))}c.usedArgs.size>0&&a.push(null==vo||null===(A=vo.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,O=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)(O)),{},{getMenu:null==vo||null===(n=vo.menu)||void 0===n?void 0:n.getMenuById});break;case"CTX":y[R]=z({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]=H(k);break;case"FORM_STATE":y[R]=z({get:(e,t)=>S.getValue(t),ownKeys:()=>Array.from(w)});break;case"HASH":y[R]=c.hash;break;case"INSTALLED_APPS":y[R]=H({has:He});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]=H({getItem:Ie("local")});break;case"MEDIA":y[R]=H(Ze());break;case"MISC":y[R]=go().getMiscSettings();break;case"PARAMS":y[R]=new URLSearchParams(u);break;case"PATH":y[R]=H(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]=z({get(e,t){var r=M.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return z({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]=H({getItem:Ie("session")});break;case"TPL":if(Ce(E,'Using "TPL" in expression','check your expression: "'.concat(e,'"')),E)break;case"STATE":y[R]=z({get:(e,t)=>g.getValue(t),ownKeys:()=>Array.from(h)});break;case"SYS":y[R]=H(null!=Z?Z:{});break;case"__WIDGET_FN__":y[R]=xe;break;case"__WIDGET_IMG__":y[R]=null==vo||null===(i=vo.images)||void 0===i?void 0:i.widgetImagesFactory;break;case"__WIDGET_I18N__":y[R]=U}Object.assign(y,le(s.attemptToVisitGlobals,{storyboardFunctions:fe,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{var _=(0,T.cook)(s.expression,s.source,{globalVariables:(0,P.supply)(s.attemptToVisitGlobals,y)});return function(e,t){var r=D();if(r&&K&&(!N||"Evaluations"===N)){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:_}),_}catch(t){var x="".concat(t.message,', in "').concat(e,'"');throw new(dt(t))(x)}}}}var vt=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 ht(e){switch(e){case vt.USE_BRICK_PROPERTIES:case vt.USE_BRICK_TRANSFORM:case vt.USE_BRICK_EVENTS:case vt.USE_BRICK_IF:case vt.USE_BRICK_LIFECYCLE:case vt.USE_BRICK_DATA_SOURCE:return!0}return!1}function mt(e,t,r){if(ht(e))return e;if(t)switch(e){case vt.USE_BRICK:return vt.USE_BRICK_ITEM;case vt.USE_BRICK_SLOTS_ITEM_BRICKS:return vt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case vt.INITIAL:if("useBrick"===r)return vt.USE_BRICK;break;case vt.USE_BRICK:case vt.USE_BRICK_ITEM:case vt.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return vt.USE_BRICK_PROPERTIES;case"transform":return vt.USE_BRICK_TRANSFORM;case"dataSource":return vt.USE_BRICK_DATA_SOURCE;case"events":return vt.USE_BRICK_EVENTS;case"slots":return vt.USE_BRICK_SLOTS;case"children":return vt.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return vt.USE_BRICK_IF;case"lifeCycle":return vt.USE_BRICK_LIFECYCLE}break;case vt.USE_BRICK_SLOTS:return vt.USE_BRICK_SLOTS_ITEM;case vt.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return vt.USE_BRICK_SLOTS_ITEM_BRICKS}return vt.INITIAL}function gt(e,t){return yt.apply(this,arguments)}function yt(){return yt=(0,a.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=st(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&ht(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=yield function(e,t,r){return pt.apply(this,arguments)}(e,t,{lazy:a}),i=ct(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?O.transform:O.transformAndInject:r.noInject?St:O.inject)(e,t),i||Ye(o),o}if(!(0,d.isObject)(e)||Xe(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=wt(r,!0);return Promise.all(e.map((e=>gt(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,o]=e;return Promise.all([gt(n,t),gt(o,t,wt(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),yt.apply(this,arguments)}function bt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=st(e);if(n||"string"==typeof e){var o,a=r.$$lazyForUseBrick&&ht(r.$$stateOfUseBrick),i=a;return n||(0,T.isEvaluable)(e)?(o=function(e,t,r){var{run:n}=ft(e,t,void 0,!1);return n()}(e,t),i=ct(e)):o=a?e:((0,d.hasOwnProperty)(t,"data")?r.noInject?O.transform:O.transformAndInject:r.noInject?St:O.inject)(e,t),i||Ye(o),o}if(!(0,d.isObject)(e)||Xe(e)||"function"==typeof e)return e;if(Array.isArray(e)){var s=wt(r,!0);return e.map((e=>bt(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,o]=e;return[bt(n,t),bt(o,t,wt(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function wt(e,t,r){return e.$$lazyForUseBrick?(0,o.Z)((0,o.Z)({},e),{},{$$stateOfUseBrick:mt(e.$$stateOfUseBrick,t,r)}):e}function St(e){return e}function Et(e,t){return kt.apply(this,arguments)}function kt(){return(kt=(0,a.Z)((function*(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||st(e.if)?yield gt(e.if,t):e.if)}))).apply(this,arguments)}function Zt(e,t){return!(0,d.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||st(e.if)?bt(e.if,t):e.if)}function It(e){return!(0,d.hasOwnProperty)(e,"if")||!!e.if}function At(){return(At=(0,a.Z)((function*(e,t){return(0,d.isObject)(e.if)&&!st(e.if)?It(yield tt(e.if,t)):Et(e,t)}))).apply(this,arguments)}function Ct(e,t){return Zt(e,{data:t})}function Tt(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,T.isEvaluable)(e):st(e)){var o="string"==typeof e?e:lt(e);if((0,T.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 Ot(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 Rt(){return(Rt=(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 _t(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 Mt(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=bt(n,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===r?vt.USE_BRICK:vt.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=>{_t(e,n)}))}function xt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Bt(e){return e&&e.sensitive?"":"i"}function Lt(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(xt(void 0===f?"":f),"]|$"),h="[".concat(xt(p),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var b=y[g];if("string"==typeof b)m+=xt(u(b));else{var w=xt(u(b.prefix)),S=xt(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,Bt(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(xt(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 Ut(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 Ut(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),Bt(r))}(e,t,r):Lt(e,t,r)}var Nt=new Map,Ft=1e4,jt=0;function $t(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=Nt.get(r);n||Nt.set(r,n=new Map);var o=n.get(e);if(o)return o;var a=[],i={regexp:Ut(e,a,t),keys:a};return jt<Ft&&(n.set(e,i),jt++),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 Kt(){return(Kt=(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=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),o=$t(t.location.pathname,{path:n,exact:r.exact});if(o&&(yield Et(r,t)))return t.app.noAuthGuard||r.public||null==vo||!vo.auth||vo.auth.isLoggedIn()?{match:o,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var Dt,Vt=Symbol.for("tpl.asyncComputedPropsFromHost"),Wt=Symbol.for("tpl.stateStoreId"),Ht=Symbol.for("tpl.externalForEachItem"),zt=r(6666),Gt=new Set,qt=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}({}),Jt={[qt.REQUEST_FAILED]:"Request Failed",[qt.SOMETHING_WENT_WRONG]:"Something went wrong!",[qt.LOGIN_TIMEOUT_MESSAGE]:"You haven't logged in or your login session has expired. Login right now?",[qt.NETWORK_ERROR]:"Network error, please check your network."},Qt={[qt.REQUEST_FAILED]:"请求失败",[qt.SOMETHING_WENT_WRONG]:"出现了一些问题!",[qt.LOGIN_TIMEOUT_MESSAGE]:"您还未登录或登录信息已过期,现在重新登录?",[qt.NETWORK_ERROR]:"网络错误,请检查您的网络连接。"},Yt="core/runtime",Xt={en:Jt,zh:Qt},er=Object.freeze({show:function(e){return Dt?Dt.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 tr(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof C.HttpFetchError)return c.i18n.t("".concat(Yt,":").concat(qt.NETWORK_ERROR));if(e instanceof C.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 rr(e){return e instanceof C.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var nr,or,ar=!1;function ir(e){if(!(e instanceof C.HttpAbortError)){if(rr(e)&&!window.NO_AUTH_GUARD){if(ar)return;return ar=!0,void er.show({type:"confirm",content:c.i18n.t("".concat(Yt,":").concat(qt.LOGIN_TIMEOUT_MESSAGE))}).then((()=>{var e,t;e=go().getFeatureFlags()["sso-enabled"],(t=Z()).push(e?"/sso-auth/login":"/auth/login",{from:(0,o.Z)((0,o.Z)({},t.location),{},{state:void 0})}),ar=!1}),(()=>{ar=!1}))}console.error(e);var t=tr(e);t!==nr&&(nr=t,er.show({type:"error",title:c.i18n.t("".concat(Yt,":").concat(qt.REQUEST_FAILED)),content:t,contentStyle:{whiteSpace:"pre-wrap"}}).then((()=>{nr=void 0})))}}var sr=Object.freeze({show:function(e){or?or.resolve(e):alert(e.message)}});function lr(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,o]=t,a=fr(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 cr(e){return"string"==typeof e.action}function ur(e){return"string"==typeof e.useProvider}function dr(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function pr(e){return!!e.then}function fr(e,t,r){return function(n){var a,i;for(var s of[].concat(e))if(Zt(s,(0,o.Z)((0,o.Z)({},t),{},{event:n})))if(pr(s))fr(s.then,t,r)(n);else if(cr(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":br(n,c,s.args,s.callback,t);break;case"window.open":wr(n,s.args,t);break;case"location.reload":case"location.assign":Ir(n,c,s.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Ar(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":Cr(n,c,s.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Tr(n,c,s.args,t);break;case"handleHttpError":ir(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":Er(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":kr(n,c,s.args,null===(i=s.batch)||void 0===i||i,s.callback,t);break;case"tpl.dispatchEvent":var[u,d]=_r(s.args,t,n);_e(t,s.action,": ".concat(u)).dispatchEvent(new CustomEvent(u,d));break;case"formstate.update":Zr(n,s.args,s.callback,t);break;case"message.subscribe":case"message.unsubscribe":Or(n,c,s.args,t,r,s.callback);break;case"theme.setDarkTheme":case"theme.setLightTheme":ee("theme.setDarkTheme"===s.action?"dark":"light");break;case"theme.setTheme":var[p]=_r(s.args,t,n);ee(p);break;case"mode.setDashboardMode":case"mode.setDefaultMode":ie("mode.setDashboardMode"===s.action?"dashboard":"default");break;default:console.error("unknown event listener action:",s.action)}}else ur(s)?vr(n,s,t,r):dr(s)?mr(n,s,t,r):console.error("unknown event handler:",s);else s.else&&fr(s.else,t,r)(n)}}function vr(e,t,r,n){return hr.apply(this,arguments)}function hr(){return(hr=(0,a.Z)((function*(e,t,r,n){try{gr(e,yield qe(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(tr(e))}}))).apply(this,arguments)}function mr(e,t,r,n){var a=[],i=t.target,s=t.targetRef,l=i;if(("string"==typeof i?(0,T.isEvaluable)(i):st(i))&&(l=bt(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,T.isEvaluable)(s):st(s))&&(u=bt(s,(0,o.Z)((0,o.Z)({},r),{},{event:e})));var d=[].concat(u),p=_e(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=>{gr(e,o,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&Mt(a,t.properties,(0,o.Z)((0,o.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function gr(e,t,r,n,o,a,i){return yr.apply(this,arguments)}function yr(){return yr=(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=_r(r.args,i,e,l);return ur(r)&&null!=vo&&null!==(o=vo.flowApi)&&void 0!==o&&o.isFlowApiProvider(r.useProvider)&&(a=yield vo.flowApi.getArgsOfFlowApi(r.useProvider,a,n)),t[n](...a)}));return function(){return o.apply(this,arguments)}}();if(r.callback){var d,p=Rr(r.callback,i,s),f={progress:p("progress"),success:p("success"),error:p("error"),finally:p("finally")};if(ur(r)&&(d=bt(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=Eo();function m(){return g.apply(this,arguments)}function g(){return(g=(0,a.Z)((function*(){var t;Gt.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==Eo())||(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!==Eo())||(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),Gt.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})})),yr.apply(this,arguments)}function br(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=_r(r,o,e,{useEventDetailAsDefault:!0})).length=a),i&&n){var c=Rr(n,o,void 0);l.push((e=>{c(e?"error":"success")({blocked:e}),c("finally")({blocked:e})}))}Z()[s](...l)}function wr(e,t,r){var[n,o,a]=_r(t,r,e);window.open(n,o||"_self",a)}function Sr(e,t,r,n,o,a){t?n.updateValues(e,r,(e=>_r(e,o,a)[0])):e.forEach((e=>{var{name:t,value:i}=_r([e],o,a)[0];n.updateValue(t,i,r)}))}function Er(e,t,r,n,o,a){if(!Array.isArray(r)||!r.every(d.isObject)||"assign"!==t&&"replace"!==t){var[i,s]=_r(r,a,e);a.ctxStore.updateValue(i,s,t,o,a)}else Sr(r,n,t,a.ctxStore,a,e)}function kr(e,t,r,n,o,a){if(Array.isArray(r)&&r.every(d.isObject)&&"update"===t)Sr(r,n,"replace",Re(a,"state.".concat(t),": ".concat(JSON.stringify(r))),a,e);else{var[i,s]=_r(r,a,e);Re(a,"state.".concat(t),": ".concat(i)).updateValue(i,s,"update"===t?"replace":t,o,a)}}function Zr(e,t,r,n){var[o,a]=_r(t,n,e);ze(n,"formstate.update",": ".concat(o)).updateValue(o,a,"replace",r,n)}function Ir(e,t,r,n){if("assign"===t){var[o]=_r(r,n,e);location.assign(o)}else location[t]()}function Ar(e,t,r,n,o){var a="localStorage"===t?localStorage:sessionStorage,[i,s]=_r(n,o,e);"setItem"===r?void 0!==s&&a.setItem(i,JSON.stringify(s)):a.removeItem(i)}function Cr(e,t,r,n){console[t](..._r(r,n,e,{useEventAsDefault:!0}))}function Tr(e,t,r,n){var o=_r(r,n,e,{useEventAsDefault:!0});sr.show({type:t,message:o[0]})}function Or(e,t,r,n,o,a){return Pr.apply(this,arguments)}function Pr(){return(Pr=(0,a.Z)((function*(e,t,r,n,o,a){var i=()=>{var o,a=_r(r,n,e);return null==vo||null===(o=vo.messageDispatcher)||void 0===o?void 0:o[t](...a)};if(a){var s=Rr(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 Rr(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});fr(a,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",o)}}}function _r(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?bt(e,(0,o.Z)((0,o.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}var Mr=["onBeforePageLoad","onPageLoad","onBeforePageLeave","onPageLeave","onAnchorLoad","onAnchorUnload"];class xr{constructor(e,t,r){(0,zt.Z)(this,"type",void 0),(0,zt.Z)(this,"data",new Map),(0,zt.Z)(this,"changeEventType",void 0),(0,zt.Z)(this,"pendingStack",[]),(0,zt.Z)(this,"hostBrick",void 0),(0,zt.Z)(this,"batchUpdate",!1),(0,zt.Z)(this,"batchUpdateContextsNames",[]),(0,zt.Z)(this,"rendererContext",void 0),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||ir(e)})),n){var l=Rr(n,a);s.then((e=>{l("success")({value:e}),l("finally")()}),(e=>{l("error")(e),l("finally")()}))}}}define(e,t,r){if(Array.isArray(e)&&e.length>0){var n=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)),this.type);this.pendingStack.push(n)}}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{pendingResult:t}of e.pendingStack)yield t}))()}handleAsyncAfterMount(){this.data.forEach((e=>{e.async&&e.loading.then((t=>{e.loaded=!0,e.value=t,e.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:t}))}))}))}resolve(e,t,r){var n=this;return(0,a.Z)((function*(){if(!(yield Et(e,t)))return!1;var i,s,l;r&&("STATE"===n.type?e.expose:"FORM_STATE"===n.type)&&(i=yield Ot(r,e.name));var c="eager";if(void 0===i){if(e.resolve){var u=(0,o.Z)({transform:"value"},e.resolve);if(yield Et(e.resolve,t))s=function(){var e=(0,a.Z)((function*(e){return(yield tt(u,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),"eager"==(c=e.resolve.async?"async":e.resolve.lazy?"lazy":"eager")?i=yield s():"async"===c&&(l=s());else if(!(0,d.hasOwnProperty)(e,"value"))return!1}s&&"eager"===c||void 0===e.value||(i=yield gt(e.value,t))}var p={value:i,eventTarget:new EventTarget,load:s,loaded:"eager"===c,loading:l,async:"async"===c,deps:[]};if("lazy"===c){var f,{trigger:v}=e.resolve;v&&Mr.includes(v)&&(null===(f=n.rendererContext)||void 0===f||f.registerArbitraryLifeCycle(v,(()=>{n.updateValue(e.name,void 0,"load")})))}if(e.onChange&&p.eventTarget.addEventListener(n.changeEventType,fr(e.onChange,t)),e.track){var h=(0,R.strictCollectMemberUsage)(s?e.resolve:e.value,n.type);for(var m of(!s&&(p.deps=[...h]),h))n.onChange(m,n.batchAddListener((()=>{s?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,bt(e.value,t),"replace")}),e))}if(n.data.has(e.name))throw new Error("".concat(n.type," '").concat(e.name,"' has already been declared"));return n.data.set(e.name,p),!0}))()}batchAddListener(e,t){return r=>{this.batchUpdate&&this.batchUpdateContextsNames.includes(t.name)||e(r)}}}function Br(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,Ot(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")?Lr(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{[Vt]:n,[Wt]:l}}function Lr(e,t){return e.map((e=>{var r;return(0,o.Z)((0,o.Z)({},e),{},{[Ht]: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:Ur(o.routes,t)}:{type:"bricks",bricks:Lr(null!==(r=o.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Ur(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,o.Z)((0,o.Z)({},e),{},{bricks:Lr(e.bricks,t)})))}var Nr=["properties","slots","children"];function Fr(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,Nr),c=cn(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},Br(t,l.ref,u))}return r(e)}var jr=["slots","children"],$r=["properties","slots","children"];function Kr(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 xr("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==vo||null===(i=vo.flowApi)||void 0===i||i.collectWidgetContract(f),c.define(p,l,n);var{slots:v,children:g}=t,y=(0,h.Z)(t,jr),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:cn(g,v),tplStateStoreId:s,hostBrick:r};return b.slots={"":{type:"bricks",bricks:u.map((e=>Dr(e,C)))}},b}function Dr(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:a}=e,i=(0,h.Z)(e,$r),s=cn(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=>Dr(e,t)))}]})));return(0,o.Z)((0,o.Z)({},i),{},{properties:Fr(r,t),slots:l},Br(t,i.ref,l))}var Vr=function(e){return e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK",e}({}),Wr="form-renderer.form-renderer",Hr=Symbol.for("form.stateStoreId"),zr=["forms.general-form","form.general-form","eo-form"];function Gr(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:qr(a,t,r),[Hr]:r};return(0,d.hasOwnProperty)(e,"if")&&(h.if=e.if),h}function qr(e,t,r){if(Array.isArray(e))return e.map((e=>Gr(e,t,r)))}var Jr=["blockingList","node","menuRequests","hasTrackingControls"],Qr=["if","permissionsPreCheck"],Yr=["formData"];function Xr(e,t,r,n,o){return en.apply(this,arguments)}function en(){return en=(0,a.Z)((function*(e,t,r,n,a){var i=yield function(e,t){return Kt.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var l,c=s.route=i.route,d=(0,o.Z)((0,o.Z)({},r),{},{match:i.match});d.ctxStore.define(c.context,d),d.pendingPermissionsPreCheck.push(null==vo||null===(l=vo.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(c,(e=>gt(e,d))));var{preLoadBricks:p}=c;switch(Array.isArray(p)&&s.blockingList.push((0,u.loadBricksImperatively)(p,So())),c.type){case"redirect":var f;if("string"!=typeof(f="string"==typeof c.redirect?yield gt(c.redirect,d):(yield tt((0,o.Z)({transform:"redirect"},c.redirect),d)).redirect))throw console.error("Unexpected redirect result:",f),new Error("Unexpected type of redirect result: ".concat(typeof f));s.redirect={path:f};break;case"routes":s.menuRequests.push(sn(c.menu,d)),ln(s,yield Xr(e,c.routes,d,n,a));break;default:s.menuRequests.push(sn(c.menu,d)),ln(s,yield tn(e,c.bricks,d,n,a))}}return s})),en.apply(this,arguments)}function tn(e,t,r,n,o,a,i){return rn.apply(this,arguments)}function rn(){return(rn=(0,a.Z)((function*(e,t,r,n,o,a,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>nn(e,t,r,n,o,i,a&&new Map(a)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(o,r,t.node,e),ln(s,t)})),s}))).apply(this,arguments)}function nn(e,t,r,n,o,a){return on.apply(this,arguments)}function on(){return on=(0,a.Z)((function*(e,t,r,n,i,s){var l,c,p=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,f={blockingList:[],menuRequests:[]};if(!t.brick)return t.template?console.error("Legacy templates are dropped in v3:",t):console.error("Invalid brick:",t),f;var{if:v,permissionsPreCheck:g}=t,y=(0,h.Z)(t,Qr);if(function(e){return"string"==typeof e?(0,T.isTrackAll)(e):st(e)&&(0,T.isTrackAll)(lt(e))}(v))return nn(e,(0,o.Z)({brick:":if",dataSource:v,permissionsPreCheck:g,slots:{"":{type:"bricks",bricks:[y]}}},Object.getOwnPropertySymbols(t).reduce(((e,r)=>(0,o.Z)((0,o.Z)({},e),{},{[r]:t[r]})),{})),r,n,i,s,p);var b=t[Wt],w=t[Hr],S=(0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:b,formStateStoreId:w});(0,d.hasOwnProperty)(t,Ht)&&(S.forEachItem=t[Ht]);var{context:E}=t;if(Array.isArray(E)&&E.length>0){var k=Ae(S);Ce(k,"Defining context on bricks","check your brick:",t),k||S.ctxStore.define(E,S)}if(S.pendingPermissionsPreCheck.push(null==vo||null===(l=vo.checkPermissions)||void 0===l?void 0:l.preCheckPermissionsForBrickOrRoute(t,(e=>gt(e,S)))),!(yield function(e,t){return At.apply(this,arguments)}(t,S)))return f;var Z=t.brick;if(Z.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(Z);var{dataSource:I}=t,A=function(){var r=(0,a.Z)((function*(){var r,o=yield gt(I,S),a=":forEach"===Z?"":":switch"===Z?String(o):o?"":"else",s=cn(t.children,t.slots),l=s&&(0,d.hasOwnProperty)(s,a)&&(null===(r=s[a])||void 0===r?void 0:r.bricks);if(!Array.isArray(l))return f;switch(Z){case":forEach":return Array.isArray(o)?function(e,t,r,n,o,a,i){return an.apply(this,arguments)}(e,o,l,S,n,i,p):f;case":if":case":switch":return tn(e,l,S,n,i,p,!0)}}));return function(){return r.apply(this,arguments)}}(),C=yield A(),{contextNames:O,stateNames:P}=Tt(I);if(O||P){C.hasTrackingControls=!0;var R=0,_=function(){var t=(0,a.Z)((function*(){var t=++R,r=yield A();r.blockingList.push(...[...S.tplStateStoreMap.values(),...S.formStateStoreMap.values()].map((e=>e.waitForAll())),...S.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),R===t&&n.rerenderControlNode(i,s,r.node,e)}));return function(){return t.apply(this,arguments)}}(),M=(0,m.debounce)(_);if(O)for(var x of O)S.ctxStore.onChange(x,M);if(P)for(var B of P)Re(S,"STATE",': "'.concat(I,'"')).onChange(B,M)}return C}/\.tpl-/.test(Z)&&!Pe.get(Z)&&(yield un((0,u.loadBricksImperatively)([Z],So()),Z,n.unknownBricks));var L=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}(Z,null===(c=S.app)||void 0===c?void 0:c.id);if(L){var U,N=null!==(U=p.get(L))&&void 0!==U?U:0;if(N>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(L,'"'));p.set(L,N+1)}else Z.includes("-")&&!customElements.get(Z)&&(Z===Wr?customElements.define(Wr,class extends HTMLElement{get $$typeof(){return"form-renderer"}}):f.blockingList.push(un((0,u.enqueueStableLoadBricks)([Z],So()),Z,n.unknownBricks)));var F,j,$={tag:Vr.BRICK,type:L||Z,return:e,slotId:i,events:t.events,runtimeContext:S,portal:t.portal,iid:t.iid,ref:t.ref};if(f.node=$,Z===Wr){var K,D=null!==(K=t.properties)&&void 0!==K?K:{};({formData:F}=D),j=(0,h.Z)(D,Yr)}else j=t.properties;var V=[],W=[],H=function(e,t,r){return(0,d.isObject)(e)?Object.entries(e).map((e=>{var[n,o]=e,{contextNames:a,stateNames:i,formStateNames:s}=Tt(o);return(a||i||s)&&r.push({contextNames:a,stateNames:i,formStateNames:s,propName:n,propValue:o}),[n,gt(o,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?vt.USE_BRICK:vt.INITIAL})]})):[]}(j,S,W),z=t[Vt];z&&H.push(...z);var G=function(){var e=(0,a.Z)((function*(){return $.properties=yield function(e){return Rt.apply(this,arguments)}(H),function(e,t){var r=function(t){var r=()=>{e.element&&Mt(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=Re(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var a of t.stateNames)o.onChange(a,r)}if(t.formStateNames){var i=ze(e.runtimeContext,"FORM_STATE",': "'.concat(t.propValue,'"'));for(var s of t.formStateNames)i.onChange(s,r)}};for(var n of t)r(n)}($,W),$.properties}));return function(){return e.apply(this,arguments)}}();V.push(G()),n.registerBrickLifeCycle($,t.lifeCycle);var q,J=t;L?J=Kr(L,t,$,H,n):Z===Wr&&(J=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 xr("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=Gr(l.formSchema,l.fields,c);return zr.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]})}(F,t,$,H,n)),J.portal&&($.slotId=void 0),L?delete(q=(0,o.Z)({},S)).forEachItem:q=S;var Q=function(){var e=(0,a.Z)((function*(){var e=cn(J.children,J.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?tn($,r.bricks,q,n,t,p):Xr($,r.routes,q,n,t)}))),r=(0,o.Z)((0,o.Z)({},f),{},{node:void 0,blockingList:[]});for(var a of t)ln(r,a);r.node&&($.child=r.node),ln(f,(0,o.Z)((0,o.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return V.push(Q()),yield Promise.all(V),f})),on.apply(this,arguments)}function an(){return(an=(0,a.Z)((function*(e,t,r,n,a,i,s){var l={blockingList:[],menuRequests:[]},c=yield Promise.all(t.map(((t,l)=>Promise.all(r.map(((r,c)=>nn(e,r,(0,o.Z)((0,o.Z)({},n),{},{forEachItem:t}),a,i,l*c,s&&new Map(s))))))));for(var u of c.flat())ln(l,u);return l}))).apply(this,arguments)}function sn(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 gt(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function ln(e,t){var{blockingList:r,node:n,menuRequests:o,hasTrackingControls:a}=t,i=(0,h.Z)(t,Jr);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 cn(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 un(e,t,r){return"silent"===r?e.catch((e=>{console.error('Load brick "'.concat(t,'" failed:'),e)})):e}function dn(e){var t,{ref:r,runtimeContext:n,element:o}=e;if(r&&n.tplStateStoreId){var{hostBrick:a}=Re(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 pn(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:o}=Re(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 fn(e){e.replaceChildren()}function vn(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),_t(i,r.properties),lr(i,r.events,r.runtimeContext),r.tplHostMetadata&&(i.$$tplStateStore=Re({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),dn(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===Vr.ROOT?null===(c=l.container)||void 0===c||c.append(...l.childElements):l.element.append(...l.childElements),l.childElements=void 0;if(l.tag===Vr.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 hn,mn,gn=["onMount","onUnmount","onMediaChange","onScrollIntoView","onMessage","onMessageClose"],yn=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],bn=new WeakMap,wn=new WeakMap,Sn=new WeakMap,En=new WeakMap,kn=new WeakMap,Zn=new WeakSet,In=new WeakSet,An=new WeakSet,Cn=new WeakSet;class Tn{constructor(e,t){var r;(0,I.Z)(this,Cn),(0,I.Z)(this,An),(0,I.Z)(this,In),(0,I.Z)(this,Zn),(0,zt.Z)(this,"scope",void 0),(0,zt.Z)(this,"unknownBricks",void 0),(0,i.Z)(this,bn,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[],onMessage:[],onMessageClose:[]}}),(0,i.Z)(this,wn,{writable:!0,value:new Map}),(0,i.Z)(this,Sn,{writable:!0,value:void 0}),(0,i.Z)(this,En,{writable:!0,value:new Map}),(0,i.Z)(this,kn,{writable:!0,value:void 0}),this.scope=e,this.unknownBricks=null!==(r=null==t?void 0:t.unknownBricks)&&void 0!==r?r:"throw"}registerBrickLifeCycle(e,t){if(t){var r=[...gn,..."page"===this.scope?yn:[]];for(var n of r){var o=t[n];o&&(0,l.Z)(this,bn)[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,En).get(e);r?r.add(t):(0,l.Z)(this,En).set(e,new Set([t]))}memoizeControlNode(e,t,r,n){(0,l.Z)(this,kn)||(0,s.Z)(this,kn,new WeakMap);var o="".concat(null!=e?e:"",".").concat(t),a=(0,l.Z)(this,kn).get(n);a||(a=new Map,(0,l.Z)(this,kn).set(n,a)),a.set(o,{node:r,last:Mn(r),lastNormal:xn(r),lastPortal:Bn(r)})}rerenderControlNode(e,t,r,n){var o,a,i,s,c,u="".concat(null!=e?e:"",".").concat(t),d=(0,l.Z)(this,kn).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=Mn(r);d.node=r,d.last=y,d.lastNormal=xn(r),d.lastPortal=Bn(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:Vr.ROOT,container:w,createPortal:S,child:r};for(b=r;b;)b.return=E,b=b.sibling;var k,Z,I=Ln(p,f);for((0,A.Z)(this,Zn,On).call(this,I),vn(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===Vr.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 C,T=r;T&&T.return;)T=T.return;if((null===(C=T)||void 0===C?void 0:C.tag)!==Vr.ROOT)throw new Error("Cannot find render root node");("function"==typeof T.createPortal?T.createPortal():T.createPortal).insertBefore(S,g)}var O=Ln(r,y);(0,A.Z)(this,In,Pn).call(this,O)}dispose(){for(var e of Object.values((0,l.Z)(this,bn)))e.length=0;for(var t of(0,l.Z)(this,wn).values()){for(var r of t)r.disconnect();t.length=0}(0,l.Z)(this,wn).clear(),(0,l.Z)(this,Sn)&&(we.removeEventListener("change",(0,l.Z)(this,Sn)),(0,s.Z)(this,Sn,void 0)),(0,s.Z)(this,kn,void 0),(0,l.Z)(this,En).clear()}dispatchBeforePageLoad(){(0,A.Z)(this,An,Rn).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,A.Z)(this,An,Rn).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,A.Z)(this,An,Rn).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,A.Z)(this,An,Rn).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=Z().location;e&&"#"!==e?(0,A.Z)(this,An,Rn).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,A.Z)(this,An,Rn).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,l.Z)(this,bn).onScrollIntoView)(0,A.Z)(this,Cn,_n).call(this,e,t)}initializeMediaChange(){(0,s.Z)(this,Sn,(e=>{(0,A.Z)(this,An,Rn).call(this,"onMediaChange",new CustomEvent("media.change",{detail:H(e.detail)}))})),we.addEventListener("change",(0,l.Z)(this,Sn))}initializeMessageDispatcher(){var e,t=function(e){var t=function(t){var r;null==vo||null===(r=vo.messageDispatcher)||void 0===r||r.onMessage(t.channel,(r=>{fr(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,bn).onMessage)t(r);null==vo||null===(e=vo.messageDispatcher)||void 0===e||e.onClose((()=>{(0,A.Z)(this,An,Rn).call(this,"onMessageClose",new CustomEvent("message.close"))}))}dispatchOnMount(){(0,A.Z)(this,An,Rn).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,A.Z)(this,An,Rn).call(this,"onUnmount",new CustomEvent("unmount"))}}function On(e){var t=[...gn,..."page"===this.scope?yn:[]],r=[];for(var n of t){var o=(0,m.remove)((0,l.Z)(this,bn)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...o)}for(var a of e){var i,s,c=(0,l.Z)(this,wn).get(a);if(null!=c&&c.length){for(var u of c)u.disconnect();c.length=0,(0,l.Z)(this,wn).delete(a)}pn(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)fr(f,p.runtimeContext,p)(d)}function Pn(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,l.Z)(this,bn).onMount)e.has(r)&&fr(n,r.runtimeContext,r)(t);for(var{brick:o,handlers:a}of(0,l.Z)(this,bn).onScrollIntoView)e.has(o)&&(0,A.Z)(this,Cn,_n).call(this,o,a)}function Rn(e,t){for(var{brick:r,handlers:n}of(0,l.Z)(this,bn)[e])fr(n,r.runtimeContext,r)(t);var o=(0,l.Z)(this,En).get(e);if(o)for(var a of o)a()}function _n(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&&(fr(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),o.disconnect())}))}),{threshold:n});o.observe(e.element);var a=(0,l.Z)(this,wn).get(e);a||(a=[],(0,l.Z)(this,wn).set(e,a)),a.push(o)}function Mn(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function xn(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Bn(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 Ln(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 Un(){if(!hn){if(hn={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){hn.isInIframe=!0;try{if(window.origin===window.parent.origin){hn.isInIframeOfSameSite=!0;var e="/next/"===v(),t=window.parent.location.pathname,r=t.startsWith("/next/");hn.isInIframeOfNext=0==(Number(e)^Number(r)),hn.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),hn.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(hn)}return hn}function Nn(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 Fn(){return Fn=(0,a.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return jn.apply(this,arguments)}(e)),e.$$fulfilling})),Fn.apply(this,arguments)}function jn(){return(jn=(0,a.Z)((function*(e){var t;yield null==vo||null===(t=vo.fulfilStoryboard)||void 0===t?void 0:t.call(vo,e),x(e),Object.assign(e,{$$fulfilled:!0,$$fulfilling:null})}))).apply(this,arguments)}var $n=new WeakMap,Kn=new WeakMap,Dn=new WeakMap,Vn=new WeakMap,Wn=new WeakMap,Hn=new WeakMap,zn=new WeakMap,Gn=new WeakMap,qn=new WeakMap,Jn=new WeakMap,Qn=new WeakMap,Yn=new WeakMap,Xn=new WeakSet,eo=new WeakSet,to=new WeakSet,ro=new WeakSet;class no{constructor(e){(0,I.Z)(this,ro),(0,I.Z)(this,to),(0,I.Z)(this,eo),(0,I.Z)(this,Xn),(0,i.Z)(this,$n,{writable:!0,value:void 0}),(0,i.Z)(this,Kn,{writable:!0,value:!1}),(0,i.Z)(this,Dn,{writable:!0,value:void 0}),(0,i.Z)(this,Vn,{writable:!0,value:void 0}),(0,i.Z)(this,Wn,{writable:!0,value:void 0}),(0,i.Z)(this,Hn,{writable:!0,value:void 0}),(0,i.Z)(this,zn,{writable:!0,value:new Set}),(0,i.Z)(this,Gn,{writable:!0,value:0}),(0,i.Z)(this,qn,{writable:!0,value:void 0}),(0,i.Z)(this,Jn,{writable:!0,value:void 0}),(0,i.Z)(this,Qn,{writable:!0,value:void 0}),(0,i.Z)(this,Yn,{writable:!0,value:void 0}),(0,s.Z)(this,$n,e);var t=Z();window.addEventListener("beforeunload",(e=>{(0,A.Z)(this,Xn,oo).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,A.Z)(this,Xn,oo).call(this,{location:e,action:t})))}getRenderId(){return(0,l.Z)(this,qn)}getRuntimeContext(){return(0,l.Z)(this,Wn)}getRecentApps(){return{currentApp:(0,l.Z)(this,Jn),previousApp:(0,l.Z)(this,Qn)}}getNavConfig(){return(0,l.Z)(this,Yn)}bootstrap(){window.AbortController&&(mn=new AbortController,C.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:mn.signal})})})));var e=Z();return(0,s.Z)(this,Dn,e.location),e.listen(((e,t)=>{var r,n,a,i=!1,c={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,l.Z)(this,Dn).key&&!1!==(null===(r=(0,l.Z)(this,Dn).state)||void 0===r?void 0:r.notify))||(c.key=void 0),((0,f.locationsAreEqual)((0,o.Z)((0,o.Z)({},(0,l.Z)(this,Dn)),c),(0,o.Z)((0,o.Z)({},e),c))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,s.Z)(this,Dn,e);else{if(mn&&(mn.abort(),mn=new AbortController),(0,s.Z)(this,Dn,e),null===(a=(0,l.Z)(this,Hn))||void 0===a||a.dispatchPageLeave(),"POP"===t&&y(g((0,l.Z)(this,$n),e.pathname)))return void window.location.reload();(0,l.Z)(this,Kn)?(0,s.Z)(this,Vn,e):(0,A.Z)(this,to,io).call(this,e).catch(ir)}})),(0,A.Z)(this,to,io).call(this,e.location)}}function oo(e){var t,r=Z(),n=r.getBlockMessage();null===(t=(0,l.Z)(this,Hn))||void 0===t||t.dispatchBeforePageLeave(e);var o=r.getBlockMessage();return!n&&o&&r.unblock(),o}function ao(e,t,r){var n,o;if((0,s.Z)(this,Gn,(n=(0,l.Z)(this,Gn),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)}Z().replace(e,t)}function io(e){return so.apply(this,arguments)}function so(){return(so=(0,a.Z)((function*(e){(0,s.Z)(this,Kn,!0);try{yield(0,A.Z)(this,ro,lo).call(this,e)}finally{if((0,s.Z)(this,Kn,!1),(0,l.Z)(this,Vn)){var t=(0,l.Z)(this,Vn);(0,s.Z)(this,Vn,void 0),yield(0,A.Z)(this,to,io).call(this,t)}}}))).apply(this,arguments)}function lo(e){return co.apply(this,arguments)}function co(){return co=(0,a.Z)((function*(e){var t,r;(0,s.Z)(this,qn,(0,m.uniqueId)("render-id-1")),Qe=new WeakSet,et.clear(),null==vo||null===(t=vo.flowApi)||void 0===t||t.clearCollectWidgetContract(),Z().unblock();var n=g((0,l.Z)(this,$n),e.pathname),a=null===(r=(0,l.Z)(this,Wn))||void 0===r?void 0:r.app;null!=n&&n.app&&(yield function(e){return Fn.apply(this,arguments)}(n));var i=(0,s.Z)(this,Jn,null==n?void 0:n.app),c=a&&i?a.id!==i.id:a!==i,d=go().getFeatureFlags(),p=(0,l.Z)(this,Hn),f=(t,r)=>{(0,l.Z)(this,zn).add(p),(0,A.Z)(this,eo,ao).call(this,t,r,e)},v=()=>{var t=d["sso-enabled"]?"/sso-auth/login":"/auth/login";f(t,{from:e})},h=document.querySelector("#main-mount-point"),y=document.querySelector("#portal-mount-point"),b={tag:Vr.ROOT,container:h,createPortal:y},w=()=>{var e;for(var t of(fn(h),fn(y),(0,l.Z)(this,zn).add(p),(0,l.Z)(this,zn)))t&&(t.dispatchOnUnmount(),t.dispose());(0,l.Z)(this,zn).clear(),null==vo||null===(e=vo.messageDispatcher)||void 0===e||e.reset(),c&&((0,s.Z)(this,Qn,a),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:a,currentApp:i}})))};if(Q(i&&(re()[i.id]||i.theme)||"light"),oe("default"),i){var S,E,k,I,T,O;null==vo||null===(S=vo.checkInstalledApps)||void 0===S||S.preCheckInstalledApps(n,(e=>!!Io(e)));var P=(0,s.Z)(this,Hn,new Tn("page")),R=(0,s.Z)(this,Wn,{app:i,location:e,query:new URLSearchParams(e.search),flags:d,sys:(0,o.Z)((0,o.Z)((0,o.Z)({},null==vo||null===(E=vo.auth)||void 0===E?void 0:E.getAuth()),Un()),{},{settings:{brand:go().getBrandSettings()}}),ctxStore:new xr("CTX",void 0,P),pendingPermissionsPreCheck:[null==vo||null===(k=vo.checkPermissions)||void 0===k?void 0:k.preCheckPermissions(n)],tplStateStoreMap:new Map,formStateStoreMap:new Map});(0,s.Z)(this,Yn,void 0),Nn(n),ve(null===(I=n.meta)||void 0===I?void 0:I.functions,i),null==vo||null===(T=vo.flowApi)||void 0===T||T.collectContract(null===(O=n.meta)||void 0===O?void 0:O.contracts);var _,M=!1,x=[];try{if((_=yield Xr(b,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)]}(n.routes),R,P)).unauthenticated)return void v();if(_.redirect)return void f(_.redirect.path,_.redirect.state);(0,s.Z)(this,Gn,0),(0,u.flushStableLoadBricks)(),x=[R.ctxStore,...R.tplStateStoreMap.values(),...R.formStateStoreMap.values()],yield Promise.all([..._.blockingList,...x.map((e=>e.waitForAll())),...R.pendingPermissionsPreCheck]);var B=yield Promise.all(_.menuRequests);(0,s.Z)(this,Yn,function(e){var t={breadcrumb:[]};for(var r of e)if(r){var{breadcrumb:n}=r;n&&(n.overwrite?t.breadcrumb=n.items:t.breadcrumb.push(...n.items))}return t}(B))}catch(e){if(console.error("Router failed:",e),rr(e)&&!window.NO_AUTH_GUARD)return void v();if(e instanceof C.HttpAbortError)return void(0,l.Z)(this,zn).add(p);M=!0,_={node:{tag:Vr.BRICK,type:"div",properties:{textContent:tr(e)},runtimeContext:null,return:b},blockingList:[],menuRequests:[]}}if(b.child=_.node,w(),_.route&&"routes"!==_.route.type||M){if(M||P.dispatchBeforePageLoad(),ee(),ie(),vn(b),window.scrollTo(0,0),!M){for(var L of x)L.handleAsyncAfterMount();P.dispatchPageLoad(),P.dispatchAnchorLoad(),P.dispatchOnMount(),P.initializeScrollIntoView(),P.initializeMediaChange(),P.initializeMessageDispatcher()}return}}else{if(!window.NO_AUTH_GUARD&&null!=vo&&vo.auth&&!vo.auth.isLoggedIn())return void v();w()}ee(),ie();var U={tag:Vr.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:b};b.child=U,vn(b),window.scrollTo(0,0)})),co.apply(this,arguments)}var uo,po,fo,vo,ho="undefined"!=typeof BRICK_PACKAGES?BRICK_PACKAGES:null;function mo(e){if(uo)throw new Error("Cannot create multiple runtimes");return window.addEventListener("message",(e=>{var{data:t}=e;if((null==t?void 0:t.source)===F){var r=t.payload;switch(null==r?void 0:r.type){case j:K=r.active;break;case $:N=r.panel}}})),vo=null==e?void 0:e.hooks,(0,c.initializeI18n)(Yt,Xt),p.locale(c.i18n.language),c.i18n.on("languageChanged",(()=>{p.locale(c.i18n.language)})),k(),uo=new wo}function go(){return uo}var yo=new WeakMap,bo=new WeakMap;class wo{constructor(){(0,i.Z)(this,yo,{writable:!0,value:!1}),(0,i.Z)(this,bo,{writable:!0,value:!1})}initialize(e){var t,r;if((0,l.Z)(this,yo))throw new Error("The runtime cannot be initialized more than once");(0,s.Z)(this,yo,!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),po=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((()=>{or=document.createElement(n)}),(e=>{console.error("Load notification service failed:",e)}))),!1!==a&&function(e,t){t([e]).then((()=>{Dt=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,bo))throw new Error("The runtime cannot be bootstrapped more than once");(0,s.Z)(t,bo,!0),fo=new no(po.storyboards),yield fo.bootstrap()}))()}getRecentApps(){var e,t;return null!==(e=null===(t=fo)||void 0===t?void 0:t.getRecentApps())&&void 0!==e?e:{}}getCurrentApp(){var e;return null===(e=fo)||void 0===e?void 0:e.getRecentApps().currentApp}hasInstalledApp(e,t){return He(e,t)}getFeatureFlags(){var e,t;return(0,o.Z)((0,o.Z)((0,o.Z)({},null===(e=po)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.featureFlags),null===(t=fo)||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=po)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.misc),null===(t=fo)||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=po)||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=po)||void 0===e||null===(e=e.settings)||void 0===e?void 0:e.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=po)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=po)||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=fo)||void 0===e?void 0:e.getNavConfig()}loadBricks(e){return(0,u.loadBricksImperatively)(e,So())}}function So(){var e,t,r,n;return null!==(e=null!==(t=null!==(r=null===(n=po)||void 0===n?void 0:n.brickPackages)&&void 0!==r?r:ho)&&void 0!==t?t:window.STANDALONE_BRICK_PACKAGES)&&void 0!==e?e:[]}function Eo(){var e;return null===(e=fo)||void 0===e?void 0:e.getRenderId()}function ko(){var e;return null===(e=fo)||void 0===e?void 0:e.getRuntimeContext()}function Zo(e){var t;return null===(t=po)||void 0===t||null===(t=t.storyboards)||void 0===t?void 0:t.find((t=>t.app.id===e))}function Io(e){var t;return null===(t=Zo(e))||void 0===t?void 0:t.app}function Ao(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];null==vo||null===(e=vo.auth)||void 0===e||null===(t=e.authenticate)||void 0===t||t.call(e,...n)}function Co(){var e;return null==vo||null===(e=vo.auth)||void 0===e?void 0:e.getAuth()}function To(){var e,t;return null==vo||null===(e=vo.auth)||void 0===e||null===(t=e.logout)||void 0===t?void 0:t.call(e)}function Oo(){var e;return null==vo||null===(e=vo.auth)||void 0===e?void 0:e.isLoggedIn()}function Po(e,t,r){return Ro.apply(this,arguments)}function Ro(){return(Ro=(0,a.Z)((function*(e,t,r){return nt(yield qe(e),e,"resolve",t,r)}))).apply(this,arguments)}function _o(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 d=arguments;return(0,a.Z)((function*(){var{theme:a,context:p,functions:f,templates:v,i18n:h}=d.length>1&&void 0!==d[1]?d[1]:{};if(c)throw new Error("The root is unmounted and cannot be rendered any more");var m=[].concat(r),g=s;s=new Tn(n,{unknownBricks:o});var y={ctxStore:new xr("CTX",void 0,s),pendingPermissionsPreCheck:[],tplStateStoreMap:new Map,formStateStoreMap:new Map},b={tag:Vr.ROOT,container:e,createPortal:t};if("page"===n){var w;Q(null!=a?a:"light"),oe("default");var S={id:"demo",homepage:"/demo"};y.app=S;var E={app:S,meta:{i18n:h,customTemplates:v}};null===(w=l)||void 0===w||w(),l=x(E),Nn(E),ve(f,S)}y.ctxStore.define(p,y);var k,Z=!1,I=[];try{k=yield tn(b,m,y,s),(0,u.flushStableLoadBricks)(),I=[y.ctxStore,...y.tplStateStoreMap.values(),...y.formStateStoreMap.values()],yield Promise.all([...k.blockingList,...I.map((e=>e.waitForAll())),...y.pendingPermissionsPreCheck])}catch(e){Z=!0,k={node:{tag:Vr.BRICK,type:"div",properties:{textContent:tr(e)},return:b,runtimeContext:null},blockingList:[],menuRequests:[]}}if(b.child=k.node,null==g||g.dispatchOnUnmount(),null==g||g.dispose(),fn(e),i&&fn(i),"page"===n&&(Z||s.dispatchBeforePageLoad(),ee(),ie()),vn(b),"page"===n&&window.scrollTo(0,0),!Z){for(var A of I)A.handleAsyncAfterMount();"page"===n&&s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange(),s.initializeMessageDispatcher()}}))()},unmount(){c||(c=!0,fn(e),i&&(fn(i),r||i.remove()))}}}function Mo(e,t){return xo.apply(this,arguments)}function xo(){return(xo=(0,a.Z)((function*(e,t){var r,n,a,i=[],s=[],l=(0,o.Z)((0,o.Z)({},ko()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreScope:i,formStateStoreScope:s});null!==(r=l.tplStateStoreMap)&&void 0!==r||(l.tplStateStoreMap=new Map),null!==(n=l.formStateStoreMap)&&void 0!==n||(l.formStateStoreMap=new Map);var c=new Tn("fragment"),d={tag:Vr.ROOT,createPortal:null},p=e.transform,f=Ae();p&&Ce(f,"`useBrick.transform`",'please use "properties" instead, check your useBrick:',e);var v=yield nn(d,f?e:(0,o.Z)((0,o.Z)({},e),{},{properties:(0,o.Z)((0,o.Z)({},e.properties),p)}),l,c);(0,u.flushStableLoadBricks)();var h=[...i,...s];if(yield Promise.all([...v.blockingList,...h.map((e=>e.waitForAll())),...l.pendingPermissionsPreCheck]),null!==(a=v.node)&&void 0!==a&&a.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return d.child=v.node,{tagName:v.node?v.node.type:null,renderRoot:d,rendererContext:c,scopedStores:h}}))).apply(this,arguments)}function Bo(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},vn(n,t),a))i.handleAsyncAfterMount();return o.dispatchOnMount(),o.initializeScrollIntoView(),o.initializeMediaChange(),o.initializeMessageDispatcher(),{portal:r}}function Lo(e,t){var{rendererContext:r}=e;t.portal&&(fn(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function Uo(e,t,r){if(r)throw new Error("Legacy doTransform does not support options in v3");return bt(t,(0,o.Z)((0,o.Z)({},ko()),{},{data:e}),{noInject:!0})}function No(e,t){var r=Zo(e);Object.assign(r,(0,o.Z)((0,o.Z)({},t),{},{$$fulfilling:null,$$fulfilled:!0,$$registerCustomTemplateProcessed:!1})),x(r)}function Fo(e,t){var r=Zo(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 jo(e,t,r){var n="".concat(e,".").concat(t.name);Pe.define(n,{bricks:t.bricks,proxy:t.proxy,state:t.state}),$o(e,t.name,r)}function $o(e,t,r){Wo(e,"${APP.homepage}/_dev_only_/template-preview/".concat(t),[(0,o.Z)({brick:t},(0,m.pick)(r,"properties","events","lifeCycle","context"))])}function Ko(e){return"${APP.homepage}/_dev_only_/snippet-preview/".concat(e)}function Do(e,t){var r;Wo(e,Ko(t.snippetId),null!==(r=t.bricks)&&void 0!==r&&r.length?t.bricks:[{brick:"span"}])}var Vo=Do;function Wo(e,t,r){var{routes:n}=Zo(e),o=n.findIndex((e=>e.path===t)),a={path:t,bricks:r,menu:!1,exact:!0};-1===o?n.unshift(a):n.splice(o,1,a)}function Ho(e,t){var{tplStateStoreId:r}=t,n=ko();return r?Re((0,o.Z)((0,o.Z)({},n),{},{tplStateStoreId:r}),"STATE").getValue(e):n.ctxStore.getValue(e)}function zo(e){var{tplStateStoreId:t}=e,r=ko();return t?Re((0,o.Z)((0,o.Z)({},r),{},{tplStateStoreId:t}),"STATE").getAllValues():r.ctxStore.getAllValues()}function Go(e){return So().find((t=>t.id?t.id===e:t.filePath.startsWith(e)))}function qo(){return Eo()}function Jo(e,t){return Qo.apply(this,arguments)}function Qo(){return(Qo=(0,a.Z)((function*(e,t){var r,{appId:n,updateStoryboardType:o,provider:a}=t,i=Zo(n);if("route"===o)r={routes:[e]};else if("template"===o)r={meta:{customTemplates:[e]}};else if("snippet"===o){var s,l=Ko(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],So());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.cc445401.js.map