text: define(["jimu-core","jimu-layouts/common","jimu-ui"],(function(t,e,o){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=106)}({0:function(e,o){e.exports=t},1:function(t,o){t.exports=e},106:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(44);e.LayoutViewer=n.default;var r=o(45);e.WidgetRenderer=r.WidgetRenderer;var i=o(46);e.SectionRenderer=i.SectionRenderer;var a=o(108);e.PageRenderer=a.default;var s=o(31);e.LayoutEntry=s.default;var u=o(20);e.LayoutItem=u.default},107:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(1),u=o(7),l=o(20),d=o(16),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this.props,e=t.layoutItem,o=t.layoutId,n=t.transformedBBox;if(!e||e.isPending)return null;var r=a.lodash.assign({},u.DEFAULT_FIX_LAYOUT_ITEM_SETTING,e.setting),c=n||e.bbox,p=d.generateBBoxStyle(c,r),f=i(i({position:"absolute"},p),d.applyPositionSetting(r)),h=s.parseAspectRatio(r.aspectRatio);return a.React.createElement(l.default,{style:f,layoutId:o,layoutItemId:e.id,forceAspectRatio:"ratio"===r.heightMode,aspectRatio:h})},e}(a.React.PureComponent);e.default=c},108:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(44),u=o(28),l=o(109),d=o(111),c=o(1),p=o(31);c.registerLayoutViewer(a.LayoutType.FixedLayout,s.default),c.registerLayoutViewer(a.LayoutType.FlowLayout,l.default),c.registerLayoutViewer(a.LayoutType.GridLayout,d.default);var f=function(t){function e(e){var o=t.call(this,e)||this;return a.ExtensionManager.getInstance().registerExtension({epName:a.extensionSpec.ExtensionPoints.LayoutTransformer,extension:new u.FlowLayoutTransformer}),o}return r(e,t),e.prototype.render=function(){var t,e=this,o=this.props,n=o.renderedPages,r=o.pages,i=o.theme,s=o.isDesignMode;this.pageContext={isDesignMode:s,theme:i,mainSizeMode:this.props.mainSizeMode,browserSizeMode:this.props.browserSizeMode};var u="100%";Object.keys(n).some((function(e){if(n[e])return t=e,!0}));var l=r[t]||{};l&&!isNaN(+l.width)&&(u=+l.width);var d={width:u,margin:"0 auto",minHeight:"100%",height:l&&l.height,backgroundColor:l&&l.backgroundColor};return a.jsx("div",{className:"page-renderer d-flex flex-column",css:d},this.renderHeader(),Object.keys(n).map((function(t){return e.renderPageBody(t,i)})),this.renderFooter())},e.prototype.renderHeader=function(){var t,e;if(!this.props.header)return null;var o=this.props,n=o.header,r=o.headerVisible,s=o.browserSizeMode,u=o.theme,l=o.mainSizeMode,d=n.height[s]||n.height[l]||50,f=h(n),y={display:r?"flex":"none",position:n.sticky?"sticky":"relative",zIndex:n.sticky?1:"auto",top:0,width:"100%",minHeight:+d,height:"auto",overflow:"hidden",backgroundColor:n.backgroundColor||this.props.theme.header.bg||"transparent",backgroundImage:n.backgroundIMage||void 0,backgroundPosition:n.backgroundPosition,color:null===(e=null===(t=u)||void 0===t?void 0:t.header)||void 0===e?void 0:e.color};return a.jsx(c.PageContext.Provider,{value:i(i({},this.pageContext),{viewOnly:!0})},a.jsx("div",{className:"header",style:y},a.jsx(p.default,{layouts:f,className:"w-100 flex-grow-1"})))},e.prototype.renderFooter=function(){var t,e;if(!this.props.footer)return null;var o=this.props,n=o.footer,r=o.footerVisible,s=o.browserSizeMode,u=o.mainSizeMode,l=o.theme,d=n.height[s]||n.height[u]||50,f=h(n),y=void 0;n.backgroundIMage&&("string"==typeof n.backgroundIMage?y=n.backgroundIMage:"object"==typeof n.backgroundIMage&&(y=n.backgroundIMage.url));var g={display:r?"flex":"none",width:"100%",minHeight:+d,height:"auto",overflow:"hidden",backgroundColor:n.backgroundColor||this.props.theme.footer.bg||"transparent",backgroundImage:y,backgroundPosition:n.backgroundPosition,color:null===(e=null===(t=l)||void 0===t?void 0:t.footer)||void 0===e?void 0:e.color};return a.jsx(c.PageContext.Provider,{value:i(i({},this.pageContext),{viewOnly:!0})},a.jsx("div",{className:"footer",css:g},a.jsx(p.default,{layouts:f,className:"w-100 flex-grow-1"})))},e.prototype.renderPageBody=function(t,e){var o=this.props,n=o.renderedPages,r=o.pages[t];if(r){var s,u=h(r),l=!!n[t];return r.mode!==a.PageMode.FitWindow&&r.maxWidth>0&&(s=r.maxWidth),a.jsx(c.PageContext.Provider,{key:r.id,value:i(i({},this.pageContext),{maxWidth:s,viewOnly:!0})},a.jsx("div",{key:t,id:r.id,"data-pageid":r.id,className:"page flex-grow-1",style:{display:l?"flex":"none",backgroundColor:r.bodyBackgroundColor||"transparent"}},a.jsx(p.default,{layouts:u,className:"w-100 flex-grow-1",style:{margin:"0 auto",backgroundColor:"transparent"}})))}},e.displayName="RuntimePageRenderer",e}(a.React.PureComponent);function h(t){return t?t.layout:null}e.default=a.ReactRedux.connect((function(t,e){return{pages:t.appConfig.pages,header:t.appConfig.header,headerVisible:!!t.appConfig.pages[e.pageId].header,footer:t.appConfig.footer,footerVisible:!!t.appConfig.pages[e.pageId].footer,isDesignMode:!1,browserSizeMode:t.browserSizeMode,mainSizeMode:t.appConfig.mainSizeMode,theme:t.theme}}))(f)},109:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(2),u=o(110),l=o(11),d=o(1),c=function(t){function e(e){var o,n=t.call(this,e)||this,r=a.ExtensionManager.getInstance().getExtensions(""+a.extensionSpec.ExtensionPoints.LayoutTransformer);if(r&&r.length>0){var i=r.find((function(t){return t.layoutType===n.props.layout.type}));n.layoutTransform=null===(o=i)||void 0===o?void 0:o.transformLayout}return n}return r(e,t),e.prototype._createItem=function(t,e,o){var n=this.props.layout;return a.React.createElement(u.default,{key:t.id,index:e,gutter:o.gutter,layoutId:n.id,layoutItemId:t.id,layoutItem:t})},e.prototype.render=function(){var t=this,e=this.props,o=e.layout,n=e.className,r=e.style,u=e.layouts;return o?a.React.createElement(d.PageContext.Consumer,null,(function(e){var d,c=o;u[e.browserSizeMode]!==o.id&&t.layoutTransform&&(Object.keys(u).some((function(t){if(u[t]===o.id)return d=t,!0})),c=t.layoutTransform(o,d,e.browserSizeMode));var p=c.order||[],f=a.lodash.assign({},l.DEFAULT_FLOW_SETTING,c.setting),h=i(i(i({},r),s.styleUtils.toCSSStyle(f.style)),{position:"relative",overflow:"auto"}),y=a.classNames("layout flow-layout d-flex flex-column align-items-center w-100",n);return a.React.createElement("div",{className:y,style:h,"data-layoutid":o.id},p.map((function(e,o){return t._createItem(c.content[e],o,f)})))})):null},e}(a.React.PureComponent);e.default=a.ReactRedux.connect(d.mapStateToLayoutProps)(c)},11:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(2);e.DEFAULT_FLOW_SETTING={gutter:0,style:{padding:{number:[0],unit:"px"},justifyContent:"flex-start",alignItems:"stretch",borderRadius:{number:[0],unit:n.UnitTypes.PIXEL}}},e.DEFAULT_FLOW_ITEM_SETTING={lockParent:!0,heightMode:"auto",offsetX:0,offsetY:0}},110:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(11),u=o(29),l=o(20),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.calHeight=function(t){var e=this.props.layoutItem.bbox||{};switch(t.heightMode){case"auto":return{height:"auto"};case"fixed":return{height:e.height}}},e.prototype.render=function(){var t=this.props,e=t.layoutId,o=t.index,n=t.gutter,r=t.layoutItem,u=t.onClick,d=t.isEmpty;if(!r||d)return null;var c=a.classNames("flow-layout-item","d-flex"),p=a.lodash.assign({},s.DEFAULT_FLOW_ITEM_SETTING,r.setting),f=i({marginTop:o>0?n:"unset",width:(p.width||100)+"%",flexShrink:0},this.calHeight(p));return(p.offsetX||p.offsetY)&&(f.transform="translate("+(p.offsetX||0)+"px, "+(p.offsetY||0)+"px)"),a.React.createElement(l.default,{style:f,layoutId:e,layoutItemId:r.id,onClick:u,className:c})},e}(a.React.PureComponent);e.default=a.ReactRedux.connect(u.mapStateToFlowItemProps)(d)},111:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(2),u=o(112),l=o(1),d=o(8),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t,e,o=this.props,n=o.layout,r=o.className,l=a.lodash.assign({},d.DEFAULT_GRID_SETTING,n.setting&&n.setting.splitter),c=null===(t=n.setting)||void 0===t?void 0:t.style,p=null===(e=n.setting)||void 0===e?void 0:e.rootItemId,f=i(i({position:"relative"},s.styleUtils.toCSSStyle(c)),{overflow:"hidden"}),h=a.classNames("layout grid-layout d-flex w-100",r);return a.jsx("div",{className:h,style:f,"data-layoutid":n.id},p&&a.jsx(u.GridContainer,{layoutId:n.id,layoutItemId:p,splitterSize:l.size,splitterColor:l.color}))},e}(a.React.PureComponent);e.default=a.ReactRedux.connect(l.mapStateToLayoutProps)(c)},112:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),a=o(8),s=o(113),u=o(114),l=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return r(o,t),o.prototype.createItems=function(t,o){var n=this.props,r=n.layoutId,a=n.layoutItem,l=n.splitterColor,d=n.splitterSize,c=[];return t.forEach((function(n,p){var f=o.indexOf(n)>=0?e.GridContainer:s.default;c.push(i.React.createElement(f,{key:n,layoutId:r,layoutItemId:n})),p!==t.length-1&&c.push(i.React.createElement(u.Splitter,{key:n+"_splitter",layoutId:r,direction:a.direction,prevItemId:t[p],nextItemId:t[p+1],size:d,color:l}))})),c},o.prototype.render=function(){var t=this,e=this.props,o=e.layoutItem,n=e.subContainerIds;if(!o)return null;var r=o.items&&o.items.length>0?o.items:[o.id],s=n.split(","),u=i.classNames("grid-container d-flex justify-content-start",{"flex-column":o.direction===a.Direction.Vertical}),l={width:o.bbox.width,height:o.bbox.height,flexShrink:1,flexGrow:1};return i.React.createElement("div",{className:u,"data-layoutitemid":o.id,"data-layoutid":this.props.layoutId,style:l,ref:function(e){return t.ref=e}},this.createItems(r,s))},o}(i.React.PureComponent);function d(t,e){var o=e.layoutId,n=e.layoutItemId,r=t.appConfig.layouts[o],i=r.content[n],a=[];return i&&i.items&&i.items.forEach((function(t){var e=r.content[t];e&&e.items&&a.push(t)})),{layoutItem:i,subContainerIds:a.join(",")}}e.mapStateToContainerProps=d,e.GridContainer=i.ReactRedux.connect(d)(l)},113:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),a=o(1),s=o(20),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this.props,e=t.layoutId,o=t.layoutItem;if(!o)return null;var n={position:"relative",width:o.bbox.width,height:o.bbox.height,flexShrink:1,flexGrow:1};return i.jsx(s.default,{style:n,layoutId:e,layoutItemId:o.id,onClick:this.props.onClick})},e}(i.React.PureComponent);e.default=i.ReactRedux.connect(a.mapStateToLayoutItemProps)(u)},114:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t};Object.defineProperty(e,"__esModule",{value:!0});var a,s=o(0),u=o(1),l=o(8),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getStyle=function(){var t=this.props,e=t.direction,o=t.size,n=t.color,r=o+"px";return s.css(a||(a=i(["\n      width: ",";\n      height: ",";\n      background: ",";\n      position: relative;\n      z-index: ",";\n\n      .horizontal-splitter {\n        width: 15px;\n        height: 100%;\n        position: absolute;\n        left: -5px;\n      }\n\n      .vertical-splitter {\n        width: 100%;\n        height: 15px;\n        position: absolute;\n        top: -5px;\n      }\n    "],["\n      width: ",";\n      height: ",";\n      background: ",";\n      position: relative;\n      z-index: ",";\n\n      .horizontal-splitter {\n        width: 15px;\n        height: 100%;\n        position: absolute;\n        left: -5px;\n      }\n\n      .vertical-splitter {\n        width: 100%;\n        height: 15px;\n        position: absolute;\n        top: -5px;\n      }\n    "])),e===l.Direction.Vertical?"100%":r,e===l.Direction.Vertical?r:"100%",n,u.LayoutZIndex.HandlerTools)},e.prototype.render=function(){var t=this,e=this.props.direction;return s.jsx("div",{ref:function(e){return t.ref=e},css:this.getStyle()},s.jsx("div",{className:s.classNames({"horizontal-splitter":e===l.Direction.Horizontal,"vertical-splitter":e===l.Direction.Vertical})}))},e}(s.React.PureComponent);e.Splitter=d},16:function(t,e,o){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var r=o(1),i=o(0),a=o(7),s=o(4);function u(t,e){var o=e,a=t.order;if(!a||0===a.length)return t;var s=i.Immutable(t),u=[];a.forEach((function(e){u.push(n({id:e},p(t.content[e].bbox,o,800)))})),u.sort(d);for(var f=[u[0]],h=function(t){var e=u[t];f.some((function(t){if(c(t,e))return t.content||(t.content=[]),t.content.push(n({},e)),!0}))||f.push(e)},y=1;y<u.length;y++)h(y);var g=0,v=[];return f.forEach((function(t){var e=0;l(t,o),t.y<g&&(e=g-t.y,t.y=g),g=t.y+t.h,s=s.setIn(["content",t.id,"bbox"],{left:r.toRatio(t.x,o),top:t.y+"px",width:r.toRatio(t.w,o),height:t.h+"px"}).setIn(["content",t.id,"setting","autoProps","width"],!1),v.push(t.id),t.content&&t.content.forEach((function(n){l(n,o),e>0&&(n.y+=e),s=s.setIn(["content",t.id,"bbox"],{left:r.toRatio(t.x,o),top:t.y+"px",width:r.toRatio(t.w,o),height:t.h+"px"}).setIn(["content",t.id,"setting","autoProps","width"],!1),v.push(n.id)}))})),s=s.set("order",v)}function l(t,e,o){t.x>e&&(o?t.x=e-t.w:(t.x=0,t.y+=t.h)),t.x<0&&(t.x=0),t.x+t.w>e&&(t.w<e?t.x=e-t.w:(t.w=e,t.x=0))}function d(t,e){return t.y!==e.y?t.y>e.y?1:-1:t.x!==e.x?t.x>e.x?1:-1:0}function c(t,e){return t.x<=e.x&&t.x+t.w>e.x+e.w&&t.y<=e.y&&t.y+t.h>e.y+e.h}function p(t,e,o){var n={},i=0,a=0,s=e,u=.2*o;return t&&(["left","right","top","bottom","width","height"].forEach((function(i){if(void 0!==t[i]&&"auto"!==t[i]){var a=["left","right","width"].indexOf(i)>=0?e:o;n[i]=r.isPercentage(t[i])?r.fromRatio(t[i],a):parseFloat(t[i])}})),void 0!==n.left&&(i=n.left),void 0!==n.width?(s=n.width,void 0===n.left&&void 0!==n.right&&(i=e-n.right-s)):s=e-(n.left||0)-(n.right||0),void 0!==n.top&&(a=n.top),void 0!==n.height?(u=n.height,void 0===n.top&&void 0!==n.bottom&&(a=o-n.bottom-u)):void 0!==n.top&&void 0!==n.bottom&&(u=o-n.top-n.bottom)),{x:i,y:a,w:s,h:u}}function f(t){var e=i.Immutable(t),o=t.left;return e.set("left",t.right).set("right",o)}function h(t){var e=i.Immutable(t),o=t.left;return e.set("left",t.right).set("right",o)}e.sortLayoutItems=function(t){if(!t.content||0===Object.keys(t.content).length)return[];var e=function(t){return r.isPercentage(t)?1280*parseFloat(t)/100:+t};return Object.keys(t.content).map((function(e){return t.content[e]})).sort((function(t,o){var n=e(t.bbox.top),r=e(o.bbox.top);if(n>r)return 1;if(n<r)return-1;var i=e(t.bbox.left),a=e(o.bbox.left);return i>a?1:i<a?-1:0})).map((function(t){return t.id}))},e.mapStateToFixedLayoutProps=function(t,e){var o=r.mapStateToLayoutProps(t,e),u=o.layout,l=0;return u&&u.order&&u.order.length>0&&u.order.forEach((function(e){var o=s.findLayoutItem(t.appConfig,{layoutId:u.id,layoutItemId:e}),n=o.bbox,d=i.lodash.assign({},a.DEFAULT_FIX_LAYOUT_ITEM_SETTING,o.setting).autoProps;if(!r.isPercentage(n.top)&&!0!==d.top&&!r.isPercentage(n.height)&&!0!==d.height){var c=parseFloat(n.top),p=parseFloat(n.height);if(!isNaN(c)&&!isNaN(p)){var f=c+p;l=l<f?f:l}}})),n({minHeight:Math.round(l)},o)},e.fixedLayoutTransform=function(t,e,o){var n=i.utils.getSizeModeWidth(e),r=i.utils.getSizeModeWidth(o);return n<r?t:u(t,r)},e.autoResponseToDevice=u,e.intersects=function(t,e){var o=Math.max(t.x,e.x),n=Math.min(t.x+t.w,e.x+e.w),r=Math.max(t.y,e.y),i=Math.min(t.y+t.h,e.y+e.h);return o<n&&r<i},e.contains=c,e.mergePos=function(t,e){var o=Math.min(t.x,e.x),n=Math.min(t.y,e.y);return{x:o,y:n,w:Math.max(t.x+t.w,e.x+e.w)-o,h:Math.max(t.y+t.h,e.y+e.h)-n}},e.getAbsolutePos=p,e.generateResizingBBoxStyle=function(t,e,o){var n={};n.left=t.left+o.dx,n.width=t.width+o.dw;var r=e.right-t.right;0===o.dw?n.right=r-o.dx:0===o.dx?n.right=r-o.dw:n.right=r,n.top=t.top+o.dy,n.height=t.height+o.dh;var i=e.bottom-t.bottom;return 0===o.dh?n.bottom=i-o.dy:0===o.dy?n.bottom=i-o.dh:n.bottom=i,n},e.generateBBoxStyle=function(t,e){var o={},n=r.isRTL(),i=e&&e.autoProps||{},a=t;return n&&(i=f(i),a=h(a)),["left","right","top","bottom","width","height"].forEach((function(t){void 0!==a[t]&&!0!==i[t]&&(o[t]=a[t])})),o},e.flipAutoProps=f,e.flipBBox=h,e.applyPositionSetting=function(t,e){void 0===e&&(e=!1);var o={};return t.hCenter&&t.vCenter?(o.left="50%",o.right="auto",o.top="50%",o.transform="translate(-50%, -50%)"):t.hCenter?(o.left="50%",o.right="auto",o.transform="translateX(-50%)"):t.vCenter&&(o.top="50%",o.transform="translateY(-50%)"),e||"ratio"!==t.heightMode||(o.height="auto"),o},e.applySnapResult=function(t,e,o,n,a){void 0===a&&(a=!1);var s=i.Immutable(o||{}),u=i.Immutable(t);if(n.left&&n.right)u=u.set("left",0).set("right",0),s=s.set("left",!1).set("right",!1).set("width",!0);else if(n.left&&!n.right)u=u.set("left",0),s.right||s.width||(s=s.set("right",!0)),s=s.set("left",!1);else if(!n.left&&n.right)u=u.set("right",0),s.left||s.width||(s=s.set("left",!0)),s=s.set("right",!1);else{var l=r.isPercentage(t.left)?r.fromRatio(t.left,e.width):parseFloat(t.left),d=r.isPercentage(t.right)?r.fromRatio(t.right,e.width):parseFloat(t.right),c=r.isPercentage(t.width)?r.fromRatio(t.width,e.width):parseFloat(t.width);isNaN(l)&&(l=e.width-d-c),isNaN(d)&&(d=e.width-l-c),isNaN(c)&&(c=e.width-d-l),isNaN(l)||isNaN(d)||isNaN(c)||(l<=d?(s=s.set("left",!1),t.left||(u=u.set("left",r.isPercentage(t.right)||r.isPercentage(t.width)?r.toRatio(l,e.width):l)),t.width||(u=u.set("width",r.isPercentage(t.right)||r.isPercentage(t.left)?r.toRatio(c,e.width):c)),u=u.set("right",r.isPercentage(t.left)?r.toRatio(d,e.width):d),s.right||s.width||(s=s.set("right",!0))):l>d&&(s=s.set("right",!1),t.right||(u=u.set("right",r.isPercentage(t.left)||r.isPercentage(t.width)?r.toRatio(d,e.width):d)),t.width||(u=u.set("width",r.isPercentage(t.right)||r.isPercentage(t.left)?r.toRatio(c,e.width):c)),u=u.set("left",r.isPercentage(t.right)?r.toRatio(l,e.width):l),s.left||s.width||(s=s.set("left",!0))))}if(n.top&&n.bottom)u=u.set("top",0).set("bottom",0),s=s.set("top",!1).set("bottom",!1).set("height",!0);else if(n.top&&!n.bottom)u=u.set("top",0),(s=s.set("top",!1)).bottom||s.height||(s=s.set("bottom",!0));else if(!n.top&&n.bottom)u=u.set("bottom",0),(s=s.set("bottom",!1)).top||s.height||(s=s.set("top",!0));else{var p=r.isPercentage(t.top)?r.fromRatio(t.top,e.height):parseFloat(t.top),f=r.isPercentage(t.bottom)?r.fromRatio(t.bottom,e.height):parseFloat(t.bottom),h=r.isPercentage(t.height)?r.fromRatio(t.height,e.height):parseFloat(t.height);isNaN(p)&&(p=e.height-f-h),isNaN(f)&&(f=e.height-p-h),isNaN(h)&&(h=e.height-f-p),isNaN(p)||isNaN(f)||isNaN(h)||(p<=f?((s=s.set("top",!1)).bottom||s.height||(s=s.set("bottom",!0)),t.top||(u=u.set("top",r.isPercentage(t.bottom)||r.isPercentage(t.height)?r.toRatio(p,e.height):p)),t.height||(u=u.set("height",r.isPercentage(t.bottom)||r.isPercentage(t.top)?r.toRatio(h,e.height):h)),u=u.set("bottom",r.isPercentage(t.top)?r.toRatio(f,e.height):f)):p>f&&((s=s.set("bottom",!1)).top||s.height||(s=s.set("top",!0)),t.bottom||(u=u.set("bottom",r.isPercentage(t.top)||r.isPercentage(t.height)?r.toRatio(f,e.height):f)),t.height||(u=u.set("height",r.isPercentage(t.bottom)||r.isPercentage(t.top)?r.toRatio(h,e.height):h)),u=u.set("top",r.isPercentage(t.bottom)?r.toRatio(p,e.height):p)))}return{autoProps:s,bbox:u}}},2:function(t,e){t.exports=o},20:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s=this&&this.__rest||function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(o[n[r]]=t[n[r]])}return o};Object.defineProperty(e,"__esModule",{value:!0});var u,l=o(0),d=o(1),c=o(5),p=o(45),f=o(46),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getStyle=function(){return l.css(u||(u=i(["\n      position: relative;\n      overflow: visible;\n    "],["\n      position: relative;\n      overflow: visible;\n    "])))},e.prototype.render=function(){var t=this.props,e=t.layoutId,o=t.layoutItemId,n=t.layoutItem,r=this.props,i=r.style,u=r.className,d=(r.onClick,r.onDoubleClick,s(r,["style","className","onClick","onDoubleClick"])),c=n.type===l.LayoutItemType.Widget,h=n.type===l.LayoutItemType.Section;if(c&&!n.widgetId||h&&!n.sectionId)return null;var y="string"==typeof i?JSON.parse(i):a({},i);return l.jsx("div",{css:this.getStyle(),style:y,className:l.classNames("d-flex layout-item",u,{"is-widget":c,"is-section":h}),"data-layoutitemid":o,"data-layoutid":e},c&&l.jsx(p.WidgetRenderer,a({},d)),h&&l.jsx(f.SectionRenderer,a({},d)),this.props.children)},e}(l.React.PureComponent);e.default=l.ReactRedux.connect((function(t,e){var o=c.mapStateToLayoutItemProps(t,e);if(o.layoutItem.type===l.LayoutItemType.Widget)return a(a({},o),d.mapStateToWidgetProps(t,e));var n=d.getSectionInfo(t,o.layoutItem.sectionId);return a(a({},o),n)}))(h)},22:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_LAYOUT_ITEM_SETTING={order:0}},26:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s,u=o(0),l=o(1),d=o(2),c=function(t){function e(e){var o,n=t.call(this,e)||this;return n.state={renderedViews:u.Immutable((o={},o[n.props.activeView.id]=!0,o))},n}return r(e,t),e.prototype.componentDidUpdate=function(){var t=this.props.activeView.id,e=this.props.views,o=this.state.renderedViews;t&&!o[t]&&(Object.keys(o).forEach((function(t){o=e.indexOf(t)<0?o.without(t):o.set(t,!1)})),this.setState({renderedViews:o.set(t,!0)}))},e.prototype.renderSectionContent=function(){var t=this,e=this.props,o=e.forceAspectRatio,n=e.aspectRatio,r=e.views;return u.jsx("div",{className:u.classNames("section-wrapper w-100 d-flex",{"aspect-ratio-wrapper":o&&n>0})},u.jsx("div",{className:"w-100 d-flex section-content"},r.map((function(e){return t.renderView(e)}))),this.props.children)},e.prototype.renderView=function(t){var e=this.state.renderedViews[t],o=l.getSizemodeLayoutOfView(t),n=this.props.layoutEntryComponent;return u.jsx("div",{className:u.classNames("w-100 d-flex section-view",{hidden:!e}),key:t},u.jsx(u.ErrorBoundary,null,u.jsx(n,{layouts:o,isInSection:!0,className:"w-100"})))},e.prototype.getBackgroundStyle=function(){var t=this.props.activeView,e={};t.backgroundIMage&&(e="string"==typeof t.backgroundIMage?{}:t.backgroundIMage);var o=t.backgroundPosition?d.FillType[t.backgroundPosition.toUpperCase()]:d.FillType.FILL,n={color:t.backgroundColor,fillType:o,image:e};return d.styleUtils.toBackgroundStyle(n)},e.prototype.getStyle=function(){return u.css(s||(s=i(["\n      overflow: auto;\n      position: relative;\n      ","\n\n      .section-content {\n        position: relative;\n      }\n\n      & > div.aspect-ratio-wrapper {\n        width: 100%;\n        padding-top: ","%;\n\n        & > div.section-content {\n          position: absolute !important;\n          top: 0;\n          left: 0;\n          bottom: 0;\n          right: 0;\n        }\n      }\n      .hidden {\n        display: none !important;\n      }\n    "],["\n      overflow: auto;\n      position: relative;\n      ","\n\n      .section-content {\n        position: relative;\n      }\n\n      & > div.aspect-ratio-wrapper {\n        width: 100%;\n        padding-top: ","%;\n\n        & > div.section-content {\n          position: absolute !important;\n          top: 0;\n          left: 0;\n          bottom: 0;\n          right: 0;\n        }\n      }\n      .hidden {\n        display: none !important;\n      }\n    "])),this.getBackgroundStyle(),100*(this.props.aspectRatio||0))},e.prototype.render=function(){var t=this.props,e=t.sectionId,o=t.className,n=t.style,r=t.activeView,i=t.sectionStyle;return r&&r.layout?u.jsx("div",{className:u.classNames("section-layout w-100 d-flex",o),css:this.getStyle(),"data-sectionid":e,style:a(a({},n),d.styleUtils.toCSSStyle(i))},this.renderSectionContent()):null},e}(u.React.PureComponent);e.SectionRendererBase=c},28:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0),r=function(){function t(){this.id="flow-layout-transformer",this.layoutType=n.LayoutType.FlowLayout}return t.prototype.transformLayout=function(t,e,o){if(e!==o&&o===n.BrowserSizeMode.Small){var r=n.Immutable(t);return(t.order||[]).forEach((function(t){r=r.setIn(["content",t,"setting","heightMode"],"auto")})),r}return t},t.prototype.transformLayoutItem=function(t,e,o,n,r,i){return{index:e,item:t}},t}();e.FlowLayoutTransformer=r},29:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0),r=o(2);e.mapStateToFlowItemProps=function(t,e){var o,i,a,s,u=!0,l=!1,d=e.layoutItem,c=d.widgetId,p=t.appConfig.widgets[c],f=r.styleUtils.expandStyleArray(null===(a=null===(i=null===(o=p.config)||void 0===o?void 0:o.style)||void 0===i?void 0:i.padding)||void 0===a?void 0:a.number),h=n.utils.findLayoutId(p.layouts[n.DEFAULT_EMBED_LAYOUT_NAME],t.browserSizeMode,t.appConfig.mainSizeMode),y=t.appConfig.layouts[h];y&&Object.keys(y.content||[]).length>0&&Object.keys(y.content||[]).some((function(t){if(!y.content[t].isPending)return u=!1,!0}));var g=null===(s=t.appRuntimeInfo)||void 0===s?void 0:s.selection;return g&&(l=g.layoutId===e.layoutId&&g.layoutItemId===d.id),{isEmpty:u,selected:l,padding:f[0]+f[2]}}},31:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(1),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this.props.layout;if(!t)return null;var e=s.findLayoutViewer(t.type||a.LayoutType.FlowLayout);return e?a.React.createElement(e,i({},this.props)):null},e}(a.React.PureComponent);e.default=a.ReactRedux.connect(s.mapStateToLayoutProps)(u)},4:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0),r=o(5);function i(t,e){var o,r,i,s=n.getAppStore().getState(),u=null===(i=null===(r=null===(o=s)||void 0===o?void 0:o.appConfig)||void 0===r?void 0:r.layouts)||void 0===i?void 0:i[t];if(!u)return null;var l={layoutId:t,depth:e>=0?e+1:0,children:[]};return Object.keys(u.content||{}).sort().forEach((function(t){var e,o,r,i,d,c,p,f,h=u.content[t];if(h.type===n.LayoutItemType.Widget){var y=null===(i=null===(r=null===(o=null===(e=s)||void 0===e?void 0:e.appConfig)||void 0===o?void 0:o.widgets)||void 0===r?void 0:r[h.widgetId])||void 0===i?void 0:i.layouts;y&&Object.keys(y).sort().forEach((function(e){var o=y[e];a(l,o,t)}))}else if(h.type===n.LayoutItemType.Section){var g=null===(f=null===(p=null===(c=null===(d=s)||void 0===d?void 0:d.appConfig)||void 0===c?void 0:c.sections)||void 0===p?void 0:p[h.sectionId])||void 0===f?void 0:f.views;g&&[].concat(g).sort().forEach((function(e){var o,n,r,i,u=null===(i=null===(r=null===(n=null===(o=s)||void 0===o?void 0:o.appConfig)||void 0===n?void 0:n.views)||void 0===r?void 0:r[e])||void 0===i?void 0:i.layout;a(l,u,t)}))}})),l}function a(t,e,o){Object.keys(e||{}).sort().forEach((function(n){var r=i(e[n],t.depth);r&&(r.parentNode=t,r.itemIdInParent=o,t.children.push(r))}))}e.removeItemFromParent=function(t,e,o){var r=t.layoutId,i=t.layoutItemId;if(!o[r])return o;if(!o[r].content[i])return o;var a=o[r],s=n.Immutable(o);if(a.order&&a.order.indexOf(i)>=0){var u=[];a.order.forEach((function(t){t!==i&&u.push(t)})),s=s.setIn([r,"order"],u)}return e&&(s=s.setIn([r,"content"],s[r].content.without(i))),s},e.createEmptyLayoutItem=function(t,e){var o=r.getMaximumId(e[t])+1,i=n.Immutable(e),a={id:""+o};return i=i.setIn([t,"content",a.id],a),{layoutInfo:{layoutId:t,layoutItemId:a.id},layouts:i}},e.findLayoutItem=function(t,e){var o,n,r;if(!e)return null;var i=e.layoutId,a=e.layoutItemId;return null===(r=null===(n=null===(o=t.layouts)||void 0===o?void 0:o[i])||void 0===n?void 0:n.content)||void 0===r?void 0:r[a]},e.getMaximumLayoutItemId=function(t){return r.getMaximumId(t)},e.findLowestCommonAncestor=function(t,e){if(!t.parentNode){for(var o=e;o&&o.parentNode.layoutId!==t.layoutId;)o=o.parentNode;return{ancestor:t,itemIdForNode1:null,itemIdForNode2:o.itemIdInParent}}if(!e.parentNode){for(o=t;o&&o.parentNode.layoutId!==e.layoutId;)o=o.parentNode;return{ancestor:e,itemIdForNode1:o.itemIdInParent,itemIdForNode2:null}}if(t.parentNode.layoutId===e.layoutId)return{ancestor:e,itemIdForNode1:t.itemIdInParent,itemIdForNode2:null};if(t.layoutId===e.parentNode.layoutId)return{ancestor:t,itemIdForNode1:null,itemIdForNode2:e.itemIdInParent};for(var n=t.depth>=e.depth,r=n?t:e,i=n?e:t;r.depth>i.depth;)r=r.parentNode;for(;i.parentNode;){if(i.parentNode.layoutId===r.parentNode.layoutId)return{ancestor:i.parentNode,itemIdForNode1:n?r.itemIdInParent:i.itemIdInParent,itemIdForNode2:n?i.itemIdInParent:r.itemIdInParent};i=i.parentNode,r=r.parentNode}return null},e.findNodeInLayoutTree=function(t,e){for(var o=[t];o.length>0;){var n=o.pop();if(n.layoutId===e)return n;n.children.length>0&&(o=o.concat(n.children))}return null},e.findLowestAncestor=function(t,e){for(var o=t;o.parentNode&&o.parentNode.parentNode;){if(o.parentNode.layoutId===e)return o;o=o.parentNode}return o},e.generateLayoutTree=i},44:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(1),u=o(2),l=o(107),d=o(16),c=o(7),p=function(t){function e(e){var o,n=t.call(this,e)||this;if(!n.props.layout)return n;var r=a.ExtensionManager.getInstance().getExtensions(""+a.extensionSpec.ExtensionPoints.LayoutTransformer);if(r&&r.length>0){var i=r.find((function(t){return t.layoutType===n.props.layout.type}));n.layoutTransform=null===(o=i)||void 0===o?void 0:o.transformLayout}return n}return r(e,t),e.prototype.render=function(){var t=this,e=this.props,o=e.layout,n=e.layouts,r=e.ignoreMinHeight,d=e.minHeight,p=e.className,f=e.style;return o?a.React.createElement(s.PageContext.Consumer,null,(function(e){t.browserSizeMode=e.browserSizeMode;var s,h=o,y=!1;n[t.browserSizeMode]!==o.id&&t.layoutTransform&&(Object.keys(n).some((function(t){if(n[t]===o.id)return s=t,!0})),h=t.layoutTransform(o,s,t.browserSizeMode),y=!0);var g=a.lodash.assign({},c.DEFAULT_FIX_LAYOUT_SETTING,h.setting),v=h.order||[],m=a.classNames("fixed-layout d-flex",p);return a.React.createElement("div",{className:m,style:i(i(i({position:"relative",height:"auto",minHeight:r?"none":d},f),u.styleUtils.toCSSStyle(g.style)),{width:"100%",overflow:"hidden"}),"data-layoutid":h.id},v.map((function(t,e){return a.React.createElement(l.default,{key:t,index:e,layoutId:h.id,layoutItemId:t,layoutItem:o.content[t],transformedBBox:y?h.content[t].bbox:null})})))})):null},e}(a.React.PureComponent);e.default=a.ReactRedux.connect(d.mapStateToFixedLayoutProps)(p)},45:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},a=this&&this.__assign||function(){return(a=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s,u,l=o(0),d=o(2),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.loadWidgetClass=function(){var t=this.props,e=t.widgetId,o=t.isClassLoaded;e&&!o&&l.WidgetManager.getInstance().loadWidgetClass(e)},e.prototype.componentDidMount=function(){this.loadWidgetClass()},e.prototype.componentDidUpdate=function(){this.loadWidgetClass()},e.prototype.renderWidgetContent=function(){var t,e=this.props,o=e.forceAspectRatio,n=e.aspectRatio,r=e.widgetId,i=e.layoutId,a=e.layoutItemId;return r&&(t=l.WidgetManager.getInstance().getWidgetClass(r)),l.jsx("div",{className:l.classNames("w-100 d-flex widget-wrapper",{"aspect-ratio-wrapper":o&&n>0})},l.jsx("div",{className:"w-100 widget-content"},t&&l.jsx(l.ErrorBoundary,null,l.jsx(t,{layoutId:i,layoutItemId:a})),!t&&l.jsx(d.Loading,null)))},e.prototype.getStyle=function(){var t=l.css(s||(s=i(["\n      -webkit-overflow-scrolling: touch;\n    "],["\n      -webkit-overflow-scrolling: touch;\n    "])));return l.css(u||(u=i(["\n      ",";\n      overflow: ",";\n      position: relative;\n\n      .widget-wrapper {\n        position: relative;\n        z-index: 0;\n      }\n\n      & > div.aspect-ratio-wrapper {\n        width: 100%;\n        padding-top: ","%;\n\n        & > div.widget-content {\n          position: absolute !important;\n          top: 0;\n          left: 0;\n          bottom: 0;\n          right: 0;\n        }\n      }\n    "],["\n      ",";\n      overflow: ",";\n      position: relative;\n\n      .widget-wrapper {\n        position: relative;\n        z-index: 0;\n      }\n\n      & > div.aspect-ratio-wrapper {\n        width: 100%;\n        padding-top: ","%;\n\n        & > div.widget-content {\n          position: absolute !important;\n          top: 0;\n          left: 0;\n          bottom: 0;\n          right: 0;\n        }\n      }\n    "])),"app-loader"===this.props.widgetId?t:"",this.props.canCrossLayoutBoundary?"visible":"hidden",100*(this.props.aspectRatio||0))},e.prototype.render=function(){var t=this.props,e=t.style,o=t.className,n=t.widgetStyle,r=t.widgetId;return l.jsx("div",{className:l.classNames("widget-renderer w-100 d-flex",o),css:this.getStyle(),style:a(a({},e),d.styleUtils.toCSSStyle(n)),"data-widgetid":r},this.renderWidgetContent(),this.props.children)},e}(l.React.PureComponent);e.WidgetRenderer=c},46:function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var a=o(0),s=o(31),u=o(26),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){return a.React.createElement(u.SectionRendererBase,i({},this.props,{layoutEntryComponent:s.default}))},e}(a.React.PureComponent);e.SectionRenderer=l},5:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0);function r(t){return"string"==typeof t&&t.length>1&&"%"===t[t.length-1]&&i(+t.slice(0,t.length-1))}function i(t){return!isNaN(parseFloat(t))&&isFinite(t)}function a(t,e){return parseFloat(""+t)*e/100}function s(t,e,o,n){if(null==e[t]||"auto"===e[t])return e;return r(e[t])?"left"===t||"right"===t||"width"===t?r(o)?e.set(t,o):e.set(t,(100*+o/n.width).toFixed(4)+"%"):r(o)?e.set(t,o):e.set(t,(100*+o/n.height).toFixed(4)+"%"):r(o)?"left"===t||"right"===t||"width"===t?e.set(t,Math.round(parseFloat(""+o)*n.width/100)):e.set(t,Math.round(parseFloat(""+o)*n.height/100)):isNaN(+o)?e.without(t):e.set(t,Math.round(+o)+"px")}function u(t,e){var o,n=t.widgets||{};return Object.keys(n).some((function(n){var r=t.widgets[n];return Object.keys(r.layouts||[]).some((function(t){var i=r.layouts[t];return Object.keys(i).some((function(t){if(i[t]===e)return o=n,!0}))}))})),o}function l(t,e){var o,r,i,a,s,u,l;return null!=(l=null===(u=null===(s=null===(a=null===(i=null===(r=null===(o=e||n.getAppStore().getState())||void 0===o?void 0:o.appConfig)||void 0===r?void 0:r.widgets)||void 0===i?void 0:i[t])||void 0===a?void 0:a.manifest)||void 0===s?void 0:s.properties)||void 0===u?void 0:u.hasEmbeddedLayout)&&l}function d(t,e){var o,r,i,a,s;return(null===(s=null===(a=null===(i=null===(r=null===(o=e||n.getAppStore().getState())||void 0===o?void 0:o.appConfig)||void 0===r?void 0:r.widgets)||void 0===i?void 0:i[t])||void 0===a?void 0:a.manifest)||void 0===s?void 0:s.widgetType)!==n.WidgetType.Layout}function c(t,e,o){var n,i,s,u,l,d,c=t.widgets[o];if(c){var p=(null===(s=null===(i=null===(n=c.config)||void 0===n?void 0:n.style)||void 0===i?void 0:i.padding)||void 0===s?void 0:s.number)||[0],f=(d=p)&&0!==d.length?1===d.length?[d[0],d[0],d[0],d[0]]:2===d.length?[d[0],d[1],d[0],d[1]]:3===d.length?[d[0],d[1],d[2],0]:[d[0],d[1],d[2],d[3]]:[0,0,0,0],h=(null===(l=null===(u=e)||void 0===u?void 0:u[o])||void 0===l?void 0:l.height)||0,y=f[0],g=f[2];return r(y)&&(y=a(y,h)),r(g)&&(g=a(g,h)),h-y-g}return 0}function p(t,e){var o,n,i,s,u,l=null!=(o=e.setting)?o:{};if(l.autoHeight||(null===(n=l.autoProps)||void 0===n?void 0:n.height))return{setting:{autoHeight:!0,autoProps:{height:!0}}};if("ratio"===l.heightMode)u={setting:{heightMode:"ratio",aspectRatio:l.aspectRatio,autoHeight:!1,autoProps:{height:!1}}};else{var d=null!=(s=null===(i=e.bbox)||void 0===i?void 0:i.height)?s:t;r(d)&&(d=a(d,t)),u={height:d,setting:{heightMode:"fixed",autoHeight:!1,autoProps:{height:!1}}}}return u}e.emptyFunc=function(){},e.autoBindHandlers=function(t,e){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))},e.toPixelUnit=function(t){if(i(t))return t;if("string"==typeof t){var e=parseFloat(t)/100;if(/\d+vh$/.test(t))return e*(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);if(/\d+vw$/.test(t))return e*(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)}return 0},e.getSectionInfo=function(t,e){var o=t.appConfig.sections[e];if(!o||!o.views)return null;var n=t.appRuntimeInfo.currentViewIds&&t.appRuntimeInfo.currentViewIds.find((function(t){return o.views.indexOf(t)>-1}))||o.views[0];return{sectionId:e,views:o.views,activeView:t.appConfig.views[n],sectionStyle:o.style}},e.getSizemodeLayoutOfView=function(t){var e,o,r;return null===(r=null===(o=null===(e=n.getAppStore().getState().appConfig)||void 0===e?void 0:e.views)||void 0===o?void 0:o[t])||void 0===r?void 0:r.layout},e.getMaximumId=function(t){var e=-1;return t.content&&Object.keys(t.content).forEach((function(t){var o=parseInt(t,10);o>e&&(e=o)})),e},e.isPercentage=r,e.isNumber=i,e.toRatio=function(t,e){return(100*t/e).toFixed(4)+"%"},e.fromRatio=a,e.mapStateToLayoutProps=function(t,e){var o=n.utils.findLayoutId(e.layouts,t.browserSizeMode,t.appConfig.mainSizeMode),r=t.appConfig.layouts;return r[o]?{layout:r[o]}:{layout:null}},e.mapStateToLayoutItemProps=function(t,e){var o,n=e.layoutId,r=t.appConfig.layouts;if(!r[n])return{layoutItem:null,selected:!1};var i,a=!1,s=r[n],u=e.layoutItemId,l=s.content[u],d=!1;l&&(d=Boolean(l.isPending));var c=null===(o=t.appRuntimeInfo)||void 0===o?void 0:o.selection;c&&(a=c.layoutId===e.layoutId&&c.layoutItemId===l.id,i=c.autoScroll);var p={selected:a,layoutItem:d?null:l};return a&&(p.autoScroll=i),p},e.getActiveLayout=function(t){var e,o;t||(t=n.getAppStore().getState().appStateInBuilder),e=t.appRuntimeInfo,o=t.appConfig;var r=e.activeLayout,i=e.currentDialogId,a=e.currentPageId;if(r)return r;var s=void 0;if(a)if(o.pages[a])s=o.pages[a].layout;else{var u=Object.keys(o.pages);s=o.pages[u[0]].layout}else s=i?o.dialogs[i].layout:o.pages.default.layout;return s},e.mapStateToWidgetProps=function(t,e){var o,n,r,i,a,s,u,c,p,f,h,y=e.layoutId,g=t.appConfig.layouts;if(!g[y])return null;var v,m,w=g[y],b=e.layoutItemId,_=w.content[b],I=!1,x=!1,P=!1,O=!1,j=!1,S=!1,N=!1,T=!1;if(_&&_.widgetId){var R=t.appConfig.widgets[_.widgetId];v=R.style,I=!0===(null===(n=null===(o=R.manifest)||void 0===o?void 0:o.properties)||void 0===n?void 0:n.supportInlineEditing),O=!0===(null===(i=null===(r=R.manifest)||void 0===r?void 0:r.properties)||void 0===i?void 0:i.supportRepeat),N=!0===(null===(s=null===(a=R.manifest)||void 0===a?void 0:a.properties)||void 0===s?void 0:s.canCrossLayoutBoundary);var C=t.widgetsRuntimeInfo[_.widgetId];x=null!=(c=null===(u=C)||void 0===u?void 0:u.isClassLoaded)&&c,P=I&&(null===(p=C)||void 0===p?void 0:p.isInlineEditing),(T=(null===(h=null===(f=R.manifest)||void 0===f?void 0:f.extensions)||void 0===h?void 0:h.length)>0)&&(m=R),j=d(_.widgetId,t),S=l(_.widgetId,t)}return{hasEmbeddedLayout:S,supportInlineEditing:I,supportRepeat:O,isClassLoaded:x,isInlineEditing:P,widgetStyle:v,canCrossLayoutBoundary:N,hasExtension:T,widgetJson:m,widgetId:_.widgetId,isFunctionalWidget:j}},e.snapToGridSize=function(t,e){return Math.round(t/e)*e},e.removePositionRelatedStyle=function(t){return["height","width","order","flexGrow","flexShrink","alignSelf"].forEach((function(e){t[e]&&delete t[e]})),t},e.replaceBoundingBox=function(t,e,o){if(!t)return n.Immutable({left:r(e.left)?e.left:Math.round(e.left)+"px",top:r(e.top)?e.top:Math.round(e.top)+"px",width:r(e.width)?e.width:Math.round(e.width)+"px",height:r(e.height)?e.height:Math.round(e.height)+"px"});var i=t;return["left","right","top","bottom","width","height"].forEach((function(t){null!=i[t]?i=s(t,i,e[t],o):null!=e[t]&&(i=i.set(t,e[t]))})),i},e.updateBoundingBoxProp=s,e.relativeClientRect=function(t,e){return{left:t.left-e.left,top:t.top-e.top,right:t.right,bottom:t.bottom,width:t.width,height:t.height,id:null}},e.findContainerWidgetId=u,e.getBuilderThemeVariables=function(){var t=window.parent;if(t&&t.jimuConfig&&t.jimuConfig.isBuilder)return t._appState.theme},e.parseTranslateCoords=function(t){var e=0,o=0;if(t&&0===t.indexOf("translate(")){var n=t.substring("translate(".length).split(",");n.length>1&&(e=parseFloat(n[0]),o=parseFloat(n[1]))}return{x:e,y:o}},e.isWidgetHasEmbeddedLayout=l,e.isFunctionalWidget=d,e.isRTL=function(){var t,e;return null!=(e=null===(t=n.getAppStore().getState().appContext)||void 0===t?void 0:t.isRTL)&&e},e.parseAspectRatio=function(t){var e=100,o=100;if("number"==typeof t)e=100,o=Math.round(100*t);else if("string"==typeof t){var n=t.split(":");e=parseInt(n[0],10),o=parseInt(n[1],10)}return o/e},e.getWidgetHeight=c,e.getHeightOfLayoutItems=function(t,e,o){var n=u(t,o),r=c(t,e,n);if(r>0){var i=t.layouts[o].order||[],a={};return i.forEach((function(e){var n=t.layouts[o].content[e];a[e]=p(r,n)})),a}return null},e.calRowItemHeight=p},7:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0),r=o(22);e.DEFAULT_FIX_LAYOUT_SETTING=n.lodash.assign({},{gridSize:1}),e.DEFAULT_FIX_LAYOUT_ITEM_SETTING=n.lodash.assign({},r.DEFAULT_LAYOUT_ITEM_SETTING,{lockParent:!1,lockLayout:!1,autoProps:{}})},8:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(0);!function(t){t.Horizontal="H",t.Vertical="V"}(e.Direction||(e.Direction={})),e.DEFAULT_GRID_SETTING={showSplitter:!0,splitterSize:5,splitterColor:"#000"},e.GridContext=n.React.createContext(e.DEFAULT_GRID_SETTING)}})}));