text: /*!
  *  filename: ej2-circulargauge.umd.min.js
  *  version : 1.0.25
  *  Copyright Syncfusion Inc. 2001 - 2017. All rights reserved.
  *  Use of this code is subject to the terms of our license.
  *  A copy of the current license can be obtained at any time by e-mailing
  *  licensing@syncfusion.com. Any infringement will be prosecuted under
  *  applicable laws. 
  */
  
  !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base","@syncfusion/ej2-popups"],t);else{var i="object"==typeof exports?t(require("@syncfusion/ej2-base"),require("@syncfusion/ej2-popups")):t(e["@syncfusion/ej2-base"],e["@syncfusion/ej2-popups"]);for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(this,function(e,t){return function(e){function t(o){if(i[o])return i[o].exports;var r=i[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){var o,r;o=[i,t,i(1)],void 0!==(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}(i)}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t,i(2),i(8),i(6),i(3),i(10),i(5)],void 0!==(r=function(e,t,i,o,r,n,a,l){"use strict";function s(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),s(i),s(o),s(r),s(n),s(a),s(l)}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r,n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),a=this&&this.__decorate||function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};o=[i,t,i(4),i(4),i(4),i(5),i(5),i(5),i(3),i(6),i(8),i(10),i(9),i(9),i(12)],void 0!==(r=function(e,t,i,o,r,l,s,p,u,d,c,h,g,m,y){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var v=function(e){function t(t,i){return e.call(this,t,i)||this}return n(t,e),t.prototype.preRender=function(){this.unWireEvents(),this.trigger(g.load,{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},t.prototype.initPrivateVariable=function(){this.renderer=new o.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new y.AxisLayoutPanel(this),this.animatePointer=!0},t.prototype.createSvg=function(){this.removeSvg(),this.calculateSvgSize(),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},t.prototype.setCulture=function(){this.intl=new o.Internationalization},t.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=s.stringToNumber(this.width,e)||e||600,o=s.stringToNumber(this.height,t)||t||450;this.availableSize=new s.Size(i,o)},t.prototype.render=function(){this.calculateBounds(),this.renderElements()},t.prototype.renderElements=function(){this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(),this.element.appendChild(this.svgObject),this.trigger(g.loaded,{gauge:this})},t.prototype.renderTitle=function(){if(this.title){var e=s.measureText(this.title,this.titleStyle),t=new l.TextOption(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),i=l.textElement(t,this.titleStyle,this.titleStyle.color,this.svgObject,"");i.setAttribute("aria-label",this.description||this.title),i.setAttribute("tabindex",this.tabIndex.toString())}},t.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new l.RectOption(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new s.Rect(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},t.prototype.setPointerValue=function(e,t,i){var o=this,r=this.axes[e],n=r.pointers[t],a=n.currentRadius,l=n.animation.enable;i=i<r.visibleRange.min?r.visibleRange.min:i,i=i>r.visibleRange.max?r.visibleRange.max:i,n.pathElement.map(function(e){"RangeBar"===n.type?(s.setStyles(e,n.color,n.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,n.currentValue,i,r,n,a,a-n.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(r,n,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?s.setStyles(e,n.cap.color,n.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?s.setStyles(e,n.needleTail.color,n.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?s.setStyles(e,"transparent",{color:"transparent",width:0}):s.setStyles(e,n.color,n.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,n.currentValue,i,r,n,a,a-n.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(r,n,i))}),n.currentValue=i,n.value=i},t.prototype.setAnnotationValue=function(e,t,i){var o=null!==s.getElement(this.element.id+"_Annotations_"+e),n=s.getElement(this.element.id+"_Annotations_"+e)||r.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[t];null!==i&&(l.removeElement(this.element.id+"_Axis_"+e+"_Annotation_"+t),a.content=i,this.annotationsModule.createTemplate(n,t,e),o||s.getElement(this.element.id+"_Secondary_Element").appendChild(n))},t.prototype.setRangeValue=function(e,t,i,o){var r=s.getElement(this.element.id+"_Axis_"+e+"_Range_"+t),n=this.axes[e],a=n.ranges[t],l=n.visibleRange,u="ClockWise"===n.direction,d=Math.min(Math.max(i,l.min),o),c=Math.min(Math.max(i,o),l.max),h=p.getAngleFromValue(d,l.max,l.min,n.startAngle,n.endAngle,u),g=p.getAngleFromValue(c,l.max,l.min,n.startAngle,n.endAngle,u),m=a.startWidth,y=a.endWidth;g=u?g:[h,h=g][0],y=u?y:[m,m=y][0],r.setAttribute("d",p.getPathArc(this.midPoint,Math.round(h),Math.round(g),a.currentRadius,m,y)),s.setStyles(r,a.color?a.color:a.rangeColor,{color:a.color?a.color:a.rangeColor,width:0})},t.prototype.calculateBounds=function(){var e=this.margin,t=0;this.title&&(t=s.measureText(this.title,this.titleStyle).height+5);var i=e.top+t+this.border.width,o=e.left+this.border.width,r=this.availableSize.width-o-e.right-this.border.width,n=this.availableSize.height-i-this.border.width-e.bottom,a=Math.min(r,n)/2,l=new s.Rect(o+r/2-a,i+n/2-a,2*a,2*a),p=null!==this.centerX?s.stringToNumber(this.centerX,this.availableSize.width):l.x+l.width/2,u=null!==this.centerY?s.stringToNumber(this.centerY,this.availableSize.height):l.y+l.height/2;this.midPoint=new s.GaugeLocation(p,u),this.gaugeAxisLayoutPanel.measureAxis(l)},t.prototype.unWireEvents=function(){o.EventHandler.remove(this.element,i.Browser.touchStartEvent,this.gaugeOnMouseDown),o.EventHandler.remove(this.element,i.Browser.touchMoveEvent,this.mouseMove),o.EventHandler.remove(this.element,i.Browser.touchEndEvent,this.mouseEnd),o.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),o.EventHandler.remove(this.element,i.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),o.EventHandler.remove(window,i.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this))},t.prototype.wireEvents=function(){o.EventHandler.add(this.element,i.Browser.touchStartEvent,this.gaugeOnMouseDown,this),o.EventHandler.add(this.element,i.Browser.touchMoveEvent,this.mouseMove,this),o.EventHandler.add(this.element,i.Browser.touchEndEvent,this.mouseEnd,this),o.EventHandler.add(this.element,"contextmenu",this.gaugeRightClick,this),o.EventHandler.add(this.element,i.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),o.EventHandler.add(window,i.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize,this),this.setStyle(this.element)},t.prototype.setStyle=function(e){e.style.touchAction=this.enablePointerDrag?"none":"element",e.style.msTouchAction=this.enablePointerDrag?"none":"element",e.style.msContentZooming="none",e.style.msUserSelect="none",e.style.webkitUserSelect="none",e.style.position="relative"},t.prototype.mouseMove=function(e){var t=this.getMouseArgs(e,"touchmove",g.gaugeMouseMove);this.trigger(g.gaugeMouseMove,t);var i,o=this.tooltipModule;return t.cancel||(this.tooltip.enable&&o&&(t.target.id.indexOf("_Pointer_")>=0&&!this.activePointer?o.renderTooltip(t.target):o.ejTooltip.close()),this.enablePointerDrag&&this.activePointer&&(i={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:m.dragMove,currentValue:null},this.pointerDrag(new s.GaugeLocation(t.x,t.y)),i.currentValue=this.activePointer.currentValue,this.trigger(m.dragMove,i))),!1},t.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",g.gaugeMouseLeave);return this.trigger(g.gaugeMouseLeave,t),this.tooltip.enable&&this.tooltipModule&&this.tooltipModule.ejTooltip.close(),!1},t.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},t.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=l.getValueFromAngle(l.getAngleFromLocation(this.midPoint,e),i.max,i.min,t.startAngle,t.endAngle,"ClockWise"===t.direction);o>=i.min&&o<=i.max&&(this.activePointer.currentValue=o,this.activePointer.value=o,this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},t.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart",g.gaugeMouseDown);return this.trigger(g.gaugeMouseDown,i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=s.getPointer(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger(m.dragStart,{axis:this.activeAxis,name:m.dragStart,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},t.prototype.mouseEnd=function(e){var t=this.getMouseArgs(e,"touchend",m.gaugeMouseUp),i="touch"===e.pointerType||"2"===e.pointerType||"touchend"===e.type,o=this.tooltipModule;return this.trigger(m.gaugeMouseUp,t),this.activeAxis&&this.activePointer&&(this.trigger(m.dragEnd,{name:m.dragEnd,axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),!t.cancel&&i&&this.tooltip.enable&&o&&t.target.id.indexOf("_Pointer_")>=0&&(o.renderTooltip(t.target),setTimeout(function(){o.ejTooltip.close()},2e3)),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),!1},t.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),r=new s.GaugeLocation(-o.left,-o.top),n=e.type===t;return r.x+=n?e.changedTouches[0].clientX:e.clientX,r.y+=n?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:r.x,y:r.y,target:e.target}},t.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new s.Size(this.availableSize.width,this.availableSize.height),name:m.resized,currentSize:new s.Size(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger(m.resized,i)},500)),!1},t.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},t.prototype.requiredModules=function(){var e=[],t=!1;return this.axes.map(function(e){e.annotations.map(function(e){t=t||null!==e.content})}),t&&e.push({member:"Annotations",args:[this,c.Annotations]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,h.GaugeTooltip]}),e},t.prototype.removeSvg=function(){if(l.removeElement(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&r.remove(this.svgObject)}},t.prototype.getPersistData=function(){return this.addOnPersist([])},t.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,r=0,n=Object.keys(e);r<n.length;r++){switch(n[r]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),o=!0;break;case"title":o=""===e.title||""===t.title,i=!(""===e.title||""===t.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?o=!0:i=!0;break;case"border":i=!0;break;case"background":i=!0}}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements())},t.prototype.getModuleName=function(){return"circulargauge"},t}(i.Component);a([i.Property(null)],v.prototype,"width",void 0),a([i.Property(null)],v.prototype,"height",void 0),a([i.Complex({color:"transparent",width:0},u.Border)],v.prototype,"border",void 0),a([i.Property("transparent")],v.prototype,"background",void 0),a([i.Property("")],v.prototype,"title",void 0),a([i.Complex({size:"15px",color:"#424242"},u.Font)],v.prototype,"titleStyle",void 0),a([i.Complex({},u.Margin)],v.prototype,"margin",void 0),a([o.Collection([{}],d.Axis)],v.prototype,"axes",void 0),a([i.Complex({},u.TooltipSettings)],v.prototype,"tooltip",void 0),a([i.Property(!1)],v.prototype,"enablePointerDrag",void 0),a([i.Property(null)],v.prototype,"centerX",void 0),a([i.Property(null)],v.prototype,"centerY",void 0),a([i.Property("Material")],v.prototype,"theme",void 0),a([i.Property(!1)],v.prototype,"useGroupingSeparator",void 0),a([i.Property(null)],v.prototype,"description",void 0),a([i.Property(1)],v.prototype,"tabIndex",void 0),a([o.Event()],v.prototype,"loaded",void 0),a([o.Event()],v.prototype,"load",void 0),a([o.Event()],v.prototype,"animationComplete",void 0),a([o.Event()],v.prototype,"axisLabelRender",void 0),a([o.Event()],v.prototype,"annotationRender",void 0),a([o.Event()],v.prototype,"tooltipRender",void 0),a([o.Event()],v.prototype,"dragStart",void 0),a([o.Event()],v.prototype,"dragMove",void 0),a([o.Event()],v.prototype,"dragEnd",void 0),a([o.Event()],v.prototype,"gaugeMouseMove",void 0),a([o.Event()],v.prototype,"gaugeMouseLeave",void 0),a([o.Event()],v.prototype,"gaugeMouseDown",void 0),a([o.Event()],v.prototype,"gaugeMouseUp",void 0),a([o.Event()],v.prototype,"resized",void 0),v=a([i.NotifyPropertyChanges],v),t.CircularGauge=v}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r,n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),a=this&&this.__decorate||function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};o=[i,t,i(4)],void 0!==(r=function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property("")],o.prototype,"color",void 0),a([i.Property(1)],o.prototype,"width",void 0),t.Border=o;var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property("16px")],r.prototype,"size",void 0),a([i.Property("")],r.prototype,"color",void 0),a([i.Property("Segoe UI")],r.prototype,"fontFamily",void 0),a([i.Property("Normal")],r.prototype,"fontWeight",void 0),a([i.Property("Normal")],r.prototype,"fontStyle",void 0),a([i.Property(1)],r.prototype,"opacity",void 0),t.Font=r;var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(10)],l.prototype,"left",void 0),a([i.Property(10)],l.prototype,"right",void 0),a([i.Property(10)],l.prototype,"top",void 0),a([i.Property(10)],l.prototype,"bottom",void 0),t.Margin=l;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(!1)],s.prototype,"enable",void 0),a([i.Property("#FFFFFF")],s.prototype,"fill",void 0),a([i.Complex({color:"#686868",size:"13px"},r)],s.prototype,"textStyle",void 0),a([i.Property(null)],s.prototype,"format",void 0),a([i.Property(null)],s.prototype,"template",void 0),a([i.Property(!0)],s.prototype,"enableAnimation",void 0),a([i.Complex({color:"black",width:2},o)],s.prototype,"border",void 0),t.TooltipSettings=s}.apply(t,o))&&(e.exports=r)},function(t,i){t.exports=e},function(e,t,i){var o,r,n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}();o=[i,t,i(4),i(4),i(4)],void 0!==(r=function(e,t,i,o,r){"use strict";function a(e,t){var i=document.getElementById("gauge-measuretext");null===i&&(i=r.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(i));var o="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+l(t);return i.innerHTML=e,i.setAttribute("style",o),new F(i.clientWidth,i.clientHeight)}function l(e){return"font-size:"+e.size+"; font-style:"+e.fontStyle+"; font-weight:"+e.fontWeight+"; font-family:"+e.fontFamily+";opacity:"+e.opacity+"; color:"+e.color+";"}function s(e,t,i){r.setStyleAttribute(e,{stroke:i.color,"stroke-width":i.width,fill:t})}function p(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),L(e.id),t}function u(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function d(e,t,o,r,n){var a,l={},s=new i.SvgRenderer(""),p=n+" font-size:"+t.size+"; font-style:"+t.fontStyle+" ; font-weight:"+t.fontWeight+"; font-family:"+t.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:t.opacity,"dominant-baseline":e.baseLine,style:p},a=s.createText(l,e.text),r.appendChild(a),a}function c(e,t,i,o){o=o||"Path";var r=i.renderer["draw"+o](e);return r.setAttribute("transform",e.transform),r.setAttribute("style",e.style),t.appendChild(r),r}function h(e,t,i){for(var o=0,r=i.length;e<r;e++)o+=i[e];return o}function g(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function m(e,t,i,o,r,n){var a;return r-=f(o,r)?1e-4:0,o-=90,r-=90,n?a=(e-i)*(y(o,r)/(t-i))+o:(a=r-(e-i)*(y(o,r)/(t-i)),a=a<0?360+a:a),a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function y(e,t){var i=t-e;return i<0?i+360:i}function v(e,t,i,o,r,n){return r-=f(o,r)?1e-4:0,e=e<o?e+360:e,n?(e-o)/y(o,r)*(t-i)+i:t-((e-o)/y(o,r)*(t-i)+i)}function f(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function b(e,t){var i=Math.atan2(t.y-e.y,t.x-e.x);return i=Math.round((i<0?6.283+i:i)*(180/Math.PI))-270,i+=i<0?360:0}function x(e,t,i){var o=e*Math.PI/180;return new W(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function P(e,t,i,o,r,n){i-=f(t,i)?1e-4:0;var a=y(t,i),l=o-r,s=o-n,p=o-(r+n)/2;return void 0!==r&&void 0!==n?A(x(t,o,e),x(i,o,e),x(t,l,e),x(i,s,e),o,p,p,a<180?0:1):w(x(t,o,e),x(i,o,e),o,a<180?0:1)}function A(e,t,i,o,r,n,a,l){return"M "+e.x+" "+e.y+" A "+r+" "+r+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+n+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function _(e,t,i,o,r){i-=f(t,i)?1e-4:0;var n=y(t,i);return S(e,x(t,o,e),x(i,o,e),o,x(t,r,e),x(i,r,e),r,n<180?0:1)}function w(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function S(e,t,i,o,r,n,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+n.x+" "+n.y+" A "+a+" "+a+" 0 "+l+",0 "+r.x+" "+r.y+" Z"}function R(e){return document.getElementById(e)}function C(e){var t=null;try{document.querySelectorAll(e).length&&(t=i.compile(document.querySelector(e).innerHTML.trim()))}catch(o){t=i.compile(e)}return t}function L(e){var t=R(e);t&&r.remove(t)}function M(e,t){var i;return i=e.split(t.element.id+"_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function T(e){return e&&null!==e.match("{value}")?"":e}function O(e,t,i,r,n){var a,l=i.width,s=i.height,p=e.x,u=e.y,d=e.x+-l/2,c=e.y+-s/2;switch(t){case"Circle":o.merge(n,{rx:l/2,ry:s/2,cx:p,cy:u});break;case"Diamond":a="M "+d+" "+u+" L "+p+" "+(u+-s/2)+" L "+(p+l/2)+" "+u+" L "+p+" "+(u+s/2)+" L "+d+" "+u+" Z",o.merge(n,{d:a});break;case"Rectangle":a="M "+d+" "+(u+-s/2)+" L "+(p+l/2)+" "+(u+-s/2)+" L "+(p+l/2)+" "+(u+s/2)+" L "+d+" "+(u+s/2)+" L "+d+" "+(u+-s/2)+" Z",o.merge(n,{d:a});break;case"Triangle":a="M "+p+" "+u+" L "+(p-s)+" "+(u-l/2)+"L "+(p-s)+" "+(u+l/2)+" Z",o.merge(n,{d:a});break;case"InvertedTriangle":a="M "+p+" "+u+" L "+(p+s)+" "+(u-l/2)+"L "+(p+s)+" "+(u+l/2)+" Z",o.merge(n,{d:a});break;case"Image":o.merge(n,{href:r,height:s,width:l,x:d,y:c})}return n}function z(e,t,i){var o=0,r=0,n=t.filter(function(t){return o=Math.min(t.start,t.end),r=Math.max(t.start,t.end),e>=o&&r>=e});return n.length?n[0].rangeColor:i}Object.defineProperty(t,"__esModule",{value:!0}),t.measureText=a,t.getFontStyle=l,t.setStyles=s,t.measureElementRect=p,t.stringToNumber=u,t.textElement=d,t.appendPath=c,t.calculateSum=h,t.linear=g,t.getAngleFromValue=m,t.getDegree=y,t.getValueFromAngle=v,t.isCompleteAngle=f,t.getAngleFromLocation=b,t.getLocationFromAngle=x,t.getPathArc=P,t.getRangePath=A,t.getCompleteArc=_,t.getCirclePath=w,t.getCompletePath=S,t.getElement=R,t.getTemplateFunction=C,t.removeElement=L,t.getPointer=M,t.getLabelFormat=T,t.calculateShapes=O,t.getRangeColor=z;var E=function(){function e(e){this.id=e}return e}();t.CustomizeOption=E;var j=function(e){function t(t,i,o,r,n,a,l,s,p){void 0===s&&(s=""),void 0===p&&(p="");var u=e.call(this,t)||this;return u.opacity=n,u.fill=i,u.stroke=r,u["stroke-width"]=o,u["stroke-dasharray"]=a,u.d=l,u.transform=s,u.style=p,u}return n(t,e),t}(E);t.PathOption=j;var k=function(e){function t(t,i,o,r,n){var a=e.call(this,t)||this;return a.y=n.y,a.x=n.x,a.height=n.height,a.width=n.width,a.opacity=r,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return n(t,e),t}(E);t.RectOption=k;var F=function(){function e(e,t){this.width=e,this.height=t}return e}();t.Size=F;var W=function(){function e(e,t){this.x=e,this.y=t}return e}();t.GaugeLocation=W;var V=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}();t.Rect=V;var B=function(e){function t(t,i,o,r,n,a,l){void 0===a&&(a="");var s=e.call(this,t)||this;return s.transform="",s.baseLine="auto",s.x=i,s.y=o,s.anchor=r,s.text=n,s.transform=a,s.baseLine=l,s}return n(t,e),t}(E);t.TextOption=B;var N=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}();t.VisibleLabels=N}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r,n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function o(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),a=this&&this.__decorate||function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};o=[i,t,i(4),i(3),i(7)],void 0!==(r=function(e,t,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(2)],l.prototype,"width",void 0),a([i.Property("")],l.prototype,"dashArray",void 0),a([i.Property(r.Theme.axisLineColor)],l.prototype,"color",void 0),t.Line=l;var s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Complex(r.Theme.axisLabelFont,o.Font)],s.prototype,"font",void 0),a([i.Property("")],s.prototype,"format",void 0),a([i.Property("Inside")],s.prototype,"position",void 0),a([i.Property("None")],s.prototype,"hiddenLabel",void 0),a([i.Property(!1)],s.prototype,"autoAngle",void 0),a([i.Property(!1)],s.prototype,"useRangeColor",void 0),a([i.Property(0)],s.prototype,"offset",void 0),t.Label=s;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(null)],p.prototype,"start",void 0),a([i.Property(null)],p.prototype,"end",void 0),a([i.Property(null)],p.prototype,"radius",void 0),a([i.Property(10)],p.prototype,"startWidth",void 0),a([i.Property(10)],p.prototype,"endWidth",void 0),a([i.Property(null)],p.prototype,"color",void 0),t.Range=p;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(null)],u.prototype,"width",void 0),a([i.Property(null)],u.prototype,"height",void 0),a([i.Property(null)],u.prototype,"interval",void 0),a([i.Property(0)],u.prototype,"offset",void 0),a([i.Property(r.Theme.tickLineColor)],u.prototype,"color",void 0),a([i.Property("Inside")],u.prototype,"position",void 0),a([i.Property(!1)],u.prototype,"useRangeColor",void 0),t.Tick=u;var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property("#FFFFFF")],d.prototype,"color",void 0),a([i.Complex({color:r.Theme.pointerColor,width:8},o.Border)],d.prototype,"border",void 0),a([i.Property(8)],d.prototype,"radius",void 0),t.Cap=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(r.Theme.pointerColor)],c.prototype,"color",void 0),a([i.Complex({color:r.Theme.pointerColor,width:0},o.Border)],c.prototype,"border",void 0),a([i.Property("0%")],c.prototype,"length",void 0),t.NeedleTail=c;var h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(!0)],h.prototype,"enable",void 0),a([i.Property(1e3)],h.prototype,"duration",void 0),t.Animation=h;var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(null)],g.prototype,"content",void 0),a([i.Property(90)],g.prototype,"angle",void 0),a([i.Property("50%")],g.prototype,"radius",void 0),a([i.Property("-1")],g.prototype,"zIndex",void 0),a([i.Property(!1)],g.prototype,"autoAngle",void 0),a([i.Complex({size:"12px",color:"#686868"},o.Font)],g.prototype,"textStyle",void 0),a([i.Property(null)],g.prototype,"description",void 0),t.Annotation=g;var m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(i.ChildProperty);a([i.Property(null)],m.prototype,"value",void 0),a([i.Property("Needle")],m.prototype,"type",void 0),a([i.Property(null)],m.prototype,"imageUrl",void 0),a([i.Property(null)],m.prototype,"radius",void 0),a([i.Property(20)],m.prototype,"pointerWidth",void 0),a([i.Complex({},d)],m.prototype,"cap",void 0),a([i.Complex({},c)],m.prototype,"needleTail",void 0),a([i.Property(r.Theme.pointerColor)],m.prototype,"color",void 0),a([i.Complex({color:"#DDDDDD",width:0},o.Border)],m.prototype,"border",void 0),a([i.Complex(null,h)],m.prototype,"animation",void 0),a([i.Property("Circle")],m.prototype,"markerShape",void 0),a([i.Property(5)],m.prototype,"markerHeight",void 0),a([i.Property(null)],m.prototype,"description",void 0),a([i.Property(5)],m.prototype,"markerWidth",void 0),t.Pointer=m;var y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return n(t,e),t}(i.ChildProperty);a([i.Property(null)],y.prototype,"minimum",void 0),a([i.Property(null)],y.prototype,"maximum",void 0),a([i.Property(null)],y.prototype,"radius",void 0),a([i.Complex({},l)],y.prototype,"lineStyle",void 0),a([i.Collection([{}],p)],y.prototype,"ranges",void 0),a([i.Collection([{}],m)],y.prototype,"pointers",void 0),a([i.Collection([{}],g)],y.prototype,"annotations",void 0),a([i.Complex({width:2,height:10},u)],y.prototype,"majorTicks",void 0),a([i.Complex({width:2,height:5},u)],y.prototype,"minorTicks",void 0),a([i.Property(200)],y.prototype,"startAngle",void 0),a([i.Property(160)],y.prototype,"endAngle",void 0),a([i.Property("ClockWise")],y.prototype,"direction",void 0),a([i.Property(null)],y.prototype,"background",void 0),a([i.Complex({},s)],y.prototype,"labelStyle",void 0),t.Axis=y}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t],void 0!==(r=function(e,t){"use strict";function i(e){var t;switch(e){case"Material":case"Fabric":t=["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]}return t}Object.defineProperty(t,"__esModule",{value:!0});!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:"#212121",fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor="#757575",e.tickLineColor="#757575",e.pointerColor="#757575"}(t.Theme||(t.Theme={})),t.getRangePalette=i}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t,i(5),i(5),i(9),i(4)],void 0!==(r=function(e,t,i,o,r,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,t){var i=this,r=n.createElement("div",{id:this.elementId+"_Annotations_"+t}),a=o.getElement(this.elementId+"_Secondary_Element");e.annotations.map(function(e,o){null!==e.content&&i.createTemplate(r,o,t)}),a&&r.childElementCount&&a.appendChild(r)},e.prototype.createTemplate=function(e,t,a){var l=this.gauge.axes[a],s=l.annotations[t],p=n.createElement("div",{id:this.elementId+"_Axis_"+a+"_Annotation_"+t,styles:"position: absolute; z-index:"+s.zIndex+";transform:"+(s.autoAngle?"rotate("+(s.angle-90)+"deg)":"rotate(0deg)")+";"}),u={cancel:!1,name:r.annotationRender,content:s.content,axis:l,annotation:s,textStyle:s.textStyle};this.gauge.trigger(r.annotationRender,u);var d,c;if(!u.cancel){if((d=o.getTemplateFunction(u.content))&&d(l).length)for(c=d(l);c.length>0;)p.appendChild(c[0]);else p.appendChild(n.createElement("div",{innerHTML:u.content,styles:i.getFontStyle(u.textStyle)}));this.updateLocation(p,l,s),e.appendChild(p)}},e.prototype.updateLocation=function(e,t,r){var n=i.getLocationFromAngle(r.angle-90,i.stringToNumber(r.radius,t.currentRadius),this.gauge.midPoint),a=o.measureElementRect(e);e.style.left=n.x-a.width/2+"px",e.style.top=n.y-a.height/2+"px",e.setAttribute("aria-label",r.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}();t.Annotations=a}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t],void 0!==(r=function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loaded="loaded",t.load="load",t.animationComplete="animationComplete",t.axisLabelRender="axisLabelRender",t.tooltipRender="tooltipRender",t.annotationRender="annotationRender",t.gaugeMouseMove="gaugeMouseMove",t.gaugeMouseLeave="gaugeMouseLeave",t.gaugeMouseDown="gaugeMouseDown",t.gaugeMouseUp="gaugeMouseUp",t.dragStart="dragStart",t.dragMove="dragMove",t.dragEnd="dragEnd",t.resized="resized"}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t,i(4),i(11),i(5),i(5),i(9)],void 0!==(r=function(e,t,i,o,r,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e){this.gauge=e,this.element=e.element,this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.ejTooltip=new o.Tooltip({opensOn:"custom",beforeRender:this.onBeforeRender.bind(this),beforeOpen:this.tooltipCustomization.bind(this),openDelay:0,closeDelay:1e3}),this.ejTooltip.appendTo(this.element)}return e.prototype.renderTooltip=function(e){var t,i,o=r.getPointer(e.id,this.gauge);this.currentAxis=this.gauge.axes[o.axisIndex],this.currentPointer=this.currentAxis.pointers[o.pointerIndex],i=n.getAngleFromValue(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,t=this.appendTargetElement(i),null===t.getAttribute("data-tooltip-id")&&(this.findPosition(i),this.ejTooltip.open(t))},e.prototype.appendTargetElement=function(e){var t=n.getLocationFromAngle(e,this.currentAxis.currentRadius,this.gauge.midPoint),o=n.getElement(this.element.id+"_GaugeTooltip");return o?(o.style.left=t.x+"px",o.style.top=t.y+"px"):(o=i.createElement("div",{id:this.element.id+"_GaugeTooltip",styles:"position:absolute;left:"+t.x+"px;top:"+t.y+"px;width:2px;height:2px;background:transparent"}),n.getElement(this.element.id+"_Secondary_Element").appendChild(o)),o},e.prototype.findPosition=function(e){switch(!0){case e>=0&&e<=45:this.ejTooltip.position="right bottom";break;case e>=45&&e<90:this.ejTooltip.position="bottom right";break;case e>=90&&e<135:this.ejTooltip.position="bottom left";break;case e>=135&&e<180:this.ejTooltip.position="left bottom";break;case e>=180&&e<225:this.ejTooltip.position="left top";break;case e>=225&&e<270:this.ejTooltip.position="top left";break;case e>=270&&e<315:this.ejTooltip.position="top right";break;default:this.ejTooltip.position="right top"}this.ejTooltip.dataBind()},e.prototype.onBeforeRender=function(e){var t=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,i=t&&null!==t.match("{value}"),o=this.gauge.intl.getNumberFormat({format:n.getLabelFormat(t),useGrouping:this.gauge.useGroupingSeparator}),l=i?t.replace(new RegExp("{value}","g"),o(this.currentPointer.currentValue)):o(this.currentPointer.currentValue);l=this.tooltip.template?r.getTemplateFunction(this.tooltip.template)(this.currentAxis)[0]:l;var s={cancel:!1,name:a.tooltipRender,content:l,border:this.borderStyle,axis:this.currentAxis,pointer:this.currentPointer,textStyle:this.textStyle};this.gauge.trigger(a.tooltipRender,s),this.borderStyle=s.border,e.cancel=s.cancel,this.ejTooltip.content=s.content,this.textStyle=s.textStyle,this.ejTooltip.dataBind()},e.prototype.tooltipCustomization=function(e){var t,o,r=this.textStyle,n=this.borderStyle.color,a=this.borderStyle.width,l=5;e.element.classList.remove("e-popup-close"),e.element.classList.add("e-popup-open");var s=e.element.querySelector(".e-arrow-tip");i.setStyleAttribute(e.element,{backgroundColor:this.tooltip.fill,borderColor:n||"#212121",borderWidth:a+"px"}),i.setStyleAttribute(e.element.querySelector(".e-tip-content"),{color:r.color,fontFamily:r.fontFamily,fontSize:r.size,fontWeight:r.fontWeight,opacity:r.opacity.toString(),fontStyle:r.fontStyle}),i.setStyleAttribute(e.element.querySelector(".e-arrow-tip"),{width:2*(l+a)+"px",height:l+a+"px"}),s.classList.contains("e-tip-top")?(l=e.element.querySelector(".e-arrow-tip").offsetHeight,t=l+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-outer"),{borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:n,borderLeftWidth:t,borderRightWidth:t,borderBottomWidth:t}),o=l-a+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-inner"),{borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:this.tooltip.fill,borderLeftWidth:o,borderRightWidth:o,borderBottomWidth:o,left:a+"px",top:a+"px"})):s.classList.contains("e-tip-bottom")?(l=e.element.querySelector(".e-arrow-tip").offsetHeight,t=l+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-outer"),{borderRightColor:"transparent",borderLeftColor:"transparent",borderTopColor:n,borderLeftWidth:t,borderRightWidth:t,borderTopWidth:t}),o=l-a+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-inner"),{borderRightColor:"transparent",borderLeftColor:"transparent",borderTopColor:this.tooltip.fill,borderLeftWidth:o,borderRightWidth:o,borderTopWidth:o,left:a+"px",top:"0"})):s.classList.contains("e-tip-left")?(i.setStyleAttribute(e.element.querySelector(".e-arrow-tip"),{width:l+a+"px",height:2*(l+a)+"px"}),l=e.element.querySelector(".e-arrow-tip").offsetWidth,t=l+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-outer"),{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:n,borderTopWidth:t,borderBottomWidth:t,borderRightWidth:t}),o=l-a+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-inner"),{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:this.tooltip.fill,borderTopWidth:o,borderBottomWidth:o,borderRightWidth:o,left:a+"px",top:a+"px"})):(i.setStyleAttribute(e.element.querySelector(".e-arrow-tip"),{width:l+a+"px",height:2*(l+a)+"px"}),l=e.element.querySelector(".e-arrow-tip").offsetWidth,t=l+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-outer"),{borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:n,borderTopWidth:t,borderBottomWidth:t,borderLeftWidth:t}),o=l-a+"px",i.setStyleAttribute(e.element.querySelector(".e-arrow-tip-inner"),{borderTopColor:"transparent",borderBottomColor:"transparent",borderLeftColor:this.tooltip.fill,borderTopWidth:o,borderBottomWidth:o,borderLeftWidth:o,left:(a<=1?0:-1)+"px",top:a+"px"})),this.ejTooltip.refresh(e.target),i.setStyleAttribute(e.element,{display:"block",transitionProperty:"left,top",transitionDuration:this.tooltip.enableAnimation?"1000ms":"0ms"})},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){},e}();t.GaugeTooltip=l}.apply(t,o))&&(e.exports=r)},function(e,i){e.exports=t},function(e,t,i){var o,r;o=[i,t,i(4),i(5),i(5),i(9),i(13),i(14)],void 0!==(r=function(e,t,i,o,r,n,a,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e){this.gauge=e,this.axisRenderer=new a.AxisRenderer(e),this.pointerRenderer=new l.PointerRenderer(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,t,i=0,o=0,n=this.gauge.axes;o<n.length;o++){var a=n[o];e=Math.min(a.rect.width,a.rect.height)/2,t=null!=a.radius?r.stringToNumber(a.radius,e):e,i=Math.max.apply(Math,a.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),t=i>100&&null==a.radius?100*t/i:t,a.currentRadius=t-a.nearSize,a.visibleRange.interval=this.calculateNumericInterval(a,a.rect),this.calculateVisibleLabels(a)}},e.prototype.measureAxisSize=function(e,t){var i,n=this;this.computeSize(e.axes,t),e.axes.map(function(e,a){i=o.calculateSum(a,n.farSizes.length-1,n.farSizes),e.rect=new r.Rect(t.x+i,t.y+i,t.width-2*i,t.height-2*i)})},e.prototype.calculateAxisValues=function(e){for(var t=0,i=this.gauge.axes;t<i.length;t++){var o=i[t];this.calculateVisibleRange(o,e),this.calculateVisibleLabels(o)}},e.prototype.calculateVisibleRange=function(e,t){var i=e.majorTicks.interval,o=Math.min(null===e.minimum?0:e.minimum,e.maximum),r=Math.max(e.minimum,null===e.maximum?100:e.maximum);e.pointers.map(function(t){t.currentValue=null!==t.value?t.value<o?o:t.value>r?r:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,r=null===e.maximum?Math.max(t.currentValue,r):r}),o=o===r?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:r,interval:i},e.visibleRange.interval=this.calculateNumericInterval(e,t)},e.prototype.calculateNumericInterval=function(e,t){if(null!==e.majorTicks.interval)return e.majorTicks.interval;var i=e.endAngle-e.startAngle;return i=i<=0?i+360:i,this.calculateNiceInterval(e.visibleRange.max,e.visibleRange.min,e.currentRadius?e.currentRadius:t.width/2,i)},e.prototype.calculateNiceInterval=function(e,t,i,o){for(var r=e-t,n=2*Math.PI*i*(o/360),a=Math.max(.01599*n,1),l=r/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),p=0,u=[10,5,2,1];p<u.length;p++){var d=u[p],c=s*d;if(a<r/c)break;l=c}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,a=i.format&&null!==i.format.match("{value}"),l=this.gauge.intl.getNumberFormat({format:r.getLabelFormat(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var s=e.visibleRange.min,p=e.visibleRange.interval,u=e.visibleRange.max;s<=u&&p;s+=p)t={cancel:!1,name:n.axisLabelRender,axis:e,text:a?i.format.replace(new RegExp("{value}","g"),l(s)):l(s),value:s},this.gauge.trigger(n.axisLabelRender,t),t.cancel||e.visibleLabels.push(new o.VisibleLabels(t.text,s));this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,r,n,a,l,s=0,p=0,u=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,c=e;d<c.length;d++){var h=c[d];i=h.lineStyle.width/2,o=0,r=0,n="Outside"===h.majorTicks.position,s=h.majorTicks.offset,a="Outside"===h.minorTicks.position,p=h.minorTicks.offset,l="Outside"===h.labelStyle.position,u=h.labelStyle.offset,o+=n&&a&&l?0:5,o+=(n?h.majorTicks.height+i:0)+(l?h.maxLabelSize.height+10+u:0)+(a&&!n?h.minorTicks.height+i:0)+i,o+=n&&a?Math.max(s,p):n?s:a?p:0,r+=(n?0:h.majorTicks.height+i)+(l?0:h.maxLabelSize.height+10+u)+(!a&&n?h.minorTicks.height+i:0)+i,r+=n||a?n?a?0:p:s:Math.max(s,p),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=r+o),h.nearSize=o-5,h.farSize=r,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(){var e,t=this,o=this.gauge,r=this.axisRenderer,n=o.renderer.createGroup({id:o.element.id+"_AxesCollection","clip-path":"url(#"+o.element.id+"_GaugeAreaClipRect_)"});o.element.appendChild(i.createElement("div",{id:o.element.id+"_Secondary_Element",styles:"position: relative"})),o.axes.map(function(i,a){e=o.renderer.createGroup({id:o.element.id+"_Axis_Group_"+a}),r.drawAxisOuterLine(i,a,e,o),r.drawAxisRange(i,a,e,o),r.drawAxisLine(i,a,e,o),r.drawMajorTickLines(i,a,e,o),r.drawMinorTickLines(i,a,e,o),r.drawAxisLabels(i,a,e,o),t.pointerRenderer.drawPointers(i,a,e,o),o.annotationsModule&&o.annotationsModule.renderAnnotation(i,a),n.appendChild(e)}),o.svgObject.appendChild(o.renderer.drawClipPath({id:o.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:o.availableSize.width,height:o.availableSize.height,fill:"transparent",stroke:"transparent"})),o.svgObject.appendChild(n)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new r.Size(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var a=n[i];a.size=o.measureText(a.text,t.labelStyle.font),t.maxLabelSize.width=a.size.width>t.maxLabelSize.width?a.size.width:t.maxLabelSize.width,t.maxLabelSize.height=a.size.height>t.maxLabelSize.height?a.size.height:t.maxLabelSize.height}},e}();t.AxisLayoutPanel=s}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t,i(5),i(5),i(7)],void 0!==(r=function(e,t,i,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,r,n){var a=e.background;this.setRangeColor(e),null!==a&&i.appendPath(new i.PathOption(n.element.id+"_AxisOuterLine_"+t,a,0,"transparent",null,"0",o.getPathArc(n.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),r,n)},e.prototype.drawAxisLine=function(e,t,r,n){var a=e.startAngle,l=e.endAngle;e.lineStyle.width>0&&(a=o.isCompleteAngle(a,l)?[0,l=360][0]:a,i.appendPath(new i.PathOption(n.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,o.getPathArc(n.midPoint,a-90,l-90,e.currentRadius),"","pointer-events:none;"),r,n))},e.prototype.drawAxisLabels=function(e,t,r,n){var a,l,s,p,u=n.renderer.createGroup({id:n.element.id+"_Axis_Labels_"+t}),d=e.visibleRange.min,c=e.visibleRange.max,h=e.visibleLabels,g=e.labelStyle,m=e.currentRadius;"Outside"===g.position?m+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:m-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var y=0,v=h.length;y<v;y++)0===y&&"First"===g.hiddenLabel||y===v-1&&"Last"===g.hiddenLabel||(p=h[y],s=Math.round(o.getAngleFromValue(p.value,c,d,e.startAngle,e.endAngle,"ClockWise"===e.direction)),a=i.getLocationFromAngle(s,m,n.midPoint),l=this.findAnchor(a,g,s,p),i.textElement(new i.TextOption(n.element.id+"_Axis_"+t+"_Label_"+y,a.x,a.y,l,p.text,g.autoAngle?"rotate("+(s+90)+","+a.x+","+a.y+")":"","auto"),g.font,g.useRangeColor?o.getRangeColor(p.value,e.ranges,g.font.color):g.font.color,u,"pointer-events:none;"));r.appendChild(u)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var r="Inside"===t.position?i>120&&i<240?"start":300<i||i<60?"end":"middle":i>120&&i<240?"end":300<i||i<60?"start":"middle";return e.y+="Inside"===t.position?i>=240&&i<=300?o.size.height/2:i>=60&&i<=120?0:o.size.height/4:i>=240&&i<=300?0:i>=60&&i<=120?o.size.height/2:o.size.height/4,r},e.prototype.drawMinorTickLines=function(e,t,r,n){var a=n.renderer.createGroup({id:n.element.id+"_Axis_MinorTickLines_"+t}),l=e.minorTicks,s=null!==l.interval?l.interval:e.visibleRange.interval/2,p=l.useRangeColor;if(l.width&&l.height&&s){for(var u=e.visibleRange.min,d=e.visibleRange.max;u<=d;u+=s)this.majorValues.indexOf(+u.toFixed(3))<0&&i.appendPath(new i.PathOption(n.element.id+"_Axis_Minor_TickLine_"+t+"_"+u,"transparent",l.width,p?o.getRangeColor(u,e.ranges,l.color):l.color,null,"0",this.calculateTicks(u,l,e),"","pointer-events:none;"),a,n);r.appendChild(a)}},e.prototype.drawMajorTickLines=function(e,t,r,n){var a=n.renderer.createGroup({id:n.element.id+"_Axis_MajorTickLines_"+t}),l=e.majorTicks,s=l.useRangeColor;if(this.majorValues=[],l.width&&l.height&&e.visibleRange.interval){for(var p=e.visibleRange.min,u=e.visibleRange.max,d=e.visibleRange.interval;p<=u;p+=d)this.majorValues.push(+p.toFixed(3)),i.appendPath(new i.PathOption(n.element.id+"_Axis_Major_TickLine_"+t+"_"+p,"transparent",l.width,s?o.getRangeColor(p,e.ranges,l.color):l.color,null,"0",this.calculateTicks(p,l,e),"","pointer-events:none;"),a,n);r.appendChild(a)}},e.prototype.calculateTicks=function(e,t,r){var n=r.lineStyle.width/2+t.offset,a="Outside"===t.position,l=o.getAngleFromValue(e,r.visibleRange.max,r.visibleRange.min,r.startAngle,r.endAngle,"ClockWise"===r.direction),s=i.getLocationFromAngle(l,r.currentRadius+(a?n:-n),this.gauge.midPoint),p=i.getLocationFromAngle(l,r.currentRadius+(a?n:-n)+(a?t.height:-t.height),this.gauge.midPoint);return"M "+s.x+" "+s.y+" L "+p.x+" "+p.y+" "},e.prototype.drawAxisRange=function(e,t,r,n){var a,l,s,p,u,d,c=this,h=n.renderer.createGroup({id:n.element.id+"_Axis_Ranges_"+t}),g="ClockWise"===e.direction,m=e.visibleRange.min,y=e.visibleRange.max;e.ranges.map(function(r,v){c.calculateRangeRadius(e,r),s=Math.min(Math.max(r.start,m),r.end),p=Math.min(Math.max(r.start,r.end),y),s!==p&&(a=o.getAngleFromValue(s,y,m,e.startAngle,e.endAngle,g),l=o.getAngleFromValue(p,y,m,e.startAngle,e.endAngle,g),u=r.startWidth,d=r.endWidth,l=g?l:[a,a=l][0],d=g?d:[u,u=d][0],i.appendPath(new i.PathOption(n.element.id+"_Axis_"+t+"_Range_"+v,r.rangeColor,0,r.rangeColor,1,"0",o.getPathArc(n.midPoint,Math.round(a),Math.round(l),r.currentRadius,u,d),"","pointer-events:none;"),h,n))}),r.appendChild(h)},e.prototype.calculateRangeRadius=function(e,t){var o=null!==t.radius?t.radius:"100%";t.currentRadius=i.stringToNumber(o,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=r.getRangePalette(this.gauge.theme);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}();t.AxisRenderer=n}.apply(t,o))&&(e.exports=r)},function(e,t,i){var o,r;o=[i,t,i(5),i(5),i(5),i(4),i(9)],void 0!==(r=function(e,t,i,o,r,n,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o){var r,n,a=this,l=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,s){n=e.visibleRange,i.pathElement=[],a.calculatePointerRadius(e,i),r=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+s}),a["draw"+i.type+"Pointer"](e,t,s,r,o),a.setPointerValue(e,i,i.currentValue),l.appendChild(r),a.doPointerAnimation(i,e)}),i.appendChild(l)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):i.stringToNumber(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,r,n,a){var l,s,p,u,d=e.pointers[r],c=a.midPoint,h=d.pointerWidth/2;s=o.getLocationFromAngle(0,d.currentRadius,c),p="M "+c.x+" "+(c.y-h)+" L "+s.x+" "+c.y+" L "+c.x+" "+(c.y+h)+" Z",d.pathElement.push(i.appendPath(new o.PathOption(a.element.id+"_Axis_"+t+"_Pointer_Needle_"+r,d.color,d.border.width,d.border.color,null,"0",p),n,a)),l=i.stringToNumber(d.needleTail.length,d.currentRadius),u="M "+c.x+" "+(c.y-h)+" L "+s.x+" "+(c.y-h)+" L "+s.x+" "+(c.y+h)+" L "+c.x+" "+(c.y+h),l&&(s=o.getLocationFromAngle(180,l,a.midPoint),p="M "+c.x+" "+(c.y-h)+" L "+s.x+" "+(c.y-h)+" L "+s.x+" "+(c.y+h)+" L "+c.x+" "+(c.y+h)+" Z",d.pathElement.push(i.appendPath(new o.PathOption(a.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+r,d.needleTail.color,d.needleTail.border.width,d.needleTail.border.color,null,"0",p),n,a)),u+=" L "+s.x+" "+(c.y+h)+" L "+s.x+" "+(c.y-h)),d.cap.radius&&d.pathElement.push(i.appendPath(i.calculateShapes(c,"Circle",new i.Size(2*d.cap.radius,2*d.cap.radius),"",new o.PathOption(a.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+r,d.cap.color,d.cap.border.width,d.cap.border.color,null,"0","","")),n,a,"Ellipse")),d.pathElement.push(i.appendPath(new o.PathOption(a.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+r,"transparent",0,"transpanret",null,"0",u+" Z"),n,a))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,a=r.getAngleFromValue(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),l=r.getAngleFromValue(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);l=n?l:[a,a=l][0],t.pathElement.map(function(s){"RangeBar"===t.type?s.setAttribute("d",r.getCompleteArc(o,a,l,t.currentRadius,t.currentRadius-t.pointerWidth)):s.setAttribute("transform","rotate("+r.getAngleFromValue(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),s.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,r,n,a){var l=e.pointers[r],s=o.getLocationFromAngle(0,l.currentRadius,a.midPoint);l.pathElement.push(i.appendPath(i.calculateShapes(s,l.markerShape,new i.Size(l.markerWidth,l.markerHeight),l.imageUrl,new o.PathOption(a.element.id+"_Axis_"+t+"_Pointer_Marker_"+r,l.color,l.border.width,l.border.color,null,"0","","")),n,a,"Circle"===l.markerShape?"Ellipse":"Image"===l.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,r,n,a){var l=e.pointers[r];l.pathElement.push(i.appendPath(new o.PathOption(a.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+r,l.color,l.border.width,l.border.color,1,"0",""),n,a))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,r=e.currentValue;e.animation.enable&&o!==r&&this.gauge.animatePointer&&e.pathElement.map(function(n){"RangeBar"===e.type?i.performRangeBarAnimation(n,o,r,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(n,o,r,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,t,i,o,l,s,p){var u,d=this,c="ClockWise"===o.direction,h=r.getAngleFromValue(t,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,c),g=r.getAngleFromValue(i,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,c),m=h>g?g+360:g;new n.Animation({}).animate(e,{duration:l.animation.duration,progress:function(o){u=t<i||Math.round(h)===Math.round(m)?c?m-h:m-h-360:c?m-h-360:m-h,e.style.animation="None",e.setAttribute("transform","rotate("+r.linear(o.timeStamp,h,u,o.duration)+","+d.gauge.midPoint.x.toString()+","+d.gauge.midPoint.y.toString()+")")},end:function(t){d.setPointerValue(o,l,i),("Marker"===l.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&d.gauge.trigger(a.animationComplete,{axis:o,pointer:l})}})},e.prototype.performRangeBarAnimation=function(e,t,i,o,l,s,p){var u,d=this,c="ClockWise"===o.direction,h=r.getAngleFromValue(t,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,c),g=r.getAngleFromValue(o.visibleRange.min,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,c),m=r.getAngleFromValue(i,o.visibleRange.max,o.visibleRange.min,o.startAngle,o.endAngle,c),y=h>m?m+360:m;new n.Animation({}).animate(e,{duration:l.animation.duration,progress:function(o){e.style.animation="None",u=t<i||Math.round(h)===Math.round(y)?c?y-h:y-h-360:c?y-h-360:y-h,c?e.setAttribute("d",r.getCompleteArc(d.gauge.midPoint,g,r.linear(o.timeStamp,h,u,o.duration)+1e-4,s,p)):e.setAttribute("d",r.getCompleteArc(d.gauge.midPoint,r.linear(o.timeStamp,h,u,o.duration),g+1e-4,s,p))},end:function(e){d.setPointerValue(o,l,i),d.gauge.trigger(a.animationComplete,{axis:o,pointer:l})}})},e}();t.PointerRenderer=l}.apply(t,o))&&(e.exports=r)}])});