@next-bricks/data-view 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +1 -1
- package/dist/chunks/2241.761c67f5.js +3 -0
- package/dist/chunks/2241.761c67f5.js.map +1 -0
- package/dist/chunks/{3494.49ab0ed3.js → 3494.7601f52b.js} +2 -2
- package/dist/chunks/{3494.49ab0ed3.js.map → 3494.7601f52b.js.map} +1 -1
- package/dist/chunks/353.ff1b1400.js +2 -0
- package/dist/chunks/353.ff1b1400.js.map +1 -0
- package/dist/chunks/4454.25db2c7a.js +2 -0
- package/dist/chunks/4454.25db2c7a.js.map +1 -0
- package/dist/chunks/4512.72dd7711.js +2 -0
- package/dist/chunks/4512.72dd7711.js.map +1 -0
- package/dist/chunks/{6173.73523a3f.js → 6173.9d8d57ea.js} +3 -3
- package/dist/chunks/{6173.73523a3f.js.map → 6173.9d8d57ea.js.map} +1 -1
- package/dist/chunks/{6205.ac5f4fb2.js → 6205.43fcf1c2.js} +2 -2
- package/dist/chunks/{6205.ac5f4fb2.js.map → 6205.43fcf1c2.js.map} +1 -1
- package/dist/chunks/{7164.b1dddefc.js → 7164.2ccb4fce.js} +2 -2
- package/dist/chunks/{7164.b1dddefc.js.map → 7164.2ccb4fce.js.map} +1 -1
- package/dist/chunks/{7822.a67018b0.js → 7822.7e6f7627.js} +2 -2
- package/dist/chunks/{7822.a67018b0.js.map → 7822.7e6f7627.js.map} +1 -1
- package/dist/chunks/873.58c2e4d7.js +2 -0
- package/dist/chunks/873.58c2e4d7.js.map +1 -0
- package/dist/chunks/main.0455b6ae.js +2 -0
- package/dist/chunks/{main.25a99d0e.js.map → main.0455b6ae.js.map} +1 -1
- package/dist/chunks/{modern-style-treemap.0fd4d0cd.js → modern-style-treemap.db14f864.js} +2 -2
- package/dist/chunks/{modern-style-treemap.0fd4d0cd.js.map → modern-style-treemap.db14f864.js.map} +1 -1
- package/dist/index.364eb559.js +2 -0
- package/dist/{index.30ce150c.js.map → index.364eb559.js.map} +1 -1
- package/package.json +6 -6
- package/dist/chunks/2241.9f705baa.js +0 -3
- package/dist/chunks/2241.9f705baa.js.map +0 -1
- package/dist/chunks/4454.22c6779c.js +0 -2
- package/dist/chunks/4454.22c6779c.js.map +0 -1
- package/dist/chunks/7179.6e1ec8ff.js +0 -2
- package/dist/chunks/7179.6e1ec8ff.js.map +0 -1
- package/dist/chunks/8207.d017a10a.js +0 -2
- package/dist/chunks/8207.d017a10a.js.map +0 -1
- package/dist/chunks/873.4a237712.js +0 -2
- package/dist/chunks/873.4a237712.js.map +0 -1
- package/dist/chunks/main.25a99d0e.js +0 -2
- package/dist/index.30ce150c.js +0 -2
- /package/dist/chunks/{2241.9f705baa.js.LICENSE.txt → 2241.761c67f5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{6173.73523a3f.js.LICENSE.txt → 6173.9d8d57ea.js.LICENSE.txt} +0 -0
- /package/dist/{images/f3856ac6.svg → f3856ac6.svg} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 2241.9f705baa.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[2241],{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:()=>a});var n=r(175);function a(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:()=>a});var n=r(5863);function a(e,t,r){(0,n.Z)(e,t),t.set(e,r)}},381:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(175);function a(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:()=>a});var n=r(5863);function a(e,t){(0,n.Z)(e,t),t.add(e)}},6666:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(5850);function a(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:()=>o});var n=r(6666);function a(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 o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(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,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r.d(t,{Z:()=>n})},5850:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(6522);function a(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 a=r.call(e,"string");if("object"!==(0,n.Z)(a))return a;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})},2241:(e,t,r)=>{r.r(t),r.d(t,{StoryboardFunctionRegistryFactory:()=>G,__secret_internals:()=>n,applyTheme:()=>L,authenticate:()=>eo,batchSetAppsLocalTheme:()=>N,checkIfByTransform:()=>Ye,checkIfOfComputed:()=>Ge,createHistory:()=>ge,createRuntime:()=>Xn,customProcessors:()=>w,customTemplates:()=>it,fetchByProvider:()=>ao,getAuth:()=>to,getBasePath:()=>V,getCssPropertyValue:()=>K,getCurrentMode:()=>F,getCurrentTheme:()=>B,getHistory:()=>ye,getPageInfo:()=>$r,getRuntime:()=>ea,handleHttpError:()=>Ct,httpErrorToString:()=>Zt,isLoggedIn:()=>no,isUnauthenticatedError:()=>kt,logout:()=>ro,registerWidgetFunctions:()=>la,registerWidgetI18n:()=>E});var n={};r.r(n),r.d(n,{initializePreviewBootstrap:()=>uo,mountUseBrick:()=>co,renderPreviewBricks:()=>po,renderUseBrick:()=>io,unmountUseBrick:()=>lo});var a=r(3028),o=r(4795),i=r(5178),s=r(5102),c=r(3352),l=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.post("api/gateway/micro_app.permission.ValidatePermissions/api/micro_app/v1/permission/validate",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),u=r(9481),p=r(5381),d=r(5188),f=r(2159),v=r(7453),h=r(2257),m=r(3395),g=r(687),y=new WeakMap,w=new class{constructor(){(0,m.Z)(this,y,{writable:!0,value:new Map})}define(e,t){var[r,n]=e.split("."),a=(0,g.Z)(this,y).get(r);if(a||(a=new Map,(0,g.Z)(this,y).set(r,a)),a.has(n))throw new Error('Custom processor of "'.concat(e,'" already registered'));a.set(n,t)}get(e){return(0,g.Z)(this,y).get(e)}},b=r(1302);function S(e,t){return"".concat(e,"/").concat(t)}function E(e,t){var r=S("widget",e);Object.entries(t).forEach((e=>{var[t,n]=e;b.i18n.addResourceBundle(t,r,n)}))}function Z(e){return b.i18n.getFixedT(null,S("widget",e))}function k(e,t){return{get(r){var n;return"".concat(null!==(n=window.PUBLIC_ROOT)&&void 0!==n?n:"","bricks/").concat(e,"/").concat(window.PUBLIC_ROOT_WITH_VERSION&&t?"".concat(t,"/"):"","dist/assets/").concat(r)}}}function I(){return window.__BRICK_NEXT_DEVTOOLS_HOOK__}var P=()=>{throw new Error("Can't modify read-only proxy object")},C={set:P,defineProperty:P,deleteProperty:P,setPrototypeOf:P};function O(e){return new Proxy(e,C)}function A(e){var{get:t,ownKeys:r}=e;return I()?O(Object.fromEntries(r(null).map((e=>[e,t(null,e,null)])))):new Proxy(Object.freeze({}),{get:t})}var _="light",T=new p.JsonStorage(localStorage),R="apps-theme";function M(e){if("dark"!==e&&"light"!==e&&"dark-v2"!==e)throw new Error("Unsupported theme: ".concat(e));_=e}function x(){return _}function B(){return document.documentElement.dataset.theme}function L(e){e?M(e):e=x(),e!==B()&&(document.documentElement.dataset.theme=e,window.dispatchEvent(new CustomEvent("theme.change",{detail:e})))}function N(e){T.setItem(R,(0,a.Z)((0,a.Z)({},U()),e))}function U(){var e,t;try{t=T.getItem(R)}catch(e){console.error("JSON parse error inside `getLocalAppsTheme()`")}return null!==(e=t)&&void 0!==e?e:{}}var j="default";function $(e){if("dashboard"!==e&&"default"!==e)throw new Error("Unsupported mode: ".concat(e));j=e}function F(){return document.documentElement.dataset.mode}function D(e){e?$(e):e=j,e!==F()&&(document.documentElement.dataset.mode=e,window.dispatchEvent(new CustomEvent("mode.change",{detail:e})))}function K(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 V(){var e=document.querySelector("base");return e?e.getAttribute("href"):"/"}function H(e,t){var r={};for(var n of e){var a=W(n,t);void 0!==a&&(r[n]=a)}return r}function W(e,t){var r,n,{collectCoverage:a,widgetId:o,widgetVersion:s,app:c,appendI18nNamespace:l,storyboardFunctions:u,isStoryboardFunction:p}=t;switch(e){case"BASE_URL":return a?"/next":V().replace(/\/$/,"");case"FN":return u;case"IMG":return a?{get:e=>"mock/images/".concat(e)}:o?k(o,s):(r=c.id,n=c.isBuildPush,{get:e=>n?"api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(e):"".concat(window.APP_ROOT?"".concat(window.APP_ROOT,"-/"):"","micro-apps/").concat(r,"/images/").concat(e)});case"I18N":return a?i.identity:o?Z(o):b.i18n.getFixedT(null,[l,S("app",c.id)].filter(Boolean));case"I18N_TEXT":return a?q:b.i18nText;case"PERMISSIONS":return O({check:a?z:Ya});case"THEME":return O({getTheme:a?()=>"light":x});case"console":return p?O(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 q(e){return null==e?void 0:e.en}function z(){return!0}function G(){var e,{widgetId:t,widgetVersion:r,collectCoverage:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=new Map,i=new Proxy(Object.freeze({}),{get:(a,s)=>function(a){var s,c=o.get(a);if(c){if(c.processed)return c.cooked;n&&(s=n.createCollector(a));var l=(0,u.precookFunction)(c.source,{typescript:c.typescript,hooks:s&&{beforeVisit:s.beforeVisit}});return c.cooked=(0,u.cook)(l.function,c.source,{rules:{noVar:!0},globalVariables:(0,h.supply)(l.attemptToVisitGlobals,H(l.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}}),c.processed=!0,c.cooked}}(s)});return{storyboardFunctions:i,registerStoryboardFunctions:function(t,r){if(r&&(e=r),o.clear(),Array.isArray(t))for(var n of t){var a=(0,s.strictCollectMemberUsageInFunction)(n,"FN"),i=(0,s.strictCollectMemberUsageInFunction)(n,"PERMISSIONS").has("check");o.set(n.name,{source:n.source,typescript:n.typescript,deps:a,hasPermissionsCheck:i})}},updateStoryboardFunction(e,t){var r=(0,a.Z)((0,a.Z)({},t),{},{name:e}),n=(0,s.strictCollectMemberUsageInFunction)(r,"FN"),i=(0,s.strictCollectMemberUsageInFunction)(r,"PERMISSIONS").has("check");o.set(e,{source:t.source,typescript:t.typescript,deps:n,hasPermissionsCheck:i})},checkPermissionsUsage(e){var t=new Set,r=e=>{if(!t.has(e)){t.add(e);var n=o.get(e);return!!n&&(n.hasPermissionsCheck||[...n.deps].some(r))}return!1};return e.some(r)}}}var{storyboardFunctions:J,registerStoryboardFunctions:Y,checkPermissionsUsage:Q}=G(),X={};try{X.EventTarget=(new EventTarget).constructor}catch(e){!function(e,t){var r=e.create,n=e.defineProperty,a=o.prototype;function o(){t.set(this,r(null))}function i(e,t,r){n(e,t,{configurable:!0,writable:!0,value:r})}function s(e){var t=e.options;return t&&t.once&&e.target.removeEventListener(this.type,e.listener),"function"==typeof e.listener?e.listener.call(e.target,this):e.listener.handleEvent(this),this._stopImmediatePropagationFlag}i(a,"addEventListener",(function(e,r,n){for(var a=t.get(this),o=a[e]||(a[e]=[]),i=0,s=o.length;i<s;i++)if(o[i].listener===r)return;o.push({target:this,listener:r,options:n})})),i(a,"dispatchEvent",(function(e){var r=t.get(this)[e.type];return r&&(i(e,"target",this),i(e,"currentTarget",this),r.slice(0).some(s,e),delete e.currentTarget,delete e.target),!0})),i(a,"removeEventListener",(function(e,r){for(var n=t.get(this),a=n[e]||(n[e]=[]),o=0,i=a.length;o<i;o++)if(a[o].listener===r)return void a.splice(o,1)})),X.EventTarget=o}(Object,new WeakMap)}const ee=X.EventTarget;var te;!function(e){e.xLarge="xLarge",e.large="large",e.medium="medium",e.small="small",e.xSmall="xSmall"}(te||(te={}));var re=new Map([[te.xLarge,"1920px"],[te.large,"1600px"],[te.medium,"1280px"],[te.small,"1024px"],[te.xSmall,0]]),ne=new ee,ae={},oe={};function ie(e,t){var r=!1;for(var[n]of(ae[t]=e.matches,re))if(ae[n]&&oe.breakpoint!==n){oe.breakpoint=n,r=!0;break}r&&ne.dispatchEvent(new CustomEvent("change",{detail:oe}))}re.forEach(((e,t)=>{var r=window.matchMedia("(min-width: ".concat(e,")"));ie(r,t),r.addEventListener?r.addEventListener("change",(e=>{ie(e,t)})):r.addListener((e=>{ie(e,t)}))}));var se=()=>oe;function ce(e){return function(t){var r,n="local"===e?localStorage:sessionStorage;return JSON.parse(null!==(r=n.getItem(t))&&void 0!==r?r:"null")}}var le=r(8874),ue=(r(8525),r(7857));function pe(e,t){var r=(0,i.orderBy)(e,(e=>{var t,r,n;return null!==(t=null===(r=e.app)||void 0===r||null===(n=r.homepage)||void 0===n?void 0:n.length)&&void 0!==t?t:0}),"desc");for(var n of r){var a=n.app.homepage;if("string"==typeof a&&"/"===a[0]&&("/"===a?t===a:"".concat(t.replace(/\/+$/,""),"/").startsWith("".concat(a.replace(/\/+$/,""),"/"))))return n}}function de(e){return!e||!window.STANDALONE_MICRO_APPS&&e.app.standaloneMode}var fe,ve=["extraQuery","clear","keepHash"],he=!1;function me(e,t){t(!(he=!confirm(e)))}function ge(){if(!fe){var e=(0,ue.createBrowserHistory)({basename:V().replace(/\/$/,""),getUserConfirmation:me});Object.assign(e,function(e){var t,{push:r,replace:n}=e;function o(e,t,n){he=!1,r(e,t),null==n||n(he)}function i(e,t,r){he=!1,n(e,t),null==r||r(he)}function s(t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,{extraQuery:s,clear:c,keepHash:l}=n,u=(0,f.Z)(n,ve),p=new URLSearchParams(c?"":e.location.search),d={};for(var[v,h]of(Object.assign(d,r,s),Object.entries(d)))if(Array.isArray(h))for(var m of(p.delete(v),h))p.append(v,m);else null==h||""===h?p.delete(v):p.set(v,h);("push"===t?o:i)("?".concat(p.toString()).concat(l?e.location.hash:""),u,a)}}return(0,a.Z)({pushQuery:s("push"),replaceQuery:s("replace"),pushAnchor:function(t,r,n){o((0,a.Z)((0,a.Z)({},e.location),{},{key:void 0,hash:t,state:(0,a.Z)({notify:!1},r)}),void 0,n)},reload:function(t){i((0,a.Z)((0,a.Z)({},e.location),{},{state:(0,a.Z)((0,a.Z)({},e.location.state),{},{notify:!0})}),void 0,t)},setBlockMessage:function(e){t=e},getBlockMessage:function(){return t},unblock:function(){t=void 0}},function(e){var{push:t,replace:r}=e;function n(n){return function(a,o,i){var s,c="string"==typeof a;return"string"==typeof(s=c?(0,ue.parsePath)(a).pathname:a.pathname)&&s.startsWith("/")&&de(function(e){var t,r;return pe(null!==(t=null===(r=zn)||void 0===r?void 0:r.storyboards)&&void 0!==t?t:[],e)}(s))?location["push"===n?"assign":"replace"](c?V()+a.substring(1):e.createHref(a)):("push"===n?t:r)(a,o,i)}}return{push:n("push"),replace:n("replace")}}((0,a.Z)((0,a.Z)({},e),{},{push:o,replace:i})))}(e)),fe=e}return fe}function ye(){return fe}var we=r(5866),be=r(6171),Se=r(381),Ee=r(1304),Ze=r(2308),ke=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.post("api/contract/single_search",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}(),Ie=new Map,Pe=new Map,Ce=(e,t)=>{null==e||e.forEach((e=>{t.set("".concat(e.namespaceId,".").concat(e.name),e)}))},Oe=new Map;function Ae(e){return e.includes("@")}function _e(e,t,r){return Te.apply(this,arguments)}function Te(){return Te=(0,o.Z)((function*(e,t,r){if(!Ae(e))return t;if(!e.includes(":"))throw new Error("You're using legacy Custom API \"".concat(e,'" which is not supported in v3, please use Flow API instead'));var n=yield function(e){var t=Oe.get(e);return t||(t=function(e){return Re.apply(this,arguments)}(e),Oe.set(e,t)),t}(e);if(!n)throw new Error('Flow API not found: "'.concat(e,'"'));var a=function(e,t){var r,n,a="string"==typeof t.contract?Ze.safeLoad(t.contract,{schema:Ze.JSON_SCHEMA,json:!0}):t.contract,{uri:o,method:i="GET",ext_fields:s}=null!==(r=null==a?void 0:a.endpoint)&&void 0!==r?r:{},c=!(null==a||!a.response)&&!1!==a.response.wrapper;if(!o)throw new Error('Missing endpoint.uri in contract of provider "'.concat(e,'"'));return{uri:o,method:"list"===i.toLowerCase()?"get":i,ext_fields:s,name:t.name,namespace:t.namespace,serviceName:t.serviceName,version:t.version,isFileType:"file"===(null==a||null===(n=a.response)||void 0===n?void 0:n.type),responseWrapper:c,request:null==a?void 0:a.request}}(e,n);return function(e,t,r){var n,{uri:a,method:o,ext_fields:i,name:s,namespace:c,serviceName:l,responseWrapper:u,version:p,isFileType:d,request:f}=e,v=d&&"saveAs"===r;v&&(n=t.shift());var{url:h,args:m}=function(e,t,r,n,a,o){var i=o?a?"api/gateway/".concat(a):"api/gateway/".concat(n,".").concat(r,"@").concat(o):"api/gateway/api_service.".concat(n,".").concat(r),s=t.slice();return{url:i+e.replace(/:([^/]+)/g,(()=>s.shift())),args:s}}(a,t,s,c,l,p);return[...v?[n]:[],{url:h,originalUri:a,method:o,ext_fields:i,responseWrapper:u,request:f,isFileType:d},...m]}(a,t,r)})),Te.apply(this,arguments)}function Re(){return(Re=(0,o.Z)((function*(e){var[t,r]=e.split("@"),[n,a]=r.split(":"),o=function(e){return Ie.get(e)||Pe.get(e)}("".concat(t,".").concat(n));if(o)return{name:o.name,namespace:o.namespaceId,serviceName:o.serviceName,version:o.version,contract:{endpoint:o.endpoint,response:o.response,request:o.request}};var i,s,{contractData:c}=yield ke({contractName:"".concat(t,".").concat(n),version:a});return c?{name:c.name,namespace:null===(i=c.namespace)||void 0===i||null===(s=i[0])||void 0===s?void 0:s.name,serviceName:c.serviceName,version:c.version,contract:{endpoint:c.endpoint,response:c.response,request:c.request}}:void 0}))).apply(this,arguments)}var Me="core.provider-flow-api";function xe(e,t){return e.some((e=>e.source===t))}function Be(e){return Le.apply(this,arguments)}function Le(){return Le=(0,o.Z)((function*(e){for(var t,{url:r,originalUri:n,method:o="GET",responseWrapper:s=!0,ext_fields:c=[],request:l,isFileType:u}=e,p=["get","delete","head"].includes(o.toLowerCase()),d=u?{responseType:"blob"}:{},f=arguments.length,v=new Array(f>1?f-1:0),h=1;h<f;h++)v[h-1]=arguments[h];if(p){var m,g,y,w,b,S;n&&"object"===(null==l?void 0:l.type)&&(null!==(m=null===(g=n.match(/:([^/]+)/g))||void 0===g?void 0:g.length)&&void 0!==m?m:0)===(null!==(y=null===(w=l.fields)||void 0===w?void 0:w.length)&&void 0!==y?y:0)?[S]=v:[b,S]=v,t=yield Ee.http.simpleRequest(o,r,(0,a.Z)((0,a.Z)({params:b},d),S))}else{var E=function(e){if(!e||"object"!==e.type)return!1;var t=e=>!(0,i.isEmpty)(e)&&e.some((e=>["file","file[]"].includes(e.type)||t(e.fields)));return t(e.fields)}(l),Z=function(e){for(var t=xe(e,"query"),r=xe(e,"body"),n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(t){if(r){var[s,c,l]=o;return{data:s,options:(0,a.Z)({params:c},l)}}var[u,p]=o;return{data:{},options:(0,a.Z)({params:u},p)}}var[d,f]=o;return{data:d,options:f}}(c,...v);t=yield Ee.http.requestWithBody(o,r,E?function(e){if(e instanceof FormData)return e;var t=new FormData,r=function(e,r){Array.isArray(r)?r.forEach((r=>{t.append(e,r)})):!(0,i.isObject)(r)||r instanceof Blob||r instanceof Date?t.append(e,r):Object.entries(r).forEach((r=>{var[n,a]=r;t.append("".concat(e,"[").concat(n,"]"),a)}))};for(var[n,a]of Object.entries(e))r(n,a);return t}(Z.data):Z.data,(0,a.Z)((0,a.Z)({},d),Z.options))}return!u&&s?t.data:t})),Le.apply(this,arguments)}var Ne=new Map;function Ue(e){return je.apply(this,arguments)}function je(){return(je=(0,o.Z)((function*(e){Ae(e)&&(e=Me);var t=Ne.get(e);if(t)return t;if(e!==Me||customElements.get(e)){if(yield(0,v.loadBricksImperatively)([e],na()),!customElements.get(e))throw new Error('Provider not defined: "'.concat(e,'".'))}else customElements.define(Me,(0,s.createProviderClass)(Be));return t=document.createElement(e),Ne.set(e,t),t}))).apply(this,arguments)}var $e,Fe=new Map;function De(e,t,r){return Ke.apply(this,arguments)}function Ke(){return(Ke=(0,o.Z)((function*(e,t,r){var{useProvider:n,method:o="resolve",args:i=[],onReject:s}=e,c=e.provider;if(c&&!n)throw new Error("You're using \"provider: ".concat(c,'" which is not supported in v3, please use "useProvider" instead'));var l,[u,p]=yield Promise.all([Ue(n),ja(i,t)]),d=Ve(u,n,o,p,r,i),{transform:f}=e;try{l=yield d}catch(e){if(!function(e){return!(null==e||!e.transform)}(s))throw e;f=s.transform,l=e}return f?"string"==typeof f?{[f]:l}:ja(f,(0,a.Z)((0,a.Z)({},t),{},{data:l})):l}))).apply(this,arguments)}function Ve(e,t,r,n,a,o){return He.apply(this,arguments)}function He(){return(He=(0,o.Z)((function*(e,t,r,n,a,i){var s,c;try{s=JSON.stringify({useProvider:t,method:r,args:n})}catch(e){if(!i)throw e;s=JSON.stringify({useProvider:t,method:r,originalArgs:i})}return"reload"!==(null==a?void 0:a.cache)&&(c=Fe.get(s)),c||(c=(0,o.Z)((function*(){var a=yield _e(t,n,r);return e.resolve(...a)}))(),Fe.set(s,c)),c}))).apply(this,arguments)}function We(e,t){return qe.apply(this,arguments)}function qe(){return(qe=(0,o.Z)((function*(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Ma(e.if)?yield ja(e.if,t):e.if)}))).apply(this,arguments)}function ze(e,t){return!(0,p.hasOwnProperty)(e,"if")||!!("string"==typeof e.if||Ma(e.if)?Fa(e.if,t):e.if)}function Ge(e){return!(0,p.hasOwnProperty)(e,"if")||!!e.if}function Je(){return(Je=(0,o.Z)((function*(e,t){return(0,p.isObject)(e.if)&&!Ma(e.if)?Ge(yield De(e.if,t)):We(e,t)}))).apply(this,arguments)}function Ye(e,t){return ze(e,{data:t})}function Qe(e){switch(e){case $e.USE_BRICK_PROPERTIES:case $e.USE_BRICK_EVENTS:case $e.USE_BRICK_IF:case $e.USE_BRICK_LIFECYCLE:case $e.USE_BRICK_DATA_SOURCE:return!0}return!1}function Xe(e,t,r){if(Qe(e))return e;if(t)switch(e){case $e.USE_BRICK:return $e.USE_BRICK_ITEM;case $e.USE_BRICK_SLOTS_ITEM_BRICKS:return $e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM}else switch(e){case $e.INITIAL:if("useBrick"===r)return $e.USE_BRICK;break;case $e.USE_BRICK:case $e.USE_BRICK_ITEM:case $e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM:switch(r){case"properties":return $e.USE_BRICK_PROPERTIES;case"dataSource":return $e.USE_BRICK_DATA_SOURCE;case"events":return $e.USE_BRICK_EVENTS;case"slots":return $e.USE_BRICK_SLOTS;case"children":return $e.USE_BRICK_SLOTS_ITEM_BRICKS;case"if":return $e.USE_BRICK_IF;case"lifeCycle":return $e.USE_BRICK_LIFECYCLE}break;case $e.USE_BRICK_SLOTS:return $e.USE_BRICK_SLOTS_ITEM;case $e.USE_BRICK_SLOTS_ITEM:if("bricks"===r)return $e.USE_BRICK_SLOTS_ITEM_BRICKS}return $e.INITIAL}function et(e){var t=!1,r=!1,n=!1;if("string"==typeof e?(0,u.isEvaluable)(e):Ma(e)){var a="string"==typeof e?e:e[Ta];t=(0,s.track)(a,"track context","CTX"),r=(0,s.track)(a,"track state","STATE"),n=(0,s.track)(a,"track formstate","FORM_STATE")}return{contextNames:t,stateNames:r,formStateNames:n}}function tt(){return tt=(0,o.Z)((function*(e,t,r){return(0,p.isObject)(e)?Object.fromEntries((yield Promise.all(Object.entries(e).map(function(){var e=(0,o.Z)((function*(e){var[n,a]=e;if(Array.isArray(r)){var{contextNames:o,stateNames:i,formStateNames:s}=et(a);(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a})}var c=yield ja(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?$e.USE_BRICK:$e.INITIAL});if(void 0!==c&&("style"!==n&&"dataset"!==n||(0,p.isObject)(c)))return[n,c]}));return function(t){return e.apply(this,arguments)}}()))).filter(Boolean)):{}})),tt.apply(this,arguments)}function rt(e,t){if(t)for(var[r,n]of Object.entries(t))switch(r){case"style":case"dataset":for(var[a,o]of Object.entries(n))e[r][a]=o;break;case"constructor":case"__proto__":case"innerHTML":throw new Error("set `".concat(r,"` is prohibited"));default:e[r]=n}}function nt(e,t,r){var n=function(e,t,r){return(0,p.isObject)(e)?Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;if(Array.isArray(r)){var{contextNames:o,stateNames:i,formStateNames:s}=et(a);(o||i||s)&&r.push({contextNames:o,stateNames:i,formStateNames:s,propName:n,propValue:a})}var c=Fa(a,t,{$$lazyForUseBrick:!0,$$stateOfUseBrick:"useBrick"===n?$e.USE_BRICK:$e.INITIAL});if(void 0!==c&&("style"!==n&&"dataset"!==n||(0,p.isObject)(c)))return[n,c]})).filter(Boolean)):{}}(t,r);Array.isArray(e)||(e=[e]),e.forEach((e=>{rt(e,n)}))}!function(e){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_EVENTS=4]="USE_BRICK_EVENTS",e[e.USE_BRICK_IF=5]="USE_BRICK_IF",e[e.USE_BRICK_SLOTS=6]="USE_BRICK_SLOTS",e[e.USE_BRICK_SLOTS_ITEM=7]="USE_BRICK_SLOTS_ITEM",e[e.USE_BRICK_SLOTS_ITEM_BRICKS=8]="USE_BRICK_SLOTS_ITEM_BRICKS",e[e.USE_BRICK_SLOTS_ITEM_BRICKS_ITEM=9]="USE_BRICK_SLOTS_ITEM_BRICKS_ITEM",e[e.USE_BRICK_LIFECYCLE=10]="USE_BRICK_LIFECYCLE",e[e.USE_BRICK_DATA_SOURCE=11]="USE_BRICK_DATA_SOURCE"}($e||($e={}));var at=new Set(["prefix"]),ot=new WeakMap,it=new class{constructor(){(0,m.Z)(this,ot,{writable:!0,value:new Map})}define(e,t){var r,n,o,s,c=(0,g.Z)(this,ot).has(e);c?console.warn('Custom template of "'.concat(e,'" already registered.')):(c=!!customElements.get(e))&&console.warn('Custom template of "'.concat(e,'" already defined by customElements.'));var l=null!==(r=null===(n=t.proxy)||void 0===n?void 0:n.properties)&&void 0!==r?r:{},u=[],p=[];for(var[d,f]of Object.entries(l))f.asVariable?(p.push(d),console.warn("Template `asVariable` with `TPL.*` is deprecated and will be dropped in v3:",e,d)):f.mergeProperty||f.refTransform?console.error("Template `mergeProperty` and `refTransform` are not supported in v3:",e,d):f.ref&&u.push([d,f]);var v=(0,a.Z)((0,a.Z)({},t),{},{proxy:(0,a.Z)((0,a.Z)({},t.proxy),{},{properties:Object.fromEntries(u)}),state:(t.state?t.state.map((e=>(0,a.Z)({expose:!0},e))):[]).concat(p.map((e=>({name:e,expose:!0}))))});(0,g.Z)(this,ot).set(e,(0,a.Z)((0,a.Z)({},v),{},{name:e}));var h,m,y=(h=v.state,(0,i.uniq)(null!==(m=null==h?void 0:h.filter((e=>e.expose)).map((e=>e.name)))&&void 0!==m?m:[])),w=Object.entries(null!==(o=null===(s=v.proxy)||void 0===s?void 0:s.methods)&&void 0!==o?o:{}),b=y.concat(u.map((e=>e[0]))),S=w.map((e=>e[0])),E=b.concat(S).find((e=>e in HTMLElement.prototype&&!at.has(e)));if(void 0!==E)throw new Error('In custom template "'.concat(e,'", "').concat(E,'" is a native HTMLElement property, and should be avoid to be used as a brick property or method.'));if(!c){class t extends HTMLElement{get $$typeof(){return"custom-template"}static get _dev_only_definedProperties(){return b}static get _dev_only_definedMethods(){return S}$$getElementByRef(e){var t,r,n,a;return null===(t=this.$$tplStateStore)||void 0===t||null===(r=t.hostBrick)||void 0===r||null===(n=r.tplHostMetadata)||void 0===n||null===(a=n.internalBricksByRef.get(e))||void 0===a?void 0:a.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(u.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 k of y)Z(k);var I=function(e,r){Object.defineProperty(t.prototype,e,{get(){var t;return this.$$getElementByRef(r.ref)[null!==(t=r.refProperty)&&void 0!==t?t:e]},set(t){var n,a,o=null===(n=this.$$getElementByRef)||void 0===n?void 0:n.call(this,r.ref);o&&(o[null!==(a=r.refProperty)&&void 0!==a?a:e]=t)},enumerable:!0})};for(var[P,C]of u)I(P,C);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[A,_]of w)O(A,_);customElements.define(e,t)}}get(e){return(0,g.Z)(this,ot).get(e)}};function st(e,t,r){var{tplStateStoreId:n,tplStateStoreMap:a}=e;if(!n)throw new Error('Using "'.concat(t,'" outside of a custom template').concat(null!=r?r:""));var o=a.get(n);if(!o)throw new Error('Template state store is not found when using "'.concat(t,'"').concat(null!=r?r:"",".\nThis is a bug of Brick Next, please report it."));return o}function ct(e,t,r){var n=st(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}function lt(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function ut(e){return e&&e.sensitive?"":"i"}function pt(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,a=void 0!==n&&n,o=r.start,i=void 0===o||o,s=r.end,c=void 0===s||s,l=r.encode,u=void 0===l?function(e){return e}:l,p=r.delimiter,d=void 0===p?"/#?":p,f=r.endsWith,v="[".concat(lt(void 0===f?"":f),"]|$"),h="[".concat(lt(d),"]"),m=i?"^":"",g=0,y=e;g<y.length;g++){var w=y[g];if("string"==typeof w)m+=lt(u(w));else{var b=lt(u(w.prefix)),S=lt(u(w.suffix));if(w.pattern)if(t&&t.push(w),b||S)if("+"===w.modifier||"*"===w.modifier){var E="*"===w.modifier?"?":"";m+="(?:".concat(b,"((?:").concat(w.pattern,")(?:").concat(S).concat(b,"(?:").concat(w.pattern,"))*)").concat(S,")").concat(E)}else m+="(?:".concat(b,"(").concat(w.pattern,")").concat(S,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(b).concat(S,")").concat(w.modifier)}}if(c)a||(m+="".concat(h,"?")),m+=r.endsWith?"(?=".concat(v,")"):"$";else{var Z=e[e.length-1],k="string"==typeof Z?h.indexOf(Z[Z.length-1])>-1:void 0===Z;a||(m+="(?:".concat(h,"(?=").concat(v,"))?")),k||(m+="(?=".concat(h,"|").concat(v,")"))}return new RegExp(m,ut(r))}(function(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var a=1,o="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--a){s++;break}}else if("("===e[s]&&(a++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=e[s++]}else o+=e[s++]+e[s++];if(a)throw new TypeError("Unbalanced pattern at ".concat(r));if(!o)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:o}),r=s}else{for(var i="",s=r+1;s<e.length;){var c=e.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,a=void 0===n?"./":n,o="[^".concat(lt(t.delimiter||"/#?"),"]+?"),i=[],s=0,c=0,l="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],a=n.type,o=n.index;throw new TypeError("Unexpected ".concat(a," at ").concat(o,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=u("CHAR"),v=u("NAME"),h=u("PATTERN");if(v||h){var m=f||"";-1===a.indexOf(m)&&(l+=m,m=""),l&&(i.push(l),l=""),i.push({name:v||s++,prefix:m,suffix:"",pattern:h||o,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)l+=g;else if(l&&(i.push(l),l=""),u("OPEN")){m=d();var y=u("NAME")||"",w=u("PATTERN")||"",b=d();p("CLOSE"),i.push({name:y||(w?s++:""),pattern:y&&!w?o:w,prefix:m,suffix:b,modifier:u("MODIFIER")||""})}else p("END")}}return i}(e,r),t,r)}function dt(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,a=r.exec(e.source);a;)t.push({name:a[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),a=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return dt(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),ut(r))}(e,t,r):pt(e,t,r)}var ft=new Map,vt=1e4,ht=0;function mt(e,t){var{path:r,exact:n=!1,strict:a=!1,sensitive:o=!0}=t;return(Array.isArray(r)?r:[r]).reduce(((t,r)=>{if(t)return t;var{regexp:i,keys:s}=function(e,t){var r="".concat(t.end).concat(t.strict).concat(t.sensitive),n=ft.get(r);n||ft.set(r,n=new Map);var a=n.get(e);if(a)return a;var o=[],i={regexp:dt(e,o,t),keys:o};return ht<vt&&(n.set(e,i),ht++),i}(r,{end:n,strict:a,sensitive:o}),c=i.exec(e);if(!c)return null;var[l,...u]=c,p=e===l;return n&&!p?null:{path:r,url:"/"===r&&""===l?"/":l,isExact:p,params:s.reduce(((e,t,r)=>(e[t.name]=u[r],e)),{})}}),null)}function gt(){return(gt=(0,o.Z)((function*(e,t){for(var r of e){if("string"!=typeof r.path)throw console.error("Invalid route with invalid path:",r),new Error("Invalid route with invalid type of path: ".concat(typeof r.path));var n=r.path.replace(/^\$\{APP.homepage\}/,t.app.homepage),a=mt(t.location.pathname,{path:n,exact:r.exact});if(a&&(yield We(r,t)))return t.app.noAuthGuard||r.public||no()?{match:a,route:r}:"unauthenticated"}return"missed"}))).apply(this,arguments)}var yt=Symbol.for("tpl.asyncComputedPropsFromHost"),wt=Symbol.for("tpl.stateStoreId"),bt=Symbol.for("tpl.externalForEachItem"),St=r(6666),Et=new Set;function Zt(e){if(e instanceof Event&&e.target instanceof HTMLScriptElement)return e.target.src;if(e instanceof Ee.HttpFetchError)return"网络错误,请检查您的网络连接。";if(e instanceof Ee.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 kt(e){return e instanceof Ee.HttpResponseError&&401===e.response.status&&!!e.responseJson&&100003===e.responseJson.code}var It,Pt=!1;function Ct(e){if(!(e instanceof Ee.HttpAbortError))if(!kt(e)||window.NO_AUTH_GUARD){console.error(e);var t=Zt(e);t!==It&&(It=t,alert(t),setTimeout((()=>{It=void 0}),1e3))}else{if(Pt)return;if(Pt=!0,confirm("您还未登录或登录信息已过期,现在重新登录?")){var r=ea().getFeatureFlags()["sso-enabled"],n=ye();n.push(r?"/sso-auth/login":"/auth/login",{from:(0,a.Z)((0,a.Z)({},n.location),{},{state:void 0})})}setTimeout((()=>{Pt=!1}),1)}}function Ot(e,t,r){t&&Object.entries(t).forEach((t=>{var[n,a]=t,o=Rt(a,r,{element:e});for(var i of(e.addEventListener(n,o),e.$$listeners||(e.$$listeners=[]),e.$$listeners.push([n,o]),e.$$eventListeners||(e.$$eventListeners=[]),[].concat(a)))e.$$eventListeners.push([n,null,i])}))}function At(e){return"string"==typeof e.action}function _t(e){return"string"==typeof e.useProvider}function Tt(e){return!(!e.target&&!e.targetRef||!e.method&&!e.properties)}function Rt(e,t,r){return function(n){for(var o of[].concat(e))if(ze(o,(0,a.Z)((0,a.Z)({},t),{},{event:n})))if(At(o)){var[i,s]=o.action.split(".");switch(o.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":Ut(n,s,o.args,o.callback,t);break;case"window.open":jt(n,o.args,t);break;case"location.reload":case"location.assign":Dt(n,s,o.args,t);break;case"localStorage.setItem":case"localStorage.removeItem":case"sessionStorage.setItem":case"sessionStorage.removeItem":Kt(n,i,s,o.args,t);break;case"event.preventDefault":n.preventDefault();break;case"console.log":case"console.error":case"console.warn":case"console.info":Vt(n,s,o.args,t);break;case"message.success":case"message.error":case"message.info":case"message.warn":Ht(n,0,o.args,t);break;case"handleHttpError":Ct(n.detail);break;case"context.assign":case"context.replace":case"context.refresh":case"context.load":$t(n,s,o.args,o.callback,t);break;case"state.update":case"state.refresh":case"state.load":Ft(n,s,o.args,o.callback,t);break;case"tpl.dispatchEvent":var[c,l]=qt(o.args,t,n);ct(t,o.action,": ".concat(c)).dispatchEvent(new CustomEvent(c,l));break;case"theme.setDarkTheme":case"theme.setLightTheme":L("theme.setDarkTheme"===o.action?"dark":"light");break;case"theme.setTheme":var[u]=qt(o.args,t,n);L(u);break;case"mode.setDashboardMode":case"mode.setDefaultMode":D("mode.setDashboardMode"===o.action?"dashboard":"default");break;default:console.error("unknown event listener action:",o.action)}}else _t(o)?Mt(n,o,t,r):Tt(o)?Bt(n,o,t,r):console.error("unknown event handler:",o)}}function Mt(e,t,r,n){return xt.apply(this,arguments)}function xt(){return(xt=(0,o.Z)((function*(e,t,r,n){try{Lt(e,yield Ue(t.useProvider),t,"saveAs"!==t.method?"resolve":"saveAs",r,n)}catch(e){console.error(Zt(e))}}))).apply(this,arguments)}function Bt(e,t,r,n){var o=[],i=t.target,s=t.targetRef,c=i;if(("string"==typeof i?(0,u.isEvaluable)(i):Ma(i))&&(c=Fa(i,(0,a.Z)((0,a.Z)({},r),{},{event:e}))),"string"==typeof c)if("_self"===c)o.push(n.element);else if(t.multiple)o=Array.from(document.querySelectorAll(c));else{var l=document.querySelector(c);null!==l&&o.push(l)}else if(c)c instanceof HTMLElement?o.push(c):console.error("unexpected target:",c);else if(s){var p=s;("string"==typeof s?(0,u.isEvaluable)(s):Ma(s))&&(p=Fa(s,(0,a.Z)((0,a.Z)({},r),{},{event:e})));var d=[].concat(p),f=ct(r,"targetRef",": ".concat(d.join(", ")));o.push(...d.map((e=>{var t;return null===(t=f.$$getElementByRef)||void 0===t?void 0:t.call(f,e)})).filter(Boolean))}0!==o.length?function(e){return!!e.method}(t)?o.forEach((a=>{Lt(e,a,t,t.method,r,n,{useEventAsDefault:!0})})):function(e){return!!e.properties}(t)&&nt(o,t.properties,(0,a.Z)((0,a.Z)({},r),{},{event:e})):console.error("target not found:",i||s)}function Lt(e,t,r,n,a,o,i){return Nt.apply(this,arguments)}function Nt(){return Nt=(0,o.Z)((function*(e,t,r,n,i,s,c){var l;if("function"==typeof t[n]){var u=function(){var a=(0,o.Z)((function*(){var a=qt(r.args,i,e,c);return _t(r)&&(a=yield _e(r.useProvider,a,n)),t[n](...a)}));return function(){return a.apply(this,arguments)}}();if(r.callback){var p,d=Wt(r.callback,i,s),f={progress:d("progress"),success:d("success"),error:d("error"),finally:d("finally")};if(_t(r)&&(p=Fa(r.poll,(0,a.Z)((0,a.Z)({},i),{},{event:e}))),null!==(l=p)&&void 0!==l&&l.enabled)!function(e,t,r){var n,{progress:a,success:i,error:s,finally:c}=t,{interval:l,leadingRequestDelay:u,continueOnError:p,delegateLoadingBar:d,expectPollEnd:f,expectPollStopImmediately:v}=r,h=aa();function m(){return g.apply(this,arguments)}function g(){return(g=(0,o.Z)((function*(){var t;Et.delete(n);try{if(!(t=null==v?void 0:v())){var r=yield e();(t=(null==v?void 0:v())||h!==aa())||(null==a||a(r),null!=f&&f(r)?(d&&window.dispatchEvent(new Event("request.end")),null==i||i(r),null==c||c()):y(null!=l?l:3e3))}}catch(e){(t=(null==v?void 0:v())||h!==aa())||(null==s||s(e),p?y(null!=l?l:3e3):null==c||c())}finally{d&&t&&window.dispatchEvent(new Event("request.end"))}}))).apply(this,arguments)}function y(e){n=setTimeout(m,e),Et.add(n)}y(null!=u?u:0),d&&window.dispatchEvent(new Event("request.start"))}(u,f,p);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})})),Nt.apply(this,arguments)}function Ut(e,t,r,n,a){var o=0,i=!1,s=t;switch(t){case"push":case"replace":case"pushQuery":case"replaceQuery":case"pushAnchor":o=2,i=!0;break;case"reload":i=!0;break;case"block":o=1,s="setBlockMessage"}var c=[];if(o>0&&((c=qt(r,a,e,{useEventDetailAsDefault:!0})).length=o),i&&n){var l=Wt(n,a,void 0);c.push((e=>{l(e?"error":"success")({blocked:e}),l("finally")({blocked:e})}))}ye()[s](...c)}function jt(e,t,r){var[n,a,o]=qt(t,r,e);window.open(n,a||"_self",o)}function $t(e,t,r,n,a){var[o,i]=qt(r,a,e);a.ctxStore.updateValue(o,i,t,n,a)}function Ft(e,t,r,n,a){var[o,i]=qt(r,a,e);st(a,"state.".concat(t),": ".concat(o)).updateValue(o,i,"update"===t?"replace":t,n,a)}function Dt(e,t,r,n){if("assign"===t){var[a]=qt(r,n,e);location.assign(a)}else location[t]()}function Kt(e,t,r,n,a){var o="localStorage"===t?localStorage:sessionStorage,[i,s]=qt(n,a,e);"setItem"===r?void 0!==s&&o.setItem(i,JSON.stringify(s)):o.removeItem(i)}function Vt(e,t,r,n){console[t](...qt(r,n,e,{useEventAsDefault:!0}))}function Ht(e,t,r,n){alert(...qt(r,n,e,{useEventAsDefault:!0}))}function Wt(e,t,r){return function(n){return function(a){var o=null==e?void 0:e[n];if(o)try{var i=new CustomEvent("callback.".concat(n),{detail:a});Rt(o,t,r)(i)}catch(e){console.error(e)}else"error"===n&&console.error("Unhandled callback error:",a)}}}function qt(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Array.isArray(e)?Fa(e,(0,a.Z)((0,a.Z)({},t),{},{event:r})):n.useEventAsDefault?[r]:n.useEventDetailAsDefault?[r.detail]:[]}class zt{constructor(e,t){(0,St.Z)(this,"type",void 0),(0,St.Z)(this,"data",new Map),(0,St.Z)(this,"changeEventType",void 0),(0,St.Z)(this,"pendingStack",[]),(0,St.Z)(this,"hostBrick",void 0),this.type=e,this.changeEventType="FORM_STATE"===this.type?"formstate.change":"STATE"===this.type?"state.change":"context.change",this.hostBrick=t}getValue(e){var t;return null===(t=this.data.get(e))||void 0===t?void 0:t.value}updateValue(e,t,r,n,o){var i=this.data.get(e);if(!i)throw new Error("".concat(this.type," '").concat(e,"' is not defined"));if("refresh"!==r&&"load"!==r)"replace"===r?i.value=t:(0,p.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),i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}));else{if(!i.load)throw new Error("You can not ".concat(r,' "').concat(this.type,".").concat(e,'" which has no resolve'));var s;if("load"===r&&(i.loaded?s=Promise.resolve(i.value):i.loading&&(s=i.loading)),s||(s=i.loading=i.load((0,a.Z)({cache:"load"===r?"default":"reload"},t))).then((e=>{i.loaded=!0,i.value=e,i.eventTarget.dispatchEvent(new CustomEvent(this.changeEventType,{detail:i.value}))}),(e=>{null!=n&&n.error||Ct(e)})),n){var c=Wt(n,o);s.then((e=>{c("success")({value:e}),c("finally")()}),(e=>{c("error")(e),c("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 a=(0,s.collectMemberUsage)([n.if,n.value,n.resolve],t);r.set(n,a)}return r}(e,r),a=new Map;for(var i of Array.from(n.keys()).map((e=>e.name))){var c;a.set(i,(null!==(c=a.get(i))&&void 0!==c?c:0)+1)}var l=Array.from(n.values()).some((e=>e.hasNonStaticUsage)),u=new WeakSet,p=new Map,d=new Map([...new Set(e.map((e=>e.name)))].map((e=>[e,new Promise(((t,r)=>{p.set(e,{resolve:t,reject:r})}))]))),f=function(){var e=(0,o.Z)((function*(e){var r;u.add(e);var o=yield t(e);n.delete(e);var i=null!==(r=a.get(e.name))&&void 0!==r?r:0;if(o){if(p.get(e.name).resolve(),a.delete(e.name),0===i)throw new Error("Duplicated context defined: ".concat(e.name))}else 1===i?(p.get(e.name).resolve(),a.delete(e.name)):a.set(e.name,i-1);yield h()}));return function(t){return e.apply(this,arguments)}}(),v=l;function h(){return m.apply(this,arguments)}function m(){return m=(0,o.Z)((function*(){var e=Array.from(n.entries()).filter(function(e,t){return(r,n)=>t?0===n:![...r[1].usedProperties].some((t=>e.has(t)))}(a,v)).map((e=>e[0])).filter((e=>!u.has(e)));yield Promise.all(e.map(f))})),m.apply(this,arguments)}return{pendingResult:h().then((0,o.Z)((function*(){for(var e of(n.size>0&&(function(e,t){var r=new Map(e),n=new Set(Array.from(r.keys()).map((e=>e.name))),a=()=>{var e=!1;for(var[t,o]of r.entries())[...o.usedProperties].some((e=>n.has(e)))||(r.delete(t),n.delete(t.name),e=!0);e&&a()};if(a(),r.size>0)throw new ReferenceError("Circular ".concat(t," detected: ").concat(Array.from(r.keys()).map((e=>e.name)).join(", ")))}(n,r),v=!0,yield h()),p.values()))e.resolve()}))).catch((e=>{for(var t of p.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,o.Z)((function*(){var r=function*(t){yield Promise.all([...e].map((e=>t.get(e))))};for(var{pendingContexts:n}of t.pendingStack)yield*r(n)}))()}waitForAll(){var e=this;return(0,o.Z)((function*(){for(var{pendingResult:t}of e.pendingStack)yield t}))()}resolve(e,t,r){var n=this;return(0,o.Z)((function*(){if(!(yield We(e,t)))return!1;var i,c;if("STATE"===n.type&&r&&e.expose){var l=yield r;(0,p.hasOwnProperty)(l,e.name)&&(i=l[e.name])}var u=!1;if(void 0===i){if(e.resolve){var d=(0,a.Z)({transform:"value"},e.resolve);if(yield We(e.resolve,t))c=function(){var e=(0,o.Z)((function*(e){return(yield De(d,t,e)).value}));return function(t){return e.apply(this,arguments)}}(),(u=e.resolve.lazy)||(i=yield c());else if(!(0,p.hasOwnProperty)(e,"value"))return!1}c&&!u||void 0===e.value||(i=yield ja(e.value,t))}var f={value:i,eventTarget:new EventTarget,load:c,loaded:!u};if(e.onChange&&f.eventTarget.addEventListener(n.changeEventType,Rt(e.onChange,t)),e.track&&"FORM_STATE"!==n.type){var v=(0,s.strictCollectMemberUsage)(c?e.resolve:e.value,n.type);for(var h of v)n.onChange(h,(()=>{c?n.updateValue(e.name,{cache:"default"},"refresh"):n.updateValue(e.name,Fa(e.value,t),"replace")}))}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,f),!0}))()}}function Gt(e,t,r){var n,{reversedProxies:a,asyncHostProperties:o,externalSlots:s,tplStateStoreId:c,hostBrick:l}=e;if(t&&a){var u=a.properties.get(t);u&&(n=o.then((e=>{var t={};for(var{from:r,to:n}of u){var a=e[r];void 0!==a&&n.refProperty&&(t[n.refProperty]=a)}return t})));var d=a.slots.get(t);if(d&&s){var f=new Map;for(var{from:v,to:h}of d){var m,g,y,w,b=null!==(m=null===(g=s[v])||void 0===g?void 0:g.bricks)&&void 0!==m?m:[];if(b.length){var S=null!==(y=h.refSlot)&&void 0!==y?y:v,E=f.get(S);if(!E){E=[];for(var Z=(0,p.hasOwnProperty)(r,S)?r[S].bricks.length+1:1,k=0;k<Z;k+=1)E.push([]);f.set(S,E)}var I=null!==(w=h.refPosition)&&void 0!==w?w:-1;E[(0,i.clamp)(I<0?E.length+I:I,0,E.length-1)].push(...(0,p.hasOwnProperty)(l.runtimeContext,"forEachItem")?Jt(b,l.runtimeContext.forEachItem):b)}}var P=function(e,t){(0,p.hasOwnProperty)(r,e)||(r[e]={type:"bricks",bricks:[]});var n=r[e];n.bricks=t.flatMap(((e,t)=>t<n.bricks.length?e.concat(n.bricks[t]):e)),0===n.bricks.length&&delete r[e]};for(var[C,O]of f.entries())P(C,O)}}return{[yt]:n,[wt]:c}}function Jt(e,t){return e.map((e=>{var r;return(0,a.Z)((0,a.Z)({},e),{},{[bt]:t,slots:Object.fromEntries(Object.entries(null!==(r=e.slots)&&void 0!==r?r:{}).map((e=>{var r,[n,a]=e;return[n,"routes"===a.type?{type:"routes",routes:Yt(a.routes,t)}:{type:"bricks",bricks:Jt(null!==(r=a.bricks)&&void 0!==r?r:[],t)}]})))})}))}function Yt(e,t){return e.map((e=>e.type&&"bricks"!==e.type?e:(0,a.Z)((0,a.Z)({},e),{},{bricks:Jt(e.bricks,t)})))}var Qt=["properties","slots","children"];function Xt(e,t){function r(e){return(0,p.isObject)(e)?Array.isArray(e)?e.map(r):Object.fromEntries(Object.entries(e).map((e=>{var[t,a]=e;return(0,p.isObject)(a)&&"useBrick"===t?Array.isArray(a)?[t,a.map(n)]:[t,n(a)]:[t,r(a)]})).concat(Object.getOwnPropertySymbols(e).map((t=>[t,e[t]])))):e}function n(e){var{properties:o,slots:i,children:s}=e,c=(0,f.Z)(e,Qt),l=hr(s,i),u=Object.fromEntries(Object.entries(null!=l?l:{}).map((e=>{var t,[r,a]=e;return[r,{type:"bricks",bricks:(null!==(t=a.bricks)&&void 0!==t?t:[]).map(n)}]})));return(0,a.Z)((0,a.Z)({},c),{},{properties:r(o),slots:u},Gt(t,c.ref,u))}return r(e)}var er,tr=["slots","children"],rr=["properties","slots","children"];function nr(e,t,r,n){var o=(0,i.uniqueId)("tpl-state-"),s=(0,a.Z)((0,a.Z)({},r.runtimeContext),{},{tplStateStoreId:o});delete s.forEachItem;var c=new zt("STATE",r);s.tplStateStoreMap.set(o,c);var{bricks:l,proxy:u,state:p,contracts:d}=it.get(e);!function(e){Ce(e,Pe)}(d),c.define(p,s,n);var{slots:v,children:h}=t,m=(0,f.Z)(t,tr),g=(0,a.Z)((0,a.Z)({},m),{},{brick:e});r.tplHostMetadata={internalBricksByRef:new Map,tplStateStoreId:o,proxy:u};var y={properties:new Map,slots:new Map};if(null!=u&&u.properties)for(var[w,b]of Object.entries(u.properties)){var S=y.properties.get(b.ref);S||(S=[],y.properties.set(b.ref,S)),S.push({from:w,to:b})}if(null!=u&&u.slots)for(var[E,Z]of Object.entries(u.slots)){var k=y.slots.get(Z.ref);k||(k=[],y.slots.set(Z.ref,k)),k.push({from:E,to:Z})}var I={reversedProxies:y,asyncHostProperties:n,externalSlots:hr(h,v),tplStateStoreId:o,hostBrick:r};return g.slots={"":{type:"bricks",bricks:l.map((e=>ar(e,I)))}},g}function ar(e,t){null===e.if&&delete e.if;var{properties:r,slots:n,children:o}=e,i=(0,f.Z)(e,rr),s=hr(o,n),c=Object.fromEntries(Object.entries(null!=s?s:{}).map((e=>{var r,[n,a]=e;return[n,{type:"bricks",bricks:(null!==(r=a.bricks)&&void 0!==r?r:[]).map((e=>ar(e,t)))}]})));return(0,a.Z)((0,a.Z)({},i),{},{properties:Xt(r,t),slots:c},Gt(t,i.ref,c))}!function(e){e[e.ROOT=1]="ROOT",e[e.BRICK=2]="BRICK"}(er||(er={}));var or=["blockingList","node","menuRequests","hasTrackingControls"];function ir(e,t,r,n,a){return sr.apply(this,arguments)}function sr(){return sr=(0,o.Z)((function*(e,t,r,n,o){var i=yield function(e,t){return gt.apply(this,arguments)}(t,r),s={blockingList:[],menuRequests:[]};switch(i){case"missed":break;case"unauthenticated":s.unauthenticated=!0;break;default:var c=s.route=i.route,l=(0,a.Z)((0,a.Z)({},r),{},{match:i.match});switch(l.ctxStore.define(c.context,l),l.pendingPermissionsPreCheck.push(Wa(c,l)),c.type){case"redirect":var u;if("string"!=typeof(u="string"==typeof c.redirect?yield ja(c.redirect,l):(yield De((0,a.Z)({transform:"redirect"},c.redirect),l)).redirect))throw console.error("Unexpected redirect result:",u),new Error("Unexpected type of redirect result: ".concat(typeof u));s.redirect={path:u};break;case"routes":s.menuRequests.push(fr(c.menu,l)),vr(s,yield ir(e,c.routes,l,n,o));break;default:s.menuRequests.push(fr(c.menu,l)),vr(s,yield cr(e,c.bricks,l,n,o))}}return s})),sr.apply(this,arguments)}function cr(e,t,r,n,a,o,i){return lr.apply(this,arguments)}function lr(){return(lr=(0,o.Z)((function*(e,t,r,n,a,o,i){var s={blockingList:[],menuRequests:[]};return(yield Promise.all(t.map(((t,i)=>ur(e,t,r,n,a,i,o&&new Map(o)))))).forEach(((t,r)=>{!i&&t.hasTrackingControls&&n.memoizeControlNode(a,r,t.node,e),vr(s,t)})),s}))).apply(this,arguments)}function ur(e,t,r,n,a,o){return pr.apply(this,arguments)}function pr(){return pr=(0,o.Z)((function*(e,t,r,n,s,c){var l,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:new Map,d={blockingList:[],menuRequests:[]};if(!t.brick)return console.error("Legacy templates are not supported in v3:",t),d;var f=t[wt],h=(0,a.Z)((0,a.Z)({},r),{},{tplStateStoreId:f});(0,p.hasOwnProperty)(t,bt)&&(h.forEachItem=t[bt]);var{context:m}=t;if(Array.isArray(m)&&m.length>0&&(console.error("Defining context on bricks will be dropped in v3:",t),h.ctxStore.define(m,h)),h.pendingPermissionsPreCheck.push(Wa(t,h)),!(yield function(e,t){return Je.apply(this,arguments)}(t,h)))return d;var g=t.brick;if(g.startsWith(":")){!function(e){if(":forEach"!==e&&":if"!==e&&":switch"!==e)throw new Error('Unknown storyboard control node: "'.concat(e,'"'))}(g);var{dataSource:y}=t,w=function(){var r=(0,o.Z)((function*(){var r,a=yield ja(y,h),o=":forEach"===g?"":":switch"===g?String(a):a?"":"else",i=hr(t.children,t.slots),c=i&&(0,p.hasOwnProperty)(i,o)&&(null===(r=i[o])||void 0===r?void 0:r.bricks);if(!Array.isArray(c))return d;switch(g){case":forEach":return Array.isArray(a)?function(e,t,r,n,a,o,i){return dr.apply(this,arguments)}(e,a,c,h,n,s,u):d;case":if":case":switch":return cr(e,c,h,n,s,u,!0)}}));return function(){return r.apply(this,arguments)}}(),b=yield w(),{contextNames:S,stateNames:E}=et(y);if(S||E){b.hasTrackingControls=!0;var Z=0,k=function(){var t=(0,o.Z)((function*(){var t=++Z,r=yield w();r.blockingList.push(...[...h.tplStateStoreMap.values()].map((e=>e.waitForAll())),...h.pendingPermissionsPreCheck),yield Promise.all(r.blockingList),Z===t&&n.rerenderControlNode(s,c,r.node,e)}));return function(){return t.apply(this,arguments)}}(),I=(0,i.debounce)(k);if(S)for(var P of S)h.ctxStore.onChange(P,I);if(E)for(var C of E)st(h,"STATE",': "'.concat(y,'"')).onChange(C,I)}return b}/\.tpl-/.test(g)&&!it.get(g)&&(yield(0,v.loadBricksImperatively)([g],na()));var O=function(e,t){if(!e.includes(".")&&t){var r="".concat(t,".").concat(e);if(it.get(r))return r}return!!it.get(e)&&e}(g,null===(l=h.app)||void 0===l?void 0:l.id);if(O){var A,_=null!==(A=u.get(O))&&void 0!==A?A:0;if(_>=10)throw new Error('Maximum custom template stack overflowed: "'.concat(O,'"'));u.set(O,_+1)}g.includes(".")&&d.blockingList.push((0,v.enqueueStableLoadBricks)([g],na()));var T={tag:er.BRICK,type:O||g,return:e,slotId:s,events:t.events,runtimeContext:h,portal:t.portal,iid:t.iid,ref:t.ref};d.node=T;var R=[],M=[],x=function(){var e=(0,o.Z)((function*(){T.properties=yield function(e,t,r){return tt.apply(this,arguments)}(t.properties,h,M);var e=t[yt];if(e){var r;null!==(r=T.properties)&&void 0!==r||(T.properties={});var n=yield e;for(var[a,o]of Object.entries(n))T.properties[a]=o}return T.properties}));return function(){return e.apply(this,arguments)}}(),B=x();R.push(B),B.then((()=>{!function(e,t){var r=function(t){var r=()=>{e.element&&nt(e.element,{[t.propName]:t.propValue},e.runtimeContext)};if(t.contextNames)for(var n of t.contextNames)e.runtimeContext.ctxStore.onChange(n,r);if(t.stateNames){var a=st(e.runtimeContext,"STATE",': "'.concat(t.propValue,'"'));for(var o of t.stateNames)a.onChange(o,r)}};for(var n of t)r(n)}(T,M)})),n.registerBrickLifeCycle(T,t.lifeCycle);var L,N=t;O&&(N=nr(O,t,T,B)),N.portal&&(T.slotId=void 0),O?delete(L=(0,a.Z)({},h)).forEachItem:L=h;var U=function(){var e=(0,o.Z)((function*(){var e=hr(N.children,N.slots);if(e){var t=yield Promise.all(Object.entries(e).map((e=>{var[t,r]=e;return"routes"!==r.type?cr(T,r.bricks,L,n,t,u):ir(T,r.routes,L,n,t)}))),r=(0,a.Z)((0,a.Z)({},d),{},{node:void 0,blockingList:[]});for(var o of t)vr(r,o);r.node&&(T.child=r.node),vr(d,(0,a.Z)((0,a.Z)({},r),{},{node:void 0}))}}));return function(){return e.apply(this,arguments)}}();return R.push(U()),yield Promise.all(R),d})),pr.apply(this,arguments)}function dr(){return(dr=(0,o.Z)((function*(e,t,r,n,o,i,s){var c={blockingList:[],menuRequests:[]},l=yield Promise.all(t.map(((t,c)=>Promise.all(r.map(((r,l)=>ur(e,r,(0,a.Z)((0,a.Z)({},n),{},{forEachItem:t}),o,i,c*l,s&&new Map(s))))))));for(var u of l.flat())vr(c,u);return c}))).apply(this,arguments)}function fr(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 ja(e,t);console.warn("Set menu with resolve is not supported in v3 yet:",e)}}function vr(e,t){var{blockingList:r,node:n,menuRequests:a,hasTrackingControls:o}=t,i=(0,f.Z)(t,or);if(e.blockingList.push(...r),e.menuRequests.push(...a),n)if(e.node){for(var s=e.node;s.sibling;)s=s.sibling;s.sibling=n}else e.node=n;Object.assign(e,i)}function hr(e,t){var r=t;if(Array.isArray(e)&&!r)for(var n of(r={},e)){var a,o=null!==(a=n.slot)&&void 0!==a?a:"";(0,p.hasOwnProperty)(r,o)||(r[o]={type:"bricks",bricks:[]}),r[o].bricks.push(n)}return r}function mr(e){var t,{ref:r,runtimeContext:n,element:a}=e;if(r&&n.tplStateStoreId){var{hostBrick:o}=st(n,"bindTemplateProxy"),i=o.tplHostMetadata;i.internalBricksByRef.set(r,e);var s=null===(t=i.proxy)||void 0===t?void 0:t.events;if(s){var c=function(e,t){if(t.ref===r){var n,i,s,c=t=>{t.bubbles&&t.stopPropagation(),o.element.dispatchEvent(new CustomEvent(e,{detail:t.detail,bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed}))},l=null!==(n=t.refEvent)&&void 0!==n?n:e;a.addEventListener(l,c),null!==(s=(i=a).$$proxyListeners)&&void 0!==s||(i.$$proxyListeners=[]),a.$$proxyListeners.push([l,c])}};for(var[l,u]of Object.entries(s))c(l,u)}}}function gr(e){var{ref:t,runtimeContext:r,element:n}=e;if(r.tplStateStoreId&&t){var{hostBrick:a}=st(r,"unbindTemplateProxy"),o=a.tplHostMetadata;for(var[i,s]of(o.internalBricksByRef.delete(t),null!==(c=n.$$proxyListeners)&&void 0!==c?c:[])){var c;n.removeEventListener(i,s)}delete n.$$proxyListeners}}function yr(e){e.innerHTML=""}function wr(e,t){for(var r=e.child,n=[];r;){var 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 o=t&&r===e.child?t:document.createElement(a);if(r.element=o,r.slotId&&o.setAttribute("slot",r.slotId),r.iid&&(o.dataset.iid=r.iid),rt(o,r.properties),Ot(o,r.events,r.runtimeContext),r.tplHostMetadata&&(o.$$tplStateStore=st({tplStateStoreId:r.tplHostMetadata.tplStateStoreId,tplStateStoreMap:r.runtimeContext.tplStateStoreMap},"mount")),mr(r),r.portal?n.push(o):r.return&&(r.return.childElements||(r.return.childElements=[]),r.return.childElements.push(o)),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var i,s=r.return;s;){var c;if(s.childElements)s.tag===er.ROOT?(null===(c=s.container)||void 0===c||c.append(...s.childElements),n.length>0&&("function"==typeof s.createPortal?s.createPortal():s.createPortal).append(...n)):s.element.append(...s.childElements),s.childElements=void 0;if(s.sibling)break;s=s.return}r=null===(i=s)||void 0===i?void 0:i.sibling}}}var br,Sr=["onMount","onUnmount","onMediaChange","onScrollIntoView"],Er=["onBeforePageLoad","onPageLoad","onPageLeave","onBeforePageLeave","onAnchorLoad","onAnchorUnload"],Zr=new WeakMap,kr=new WeakMap,Ir=new WeakMap,Pr=new WeakMap,Cr=new WeakSet,Or=new WeakSet,Ar=new WeakSet,_r=new WeakSet;class Tr{constructor(e){(0,we.Z)(this,_r),(0,we.Z)(this,Ar),(0,we.Z)(this,Or),(0,we.Z)(this,Cr),(0,St.Z)(this,"type",void 0),(0,m.Z)(this,Zr,{writable:!0,value:{onBeforePageLoad:[],onPageLoad:[],onPageLeave:[],onBeforePageLeave:[],onAnchorLoad:[],onAnchorUnload:[],onMediaChange:[],onScrollIntoView:[],onMount:[],onUnmount:[]}}),(0,m.Z)(this,kr,{writable:!0,value:new Map}),(0,m.Z)(this,Ir,{writable:!0,value:void 0}),(0,m.Z)(this,Pr,{writable:!0,value:void 0}),this.type=e}registerBrickLifeCycle(e,t){if(t){var r=[...Sr,..."router"===this.type?Er:[]];for(var n of r){var a=t[n];a&&(0,g.Z)(this,Zr)[n].push({brick:e,handlers:a})}(0,i.isEmpty)(t.useResolves)||console.error("`lifeCycle.useResolves` is not supported in v3:",t)}}memoizeControlNode(e,t,r,n){(0,g.Z)(this,Pr)||(0,Se.Z)(this,Pr,new WeakMap);var a="".concat(null!=e?e:"",".").concat(t),o=(0,g.Z)(this,Pr).get(n);o||(o=new Map,(0,g.Z)(this,Pr).set(n,o)),o.set(a,{node:r,last:Lr(r),lastNormal:Nr(r),lastPortal:Ur(r)})}rerenderControlNode(e,t,r,n){var a,o,i,s,c,l="".concat(null!=e?e:"",".").concat(t),u=(0,g.Z)(this,Pr).get(n).get(l),{node:p,last:d,lastNormal:f,lastPortal:v}=u,h=null!==(a=null==f||null===(o=f.element)||void 0===o?void 0:o.nextSibling)&&void 0!==a?a:null,m=null!==(i=null==v||null===(s=v.element)||void 0===s?void 0:s.nextSibling)&&void 0!==i?i:null,y=Lr(r);u.node=r,u.last=y,u.lastNormal=Nr(r),u.lastPortal=Ur(r);for(var w=n.child;w&&w!==d;){if(w.sibling===p){c=w;break}w=w.sibling}var b=document.createDocumentFragment(),S=document.createDocumentFragment(),E={tag:er.ROOT,container:b,createPortal:S,child:r};for(w=r;w;)w.return=E,w=w.sibling;var Z,k,I=jr(p,d);for((0,be.Z)(this,Cr,Rr).call(this,I),wr(E),c?c.sibling=r:n.child=r,y&&(y.sibling=null==d?void 0:d.sibling),w=r;w;)w.return=n,w=w.sibling;if(n.tag===er.ROOT?null===(Z=n.container)||void 0===Z||Z.insertBefore(b,h):null===(k=n.element)||void 0===k||k.insertBefore(b,h),S.childNodes.length>0){for(var P,C=r;C&&C.return;)C=C.return;if((null===(P=C)||void 0===P?void 0:P.tag)!==er.ROOT)throw new Error("Cannot find render root node");("function"==typeof C.createPortal?C.createPortal():C.createPortal).insertBefore(S,m)}var O=jr(r,y);(0,be.Z)(this,Or,Mr).call(this,O)}dispose(){for(var e of Object.values((0,g.Z)(this,Zr)))e.length=0;for(var t of(0,g.Z)(this,kr).values()){for(var r of t)r.disconnect();t.length=0}(0,g.Z)(this,kr).clear(),(0,g.Z)(this,Ir)&&(ne.removeEventListener("change",(0,g.Z)(this,Ir)),(0,Se.Z)(this,Ir,void 0)),(0,Se.Z)(this,Pr,void 0)}dispatchBeforePageLoad(){(0,be.Z)(this,Ar,xr).call(this,"onBeforePageLoad",new CustomEvent("page.beforeLoad"))}dispatchPageLoad(){var e=new CustomEvent("page.load");(0,be.Z)(this,Ar,xr).call(this,"onPageLoad",e),window.dispatchEvent(e)}dispatchBeforePageLeave(e){(0,be.Z)(this,Ar,xr).call(this,"onBeforePageLeave",new CustomEvent("page.beforeLeave",{detail:e}))}dispatchPageLeave(){(0,be.Z)(this,Ar,xr).call(this,"onPageLeave",new CustomEvent("page.leave"))}dispatchAnchorLoad(){var{hash:e}=ye().location;e&&"#"!==e?(0,be.Z)(this,Ar,xr).call(this,"onAnchorLoad",new CustomEvent("anchor.load",{detail:{hash:e,anchor:e.substring(1)}})):(0,be.Z)(this,Ar,xr).call(this,"onAnchorUnload",new CustomEvent("anchor.unload"))}initializeScrollIntoView(){for(var{brick:e,handlers:t}of(0,g.Z)(this,Zr).onScrollIntoView)(0,be.Z)(this,_r,Br).call(this,e,t)}initializeMediaChange(){(0,Se.Z)(this,Ir,(e=>{(0,be.Z)(this,Ar,xr).call(this,"onMediaChange",new CustomEvent("media.change",{detail:O(e.detail)}))})),ne.addEventListener("change",(0,g.Z)(this,Ir))}dispatchOnMount(){(0,be.Z)(this,Ar,xr).call(this,"onMount",new CustomEvent("mount"))}dispatchOnUnmount(){(0,be.Z)(this,Ar,xr).call(this,"onUnmount",new CustomEvent("unmount"))}}function Rr(e){var t=[...Sr,..."router"===this.type?Er:[]],r=[];for(var n of t){var a=(0,i.remove)((0,g.Z)(this,Zr)[n],(t=>e.has(t.brick)));"onUnmount"===n&&r.push(...a)}for(var o of e){var s,c,l=(0,g.Z)(this,kr).get(o);if(null!=l&&l.length){for(var u of l)u.disconnect();l.length=0,(0,g.Z)(this,kr).delete(o)}gr(o),null===(s=o.element)||void 0===s||delete s.$$tplStateStore,null===(c=o.element)||void 0===c||c.remove()}var p=new CustomEvent("unmount");for(var{brick:d,handlers:f}of r)Rt(f,d.runtimeContext,d)(p)}function Mr(e){var t=new CustomEvent("mount");for(var{brick:r,handlers:n}of(0,g.Z)(this,Zr).onMount)e.has(r)&&Rt(n,r.runtimeContext,r)(t);for(var{brick:a,handlers:o}of(0,g.Z)(this,Zr).onScrollIntoView)e.has(a)&&(0,be.Z)(this,_r,Br).call(this,a,o)}function xr(e,t){for(var{brick:r,handlers:n}of(0,g.Z)(this,Zr)[e])Rt(n,r.runtimeContext,r)(t)}function Br(e,t){var r,n=null!==(r=t.threshold)&&void 0!==r?r:.1,a=new IntersectionObserver(((r,a)=>{r.forEach((r=>{r.isIntersecting&&r.intersectionRatio>=n&&(Rt(t.handlers,e.runtimeContext,e)(new CustomEvent("scroll.into.view")),a.disconnect())}))}),{threshold:n});a.observe(e.element);var o=(0,g.Z)(this,kr).get(e);o||(o=[],(0,g.Z)(this,kr).set(e,o)),o.push(a)}function Lr(e){for(var t=e;null!==(r=t)&&void 0!==r&&r.sibling;){var r;t=t.sibling}return t}function Nr(e){for(var t,r=e;r;)r.portal||(t=r),r=r.sibling;return t}function Ur(e){for(var t,r=e;r;)if(r.portal&&(t=r),r.child)r=r.child;else if(r.sibling)r=r.sibling;else{for(var n,a=r.return;a&&!a.sibling;)a=a.return;r=null===(n=a)||void 0===n?void 0:n.sibling}return t}function jr(e,t){for(var r=new Set,n=e;n;)if(r.add(n),n.child)n=n.child;else{if(n===t)break;if(n.sibling)n=n.sibling;else{for(var a,o=n.return;o&&o!==t&&!o.sibling;)o=o.return;if(o===t)break;n=null===(a=o)||void 0===a?void 0:a.sibling}}return r}function $r(){if(!br){if(br={isInIframe:!1,isInIframeOfSameSite:!1,isInIframeOfNext:!1,isInIframeOfVisualBuilder:!1,isInIframeOfLegacyConsole:!1},window!==window.parent){br.isInIframe=!0;try{if(window.origin===window.parent.origin){br.isInIframeOfSameSite=!0;var e="/next/"===V(),t=window.parent.location.pathname,r=t.startsWith("/next/");br.isInIframeOfNext=0==(Number(e)^Number(r)),br.isInIframeOfVisualBuilder=t.startsWith("".concat(r?"/next":"","/visual-builder/")),br.isInIframeOfLegacyConsole=e&&!r}}catch(e){}}Object.freeze(br)}return br}var Fr,Dr=new WeakSet;function Kr(e){if((0,p.isObject)(e)&&!Vr(e))if(Dr.add(e),Array.isArray(e))e.forEach(Kr);else{var t=Object.getPrototypeOf(e);t&&t.constructor!==Object||Object.values(e).forEach(Kr)}}function Vr(e){return Dr.has(e)}var Hr=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.get("api/auth/v2/bootstrap",(0,a.Z)((0,a.Z)({},t),{},{params:e}))).data}));return function(t,r){return e.apply(this,arguments)}}(),Wr=function(){var e=(0,o.Z)((function*(e){return(yield c.http.get("api/v1/runtime_standalone",e)).data}));return function(t){return e.apply(this,arguments)}}(),qr=function(){var e=(0,o.Z)((function*(e,t,r){return(yield c.http.get("api/auth/v2/bootstrap/".concat(e),(0,a.Z)((0,a.Z)({},r),{},{params:t}))).data}));return function(t,r,n){return e.apply(this,arguments)}}(),zr=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.get("api/gateway/micro_app_standalone.runtime.RuntimeMicroAppStandalone/api/v1/micro_app_standalone/runtime/".concat(e),t)).data}));return function(t,r){return e.apply(this,arguments)}}(),Gr=["feature_flags"],Jr=["featureFlags","misc"];function Yr(){return Qr.apply(this,arguments)}function Qr(){return Qr=(0,o.Z)((function*(){var e=yield window.STANDALONE_MICRO_APPS?function(){return Xr.apply(this,arguments)}():Hr({appFields:"defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status,icons,standaloneMode",ignoreTemplateFields:"templates",ignoreBrickFields:"bricks,processors,providers,editors"});for(var{app:t}of e.storyboards)t.locales?function(){var e="tmp/".concat(t.id);Object.entries(t.locales).forEach((t=>{var[r,n]=t;b.i18n.addResourceBundle(r,e,n)})),t.localeName=b.i18n.getFixedT(null,e)("name",t.name),Object.keys(t.locales).forEach((t=>{b.i18n.removeResourceBundle(t,e)}))}():t.localeName=t.name;return(0,p.isObject)(e.settings)&&(0,p.deepFreeze)(e.settings),e.brickPackages=(0,p.deepFreeze)(e.brickPackages),e})),Qr.apply(this,arguments)}function Xr(){return Xr=(0,o.Z)((function*(){var e=[Ee.http.get(window.BOOTSTRAP_FILE),Ee.http.get("".concat(window.APP_ROOT,"conf.yaml"),{responseType:"text"}),Wr().catch((e=>{console.warn("request runtime api from api-gateway failed: ",e,", something might went wrong running standalone micro app")}))];if(!window.NO_AUTH_GUARD){var t,r=window.APP_ID||(window.APP_ROOT&&(t=window.APP_ROOT.match(/^(?:(?:\/next)?\/)?sa-static\/([^/]+)\/versions\//))?t[1]:null);r&&tn(r)}var[n,o,i]=yield Promise.all(e);return function(e,t){var r;try{r=t?(0,Ze.safeLoad)(t,{schema:Ze.JSON_SCHEMA,json:!0}):void 0}catch(e){throw console.error("Parse conf.yaml failed",e),new Error("Invalid conf.yaml")}if(r){var{sys_settings:n,user_config:o,user_config_by_apps:i}=r;if(n){var{feature_flags:s}=n,c=(0,f.Z)(n,Gr);e.settings=(0,a.Z)({featureFlags:s},c)}if(o&&1===e.storyboards.length)e.storyboards[0].app.userConfig=o;else if(i)for(var{app:l}of e.storyboards)(0,p.hasOwnProperty)(i,l.id)&&(l.userConfig=i[l.id])}}(n,o),function(e,t){var r;if(t){var{featureFlags:n,misc:o}=t,i=(0,f.Z)(t,Jr),s=null!==(r=e.settings)&&void 0!==r?r:e.settings={};s.featureFlags=(0,a.Z)((0,a.Z)({},s.featureFlags),n),s.misc=(0,a.Z)((0,a.Z)({},s.misc),o),Object.assign(s,i)}}(n,null==i?void 0:i.settings),n})),Xr.apply(this,arguments)}var en=new Map;function tn(e){return rn.apply(this,arguments)}function rn(){return(rn=(0,o.Z)((function*(e){if(en.has(e))return en.get(e);var t=zr(e).catch((e=>{console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}));return en.set(e,t),t}))).apply(this,arguments)}function nn(){return nn=(0,o.Z)((function*(e){if(!e.$$fulfilled)return e.$$fulfilling||(e.$$fulfilling=function(e){return an.apply(this,arguments)}(e)),e.$$fulfilling})),nn.apply(this,arguments)}function an(){return(an=(0,o.Z)((function*(e){if(window.STANDALONE_MICRO_APPS){if(Object.assign(e,{$$fulfilled:!0,$$fulfilling:null}),!window.NO_AUTH_GUARD){var t;try{t=yield tn(e.app.id)}catch(e){console.warn("request standalone runtime api from micro-app-standalone failed: ",e,", something might went wrong running standalone micro app")}if(t){var{userConfig:r,injectMenus:n}=t;e.app.userConfig=(0,a.Z)((0,a.Z)({},e.app.userConfig),r),function(e){if(Array.isArray(e))for(var t of e)t.overrideApp&&on(t.overrideApp)}(n),e.meta=(0,a.Z)((0,a.Z)({},e.meta),{},{injectMenus:n})}}}else{var{routes:o,meta:i,app:s}=yield qr(e.app.id,{});Object.assign(e,{routes:o,meta:i,app:(0,a.Z)((0,a.Z)({},e.app),s),$$fulfilled:!0,$$fulfilling:null})}!function(e){var{app:t,meta:r}=e;if(null!=r&&r.i18n){var n=S("app",t.id);Object.entries(r.i18n).forEach((e=>{var[t,r]=e;b.i18n.addResourceBundle(t,n,r)}))}}(e),on(e.app)}))).apply(this,arguments)}function on(e){e.config=(0,p.deepFreeze)((0,i.merge)({},e.defaultConfig,e.userConfig))}var sn=function(){var e=(0,o.Z)((function*(e,t){return(yield c.http.post("api/gateway/micro_app_standalone.runtime.SearchMicroAppStandalone/api/v1/micro_app_standalone/search",e,t)).data}));return function(t,r){return e.apply(this,arguments)}}();const cn=(e,t,r)=>{gn(r);const n=((e,t)=>{const r=un(e),n=un(t),a=r.pop(),o=n.pop(),i=vn(r,n);return 0!==i?i:a&&o?vn(a.split("."),o.split(".")):a||o?a?-1:1:0})(e,t);return hn[r].includes(n)},ln=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,un=e=>{if("string"!=typeof e)throw new TypeError("Invalid argument expected string");const t=e.match(ln);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},pn=e=>"*"===e||"x"===e||"X"===e,dn=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},fn=(e,t)=>{if(pn(e)||pn(t))return 0;const[r,n]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(dn(e),dn(t));return r>n?1:r<n?-1:0},vn=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const n=fn(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},hn={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},mn=Object.keys(hn),gn=e=>{if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===mn.indexOf(e))throw new Error(`Invalid operator, expected one of ${mn.join("|")}`)};function yn(e,t){return function(r,n,a){if(n.name===e){var o=a[a.length-1],i=a[a.length-2];if("CallExpression"===(null==i?void 0:i.node.type)&&"callee"===(null==i?void 0:i.key)&&"MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key&&(o.node.computed?"Literal"===o.node.property.type&&o.node.property.value===t:"Identifier"===o.node.property.type&&o.node.property.name===t)){var s=i.node.arguments;if(s.length>0){var c=s[0];"Literal"===c.type&&"string"==typeof c.value?r.usedArgs.add(c.value):r.hasNonStaticUsage=!0}}}}}var wn=yn("APP","getMenu"),bn=yn("INSTALLED_APPS","has"),Sn=new Map,En=new Map;function Zn(e,t){var r=ia(e);if(!r&&window.STANDALONE_MICRO_APPS&&(r=En.get(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 cn(r.currentVersion,n[2],n[1])}catch(e){console.error(e)}return!1}var kn=new WeakMap,In=new WeakMap,Pn=new WeakMap,Cn=new WeakMap,On=new WeakMap,An=new WeakMap,_n=new WeakMap,Tn=new WeakMap,Rn=new WeakMap,Mn=new WeakMap,xn=new WeakMap,Bn=new WeakMap,Ln=new WeakSet,Nn=new WeakSet,Un=new WeakSet,jn=new WeakSet;class $n{constructor(e){(0,we.Z)(this,jn),(0,we.Z)(this,Un),(0,we.Z)(this,Nn),(0,we.Z)(this,Ln),(0,m.Z)(this,kn,{writable:!0,value:void 0}),(0,m.Z)(this,In,{writable:!0,value:!1}),(0,m.Z)(this,Pn,{writable:!0,value:void 0}),(0,m.Z)(this,Cn,{writable:!0,value:void 0}),(0,m.Z)(this,On,{writable:!0,value:void 0}),(0,m.Z)(this,An,{writable:!0,value:void 0}),(0,m.Z)(this,_n,{writable:!0,value:new Set}),(0,m.Z)(this,Tn,{writable:!0,value:0}),(0,m.Z)(this,Rn,{writable:!0,value:void 0}),(0,m.Z)(this,Mn,{writable:!0,value:void 0}),(0,m.Z)(this,xn,{writable:!0,value:void 0}),(0,m.Z)(this,Bn,{writable:!0,value:void 0}),(0,Se.Z)(this,kn,e);var t=ye();window.addEventListener("beforeunload",(e=>{(0,be.Z)(this,Ln,Fn).call(this,{})?(e.preventDefault(),e.returnValue=""):delete e.returnValue})),t.block(((e,t)=>(0,be.Z)(this,Ln,Fn).call(this,{location:e,action:t})))}getRenderId(){return(0,g.Z)(this,Rn)}getRuntimeContext(){return(0,g.Z)(this,On)}getRecentApps(){return{currentApp:(0,g.Z)(this,Mn),previousApp:(0,g.Z)(this,xn)}}getNavConfig(){return(0,g.Z)(this,Bn)}bootstrap(){window.AbortController&&(Fr=new AbortController,Ee.http.interceptors.request.use((e=>{var t;return(0,a.Z)((0,a.Z)({},e),{},{options:(0,a.Z)((0,a.Z)({},e.options),{},{signal:null!==(t=e.options)&&void 0!==t&&t.noAbortOnRouteChange?null:Fr.signal})})})));var e=ye();return(0,Se.Z)(this,Pn,e.location),e.listen(((e,t)=>{var r,n,o,i=!1,s={hash:void 0,state:void 0};if(void 0!==e.key&&("POP"!==t||void 0!==(0,g.Z)(this,Pn).key&&!1!==(null===(r=(0,g.Z)(this,Pn).state)||void 0===r?void 0:r.notify))||(s.key=void 0),((0,ue.locationsAreEqual)((0,a.Z)((0,a.Z)({},(0,g.Z)(this,Pn)),s),(0,a.Z)((0,a.Z)({},e),s))||"POP"!==t&&!1===(null===(n=e.state)||void 0===n?void 0:n.notify))&&(i=!0),i)(0,Se.Z)(this,Pn,e);else{if(Fr&&(Fr.abort(),Fr=new AbortController),(0,Se.Z)(this,Pn,e),null===(o=(0,g.Z)(this,An))||void 0===o||o.dispatchPageLeave(),"POP"===t&&de(pe((0,g.Z)(this,kn),e.pathname)))return void window.location.reload();(0,g.Z)(this,In)?(0,Se.Z)(this,Cn,e):(0,be.Z)(this,Un,Kn).call(this,e).catch(Ct)}})),(0,be.Z)(this,Un,Kn).call(this,e.location)}}function Fn(e){var t,r=ye(),n=r.getBlockMessage();null===(t=(0,g.Z)(this,An))||void 0===t||t.dispatchBeforePageLeave(e);var a=r.getBlockMessage();return!n&&a&&r.unblock(),a}function Dn(e,t,r){var n,a;if((0,Se.Z)(this,Tn,(n=(0,g.Z)(this,Tn),a=n++,n)),a>10){var o='Infinite redirect detected: from "'.concat(r.pathname).concat(r.search).concat(r.hash,'" to "').concat(e,'"');throw new Error(o)}ye().replace(e,t)}function Kn(e){return Vn.apply(this,arguments)}function Vn(){return(Vn=(0,o.Z)((function*(e){(0,Se.Z)(this,In,!0);try{yield(0,be.Z)(this,jn,Hn).call(this,e)}finally{if((0,Se.Z)(this,In,!1),(0,g.Z)(this,Cn)){var t=(0,g.Z)(this,Cn);(0,Se.Z)(this,Cn,void 0),yield(0,be.Z)(this,Un,Kn).call(this,t)}}}))).apply(this,arguments)}function Hn(e){return Wn.apply(this,arguments)}function Wn(){return Wn=(0,o.Z)((function*(e){var t;(0,Se.Z)(this,Rn,(0,i.uniqueId)("render-id-1")),Dr=new WeakSet,Fe.clear(),Pe.clear(),ye().unblock();var r=pe((0,g.Z)(this,kn),e.pathname),n=null===(t=(0,g.Z)(this,On))||void 0===t?void 0:t.app;null!=r&&r.app&&(yield function(e){return nn.apply(this,arguments)}(r));var o,c=(0,Se.Z)(this,Mn,null==r?void 0:r.app),l=n&&c?n.id!==c.id:n!==c,u=ea().getFeatureFlags(),p=(0,g.Z)(this,An),d=(t,r)=>{(0,g.Z)(this,_n).add(p),(0,be.Z)(this,Nn,Dn).call(this,t,r,e)},f=()=>{var t=u["sso-enabled"]?"/sso-auth/login":"/auth/login";d(t,{from:e})},h=document.querySelector("#main-mount-point"),m=document.querySelector("#portal-mount-point"),y={tag:er.ROOT,container:h,createPortal:m},w=()=>{for(var e of(yr(h),yr(m),(0,g.Z)(this,_n).add(p),(0,g.Z)(this,_n)))e&&(e.dispatchOnUnmount(),e.dispose());(0,g.Z)(this,_n).clear(),M(c&&(U()[c.id]||c.theme)||"light"),$("default"),l&&((0,Se.Z)(this,xn,n),window.dispatchEvent(new CustomEvent("app.change",{detail:{previousApp:n,currentApp:c}})))};if(c){var b,S;!function(e){if(window.STANDALONE_MICRO_APPS&&!window.NO_AUTH_GUARD){var t=function(e){var t,r={usedArgs:new Set},{customTemplates:n,menus:a}=null!==(t=e.meta)&&void 0!==t?t:{};return(0,s.traverseStoryboardExpressions)([e.routes,n,a],((e,t)=>{bn(r,e,t)}),"INSTALLED_APPS"),[...r.usedArgs]}(e),r=[];for(var n of t)Sn.has(n)||ia(n)||r.push(n);if(0===r.length)return;var o=sn({query:{appId:{$in:r}},fields:["appId","currentVersion","installStatus"]}).catch((e=>{console.error("Get off site standalone micro-apps failed",e)})),i=function(e){Sn.set(e,o.then((t=>{var r,n=null==t||null===(r=t.list)||void 0===r?void 0:r.find((t=>t.appId===e)),o=n?(0,a.Z)((0,a.Z)({},n),{},{id:e}):void 0;return En.set(e,o),o})))};for(var c of r)i(c)}}(r);var E=(0,Se.Z)(this,On,{app:c,location:e,query:new URLSearchParams(e.search),flags:u,sys:(0,a.Z)((0,a.Z)({},to()),$r()),ctxStore:new zt("CTX"),pendingPermissionsPreCheck:[Ha(r)],tplStateStoreMap:new Map}),Z=(0,Se.Z)(this,An,new Tr("router"));(0,Se.Z)(this,Bn,void 0),function(e){var t;if(!e.$$registerCustomTemplateProcessed){e.$$registerCustomTemplateProcessed=!0;var r=null===(t=e.meta)||void 0===t?void 0:t.customTemplates;if(Array.isArray(r))for(var n of r){var a=n.name.includes(".")?n.name:"".concat(e.app.id,".").concat(n.name);it.define(a,n)}}}(r),Y(null===(b=r.meta)||void 0===b?void 0:b.functions,c),o=null===(S=r.meta)||void 0===S?void 0:S.contracts,Ce(o,Ie);var k,I=!1;try{if((k=yield ir(y,r.routes,E,Z)).unauthenticated)return void f();if(k.redirect)return void d(k.redirect.path,k.redirect.state);(0,Se.Z)(this,Tn,0),(0,v.flushStableLoadBricks)(),yield Promise.all([...k.blockingList,E.ctxStore.waitForAll(),...[...E.tplStateStoreMap.values()].map((e=>e.waitForAll())),...E.pendingPermissionsPreCheck]);var P=yield Promise.all(k.menuRequests);(0,Se.Z)(this,Bn,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}(P))}catch(e){if(console.error("Router failed:",e),kt(e)&&!window.NO_AUTH_GUARD)return void f();if(e instanceof Ee.HttpAbortError)return void(0,g.Z)(this,_n).add(p);I=!0,k={node:{tag:er.BRICK,type:"div",properties:{textContent:Zt(e)},runtimeContext:null,return:y},blockingList:[],menuRequests:[]}}if(y.child=k.node,w(),k.route&&"routes"!==k.route.type||I)return I||Z.dispatchBeforePageLoad(),L(),D(),wr(y),window.scrollTo(0,0),void(I||(Z.dispatchPageLoad(),Z.dispatchAnchorLoad(),Z.dispatchOnMount(),Z.initializeScrollIntoView(),Z.initializeMediaChange()))}else{if(!window.NO_AUTH_GUARD&&!no())return void f();w()}L(),D();var C={tag:er.BRICK,type:"div",properties:{textContent:"Page not found"},runtimeContext:null,return:y};y.child=C,wr(y),window.scrollTo(0,0)})),Wn.apply(this,arguments)}var qn,zn,Gn,Jn=function(){var e=(0,o.Z)((function*(e){return(yield c.http.get("api/auth/login",e)).data}));return function(t){return e.apply(this,arguments)}}();function Yn(){return Qn.apply(this,arguments)}function Qn(){return Qn=(0,o.Z)((function*(){if(!window.NO_AUTH_GUARD){var e=yield Jn();e.loggedIn&&eo(e)}})),Qn.apply(this,arguments)}function Xn(){if(qn)throw new Error("Cannot create multiple runtimes");return(0,b.initializeI18n)(),le.locale(b.i18n.language),b.i18n.on("languageChanged",(()=>{le.locale(b.i18n.language)})),ge(),qn=new ta}function ea(){return qn}class ta{bootstrap(){return(0,o.Z)((function*(){var[,e]=yield Promise.all([Yn(),Yr()]);zn=e,Gn=new $n(e.storyboards),yield Gn.bootstrap()}))()}getRecentApps(){return Gn.getRecentApps()}getCurrentApp(){return Gn.getRecentApps().currentApp}getFeatureFlags(){var e,t,r,n,o;return(0,a.Z)((0,a.Z)((0,a.Z)({},null===(e=zn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.featureFlags),null===(r=Gn.getRecentApps().currentApp)||void 0===r||null===(n=r.config)||void 0===n||null===(o=n.settings)||void 0===o?void 0:o.featureFlags),{},{"migrate-to-brick-next-v3":!0})}getMiscSettings(){var e,t,r,n,o;return(0,a.Z)((0,a.Z)({},null===(e=zn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.misc),null===(r=Gn.getRecentApps().currentApp)||void 0===r||null===(n=r.config)||void 0===n||null===(o=n.settings)||void 0===o?void 0:o.misc)}getBrandSettings(){var e,t;return(0,a.Z)({base_title:"DevOps 管理专家"},null===(e=zn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.brand)}getLaunchpadSettings(){var e,t;return(0,a.Z)({columns:7,rows:4},null===(e=zn)||void 0===e||null===(t=e.settings)||void 0===t?void 0:t.launchpad)}getDesktops(){var e,t;return null!==(e=null===(t=zn)||void 0===t?void 0:t.desktops)&&void 0!==e?e:[]}getLaunchpadSiteMap(){var e,t;return null!==(e=null===(t=zn)||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(){return Gn.getNavConfig()}}function ra(e){zn=e}function na(){var e,t;return null!==(e=null===(t=zn)||void 0===t?void 0:t.brickPackages)&&void 0!==e?e:[]}function aa(){return Gn.getRenderId()}function oa(e){var t,r;return null===(t=zn)||void 0===t||null===(r=t.storyboards)||void 0===r?void 0:r.find((t=>t.app.id===e))}function ia(e){var t;return null===(t=oa(e))||void 0===t?void 0:t.app}var sa=new Map,ca=new Proxy(Object.freeze({}),{get:(e,t)=>sa.get(t)});function la(e,t,r){if(sa.has(e))throw new Error('Widget functions of "'.concat(e,'" already registered'));var{storyboardFunctions:n,registerStoryboardFunctions:a}=G({widgetId:e,widgetVersion:r});sa.set(e,n),a(t)}var ua=function(){var e=(0,o.Z)((function*(e,t,r){return(yield c.http.post("api/gateway/cmdb.instance.PostSearch/object/".concat(e,"/instance/_search"),t,r)).data}));return function(t,r,n){return e.apply(this,arguments)}}(),pa=Symbol("appId"),da=Symbol("menuI18nNamespace"),fa=Symbol("overrideApp");function va(){return(va=(0,o.Z)((function*(e,t,r){if(e.dynamicItems&&e.itemsResolve){var n=e.app[0].appId,o=t;if(n!==t.app.id){var i=window.STANDALONE_MICRO_APPS?e.overrideApp:ia(n);o=(0,a.Z)((0,a.Z)({},t),{},{overrideApp:i,appendI18nNamespace:r.get(e)})}var s=yield De((0,a.Z)({transform:"items"},e.itemsResolve),o);e.items=s.items}}))).apply(this,arguments)}function ha(){return ha=(0,o.Z)((function*(e,t){var r=e.find((e=>"inject"!==e.type));if(r){var n=[],o=new Map,i=new WeakMap;for(var s of e)s.i18n&&function(){var e=S("menu","".concat(s.menuId,"~").concat(s.app[0].appId,"+").concat(s.instanceId));Object.entries(s.i18n).forEach((t=>{var[r,n]=t;b.i18n.addResourceBundle(r,e,n)})),i.set(s,e)}();for(var c of(yield Promise.all(e.map((e=>function(e,t,r){return va.apply(this,arguments)}(e,t,i)))),e)){var l;if(null!==(l=c.items)&&void 0!==l&&l.length)if("inject"===c.type&&c.injectMenuGroupId){var u=o.get(c.injectMenuGroupId);u||(u=[],o.set(c.injectMenuGroupId,u)),u.push(c)}else n.push(c)}return(0,a.Z)((0,a.Z)({},r),{},{items:n.flatMap((e=>ma(e.items,e,o,i))),[da]:i.get(r),[fa]:r.overrideApp})}})),ha.apply(this,arguments)}function ma(e,t,r,n){return null==e?void 0:e.map((e=>{var o,i=e.groupId&&r.get(e.groupId);return i&&r.delete(e.groupId),(0,a.Z)((0,a.Z)({},e),{},{children:(null!==(o=ma(e.children,t,r,n))&&void 0!==o?o:[]).concat(i?i.flatMap((e=>ma(e.items,e,r,n))):[]),[pa]:t.app[0].appId,[da]:n.get(t),[fa]:t.overrideApp})}))}function ga(e){return(0,i.sortBy)(e,(e=>{var t;return null!==(t=e.sort)&&void 0!==t?t:-1/0}))}var ya=["children"];function wa(e,t,r){var n=r;if(t!==r.app.id){var o=window.STANDALONE_MICRO_APPS?e[fa]:ia(t);n=(0,a.Z)((0,a.Z)({},r),{},{overrideApp:o,appendI18nNamespace:e[da]})}return ja(e,n,{ignoreSymbols:!0})}function ba(e,t){return Promise.all(e.map(function(){var e=(0,o.Z)((function*(e){var{children:r}=e,n=(0,f.Z)(e,ya),[o,i]=yield Promise.all([wa(n,n[pa],t),r&&(yield ba(r,t))]);return(0,a.Z)((0,a.Z)({},o),{},{children:i})}));return function(t){return e.apply(this,arguments)}}()))}var Sa=function(){var e=(0,o.Z)((function*(e,t,r,n){return(yield c.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(e,"/instance/").concat(t),(0,a.Z)((0,a.Z)({},n),{},{params:r}))).data}));return function(t,r,n,a){return e.apply(this,arguments)}}(),Ea=new Map;function Za(e){return ka.apply(this,arguments)}function ka(){return(ka=(0,o.Z)((function*(e){if(e.title||(0,i.isEmpty)(e.titleDataSource))return e.title;var t=JSON.stringify(e.titleDataSource);if(Ea.has(t))return Ea.get(t);var r,{objectId:n,instanceId:a,attributeId:o}=e.titleDataSource,s=null!=o?o:"name",c=yield Sa(n,a,{fields:s});if("#showKey"===o&&Array.isArray(c[s])){var[l,...u]=c[s];r=u.length>0?"".concat(l,"(").concat(u.join(","),")"):String(l)}else r=String(c[s]);return Ea.set(t,r),r}))).apply(this,arguments)}var Ia=["items","app"],Pa=new Map,Ca=new Map;function Oa(e){return Ca.get(e)}function Aa(){return Aa=(0,o.Z)((function*(e,t){var r=window.STANDALONE_MICRO_APPS?function(e,t){var r,n,o,i,s=oa(t);return(null!==(r=null!==(n=null===(o=s.meta)||void 0===o?void 0:o.injectMenus)&&void 0!==n?n:null===(i=s.meta)||void 0===i?void 0:i.menus)&&void 0!==r?r:[]).filter((t=>t.menuId===e)).map((e=>{var r,n;return(0,a.Z)((0,a.Z)({},e),null!==(r=e.app)&&void 0!==r&&null!==(n=r[0])&&void 0!==n&&n.appId?{}:{app:[{appId:t}]})}))}(e,t.app.id):(yield ua("EASYOPS_STORYBOARD_MENU",{page:1,page_size:200,fields:{menuId:!0,title:!0,icon:!0,link:!0,titleDataSource:!0,defaultCollapsed:!0,defaultCollapsedBreakpoint:!0,type:!0,injectMenuGroupId:!0,dynamicItems:!0,itemsResolve:!0,items:!0,i18n:!0,"items.children":!0,"app.appId":!0},query:{menuId:{$eq:e},app:{$size:{$gt:0}}}})).list,n=yield function(e,t){return ha.apply(this,arguments)}(r,t);if(!n)throw new Error("Menu not found: ".concat(e));!function(e){e.items=ga(e.items).map((e=>(0,a.Z)((0,a.Z)({},e),{},{children:ga(e.children)})))}(n);var{items:o,app:s}=n,c=(0,f.Z)(n,Ia),l=(0,a.Z)((0,a.Z)({},t),{},{pendingPermissionsPreCheck:[...t.pendingPermissionsPreCheck,za([o,c])]});delete l.tplStateStoreId,delete l.forEachItem;var u=s[0].appId,[p,d]=yield Promise.all([wa(c,u,l),ba(o,l)]),v=(0,a.Z)((0,a.Z)({title:yield Za(p)},(0,i.pick)(p,["icon","link","defaultCollapsed","defaultCollapsedBreakpoint"])),{},{menuItems:d.filter(Ge).map((e=>{var t,r=null===(t=e.children)||void 0===t?void 0:t.filter(Ge);return"group"===e.type?{type:"group",title:e.text,items:r}:null!=r&&r.length?{type:"subMenu",title:e.text,icon:e.icon,items:r,defaultExpanded:e.defaultExpanded}:e}))});Ca.set(e,v)})),Aa.apply(this,arguments)}var _a=["pendingPermissionsPreCheck","tplStateStoreMap"],Ta=Symbol.for("pre.evaluated.raw"),Ra=Symbol.for("pre.evaluated.context");function Ma(e){return!(null==e||!e[Ta])}function xa(e){return"string"==typeof e?(0,u.shouldAllowRecursiveEvaluations)(e):(0,u.shouldAllowRecursiveEvaluations)(e[Ta])}var Ba=new WeakSet([SyntaxError,TypeError,ReferenceError]);function La(e){return Ba.has(e.constructor)?e.constructor:TypeError}function Na(){return(Na=(0,o.Z)((function*(e,t,r){var{blockingList:n,run:a}=Ua(e,t,r,!0);return yield Promise.all(n),a()}))).apply(this,arguments)}function Ua(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o=[];if("string"!=typeof e){var{pendingPermissionsPreCheck:c,tplStateStoreMap:l}=t,d=(0,f.Z)(t,_a);t=(0,a.Z)((0,a.Z)({},e[Ra]),d),e=e[Ta]}var m,g={usedArgs:new Set},y={usedArgs:new Set};try{m=(0,u.preevaluate)(e,{withParent:!0,hooks:{beforeVisitGlobal(e,t){wn(g,e,t),bn(y,e,t)}}})}catch(t){var b="".concat(t.message,', in "').concat(e,'"');throw new(La(t))(b)}if(g.hasNonStaticUsage)throw new Error('Non-static usage of "APP.getMenu" is not supported in v3, check your expression: "'.concat(e,'"'));if(y.hasNonStaticUsage)throw new Error('Non-static usage of "INSTALLED_APPS.has" is not supported in v3, check your expression: "'.concat(e,'"'));var S,E,P,C,_={},{attemptToVisitGlobals:T}=m;if(r.lazy||T.has("EVENT")&&!(0,p.hasOwnProperty)(t,"event")||T.has("DATA")&&!(0,p.hasOwnProperty)(t,"data"))return{blockingList:o,run:()=>Object.keys(t).length>0?{[Ta]:e,[Ra]:t}:e};(T.has("STATE")||T.has("TPL"))&&(C=st(t,"STATE",': "'.concat(e,'"')));var R,M=I();if(n||M){if(T.has("CTX")&&(S=(0,s.strictCollectMemberUsage)(e,"CTX"),n&&o.push(t.ctxStore.waitFor(S))),C){P=(0,s.strictCollectMemberUsage)(e,"STATE");var x=(0,s.strictCollectMemberUsage)(e,"TPL");for(var B of x)P.add(B);n&&o.push(C.waitFor(P))}T.has("PROCESSORS")&&(E=(0,s.strictCollectMemberUsage)(e,"PROCESSORS",2),n&&o.push((0,v.loadProcessorsImperatively)(E,na())))}if(n){var L=T.has("PERMISSIONS");if(!L&&T.has("FN")){var N=[...(0,s.strictCollectMemberUsage)(e,"FN")];L=Q(N)}if(L&&o.push(...t.pendingPermissionsPreCheck),g.usedArgs.size>0){var U=[...g.usedArgs];o.push(Promise.all(U.map((e=>function(e,t){var r=Pa.get(e);return r||(r=function(e,t){return Aa.apply(this,arguments)}(e,t)),r}(e,t)))))}y.usedArgs.size>0&&o.push((R=[...y.usedArgs],Promise.all(R.map((e=>Sn.get(e))))))}return{blockingList:o,run(){var r,{app:n,location:o,query:s,match:c,flags:l,sys:d,ctxStore:f,data:v,event:g}=t,y=null!==(r=t.overrideApp)&&void 0!==r?r:n;for(var b of T)switch(b){case"ANCHOR":_[b]=o.hash?o.hash.substring(1):null;break;case"APP":_[b]=(0,a.Z)((0,a.Z)({},(0,i.cloneDeep)(y)),{},{getMenu:Oa});break;case"CTX":_[b]=A({get(e,t){if("string"==typeof t)return f.getValue(t)},ownKeys:()=>Array.from(S)});break;case"DATA":_[b]=v;break;case"EVENT":_[b]=g;break;case"FLAGS":_[b]=O(l);break;case"HASH":_[b]=o.hash;break;case"INSTALLED_APPS":_[b]=O({has:Zn});break;case"ITEM":(0,p.hasOwnProperty)(t,"forEachItem")?_[b]=t.forEachItem:console.error('Using `ITEM` but no `:forEach` is found, check your expression: "'.concat(e,'"'));break;case"LOCAL_STORAGE":_[b]=O({getItem:ce("local")});break;case"MEDIA":_[b]=O(se());break;case"MISC":_[b]=ea().getMiscSettings();break;case"PARAMS":_[b]=new URLSearchParams(s);break;case"PATH":_[b]=O(c.params);break;case"PATH_NAME":_[b]=o.pathname;break;case"PROCESSORS":_[b]=A({get(e,t){if("string"==typeof t){var r=w.get(t);if(!r)throw new Error("'PROCESSORS.".concat(t,"' is not registered! Have you installed the relevant brick package?"));return A({get(e,t){if("string"==typeof t)return r.get(t)},ownKeys:()=>Array.from(r.keys())})}},ownKeys:()=>Array.from(E)});break;case"QUERY":_[b]=Object.fromEntries(Array.from(s.keys()).map((e=>[e,s.get(e)])));break;case"QUERY_ARRAY":_[b]=Object.fromEntries(Array.from(s.keys()).map((e=>[e,s.getAll(e)])));break;case"SESSION_STORAGE":_[b]=O({getItem:ce("session")});break;case"TPL":case"STATE":_[b]=A({get(e,t){if("string"==typeof t)return C.getValue(t)},ownKeys:()=>Array.from(P)});break;case"SYS":_[b]=O(d);break;case"__WIDGET_FN__":_[b]=ca;break;case"__WIDGET_IMG__":_[b]=k;break;case"__WIDGET_I18N__":_[b]=Z}Object.assign(_,H(m.attemptToVisitGlobals,{storyboardFunctions:J,app:t.app,appendI18nNamespace:t.appendI18nNamespace}));try{return(0,u.cook)(m.expression,m.source,{globalVariables:(0,h.supply)(m.attemptToVisitGlobals,_)})}catch(t){var I="".concat(t.message,', in "').concat(e,'"');throw new(La(t))(I)}}}}function ja(e,t){return $a.apply(this,arguments)}function $a(){return $a=(0,o.Z)((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ma(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&Qe(r.$$stateOfUseBrick),i=o;return n||(0,u.isEvaluable)(e)?(a=yield function(e,t,r){return Na.apply(this,arguments)}(e,t,{lazy:o}),i=xa(e)):a=o?e:(0,d.transformAndInject)(e,t),i||Kr(a),a}if(!(0,p.isObject)(e)||Vr(e))return e;if(Array.isArray(e)){var s=Da(r,!0);return Promise.all(e.map((e=>ja(e,t,s))))}return Object.fromEntries((yield Promise.all(Object.entries(e).map((e=>{var[n,a]=e;return Promise.all([ja(n,t),ja(a,t,Da(r,!1,n))])})))).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))})),$a.apply(this,arguments)}function Fa(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Ma(e);if(n||"string"==typeof e){var a,o=r.$$lazyForUseBrick&&Qe(r.$$stateOfUseBrick),i=o;return n||(0,u.isEvaluable)(e)?(a=function(e,t,r){var{run:n}=Ua(e,t,void 0,!1);return n()}(e,t),i=xa(e)):a=o?e:(0,d.transformAndInject)(e,t),i||Kr(a),a}if(!(0,p.isObject)(e)||Vr(e))return e;if(Array.isArray(e)){var s=Da(r,!0);return e.map((e=>Fa(e,t,s)))}return Object.fromEntries(Object.entries(e).map((e=>{var[n,a]=e;return[Fa(n,t),Fa(a,t,Da(r,!1,n))]})).concat(r.ignoreSymbols?[]:Object.getOwnPropertySymbols(e).map((t=>[t,e[t]]))))}function Da(e,t,r){return e.$$lazyForUseBrick?(0,a.Z)((0,a.Z)({},e),{},{$$stateOfUseBrick:Xe(e.$$stateOfUseBrick,t,r)}):e}var Ka=[],Va=new Map;function Ha(e){if(no()&&!to().isAdmin)return Ga((0,s.scanPermissionActionsInStoryboard)(e))}function Wa(e,t){return qa.apply(this,arguments)}function qa(){return(qa=(0,o.Z)((function*(e,t){if(no()&&!to().isAdmin&&Array.isArray(e.permissionsPreCheck))return Ga(yield ja(e.permissionsPreCheck,t))}))).apply(this,arguments)}function za(e){if(no()&&!to().isAdmin)return Ga((0,s.scanPermissionActionsInAny)(e))}function Ga(e){return Ja.apply(this,arguments)}function Ja(){return(Ja=(0,o.Z)((function*(e){var t=(0,i.difference)(e,[...Ka]);if(0!==t.length){Ka.push(...t);try{var r=yield l({actions:t});for(var n of r.actions)Va.set(n.action,n.authorizationStatus),"undefined"===n.authorizationStatus&&console.error('Undefined permission action: "'.concat(n.action,'"'))}catch(e){console.error("Pre-check permissions failed",e)}}}))).apply(this,arguments)}function Ya(){if(!no())return!1;if(to().isAdmin)return!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n of t)switch(Va.get(n)){case"unauthorized":case"undefined":return!1;case void 0:return console.error('Un-checked permission action: "'.concat(n,'", please make sure the permission to check is defined in permissionsPreCheck.')),!1}return!0}var Qa,Xa={};function eo(e){Object.assign(Xa,{org:e.org,username:e.username,userInstanceId:e.userInstanceId,loginFrom:e.loginFrom,accessRule:e.accessRule,isAdmin:e.isAdmin,csrfToken:e.csrfToken,license:e.license,userShowValue:e.userShowValue})}function to(){return(0,a.Z)({},Xa)}function ro(){for(var e of Object.keys(Xa))Xa[e]=void 0;Ka.length=0,Va.clear()}function no(){return void 0!==Xa.username}function ao(e,t,r){return oo.apply(this,arguments)}function oo(){return(oo=(0,o.Z)((function*(e,t,r){return Ve(yield Ue(e),e,"resolve",t,r)}))).apply(this,arguments)}function io(e,t){return so.apply(this,arguments)}function so(){return(so=(0,o.Z)((function*(e,t){var r,n,o=(0,a.Z)((0,a.Z)({},null===(n=Gn)||void 0===n?void 0:n.getRuntimeContext()),{},{data:t,pendingPermissionsPreCheck:[],tplStateStoreMap:new Map}),i=new Tr("useBrick"),s={tag:er.ROOT,createPortal:null},c=yield ur(s,e,o,i);if((0,v.flushStableLoadBricks)(),yield Promise.all([...c.blockingList,...[...o.tplStateStoreMap.values()].map((e=>e.waitForAll())),...o.pendingPermissionsPreCheck]),null!==(r=c.node)&&void 0!==r&&r.portal)throw new Error("The root brick of useBrick cannot be a portal brick");return s.child=c.node,{tagName:c.node?c.node.type:null,renderRoot:s,rendererContext:i}}))).apply(this,arguments)}function co(e,t){var r,{renderRoot:n,rendererContext:a}=e;return n.createPortal=()=>{var e=document.querySelector("#portal-mount-point");return r=document.createElement("div"),e.appendChild(r),r},wr(n,t),a.dispatchOnMount(),a.initializeScrollIntoView(),a.initializeMediaChange(),{portal:r}}function lo(e,t){var{rendererContext:r}=e;t.portal&&(yr(t.portal),t.portal.remove()),r.dispatchOnUnmount(),r.dispose()}function uo(e){ra(e)}function po(e,t,r){return fo.apply(this,arguments)}function fo(){return(fo=(0,o.Z)((function*(e,t,r){var n,a,o={pendingPermissionsPreCheck:[],tplStateStoreMap:new Map},i=Qa,s=Qa=new Tr("router"),c={tag:er.ROOT,container:t.main,createPortal:t.portal},l=!1;try{(a=yield cr(c,e,o,s)).blockingList.push(...[...o.tplStateStoreMap.values()].map((e=>e.waitForAll())),...o.pendingPermissionsPreCheck),(0,v.flushStableLoadBricks)(),yield Promise.all(a.blockingList)}catch(e){l=!0,a={node:{tag:er.BRICK,type:"div",properties:{textContent:Zt(e)},return:c,runtimeContext:null},blockingList:[],menuRequests:[]}}c.child=a.node,null==i||i.dispose(),yr(t.main),yr(t.portal),M(null!==(n=null==r?void 0:r.theme)&&void 0!==n?n:"light"),$("default"),l||s.dispatchBeforePageLoad(),L(),D(),wr(c),window.scrollTo(0,0),l||(s.dispatchPageLoad(),s.dispatchOnMount(),s.initializeScrollIntoView(),s.initializeMediaChange())}))).apply(this,arguments)}}}]);
|
|
3
|
-
//# sourceMappingURL=2241.9f705baa.js.map
|