pandorafms/pandora_console/include/visual-console-client/vc.main.min.js

2 lines
119 KiB
JavaScript

(function(){"use strict";var __webpack_modules__={630:function(t,e,n){n.r(e),n.d(e,{FormContainer:function(){return a},InputGroup:function(){return s}});var r=n(510),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},o=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=function(){function t(t,e){this._name="",this.currentData={},this.dataRequestedEventManager=new r.Z,this.name=t,this.initialData=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){if(0===t.length)throw new RangeError("empty name");this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return i({},this.currentData)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){if(null==this._element){var t=document.createElement("div");t.className="input-group input-group-".concat(this.name);var e=this.createContent();e instanceof Array?e.forEach(t.appendChild):t.appendChild(e),this._element=t}return this._element},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.currentData={}},t.prototype.updateData=function(t){this.currentData=i(i({},this.currentData),t)},t.prototype.requestData=function(t,e,n){this.dataRequestedEventManager.emit({identifier:t,params:e,done:n})},t.prototype.onDataRequested=function(t){return this.dataRequestedEventManager.on(t)},t}(),a=function(){function t(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=[]);var i=this;this.inputGroupsByName={},this.enabledInputGroupNames=[],this.submitEventManager=new r.Z,this.itemDataRequestedEventManager=new r.Z,this.handleItemDataRequested=this.itemDataRequestedEventManager.emit,this.title=t,e.length>0&&(this.inputGroupsByName=e.reduce((function(t,e){return e.onDataRequested(i.handleItemDataRequested),t[e.name]=e,t}),this.inputGroupsByName)),n.length>0&&(this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),n.filter((function(t){return null!=i.inputGroupsByName[t]})),!0))}return t.prototype.getInputGroup=function(t){return this.inputGroupsByName[t]||null},t.prototype.addInputGroup=function(t,e){return void 0===e&&(e=null),t.onDataRequested(this.handleItemDataRequested),this.inputGroupsByName[t.name]=t,this.enabledInputGroupNames=this.enabledInputGroupNames.filter((function(e){return e!==t.name})),null!==e?e<=0?this.enabledInputGroupNames=o([t.name],this.enabledInputGroupNames,!0):e>=this.enabledInputGroupNames.length?this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),[t.name],!1):this.enabledInputGroupNames=o(o(o([],this.enabledInputGroupNames.slice(0,e),!0),[t.name],!1),this.enabledInputGroupNames.slice(e),!0):this.enabledInputGroupNames=o(o([],this.enabledInputGroupNames,!0),[t.name],!1),this},t.prototype.removeInputGroup=function(t){return delete this.inputGroupsByName[t],this.enabledInputGroupNames=this.enabledInputGroupNames.filter((function(e){return e!==t})),this},t.prototype.getFormElement=function(t){var e=this;void 0===t&&(t="update");var n=document.createElement("form");n.id="visual-console-item-edition",n.className="visual-console-item-edition",n.addEventListener("submit",(function(t){t.preventDefault(),e.submitEventManager.emit({nativeEvent:t,data:e.enabledInputGroupNames.reduce((function(t,n){return e.inputGroupsByName[n]&&(t=i(i({},t),e.inputGroupsByName[n].data)),t}),{})})}));var r=document.createElement("div");return r.className="input-groups",this.enabledInputGroupNames.forEach((function(t){e.inputGroupsByName[t]&&r.appendChild(e.inputGroupsByName[t].element)})),n.appendChild(r),n},t.prototype.reset=function(){var t=this;this.enabledInputGroupNames.forEach((function(e){t.inputGroupsByName[e]&&t.inputGroupsByName[e].reset()}))},t.prototype.onSubmit=function(t){return this.submitEventManager.on(t)},t.prototype.onInputGroupDataRequested=function(t){return this.itemDataRequestedEventManager.on(t)},t}()},478:function(t,e,n){n.d(e,{TB:function(){return l}});var r=n(541),i=n(510),o=n(630),s=function(){return s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)},a=function(t){switch(t){case"up":case"right":case"down":case"left":return t;default:return"down"}};function l(t){if(null==t.id||isNaN(parseInt(t.id)))throw new TypeError("invalid id.");if(null==t.type||isNaN(parseInt(t.type)))throw new TypeError("invalid type.");return s(s({id:parseInt(t.id),type:parseInt(t.type),label:(0,r.JW)(t.label,null),labelPosition:a(t.labelPosition),isLinkEnabled:(0,r.gx)(t.isLinkEnabled),link:(0,r.JW)(t.link,null),isOnTop:(0,r.gx)(t.isOnTop),parentId:(0,r.I1)(t.parentId,null),aclGroupId:(0,r.I1)(t.aclGroupId,null),cacheExpiration:(0,r.I1)(t.cacheExpiration,null),colorStatus:(0,r.JW)(t.colorStatus,"#CCC"),cellId:(0,r.I1)(t.cellId,null),alertOutline:(0,r.gx)(t.alertOutline)},(0,r.HY)(t)),(0,r.oF)(t))}var c=function(){function t(t,e,n){void 0===n&&(n=!1);var o=this;this.elementRef=document.createElement("div"),this.labelElementRef=document.createElement("div"),this.childElementRef=document.createElement("div"),this.clickEventManager=new i.Z,this.dblClickEventManager=new i.Z,this.movedEventManager=new i.Z,this.movementFinishedEventManager=new i.Z,this.resizedEventManager=new i.Z,this.resizeFinishedEventManager=new i.Z,this.removeEventManager=new i.Z,this.selectionChangedEventManager=new i.Z,this.disposables=[],this.debouncedMovementSave=(0,r.Ds)(500,(function(t,e){o._metadata.isBeingMoved=!1;var n={x:o.props.x,y:o.props.y},r={x:t,y:e};o.positionChanged(n,r)&&(o.move(t,e),o.movementFinishedEventManager.emit({item:o,prevPosition:n,newPosition:r}))})),this.removeMovement=null,this.debouncedResizementSave=(0,r.Ds)(500,(function(t,e){o._metadata.isBeingResized=!1;var n={width:o.props.width,height:o.props.height},r={width:t,height:e};o.sizeChanged(n,r)&&(o.resize(t,e),o.resizeFinishedEventManager.emit({item:o,prevSize:n,newSize:r}))})),this.removeResizement=null,this.itemProps=t,this._metadata=e,n||this.init()}return t.prototype.initMovementListener=function(t){var e=this;13!=this.props.type&&21!=this.props.type&&(this.removeMovement=(0,r.Dw)(t,(function(t,n){var r={x:e.props.x,y:e.props.y},i={x:t,y:n};e.meta=s(s({},e.meta),{isSelected:!0}),e.positionChanged(r,i)&&(e._metadata.isBeingMoved=!0,e.moveElement(t,n),e.movedEventManager.emit({item:e,prevPosition:r,newPosition:i}),e.debouncedMovementSave(t,n))})))},t.prototype.stopMovementListener=function(){this.removeMovement&&(this.removeMovement(),this.removeMovement=null)},t.prototype.initResizementListener=function(t){var e=this;13!=this.props.type&&21!=this.props.type&&(this.removeResizement=(0,r.Aq)(t,(function(t,n){if(e._metadata.isBeingResized=!0,e.props.label&&e.props.label.length>0){var r=e.labelElementRef.getBoundingClientRect(),i=r.width,o=r.height;switch(e.props.labelPosition){case"up":case"down":n-=o;break;case"left":case"right":t-=i}}var s={width:e.props.width,height:e.props.height},a={width:t,height:n};e.sizeChanged(s,a)&&(e.resizeElement(t,n),e.resizedEventManager.emit({item:e,prevSize:s,newSize:a}),e.debouncedResizementSave(t,n))})))},t.prototype.stopResizementListener=function(){this.removeResizement&&(this.removeResizement(),this.removeResizement=null)},t.prototype.init=function(){this.elementRef=this.createContainerDomElement(),this.labelElementRef=this.createLabelDomElement(),this.childElementRef=this.createDomElement(),this.elementRef.appendChild(this.childElementRef),this.elementRef.appendChild(this.labelElementRef),this.resizeElement(this.itemProps.width,this.itemProps.height),this.changeLabelPosition(this.itemProps.labelPosition)},t.prototype.createContainerDomElement=function(){var t,e=this;return this.props.isLinkEnabled?(t=document.createElement("a"),this.props.link?t.href=this.props.link:t.className="textDecorationNone"):(t=document.createElement("div")).className="textDecorationNone",t.classList.add("visual-console-item"),this.props.isOnTop&&t.classList.add("is-on-top"),t.style.left="".concat(this.props.x,"px"),t.style.top="".concat(this.props.y,"px"),this.props.alertOutline&&t.classList.add("is-alert-triggered"),t.addEventListener("dblclick",(function(t){e.meta.isBeingMoved||e.meta.isBeingResized||(e.unSelectItem(),e.selectItem(),e.dblClickEventManager.emit({item:e,nativeEvent:t}))})),t.addEventListener("click",(function(t){if(e.meta.editMode)t.preventDefault(),t.stopPropagation();else if(e.itemProps.isLinkEnabled&&null!=e.itemProps.link){var n=document.createElement("div");n.className="div-visual-console-spinner";var r=document.createElement("div");r.className="visual-console-spinner",n.appendChild(r);for(var i=t.composedPath(),o="visual-console-container",s=0;s<i.length;s++){var a=i[s];if(null!=a.id&&null!=a.id&&""!=a.id&&!0===a.id.includes(o)){o=a.id;break}}var l=document.getElementById(o);null!=l&&(l.classList.add("is-updating"),l.appendChild(n))}e.meta.isBeingMoved||e.meta.isBeingResized||e.clickEventManager.emit({item:e,nativeEvent:t})})),this.meta.maintenanceMode&&t.classList.add("is-maintenance"),this.meta.editMode&&t.classList.add("is-editing"),this.meta.isFetching&&t.classList.add("is-fetching"),this.meta.isUpdating&&t.classList.add("is-updating"),this.meta.isSelected&&t.classList.add("is-selected"),t},t.prototype.createLabelDomElement=function(){var t=document.createElement("div");t.className="visual-console-item-label";var e=this.getLabelWithMacrosReplaced();if(e.length>0){var n=document.createElement("table"),r=document.createElement("tr"),i=document.createElement("tr"),o=document.createElement("tr"),s=document.createElement("td");switch(s.innerHTML=e,r.appendChild(s),n.appendChild(i),n.appendChild(r),n.appendChild(o),n.style.textAlign="center",this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width="".concat(this.props.width,"px"),n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height="".concat(this.props.height,"px"))}t.appendChild(n)}return t},t.prototype.getLabelWithMacrosReplaced=function(){var t=this.props;return(0,r.No)([{macro:"_date_",value:(0,r.rN)(new Date)},{macro:"_time_",value:(0,r.bc)(new Date)},{macro:"_agent_",value:null!=t.agentAlias?t.agentAlias:""},{macro:"_agentdescription_",value:null!=t.agentDescription?t.agentDescription:""},{macro:"_address_",value:null!=t.agentAddress?t.agentAddress:""},{macro:"_module_",value:null!=t.moduleName?t.moduleName:""},{macro:"_moduledescription_",value:null!=t.moduleDescription?t.moduleDescription:""}],this.props.label||"")},t.prototype.updateDomElement=function(t){t.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(t.prototype,"props",{get:function(){return s({},this.itemProps)},set:function(t){this.setProps(t)},enumerable:!1,configurable:!0}),t.prototype.setProps=function(t){var e=this.props;this.itemProps=t,this.shouldBeUpdated(e,t)&&this.render(e,this._metadata)},Object.defineProperty(t.prototype,"meta",{get:function(){return s({},this._metadata)},set:function(t){this.setMeta(t)},enumerable:!1,configurable:!0}),t.prototype.setMeta=function(t){var e=this._metadata;this._metadata=s(s({},e),t),void 0!==t.isSelected&&e.isSelected!==t.isSelected&&this.selectionChangedEventManager.emit({selected:t.isSelected}),this.render(this.itemProps,e)},t.prototype.shouldBeUpdated=function(t,e){return t!==e},t.prototype.render=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),!t||13!=t.type&&21!=t.type||this.updateDomElement(this.childElementRef),t&&!this.positionChanged(t,this.props)||(this.moveElement(this.props.x,this.props.y),t&&13!=t.type&&21!=t.type&&this.updateDomElement(this.childElementRef)),t&&!this.sizeChanged(t,this.props)||(this.resizeElement(this.props.width,this.props.height),t&&13!=t.type&&21!=t.type&&this.updateDomElement(this.childElementRef));var n=this.labelElementRef.innerHTML,r=this.createLabelDomElement().innerHTML;if(n!==r&&(this.labelElementRef.innerHTML=r),t&&t.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition),t&&t.isOnTop===this.props.isOnTop||(this.props.isOnTop?this.elementRef.classList.add("is-on-top"):this.elementRef.classList.remove("is-on-top")),t&&t.isLinkEnabled!==this.props.isLinkEnabled){var i=this.createContainerDomElement();i.innerHTML=this.elementRef.innerHTML;for(var o=this.elementRef.attributes,s=0;s<o.length;s++)if("id"!==o[s].nodeName){var a=this.elementRef.getAttributeNode(o[s].nodeName);null!==a&&i.setAttributeNode(a.cloneNode())}null!==this.elementRef.parentNode&&this.elementRef.parentNode.replaceChild(i,this.elementRef),this.elementRef=i}if(t&&this.props.isLinkEnabled&&t.link!==this.props.link&&null!==this.props.link&&this.elementRef.setAttribute("href",this.props.link),e&&e.editMode===this.meta.editMode&&e.maintenanceMode===this.meta.maintenanceMode||(this.meta.editMode&&!1===this.meta.maintenanceMode?(this.elementRef.classList.add("is-editing"),this.elementRef.classList.remove("is-alert-triggered")):(this.elementRef.classList.remove("is-editing"),this.props.alertOutline&&this.elementRef.classList.add("is-alert-triggered"))),e&&e.isFetching===this.meta.isFetching||(this.meta.isFetching?this.elementRef.classList.add("is-fetching"):this.elementRef.classList.remove("is-fetching")),!e||e.isUpdating!==this.meta.isUpdating){if(this.meta.isUpdating){this.elementRef.classList.add("is-updating");var l=document.createElement("div");l.className="div-visual-console-spinner";var c=document.createElement("div");c.className="visual-console-spinner",l.appendChild(c),this.elementRef.appendChild(l)}else{this.elementRef.classList.remove("is-updating");var p=this.elementRef.querySelector(".div-visual-console-spinner");if(null!==p){var u=p.parentElement;null!==u&&u.removeChild(p)}}this.updateDomElement(this.childElementRef)}e&&e.isSelected===this.meta.isSelected||(this.meta.isSelected?this.elementRef.classList.add("is-selected"):this.elementRef.classList.remove("is-selected"))},t.prototype.remove=function(){this.removeEventManager.emit({item:this}),this.disposables.forEach((function(t){try{t.dispose()}catch(t){}})),this.elementRef.remove()},t.prototype.positionChanged=function(t,e){return t.x!==e.x||t.y!==e.y},t.prototype.changeLabelPosition=function(t){switch(t){case"up":this.elementRef.style.flexDirection="column-reverse";break;case"left":this.elementRef.style.flexDirection="row-reverse";break;case"right":this.elementRef.style.flexDirection="row";break;default:this.elementRef.style.flexDirection="column"}var e=this.labelElementRef.getElementsByTagName("table"),n=e.length>0?e.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width="".concat(this.props.width,"px"),n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height="".concat(this.props.height,"px"))}},t.prototype.moveElement=function(t,e){this.elementRef.style.left="".concat(t,"px"),this.elementRef.style.top="".concat(e,"px")},t.prototype.move=function(t,e){this.moveElement(t,e),this.itemProps=s(s({},this.props),{x:t,y:e})},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){if(13!=this.props.type&&21!=this.props.type&&(this.childElementRef.style.width=t>0?"".concat(t,"px"):"",this.childElementRef.style.height=e>0?"".concat(e,"px"):""),this.props.label&&this.props.label.length>0){var n=this.labelElementRef.getElementsByTagName("table"),r=n.length>0?n.item(0):null;if(r)switch(this.props.labelPosition){case"up":case"down":r.style.width=t>0?"".concat(t,"px"):"";break;case"left":case"right":r.style.height=e>0?"".concat(e,"px"):""}}},t.prototype.resize=function(t,e){this.resizeElement(t,e),this.itemProps=s(s({},this.props),{width:t,height:e})},t.prototype.onClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onDblClick=function(t){var e=this.dblClickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onMovementFinished=function(t){var e=this.movementFinishedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onResizeFinished=function(t){var e=this.resizeFinishedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onRemove=function(t){var e=this.removeEventManager.on(t);return this.disposables.push(e),e},t.prototype.onSelectionChanged=function(t){var e=this.selectionChangedEventManager.on(t);return this.disposables.push(e),e},t.prototype.selectItem=function(){this.meta=s(s({},this.meta),{isSelected:!0}),this.initMovementListener(this.elementRef),13!==this.props.type&&21!==this.props.type&&this.initResizementListener(this.elementRef)},t.prototype.unSelectItem=function(){this.meta=s(s({},this.meta),{isSelected:!1}),this.stopMovementListener(),13!==this.props.type&&this.stopResizementListener()},t.prototype.getFormContainer=function(){return t.getFormContainer(this.props)},t.getFormContainer=function(t){var e=t.type?function(t){var e="";switch(t){case 0:e=(0,r.t)("Static image");break;case 1:e=(0,r.t)("Module graph");break;case 2:case 6:case 7:case 8:e=(0,r.t)("Simple value");break;case 3:case 9:case 15:case 16:e=(0,r.t)("Percentile item");break;case 4:e=(0,r.t)("Label");break;case 5:e=(0,r.t)("Icon");break;case 10:e=(0,r.t)("Service");break;case 11:e=(0,r.t)("Group");break;case 12:e=(0,r.t)("Box");break;case 13:e=(0,r.t)("Line");break;case 14:e=(0,r.t)("Event history graph");break;case 17:e=(0,r.t)("Serialized pie graph");break;case 18:e=(0,r.t)("Bars graph");break;case 19:e=(0,r.t)("Clock");break;case 20:e=(0,r.t)("Color cloud");break;case 21:e=(0,r.t)("Network link");break;case 22:e=(0,r.t)("Odometer");break;case 23:e=(0,r.t)("Basic chart");break;default:e=(0,r.t)("Item")}return e}(t.type):(0,r.t)("Item");return new o.FormContainer(e,[],[])},t}();e.ZP=c},709:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{K:function(){return barsGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},__assign.apply(this,arguments)},parseBarsGraphProps=function(t){switch(t){case"white":case"black":case"transparent":return t;default:return"transparent"}},parseTypeGraph=function(t){switch(t){case"horizontal":case"vertical":return t;default:return"vertical"}};function barsGraphPropsDecoder(t){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(t)),{type:18,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(t.encodedHtml):t.html,backgroundColor:parseBarsGraphProps(t.backgroundColor),typeGraph:parseTypeGraph(t.typeGraph),gridColor:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.gridColor)?"#000000":t.gridColor}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(t))}var BarsGraph=function(_super){function BarsGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BarsGraph,_super),BarsGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.innerHTML=this.props.html,element.className="bars-graph",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element},BarsGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},BarsGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=BarsGraph},880:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{u:function(){return basicChartPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},__assign.apply(this,arguments)};function basicChartPropsDecoder(t){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(t)),{type:23,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(t.encodedHtml):t.html,period:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(t.period,null),value:parseFloat(t.value),status:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.status)?"#B2B2B2":t.status,moduleNameColor:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.moduleNameColor)?"#3f3f3f":t.moduleNameColor}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(t)),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.bs)(t))}var BasicChart=function(_super){function BasicChart(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(BasicChart,_super),BasicChart.prototype.createDomElement=function(){var element=document.createElement("div"),header=document.createElement("div");header.className="basic-chart-header";var moduleName=document.createElement("h2");moduleName.className="basic-chart-header-name",moduleName.textContent=this.props.moduleName,moduleName.style.color="".concat(this.props.moduleNameColor),header.appendChild(moduleName);var value="";null!==this.props.value&&(value=this.number_format(this.props.value,!1,"",2,1e3));var moduleValue=document.createElement("h2");moduleValue.className="basic-chart-header-value",moduleValue.textContent="".concat(value),moduleValue.style.color=this.props.status,header.appendChild(moduleValue),element.innerHTML=this.props.html,element.className="basic-chart",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var legendP=element.getElementsByTagName("p"),i=0;i<legendP.length;i++)legendP[i].style.margin="0px";for(var overviewGraphs=element.getElementsByClassName("overview_graph"),i=0;i<overviewGraphs.length;i++)overviewGraphs[i].remove();for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element.innerHTML=this.props.html,element.insertBefore(header,element.firstChild),element},BasicChart.prototype.updateDomElement=function(element){var header=document.createElement("div");header.className="basic-chart-header";var moduleName=document.createElement("h2");moduleName.className="basic-chart-header-name",moduleName.textContent=this.props.moduleName,moduleName.style.color="".concat(this.props.moduleNameColor),header.appendChild(moduleName);var value="";null!==this.props.value&&(value=this.number_format(this.props.value,!1,"",2,1e3));var moduleValue=document.createElement("h2");moduleValue.className="basic-chart-header-value",moduleValue.textContent="".concat(value),moduleValue.style.color=this.props.status,header.appendChild(moduleValue),element.innerHTML=this.props.html,element.insertBefore(header,element.firstChild);for(var legendP=element.getElementsByTagName("p"),i=0;i<legendP.length;i++)legendP[i].style.margin="0px";for(var overviewGraphs=element.getElementsByClassName("overview_graph"),i=0;i<overviewGraphs.length;i++)overviewGraphs[i].remove();for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},BasicChart.prototype.number_format=function(t,e,n,r,i){if(i=void 0!==i?i:1e3,r||(r=99),e){if(Math.round(t)!=t)return""}else{r++;var o=this.pad("1",r,0);t=Math.round(t*Number.parseInt(o))/Number.parseInt(o)}for(var s=0;Math.abs(t)>=i;)s++,t/=i;return t=i?Math.round(2*t)/2:Math.round(2*t),isNaN(t)&&(t=0),t+" "+["","K","M","G","T","P","E","Z","Y"][s]+n},BasicChart.prototype.pad=function(t,e,n){var r=t+"";return e<=r.length?r:this.pad(r+n,e,n)},BasicChart}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=BasicChart},369:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{p:function(){return donutGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},__assign.apply(this,arguments)};function donutGraphPropsDecoder(t){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(t)),{type:17,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(t.encodedHtml):t.html,legendBackgroundColor:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.legendBackgroundColor)?"#ffffff":t.legendBackgroundColor}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(t)),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.bs)(t))}var DonutGraph=function(_super){function DonutGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(DonutGraph,_super),DonutGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.className="donut-graph",element.innerHTML=this.props.html,element.style.backgroundColor=this.props.legendBackgroundColor,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element},DonutGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html,element.style.backgroundColor=this.props.legendBackgroundColor,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},DonutGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=DonutGraph},280:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{o:function(){return eventsHistoryPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},__assign.apply(this,arguments)};function eventsHistoryPropsDecoder(t){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(t)),{type:14,maxTime:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(t.maxTime,null),legendColor:t.legendColor,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(t.encodedHtml):t.html}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(t))}var EventsHistory=function(_super){function EventsHistory(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(EventsHistory,_super),EventsHistory.prototype.createDomElement=function(){var element=document.createElement("div");element.className="events-history",element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);var flotText=element.getElementsByClassName("noresizevc");return flotText[0].style.color=this.props.legendColor,element},EventsHistory.prototype.updateDomElement=function(element){element.innerHTML=this.props.html;var aux=document.createElement("div");aux.innerHTML=this.props.html;for(var scripts=aux.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim());var flotText=element.getElementsByClassName("noresizevc");flotText[0].style.color=this.props.legendColor},EventsHistory}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=EventsHistory},600:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:function(){return moduleGraphPropsDecoder}});var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(541),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(478),__extends=(extendStatics=function(t,e){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},extendStatics(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}extendStatics(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),extendStatics,__assign=function(){return __assign=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},__assign.apply(this,arguments)},parseBackgroundType=function(t){switch(t){case"white":case"black":case"transparent":return t;default:return"transparent"}},parseGraphType=function(t){switch(t){case"line":case"area":return t;default:return"line"}};function moduleGraphPropsDecoder(t){if((0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)&&(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.encodedHtml))throw new TypeError("missing html content.");return __assign(__assign(__assign(__assign({},(0,_Item__WEBPACK_IMPORTED_MODULE_1__.TB)(t)),{type:1,html:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.VJ)(t.html)?(0,_lib__WEBPACK_IMPORTED_MODULE_0__.NV)(t.encodedHtml):t.html,backgroundType:parseBackgroundType(t.backgroundType),period:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(t.period,null),graphType:parseGraphType(t.graphType),customGraphId:(0,_lib__WEBPACK_IMPORTED_MODULE_0__.I1)(t.customGraphId,null)}),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.MH)(t)),(0,_lib__WEBPACK_IMPORTED_MODULE_0__.bs)(t))}var ModuleGraph=function(_super){function ModuleGraph(){return null!==_super&&_super.apply(this,arguments)||this}return __extends(ModuleGraph,_super),ModuleGraph.prototype.createDomElement=function(){var element=document.createElement("div");element.innerHTML=this.props.html,element.className="module-graph",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),_loop_1=function(i){0===scripts[i].src.length&&setTimeout((function(){try{eval(scripts[i].innerHTML.trim())}catch(t){}}),0)},i=0;i<scripts.length;i++)_loop_1(i);return element},ModuleGraph.prototype.updateDomElement=function(element){element.innerHTML=this.props.html,!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(element.style.opacity="0.2");for(var scripts=element.getElementsByTagName("script"),i=0;i<scripts.length;i++)0===scripts[i].src.length&&eval(scripts[i].innerHTML.trim())},ModuleGraph}(_Item__WEBPACK_IMPORTED_MODULE_1__.ZP);__webpack_exports__.Z=ModuleGraph},830:function(t,e){var n="http://www.w3.org/2000/svg";e.Z=function(t,e,r){var i=void 0===r?{}:r,o=i.size,s=i.color,a=i.spin,l=i.pulse,c=document.createElement("figure");c.title=e,c.className="fa fa-".concat(t.iconName),o&&c.classList.add("fa-".concat(o)),a?c.classList.add("fa-spin"):l&&c.classList.add("fa-pulse");var p=document.createElementNS(n,"svg");p.setAttribute("viewBox","0 0 ".concat(t.icon[0]," ").concat(t.icon[1])),s&&p.setAttribute("fill",s);var u=document.createElementNS(n,"path"),d="string"==typeof t.icon[4]?t.icon[4]:t.icon[4][0];return u.setAttribute("d",d),p.appendChild(u),c.appendChild(p),c}},510:function(t,e){e.Z=function(){var t=this;this.listeners=[],this.listenersOncer=[],this.on=function(e){return t.listeners.push(e),{dispose:function(){return t.off(e)}}},this.once=function(e){t.listenersOncer.push(e)},this.off=function(e){var n=t.listeners.indexOf(e);n>-1&&t.listeners.splice(n,1)},this.emit=function(e){t.listeners.forEach((function(t){return t(e)})),t.listenersOncer.forEach((function(t){return t(e)})),t.listenersOncer=[]},this.pipe=function(e){return t.on((function(t){return e.emit(t)}))}}},541:function(t,e,n){n.d(e,{Dw:function(){return M},Aq:function(){return C},Ds:function(){return E},NV:function(){return _},fk:function(){return x},rN:function(){return y},bc:function(){return v},SM:function(){return m},bs:function(){return h},MH:function(){return d},JW:function(){return a},gx:function(){return l},xn:function(){return o},I1:function(){return i},oF:function(){return p},OR:function(){return f},No:function(){return g},HY:function(){return u},VJ:function(){return s},t:function(){return k}});var r=function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function i(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!isNaN(parseInt(t))?parseInt(t):e}function o(t,e){return"number"==typeof t?t:"string"==typeof t&&t.length>0&&!isNaN(parseFloat(t))?parseFloat(t):e}function s(t){return null==t||0===t.length}function a(t,e){return"string"==typeof t&&t.length>0?t:e}function l(t){return"boolean"==typeof t?t:"number"==typeof t?t>0:"string"==typeof t&&("1"===t||"true"===t)}function c(t,e,n){void 0===n&&(n=" "),"number"==typeof t&&(t="".concat(t)),"number"==typeof n&&(n="".concat(n));var r=e-t.length;if(0===r)return t;if(r<0)return t.substr(Math.abs(r));if(r===n.length)return"".concat(n).concat(t);if(r<n.length)return"".concat(n.substring(0,r)).concat(t);for(var i=Math.floor(r/n.length),o=r-n.length*i,s="",a=0;a<i;a++)s+=n;return 0===o?"".concat(s).concat(t):"".concat(s).concat(n.substring(0,o)).concat(t)}function p(t){return{x:i(t.x,0),y:i(t.y,0)}}function u(t){if(null==t.width||isNaN(parseInt(t.width))||null==t.height||isNaN(parseInt(t.height)))throw new TypeError("invalid size.");return{width:parseInt(t.width),height:parseInt(t.height)}}function d(t){return r({moduleId:i(t.moduleId,null),moduleName:a(t.moduleName,null),moduleDescription:a(t.moduleDescription,null),moduleDisabled:l(t.moduleDisabled)},function(t){var e={agentId:i(t.agentId,null),agentName:a(t.agentName,null),agentAlias:a(t.agentAlias,null),agentDescription:a(t.agentDescription,null),agentAddress:a(t.agentAddress,null),agentDisabled:l(t.agentDisabled)};return null!=t.metaconsoleId?r({metaconsoleId:t.metaconsoleId},e):e}(t))}function h(t){var e={linkedLayoutStatusType:"default"};switch(t.linkedLayoutStatusType){case"weight":var n=i(t.linkedLayoutStatusTypeWeight,null);if(null==n)throw new TypeError("invalid status calculation properties.");t.linkedLayoutStatusTypeWeight&&(e={linkedLayoutStatusType:"weight",linkedLayoutStatusTypeWeight:n});break;case"service":var o=i(t.linkedLayoutStatusTypeWarningThreshold,null),s=i(t.linkedLayoutStatusTypeCriticalThreshold,null);if(null==o||null==s)throw new TypeError("invalid status calculation properties.");e={linkedLayoutStatusType:"service",linkedLayoutStatusTypeWarningThreshold:o,linkedLayoutStatusTypeCriticalThreshold:s}}return r({linkedLayoutId:i(t.linkedLayoutId,null),linkedLayoutNodeId:i(t.linkedLayoutNodeId,null)},e)}function m(t){var e,n=(null,(e=t.receivedAt)instanceof Date?e:"number"==typeof e?new Date(1e3*e):"string"!=typeof e||Number.isNaN(new Date(e).getTime())?null:new Date(e));if(null===n)throw new TypeError("invalid meta structure");var r=null;return t.error instanceof Error?r=t.error:"string"==typeof t.error&&(r=new Error(t.error)),{receivedAt:n,error:r,editMode:l(t.editMode),maintenanceMode:l(t.maintenanceMode),isFromCache:l(t.isFromCache),isFetching:!1,isUpdating:!1,isBeingMoved:!1,isBeingResized:!1,isSelected:!1,lineMode:!1}}function f(t,e){var n="".concat(t,": ").concat(e,";");return["-webkit-".concat(n),"-moz-".concat(n),"-ms-".concat(n),"-o-".concat(n),"".concat(n)]}function _(t){return decodeURIComponent(escape(window.atob(t)))}function y(t,e){if(void 0===e&&(e=null),e&&Intl&&Intl.DateTimeFormat)return Intl.DateTimeFormat(e,{day:"2-digit",month:"2-digit",year:"numeric"}).format(t);var n=c(t.getDate(),2,0),r=c(t.getMonth()+1,2,0),i=c(t.getFullYear(),4,0);return"".concat(n,"/").concat(r,"/").concat(i)}function v(t){var e=c(t.getHours(),2,0),n=c(t.getMinutes(),2,0),r=c(t.getSeconds(),2,0);return"".concat(e,":").concat(n,":").concat(r)}function g(t,e){return t.reduce((function(t,e){var n=e.macro,r=e.value;return t.replace(n,r)}),e)}function b(t,e){var n=0;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=Date.now();if(!(o-n<t))return n=o,e.apply(void 0,r)}}function E(t,e){var n=null;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];null!==n&&window.clearTimeout(n),n=window.setTimeout((function(){e.apply(void 0,r),n=null}),t)}}function w(t,e){for(var n=0,r=0;t&&!Number.isNaN(t.offsetLeft)&&!Number.isNaN(t.offsetTop)&&t!==e;)n+=t.offsetLeft-t.scrollLeft,r+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{top:r,left:n}}function M(t,e,n){var r=n||t.parentElement,i=t.draggable,o=0,s=0,a=0,l=0,c=0,p=0,u=r.getBoundingClientRect(),d=w(r),h=d.top,m=h+u.height,f=d.left,_=f+u.width,y=t.getBoundingClientRect(),v=window.getComputedStyle(t).borderWidth||"0",g=2*Number.parseInt(v),M=E(32,e),C=b(16,e),k=function(t){var e=0,n=0,r=t.pageX,i=t.pageY,d=r-a,v=i-l,b=u.width-y.width+g,E=u.height-y.height+g,w=r<f||0===o&&d>0&&r<f+c,k=r>_||d+o+y.width-g>u.width||o===b&&d<0&&r>f+b+c,x=i<h||0===s&&v>0&&i<h+p,P=i>m||v+s+y.height-g>u.height||s===E&&v<0&&i>h+E+p;(e=w?0:k?b:d+o)<0&&(e=0),(n=x?0:P?E:v+s)<0&&(n=0),a=r,l=i,e===o&&n===s||(C(e,n),M(e,n),o=e,s=n)},x=function(){o=0,s=0,a=0,l=0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",x),t.draggable=i,document.body.style.userSelect="auto"},P=function(e){if(2!==e.button){e.stopPropagation(),t.draggable=!1,t.setAttribute("ondragstart","return false;"),t.setAttribute("draggable","false");var n=w(t,r);o=n.left,s=n.top,a=e.pageX,l=e.pageY,c=e.offsetX,p=e.offsetY,u=r.getBoundingClientRect(),d=w(r),h=d.top,m=h+u.height,f=d.left,_=f+u.width,y=t.getBoundingClientRect(),v=window.getComputedStyle(t).borderWidth||"0",g=2*Number.parseInt(v),document.addEventListener("mousemove",k),document.addEventListener("mouseup",x),document.body.style.userSelect="none"}};return t.addEventListener("mousedown",P),function(){t.removeEventListener("mousedown",P),x()}}function C(t,e){var n=document.createElement("div");n.className="resize-draggable",t.appendChild(n);var r=t.parentElement,i=t.draggable,o=0,s=0,a=0,l=0,c=0,p=r.getBoundingClientRect(),u=w(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,_=w(t),y=_.top,v=_.left,g=window.getComputedStyle(t).borderWidth||"0",M=Number.parseInt(g),C=E(32,e),k=b(16,e),x=function(t){var e=o+(t.pageX-a),n=s+(t.pageY-l);e===o&&n===s||e<o&&t.pageX>v+(o-c)||(e<15?e=15:e+v-M/2>=f&&(e=f-v),n<15?n=15:n+y-M/2>=h&&(n=h-y),k(e,n),C(e,n),o=e,s=n,a=t.pageX,l=t.pageY)},P=function(){o=0,s=0,a=0,l=0,c=0,document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",P),t.draggable=i,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",(function(e){e.stopPropagation(),t.draggable=!1;var n=t.getBoundingClientRect(),i=n.width,g=n.height;o=i,s=g,a=e.pageX,l=e.pageY,c=e.offsetX,e.offsetY,p=r.getBoundingClientRect(),u=w(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,_=w(t),y=_.top,v=_.left,document.addEventListener("mousemove",x),document.addEventListener("mouseup",P),document.body.style.userSelect="none"})),function(){n.remove(),P()}}function k(t){return t}function x(t,e,n){return void 0===e&&(e=140),void 0===n&&(n="…"),t.trim().length>e?t.substr(0,e).trim()+n:t}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.d=function(t,e){for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};!function(){var t,e=__webpack_require__(541),n=__webpack_require__(478),r=(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),i=function(){return i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)},o=function(t){switch(t){case"default":case"enabled":case"disabled":return t;default:return"default"}};function s(t){if("string"!=typeof t.imageSrc||0===t.imageSrc.length)throw new TypeError("invalid image src.");return i(i(i(i({},(0,n.TB)(t)),{type:0,imageSrc:t.imageSrc,showLastValueTooltip:o(t.showLastValueTooltip),statusImageSrc:(0,e.JW)(t.statusImageSrc,null),lastValue:(0,e.JW)(t.lastValue,null)}),(0,e.MH)(t)),(0,e.bs)(t))}var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.createDomElement=function(){var t=this.props.statusImageSrc||this.props.imageSrc,e=document.createElement("div");return e.className="static-graph",e.setAttribute("ondragstart","return false;"),e.setAttribute("draggable","false"),e.style.backgroundImage="url(".concat(t,")"),e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="contain",e.style.backgroundPosition="center",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(e.style.opacity="0.2"),null!==this.props.lastValue&&"disabled"!==this.props.showLastValueTooltip&&(e.className="static-graph image forced_title",e.setAttribute("data-use_title_for_force_title","1"),e.setAttribute("data-title",this.props.lastValue)),e},e.prototype.updateDomElement=function(t){var e=this.props.statusImageSrc||this.props.imageSrc;t.style.backgroundImage="url(".concat(e,")")},e}(n.ZP),l=a,c=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=function(){return p=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},p.apply(this,arguments)};function u(t){if("string"!=typeof t.imageSrc||0===t.imageSrc.length)throw new TypeError("invalid image src.");if("string"!=typeof t.image||0===t.image.length)throw new TypeError("invalid image.");return p(p(p({},(0,n.TB)(t)),{type:5,image:t.image,imageSrc:t.imageSrc}),(0,e.bs)(t))}var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="icon "+this.props.image,t.style.backgroundImage="url(".concat(this.props.imageSrc,")"),t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="contain",t.style.backgroundPosition="center",t},e.prototype.updateDomElement=function(t){t.style.backgroundImage="url(".concat(this.props.imageSrc,")")},e}(n.ZP),h=d,m=__webpack_require__(630),f=__webpack_require__(830),_={prefix:"fas",iconName:"plus-circle",icon:[512,512,[],"f055","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"]},y={prefix:"fas",iconName:"trash-alt",icon:[448,512,[],"f2ed","M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1-32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16z"]},v=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=function(){return g=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},g.apply(this,arguments)},b=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function E(t){if("string"!=typeof t.color||0===t.color.length)throw new TypeError("invalid color.");return g(g(g(g({},(0,n.TB)(t)),{type:20,color:t.color,defaultColor:t.defaultColor,colorRanges:t.colorRanges}),(0,e.MH)(t)),(0,e.bs)(t))}var w=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return v(n,t),n.prototype.createContent=function(){var t=this,n=document.createElement("div");n.className="div-input-group";var r=document.createElement("label");r.textContent=(0,e.t)("Default color"),n.appendChild(r);var i=document.createElement("input");return i.type="color",i.required=!0,i.value="".concat(this.currentData.defaultColor||this.initialData.defaultColor||"#000000"),i.addEventListener("change",(function(e){t.updateData({defaultColor:e.target.value})})),n.appendChild(i),n},n}(m.InputGroup),M=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return v(n,t),n.prototype.createContent=function(){var t=this,e=document.createElement("div");e.className="div-input-group div-ranges-input-group";var n=this.createLabel("Ranges");e.appendChild(n);var r=document.createElement("div"),i=document.createElement("div");e.appendChild(i),e.appendChild(r);var o,s=this.currentData.colorRanges||this.initialData.colorRanges||[];return o=function(e){i.innerHTML="",e.forEach((function(e,n){return i.appendChild(t.rangeContainer(e,function(e){return function(n){var r=t.currentData.colorRanges||t.initialData.colorRanges||[];t.updateData({colorRanges:b(b(b([],r.slice(0,e),!0),[n],!1),r.slice(e+1),!0)})}}(n),function(e){return function(){var n=t.currentData.colorRanges||t.initialData.colorRanges||[],r=b(b([],n.slice(0,e),!0),n.slice(e+1),!0);t.updateData({colorRanges:r}),o(r)}}(n)))}))},o(s),r.appendChild(this.initialRangeContainer((function(e){var n=t.currentData.colorRanges||t.initialData.colorRanges||[],r=b(b([],n,!0),[e],!1);t.updateData({colorRanges:r}),o(r)}))),e},n.prototype.initialRangeContainer=function(t){var n={color:"#ffffff"},r=g({},n),i=document.createElement("div"),o=document.createElement("div"),s=this.createLabel("From Value"),a=this.createInputNumber(null,(function(t){r.fromValue=t}));o.appendChild(s),o.appendChild(a),i.appendChild(o);var l=document.createElement("div"),c=this.createLabel("To Value"),p=this.createInputNumber(null,(function(t){r.toValue=t}));o.appendChild(c),o.appendChild(p),i.appendChild(l);var u=document.createElement("div"),d=this.createLabel("Color"),h=this.createInputColor(n.color,(function(t){r.color=t}));o.appendChild(d),o.appendChild(h),i.appendChild(u);var m=document.createElement("a");return m.appendChild((0,f.Z)(_,(0,e.t)("Create color range"),{size:"small",color:"#565656"})),m.addEventListener("click",(function(){var e;void 0!==(e=r).color&&void 0!==e.toValue&&void 0!==e.fromValue&&t(r),r=n,a.value="".concat(r.fromValue||""),p.value="".concat(r.toValue||""),h.value="".concat(r.color)})),i.appendChild(m),i},n.prototype.rangeContainer=function(t,n,r){var i=g({},t),o=document.createElement("div"),s=document.createElement("div"),a=this.createLabel("From Value"),l=this.createInputNumber(t.fromValue,(function(t){i.fromValue=t,n(g({},i))}));s.appendChild(a),s.appendChild(l),o.appendChild(s);var c=document.createElement("div"),p=this.createLabel("To Value"),u=this.createInputNumber(t.toValue,(function(t){i.toValue=t,n(g({},i))}));s.appendChild(p),s.appendChild(u),o.appendChild(c);var d=document.createElement("div"),h=this.createLabel("Color"),m=this.createInputColor(t.color,(function(t){i.color=t,n(g({},i))}));s.appendChild(h),s.appendChild(m),o.appendChild(d);var _=document.createElement("a");return _.appendChild((0,f.Z)(y,(0,e.t)("Delete color range"),{size:"small",color:"#565656"})),_.addEventListener("click",r),o.appendChild(_),o},n.prototype.createLabel=function(t){var n=document.createElement("label");return n.textContent=(0,e.t)(t),n},n.prototype.createInputNumber=function(t,e){var n=document.createElement("input");return n.type="number",null!==t&&(n.value="".concat(t)),n.addEventListener("change",(function(t){var n=parseInt(t.target.value);isNaN(n)||e(n)})),n},n.prototype.createInputColor=function(t,e){var n=document.createElement("input");return n.type="color",null!==t&&(n.value=t),n.addEventListener("change",(function(t){return e(t.target.value)})),n},n}(m.InputGroup),C="http://www.w3.org/2000/svg",k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return v(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="color-cloud",t.append(this.createSvgElement()),t},e.prototype.resizeElement=function(e){t.prototype.resizeElement.call(this,e,e)},e.prototype.createSvgElement=function(){var t="grad_".concat(this.props.id),e=document.createElementNS(C,"svg");e.setAttribute("viewBox","0 0 100 100");var n=document.createElementNS(C,"defs"),r=document.createElementNS(C,"radialGradient");r.setAttribute("id",t),r.setAttribute("cx","50%"),r.setAttribute("cy","50%"),r.setAttribute("r","50%"),r.setAttribute("fx","50%"),r.setAttribute("fy","50%");var i=document.createElementNS(C,"stop");i.setAttribute("offset","0%"),i.setAttribute("style","stop-color:".concat(this.props.color,";stop-opacity:0.9"));var o=document.createElementNS(C,"stop");o.setAttribute("offset","100%"),o.setAttribute("style","stop-color:".concat(this.props.color,";stop-opacity:0"));var s=document.createElementNS(C,"circle");return s.setAttribute("fill","url(#".concat(t,")")),s.setAttribute("cx","50%"),s.setAttribute("cy","50%"),s.setAttribute("r","50%"),r.append(i,o),n.append(r),e.append(n,s),!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||e.setAttribute("opacity","0.2"),e},e.prototype.getFormContainer=function(){return e.getFormContainer(this.props)},e.getFormContainer=function(e){var n=t.getFormContainer.call(this,e);return n.removeInputGroup("label"),n.addInputGroup(new w("color-cloud",e),3),n.addInputGroup(new M("ranges-cloud",e),4),n},e}(n.ZP),x=k,P=__webpack_require__(510),I=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),T=function(){return T=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},T.apply(this,arguments)};function O(t){var r=T(T({},(0,n.TB)(T(T({},t),{width:1,height:1}))),{type:13,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,x:0,y:0,width:0,height:0,startPosition:{x:(0,e.I1)(t.startX,0),y:(0,e.I1)(t.startY,0)},endPosition:{x:(0,e.I1)(t.endX,0),y:(0,e.I1)(t.endY,0)},lineWidth:(0,e.I1)(t.lineWidth||t.borderWidth,1),color:(0,e.JW)(t.borderColor||t.color,null),viewportOffsetX:0,viewportOffsetY:0,labelEnd:(0,e.JW)(t.labelEnd,""),labelEndWidth:(0,e.I1)(t.labelEndWidth,0),linkedEnd:t.linkedEnd,linkedStart:t.linkedStart,labelEndHeight:(0,e.I1)(t.labelEndHeight,0),labelStart:(0,e.JW)(t.labelStart,""),labelStartWidth:(0,e.I1)(t.labelStartWidth,0),labelStartHeight:(0,e.I1)(t.labelStartHeight,0)});return T(T({},r),L.extractBoxSizeAndPosition(r.startPosition,r.endPosition))}var A="http://www.w3.org/2000/svg",L=function(t){function n(r,i){var o=t.call(this,T(T({},r),n.extractBoxSizeAndPosition(r.startPosition,r.endPosition)),T({},i),!0)||this;return o.circleRadius=8,o.moveMode=!1,o.isMoving=!1,o.lineMovedEventManager=new P.Z,o.lineMovedEventDisposables=[],o.debouncedStartPositionMovementSave=(0,e.Ds)(500,(function(t,e){o.isMoving=!1;var n={x:t,y:e};o.lineMovedEventManager.emit({item:o,startPosition:n,endPosition:o.props.endPosition})})),o.removeStartPositionMovement=null,o.debouncedEndPositionMovementSave=(0,e.Ds)(500,(function(t,e){o.isMoving=!1;var n={x:t,y:e};o.lineMovedEventManager.emit({item:o,endPosition:n,startPosition:o.props.startPosition})})),o.removeEndPositionMovement=null,o.moveMode=i.editMode,o.init(),t.prototype.resizeElement.call(o,Math.max(r.width,r.viewportOffsetX),Math.max(r.height,r.viewportOffsetY)),o}return I(n,t),n.prototype.initStartPositionMovementListener=function(t,n){var r=this;this.removeStartPositionMovement=(0,e.Dw)(t,(function(t,e){var n={x:t+=r.circleRadius-r.props.viewportOffsetX/2,y:e+=r.circleRadius-r.props.viewportOffsetY/2};r.isMoving=!0,r.props=T(T({},r.props),{startPosition:n}),r.debouncedStartPositionMovementSave(t,e)}),n)},n.prototype.stopStartPositionMovementListener=function(){this.removeStartPositionMovement&&(this.removeStartPositionMovement(),this.removeStartPositionMovement=null)},n.prototype.initEndPositionMovementListener=function(t,n){var r=this;this.removeEndPositionMovement=(0,e.Dw)(t,(function(t,e){t+=r.circleRadius-r.props.viewportOffsetX/2,e+=r.circleRadius-r.props.viewportOffsetY/2,r.isMoving=!0,r.props=T(T({},r.props),{endPosition:{x:t,y:e}}),r.debouncedEndPositionMovementSave(t,e)}),n)},n.prototype.stopEndPositionMovementListener=function(){this.removeEndPositionMovement&&(this.removeEndPositionMovement(),this.removeEndPositionMovement=null)},n.prototype.setProps=function(e){t.prototype.setProps.call(this,T(T({},e),n.extractBoxSizeAndPosition(e.startPosition,e.endPosition)))},n.prototype.setMeta=function(e){this.moveMode=e.editMode,t.prototype.setMeta.call(this,T(T({},e),{lineMode:!0}))},n.prototype.createDomElement=function(){var t=document.createElement("div");t.className="line";var e=this.props,n=e.x,r=e.y,i=e.width,o=e.height,s=e.lineWidth,a=e.viewportOffsetX,l=e.viewportOffsetY,c=e.startPosition,p=e.endPosition,u=e.color;i+=a,o+=l;var d=c.x-n+s/2+a/2,h=c.y-r+s/2+l/2,m=p.x-n+s/2+a/2,f=p.y-r+s/2+l/2,_=document.createElementNS(A,"svg");_.setAttribute("width","".concat(i+s)),_.setAttribute("height","".concat(o+s));var y=document.createElementNS(A,"line");return y.setAttribute("x1","".concat(d)),y.setAttribute("y1","".concat(h)),y.setAttribute("x2","".concat(m)),y.setAttribute("y2","".concat(f)),y.setAttribute("stroke",u||"black"),y.setAttribute("stroke-width","".concat(s)),_.append(y),t.append(_),t},n.prototype.updateDomElement=function(t){null!=t.parentElement&&(t.parentElement.style.cursor="default");var e=this.props,n=e.x,r=e.y,i=e.width,o=e.height,s=e.lineWidth,a=e.viewportOffsetX,l=e.viewportOffsetY,c=e.startPosition,p=e.endPosition,u=e.color;i+=a,o+=l;var d=c.x-n+s/2+a/2,h=c.y-r+s/2+l/2,m=p.x-n+s/2+a/2,f=p.y-r+s/2+l/2,_=t.getElementsByTagName("svg");if(_.length>0){var y=_.item(0);if(null!=y){y.setAttribute("width","".concat(i+s)),y.setAttribute("height","".concat(o+s));var v=y.getElementsByTagNameNS(A,"line");if(v.length>0){var g=v.item(0);null!=g&&(g.setAttribute("x1","".concat(d)),g.setAttribute("y1","".concat(h)),g.setAttribute("x2","".concat(m)),g.setAttribute("y2","".concat(f)),g.setAttribute("stroke",u||"black"),g.setAttribute("stroke-width","".concat(s)))}}}if(this.moveMode){var b=document.createElement("div"),E=document.createElement("div");if(this.isMoving){var w=t.getElementsByClassName("visual-console-item-line-circle-start");w.length>0&&(k=w.item(0))&&(b=k);var M=t.getElementsByClassName("visual-console-item-line-circle-end");M.length>0&&(k=M.item(0))&&(E=k)}if(b.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-start"),b.style.width="".concat(2*this.circleRadius,"px"),b.style.height="".concat(2*this.circleRadius,"px"),b.style.borderRadius="50%",b.style.backgroundColor="".concat(u),b.style.position="absolute",b.style.left="".concat(d-this.circleRadius,"px"),b.style.top="".concat(h-this.circleRadius,"px"),b.style.cursor="move",E.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-end"),E.style.width="".concat(2*this.circleRadius,"px"),E.style.height="".concat(2*this.circleRadius,"px"),E.style.borderRadius="50%",E.style.backgroundColor="".concat(u),E.style.position="absolute",E.style.left="".concat(m-this.circleRadius,"px"),E.style.top="".concat(f-this.circleRadius,"px"),E.style.cursor="move",null!==t.parentElement){for(var C=t.parentElement.getElementsByClassName("visual-console-item-line-circle");C.length>0;)(k=C.item(0))&&k.remove();t.parentElement.appendChild(b),t.parentElement.appendChild(E)}this.initStartPositionMovementListener(b,this.elementRef.parentElement),this.initEndPositionMovementListener(E,this.elementRef.parentElement)}else if(this.moveMode)this.stopStartPositionMovementListener();else if(this.stopStartPositionMovementListener(),null!==t.parentElement)for(C=t.parentElement.getElementsByClassName("visual-console-item-line-circle");C.length>0;){var k;(k=C.item(0))&&k.remove()}},n.extractBoxSizeAndPosition=function(t,e){return{width:Math.abs(t.x-e.x),height:Math.abs(t.y-e.y),x:Math.min(t.x,e.x),y:Math.min(t.y,e.y)}},n.prototype.move=function(e,n){t.prototype.moveElement.call(this,e,n);var r=this.props.startPosition.x-this.props.endPosition.x<=0,i=this.props.startPosition.y-this.props.endPosition.y<=0,o={x:r?e:this.props.width+e,y:i?n:this.props.height+n},s={x:r?this.props.width+e:e,y:i?this.props.height+n:n};this.props=T(T({},this.props),{startPosition:o,endPosition:s})},n.prototype.remove=function(){this.stopStartPositionMovementListener(),t.prototype.remove.call(this)},n.prototype.onLineMovementFinished=function(t){var e=this.lineMovedEventManager.on(t);return this.lineMovedEventDisposables.push(e),e},n}(n.ZP),S=L,D=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),R=function(){return R=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},R.apply(this,arguments)},N="http://www.w3.org/2000/svg";function B(t){return R(R({},O(t)),{type:21,viewportOffsetX:0,viewportOffsetY:0,labelEnd:(0,e.JW)(t.labelEnd,""),labelEndWidth:(0,e.I1)(t.labelEndWidth,0),labelEndHeight:(0,e.I1)(t.labelEndHeight,0),labelStart:(0,e.JW)(t.labelStart,""),labelStartWidth:(0,e.I1)(t.labelStartWidth,0),labelStartHeight:(0,e.I1)(t.labelStartHeight,0)})}var z=function(t){function n(n,r){var i=t.call(this,R({},n),R({},r))||this;return i.debouncedStartPositionMovementSave=(0,e.Ds)(50,(function(t,e){i.isMoving=!1;var n={x:t,y:e};i.render(),i.lineMovedEventManager.emit({item:i,startPosition:n,endPosition:i.props.endPosition})})),i.debouncedEndPositionMovementSave=(0,e.Ds)(50,(function(t,e){i.isMoving=!1;var n={x:t,y:e};i.render(),i.lineMovedEventManager.emit({item:i,endPosition:n,startPosition:i.props.startPosition})})),i.render(),i}return D(n,t),n.prototype.updateDomElement=function(e){t.prototype.updateDomElement.call(this,e);var n,r,i=this.props,o=i.x,s=i.y,a=i.lineWidth,l=i.viewportOffsetX,c=i.viewportOffsetY,p=i.startPosition,u=i.endPosition,d=i.color,h=i.labelEnd,m=i.labelStart,f=i.labelEndWidth,_=i.labelEndHeight,y=i.labelStartWidth,v=i.labelStartHeight,g=e.getElementsByTagName("svg");if(g.length>0){if(null!=(r=g.item(0))){for(var b=r.getElementsByTagNameNS(N,"line"),E=r.getElementsByTagNameNS(N,"g");E.length>0;)E[0].remove();b.length>0&&(n=b.item(0))}if(null!=r&&null!=n){var w=25,M=p.x-o+a/2+l/2,C=p.y-s+a/2+c/2,k=u.x-o+a/2+l/2,x=u.y-s+a/2+c/2,P=p.x-o+a/2+l/2,I=p.y-s+a/2+c/2,T=u.x-o+a/2+l/2,O=u.y-s+a/2+c/2,A=180*Math.atan2(x-C,k-M)/Math.PI;if(y<=0&&(b=m.split("<br>"),y=0,b.forEach((function(t){t.length>y&&(y=10*t.length)})),v<=0&&(v=25*b.length)),f<=0&&(b=h.split("<br>"),f=0,b.forEach((function(t){t.length>f&&(f=10*t.length)})),_<=0&&(_=25*b.length)),P<T&&(P+=w,T-=w+f),P>T&&(P-=w+y,T+=w),I<O&&(I+=w,O-=w+_),I>O&&(I-=w+v,O+=w),void 0===d&&(d="#000"),null!==e.parentElement){for(var L=e.parentElement.getElementsByClassName("vc-item-nl-label");L.length>0;){var S=L.item(0);S&&S.remove()}for(var D=e.parentElement.getElementsByClassName("vc-item-nl-arrow");D.length>0;){var R=D.item(0);R&&R.remove()}}var B=2*a,z=M+(k-M)/2-B,W=C+(x-C)/2-B,j=document.createElement("div");j.classList.add("vc-item-nl-arrow"),j.style.position="absolute",j.style.border="".concat(B,"px solid transparent"),j.style.borderBottom="".concat(B,"px solid ").concat(d),j.style.left="".concat(z,"px"),j.style.top="".concat(W,"px"),j.style.transform="rotate(".concat(90+A,"deg)");var H=document.createElement("div");if(H.classList.add("vc-item-nl-arrow"),H.style.position="absolute",H.style.border="".concat(B,"px solid transparent"),H.style.borderBottom="".concat(B,"px solid ").concat(d),H.style.left="".concat(z,"px"),H.style.top="".concat(W,"px"),H.style.transform="rotate(".concat(270+A,"deg)"),null!==e.parentElement&&(e.parentElement.appendChild(j),e.parentElement.appendChild(H)),""!=m){var V=document.createElement("div");try{V.innerHTML=m,V.style.position="absolute",V.style.left="".concat(P,"px"),V.style.top="".concat(I,"px"),V.style.width="".concat(y,"px"),V.style.border="2px solid ".concat(d),V.classList.add("vc-item-nl-label","label-start")}catch(t){console.error(t)}null!==e.parentElement&&e.parentElement.appendChild(V)}if(""!=h){var G=document.createElement("div");try{G.innerHTML=h,G.style.position="absolute",G.style.left="".concat(T,"px"),G.style.top="".concat(O,"px"),G.style.width="".concat(f,"px"),G.style.border="2px solid ".concat(d),G.classList.add("vc-item-nl-label","label-end")}catch(t){console.error(t)}null!==e.parentElement&&e.parentElement.appendChild(G)}}}},n}(S),W=z,j=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(){return H=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},H.apply(this,arguments)};function V(t){if(("string"!=typeof t.imageSrc||0===t.imageSrc.length)&&null===t.encodedHtml)throw new TypeError("invalid image src.");if(null===(0,e.I1)(t.groupId,null))throw new TypeError("invalid group Id.");var r=(0,e.gx)(t.showStatistics),i=r?function(t){return(0,e.VJ)(t.html)?(0,e.VJ)(t.encodedHtml)?null:(0,e.NV)(t.encodedHtml):t.html}(t):null;return H(H(H({},(0,n.TB)(t)),{type:11,groupId:parseInt(t.groupId),imageSrc:(0,e.JW)(t.imageSrc,null),statusImageSrc:(0,e.JW)(t.statusImageSrc,null),showStatistics:r,html:i}),(0,e.bs)(t))}var G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="group",this.props.showStatistics||null===this.props.statusImageSrc?this.props.showStatistics&&null!=this.props.html&&(t.style.backgroundImage="none",t.innerHTML=this.props.html):(t.style.backgroundImage="url(".concat(this.props.statusImageSrc,")"),t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="contain",t.style.backgroundPosition="center"),t},e.prototype.updateDomElement=function(t){this.props.showStatistics||null===this.props.statusImageSrc?this.props.showStatistics&&null!=this.props.html&&(t.style.backgroundImage="none",t.innerHTML=this.props.html):(t.style.backgroundImage="url(".concat(this.props.statusImageSrc,")"),t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="contain",t.style.backgroundPosition="center",t.innerHTML="")},e}(n.ZP),U=G,F=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),K=function(){return K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},K.apply(this,arguments)},Z=function(t){switch(t){case"analogic":case"digital":return t;default:return"analogic"}},q=function(t){switch(t){case"datetime":case"time":return t;default:return"datetime"}};function J(t){if("string"!=typeof t.clockTimezone||0===t.clockTimezone.length)throw new TypeError("invalid timezone.");return K(K(K({},(0,n.TB)(t)),{type:19,clockType:Z(t.clockType),clockFormat:q(t.clockFormat),clockTimezone:t.clockTimezone,clockTimezoneOffset:(0,e.I1)(t.clockTimezoneOffset,0),showClockTimezone:(0,e.gx)(t.showClockTimezone),color:(0,e.JW)(t.color,null)}),(0,e.bs)(t))}var Y=function(t){function n(e,r){var i=t.call(this,e,r)||this;return i.intervalRef=null,i.startTick((function(){i.childElementRef.innerHTML=i.createClock().innerHTML}),"analogic"===i.props.clockType?2e4:n.TICK_INTERVAL),i}return F(n,t),n.prototype.stopTick=function(){null!==this.intervalRef&&(window.clearInterval(this.intervalRef),this.intervalRef=null)},n.prototype.startTick=function(t,e){void 0===e&&(e=n.TICK_INTERVAL),this.stopTick(),this.intervalRef=window.setInterval(t,e)},n.prototype.createDomElement=function(){return this.createClock()},n.prototype.updateDomElement=function(e){var n=this.getElementSize(this.props.width,this.props.height),r=n.width,i=n.height;"digital"===this.props.clockType?(!1===this.meta.isBeingResized&&t.prototype.resizeElement.call(this,this.props.width,this.props.height),e.classList.replace("analogic-clock","digital-clock")):(!1===this.meta.isBeingResized&&t.prototype.resizeElement.call(this,r,i),e.classList.replace("digital-clock","analogic-clock")),e.innerHTML=this.createDomElement().innerHTML},n.prototype.remove=function(){this.stopTick(),t.prototype.remove.call(this)},n.prototype.resizeElement=function(e,n){var r=this.getElementSize(e,n),i=r.width,o=r.height;"digital"===this.props.clockType?t.prototype.resizeElement.call(this,e,n):t.prototype.resizeElement.call(this,i,o)},n.prototype.createClock=function(){switch(this.props.clockType){case"analogic":return this.createAnalogicClock();case"digital":return this.createDigitalClock();default:throw new Error("invalid clock type.")}},n.prototype.createAnalogicClock=function(){var t="http://www.w3.org/2000/svg",n="#FFFFF0",r="#242124",i="#242124",o="#525252",s="#DC143C",a=this.getElementSize(),l=a.width,c=a.height,p=10*l/100,u=document.createElement("div");u.className="analogic-clock",u.style.width="".concat(l,"px"),u.style.height="".concat(c,"px");var d=document.createElementNS(t,"svg");d.setAttribute("viewBox","0 0 100 100");var h=document.createElementNS(t,"g");h.setAttribute("class","clockface");var m=document.createElementNS(t,"circle");m.setAttribute("cx","50"),m.setAttribute("cy","50"),m.setAttribute("r","48"),m.setAttribute("fill",n),m.setAttribute("stroke","#242124"),m.setAttribute("stroke-width","2"),m.setAttribute("stroke-linecap","round"),h.append(m);var f=this.getHumanTimezone();if(f.length>0){var _=document.createElementNS(t,"text");_.setAttribute("text-anchor","middle"),_.setAttribute("font-size","8"),_.setAttribute("transform","translate(30 50) rotate(90)"),_.setAttribute("fill",r),_.textContent=f,h.append(_)}var y=document.createElementNS(t,"g");y.setAttribute("class","marks");var v=document.createElementNS(t,"g");v.setAttribute("class","mark"),v.setAttribute("transform","translate(50 50)");var g=document.createElementNS(t,"line");g.setAttribute("x1","36"),g.setAttribute("y1","0"),g.setAttribute("x2","46"),g.setAttribute("y2","0"),g.setAttribute("stroke",r),g.setAttribute("stroke-width","5");var b=document.createElementNS(t,"line");b.setAttribute("x1","36"),b.setAttribute("y1","0"),b.setAttribute("x2","46"),b.setAttribute("y2","0"),b.setAttribute("stroke",n),b.setAttribute("stroke-width","1"),v.append(g,b),y.append(v);for(var E=1;E<60;E++){var w=document.createElementNS(t,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",r),w.setAttribute("transform","translate(50 50) rotate(".concat(6*E,")")),E%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",E%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),y.append(w)}var M=document.createElementNS(t,"g");M.setAttribute("class","hour-hand"),M.setAttribute("transform","translate(50 50)");var C=document.createElementNS(t,"line");C.setAttribute("class","hour-hand-a"),C.setAttribute("x1","0"),C.setAttribute("y1","0"),C.setAttribute("x2","30"),C.setAttribute("y2","0"),C.setAttribute("stroke",o),C.setAttribute("stroke-width","4"),C.setAttribute("stroke-linecap","round");var k=document.createElementNS(t,"line");k.setAttribute("class","hour-hand-b"),k.setAttribute("x1","0"),k.setAttribute("y1","0"),k.setAttribute("x2","29.9"),k.setAttribute("y2","0"),k.setAttribute("stroke",i),k.setAttribute("stroke-width","3.1"),k.setAttribute("stroke-linecap","round"),M.append(C,k);var x=document.createElementNS(t,"g");x.setAttribute("class","minute-hand"),x.setAttribute("transform","translate(50 50)");var P=document.createElementNS(t,"line");P.setAttribute("class","minute-hand-a"),P.setAttribute("x1","0"),P.setAttribute("y1","0"),P.setAttribute("x2","40"),P.setAttribute("y2","0"),P.setAttribute("stroke",o),P.setAttribute("stroke-width","2"),P.setAttribute("stroke-linecap","round");var I=document.createElementNS(t,"line");I.setAttribute("class","minute-hand-b"),I.setAttribute("x1","0"),I.setAttribute("y1","0"),I.setAttribute("x2","39.9"),I.setAttribute("y2","0"),I.setAttribute("stroke",i),I.setAttribute("stroke-width","1.5"),I.setAttribute("stroke-linecap","round");var T=document.createElementNS(t,"circle");T.setAttribute("r","3"),T.setAttribute("fill",i),x.append(P,I,T);var O=document.createElementNS(t,"g");O.setAttribute("class","second-hand"),O.setAttribute("transform","translate(50 50)");var A=document.createElementNS(t,"line");A.setAttribute("x1","0"),A.setAttribute("y1","0"),A.setAttribute("x2","46"),A.setAttribute("y2","0"),A.setAttribute("stroke",s),A.setAttribute("stroke-width","1"),A.setAttribute("stroke-linecap","round");var L=document.createElementNS(t,"circle");L.setAttribute("r","2"),L.setAttribute("fill",s),O.append(A,L);var S=document.createElementNS(t,"circle");S.setAttribute("cx","50"),S.setAttribute("cy","50"),S.setAttribute("r","0.3"),S.setAttribute("fill",i);var D=this.getOriginDate(),R=D.getSeconds(),N=D.getMinutes(),B=6*R,z=6*N+R/60*6,W=30*D.getHours()+N/60*30;if(M.setAttribute("transform","translate(50 50) rotate(".concat(W,")")),x.setAttribute("transform","translate(50 50) rotate(".concat(z,")")),O.setAttribute("transform","translate(50 50) rotate(".concat(B,")")),d.append(h,y,M,x,O,S),d.setAttribute("transform","rotate(-90)"),u.innerHTML="\n <style>\n @keyframes rotate-hour {\n from {\n ".concat((0,e.OR)("transform","translate(50px, 50px) rotate(".concat(W,"deg)")).join("\n"),"\n }\n to {\n ").concat((0,e.OR)("transform","translate(50px, 50px) rotate(".concat(W+360,"deg)")).join("\n"),"\n }\n }\n @keyframes rotate-minute {\n from {\n ").concat((0,e.OR)("transform","translate(50px, 50px) rotate(".concat(z,"deg)")).join("\n"),"\n }\n to {\n ").concat((0,e.OR)("transform","translate(50px, 50px) rotate(".concat(z+360,"deg)")).join("\n"),"\n }\n }\n @keyframes rotate-second {\n from {\n ").concat((0,e.OR)("transform","translate(50px, 50px) rotate(".concat(B,"deg)")).join("\n"),"\n }\n to {\n ").concat((0,e.OR)("transform","translate(50px, 50px) rotate(".concat(B+360,"deg)")).join("\n"),"\n }\n }\n </style>\n "),u.append(d),"datetime"===this.props.clockFormat){var j=document.createElement("span");j.className="date",j.textContent=(0,e.rN)(D,"default"),j.style.fontSize="".concat(p,"px"),this.props.color&&(j.style.color=this.props.color),u.append(j)}return u},n.prototype.createDigitalClock=function(){var t=document.createElement("div");t.className="digital-clock";var n=this.getElementSize(),r=n.width,i=n.height,o=r;i<r&&(o=i);var s=6/this.props.clockTimezone.length,a=35*o/100,l=17.5*o/100,c=Math.min(35*s*o/100,r/100*10),p=this.getOriginDate();if("datetime"===this.props.clockFormat){var u=document.createElement("span");u.className="date",u.textContent=(0,e.rN)(p,"default"),u.style.fontSize="".concat(l,"px"),this.props.color&&(u.style.color=this.props.color),t.append(u)}var d=document.createElement("span");d.className="time",d.textContent=(0,e.bc)(p),d.style.fontSize="".concat(a,"px"),this.props.color&&(d.style.color=this.props.color),t.append(d);var h=this.getHumanTimezone();if(h.length>0){var m=document.createElement("span");m.className="timezone",m.textContent=h,m.style.fontSize="".concat(c,"px"),this.props.color&&(m.style.color=this.props.color),t.append(m)}return t},n.prototype.getOriginDate=function(t){void 0===t&&(t=null);var e=t||new Date,n=1e3*this.props.clockTimezoneOffset,r=60*e.getTimezoneOffset()*1e3,i=e.getTime()+n+r;return new Date(i)},n.prototype.getHumanTimezone=function(t){void 0===t&&(t=this.props.clockTimezone);var e=t.split("/")[1];return(void 0===e?"":e).replace("_"," ")},n.prototype.getElementSize=function(t,e){switch(void 0===t&&(t=this.props.width),void 0===e&&(e=this.props.height),this.props.clockType){case"analogic":var n=100;t>0&&e>0?n=Math.min(t,e):t>0?n=t:e>0&&(n=e);var r=0;return"datetime"===this.props.clockFormat&&(r=e/8),{width:n,height:n+r};case"digital":return t>0&&e>0?e=t/2<e?t/2:e:t>0?e=t/2:e>0?t=2*e:(t=100,e=50),{width:t,height:e};default:throw new Error("invalid clock type.")}},n.TICK_INTERVAL=1e3,n}(n.ZP),X=Y,Q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$=function(){return $=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},$.apply(this,arguments)};function tt(t){return $($({},(0,n.TB)(t)),{type:12,label:null,isLinkEnabled:!1,parentId:null,aclGroupId:null,borderWidth:(0,e.I1)(t.borderWidth,0),borderColor:(0,e.JW)(t.borderColor,null),fillColor:(0,e.JW)(t.fillColor,null),fillTransparent:t.fillTransparent})}var et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");if(t.className="box",t.style.boxSizing="border-box",this.props.fillTransparent?t.style.backgroundColor="transparent":this.props.fillColor&&(t.style.backgroundColor=this.props.fillColor),this.props.borderWidth>0){t.style.borderStyle="solid";var e=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,e);t.style.borderWidth="".concat(n,"px"),this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}return t},e.prototype.updateDomElement=function(t){if(this.props.fillTransparent?t.style.backgroundColor="transparent":this.props.fillColor&&(t.style.backgroundColor=this.props.fillColor),this.props.borderWidth>0){t.style.borderStyle="solid";var e=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,e);t.style.borderWidth="".concat(n,"px"),this.props.borderColor&&(t.style.borderColor=this.props.borderColor)}},e}(n.ZP),nt=et,rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),it=function(){return it=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},it.apply(this,arguments)};function ot(t){return it(it(it({},(0,n.TB)(t)),{type:4}),(0,e.bs)(t))}var st=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),e.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="label",t.innerHTML=this.getLabelWithMacrosReplaced(),t},e.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},e}(n.ZP),at=st,lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ct=function(){return ct=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ct.apply(this,arguments)},pt=function(t){switch(t){case"string":case"image":return t;default:return"string"}};function ut(t){if("string"!=typeof t.value||0===t.value.length)throw new TypeError("invalid value");var r=function(t){switch(t){case"none":case"avg":case"max":case"min":return t;default:return"none"}}(t.processValue);return ct(ct(ct(ct(ct({},(0,n.TB)(t)),{type:2,valueType:pt(t.valueType),value:t.value}),"none"===r?{processValue:r}:{processValue:r,period:(0,e.I1)(t.period,0)}),(0,e.MH)(t)),(0,e.bs)(t))}var dt=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return lt(n,t),n.prototype.createDomElement=function(){var t=document.createElement("div");if(t.className="simple-value",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(t.style.opacity="0.2"),"image"===this.props.valueType){var n=document.createElement("img");n.src=this.props.value,t.append(n)}else{var r=this.props.value,i=this.getLabelWithMacrosReplaced();i.length>0&&(r=(0,e.No)([{macro:/\(?_VALUE_\)?/i,value:r}],i)),t.innerHTML=r}return t},n.prototype.createLabelDomElement=function(){var t=document.createElement("div");return t.className="visual-console-item-label",t},n}(n.ZP),ht=dt,mt=__webpack_require__(280),ft=Math.PI,_t=2*ft,yt=1e-6,vt=_t-yt;function gt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function bt(){return new gt}gt.prototype=bt.prototype={constructor:gt,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-t,l=r-e,c=o-t,p=s-e,u=c*c+p*p;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(u>yt)if(Math.abs(p*a-l*c)>yt&&i){var d=n-o,h=r-s,m=a*a+l*l,f=d*d+h*h,_=Math.sqrt(m),y=Math.sqrt(u),v=i*Math.tan((ft-Math.acos((m+u-f)/(2*_*y)))/2),g=v/y,b=v/_;Math.abs(g-1)>yt&&(this._+="L"+(t+g*c)+","+(e+g*p)),this._+="A"+i+","+i+",0,0,"+ +(p*d>c*h)+","+(this._x1=t+b*a)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=t+s,c=e+a,p=1^o,u=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>yt||Math.abs(this._y1-c)>yt)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%_t+_t),u>vt?this._+="A"+n+","+n+",0,1,"+p+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+p+","+(this._x1=l)+","+(this._y1=c):u>yt&&(this._+="A"+n+","+n+",0,"+ +(u>=ft)+","+p+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Et=bt;function wt(t){return function(){return t}}var Mt=Math.abs,Ct=Math.atan2,kt=Math.cos,xt=Math.max,Pt=Math.min,It=Math.sin,Tt=Math.sqrt,Ot=1e-12,At=Math.PI,Lt=At/2,St=2*At;function Dt(t){return t>1?0:t<-1?At:Math.acos(t)}function Rt(t){return t>=1?Lt:t<=-1?-Lt:Math.asin(t)}function Nt(t){return t.innerRadius}function Bt(t){return t.outerRadius}function zt(t){return t.startAngle}function Wt(t){return t.endAngle}function jt(t){return t&&t.padAngle}function Ht(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,p=s-i,u=a-o,d=u*l-p*c;if(!(d*d<Ot))return[t+(d=(p*(e-o)-u*(t-i))/d)*l,e+d*c]}function Vt(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Tt(a*a+l*l),p=c*l,u=-c*a,d=t+p,h=e+u,m=n+p,f=r+u,_=(d+m)/2,y=(h+f)/2,v=m-d,g=f-h,b=v*v+g*g,E=i-o,w=d*f-m*h,M=(g<0?-1:1)*Tt(xt(0,E*E*b-w*w)),C=(w*g-v*M)/b,k=(-w*v-g*M)/b,x=(w*g+v*M)/b,P=(-w*v+g*M)/b,I=C-_,T=k-y,O=x-_,A=P-y;return I*I+T*T>O*O+A*A&&(C=x,k=P),{cx:C,cy:k,x01:-p,y01:-u,x11:C*(i/E-1),y11:k*(i/E-1)}}var Gt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(){return Ut=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Ut.apply(this,arguments)};function Ft(t){switch(t){case"progress-bar":case"bubble":case"circular-progress-bar":case"circular-progress-bar-alt":return t;default:case 3:return"progress-bar";case 9:return"bubble";case 15:return"circular-progress-bar";case 16:return"circular-progress-bar-alt"}}function Kt(t){switch(t){case"percent":case"value":return t;default:return"percent"}}function Zt(t){return Ut(Ut(Ut(Ut({},(0,n.TB)(t)),{type:3,percentileType:Ft(t.percentileType||t.type),valueType:Kt(t.valueType),minValue:(0,e.I1)(t.minValue,null),maxValue:(0,e.I1)(t.maxValue,null),color:(0,e.JW)(t.color,null),labelColor:(0,e.JW)(t.labelColor,null),value:(0,e.xn)(t.value,null),unit:(0,e.JW)(t.unit,null)}),(0,e.MH)(t)),(0,e.bs)(t))}var qt="http://www.w3.org/2000/svg",Jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gt(e,t),e.prototype.createDomElement=function(){var t,e={background:"#000000",progress:this.props.color||"#F0F0F0",text:this.props.labelColor||"#444444"},n=this.getProgress(),r=document.createElement("div");null!=this.props.value&&(t=Intl?Intl.NumberFormat("en-EN").format(this.props.value):this.props.value);var i=document.createElementNS(qt,"svg");switch(this.props.percentileType){case"progress-bar":var o=document.createElementNS(qt,"rect");o.setAttribute("fill",e.background),o.setAttribute("fill-opacity","0.5"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("rx","5"),o.setAttribute("ry","5");var s=document.createElementNS(qt,"rect");s.setAttribute("fill",e.progress),s.setAttribute("fill-opacity","1"),s.setAttribute("width","".concat(n,"%")),s.setAttribute("height","100%"),s.setAttribute("rx","5"),s.setAttribute("ry","5"),(u=document.createElementNS(qt,"text")).setAttribute("text-anchor","middle"),u.setAttribute("alignment-baseline","middle"),u.setAttribute("font-size","15"),u.setAttribute("font-family","lato"),u.setAttribute("font-weight","bold"),u.setAttribute("transform","translate(".concat(this.props.width/2,", 17.5)")),u.setAttribute("fill",e.text),"value"===this.props.valueType?(u.style.fontSize="6pt",u.textContent=this.props.unit?"".concat(t," ").concat(this.props.unit):"".concat(t)):u.textContent="".concat(n,"%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.append(o,s,u);break;case"bubble":case"circular-progress-bar":case"circular-progress-bar-alt":if(i.setAttribute("viewBox","0 0 100 100"),"bubble"===this.props.percentileType)(a=document.createElementNS(qt,"circle")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",e.background),a.setAttribute("fill-opacity","0.5"),a.setAttribute("r","50"),(l=document.createElementNS(qt,"circle")).setAttribute("transform","translate(50 50)"),l.setAttribute("fill",e.progress),l.setAttribute("fill-opacity","1"),l.setAttribute("r","".concat(n/2)),i.append(a,l);else{var a,l,c={innerRadius:"circular-progress-bar"===this.props.percentileType?30:0,outerRadius:50,startAngle:0,endAngle:2*Math.PI},p=function(){var t=Nt,e=Bt,n=wt(0),r=null,i=zt,o=Wt,s=jt,a=null;function l(){var l,c,p=+t.apply(this,arguments),u=+e.apply(this,arguments),d=i.apply(this,arguments)-Lt,h=o.apply(this,arguments)-Lt,m=Mt(h-d),f=h>d;if(a||(a=l=Et()),u<p&&(c=u,u=p,p=c),u>Ot)if(m>St-Ot)a.moveTo(u*kt(d),u*It(d)),a.arc(0,0,u,d,h,!f),p>Ot&&(a.moveTo(p*kt(h),p*It(h)),a.arc(0,0,p,h,d,f));else{var _,y,v=d,g=h,b=d,E=h,w=m,M=m,C=s.apply(this,arguments)/2,k=C>Ot&&(r?+r.apply(this,arguments):Tt(p*p+u*u)),x=Pt(Mt(u-p)/2,+n.apply(this,arguments)),P=x,I=x;if(k>Ot){var T=Rt(k/p*It(C)),O=Rt(k/u*It(C));(w-=2*T)>Ot?(b+=T*=f?1:-1,E-=T):(w=0,b=E=(d+h)/2),(M-=2*O)>Ot?(v+=O*=f?1:-1,g-=O):(M=0,v=g=(d+h)/2)}var A=u*kt(v),L=u*It(v),S=p*kt(E),D=p*It(E);if(x>Ot){var R,N=u*kt(g),B=u*It(g),z=p*kt(b),W=p*It(b);if(m<At&&(R=Ht(A,L,z,W,N,B,S,D))){var j=A-R[0],H=L-R[1],V=N-R[0],G=B-R[1],U=1/It(Dt((j*V+H*G)/(Tt(j*j+H*H)*Tt(V*V+G*G)))/2),F=Tt(R[0]*R[0]+R[1]*R[1]);P=Pt(x,(p-F)/(U-1)),I=Pt(x,(u-F)/(U+1))}}M>Ot?I>Ot?(_=Vt(z,W,A,L,u,I,f),y=Vt(N,B,S,D,u,I,f),a.moveTo(_.cx+_.x01,_.cy+_.y01),I<x?a.arc(_.cx,_.cy,I,Ct(_.y01,_.x01),Ct(y.y01,y.x01),!f):(a.arc(_.cx,_.cy,I,Ct(_.y01,_.x01),Ct(_.y11,_.x11),!f),a.arc(0,0,u,Ct(_.cy+_.y11,_.cx+_.x11),Ct(y.cy+y.y11,y.cx+y.x11),!f),a.arc(y.cx,y.cy,I,Ct(y.y11,y.x11),Ct(y.y01,y.x01),!f))):(a.moveTo(A,L),a.arc(0,0,u,v,g,!f)):a.moveTo(A,L),p>Ot&&w>Ot?P>Ot?(_=Vt(S,D,N,B,p,-P,f),y=Vt(A,L,z,W,p,-P,f),a.lineTo(_.cx+_.x01,_.cy+_.y01),P<x?a.arc(_.cx,_.cy,P,Ct(_.y01,_.x01),Ct(y.y01,y.x01),!f):(a.arc(_.cx,_.cy,P,Ct(_.y01,_.x01),Ct(_.y11,_.x11),!f),a.arc(0,0,p,Ct(_.cy+_.y11,_.cx+_.x11),Ct(y.cy+y.y11,y.cx+y.x11),f),a.arc(y.cx,y.cy,P,Ct(y.y11,y.x11),Ct(y.y01,y.x01),!f))):a.arc(0,0,p,E,b,f):a.lineTo(S,D)}else a.moveTo(0,0);if(a.closePath(),l)return a=null,l+""||null}return l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-At/2;return[kt(r)*n,It(r)*n]},l.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:wt(+e),l):t},l.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:wt(+t),l):e},l.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:wt(+t),l):n},l.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:wt(+t),l):r},l.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:wt(+t),l):i},l.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:wt(+t),l):o},l.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:wt(+t),l):s},l.context=function(t){return arguments.length?(a=null==t?null:t,l):a},l}();(a=document.createElementNS(qt,"path")).setAttribute("transform","translate(50 50)"),a.setAttribute("fill",e.background),a.setAttribute("fill-opacity","0.5"),a.setAttribute("d","".concat(p(c))),(l=document.createElementNS(qt,"path")).setAttribute("transform","translate(50 50)"),l.setAttribute("fill",e.progress),l.setAttribute("fill-opacity","1"),l.setAttribute("d","".concat(p(Ut(Ut({},c),{endAngle:c.endAngle*(n/100)})))),i.append(a,l)}var u;if((u=document.createElementNS(qt,"text")).setAttribute("text-anchor","middle"),u.setAttribute("alignment-baseline","middle"),u.setAttribute("font-size","16"),u.setAttribute("font-family","lato"),u.setAttribute("font-weight","bold"),u.setAttribute("fill",e.text),"value"===this.props.valueType&&null!=this.props.value)if(this.props.unit&&this.props.unit.length>0){var d=document.createElementNS(qt,"tspan");d.setAttribute("x","0"),d.setAttribute("dy","1em"),d.textContent="".concat(t),d.style.fontSize="8pt";var h=document.createElementNS(qt,"tspan");h.setAttribute("x","0"),h.setAttribute("dy","1em"),h.textContent="".concat(this.props.unit),h.style.fontSize="8pt",u.append(d,h),u.setAttribute("transform","translate(50 33)")}else u.textContent="".concat(t),u.style.fontSize="8pt",u.setAttribute("transform","translate(50 50)");else u.textContent="".concat(n,"%"),u.setAttribute("transform","translate(50 50)");i.append(u)}return!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||i.setAttribute("opacity","0.2"),null!==i&&r.append(i),r},e.prototype.updateDomElement=function(t){!1===this.meta.isBeingResized&&this.resizeElement(this.props.width,this.props.height),t.innerHTML=this.createDomElement().innerHTML},e.prototype.resizeElement=function(e,n){"progress-bar"===this.props.percentileType?t.prototype.resizeElement.call(this,e,35):t.prototype.resizeElement.call(this,e,e)},e.prototype.resize=function(e){this.resizeElement(e,e);var n=this.props.maxValue||0;"progress-bar"===this.props.percentileType&&(n=35),t.prototype.setProps.call(this,Ut(Ut({},this.props),{width:e,height:n}))},e.prototype.getProgress=function(){var t=this.props.minValue||0,e=this.props.maxValue||100,n=null==this.props.value?0:this.props.value;return n<=t?0:n>=e?100:Math.trunc((n-t)/(e-t)*100)},e}(n.ZP),Yt=Jt,Xt=__webpack_require__(369),Qt=__webpack_require__(709),$t=__webpack_require__(600),te=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ee=function(){return ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ee.apply(this,arguments)};function ne(t){if(null!==t.imageSrc){if("string"!=typeof t.statusImageSrc||0===t.imageSrc.statusImageSrc)throw new TypeError("invalid status image src.")}else if((0,e.VJ)(t.encodedTitle))throw new TypeError("missing encode tittle content.");if(null===(0,e.I1)(t.serviceId,null))throw new TypeError("invalid service id.");return ee(ee({},(0,n.TB)(t)),{type:10,serviceId:t.serviceId,imageSrc:(0,e.JW)(t.imageSrc,null),statusImageSrc:(0,e.JW)(t.statusImageSrc,null),encodedTitle:(0,e.JW)(t.encodedTitle,null)})}var re=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return te(n,t),n.prototype.createDomElement=function(){var t=document.createElement("div");return t.className="service",null!==this.props.statusImageSrc?(t.style.background="url(".concat(this.props.statusImageSrc,") no-repeat"),t.style.backgroundSize="contain",t.style.backgroundPosition="center",null!==this.props.encodedTitle&&(t.className="service image forced_title",t.setAttribute("data-use_title_for_force_title","1"),t.setAttribute("data-title",(0,e.NV)(this.props.encodedTitle)))):null!==this.props.encodedTitle&&(t.innerHTML=(0,e.NV)(this.props.encodedTitle)),t},n.prototype.updateDomElement=function(t){null!==this.props.statusImageSrc?(t.style.background="url(".concat(this.props.statusImageSrc,") no-repeat"),t.style.backgroundSize="contain",t.style.backgroundPosition="center",null!==this.props.encodedTitle&&(t.className="service image forced_title",t.setAttribute("data-use_title_for_force_title","1"),t.setAttribute("data-title",(0,e.NV)(this.props.encodedTitle))),t.innerHTML=""):null!==this.props.encodedTitle&&(t.innerHTML=(0,e.NV)(this.props.encodedTitle))},n}(n.ZP),ie=re,oe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),se=function(){return se=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},se.apply(this,arguments)};function ae(t){return se(se(se({},(0,n.TB)(t)),{type:22,value:(0,e.I1)(t.value,0),status:(0,e.VJ)(t.status)?"#B2B2B2":t.status,titleColor:(0,e.VJ)(t.titleColor)?"#3f3f3f":t.titleColor,title:(0,e.VJ)(t.title)?"":t.title,titleModule:(0,e.VJ)(t.titleModule)?"":t.titleModule,thresholds:(0,e.VJ)(t.thresholds)?"":t.thresholds,minMaxValue:(0,e.VJ)(t.minMaxValue)?"":t.minMaxValue,odometerType:(0,e.VJ)(t.odometerType)?"percent":t.odometerType}),(0,e.MH)(t))}var le,ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.createDomElement=function(){var t="",e="",n="",r="";if(""!==this.props.thresholds){var i=JSON.parse(this.props.thresholds);null!==i&&(0==i.min_warning&&0==i.max_warning||(t=this.getCoords(i.min_warning,this.props.width/2),e=0==i.max_warning?this.getCoords(100,this.props.width/2):this.getCoords(i.max_warning,this.props.width/2)),0==i.min_critical&&0==i.max_critical||(n=this.getCoords(i.min_critical,this.props.width/2),r=0==i.max_critical?this.getCoords(100,this.props.width/2):this.getCoords(i.max_critical,this.props.width/2)))}var o,s="";Number(this.props.value)===this.props.value&&this.props.value%1!=0?o=this.props.value.toFixed(1):(s=""===this.props.minMaxValue?" %":this.getSubfix(this.props.value),o=new Intl.NumberFormat("es",{maximumSignificantDigits:4,maximumFractionDigits:3}).format(this.props.value));var a=o.match(/\d*\.\d/);null!==a&&(o=a[0]);var l=this.getRotate(this.props.value),c=document.getElementById("visual-console-container");null===c&&(c=document.getElementById("visual-console-container-".concat(this.props.cellId))),""==c.style.backgroundColor&&(c.style.backgroundColor="#fff");var p=.7*this.props.width,u=document.createElement("div");u.className="odometer",!0!==this.props.agentDisabled&&!0!==this.props.moduleDisabled||(u.style.opacity="0.2");var d=document.createElement("div");d.className="odometer-container";var h=document.createElement("div");h.className="odometer-a",h.style.backgroundColor="".concat(c.style.backgroundColor);var m=document.createElement("div");m.className="odometer-b",m.id="odometerB-".concat(this.props.id),m.style.backgroundColor="".concat(this.props.status);var f=document.createElement("div");f.className="odometer-c";var _=document.createElement("div");_.className="odometer-d";var y="http://www.w3.org/2000/svg";if(""!=t){var v=document.createElementNS(y,"svg");v.setAttributeNS(null,"width","100%"),v.setAttributeNS(null,"height","100%"),v.setAttributeNS(null,"style","position:absolute;z-index:1");var g=document.createElementNS(y,"path");g.setAttributeNS(null,"id","svgWarning-".concat(this.props.id)),g.setAttributeNS(null,"d","M".concat(this.props.width/2,",").concat(this.props.width/2,"L").concat(t,"A").concat(this.props.width/2,",").concat(this.props.width/2,",0,0,1,").concat(e,"Z")),g.setAttributeNS(null,"class","svg_warning"),v.appendChild(g),d.appendChild(v)}if(""!=n){var b=document.createElementNS(y,"svg");b.setAttributeNS(null,"width","100%"),b.setAttributeNS(null,"height","100%"),b.setAttributeNS(null,"style","position:absolute;z-index:2");var E=document.createElementNS(y,"path");E.setAttributeNS(null,"id","svgCritical-".concat(this.props.id)),E.setAttributeNS(null,"d","M".concat(this.props.width/2,",").concat(this.props.width/2,"L").concat(n,"A").concat(this.props.width/2,",").concat(this.props.width/2,",0,0,1,").concat(r,"Z")),E.setAttributeNS(null,"fill","#E63C52"),b.appendChild(E),d.appendChild(b)}var w=document.createElement("h1");w.innerText=o+s,w.style.fontSize="".concat(.17*p,"px"),w.style.color="".concat(this.props.status),w.style.lineHeight="0";var M=document.createElement("h2");""==this.props.title?M.textContent=this.truncateTitle(this.props.moduleName):M.textContent=this.truncateTitle(this.props.title),M.title=this.props.titleModule,M.setAttribute("title",this.props.titleModule),M.style.fontSize="".concat(.06*p,"px"),M.style.color="".concat(this.props.titleColor),M.style.lineHeight="0";var C=document.createElement("script");C.type="text/javascript",C.onload=function(){m.style.transform="rotate(".concat(l,"turn)")};var k=window.location.pathname.split("/")[1];return C.src="".concat(document.dir,"/").concat(k,"/include/javascript/pandora_alerts.js"),h.appendChild(w),h.appendChild(M),d.appendChild(m),d.appendChild(f),d.appendChild(_),d.appendChild(h),d.appendChild(C),u.appendChild(d),u},e.prototype.updateDomElement=function(t){var e=this;t.innerHTML=this.createDomElement().innerHTML;var n=this.getRotate(this.props.value),r=document.getElementById("svgWarning-".concat(this.props.id));null!=r&&(r.style.display="none");var i=document.getElementById("svgCritical-".concat(this.props.id));null!=i&&(i.style.display="none"),setTimeout((function(){null!=r&&(r.style.display="block"),null!=i&&(i.style.display="block");var t=document.getElementById("odometerB-".concat(e.props.id));t&&(t.style.transform="rotate(".concat(n,"turn)"))}),500)},e.prototype.resizeElement=function(e){t.prototype.resizeElement.call(this,e,e/2)},e.prototype.resize=function(t){this.resizeElement(this.props.width)},e.prototype.getRotate=function(t){var e=0;if(""===this.props.minMaxValue)e=t/2/100;else{var n=JSON.parse(this.props.minMaxValue);if(n.min===t)e=0;else if(n.max===t)e=.5;else{var r=n.max-n.min;e=(100-100*(n.max-t)/r)/100/2}}return e},e.prototype.getSubfix=function(t){var e="",n=(t+"").length;return n>3&&n<=6?e=" K":n>6&&n<=9?e=" M":n>9&&n<=12?e=" G":n>12&&n<=15&&(e=" T"),e},e.prototype.getCoords=function(t,e){if(""!==this.props.minMaxValue){var n=JSON.parse(this.props.minMaxValue);if(n.min===t)t=0;else if(n.max===t||100===t)t=100;else{var r=n.max-n.min;t=100-100*(n.max-t)/r}}t=180-1.8*t;var i=e+Math.cos(t*Math.PI/180)*e,o=e-Math.sin(t*Math.PI/180)*e;return"".concat(i,",").concat(o)},e.prototype.truncateTitle=function(t){if(null!=t&&t.length>22){var e=t.length/2,n=e-9,r=t.substr(0,e-n),i=t.substr(e+n);return"".concat(r,"...").concat(i)}return t},e}(n.ZP),pe=ce,ue=__webpack_require__(880),de=function(){return de=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},de.apply(this,arguments)};function he(t){var n=(0,e.I1)(t.type,null);if(null==n)throw new TypeError("missing item type.");switch(n){case 0:return s(t);case 1:return(0,$t.C)(t);case 2:case 6:case 7:case 8:return ut(t);case 3:case 9:case 15:case 16:return Zt(t);case 4:return ot(t);case 5:return u(t);case 10:return ne(t);case 11:return V(t);case 12:return tt(t);case 13:return O(t);case 14:return(0,mt.o)(t);case 17:return(0,Xt.p)(t);case 18:return(0,Qt.K)(t);case 19:return J(t);case 20:return E(t);case 21:return B(t);case 22:return ae(t);case 23:return(0,ue.u)(t);default:throw new TypeError("decoder not found")}}var me=function(){function t(t,n,r){var i=this;this.elementsById={},this.elementIds=[],this.relations={},this.lineLinks={},this.lines={},this.clickEventManager=new P.Z,this.dblClickEventManager=new P.Z,this.movedEventManager=new P.Z,this.lineMovedEventManager=new P.Z,this.resizedEventManager=new P.Z,this.selectionChangedEventManager=new P.Z,this.disposables=[],this.handleElementClick=function(t){i.clickEventManager.emit(t)},this.handleElementDblClick=function(t){i.dblClickEventManager.emit(t)},this.handleElementMovement=function(t){var e=t.item.props.id;i.getItemRelations(e).forEach((function(n){n.parentId===e?n.line.props=de(de({},n.line.props),{startPosition:i.getVisualCenter(t.newPosition,t.item)}):n.childId===e&&(n.line.props=de(de({},n.line.props),{endPosition:i.getVisualCenter(t.newPosition,t.item)}))})),i.updateLinesConnected(t.item.props,t.newPosition,!1)},this.handleElementMovementFinished=function(t){i.movedEventManager.emit(t),i.updateLinesConnected(t.item.props,t.newPosition,!0)},this.handleLineElementMovementFinished=function(t){i.refreshLink(t.item),i.lineMovedEventManager.emit(t)},this.handleElementResizement=function(t){var e=t.item,n=e.props,r=n.id,o=i.getItemRelations(r),s={x:n.x,y:n.y},a=i.elementsById[r].meta;i.elementsById[r].meta=de(de({},a),{isUpdating:!0}),o.forEach((function(t){t.parentId===r?t.line.props=de(de({},t.line.props),{startPosition:i.getVisualCenter(s,e)}):t.childId===r&&(t.line.props=de(de({},t.line.props),{endPosition:i.getVisualCenter(s,e)}))}))},this.handleElementResizementFinished=function(t){i.resizedEventManager.emit(t)},this.handleElementRemove=function(t){i.elementIds=i.elementIds.filter((function(e){return e!==t.item.props.id})),delete i.elementsById[t.item.props.id],i.clearRelations(t.item.props.id)},this.handleElementSelectionChanged=function(t){i.elements.filter((function(t){return 1==t.meta.isSelected})).length>0?t.selected=!0:t.selected=!1,i.selectionChangedEventManager.emit(t)},this.handleContainerClick=function(){i.unSelectItems()},this.containerRef=t,this._props=function(t){var n=t.id,r=t.name,i=t.groupId,o=t.backgroundURL,s=t.backgroundColor,a=t.isFavorite,l=t.relationLineWidth,c=t.maintenanceMode;if(null==n||isNaN(parseInt(n)))throw new TypeError("invalid Id.");if("string"!=typeof r||0===r.length)throw new TypeError("invalid name.");if(null==i||isNaN(parseInt(i)))throw new TypeError("invalid group Id.");return de({id:parseInt(n),name:r,groupId:parseInt(i),backgroundURL:(0,e.JW)(o,null),backgroundColor:(0,e.JW)(s,null),isFavorite:(0,e.gx)(a),relationLineWidth:(0,e.I1)(l,0),maintenanceMode:c},(0,e.HY)(t))}(n),this.render(),(r=r.sort((function(t,e){return null==t.id||null==e.id?0:t.id>e.id?1:-1}))).forEach((function(t){return i.addElement(t,i)})),this.buildRelations(),this.elements.forEach((function(t){t instanceof S&&i.refreshLink(t)})),this.containerRef.addEventListener("click",this.handleContainerClick)}return t.prototype.coordinatesInItem=function(t,e,n){return 13!=n.type&&21!=n.type&&t>n.x&&t<n.x+n.width&&e>n.y&&e<n.y+n.height},t.prototype.refreshLink=function(t){var e=t.props.id,n=0,r=0;try{for(var i in this.elementsById)this.coordinatesInItem(t.props.startPosition.x,t.props.startPosition.y,this.elementsById[i].props)&&(n=parseInt(i)),this.coordinatesInItem(t.props.endPosition.x,t.props.endPosition.y,this.elementsById[i].props)&&(r=parseInt(i));for(var i in null==this.lineLinks&&(this.lineLinks={}),null==this.lines&&(this.lines={}),n==e&&(n=0),r==e&&(r=0),null==this.lines[e]&&(this.lines[e]={start:n,end:r}),n>0?(null==this.lineLinks[n]&&(this.lineLinks[n]={}),this.lineLinks[n][e]={start:n,end:r}):this.lines[e].start>0&&(this.lineLinks[this.lines[e].start][e].start=0,this.lines[e].start=0),r>0?(null==this.lineLinks[r]&&(this.lineLinks[r]={}),this.lineLinks[r][e]={start:n,end:r}):this.lines[e].end>0&&(this.lineLinks[this.lines[e].end][e].end=0,this.lines[e].end=0),this.lines[e]={start:n,end:r},this.lineLinks)this.lineLinks[i][e]&&(0==this.lineLinks[i][e].start&&0==this.lineLinks[i][e].end&&(delete this.lineLinks[i][e],0===Object.keys(this.lineLinks[i]).length&&delete this.lineLinks[i]),(this.lineLinks[i][e].start!=n&&this.lineLinks[i][e].end==r||this.lineLinks[i][e].start==n&&this.lineLinks[i][e].end!=r)&&(delete this.lineLinks[i][e],0===Object.keys(this.lineLinks[i]).length&&delete this.lineLinks[i]))}catch(t){console.error(t)}},t.prototype.updateLinesConnected=function(t,n,r){var i=this;null!=this.lineLinks[t.id]&&(Object.keys(this.lineLinks[t.id]).forEach((function(o){var s=parseInt(o);if(-1!==i.elementIds.indexOf(s)){var a=i.elementsById[s];if(a.props){var l=a.props.startPosition.x,c=a.props.startPosition.y,p=a.props.endPosition.x,u=a.props.endPosition.y;t.id==i.lineLinks[t.id][s].start&&(l=n.x+t.width/2,c=n.y+t.height/2),t.id==i.lineLinks[t.id][s].end&&(p=n.x+t.width/2,u=n.y+t.height/2),i.updateElement(de(de({},a.props),{startX:l,startY:c,endX:p,endY:u})),r&&(0,e.Ds)(500,(function(t){i.lineMovedEventManager.emit({item:t.line,startPosition:{x:t.startX,y:t.startY},endPosition:{x:t.endX,y:t.endY}})}))({line:a,startX:l,startY:c,endX:p,endY:u})}}})),this.buildRelations(t.id,n.x+t.width/2,n.y+t.height/2))},Object.defineProperty(t.prototype,"elements",{get:function(){var t=this;return this.elementIds.map((function(e){return t.elementsById[e]})).filter((function(t){return null!=t}))},enumerable:!1,configurable:!0}),t.prototype.addElement=function(t,n){void 0===n&&(n=this);try{var r=function(t){var n=(0,e.I1)(t.type,null);if(null==n)throw new TypeError("missing item type.");var r=(0,e.SM)(t);switch(n){case 0:return new l(s(t),r);case 1:return new $t.Z((0,$t.C)(t),r);case 2:case 6:case 7:case 8:return new ht(ut(t),r);case 3:case 9:case 15:case 16:return new Yt(Zt(t),r);case 4:return new at(ot(t),r);case 5:return new h(u(t),r);case 10:return new ie(ne(t),r);case 11:return new U(V(t),r);case 12:return new nt(tt(t),r);case 13:return new S(O(t),r);case 14:return new mt.Z((0,mt.o)(t),r);case 17:return new Xt.Z((0,Xt.p)(t),r);case 18:return new Qt.Z((0,Qt.K)(t),r);case 19:return new X(J(t),r);case 20:return new x(E(t),r);case 21:return new W(B(t),r);case 22:return new pe(ae(t),r);case 23:return new ue.Z((0,ue.u)(t),r);default:throw new TypeError("item not found")}}(t);return n.elementsById[r.props.id]=r,n.elementIds.push(r.props.id),r.onRemove(n.handleElementRemove),r.onSelectionChanged(n.handleElementSelectionChanged),r.onClick(n.handleElementClick),r.onDblClick(n.handleElementDblClick),r instanceof S?(r.onLineMovementFinished(n.handleLineElementMovementFinished),this.refreshLink(r)):(r.onMoved(n.handleElementMovement),r.onMovementFinished(n.handleElementMovementFinished),r.onResized(n.handleElementResizement),r.onResizeFinished(n.handleElementResizementFinished)),n.containerRef.append(r.elementRef),r}catch(t){console.error("Error creating a new element:",t.message)}},t.prototype.updateElements=function(t){var e=this,n=t.map((function(t){return t.id||null})).filter((function(t){return null!=t}));this.elementIds.filter((function(t){return n.indexOf(t)<0})).forEach((function(t){null!=e.elementsById[t]&&(e.elementsById[t].remove(),delete e.elementsById[t])})),this.elementIds=n,t.forEach((function(t){if(t.id)if(null==e.elementsById[t.id])e.addElement(t);else try{e.elementsById[t.id].props=he(t)}catch(t){console.error("Error updating an element:",t.message)}})),this.buildRelations()},t.prototype.updateElement=function(t){try{this.elementsById[t.id].props=de({},he(t))}catch(t){console.error("Error updating element:",t.message)}this.buildRelations()},Object.defineProperty(t.prototype,"props",{get:function(){return de({},this._props)},set:function(t){var e=this.props;this._props=t,this.render(e)},enumerable:!1,configurable:!0}),t.prototype.render=function(t){void 0===t&&(t=null),t?(t.backgroundURL!==this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url(".concat(this.props.backgroundURL,")"):""),null!=this.props.backgroundColor&&t.backgroundColor!==this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.sizeChanged(t,this.props)&&this.resizeElement(this.props.width,this.props.height)):(this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url(".concat(this.props.backgroundURL,")"):""),this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.resizeElement(this.props.width,this.props.height))},t.prototype.sizeChanged=function(t,e){return t.width!==e.width||t.height!==e.height},t.prototype.resizeElement=function(t,e){this.containerRef.style.width="".concat(t,"px"),this.containerRef.style.height="".concat(e,"px")},t.prototype.resize=function(t,e){this.props=de(de({},this.props),{width:t,height:e})},t.prototype.remove=function(){this.disposables.forEach((function(t){return t.dispose()})),this.elements.forEach((function(t){return t.remove()})),this.elementsById={},this.elementIds=[],this.clearRelations(),this.containerRef.removeEventListener("click",this.handleContainerClick),this.containerRef.innerHTML=""},t.prototype.buildRelations=function(t,e,n){var r=this;this.clearRelations(),this.elements.forEach((function(i){if(null!==i.props.parentId){var o=r.elementsById[i.props.parentId],s=r.elementsById[i.props.id];o&&s&&(null!=t?i.props.parentId==t?r.addRelationLine(o,s,e,n):i.props.id==t?r.addRelationLine(o,s,void 0,void 0,e,n):r.addRelationLine(o,s):r.addRelationLine(o,s))}}))},t.prototype.clearRelations=function(t){if(null!=t)for(var e in this.relations){var n=e.split("|"),r=Number.parseInt(n[0]),i=Number.parseInt(n[1]);t!==r&&t!==i||(this.relations[e].remove(),delete this.relations[e])}else for(var e in this.relations)this.relations[e].remove(),delete this.relations[e]},t.prototype.getRelationLine=function(t,e){var n="".concat(t,"|").concat(e);return this.relations[n]||null},t.prototype.getItemRelations=function(t){var e=[];for(var n in this.relations){var r=n.split("|"),i=Number.parseInt(r[0]),o=Number.parseInt(r[1]);t!==i&&t!==o||e.push({parentId:i,childId:o,line:this.relations[n]})}return e},t.prototype.getVisualCenter=function(t,e){var n=t.x+e.elementRef.clientWidth/2,r=t.y+e.elementRef.clientHeight/2;if(void 0!==e.props.label||""!==e.props.label||null!==e.props.label)switch(e.props.labelPosition){case"up":r=t.y+(e.elementRef.clientHeight+e.labelElementRef.clientHeight)/2;break;case"down":r=t.y+(e.elementRef.clientHeight-e.labelElementRef.clientHeight)/2;break;case"right":n=t.x+(e.elementRef.clientWidth-e.labelElementRef.clientWidth)/2;break;case"left":n=t.x+(e.elementRef.clientWidth+e.labelElementRef.clientWidth)/2}return{x:n,y:r}},t.prototype.addRelationLine=function(t,n,r,i,o,s){var a="".concat(t.props.id,"|").concat(n.props.id);null!=this.relations[a]&&this.relations[a].remove();var l=this.getVisualCenter(t.props,t),c=l.x,p=l.y,u=this.getVisualCenter(n.props,n),d=u.x,h=u.y;null!=r&&(c=r),null!=i&&(p=i),null!=o&&(d=o),null!=s&&(h=s);var m=new S(O({id:0,type:13,startX:c,startY:p,endX:d,endY:h,width:0,height:0,lineWidth:this.props.relationLineWidth,color:(0,e.JW)(n.props.colorStatus,"#CCC")}),(0,e.SM)({receivedAt:new Date}));return this.relations[a]=m,m.elementRef.style.zIndex="0",this.containerRef.append(m.elementRef),m},t.prototype.onItemClick=function(t){var e=this.clickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemDblClick=function(t){var e=this.dblClickEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemMoved=function(t){var e=this.movedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onLineMoved=function(t){var e=this.lineMovedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemResized=function(t){var e=this.resizedEventManager.on(t);return this.disposables.push(e),e},t.prototype.onItemSelectionChanged=function(t){var e=this.selectionChangedEventManager.on(t);return this.disposables.push(e),e},t.prototype.enableEditMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{editMode:!0})})),this.containerRef.classList.add("is-editing")},t.prototype.disableEditMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{editMode:!1})})),this.containerRef.classList.remove("is-editing")},t.prototype.enableMaintenanceMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{maintenanceMode:!0})})),this.containerRef.classList.add("is-maintenance"),this.containerRef.classList.remove("is-editing")},t.prototype.disableMaintenanceMode=function(){this.elements.forEach((function(t){t.meta=de(de({},t.meta),{maintenanceMode:!1})})),this.containerRef.classList.remove("is-maintenance"),this.containerRef.classList.add("is-editing")},t.prototype.selectItem=function(t,e){var n=this;void 0===e&&(e=!1),e?this.elementIds.forEach((function(e){var r=n.elementsById[e].meta;e!==t&&r.isSelected?n.elementsById[e].unSelectItem():e!==t||r.isSelected||n.elementsById[e].selectItem()})):this.elementsById[t]&&this.elementsById[t].selectItem()},t.prototype.unSelectItem=function(t){this.elementsById[t]&&this.elementsById[t].meta.isSelected&&this.elementsById[t].unSelectItem()},t.prototype.unSelectItems=function(){var t=this;this.elementIds.forEach((function(e){t.elementsById[e]&&t.elementsById[e].unSelectItem()}))},t.itemDescriptiveName=function(t){var n;switch(t.props.type){case 0:n="".concat((0,e.t)("Static graph")," - ").concat(t.props.imageSrc);break;case 1:n=(0,e.t)("Module graph");break;case 19:n=(0,e.t)("Clock");break;case 18:n=(0,e.t)("Bars graph");break;case 14:n=(0,e.t)("Event history graph");break;case 3:n=(0,e.t)("Percentile bar");break;case 15:n=(0,e.t)("Circular progress bar");break;case 16:n=(0,e.t)("Circular progress bar (interior)");break;case 2:n=(0,e.t)("Simple Value");break;case 4:n=(0,e.t)("Label");break;case 11:n=(0,e.t)("Group");break;case 20:n=(0,e.t)("Color cloud");break;case 5:n="".concat((0,e.t)("Icon")," - ").concat(t.props.imageSrc);break;case 22:n=(0,e.t)("Odometer");break;case 23:n=(0,e.t)("BasicChart");break;default:n=(0,e.t)("Item")}var r=t.props;return null!=r.agentAlias&&null!=r.moduleName?n+=" (".concat((0,e.fk)(r.agentAlias,18)," - ").concat((0,e.fk)(r.moduleName,25),")"):null!=r.agentAlias&&(n+=" (".concat((0,e.fk)(r.agentAlias,25),")")),n},t.items=((le={})[0]=l,le[1]=$t.Z,le[2]=ht,le[6]=ht,le[7]=ht,le[8]=ht,le[3]=Yt,le[9]=Yt,le[15]=Yt,le[16]=Yt,le[4]=at,le[5]=h,le[10]=ie,le[11]=U,le[12]=nt,le[13]=S,le[14]=mt.Z,le[17]=Xt.Z,le[18]=Qt.Z,le[19]=X,le[20]=x,le[21]=W,le[22]=pe,le[23]=ue.Z,le),t}(),fe=function(){function t(t){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new P.Z,this.disposables=[],this.taskInitiator=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(t){this._status=t,this.statusChangeEventManager.emit(t)},enumerable:!1,configurable:!0}),t.prototype.init=function(){var t=this;this.cancellable=this.taskInitiator((function(){t.status="finished"})),this.status="started"},t.prototype.cancel=function(){this.cancellable.cancel(),this.status="cancelled"},t.prototype.onStatusChange=function(t){var e=this.statusChangeEventManager.on(t);return this.disposables.push(e),e},t}(),_e=function(){function t(){this.tasks={}}return t.prototype.add=function(t,e,n){void 0===n&&(n=0),this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel();var r=n>0?function(t,e){return new fe((function(){var n=null;return t.onStatusChange((function(r){"finished"===r&&(n=window.setTimeout((function(){t.init()}),e))})),t.init(),{cancel:function(){n&&clearTimeout(n),t.cancel()}}}))}(new fe(e),n):new fe(e);return this.tasks[t]=r,this.tasks[t]},t.prototype.init=function(t){!this.tasks[t]||"waiting"!==this.tasks[t].status&&"cancelled"!==this.tasks[t].status&&"finished"!==this.tasks[t].status||this.tasks[t].init()},t.prototype.cancel=function(t){this.tasks[t]&&"started"===this.tasks[t].status&&this.tasks[t].cancel()},t}();window.VisualConsole=me,window.VisualConsole.Form=m,window.AsyncTaskManager=_e}()})();
//# sourceMappingURL=vc.main.min.js.map