!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";n.d(t,"n",(function(){return i})),n.d(t,"m",(function(){return o})),n.d(t,"s",(function(){return s})),n.d(t,"k",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"o",(function(){return p})),n.d(t,"r",(function(){return u})),n.d(t,"j",(function(){return d})),n.d(t,"i",(function(){return h})),n.d(t,"h",(function(){return m})),n.d(t,"p",(function(){return f})),n.d(t,"d",(function(){return b})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return g})),n.d(t,"q",(function(){return y})),n.d(t,"c",(function(){return E})),n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return M})),n.d(t,"t",(function(){return k})),n.d(t,"e",(function(){return C}));n(10),n(4),n(5),n(13);var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&!isNaN(parseInt(e))?parseInt(e):t}function o(e,t){return"number"==typeof e?e:"string"==typeof e&&e.length>0&&!isNaN(parseFloat(e))?parseFloat(e):t}function s(e){return null==e||0===e.length}function a(e,t){return"string"==typeof e&&e.length>0?e:t}function l(e){return"boolean"==typeof e?e:"number"==typeof e?e>0:"string"==typeof e&&("1"===e||"true"===e)}function c(e,t,n){void 0===n&&(n=" "),"number"==typeof e&&(e=""+e),"number"==typeof n&&(n=""+n);var r=t-e.length;if(0===r)return e;if(r<0)return e.substr(Math.abs(r));if(r===n.length)return""+n+e;if(r0&&rb||d+o+v.width-y>u.width||o===_&&d<0&&r>f+_+c,C=i0&&im||g+s+v.height-y>u.height||s===E&&g<0&&i>h+E+p;(t=O?0:k?_:d+o)<0&&(t=0),(n=C?0:x?E:g+s)<0&&(n=0),a=r,l=i,t===o&&n===s||(M(t,n),w(t,n),o=t,s=n)},C=function(){o=0,s=0,a=0,l=0,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",C),e.draggable=i,document.body.style.userSelect="auto"},x=function(t){if(2!==t.button){t.stopPropagation(),e.draggable=!1,e.setAttribute("ondragstart","return false;"),e.setAttribute("draggable","false");var n=O(e,r);o=n.left,s=n.top,a=t.pageX,l=t.pageY,c=t.offsetX,p=t.offsetY,u=r.getBoundingClientRect(),d=O(r),h=d.top,m=h+u.height,f=d.left,b=f+u.width,v=e.getBoundingClientRect(),g=window.getComputedStyle(e).borderWidth||"0",y=2*Number.parseInt(g),document.addEventListener("mousemove",k),document.addEventListener("mouseup",C),document.body.style.userSelect="none"}};return e.addEventListener("mousedown",x),function(){e.removeEventListener("mousedown",x),C()}}function M(e,t){var n=document.createElement("div");n.className="resize-draggable",e.appendChild(n);var r=e.parentElement,i=e.draggable,o=0,s=0,a=0,l=0,c=0,p=r.getBoundingClientRect(),u=O(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,b=O(e),v=b.top,g=b.left,y=window.getComputedStyle(e).borderWidth||"0",w=Number.parseInt(y),M=E(32,t),k=_(16,t),C=function(e){var t=o+(e.pageX-a),n=s+(e.pageY-l);t===o&&n===s||tg+(o-c)||(t<15?t=15:t+g-w/2>=f&&(t=f-g),n<15?n=15:n+v-w/2>=h&&(n=h-v),k(t,n),M(t,n),o=t,s=n,a=e.pageX,l=e.pageY)},x=function(){o=0,s=0,a=0,l=0,c=0,0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),e.draggable=i,document.body.style.userSelect="auto"};return n.addEventListener("mousedown",(function(t){t.stopPropagation(),e.draggable=!1;var n=e.getBoundingClientRect(),i=n.width,y=n.height;o=i,s=y,a=t.pageX,l=t.pageY,c=t.offsetX,t.offsetY,p=r.getBoundingClientRect(),u=O(r),d=u.top,h=d+p.height,m=u.left,f=m+p.width,b=O(e),v=b.top,g=b.left,document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.body.style.userSelect="none"})),function(){n.remove(),x()}}function k(e){return e}function C(e,t,n){return void 0===t&&(t=140),void 0===n&&(n="…"),e.trim().length>t?e.substr(0,t).trim()+n:e}},function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(0),i=n(2),o=n(3),s=function(){return(s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var r=t.labelElementRef.getBoundingClientRect(),i=r.width,o=r.height;switch(t.props.labelPosition){case"up":case"down":n-=o;break;case"left":case"right":e-=i}}var s={width:t.props.width,height:t.props.height},a={width:e,height:n};t.sizeChanged(s,a)&&(t.resizeElement(e,n),t.resizedEventManager.emit({item:t,prevSize:s,newSize:a}),t.debouncedResizementSave(e,n))})))},e.prototype.stopResizementListener=function(){this.removeResizement&&(this.removeResizement(),this.removeResizement=null)},e.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)},e.prototype.createContainerDomElement=function(){var e,t=this;return this.props.isLinkEnabled?(e=document.createElement("a"),this.props.link?e.href=this.props.link:e.className="textDecorationNone"):(e=document.createElement("div")).className="textDecorationNone",e.classList.add("visual-console-item"),this.props.isOnTop&&e.classList.add("is-on-top"),e.style.left=this.props.x+"px",e.style.top=this.props.y+"px",e.addEventListener("dblclick",(function(e){t.meta.isBeingMoved||t.meta.isBeingResized||(t.unSelectItem(),t.selectItem(),t.dblClickEventManager.emit({item:t,nativeEvent:e}))})),e.addEventListener("click",(function(e){if(t.meta.editMode)e.preventDefault(),e.stopPropagation();else if(t.itemProps.isLinkEnabled&&null!=t.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=e.composedPath(),o="visual-console-container",s=0;s0){var n=document.createElement("table"),r=document.createElement("tr"),i=document.createElement("tr"),o=document.createElement("tr"),s=document.createElement("td");switch(s.innerHTML=t,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=this.props.width+"px",n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height=this.props.height+"px")}e.appendChild(n)}return e},e.prototype.getLabelWithMacrosReplaced=function(){var e=this.props;return Object(r.q)([{macro:"_date_",value:Object(r.f)(new Date)},{macro:"_time_",value:Object(r.g)(new Date)},{macro:"_agent_",value:null!=e.agentAlias?e.agentAlias:""},{macro:"_agentdescription_",value:null!=e.agentDescription?e.agentDescription:""},{macro:"_address_",value:null!=e.agentAddress?e.agentAddress:""},{macro:"_module_",value:null!=e.moduleName?e.moduleName:""},{macro:"_moduledescription_",value:null!=e.moduleDescription?e.moduleDescription:""}],this.props.label||"")},e.prototype.updateDomElement=function(e){e.innerHTML=this.createDomElement().innerHTML},Object.defineProperty(e.prototype,"props",{get:function(){return s({},this.itemProps)},set:function(e){this.setProps(e)},enumerable:!1,configurable:!0}),e.prototype.setProps=function(e){var t=this.props;this.itemProps=e,this.shouldBeUpdated(t,e)&&this.render(t,this._metadata)},Object.defineProperty(e.prototype,"meta",{get:function(){return s({},this._metadata)},set:function(e){this.setMeta(e)},enumerable:!1,configurable:!0}),e.prototype.setMeta=function(e){var t=this._metadata;this._metadata=s(s({},t),e),void 0!==e.isSelected&&t.isSelected!==e.isSelected&&this.selectionChangedEventManager.emit({selected:e.isSelected}),this.render(this.itemProps,t)},e.prototype.shouldBeUpdated=function(e,t){return e!==t},e.prototype.render=function(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this.updateDomElement(this.childElementRef),e&&!this.positionChanged(e,this.props)||this.moveElement(this.props.x,this.props.y),e&&!this.sizeChanged(e,this.props)||this.resizeElement(this.props.width,this.props.height);var n=this.labelElementRef.innerHTML,r=this.createLabelDomElement().innerHTML;if(n!==r&&(this.labelElementRef.innerHTML=r),e&&e.labelPosition===this.props.labelPosition||this.changeLabelPosition(this.props.labelPosition),e&&e.isOnTop===this.props.isOnTop||(this.props.isOnTop?this.elementRef.classList.add("is-on-top"):this.elementRef.classList.remove("is-on-top")),e&&e.isLinkEnabled!==this.props.isLinkEnabled){var i=this.createContainerDomElement();i.innerHTML=this.elementRef.innerHTML;for(var o=this.elementRef.attributes,s=0;s0?t.item(0):null;if(n)switch(this.props.labelPosition){case"up":case"down":this.props.width>0&&(n.style.width=this.props.width+"px",n.style.height="");break;case"left":case"right":this.props.height>0&&(n.style.width="",n.style.height=this.props.height+"px")}},e.prototype.moveElement=function(e,t){this.elementRef.style.left=e+"px",this.elementRef.style.top=t+"px"},e.prototype.move=function(e,t){this.moveElement(e,t),this.itemProps=s(s({},this.props),{x:e,y:t})},e.prototype.sizeChanged=function(e,t){return e.width!==t.width||e.height!==t.height},e.prototype.resizeElement=function(e,t){if(13!=this.props.type&&21!=this.props.type&&(this.childElementRef.style.width=e>0?e+"px":"",this.childElementRef.style.height=t>0?t+"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=e>0?e+"px":"";break;case"left":case"right":r.style.height=t>0?t+"px":""}}},e.prototype.resize=function(e,t){this.resizeElement(e,t),this.itemProps=s(s({},this.props),{width:e,height:t})},e.prototype.onClick=function(e){var t=this.clickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onDblClick=function(e){var t=this.dblClickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onMoved=function(e){var t=this.movedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onMovementFinished=function(e){var t=this.movementFinishedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onResized=function(e){var t=this.resizedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onResizeFinished=function(e){var t=this.resizeFinishedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onRemove=function(e){var t=this.removeEventManager.on(e);return this.disposables.push(t),t},e.prototype.onSelectionChanged=function(e){var t=this.selectionChangedEventManager.on(e);return this.disposables.push(t),t},e.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)},e.prototype.unSelectItem=function(){this.meta=s(s({},this.meta),{isSelected:!1}),this.stopMovementListener(),13!==this.props.type&&this.stopResizementListener()},e.prototype.getFormContainer=function(){return e.getFormContainer(this.props)},e.getFormContainer=function(e){var t=e.type?function(e){var t="";switch(e){case 0:t=Object(r.t)("Static image");break;case 1:t=Object(r.t)("Module graph");break;case 2:t=Object(r.t)("Simple value");break;case 3:t=Object(r.t)("Percentile item");break;case 4:t=Object(r.t)("Label");break;case 5:t=Object(r.t)("Icon");break;case 6:case 7:case 8:t=Object(r.t)("Simple value");break;case 9:t=Object(r.t)("Percentile item");break;case 10:t=Object(r.t)("Service");break;case 11:t=Object(r.t)("Group");break;case 12:t=Object(r.t)("Box");break;case 13:t=Object(r.t)("Line");break;case 14:t=Object(r.t)("Event history graph");break;case 15:case 16:t=Object(r.t)("Percentile item");break;case 17:t=Object(r.t)("Serialized pie graph");break;case 18:t=Object(r.t)("Bars graph");break;case 19:t=Object(r.t)("Clock");break;case 20:t=Object(r.t)("Color cloud");break;case 21:t=Object(r.t)("Network link");break;case 22:t=Object(r.t)("Odometer");break;case 23:t=Object(r.t)("Basic chart");break;default:t=Object(r.t)("Item")}return t}(e.type):Object(r.t)("Item");return new o.FormContainer(t,[],[])},e}();t.a=c},function(e,t,n){"use strict";var r=function(){var e=this;this.listeners=[],this.listenersOncer=[],this.on=function(t){return e.listeners.push(t),{dispose:function(){return e.off(t)}}},this.once=function(t){e.listenersOncer.push(t)},this.off=function(t){var n=e.listeners.indexOf(t);n>-1&&e.listeners.splice(n,1)},this.emit=function(t){e.listeners.forEach((function(e){return e(t)})),e.listenersOncer.forEach((function(e){return e(t)})),e.listenersOncer=[]},this.pipe=function(t){return e.on((function(e){return t.emit(e)}))}};t.a=r},function(e,t,n){"use strict";n.r(t),n.d(t,"InputGroup",(function(){return s})),n.d(t,"FormContainer",(function(){return a}));var r=n(2),i=function(){return(i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(this.inputGroupsByName=t.reduce((function(e,t){return t.onDataRequested(i.handleItemDataRequested),e[t.name]=t,e}),this.inputGroupsByName)),n.length>0&&(this.enabledInputGroupNames=o(this.enabledInputGroupNames,n.filter((function(e){return null!=i.inputGroupsByName[e]}))))}return e.prototype.getInputGroup=function(e){return this.inputGroupsByName[e]||null},e.prototype.addInputGroup=function(e,t){return void 0===t&&(t=null),e.onDataRequested(this.handleItemDataRequested),this.inputGroupsByName[e.name]=e,this.enabledInputGroupNames=this.enabledInputGroupNames.filter((function(t){return t!==e.name})),null!==t?t<=0?this.enabledInputGroupNames=o([e.name],this.enabledInputGroupNames):t>=this.enabledInputGroupNames.length?this.enabledInputGroupNames=o(this.enabledInputGroupNames,[e.name]):this.enabledInputGroupNames=o(this.enabledInputGroupNames.slice(0,t),[e.name],this.enabledInputGroupNames.slice(t)):this.enabledInputGroupNames=o(this.enabledInputGroupNames,[e.name]),this},e.prototype.removeInputGroup=function(e){return delete this.inputGroupsByName[e],this.enabledInputGroupNames=this.enabledInputGroupNames.filter((function(t){return t!==e})),this},e.prototype.getFormElement=function(e){var t=this;void 0===e&&(e="update");var n=document.createElement("form");n.id="visual-console-item-edition",n.className="visual-console-item-edition",n.addEventListener("submit",(function(e){e.preventDefault(),t.submitEventManager.emit({nativeEvent:e,data:t.enabledInputGroupNames.reduce((function(e,n){return t.inputGroupsByName[n]&&(e=i(i({},e),t.inputGroupsByName[n].data)),e}),{})})}));var r=document.createElement("div");return r.className="input-groups",this.enabledInputGroupNames.forEach((function(e){t.inputGroupsByName[e]&&r.appendChild(t.inputGroupsByName[e].element)})),n.appendChild(r),n},e.prototype.reset=function(){var e=this;this.enabledInputGroupNames.forEach((function(t){e.inputGroupsByName[t]&&e.inputGroupsByName[t].reset()}))},e.prototype.onSubmit=function(e){return this.submitEventManager.on(e)},e.prototype.onInputGroupDataRequested=function(e){return this.itemDataRequestedEventManager.on(e)},e}()},function(e,t,n){"use strict";n(12);var r="http://www.w3.org/2000/svg";t.a=function(e,t,n){var i=void 0===n?{}:n,o=i.size,s=i.color,a=i.spin,l=i.pulse,c=document.createElement("figure");c.title=t,c.className="fa fa-"+e.iconName,o&&c.classList.add("fa-"+o),a?c.classList.add("fa-spin"):l&&c.classList.add("fa-pulse");var p=document.createElementNS(r,"svg");p.setAttribute("viewBox","0 0 "+e.icon[0]+" "+e.icon[1]),s&&p.setAttribute("fill",s);var u=document.createElementNS(r,"path"),d="string"==typeof e.icon[4]?e.icon[4]:e.icon[4][0];return u.setAttribute("d",d),p.appendChild(u),c.appendChild(p),c}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return s})); /*! * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ var r={prefix:"fas",iconName:"list-alt",icon:[512,512,[],"f022","M464 480H48c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v352c0 26.51-21.49 48-48 48zM128 120c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm0 96c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zm288-136v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12zm0 96v-32c0-6.627-5.373-12-12-12H204c-6.627 0-12 5.373-12 12v32c0 6.627 5.373 12 12 12h200c6.627 0 12-5.373 12-12z"]},i={prefix:"fas",iconName:"pencil-alt",icon:[512,512,[],"f303","M497.9 142.1l-46.1 46.1c-4.7 4.7-12.3 4.7-17 0l-111-111c-4.7-4.7-4.7-12.3 0-17l46.1-46.1c18.7-18.7 49.1-18.7 67.9 0l60.1 60.1c18.8 18.7 18.8 49.1 0 67.9zM284.2 99.8L21.6 362.4.4 483.9c-2.9 16.4 11.4 30.6 27.8 27.8l121.5-21.3 262.6-262.6c4.7-4.7 4.7-12.3 0-17l-111-111c-4.8-4.7-12.4-4.7-17.1 0zM124.1 339.9c-5.5-5.5-5.5-14.3 0-19.8l154-154c5.5-5.5 14.3-5.5 19.8 0s5.5 14.3 0 19.8l-154 154c-5.5 5.5-14.3 5.5-19.8 0zM88 424h48v36.3l-64.5 11.3-31.1-31.1L51.7 376H88v48z"]},o={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"]},s={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"]}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return eventsHistoryPropsDecoder}));var _lib__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_Item__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1),__extends=(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),extendStatics,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=i;)s++,e/=i;return e=i?Math.round(2*e)/2:Math.round(2*e),isNaN(e)&&(e=0),e+" "+["","K","M","G","T","P","E","Z","Y"][s]+n},BasicChart.prototype.pad=function(e,t,n){var r=e+"";return t<=r.length?r:this.pad(r+n,t,n)},BasicChart}(_Item__WEBPACK_IMPORTED_MODULE_1__.a);__webpack_exports__.b=BasicChart},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARpJREFUeNqUU8ENwjAMTCsGyAiwAIIN2hdfmACYgLIACBYAJgA26JcXbABigo7QEbhDFxSFEIlIp7Sxz/Y5jjGJtb30B0TKJ4uQCmwLYByYauC8Gj1r/zAPyEdsV6AFhnDOCH4DDXCkD2C/KhCZWUuQHr8kMQiDwWfyqQAGEmchmedA5f5lI7HA+cyXsAY2kcxT2YwXhFIO7jyXHpZ2CktWmb2Imj3QpaRcZBc51FxJWhiYTWa1tmPSyyZsretBo2zW/LeKdwCV3kQGJzWhlNWCe3O3cGZXf1TRBmSrGziEg3TXZ6kmxTKTvFPj337+KJfa7xqs2Bu5SvvcJckiGSo9JqOrMspoNStLv8Is0ajCdRrrxmAxaS8BBgA1e3UUTVCKKgAAAABJRU5ErkJggg=="},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);n(11);var r,i=n(0),o=n(1),s=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var v=b.item(0);if(null!=v){v.setAttribute("width",""+(i+s)),v.setAttribute("height",""+(o+s));var g=v.getElementsByTagNameNS(P,"line");if(g.length>0){var y=g.item(0);null!=y&&(y.setAttribute("x1",""+d),y.setAttribute("y1",""+h),y.setAttribute("x2",""+m),y.setAttribute("y2",""+f),y.setAttribute("stroke",u||"black"),y.setAttribute("stroke-width",""+s))}}}if(this.moveMode){var _=document.createElement("div"),E=document.createElement("div");if(this.isMoving){var O=e.getElementsByClassName("visual-console-item-line-circle-start");if(O.length>0)(k=O.item(0))&&(_=k);var w=e.getElementsByClassName("visual-console-item-line-circle-end");if(w.length>0)(k=w.item(0))&&(E=k)}if(_.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-start"),_.style.width=2*this.circleRadius+"px",_.style.height=2*this.circleRadius+"px",_.style.borderRadius="50%",_.style.backgroundColor=""+u,_.style.position="absolute",_.style.left=d-this.circleRadius+"px",_.style.top=h-this.circleRadius+"px",_.style.cursor="move",E.classList.add("visual-console-item-line-circle","visual-console-item-line-circle-end"),E.style.width=2*this.circleRadius+"px",E.style.height=2*this.circleRadius+"px",E.style.borderRadius="50%",E.style.backgroundColor=""+u,E.style.position="absolute",E.style.left=m-this.circleRadius+"px",E.style.top=f-this.circleRadius+"px",E.style.cursor="move",null!==e.parentElement){for(var M=e.parentElement.getElementsByClassName("visual-console-item-line-circle");M.length>0;){(k=M.item(0))&&k.remove()}e.parentElement.appendChild(_),e.parentElement.appendChild(E)}this.initStartPositionMovementListener(_,this.elementRef.parentElement),this.initEndPositionMovementListener(E,this.elementRef.parentElement)}else if(this.moveMode)this.stopStartPositionMovementListener();else if(this.stopStartPositionMovementListener(),null!==e.parentElement)for(M=e.parentElement.getElementsByClassName("visual-console-item-line-circle");M.length>0;){var k;(k=M.item(0))&&k.remove()}},t.extractBoxSizeAndPosition=function(e,t){return{width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y),x:Math.min(e.x,t.x),y:Math.min(e.y,t.y)}},t.prototype.move=function(t,n){e.prototype.moveElement.call(this,t,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?t:this.props.width+t,y:i?n:this.props.height+n},s={x:r?this.props.width+t:t,y:i?this.props.height+n:n};this.props=A(A({},this.props),{startPosition:o,endPosition:s})},t.prototype.remove=function(){this.stopStartPositionMovementListener(),e.prototype.remove.call(this)},t.prototype.onLineMovementFinished=function(e){var t=this.lineMovedEventManager.on(e);return this.lineMovedEventDisposables.push(t),t},t}(o.a),T=I,S=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(){return(L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){if(null!=(r=y.item(0))){for(var _=r.getElementsByTagNameNS("http://www.w3.org/2000/svg","line"),E=r.getElementsByTagNameNS("http://www.w3.org/2000/svg","g");E.length>0;)E[0].remove();_.length>0&&(n=_.item(0))}if(null!=r&&null!=n){var O=p.x-o+a/2+l/2,w=p.y-s+a/2+c/2,M=u.x-o+a/2+l/2,k=u.y-s+a/2+c/2,C=p.x-o+a/2+l/2,x=p.y-s+a/2+c/2,A=u.x-o+a/2+l/2,j=u.y-s+a/2+c/2,P=180*Math.atan2(k-w,M-O)/Math.PI;if(v<=0){_=m.split("
");v=0,_.forEach((function(e){e.length>v&&(v=10*e.length)})),g<=0&&(g=25*_.length)}if(f<=0){_=h.split("
");f=0,_.forEach((function(e){e.length>f&&(f=10*e.length)})),b<=0&&(b=25*_.length)}if(CA&&(C-=25+v,A+=25),xj&&(x-=25+g,j+=25),void 0===d&&(d="#000"),null!==t.parentElement){for(var I=t.parentElement.getElementsByClassName("vc-item-nl-label");I.length>0;){var T=I.item(0);T&&T.remove()}for(var S=t.parentElement.getElementsByClassName("vc-item-nl-arrow");S.length>0;){var L=S.item(0);L&&L.remove()}}var N=2*a,R=O+(M-O)/2-N,D=w+(k-w)/2-N,B=document.createElement("div");B.classList.add("vc-item-nl-arrow"),B.style.position="absolute",B.style.border=N+"px solid transparent",B.style.borderBottom=N+"px solid "+d,B.style.left=R+"px",B.style.top=D+"px",B.style.transform="rotate("+(90+P)+"deg)";var z=document.createElement("div");if(z.classList.add("vc-item-nl-arrow"),z.style.position="absolute",z.style.border=N+"px solid transparent",z.style.borderBottom=N+"px solid "+d,z.style.left=R+"px",z.style.top=D+"px",z.style.transform="rotate("+(270+P)+"deg)",null!==t.parentElement&&(t.parentElement.appendChild(B),t.parentElement.appendChild(z)),""!=m){var H=document.createElement("div");try{H.innerHTML=m,H.style.position="absolute",H.style.left=C+"px",H.style.top=x+"px",H.style.width=v+"px",H.style.border="2px solid "+d,H.classList.add("vc-item-nl-label","label-start")}catch(e){console.error(e)}null!==t.parentElement&&t.parentElement.appendChild(H)}if(""!=h){var W=document.createElement("div");try{W.innerHTML=h,W.style.position="absolute",W.style.left=A+"px",W.style.top=j+"px",W.style.width=f+"px",W.style.border="2px solid "+d,W.classList.add("vc-item-nl-label","label-end")}catch(e){console.error(e)}null!==t.parentElement&&t.parentElement.appendChild(W)}}}},t}(T),D=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){var v=document.createElementNS(e,"text");v.setAttribute("text-anchor","middle"),v.setAttribute("font-size","8"),v.setAttribute("transform","translate(30 50) rotate(90)"),v.setAttribute("fill",r),v.textContent=b,m.append(v)}var g=document.createElementNS(e,"g");g.setAttribute("class","marks");var y=document.createElementNS(e,"g");y.setAttribute("class","mark"),y.setAttribute("transform","translate(50 50)");var _=document.createElementNS(e,"line");_.setAttribute("x1","36"),_.setAttribute("y1","0"),_.setAttribute("x2","46"),_.setAttribute("y2","0"),_.setAttribute("stroke",r),_.setAttribute("stroke-width","5");var E=document.createElementNS(e,"line");E.setAttribute("x1","36"),E.setAttribute("y1","0"),E.setAttribute("x2","46"),E.setAttribute("y2","0"),E.setAttribute("stroke",t),E.setAttribute("stroke-width","1"),y.append(_,E),g.append(y);for(var O=1;O<60;O++){var w=document.createElementNS(e,"line");w.setAttribute("y1","0"),w.setAttribute("y2","0"),w.setAttribute("stroke",r),w.setAttribute("transform","translate(50 50) rotate("+6*O+")"),O%5==0?(w.setAttribute("x1","38"),w.setAttribute("x2","46"),w.setAttribute("stroke-width",O%15==0?"2":"1")):(w.setAttribute("x1","42"),w.setAttribute("x2","46"),w.setAttribute("stroke-width","0.5")),g.append(w)}var M=document.createElementNS(e,"g");M.setAttribute("class","hour-hand"),M.setAttribute("transform","translate(50 50)");var k=document.createElementNS(e,"line");k.setAttribute("class","hour-hand-a"),k.setAttribute("x1","0"),k.setAttribute("y1","0"),k.setAttribute("x2","30"),k.setAttribute("y2","0"),k.setAttribute("stroke",s),k.setAttribute("stroke-width","4"),k.setAttribute("stroke-linecap","round");var C=document.createElementNS(e,"line");C.setAttribute("class","hour-hand-b"),C.setAttribute("x1","0"),C.setAttribute("y1","0"),C.setAttribute("x2","29.9"),C.setAttribute("y2","0"),C.setAttribute("stroke",o),C.setAttribute("stroke-width","3.1"),C.setAttribute("stroke-linecap","round"),M.append(k,C);var x=document.createElementNS(e,"g");x.setAttribute("class","minute-hand"),x.setAttribute("transform","translate(50 50)");var A=document.createElementNS(e,"line");A.setAttribute("class","minute-hand-a"),A.setAttribute("x1","0"),A.setAttribute("y1","0"),A.setAttribute("x2","40"),A.setAttribute("y2","0"),A.setAttribute("stroke",s),A.setAttribute("stroke-width","2"),A.setAttribute("stroke-linecap","round");var j=document.createElementNS(e,"line");j.setAttribute("class","minute-hand-b"),j.setAttribute("x1","0"),j.setAttribute("y1","0"),j.setAttribute("x2","39.9"),j.setAttribute("y2","0"),j.setAttribute("stroke",o),j.setAttribute("stroke-width","1.5"),j.setAttribute("stroke-linecap","round");var P=document.createElementNS(e,"circle");P.setAttribute("r","3"),P.setAttribute("fill",o),x.append(A,j,P);var I=document.createElementNS(e,"g");I.setAttribute("class","second-hand"),I.setAttribute("transform","translate(50 50)");var T=document.createElementNS(e,"line");T.setAttribute("x1","0"),T.setAttribute("y1","0"),T.setAttribute("x2","46"),T.setAttribute("y2","0"),T.setAttribute("stroke",a),T.setAttribute("stroke-width","1"),T.setAttribute("stroke-linecap","round");var S=document.createElementNS(e,"circle");S.setAttribute("r","2"),S.setAttribute("fill",a),I.append(T,S);var L=document.createElementNS(e,"circle");L.setAttribute("cx","50"),L.setAttribute("cy","50"),L.setAttribute("r","0.3"),L.setAttribute("fill",o);var N=this.getOriginDate(),R=N.getSeconds(),D=N.getMinutes(),B=6*R,z=6*D+R/60*6,H=30*N.getHours()+D/60*30;if(M.setAttribute("transform","translate(50 50) rotate("+H+")"),x.setAttribute("transform","translate(50 50) rotate("+z+")"),I.setAttribute("transform","translate(50 50) rotate("+B+")"),h.append(m,g,M,x,I,L),h.setAttribute("transform","rotate(-90)"),d.innerHTML="\n \n ",d.append(h),"datetime"===this.props.clockFormat){var W=document.createElement("span");W.className="date",W.textContent=Object(i.f)(N,"default"),W.style.fontSize=u+"px",this.props.color&&(W.style.color=this.props.color),d.append(W)}return d},t.prototype.createDigitalClock=function(){var e=document.createElement("div");e.className="digital-clock";var t=this.getElementSize().width,n=6/this.props.clockTimezone.length,r=20*t/100,o=10*t/100,s=Math.min(20*n*t/100,t/100*10),a=this.getOriginDate();if("datetime"===this.props.clockFormat){var l=document.createElement("span");l.className="date",l.textContent=Object(i.f)(a,"default"),l.style.fontSize=o+"px",this.props.color&&(l.style.color=this.props.color),e.append(l)}var c=document.createElement("span");c.className="time",c.textContent=Object(i.g)(a),c.style.fontSize=r+"px",this.props.color&&(c.style.color=this.props.color),e.append(c);var p=this.getHumanTimezone();if(p.length>0){var u=document.createElement("span");u.className="timezone",u.textContent=p,u.style.fontSize=s+"px",this.props.color&&(u.style.color=this.props.color),e.append(u)}return e},t.prototype.getOriginDate=function(e){void 0===e&&(e=null);var t=e||new Date,n=1e3*this.props.clockTimezoneOffset,r=60*t.getTimezoneOffset()*1e3,i=t.getTime()+n+r;return new Date(i)},t.prototype.getHumanTimezone=function(e){void 0===e&&(e=this.props.clockTimezone);var t=e.split("/")[1];return(void 0===t?"":t).replace("_"," ")},t.prototype.getElementSize=function(e,t){switch(void 0===e&&(e=this.props.width),void 0===t&&(t=this.props.height),this.props.clockType){case"analogic":var n=100;e>0&&t>0?n=Math.min(e,t):e>0?n=e:t>0&&(n=t);var r=0;return"datetime"===this.props.clockFormat&&(r=t/8),{width:n,height:n+r};case"digital":return e>0&&t>0?t=e/20?t=e/2:t>0?e=2*t:(e=100,t=50),{width:e,height:t};default:throw new Error("invalid clock type.")}},t.TICK_INTERVAL=1e3,t}(o.a),q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Y=function(){return(Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0){e.style.borderStyle="solid";var t=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,t);e.style.borderWidth=n+"px",this.props.borderColor&&(e.style.borderColor=this.props.borderColor)}return e},t.prototype.updateDomElement=function(e){if(this.props.fillTransparent?e.style.backgroundColor="transparent":this.props.fillColor&&(e.style.backgroundColor=this.props.fillColor),this.props.borderWidth>0){e.style.borderStyle="solid";var t=Math.min(this.props.width,this.props.height)/2,n=Math.min(this.props.borderWidth,t);e.style.borderWidth=n+"px",this.props.borderColor&&(e.style.borderColor=this.props.borderColor)}},t}(o.a),Z=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(){return(Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(n=Object(i.q)([{macro:/\(?_VALUE_\)?/i,value:n}],r)),e.innerHTML=n}return e},t.prototype.createLabelDomElement=function(){var e=document.createElement("div");return e.className="visual-console-item-label",e},t}(o.a),se=n(6),ae=Math.PI,le=2*ae,ce=le-1e-6;function pe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ue(){return new pe}pe.prototype=ue.prototype={constructor:pe,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,s=this._y1,a=n-e,l=r-t,c=o-e,p=s-t,u=c*c+p*p;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(u>1e-6)if(Math.abs(p*a-l*c)>1e-6&&i){var d=n-o,h=r-s,m=a*a+l*l,f=d*d+h*h,b=Math.sqrt(m),v=Math.sqrt(u),g=i*Math.tan((ae-Math.acos((m+u-f)/(2*b*v)))/2),y=g/v,_=g/b;Math.abs(y-1)>1e-6&&(this._+="L"+(e+y*c)+","+(t+y*p)),this._+="A"+i+","+i+",0,0,"+ +(p*d>c*h)+","+(this._x1=e+_*a)+","+(this._y1=t+_*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),l=e+s,c=t+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)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(u<0&&(u=u%le+le),u>ce?this._+="A"+n+","+n+",0,1,"+p+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+p+","+(this._x1=l)+","+(this._y1=c):u>1e-6&&(this._+="A"+n+","+n+",0,"+ +(u>=ae)+","+p+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var de=ue,he=function(e){return function(){return e}},me=Math.abs,fe=Math.atan2,be=Math.cos,ve=Math.max,ge=Math.min,ye=Math.sin,_e=Math.sqrt,Ee=Math.PI,Oe=Ee/2,we=2*Ee;function Me(e){return e>1?0:e<-1?Ee:Math.acos(e)}function ke(e){return e>=1?Oe:e<=-1?-Oe:Math.asin(e)}function Ce(e){return e.innerRadius}function xe(e){return e.outerRadius}function Ae(e){return e.startAngle}function je(e){return e.endAngle}function Pe(e){return e&&e.padAngle}function Ie(e,t,n,r,i,o,s,a){var l=n-e,c=r-t,p=s-i,u=a-o,d=u*l-p*c;if(!(d*d<1e-12))return[e+(d=(p*(t-o)-u*(e-i))/d)*l,t+d*c]}function Te(e,t,n,r,i,o,s){var a=e-n,l=t-r,c=(s?o:-o)/_e(a*a+l*l),p=c*l,u=-c*a,d=e+p,h=t+u,m=n+p,f=r+u,b=(d+m)/2,v=(h+f)/2,g=m-d,y=f-h,_=g*g+y*y,E=i-o,O=d*f-m*h,w=(y<0?-1:1)*_e(ve(0,E*E*_-O*O)),M=(O*y-g*w)/_,k=(-O*g-y*w)/_,C=(O*y+g*w)/_,x=(-O*g+y*w)/_,A=M-b,j=k-v,P=C-b,I=x-v;return A*A+j*j>P*P+I*I&&(M=C,k=x),{cx:M,cy:k,x01:-p,y01:-u,x11:M*(i/E-1),y11:k*(i/E-1)}}var Se=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Le=function(){return(Le=Object.assign||function(e){for(var t,n=1,r=arguments.length;nd;if(a||(a=l=de()),u1e-12)if(m>we-1e-12)a.moveTo(u*be(d),u*ye(d)),a.arc(0,0,u,d,h,!f),p>1e-12&&(a.moveTo(p*be(h),p*ye(h)),a.arc(0,0,p,h,d,f));else{var b,v,g=d,y=h,_=d,E=h,O=m,w=m,M=s.apply(this,arguments)/2,k=M>1e-12&&(r?+r.apply(this,arguments):_e(p*p+u*u)),C=ge(me(u-p)/2,+n.apply(this,arguments)),x=C,A=C;if(k>1e-12){var j=ke(k/p*ye(M)),P=ke(k/u*ye(M));(O-=2*j)>1e-12?(_+=j*=f?1:-1,E-=j):(O=0,_=E=(d+h)/2),(w-=2*P)>1e-12?(g+=P*=f?1:-1,y-=P):(w=0,g=y=(d+h)/2)}var I=u*be(g),T=u*ye(g),S=p*be(E),L=p*ye(E);if(C>1e-12){var N,R=u*be(y),D=u*ye(y),B=p*be(_),z=p*ye(_);if(m1e-12?A>1e-12?(b=Te(B,z,I,T,u,A,f),v=Te(R,D,S,L,u,A,f),a.moveTo(b.cx+b.x01,b.cy+b.y01),A1e-12&&O>1e-12?x>1e-12?(b=Te(S,L,R,D,p,-x,f),v=Te(I,T,B,z,p,-x,f),a.lineTo(b.cx+b.x01,b.cy+b.y01),x0){var d=document.createElementNS(Be,"tspan");d.setAttribute("x","0"),d.setAttribute("dy","1em"),d.textContent=""+e,d.style.fontSize="8pt";var h=document.createElementNS(Be,"tspan");h.setAttribute("x","0"),h.setAttribute("dy","1em"),h.textContent=""+this.props.unit,h.style.fontSize="8pt",u.append(d,h),u.setAttribute("transform","translate(50 33)")}else u.textContent=""+e,u.style.fontSize="8pt",u.setAttribute("transform","translate(50 50)");else u.textContent=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},t.prototype.updateDomElement=function(e){!1===this.meta.isBeingResized&&this.resizeElement(this.props.width,this.props.height),e.innerHTML=this.createDomElement().innerHTML},t.prototype.resizeElement=function(t,n){"progress-bar"===this.props.percentileType?e.prototype.resizeElement.call(this,t,35):e.prototype.resizeElement.call(this,t,t)},t.prototype.resize=function(t){this.resizeElement(t,t);var n=this.props.maxValue||0;"progress-bar"===this.props.percentileType&&(n=35),e.prototype.setProps.call(this,Le(Le({},this.props),{width:t,height:n}))},t.prototype.getProgress=function(){var e=this.props.minValue||0,t=this.props.maxValue||100,n=null==this.props.value?0:this.props.value;return n<=e?0:n>=t?100:Math.trunc((n-e)/(t-e)*100)},t}(o.a),He=n(7),We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ge=function(){return(Ge=Object.assign||function(e){for(var t,n=1,r=arguments.length;n3&&n<=6?t=" K":n>6&&n<=9?t=" M":n>9&&n<=12?t=" G":n>12&&n<=15&&(t=" T"),t},t.prototype.getCoords=function(e,t){if(""===this.props.minMaxValue)e=e;else{var n=JSON.parse(this.props.minMaxValue);if(n.min===e)e=0;else if(n.max===e||100===e)e=100;else{var r=n.max-n.min;e=100-100*(n.max-e)/r}}return e=180-1.8*e,t+Math.cos(e*Math.PI/180)*t+","+(t-Math.sin(e*Math.PI/180)*t)},t.prototype.truncateTitle=function(e){if(null!=e&&e.length>22){var t=e.length/2,n=t-9;return e.substr(0,t-n)+"..."+e.substr(t+n)}return e},t}(o.a),rt=n(9),it=function(){return(it=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0?e.selected=!0:e.selected=!1,r.selectionChangedEventManager.emit(e)},this.handleContainerClick=function(){r.unSelectItems()},this.containerRef=e,this._props=function(e){var t=e.id,n=e.name,r=e.groupId,o=e.backgroundURL,s=e.backgroundColor,a=e.isFavorite,l=e.relationLineWidth;if(null==t||isNaN(parseInt(t)))throw new TypeError("invalid Id.");if("string"!=typeof n||0===n.length)throw new TypeError("invalid name.");if(null==r||isNaN(parseInt(r)))throw new TypeError("invalid group Id.");return it({id:parseInt(t),name:n,groupId:parseInt(r),backgroundURL:Object(i.k)(o,null),backgroundColor:Object(i.k)(s,null),isFavorite:Object(i.l)(a),relationLineWidth:Object(i.n)(l,0)},Object(i.r)(e))}(t),this.render(),(n=n.sort((function(e,t){return null==e.id||null==t.id?0:e.id>t.id?1:-1}))).forEach((function(e){return r.addElement(e,r)})),this.buildRelations(),this.elements.forEach((function(e){e instanceof T&&r.refreshLink(e)})),this.containerRef.addEventListener("click",this.handleContainerClick)}return e.prototype.coordinatesInItem=function(e,t,n){return 13!=n.type&&21!=n.type&&(e>n.x&&en.y&&t0?(null==this.lineLinks[n]&&(this.lineLinks[n]={}),this.lineLinks[n][t]={start:n,end:r}):this.lines[t].start>0&&(this.lineLinks[this.lines[t].start][t].start=0,this.lines[t].start=0),r>0?(null==this.lineLinks[r]&&(this.lineLinks[r]={}),this.lineLinks[r][t]={start:n,end:r}):this.lines[t].end>0&&(this.lineLinks[this.lines[t].end][t].end=0,this.lines[t].end=0),this.lines[t]={start:n,end:r},this.lineLinks)this.lineLinks[i][t]&&0==this.lineLinks[i][t].start&&0==this.lineLinks[i][t].end&&(delete this.lineLinks[i][t],0===Object.keys(this.lineLinks[i]).length&&delete this.lineLinks[i])}catch(e){console.error(e)}},e.prototype.updateLinesConnected=function(e,t,n){var r=this;null!=this.lineLinks[e.id]&&(Object.keys(this.lineLinks[e.id]).forEach((function(o){var s=parseInt(o);if(-1!==r.elementIds.indexOf(s)){var a=r.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;if(e.id==r.lineLinks[e.id][s].start&&(l=t.x+e.width/2,c=t.y+e.height/2),e.id==r.lineLinks[e.id][s].end&&(p=t.x+e.width/2,u=t.y+e.height/2),r.updateElement(it(it({},a.props),{startX:l,startY:c,endX:p,endY:u})),n)Object(i.c)(500,(function(e){r.lineMovedEventManager.emit({item:e.line,startPosition:{x:e.startX,y:e.startY},endPosition:{x:e.endX,y:e.endY}})}))({line:a,startX:l,startY:c,endX:p,endY:u})}}})),this.buildRelations(e.id,t.x+e.width/2,t.y+e.height/2))},Object.defineProperty(e.prototype,"elements",{get:function(){var e=this;return this.elementIds.map((function(t){return e.elementsById[t]})).filter((function(e){return null!=e}))},enumerable:!1,configurable:!0}),e.prototype.addElement=function(e,t){void 0===t&&(t=this);try{var n=function(e){var t=Object(i.n)(e.type,null);if(null==t)throw new TypeError("missing item type.");var n=Object(i.h)(e);switch(t){case 0:return new p(c(e),n);case 1:return new qe.a(Object(qe.b)(e),n);case 2:case 6:case 7:case 8:return new oe(ie(e),n);case 3:case 9:case 15:case 16:return new ze(De(e),n);case 4:return new ee($(e),n);case 5:return new m(h(e),n);case 10:return new Ze(Je(e),n);case 11:return new H(z(e),n);case 12:return new J(X(e),n);case 13:return new T(j(e),n);case 14:return new se.a(Object(se.b)(e),n);case 17:return new He.a(Object(He.b)(e),n);case 18:return new Ke(Ve(e),n);case 19:return new K(V(e),n);case 20:return new k(E(e),n);case 21:return new R(N(e),n);case 22:return new nt(et(e),n);case 23:return new rt.b(Object(rt.a)(e),n);default:throw new TypeError("item not found")}}(e);return t.elementsById[n.props.id]=n,t.elementIds.push(n.props.id),n.onRemove(t.handleElementRemove),n.onSelectionChanged(t.handleElementSelectionChanged),n.onClick(t.handleElementClick),n.onDblClick(t.handleElementDblClick),n instanceof T?(n.onLineMovementFinished(t.handleLineElementMovementFinished),this.refreshLink(n)):(n.onMoved(t.handleElementMovement),n.onMovementFinished(t.handleElementMovementFinished),n.onResized(t.handleElementResizement),n.onResizeFinished(t.handleElementResizementFinished)),t.containerRef.append(n.elementRef),n}catch(e){console.error("Error creating a new element:",e.message)}},e.prototype.updateElements=function(e){var t=this,n=e.map((function(e){return e.id||null})).filter((function(e){return null!=e}));this.elementIds.filter((function(e){return n.indexOf(e)<0})).forEach((function(e){null!=t.elementsById[e]&&(t.elementsById[e].remove(),delete t.elementsById[e])})),this.elementIds=n,e.forEach((function(e){if(e.id)if(null==t.elementsById[e.id])t.addElement(e);else try{t.elementsById[e.id].props=ot(e)}catch(e){console.error("Error updating an element:",e.message)}})),this.buildRelations()},e.prototype.updateElement=function(e){try{this.elementsById[e.id].props=it({},ot(e))}catch(e){console.error("Error updating element:",e.message)}this.buildRelations()},Object.defineProperty(e.prototype,"props",{get:function(){return it({},this._props)},set:function(e){var t=this.props;this._props=e,this.render(t)},enumerable:!1,configurable:!0}),e.prototype.render=function(e){void 0===e&&(e=null),e?(e.backgroundURL!==this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":""),null!=this.props.backgroundColor&&e.backgroundColor!==this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.sizeChanged(e,this.props)&&this.resizeElement(this.props.width,this.props.height)):(this.props.backgroundURL&&(this.containerRef.style.backgroundImage=null!==this.props.backgroundURL?"url("+this.props.backgroundURL+")":""),this.props.backgroundColor&&(this.containerRef.style.backgroundColor=this.props.backgroundColor),this.resizeElement(this.props.width,this.props.height))},e.prototype.sizeChanged=function(e,t){return e.width!==t.width||e.height!==t.height},e.prototype.resizeElement=function(e,t){this.containerRef.style.width=e+"px",this.containerRef.style.height=t+"px"},e.prototype.resize=function(e,t){this.props=it(it({},this.props),{width:e,height:t})},e.prototype.remove=function(){this.disposables.forEach((function(e){return e.dispose()})),this.elements.forEach((function(e){return e.remove()})),this.elementsById={},this.elementIds=[],this.clearRelations(),this.containerRef.removeEventListener("click",this.handleContainerClick),this.containerRef.innerHTML=""},e.prototype.buildRelations=function(e,t,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!=e?i.props.parentId==e?r.addRelationLine(o,s,t,n):i.props.id==e?r.addRelationLine(o,s,void 0,void 0,t,n):r.addRelationLine(o,s):r.addRelationLine(o,s))}}))},e.prototype.clearRelations=function(e){if(null!=e)for(var t in this.relations){var n=t.split("|"),r=Number.parseInt(n[0]),i=Number.parseInt(n[1]);e!==r&&e!==i||(this.relations[t].remove(),delete this.relations[t])}else for(var t in this.relations)this.relations[t].remove(),delete this.relations[t]},e.prototype.getRelationLine=function(e,t){var n=e+"|"+t;return this.relations[n]||null},e.prototype.getItemRelations=function(e){var t=[];for(var n in this.relations){var r=n.split("|"),i=Number.parseInt(r[0]),o=Number.parseInt(r[1]);e!==i&&e!==o||t.push({parentId:i,childId:o,line:this.relations[n]})}return t},e.prototype.getVisualCenter=function(e,t){var n=e.x+t.elementRef.clientWidth/2,r=e.y+t.elementRef.clientHeight/2;if(void 0!==t.props.label||""!==t.props.label||null!==t.props.label)switch(t.props.labelPosition){case"up":r=e.y+(t.elementRef.clientHeight+t.labelElementRef.clientHeight)/2;break;case"down":r=e.y+(t.elementRef.clientHeight-t.labelElementRef.clientHeight)/2;break;case"right":n=e.x+(t.elementRef.clientWidth-t.labelElementRef.clientWidth)/2;break;case"left":n=e.x+(t.elementRef.clientWidth+t.labelElementRef.clientWidth)/2}return{x:n,y:r}},e.prototype.addRelationLine=function(e,t,n,r,o,s){var a=e.props.id+"|"+t.props.id;null!=this.relations[a]&&this.relations[a].remove();var l=this.getVisualCenter(e.props,e),c=l.x,p=l.y,u=this.getVisualCenter(t.props,t),d=u.x,h=u.y;null!=n&&(c=n),null!=r&&(p=r),null!=o&&(d=o),null!=s&&(h=s);var m=new T(j({id:0,type:13,startX:c,startY:p,endX:d,endY:h,width:0,height:0,lineWidth:this.props.relationLineWidth,color:Object(i.k)(t.props.colorStatus,"#CCC")}),Object(i.h)({receivedAt:new Date}));return this.relations[a]=m,m.elementRef.style.zIndex="0",this.containerRef.append(m.elementRef),m},e.prototype.onItemClick=function(e){var t=this.clickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemDblClick=function(e){var t=this.dblClickEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemMoved=function(e){var t=this.movedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onLineMoved=function(e){var t=this.lineMovedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemResized=function(e){var t=this.resizedEventManager.on(e);return this.disposables.push(t),t},e.prototype.onItemSelectionChanged=function(e){var t=this.selectionChangedEventManager.on(e);return this.disposables.push(t),t},e.prototype.enableEditMode=function(){this.elements.forEach((function(e){e.meta=it(it({},e.meta),{editMode:!0})})),this.containerRef.classList.add("is-editing")},e.prototype.disableEditMode=function(){this.elements.forEach((function(e){e.meta=it(it({},e.meta),{editMode:!1})})),this.containerRef.classList.remove("is-editing")},e.prototype.selectItem=function(e,t){var n=this;void 0===t&&(t=!1),t?this.elementIds.forEach((function(t){var r=n.elementsById[t].meta;t!==e&&r.isSelected?n.elementsById[t].unSelectItem():t!==e||r.isSelected||n.elementsById[t].selectItem()})):this.elementsById[e]&&this.elementsById[e].selectItem()},e.prototype.unSelectItem=function(e){this.elementsById[e]&&(this.elementsById[e].meta.isSelected&&this.elementsById[e].unSelectItem())},e.prototype.unSelectItems=function(){var e=this;this.elementIds.forEach((function(t){e.elementsById[t]&&e.elementsById[t].unSelectItem()}))},e.itemDescriptiveName=function(e){var t;switch(e.props.type){case 0:t=Object(i.t)("Static graph")+" - "+e.props.imageSrc;break;case 1:t=Object(i.t)("Module graph");break;case 19:t=Object(i.t)("Clock");break;case 18:t=Object(i.t)("Bars graph");break;case 14:t=Object(i.t)("Event history graph");break;case 3:t=Object(i.t)("Percentile bar");break;case 15:t=Object(i.t)("Circular progress bar");break;case 16:t=Object(i.t)("Circular progress bar (interior)");break;case 2:t=Object(i.t)("Simple Value");break;case 4:t=Object(i.t)("Label");break;case 11:t=Object(i.t)("Group");break;case 20:t=Object(i.t)("Color cloud");break;case 5:t=Object(i.t)("Icon")+" - "+e.props.imageSrc;break;case 22:t=Object(i.t)("Odometer");break;case 23:t=Object(i.t)("BasicChart");break;default:t=Object(i.t)("Item")}var n=e.props;return null!=n.agentAlias&&null!=n.moduleName?t+=" ("+Object(i.e)(n.agentAlias,18)+" - "+Object(i.e)(n.moduleName,25)+")":null!=n.agentAlias&&(t+=" ("+Object(i.e)(n.agentAlias,25)+")"),t},e.items=((tt={})[0]=p,tt[1]=qe.a,tt[2]=oe,tt[6]=oe,tt[7]=oe,tt[8]=oe,tt[3]=ze,tt[9]=ze,tt[15]=ze,tt[16]=ze,tt[4]=ee,tt[5]=m,tt[10]=Ze,tt[11]=H,tt[12]=J,tt[13]=T,tt[14]=se.a,tt[17]=He.a,tt[18]=Ke,tt[19]=K,tt[20]=k,tt[21]=R,tt[22]=nt,tt[23]=rt.b,tt),e}(),at=function(){function e(e){this.cancellable={cancel:function(){}},this._status="waiting",this.statusChangeEventManager=new C.a,this.disposables=[],this.taskInitiator=e}return Object.defineProperty(e.prototype,"status",{get:function(){return this._status},set:function(e){this._status=e,this.statusChangeEventManager.emit(e)},enumerable:!1,configurable:!0}),e.prototype.init=function(){var e=this;this.cancellable=this.taskInitiator((function(){e.status="finished"})),this.status="started"},e.prototype.cancel=function(){this.cancellable.cancel(),this.status="cancelled"},e.prototype.onStatusChange=function(e){var t=this.statusChangeEventManager.on(e);return this.disposables.push(t),t},e}();var lt=function(){function e(){this.tasks={}}return e.prototype.add=function(e,t,n){void 0===n&&(n=0),this.tasks[e]&&"started"===this.tasks[e].status&&this.tasks[e].cancel();var r=n>0?function(e,t){return new at((function(){var n=null;return e.onStatusChange((function(r){"finished"===r&&(n=window.setTimeout((function(){e.init()}),t))})),e.init(),{cancel:function(){n&&clearTimeout(n),e.cancel()}}}))}(new at(t),n):new at(t);return this.tasks[e]=r,this.tasks[e]},e.prototype.init=function(e){!this.tasks[e]||"waiting"!==this.tasks[e].status&&"cancelled"!==this.tasks[e].status&&"finished"!==this.tasks[e].status||this.tasks[e].init()},e.prototype.cancel=function(e){this.tasks[e]&&"started"===this.tasks[e].status&&this.tasks[e].cancel()},e}();window.VisualConsole=st,window.VisualConsole.Form=f,window.AsyncTaskManager=lt}]); //# sourceMappingURL=vc.main.min.js.map