Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-circulargauge

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-circulargauge - npm Package Compare versions

Comparing version 17.1.1-beta to 17.1.32-beta

helper/e2e/circular-gauge-helper.d.ts

93

CHANGELOG.md

@@ -7,11 +7,29 @@ <!-- markdownlint-disable MD004 -->

## 16.4.54 (2019-02-19)
### CircularGauge
#### Bug Fixes
- Now, the gauge is rendered properly even in small size when it is moved to the center position.
## 16.4.53 (2019-02-13)
### CircularGauge
#### Bug Fixes
- Now, the range bar pointer can be dragged properly.
## 17.1.1-beta (2019-01-29)
### CircularGauge
#### New Features
- Provided rounding places support for the axis labels and tooltip text in circular gauge.
- Support has been provided to round off the axis label values and tooltip text.
- Provided support to display the last axis label, even if it is not in the interval value.
- Support has been provided to display the last label even if it is not in the visible range.
- Provided event to get and set the calculated radius of the circular gauge.
- An event has been provided to get or set the Circular Gauge radius dynamically.

@@ -24,2 +42,71 @@ - Provided support to assign percentage values for pointer width, ranges width and axis line width.

## 16.4.47 (2019-01-16)
### CircularGauge
#### Bug Fixes
- Now, the annotation is rendered properly with multiple div elements.
## 16.4.45 (2019-01-02)
### CircularGauge
#### Bug Fixes
- When drag the range bar pointer, the console error thrown resolved now.
## 16.4.40-beta (2018-12-10)
### CircularGauge
#### New Features
- Support has been added to set gap between the ranges.
- Support has been added to calculate the radius of the gauge based on the start and end angles.
## 16.3.33 (2018-11-20)
### CircularGauge
#### Bug Fixes
- Issue with range bar pointer tooltip is resolved now.
## 16.3.32 (2018-11-13)
### CircularGauge
#### Bug Fixes
- Tooltip is rendering properly without flickering, while the circular gauge is rendered in small space.
## 16.3.30 (2018-11-01)
### CircularGauge
#### New Features
- Provided the support to tooltip rendering at mouse position for range bar pointer.
## 16.3.30 (2018-11-01)
### CircularGauge
#### New Features
- Provided support to calculate the radius of the gauge, based on the start and end angles.
#### Bug Fixes
- The range bar pointer is rendering properly now, when the axis minimum and pointer values are same.
## 16.3.17 (2018-09-12)
### CircularGauge
#### Breaking Changes
- The circular gauge tooltip has been replaced with `EJ2 SVG Tooltip`, so now it is mandatory to include `ej2-svg-base.umd.min.js` in system.js configuration if you are using system.js module loader. Update the system.js configuration while using this version and above.
## 16.2.41 (2018-06-25)

@@ -26,0 +113,0 @@

4

dist/ej2-circulargauge.umd.min.js
/*!
* filename: ej2-circulargauge.umd.min.js
* version : 17.1.1-beta
* version : 17.1.32-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new N(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function s(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),S(e.id),t}function l(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,i,o,n,r){var a,s={},l=new t.SvgRenderer(""),u=r+" font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+";";return s={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:i.opacity,"dominant-baseline":e.baseLine,style:u},a=l.createText(s,e.text),n.appendChild(a),a}function d(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function h(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=m(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function y(e,t,i,o,n,r){return n-=m(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function m(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new V(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=m(t,i)?1e-4:0),s=o-n,l=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,s,e),f(i,l,e),o,u,u,a<180?0:1):A(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,s){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+s+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+s+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,s){var l=g(t,i-=m(t,i)?1e-4:0),u=r-a,d=r-s,h=r-(a+s)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,d,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,d,e),r,h,h,l<180?0:1)}function R(e,t,i,o,n,r,a,s,l,u,d,h){return"M "+e.x+" "+e.y+" A "+l+" "+l+" 0 "+h+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+s.x+" "+s.y+" A "+d+" "+u+" 0 "+h+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=m(t,i)?1e-4:0);return _(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function A(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function _(e,t,i,o,n,r,a,s){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+s+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+s+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function C(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function L(e,i,o){var n,r,a=C(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var s=a(i);s.length>0;)r.appendChild(s[0]);o.appendChild(r),n=new N(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function T(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,s=i.ownerDocument.documentElement.clientLeft,l=o.left+n-s,u=o.top+r-a;return new V(e-l,t-u)}function k(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,s=o.width,l=o.height,u=e.x,d=e.y,h=e.x+-s/2,p=e.y+-l/2;switch(i){case"Circle":t.merge(r,{rx:s/2,ry:l/2,cx:u,cy:d});break;case"Diamond":a="M "+h+" "+d+" L "+u+" "+(d+-l/2)+" L "+(u+s/2)+" "+d+" L "+u+" "+(d+l/2)+" L "+h+" "+d+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+h+" "+(d+-l/2)+" L "+(u+s/2)+" "+(d+-l/2)+" L "+(u+s/2)+" "+(d+l/2)+" L "+h+" "+(d+l/2)+" L "+h+" "+(d+-l/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+d+" L "+(u-l)+" "+(d-s/2)+"L "+(u-l)+" "+(d+s/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+d+" L "+(u+l)+" "+(d-s/2)+"L "+(u+l)+" "+(d+s/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:l,width:s,x:h,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var I,j=function(){var e=function(t,i){return(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])})(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)}}(),B=function(){return function(e){this.id=e}}(),F=function(e){function t(t,i,o,n,r,a,s,l,u){void 0===l&&(l=""),void 0===u&&(u="");var d=e.call(this,t)||this;return d.opacity=r,d.fill=i,d.stroke=n,d["stroke-width"]=o,d["stroke-dasharray"]=a,d.d=s,d.transform=l,d.style=u,d}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),N=function(){return function(e,t){this.width=e,this.height=t}}(),V=function(){return function(e,t){this.x=e,this.y=t}}(),D=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),G=function(e){function t(t,i,o,n,r,a,s){void 0===a&&(a="");var l=e.call(this,t)||this;return l.transform="",l.baseLine="auto",l.x=i,l.y=o,l.anchor=n,l.text=r,l.transform=a,l.baseLine=s,l}return j(t,e),t}(B),H=function(){return function(e,t,i){this.text=e,this.value=t,this.size=i}}(),U=function(){var e=function(t,i){return(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])})(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)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<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 s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property("#000000")],i.prototype,"fill",void 0),X([t.Complex({color:"#ffffff",size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor=null,e.tickLineColor=null,e.pointerColor=null}(I||(I={}));var K=function(){var e=function(t,i){return(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])})(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)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<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 s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(I.axisLineColor)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(I.tickLineColor)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property("#ffffff")],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),le=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(!1)],i.prototype,"showLastLabel",void 0),Q([t.Property(null)],i.prototype,"roundingPlaces",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],se)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue="animationComplete",de="axisLabelRender",he="radiusCalculate",pe="tooltipRender",ce="annotationRender",ge="gaugeMouseMove",ye="gaugeMouseLeave",me="gaugeMouseDown",ve=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=parseInt(this.gauge.width,10),r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount&&a.appendChild(r)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],s=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),l={cancel:!1,name:ce,content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger(ce,l);var u,d;if(!l.cancel){if((u=C(l.content))&&u(n).length)for(var h=(d=Array.prototype.slice.call(u(n))).length,p=0;p<h;p++)s.appendChild(d[p]);else s.appendChild(t.createElement("div",{innerHTML:l.content,styles:r(l.textStyle)}));this.updateLocation(s,n,a),e.appendChild(s)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,l(i.radius,t.currentRadius),this.gauge.midPoint),n=s(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),fe=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,s,l=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(l=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),d=this.gauge.element.getBoundingClientRect(),h=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),p=new D(Math.abs(d.left-u.left),Math.abs(d.top-u.top),u.width,u.height),g=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[g.axisIndex],this.currentPointer=this.currentAxis.pointers[g.pointerIndex];var y=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,m=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,v=m&&null!==m.match("{value}"),x=this.gauge.intl.getNumberFormat({format:k(m),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var b=void 0;b=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var P=v?m.replace(new RegExp("{value}","g"),x(b)):x(b);(s=f(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?s.x+10:s.x;var R={name:pe,cancel:!1,content:P,location:s,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger(pe,R);var w=R.tooltip.template;if(null!==w&&1===Object.keys(w).length&&(w=w[Object.keys(w)[0]]),this.tooltip.showAtMousePosition)R.location=T(o,n,this.gauge.svgObject),this.tooltipRect=p;else if(w){var A=L(w,this.gauge,this.tooltipEle);this.tooltipRect=Math.abs(h.left-u.left)>A.width?this.findPosition(p,y,P,R.location):p}else this.findPosition(p,y,P,R.location);if(!R.cancel&&!l){var _=this.gauge.theme.toLowerCase(),M=_.indexOf("dark")>-1||"highcontrast"===_?"#00000":"#FFFFFF";R.tooltip.properties.textStyle.color=M,this.svgTooltip=new i.Tooltip({enable:!0,data:{value:R.content},template:w,enableAnimation:R.tooltip.enableAnimation,content:[R.content],location:R.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:_.indexOf("dark")>-1||"highcontrast"===_?"#FFFFFF":R.tooltip.fill,textStyle:R.tooltip.textStyle,border:R.tooltip.border}),this.svgTooltip.appendTo(this.tooltipEle),w&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px")}}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,s;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,s=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,s,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),xe=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&d(new F(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=m(n,r)?[0,r=360][0]:n,d(new F(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,s,l=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),d=e.visibleRange.min,h=e.visibleRange.max,p=e.visibleLabels,g=e.labelStyle,y=e.currentRadius;"Outside"===g.position?y+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:y-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var m=0,v=p.length;m<v;m++)0===m&&"First"===g.hiddenLabel||m===v-1&&"Last"===g.hiddenLabel||(s=p[m],n=f(a=Math.round(c(s.value,h,d,e.startAngle,e.endAngle,"ClockWise"===e.direction)),y,o.midPoint),r=this.findAnchor(n,g,a,s),u(new G(o.element.id+"_Axis_"+t+"_Label_"+m,n.x,n.y,r,s.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(s.value,e.ranges,g.font.color):g.font.color,l,"pointer-events:none;"));i.appendChild(l)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,s=r.useRangeColor;if(r.width&&r.height&&a){for(var l=e.visibleRange.min,u=e.visibleRange.max;l<=u;l+=a)this.majorValues.indexOf(+l.toFixed(3))<0&&d(new F(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+l,"transparent",r.width,s?O(l,e.ranges,r.color):r.color,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var s=e.visibleRange.min,l=e.visibleRange.max,u=e.visibleRange.interval;s<=l;s+=u)this.majorValues.push(+s.toFixed(3)),d(new F(o.element.id+"_Axis_Major_TickLine_"+t+"_"+s,"transparent",r.width,a?O(s,e.ranges,r.color):r.color,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),s=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+s.x+" "+s.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,s,l,u,h,p,g,y,m,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,A=e.visibleRange.max;e.ranges.map(function(i,_){v.calculateRangeRadius(e,i),s=Math.min(Math.max(i.start,w),i.end),l=Math.min(Math.max(i.start,i.end),A),r=c(s,A,w,e.startAngle,e.endAngle,R),a=c(l,A,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==_||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=_!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),s!==l&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,h=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],h=R?h:[u,u=h][0];var C=i.roundedCornerRadius,S=.25*C;y=((i.currentRadius-u/2)*(r*Math.PI/180)-C/S)/(i.currentRadius-u/2)*180/Math.PI,m=((i.currentRadius-h/2)*(a*Math.PI/180)+C/S)/(i.currentRadius-h/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+C)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-C)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?d(new F(o.element.id+"_Axis_"+t+"_Range_"+_,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(p),Math.ceil(g),y,m,i.currentRadius,u,h),"","pointer-events:none;"),f,o):d(new F(o.element.id+"_Axis_"+t+"_Range_"+_,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,h),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=l(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),be=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,l){e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+l}),r["draw"+i.type+"Pointer"](e,t,l,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):l(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,s,u,h=e.pointers[i],p=n.midPoint,c=h.pointerWidth/2;a=f(0,h.currentRadius,p),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",h.pathElement.push(d(new F(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,h.color,h.border.width,h.border.color,null,"0",s),o,n)),r=l(h.needleTail.length,h.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),s="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",h.pathElement.push(d(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,h.needleTail.color,h.needleTail.border.width,h.needleTail.border.color,null,"0",s),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),h.cap.radius&&h.pathElement.push(d(z(p,"Circle",new N(2*h.cap.radius,2*h.cap.radius),"",new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,h.cap.color,h.cap.border.width,h.cap.border.color,null,"0","","")),o,n,"Ellipse")),h.pathElement.push(d(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,r=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),a=c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);a=n?r===a?a+1:a:r===a?[r,r=a-1][0]:[r,r=a][0];var s,l,u,d,h=t.roundedCornerRadius,p=.25*h;i<=p&&(h=8,p=.25*(h/=2)),u=((t.currentRadius-t.pointerWidth/2)*(r*Math.PI/180)-h/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,d=((t.currentRadius-t.pointerWidth/2)*(a*Math.PI/180)+h/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,s=(t.currentRadius*(r*Math.PI/180)+h)/t.currentRadius*180/Math.PI,l=(t.currentRadius*(a*Math.PI/180)-h)/t.currentRadius*180/Math.PI,t.pathElement.map(function(p){"RangeBar"===t.type?t.roundedCornerRadius&&i?(p.setAttribute("d",P(o,Math.floor(s),Math.ceil(l),u,d,t.currentRadius,t.pointerWidth,t.pointerWidth)),h=0):p.setAttribute("d",w(o,r,a,t.currentRadius,t.currentRadius-t.pointerWidth)):p.setAttribute("transform","rotate("+c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),p.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(d(z(a,r.markerShape,new N(r.markerWidth,r.markerHeight),r.imageUrl,new F(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(d(new F(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,s){var l,u=this,d="ClockWise"===n.direction,h=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),y=h>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){l=i<o||Math.round(h)===Math.round(y)?d?y-h:y-h-360:d?y-h-360:y-h,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,h,l,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger(ue,{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,s){var l,u=this,d="ClockWise"===n.direction,h=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),g=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),y=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,d),m=h>y?y+360:y;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",l=i<o||Math.round(h)===Math.round(m)?d?m-h:m-h-360:d?m-h-360:m-h,d?e.setAttribute("d",w(u.gauge.midPoint,g,p(t.timeStamp,h,l,t.duration)+1e-4,a,s)):e.setAttribute("d",w(u.gauge.midPoint,p(t.timeStamp,h,l,t.duration),g+1e-4,a,s))},end:function(e){u.setPointerValue(n,r,o),u.gauge.trigger(ue,{axis:n,pointer:r})}})},e}(),Pe=function(){function e(e){this.gauge=e,this.axisRenderer=new xe(e),this.pointerRenderer=new be(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,s=this.gauge.axes;a<s.length;a++){var u=s[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?l(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var d=void 0,h=void 0,p=f((d=m(d=u.startAngle,u.endAngle)?[0,h=360][0]:d)-90,i,this.gauge.midPoint);h=u.endAngle;var c=f((h-=m(d,h)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,y=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;d>h&&!(Math.abs(d-h)>90)||(d>=270&&d<=360&&(h>270&&h<=360||h>=0&&h<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=h<=360&&h>=270?this.gauge.midPoint:h<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=h<=360&&h>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=h<=360&&h>=270||h>=0&&h<90?this.gauge.midPoint:h>=90&&h<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):d>=0&&d<90&&h>=0&&h<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=h>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=h>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=h>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):d>=90&&d<180&&h>90&&h<=360?(R=h<=180?this.gauge.midPoint:h>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=h>270?f(h-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=h>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):d>=180&&d<=270&&(h<=360&&h>=270||h<=180&&h>=0)&&(R=h>180&&h<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=h>=180&&h<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=h>180&&h<270?this.gauge.midPoint:h>=270&&h<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>5||x>5)||!(b>5||P>5)||(g=Math.abs(v+x-n),y=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,y)/2,u.currentRadius=(null!=u.radius?l(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect);var w=void 0;w={cancel:!1,name:he,currentRadius:u.currentRadius,gauge:this.gauge,midPoint:this.gauge.midPoint,axis:u},this.gauge.trigger(he,w),u.currentRadius=w.currentRadius,this.gauge.midPoint=w.midPoint,this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=h(n,o.farSizes.length,o.farSizes),e.rect=new D(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),n=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>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,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 n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),s=n/a,l=Math.pow(10,Math.floor(Math.log(s)/Math.log(10))),u=0,d=[10,5,2,1];u<d.length;u++){var h=l*d[u];if(a<n/h)break;s=h}return s},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:k(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=(e.visibleRange.interval+"").indexOf(".")>-1?(e.visibleRange.interval+"").split(".")[1].length:0,s=e.visibleRange.min,l=e.visibleRange.interval,u=e.visibleRange.max;s<=u&&l;s+=l)r=e.roundingPlaces?parseFloat(s.toFixed(e.roundingPlaces)):parseFloat(s.toFixed(a)),t={cancel:!1,name:de,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger(de,t),t.cancel||e.visibleLabels.push(new H(t.text,s));var d=e.visibleLabels[e.visibleLabels.length-1].value,h=e.visibleRange.max;d!==h&&!0===e.showLastLabel&&(t={cancel:!1,name:de,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(h)):n(h),value:h},this.gauge.trigger(de,t),t.cancel||e.visibleLabels.push(new H(t.text,h))),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,s,l=0,u=0,d=0;this.farSizes=[],this.calculateAxisValues(t);for(var h=0,p=e;h<p.length;h++){var c=p[h];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,l=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,s="Outside"===c.labelStyle.position,d=c.labelStyle.offset,o+=r&&a&&s?0:5,o+=(r?c.majorTicks.height+i:0)+(s?c.maxLabelSize.height+10+d:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(l,u):r?l:a?u:0,n+=(r?0:c.majorTicks.height+i)+(s?0:c.maxLabelSize.height+10+d)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:l:Math.max(l,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,s){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+s}),r.drawAxisOuterLine(t,s,o,n),r.drawAxisRange(t,s,o,n),r.drawAxisLine(t,s,o,n),r.drawMajorTickLines(t,s,o,n),r.drawMinorTickLines(t,s,o,n),r.drawAxisLabels(t,s,o,n),i.pointerRenderer.drawPointers(t,s,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,s),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new N(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),Re=function(){var e=function(t,i){return(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])})(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)}}(),we=function(e,t,i,o){var n,r=arguments.length,a=r<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 s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Ae=function(e){function i(t,i){return e.call(this,t,i)||this}return Re(i,e),i.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.themeEffect(),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},i.prototype.themeEffect=function(){var e=this.theme.toLowerCase();if("highcontrast"===e)this.titleStyle.color=this.titleStyle.color||"#FFFFFF",this.setThemeColors("#FFFFFF","#FFFFFF");else if(e.indexOf("dark")>-1)for(var t=0,i=this.axes;t<i.length;t++){var o=i[t];o.labelStyle.font.color=o.labelStyle.font.color||"#DADADA ",o.majorTicks.color=o.majorTicks.color||"#C8C8C8",o.minorTicks.color=o.minorTicks.color||"#9A9A9A";for(var n=0,r=o.pointers;n<r.length;n++){var a=r[n];a.color=a.color||"#DADADA",a.needleTail.color=a.needleTail.color||"#9A9A9A",a.needleTail.border.color=a.needleTail.border.color||"#9A9A9A",a.cap.color=a.cap.color||"#9A9A9A",a.cap.border.color=a.cap.border.color||"#9A9A9A"}}else this.titleStyle.color=this.titleStyle.color||"#424242",this.setThemeColors("#212121","#757575")},i.prototype.setThemeColors=function(e,t){for(var i=0,o=this.axes;i<o.length;i++){var n=o[i];n.lineStyle.color=n.lineStyle.color||t,n.labelStyle.font.color=n.labelStyle.font.color||e,n.majorTicks.color=n.majorTicks.color||t,n.minorTicks.color=n.minorTicks.color||t;for(var r=0,a=n.pointers;r<a.length;r++){var s=a[r];s.color=s.color||t,s.needleTail.color=s.needleTail.color||t,s.needleTail.border.color=s.needleTail.border.color||t,s.cap.color=s.cap.color||t,s.cap.border.color=s.cap.border.color||t}}},i.prototype.render=function(){this.calculateBounds(),this.renderElements()},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},i.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove",ge);this.trigger(ge,i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new V(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},i.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",ye);return this.trigger(ye,t),!1},i.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},i.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=y(v(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))},i.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart",me);return this.trigger(me,i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=E(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},i.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new V(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},i.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new N(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new N(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},i.prototype.setGaugeStyle=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"},i.prototype.setCulture=function(){this.intl=new t.Internationalization},i.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})},i.prototype.removeSvg=function(){if(S(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&&t.remove(this.svgObject)}},i.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-circulargauge").length;this.element.id="circulargauge_control_"+e}this.renderer=new t.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new Pe(this),this.animatePointer=!0},i.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=l(this.width,e)||e||600,o=l(this.height,t)||t||450;this.availableSize=new N(i,o)},i.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,s=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,d=Math.min(s,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,s,u):new D(a+s/2-d,r+u/2-d,2*d,2*d),this.gaugeRect=e;var h=null!==this.centerX?l(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?l(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new V(h,p),this.gaugeAxisLayoutPanel.measureAxis(e)},i.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},i.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},i.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},i.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],s=r.currentRadius,l=r.animation.enable;i=(i=i<n.visibleRange.min?n.visibleRange.min:i)>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),l?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,s,s-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),r.currentValue=i,r.value=i},i.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(S(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},i.prototype.setRangeValue=function(e,t,i,o){var r,s=M(this.element.id+"_Axis_"+e+"_Range_"+t),l=this.axes[e],u=l.ranges[t],d=l.visibleRange,h="ClockWise"===l.direction,p=Math.min(Math.max(i,d.min),o),g=Math.min(Math.max(i,o),d.max),y=c(p,d.max,d.min,l.startAngle,l.endAngle,h),m=c(g,d.max,d.min,l.startAngle,l.endAngle,h);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,m=h?m:[y,y=m][0],v=h?v:[r,r=v][0],s.setAttribute("d",x(this.midPoint,Math.round(y),Math.round(m),u.currentRadius,r,v)),a(s,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},i.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},i.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,ve]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,fe]}),e},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,n=!1,r=0,a=Object.keys(e);r<a.length;r++){switch(a[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":case"background":i=!0;break;case"axes":n=!0}}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!n||i||o||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))},i.prototype.getModuleName=function(){return"circulargauge"},we([t.Property(null)],i.prototype,"width",void 0),we([t.Property(null)],i.prototype,"height",void 0),we([t.Complex({color:"transparent",width:0},Y)],i.prototype,"border",void 0),we([t.Property("transparent")],i.prototype,"background",void 0),we([t.Property("")],i.prototype,"title",void 0),we([t.Complex({size:"15px",color:null},Z)],i.prototype,"titleStyle",void 0),we([t.Complex({},q)],i.prototype,"margin",void 0),we([t.Collection([{}],le)],i.prototype,"axes",void 0),we([t.Complex({},J)],i.prototype,"tooltip",void 0),we([t.Property(!1)],i.prototype,"enablePointerDrag",void 0),we([t.Property(null)],i.prototype,"centerX",void 0),we([t.Property(null)],i.prototype,"centerY",void 0),we([t.Property(!1)],i.prototype,"moveToCenter",void 0),we([t.Property("Material")],i.prototype,"theme",void 0),we([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),we([t.Property(null)],i.prototype,"description",void 0),we([t.Property(1)],i.prototype,"tabIndex",void 0),we([t.Event()],i.prototype,"loaded",void 0),we([t.Event()],i.prototype,"load",void 0),we([t.Event()],i.prototype,"animationComplete",void 0),we([t.Event()],i.prototype,"axisLabelRender",void 0),we([t.Event()],i.prototype,"radiusCalculate",void 0),we([t.Event()],i.prototype,"annotationRender",void 0),we([t.Event()],i.prototype,"tooltipRender",void 0),we([t.Event()],i.prototype,"dragStart",void 0),we([t.Event()],i.prototype,"dragMove",void 0),we([t.Event()],i.prototype,"dragEnd",void 0),we([t.Event()],i.prototype,"gaugeMouseMove",void 0),we([t.Event()],i.prototype,"gaugeMouseLeave",void 0),we([t.Event()],i.prototype,"gaugeMouseDown",void 0),we([t.Event()],i.prototype,"gaugeMouseUp",void 0),we([t.Event()],i.prototype,"resized",void 0),i=we([t.NotifyPropertyChanges],i)}(t.Component);e.CircularGauge=Ae,e.Annotations=ve,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=se,e.Axis=le,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=fe,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=s,e.stringToNumber=l,e.textElement=u,e.appendPath=d,e.calculateSum=h,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=y,e.isCompleteAngle=m,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=A,e.getCompletePath=_,e.getElement=M,e.getTemplateFunction=C,e.removeElement=S,e.getPointer=E,e.getElementSize=L,e.getMousePosition=T,e.getLabelFormat=k,e.calculateShapes=z,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=F,e.RectOption=W,e.Size=N,e.GaugeLocation=V,e.Rect=D,e.TextOption=G,e.VisibleLabels=H,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-svg-base")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-svg-base"],t):t(e.ej={},e.ej2Base,e.ej2SvgBase)}(this,function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new N(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),S(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,t,o,n,r){var a,l={},s=new i.SvgRenderer(""),u=r+" 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:u},a=s.createText(l,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=y(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function m(e,t,i,o,n,r){return n-=y(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function y(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new V(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=y(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):C(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=y(t,i)?1e-4:0),u=r-a,h=r-l,d=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,h,d){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=y(t,i)?1e-4:0);return A(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function C(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function A(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function _(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function L(e,i,o){var n,r,a=_(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var l=a(i);l.length>0;)r.appendChild(l[0]);o.appendChild(r),n=new N(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function F(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new V(e-s,t-u)}function T(e){return e&&null!==e.match("{value}")?"":e}function k(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,h=e.y,d=e.x+-l/2,p=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-s/2)+" L "+(u+l/2)+" "+h+" L "+u+" "+(h+s/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+s/2)+" L "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-s)+" "+(h-l/2)+"L "+(u-s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+s)+" "+(h-l/2)+"L "+(u+s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var z,I=function(){var e=function(t,i){return(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])})(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)}}(),j=function(){return function(e){this.id=e}}(),B=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=l,h.transform=s,h.style=u,h}return I(t,e),t}(j),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return I(t,e),t}(j),N=function(){return function(e,t){this.width=e,this.height=t}}(),V=function(){return function(e,t){this.x=e,this.y=t}}(),D=function(){return function(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}}(),G=function(e){function t(t,i,o,n,r,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=n,s.text=r,s.transform=a,s.baseLine=l,s}return I(t,e),t}(j),U=function(){return function(e,t,i){this.text=e,this.value=t,this.size=i}}(),H=function(){var e=function(t,i){return(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])})(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)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return H(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property(null)],i.prototype,"fill",void 0),X([t.Complex({size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);(z||(z={})).axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"};var $=function(){var e=function(t,i){return(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])})(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)}}(),K=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(2)],i.prototype,"width",void 0),K([t.Property("")],i.prototype,"dashArray",void 0),K([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Complex(z.axisLabelFont,Z)],i.prototype,"font",void 0),K([t.Property("")],i.prototype,"format",void 0),K([t.Property("Inside")],i.prototype,"position",void 0),K([t.Property("None")],i.prototype,"hiddenLabel",void 0),K([t.Property(!1)],i.prototype,"autoAngle",void 0),K([t.Property(!1)],i.prototype,"useRangeColor",void 0),K([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(null)],i.prototype,"start",void 0),K([t.Property(null)],i.prototype,"end",void 0),K([t.Property(null)],i.prototype,"radius",void 0),K([t.Property(10)],i.prototype,"startWidth",void 0),K([t.Property(10)],i.prototype,"endWidth",void 0),K([t.Property(null)],i.prototype,"color",void 0),K([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),K([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(null)],i.prototype,"width",void 0),K([t.Property(null)],i.prototype,"height",void 0),K([t.Property(null)],i.prototype,"interval",void 0),K([t.Property(0)],i.prototype,"offset",void 0),K([t.Property(null)],i.prototype,"color",void 0),K([t.Property("Inside")],i.prototype,"position",void 0),K([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(null)],i.prototype,"color",void 0),K([t.Complex({color:null,width:8},Y)],i.prototype,"border",void 0),K([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(null)],i.prototype,"color",void 0),K([t.Complex({color:null,width:0},Y)],i.prototype,"border",void 0),K([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(!0)],i.prototype,"enable",void 0),K([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(null)],i.prototype,"content",void 0),K([t.Property(90)],i.prototype,"angle",void 0),K([t.Property("50%")],i.prototype,"radius",void 0),K([t.Property("-1")],i.prototype,"zIndex",void 0),K([t.Property(!1)],i.prototype,"autoAngle",void 0),K([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),K([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return $(i,e),K([t.Property(null)],i.prototype,"value",void 0),K([t.Property("Needle")],i.prototype,"type",void 0),K([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),K([t.Property(null)],i.prototype,"imageUrl",void 0),K([t.Property(null)],i.prototype,"radius",void 0),K([t.Property(20)],i.prototype,"pointerWidth",void 0),K([t.Complex({},oe)],i.prototype,"cap",void 0),K([t.Complex({},ne)],i.prototype,"needleTail",void 0),K([t.Property(null)],i.prototype,"color",void 0),K([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),K([t.Complex(null,re)],i.prototype,"animation",void 0),K([t.Property("Circle")],i.prototype,"markerShape",void 0),K([t.Property(5)],i.prototype,"markerHeight",void 0),K([t.Property(null)],i.prototype,"description",void 0),K([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),se=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return $(i,e),K([t.Property(null)],i.prototype,"minimum",void 0),K([t.Property(null)],i.prototype,"maximum",void 0),K([t.Property(!1)],i.prototype,"showLastLabel",void 0),K([t.Property(null)],i.prototype,"roundingPlaces",void 0),K([t.Property(null)],i.prototype,"radius",void 0),K([t.Complex({},Q)],i.prototype,"lineStyle",void 0),K([t.Collection([{}],te)],i.prototype,"ranges",void 0),K([t.Collection([{}],le)],i.prototype,"pointers",void 0),K([t.Collection([{}],ae)],i.prototype,"annotations",void 0),K([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),K([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),K([t.Property(200)],i.prototype,"startAngle",void 0),K([t.Property(160)],i.prototype,"endAngle",void 0),K([t.Property("ClockWise")],i.prototype,"direction",void 0),K([t.Property(null)],i.prototype,"background",void 0),K([t.Property(null)],i.prototype,"rangeGap",void 0),K([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),K([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue="animationComplete",he="axisLabelRender",de="radiusCalculate",pe="tooltipRender",ce="annotationRender",ge="gaugeMouseMove",me="gaugeMouseLeave",ye="gaugeMouseDown",ve=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=parseInt(this.gauge.width,10),r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount&&a.appendChild(r)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],l=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),s={cancel:!1,name:ce,content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger(ce,s);var u,h;if(!s.cancel){if((u=_(s.content))&&u(n).length)for(var d=(h=Array.prototype.slice.call(u(n))).length,p=0;p<d;p++)l.appendChild(h[p]);else l.appendChild(t.createElement("div",{innerHTML:s.content,styles:r(s.textStyle)}));this.updateLocation(l,n,a),e.appendChild(l)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),fe=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(s=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),p=new D(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),g=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[g.axisIndex],this.currentPointer=this.currentAxis.pointers[g.pointerIndex];var m=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,v=y&&null!==y.match("{value}"),x=this.gauge.intl.getNumberFormat({format:T(y),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var b=void 0;b=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var P=v?y.replace(new RegExp("{value}","g"),x(b)):x(b);(l=f(m,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(m>=150&&m<=250||m>=330&&m<=360||m>=0&&m<=45)?l.x+10:l.x;var R={name:pe,cancel:!1,content:P,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger(pe,R);var w=R.tooltip.template;if(null!==w&&1===Object.keys(w).length&&(w=w[Object.keys(w)[0]]),this.tooltip.showAtMousePosition)R.location=F(o,n,this.gauge.svgObject),this.tooltipRect=p;else if(w){var C=L(w,this.gauge,this.tooltipEle);this.tooltipRect=Math.abs(d.left-u.left)>C.width?this.findPosition(p,m,P,R.location):p}else this.findPosition(p,m,P,R.location);R.cancel||s||(R.tooltip.textStyle.color=R.tooltip.textStyle.color||this.gauge.themeStyle.tooltipFontColor,this.svgTooltip=new i.Tooltip({enable:!0,data:{value:R.content},template:w,enableAnimation:R.tooltip.enableAnimation,content:[R.content],location:R.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:R.tooltip.fill||this.gauge.themeStyle.tooltipFillColor,textStyle:R.tooltip.textStyle,border:R.tooltip.border}),this.svgTooltip.appendTo(this.tooltipEle),w&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px"))}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),xe=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new B(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=y(n,r)?[0,r=360][0]:n,h(new B(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color||this.gauge.themeStyle.lineColor,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=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=p.length;y<v;y++)0===y&&"First"===g.hiddenLabel||y===v-1&&"Last"===g.hiddenLabel||(l=p[y],n=f(a=Math.round(c(l.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m,o.midPoint),r=this.findAnchor(n,g,a,l),u(new G(o.element.id+"_Axis_"+t+"_Label_"+y,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(l.value,e.ranges,g.font.color||this.gauge.themeStyle.labelColor):g.font.color||this.gauge.themeStyle.labelColor,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor;if(r.width&&r.height&&a){for(var s=e.visibleRange.min,u=e.visibleRange.max;s<=u;s+=a)this.majorValues.indexOf(+s.toFixed(3))<0&&h(new B(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+s,"transparent",r.width,l?O(s,e.ranges,r.color||this.gauge.themeStyle.minorTickColor):r.color||this.gauge.themeStyle.minorTickColor,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var l=e.visibleRange.min,s=e.visibleRange.max,u=e.visibleRange.interval;l<=s;l+=u)this.majorValues.push(+l.toFixed(3)),h(new B(o.element.id+"_Axis_Major_TickLine_"+t+"_"+l,"transparent",r.width,a?O(l,e.ranges,r.color||this.gauge.themeStyle.majorTickColor):r.color||this.gauge.themeStyle.majorTickColor,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,d,p,g,m,y,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,C=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),C),r=c(l,C,w,e.startAngle,e.endAngle,R),a=c(s,C,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],d=R?d:[u,u=d][0];var _=i.roundedCornerRadius,S=.25*_;m=((i.currentRadius-u/2)*(r*Math.PI/180)-_/S)/(i.currentRadius-u/2)*180/Math.PI,y=((i.currentRadius-d/2)*(a*Math.PI/180)+_/S)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+_)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-_)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new B(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(p),Math.ceil(g),m,y,i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new B(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),be=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,s){e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+s}),r["draw"+i.type+"Pointer"](e,t,s,a,o),r.setPointerValue(e,i,i.currentValue),l.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(l)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new B(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color||this.gauge.themeStyle.needleColor,d.border.width,d.border.color,null,"0",l),o,n)),r=s(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new B(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color||this.gauge.themeStyle.needleTailColor,d.needleTail.border.width,d.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(k(p,"Circle",new N(2*d.cap.radius,2*d.cap.radius),"",new B(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color||this.gauge.themeStyle.capColor,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new B(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,i,o){var n=this.gauge.midPoint,r="ClockWise"===e.direction,a=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r),l=c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r);l=r?a===l?l+1:l:a===l?[a,a=l-1][0]:[a,a=l][0];var s,u,h,d,p=i.roundedCornerRadius,g=.25*p;o<=g&&(p=8,g=.25*(p/=2)),h=((i.currentRadius-i.pointerWidth/2)*(a*Math.PI/180)-p/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,d=((i.currentRadius-i.pointerWidth/2)*(l*Math.PI/180)+p/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,s=(i.currentRadius*(a*Math.PI/180)+p)/i.currentRadius*180/Math.PI,u=(i.currentRadius*(l*Math.PI/180)-p)/i.currentRadius*180/Math.PI,t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?i.roundedCornerRadius&&o?(t.setAttribute("d",P(n,Math.floor(s),Math.ceil(u),h,d,i.currentRadius,i.pointerWidth,i.pointerWidth)),p=0):t.setAttribute("d",w(n,a,l,i.currentRadius,i.currentRadius-i.pointerWidth)):t.setAttribute("transform","rotate("+c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r)+","+n.x+","+n.y+")"),t.setAttribute("aria-label",i.description||"Pointer:"+o.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(k(a,r.markerShape,new N(r.markerWidth,r.markerHeight),r.imageUrl,new B(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new B(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger(ue,{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u,h,d=this,g="ClockWise"===n.direction,m=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),y=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),v=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),f=r.roundedCornerRadius,x=.25*a;o<=x&&(a=8,x=.25*(a/=2)),f&&(y=(r.currentRadius*(y*Math.PI/180)+f)/r.currentRadius*180/Math.PI,v=(r.currentRadius*(v*Math.PI/180)-f)/r.currentRadius*180/Math.PI,h=((r.currentRadius-r.pointerWidth/2)*(m*Math.PI/180)-a/x)/(r.currentRadius-r.pointerWidth/2)*180/Math.PI),u=m>v?v+360:v,new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(m)===Math.round(u)?g?u-m:u-m-360:g?u-m-360:u-m,g?f?e.setAttribute("d",P(d.gauge.midPoint,Math.floor(y),p(t.timeStamp,Math.floor(y),s,t.duration)+1e-4,h,p(t.timeStamp,Math.floor(y+f/2),s,t.duration)+1e-4,a,r.pointerWidth,r.pointerWidth)):e.setAttribute("d",w(d.gauge.midPoint,y,p(t.timeStamp,m,s,t.duration)+1e-4,a,l)):f?(s+=f,e.setAttribute("d",P(d.gauge.midPoint,p(t.timeStamp,Math.floor(h),s,t.duration),Math.floor(h)+1e-4,p(t.timeStamp,Math.floor(y-f-f/2),s,t.duration),Math.floor(h+f/2)+1e-4,a,r.pointerWidth,r.pointerWidth))):e.setAttribute("d",w(d.gauge.midPoint,p(t.timeStamp,m,s,t.duration),y+1e-4,a,l))},end:function(e){d.setPointerValue(n,r,o),d.gauge.trigger(ue,{axis:n,pointer:r})}})},e}(),Pe=function(){function e(e){this.gauge=e,this.axisRenderer=new xe(e),this.pointerRenderer=new be(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,l=this.gauge.axes;a<l.length;a++){var u=l[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?s(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=y(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=y(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,m=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>d&&!(Math.abs(h-d)>90)||(h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=180&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>0||x>0)||!(b>0||P>0)||(g=Math.abs(v+x-n),m=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,m)/2,u.currentRadius=(null!=u.radius?s(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect);var w=void 0;w={cancel:!1,name:de,currentRadius:u.currentRadius,gauge:this.gauge,midPoint:this.gauge.midPoint,axis:u},this.gauge.trigger(de,w),u.currentRadius=w.currentRadius,this.gauge.midPoint=w.midPoint,this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length,o.farSizes),e.rect=new D(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),n=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>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,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 n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=s*h[u];if(a<n/d)break;l=d}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:T(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=e.visibleRange.min,l=e.visibleRange.interval,s=e.visibleRange.max;a<=s&&l;a+=l)r=e.roundingPlaces?parseFloat(a.toFixed(e.roundingPlaces)):a,t={cancel:!1,name:he,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger(he,t),t.cancel||e.visibleLabels.push(new U(t.text,a));var u=e.visibleLabels[e.visibleLabels.length-1].value,h=e.visibleRange.max;u!==h&&!0===e.showLastLabel&&(t={cancel:!1,name:he,axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(h)):n(h),value:h},this.gauge.trigger(he,t),t.cancel||e.visibleLabels.push(new U(t.text,h))),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new N(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),Re=function(){var e=function(t,i){return(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])})(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)}}(),we=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Ce=function(e){function r(t,i){return e.call(this,t,i)||this}return Re(r,e),r.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},r.prototype.render=function(){this.setTheme(),this.calculateBounds(),this.renderElements()},r.prototype.setTheme=function(){this.themeStyle=function(e){var t;switch(e){case"MaterialDark":case"FabricDark":case"BootstrapDark":case"Highcontrast":case"HighContrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF"};break;case"Bootstrap4":t={backgroundColor:"#F8F9FA",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D"};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",labelColor:"#212121",lineColor:"#757575",majorTickColor:"#757575",minorTickColor:"#757575",pointerColor:"#757575",capColor:"#FFFFFF",needleColor:"#757575",needleTailColor:"#757575"}}return t}(this.theme)},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},r.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove",ge);this.trigger(ge,i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new V(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},r.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove",me);return this.trigger(me,t),!1},r.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},r.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=m(v(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.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},r.prototype.gaugeOnMouseDown=function(e){var i,o=this.getMouseArgs(e,"touchstart",ye);return this.trigger(ye,o),!o.cancel&&o.target.id.indexOf("_Pointer_")>=0&&o.target.id.indexOf(this.element.id+"_Axis_")>=0&&(i=E(o.target.id,this),this.activeAxis=this.axes[i.axisIndex],this.activePointer=this.activeAxis.pointers[i.pointerIndex],t.isNullOrUndefined(this.activePointer.pathElement)&&(this.activePointer.pathElement=[e.target]),this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},r.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activePointer.value=this.activePointer.currentValue,this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},r.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new V(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},r.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new N(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new N(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},r.prototype.setGaugeStyle=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"},r.prototype.setCulture=function(){this.intl=new t.Internationalization},r.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})},r.prototype.removeSvg=function(){if(S(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&&t.remove(this.svgObject)}},r.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-circulargauge").length;this.element.id="circulargauge_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new Pe(this),this.animatePointer=!0},r.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=s(this.width,e)||e||600,o=s(this.height,t)||t||450;this.availableSize=new N(i,o)},r.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,l,u):new D(a+l/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new V(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},r.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},r.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},r.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},r.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=(i=i<n.visibleRange.min?n.visibleRange.min:i)>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),this.isProtectedOnChange=!0,r.currentValue=i,r.value=i,this.isProtectedOnChange=!1},r.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(S(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},r.prototype.setRangeValue=function(e,t,i,o){var r,l=M(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],h=s.visibleRange,d="ClockWise"===s.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),m=c(p,h.max,h.min,s.startAngle,s.endAngle,d),y=c(g,h.max,h.min,s.startAngle,s.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,y=d?y:[m,m=y][0],v=d?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(m),Math.round(y),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},r.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},r.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,ve]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,fe]}),e},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.onPropertyChanged=function(e,i){var o=!1,n=!1,r=!1,a=null,l=null,s=null,u=JSON.stringify(e).split("},");if(u)for(var h=0;h<u.length;h++)if(u[h].indexOf("pointers")>-1)for(var d=u[h].split("{"),p=0;p<d.length;p++){var c=d[p].replace(/([^a-z0-9]+)/gi,"");a=null===a&&"axes"===c?d[p+1].replace(/([^a-z0-9]+)/gi,""):a,l=null===l&&"pointers"===c?d[p+1].replace(/([^a-z0-9]+)/gi,""):l,s=c.indexOf("value")>-1?d[p].replace(/[value&\/\\#,+()$~%'":*?<>{}]/g,""):s}a&&l&&s&&(this.axes[parseFloat(a)].pointers[parseFloat(l)].currentValue,parseFloat(s));for(var g=1===Object.keys(e).length&&e instanceof Object&&!t.isNullOrUndefined(this.activePointer),m=0,y=Object.keys(e);m<y.length;m++){switch(y[m]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),n=!0;break;case"title":n=""===e.title||""===i.title,o=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?n=!0:o=!0;break;case"border":case"background":o=!0;break;case"axes":r=!0}}g||(!n&&o&&(this.removeSvg(),this.renderElements()),n&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!r||o||n||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1)))},r.prototype.getModuleName=function(){return"circulargauge"},we([t.Property(null)],r.prototype,"width",void 0),we([t.Property(null)],r.prototype,"height",void 0),we([t.Complex({color:"transparent",width:0},Y)],r.prototype,"border",void 0),we([t.Property(null)],r.prototype,"background",void 0),we([t.Property("")],r.prototype,"title",void 0),we([t.Complex({size:"15px",color:null},Z)],r.prototype,"titleStyle",void 0),we([t.Complex({},q)],r.prototype,"margin",void 0),we([t.Collection([{}],se)],r.prototype,"axes",void 0),we([t.Complex({},J)],r.prototype,"tooltip",void 0),we([t.Property(!1)],r.prototype,"enablePointerDrag",void 0),we([t.Property(null)],r.prototype,"centerX",void 0),we([t.Property(null)],r.prototype,"centerY",void 0),we([t.Property(!1)],r.prototype,"moveToCenter",void 0),we([t.Property("Material")],r.prototype,"theme",void 0),we([t.Property(!1)],r.prototype,"useGroupingSeparator",void 0),we([t.Property(null)],r.prototype,"description",void 0),we([t.Property(1)],r.prototype,"tabIndex",void 0),we([t.Event()],r.prototype,"loaded",void 0),we([t.Event()],r.prototype,"load",void 0),we([t.Event()],r.prototype,"animationComplete",void 0),we([t.Event()],r.prototype,"axisLabelRender",void 0),we([t.Event()],r.prototype,"radiusCalculate",void 0),we([t.Event()],r.prototype,"annotationRender",void 0),we([t.Event()],r.prototype,"tooltipRender",void 0),we([t.Event()],r.prototype,"dragStart",void 0),we([t.Event()],r.prototype,"dragMove",void 0),we([t.Event()],r.prototype,"dragEnd",void 0),we([t.Event()],r.prototype,"gaugeMouseMove",void 0),we([t.Event()],r.prototype,"gaugeMouseLeave",void 0),we([t.Event()],r.prototype,"gaugeMouseDown",void 0),we([t.Event()],r.prototype,"gaugeMouseUp",void 0),we([t.Event()],r.prototype,"resized",void 0),r=we([t.NotifyPropertyChanges],r)}(t.Component);e.CircularGauge=Ce,e.Annotations=ve,e.Line=Q,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=le,e.Axis=se,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=fe,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=m,e.isCompleteAngle=y,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=C,e.getCompletePath=A,e.getElement=M,e.getTemplateFunction=_,e.removeElement=S,e.getPointer=E,e.getElementSize=L,e.getMousePosition=F,e.getLabelFormat=T,e.calculateShapes=k,e.getRangeColor=O,e.CustomizeOption=j,e.PathOption=B,e.RectOption=W,e.Size=N,e.GaugeLocation=V,e.Rect=D,e.TextOption=G,e.VisibleLabels=U,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-circulargauge.umd.min.js.map
/*!
* filename: ej2-circulargauge.min.js
* version : 17.1.1-beta
* version : 17.1.32-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.circulargauge=function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new N(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),S(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,i,o,n,r){var a,l={},s=new t.SvgRenderer(""),u=r+" font-size:"+i.size+"; font-style:"+i.fontStyle+" ; font-weight:"+i.fontWeight+"; font-family:"+i.fontFamily+";";return l={id:e.id,x:e.x,y:e.y,fill:o,"text-anchor":e.anchor,transform:e.transform,opacity:i.opacity,"dominant-baseline":e.baseLine,style:u},a=s.createText(l,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=m(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function y(e,t,i,o,n,r){return n-=m(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function m(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new V(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=m(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):A(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=m(t,i)?1e-4:0),u=r-a,h=r-l,d=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,h,d){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=m(t,i)?1e-4:0);return M(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function A(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function M(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function _(e){return document.getElementById(e)}function C(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e){var i=_(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function L(e,i,o){var n,r,a=C(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var l=a(i);l.length>0;)r.appendChild(l[0]);o.appendChild(r),n=new N(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function T(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new V(e-s,t-u)}function k(e){return e&&null!==e.match("{value}")?"":e}function z(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,h=e.y,d=e.x+-l/2,p=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-s/2)+" L "+(u+l/2)+" "+h+" L "+u+" "+(h+s/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+s/2)+" L "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-s)+" "+(h-l/2)+"L "+(u-s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+s)+" "+(h-l/2)+"L "+(u+s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}var I,j=function(){var e=function(t,i){return(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])})(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)}}(),B=function(){function e(e){this.id=e}return e}(),F=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=l,h.transform=s,h.style=u,h}return j(t,e),t}(B),W=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),N=function(){function e(e,t){this.width=e,this.height=t}return e}(),V=function(){function e(e,t){this.x=e,this.y=t}return e}(),D=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),G=function(e){function t(t,i,o,n,r,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=n,s.text=r,s.transform=a,s.baseLine=l,s}return j(t,e),t}(B),H=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}(),U=function(){var e=function(t,i){return(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])})(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)}}(),X=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Y=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("")],i.prototype,"color",void 0),X([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property("16px")],i.prototype,"size",void 0),X([t.Property("")],i.prototype,"color",void 0),X([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),X([t.Property("Normal")],i.prototype,"fontWeight",void 0),X([t.Property("Normal")],i.prototype,"fontStyle",void 0),X([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(10)],i.prototype,"left",void 0),X([t.Property(10)],i.prototype,"right",void 0),X([t.Property(10)],i.prototype,"top",void 0),X([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return U(i,e),X([t.Property(!1)],i.prototype,"enable",void 0),X([t.Property("#000000")],i.prototype,"fill",void 0),X([t.Complex({color:"#ffffff",size:"13px"},Z)],i.prototype,"textStyle",void 0),X([t.Property(null)],i.prototype,"format",void 0),X([t.Property(null)],i.prototype,"template",void 0),X([t.Property(!0)],i.prototype,"enableAnimation",void 0),X([t.Complex({},Y)],i.prototype,"border",void 0),X([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},e.axisLineColor=null,e.tickLineColor=null,e.pointerColor=null}(I||(I={}));var K=function(){var e=function(t,i){return(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])})(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)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(I.axisLineColor)],i.prototype,"color",void 0),i}(t.ChildProperty),ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,Z)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(I.tickLineColor)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property("#ffffff")],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:8},Y)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:I.pointerColor,width:0},Y)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},Z)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},oe)],i.prototype,"cap",void 0),Q([t.Complex({},ne)],i.prototype,"needleTail",void 0),Q([t.Property(I.pointerColor)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Y)],i.prototype,"border",void 0),Q([t.Complex(null,re)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),se=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(!1)],i.prototype,"showLastLabel",void 0),Q([t.Property(null)],i.prototype,"roundingPlaces",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},$)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],te)],i.prototype,"ranges",void 0),Q([t.Collection([{}],le)],i.prototype,"pointers",void 0),Q([t.Collection([{}],ae)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},ie)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},ie)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},ee)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),ue=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=parseInt(this.gauge.width,10),r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=_(this.elementId+"_Secondary_Element");document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount&&a.appendChild(r)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],l=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),s={cancel:!1,name:"annotationRender",content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger("annotationRender",s);var u,h;if(!s.cancel){if((u=C(s.content))&&u(n).length)for(var d=(h=Array.prototype.slice.call(u(n))).length,p=0;p<d;p++)l.appendChild(h[p]);else l.appendChild(t.createElement("div",{innerHTML:s.content,styles:r(s.textStyle)}));this.updateLocation(l,n,a),e.appendChild(l)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),he=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(s=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),p=new D(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),g=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[g.axisIndex],this.currentPointer=this.currentAxis.pointers[g.pointerIndex];var y=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,m=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,v=m&&null!==m.match("{value}"),x=this.gauge.intl.getNumberFormat({format:k(m),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var b=void 0;b=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var P=v?m.replace(new RegExp("{value}","g"),x(b)):x(b);(l=f(y,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(y>=150&&y<=250||y>=330&&y<=360||y>=0&&y<=45)?l.x+10:l.x;var R={name:"tooltipRender",cancel:!1,content:P,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger("tooltipRender",R);var w=R.tooltip.template;if(null!==w&&1===Object.keys(w).length&&(w=w[Object.keys(w)[0]]),this.tooltip.showAtMousePosition)R.location=T(o,n,this.gauge.svgObject),this.tooltipRect=p;else if(w){var A=L(w,this.gauge,this.tooltipEle);this.tooltipRect=Math.abs(d.left-u.left)>A.width?this.findPosition(p,y,P,R.location):p}else this.findPosition(p,y,P,R.location);if(!R.cancel&&!s){var M=this.gauge.theme.toLowerCase(),_=M.indexOf("dark")>-1||"highcontrast"===M?"#00000":"#FFFFFF";R.tooltip.properties.textStyle.color=_,this.svgTooltip=new i.Tooltip({enable:!0,data:{value:R.content},template:w,enableAnimation:R.tooltip.enableAnimation,content:[R.content],location:R.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:M.indexOf("dark")>-1||"highcontrast"===M?"#FFFFFF":R.tooltip.fill,textStyle:R.tooltip.textStyle,border:R.tooltip.border}),this.svgTooltip.appendTo(this.tooltipEle),w&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px")}}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new D(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new D(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new D(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new D(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new D(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new D(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),de=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new F(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=m(n,r)?[0,r=360][0]:n,h(new F(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=e.visibleLabels,g=e.labelStyle,y=e.currentRadius;"Outside"===g.position?y+=e.nearSize-(e.maxLabelSize.height+e.lineStyle.width/2)+5:y-=e.farSize-(e.maxLabelSize.height+e.lineStyle.width/2)+(g.autoAngle?10:0);for(var m=0,v=p.length;m<v;m++)0===m&&"First"===g.hiddenLabel||m===v-1&&"Last"===g.hiddenLabel||(l=p[m],n=f(a=Math.round(c(l.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),y,o.midPoint),r=this.findAnchor(n,g,a,l),u(new G(o.element.id+"_Axis_"+t+"_Label_"+m,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(l.value,e.ranges,g.font.color):g.font.color,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor;if(r.width&&r.height&&a){for(var s=e.visibleRange.min,u=e.visibleRange.max;s<=u;s+=a)this.majorValues.indexOf(+s.toFixed(3))<0&&h(new F(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+s,"transparent",r.width,l?O(s,e.ranges,r.color):r.color,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var l=e.visibleRange.min,s=e.visibleRange.max,u=e.visibleRange.interval;l<=s;l+=u)this.majorValues.push(+l.toFixed(3)),h(new F(o.element.id+"_Axis_Major_TickLine_"+t+"_"+l,"transparent",r.width,a?O(l,e.ranges,r.color):r.color,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,d,p,g,y,m,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,A=e.visibleRange.max;e.ranges.map(function(i,M){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),A),r=c(l,A,w,e.startAngle,e.endAngle,R),a=c(s,A,w,e.startAngle,e.endAngle,R);var _=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==M||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=M!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(_?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],d=R?d:[u,u=d][0];var C=i.roundedCornerRadius,S=.25*C;y=((i.currentRadius-u/2)*(r*Math.PI/180)-C/S)/(i.currentRadius-u/2)*180/Math.PI,m=((i.currentRadius-d/2)*(a*Math.PI/180)+C/S)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+C)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-C)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new F(o.element.id+"_Axis_"+t+"_Range_"+M,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(p),Math.ceil(g),y,m,i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new F(o.element.id+"_Axis_"+t+"_Range_"+M,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),pe=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,u){l=e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+u}),r["draw"+i.type+"Pointer"](e,t,u,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color,d.border.width,d.border.color,null,"0",l),o,n)),r=s(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color,d.needleTail.border.width,d.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(z(p,"Circle",new N(2*d.cap.radius,2*d.cap.radius),"",new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,t,i){var o=this.gauge.midPoint,n="ClockWise"===e.direction,r=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n),a=c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n);a=n?r===a?a+1:a:r===a?[r,r=a-1][0]:[r,r=a][0];var l,s,u,h,d=t.roundedCornerRadius,p=.25*d;i<=p&&(d=8,p=.25*(d/=2)),u=((t.currentRadius-t.pointerWidth/2)*(r*Math.PI/180)-d/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,h=((t.currentRadius-t.pointerWidth/2)*(a*Math.PI/180)+d/p)/(t.currentRadius-t.pointerWidth/2)*180/Math.PI,l=(t.currentRadius*(r*Math.PI/180)+d)/t.currentRadius*180/Math.PI,s=(t.currentRadius*(a*Math.PI/180)-d)/t.currentRadius*180/Math.PI,t.pathElement.map(function(p){"RangeBar"===t.type?t.roundedCornerRadius&&i?(p.setAttribute("d",P(o,Math.floor(l),Math.ceil(s),u,h,t.currentRadius,t.pointerWidth,t.pointerWidth)),d=0):p.setAttribute("d",w(o,r,a,t.currentRadius,t.currentRadius-t.pointerWidth)):p.setAttribute("transform","rotate("+c(i,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,n)+","+o.x+","+o.y+")"),p.setAttribute("aria-label",t.description||"Pointer:"+i.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(z(a,r.markerShape,new N(r.markerWidth,r.markerHeight),r.imageUrl,new F(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new F(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(d)===Math.round(y)?h?y-d:y-d-360:h?y-d-360:y-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),y=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>y?y+360:y;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,h?e.setAttribute("d",w(u.gauge.midPoint,g,p(t.timeStamp,d,s,t.duration)+1e-4,a,l)):e.setAttribute("d",w(u.gauge.midPoint,p(t.timeStamp,d,s,t.duration),g+1e-4,a,l))},end:function(e){u.setPointerValue(n,r,o),u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e}(),ce=function(){function e(e){this.gauge=e,this.axisRenderer=new de(e),this.pointerRenderer=new pe(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,l=this.gauge.axes;a<l.length;a++){var u=l[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?s(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=m(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=m(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,y=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>d&&!(Math.abs(h-d)>90)||(h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=180&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>5||x>5)||!(b>5||P>5)||(g=Math.abs(v+x-n),y=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,y)/2,u.currentRadius=(null!=u.radius?s(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect);var w=void 0;w={cancel:!1,name:"radiusCalculate",currentRadius:u.currentRadius,gauge:this.gauge,midPoint:this.gauge.midPoint,axis:u},this.gauge.trigger("radiusCalculate",w),u.currentRadius=w.currentRadius,this.gauge.midPoint=w.midPoint,this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length-1,o.farSizes),e.rect=new D(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),n=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>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,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 n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=s*h[u];if(a<n/d)break;l=d}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:k(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=(e.visibleRange.interval+"").indexOf(".")>-1?(e.visibleRange.interval+"").split(".")[1].length:0,l=e.visibleRange.min,s=e.visibleRange.interval,u=e.visibleRange.max;l<=u&&s;l+=s)r=e.roundingPlaces?parseFloat(l.toFixed(e.roundingPlaces)):parseFloat(l.toFixed(a)),t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger("axisLabelRender",t),t.cancel||e.visibleLabels.push(new H(t.text,l));var h=e.visibleLabels[e.visibleLabels.length-1].value,d=e.visibleRange.max;h!==d&&!0===e.showLastLabel&&(t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(d)):n(d),value:d},this.gauge.trigger("axisLabelRender",t),t.cancel||e.visibleLabels.push(new H(t.text,d))),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new N(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),ge=function(){var e=function(t,i){return(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])})(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)}}(),ye=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},me=function(e){function i(t,i){return e.call(this,t,i)||this}return ge(i,e),i.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.themeEffect(),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},i.prototype.themeEffect=function(){var e=this.theme.toLowerCase();if("highcontrast"===e)this.titleStyle.color=this.titleStyle.color||"#FFFFFF",this.setThemeColors("#FFFFFF","#FFFFFF");else if(e.indexOf("dark")>-1)for(var t=0,i=this.axes;t<i.length;t++){var o=i[t];o.labelStyle.font.color=o.labelStyle.font.color||"#DADADA ",o.majorTicks.color=o.majorTicks.color||"#C8C8C8",o.minorTicks.color=o.minorTicks.color||"#9A9A9A";for(var n=0,r=o.pointers;n<r.length;n++){var a=r[n];a.color=a.color||"#DADADA",a.needleTail.color=a.needleTail.color||"#9A9A9A",a.needleTail.border.color=a.needleTail.border.color||"#9A9A9A",a.cap.color=a.cap.color||"#9A9A9A",a.cap.border.color=a.cap.border.color||"#9A9A9A"}}else this.titleStyle.color=this.titleStyle.color||"#424242",this.setThemeColors("#212121","#757575")},i.prototype.setThemeColors=function(e,t){for(var i=0,o=this.axes;i<o.length;i++){var n=o[i];n.lineStyle.color=n.lineStyle.color||t,n.labelStyle.font.color=n.labelStyle.font.color||e,n.majorTicks.color=n.majorTicks.color||t,n.minorTicks.color=n.minorTicks.color||t;for(var r=0,a=n.pointers;r<a.length;r++){var l=a[r];l.color=l.color||t,l.needleTail.color=l.needleTail.color||t,l.needleTail.border.color=l.needleTail.border.color||t,l.cap.color=l.cap.color||t,l.cap.border.color=l.cap.border.color||t}}},i.prototype.render=function(){this.calculateBounds(),this.renderElements()},i.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},i.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},i.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove","gaugeMouseMove");this.trigger("gaugeMouseMove",i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new V(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},i.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},i.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},i.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=y(v(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))},i.prototype.gaugeOnMouseDown=function(e){var t,i=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",i),!i.cancel&&i.target.id.indexOf("_Pointer_")>=0&&i.target.id.indexOf(this.element.id+"_Axis_")>=0&&(t=E(i.target.id,this),this.activeAxis=this.axes[t.axisIndex],this.activePointer=this.activeAxis.pointers[t.pointerIndex],this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},i.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},i.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new V(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},i.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new N(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new N(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},i.prototype.setGaugeStyle=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"},i.prototype.setCulture=function(){this.intl=new t.Internationalization},i.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})},i.prototype.removeSvg=function(){if(S(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&&t.remove(this.svgObject)}},i.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-circulargauge").length;this.element.id="circulargauge_control_"+e}this.renderer=new t.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new ce(this),this.animatePointer=!0},i.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=s(this.width,e)||e||600,o=s(this.height,t)||t||450;this.availableSize=new N(i,o)},i.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new D(a,r,l,u):new D(a+l/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new V(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},i.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},i.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new G(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},i.prototype.renderBorder=function(){var e=this.border.width;(e>0||null!==this.background&&"transparent"!==this.background)&&this.svgObject.appendChild(this.renderer.drawRectangle(new W(this.element.id+"_CircularGaugeBorder",this.background,this.border,null,new D(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},i.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=i<n.visibleRange.min?n.visibleRange.min:i,i=i>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),r.currentValue=i,r.value=i},i.prototype.setAnnotationValue=function(e,i,o){var n=null!==_(this.element.id+"_Annotations_"+e),r=_(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(S(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||_(this.element.id+"_Secondary_Element").appendChild(r))},i.prototype.setRangeValue=function(e,t,i,o){var r,l=_(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],h=s.visibleRange,d="ClockWise"===s.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),y=c(p,h.max,h.min,s.startAngle,s.endAngle,d),m=c(g,h.max,h.min,s.startAngle,s.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,m=d?m:[y,y=m][0],v=d?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(y),Math.round(m),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},i.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},i.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,ue]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,he]}),e},i.prototype.getPersistData=function(){return this.addOnPersist([])},i.prototype.onPropertyChanged=function(e,t){for(var i=!1,o=!1,n=!1,r=0,a=Object.keys(e);r<a.length;r++)switch(a[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":case"background":i=!0;break;case"axes":n=!0}!o&&i&&(this.removeSvg(),this.renderElements()),o&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!n||i||o||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1))},i.prototype.getModuleName=function(){return"circulargauge"},ye([t.Property(null)],i.prototype,"width",void 0),ye([t.Property(null)],i.prototype,"height",void 0),ye([t.Complex({color:"transparent",width:0},Y)],i.prototype,"border",void 0),ye([t.Property("transparent")],i.prototype,"background",void 0),ye([t.Property("")],i.prototype,"title",void 0),ye([t.Complex({size:"15px",color:null},Z)],i.prototype,"titleStyle",void 0),ye([t.Complex({},q)],i.prototype,"margin",void 0),ye([t.Collection([{}],se)],i.prototype,"axes",void 0),ye([t.Complex({},J)],i.prototype,"tooltip",void 0),ye([t.Property(!1)],i.prototype,"enablePointerDrag",void 0),ye([t.Property(null)],i.prototype,"centerX",void 0),ye([t.Property(null)],i.prototype,"centerY",void 0),ye([t.Property(!1)],i.prototype,"moveToCenter",void 0),ye([t.Property("Material")],i.prototype,"theme",void 0),ye([t.Property(!1)],i.prototype,"useGroupingSeparator",void 0),ye([t.Property(null)],i.prototype,"description",void 0),ye([t.Property(1)],i.prototype,"tabIndex",void 0),ye([t.Event()],i.prototype,"loaded",void 0),ye([t.Event()],i.prototype,"load",void 0),ye([t.Event()],i.prototype,"animationComplete",void 0),ye([t.Event()],i.prototype,"axisLabelRender",void 0),ye([t.Event()],i.prototype,"radiusCalculate",void 0),ye([t.Event()],i.prototype,"annotationRender",void 0),ye([t.Event()],i.prototype,"tooltipRender",void 0),ye([t.Event()],i.prototype,"dragStart",void 0),ye([t.Event()],i.prototype,"dragMove",void 0),ye([t.Event()],i.prototype,"dragEnd",void 0),ye([t.Event()],i.prototype,"gaugeMouseMove",void 0),ye([t.Event()],i.prototype,"gaugeMouseLeave",void 0),ye([t.Event()],i.prototype,"gaugeMouseDown",void 0),ye([t.Event()],i.prototype,"gaugeMouseUp",void 0),ye([t.Event()],i.prototype,"resized",void 0),i=ye([t.NotifyPropertyChanges],i)}(t.Component);return e.CircularGauge=me,e.Annotations=ue,e.Line=$,e.Label=ee,e.Range=te,e.Tick=ie,e.Cap=oe,e.NeedleTail=ne,e.Animation=re,e.Annotation=ae,e.Pointer=le,e.Axis=se,e.Border=Y,e.Font=Z,e.Margin=q,e.TooltipSettings=J,e.GaugeTooltip=he,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=y,e.isCompleteAngle=m,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=A,e.getCompletePath=M,e.getElement=_,e.getTemplateFunction=C,e.removeElement=S,e.getPointer=E,e.getElementSize=L,e.getMousePosition=T,e.getLabelFormat=k,e.calculateShapes=z,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=F,e.RectOption=W,e.Size=N,e.GaugeLocation=V,e.Rect=D,e.TextOption=G,e.VisibleLabels=H,e}({},ej.base,ej.svgbase),this.ejs=ej;
this.ej=this.ej||{},this.ej.circulargauge=function(e,t,i){"use strict";function o(e,i){var o=document.getElementById("gauge-measuretext");null===o&&(o=t.createElement("text",{id:"gauge-measuretext"}),document.body.appendChild(o));var n="position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;"+r(i);return o.innerHTML=e,o.setAttribute("style",n),new V(o.clientWidth,o.clientHeight)}function n(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function r(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 a(e,i,o){t.setStyleAttribute(e,{stroke:o.color,"stroke-width":o.width,fill:i})}function l(e){var t;return document.body.appendChild(e),t=e.getBoundingClientRect(),S(e.id),t}function s(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function u(e,t,o,n,r){var a,l={},s=new i.SvgRenderer(""),u=r+" 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:u},a=s.createText(l,e.text),n.appendChild(a),a}function h(e,t,i,o){o=o||"Path";var n=i.renderer["draw"+o](e);return n.setAttribute("transform",e.transform),n.setAttribute("style",e.style),t.appendChild(n),n}function d(e,t,i){for(var o=0,n=i.length;e<n;e++)o+=i[e];return o}function p(e,t,i,o){return-i*Math.cos(e/o*(Math.PI/2))+i+t}function c(e,t,i,o,n,r){var a;return n-=y(o,n)?1e-4:0,o-=90,n-=90,a=r?(e-i)*(g(o,n)/(t-i))+o:(a=n-(e-i)*(g(o,n)/(t-i)))<0?360+a:a,a=Math.round(a)>=360?a-360:Math.round(a)<0?360+a:a}function g(e,t){var i=t-e;return i<0?i+360:i}function m(e,t,i,o,n,r){return n-=y(o,n)?1e-4:0,e=e<o?e+360:e,r?(e-o)/g(o,n)*(t-i)+i:t-((e-o)/g(o,n)*(t-i)+i)}function y(e,t){var i=t-e;return i=i<=0?i+360:i,0!==Math.floor(i/360)}function v(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 f(e,t,i){var o=e*Math.PI/180;return new D(Math.cos(o)*t+i.x,Math.sin(o)*t+i.y)}function x(e,t,i,o,n,r){var a=g(t,i-=y(t,i)?1e-4:0),l=o-n,s=o-r,u=o-(n+r)/2;return void 0!==n&&void 0!==r?b(f(t,o,e),f(i,o,e),f(t,l,e),f(i,s,e),o,u,u,a<180?0:1):C(f(t,o,e),f(i,o,e),o,a<180?0:1)}function b(e,t,i,o,n,r,a,l){return"M "+e.x+" "+e.y+" A "+n+" "+n+" 0 "+l+" 1 "+t.x+" "+t.y+" L "+o.x+" "+o.y+" A "+a+" "+r+" 0 "+l+" 0 "+i.x+" "+i.y+" Z"}function P(e,t,i,o,n,r,a,l){var s=g(t,i-=y(t,i)?1e-4:0),u=r-a,h=r-l,d=r-(a+l)/2;return R(f(t,r,e),f(i,r,e),f(n,r,e),f(n,h,e),f(o,r,e),f(o,u,e),f(t,u,e),f(i,h,e),r,d,d,s<180?0:1)}function R(e,t,i,o,n,r,a,l,s,u,h,d){return"M "+e.x+" "+e.y+" A "+s+" "+s+" 0 "+d+" 1 "+t.x+" "+t.y+" C "+i.x+" "+i.y+" "+o.x+" "+o.y+" "+l.x+" "+l.y+" A "+h+" "+u+" 0 "+d+" 0 "+a.x+" "+a.y+" C "+r.x+" "+r.y+" "+n.x+" "+n.y+" "+e.x+" "+e.y+" Z"}function w(e,t,i,o,n){var r=g(t,i-=y(t,i)?1e-4:0);return A(e,f(t,o,e),f(i,o,e),o,f(t,n,e),f(i,n,e),n,r<180?0:1)}function C(e,t,i,o){return"M "+e.x+" "+e.y+" A "+i+" "+i+" 0 "+o+" 1 "+t.x+" "+t.y}function A(e,t,i,o,n,r,a,l){return"M "+t.x+" "+t.y+" A "+o+" "+o+" 0 "+l+" 1 "+i.x+" "+i.y+" L "+r.x+" "+r.y+" A "+a+" "+a+" 0 "+l+",0 "+n.x+" "+n.y+" Z"}function M(e){return document.getElementById(e)}function _(e){var i=null;try{document.querySelectorAll(e).length&&(i=t.compile(document.querySelector(e).innerHTML.trim()))}catch(o){i=t.compile(e)}return i}function S(e){var i=M(e);i&&t.remove(i)}function E(e,t){var i;return i=e.replace(t.element.id,"").split("_Axis_")[1],{axisIndex:+i[0],pointerIndex:+i[i.length-1]}}function L(e,i,o){var n,r,a=_(e);if(a&&a(i).length){r=i.createElement("div",{id:i.element.id+"_Measure_Element"}),i.element.appendChild(r);for(var l=a(i);l.length>0;)r.appendChild(l[0]);o.appendChild(r),n=new V(o.getBoundingClientRect().width,o.getBoundingClientRect().height),t.remove(r)}return n}function F(e,t,i){var o=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,r=i.ownerDocument.defaultView.pageYOffset,a=i.ownerDocument.documentElement.clientTop,l=i.ownerDocument.documentElement.clientLeft,s=o.left+n-l,u=o.top+r-a;return new D(e-s,t-u)}function T(e){return e&&null!==e.match("{value}")?"":e}function k(e,i,o,n,r){var a,l=o.width,s=o.height,u=e.x,h=e.y,d=e.x+-l/2,p=e.y+-s/2;switch(i){case"Circle":t.merge(r,{rx:l/2,ry:s/2,cx:u,cy:h});break;case"Diamond":a="M "+d+" "+h+" L "+u+" "+(h+-s/2)+" L "+(u+l/2)+" "+h+" L "+u+" "+(h+s/2)+" L "+d+" "+h+" Z",t.merge(r,{d:a});break;case"Rectangle":a="M "+d+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+-s/2)+" L "+(u+l/2)+" "+(h+s/2)+" L "+d+" "+(h+s/2)+" L "+d+" "+(h+-s/2)+" Z",t.merge(r,{d:a});break;case"Triangle":a="M "+u+" "+h+" L "+(u-s)+" "+(h-l/2)+"L "+(u-s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"InvertedTriangle":a="M "+u+" "+h+" L "+(u+s)+" "+(h-l/2)+"L "+(u+s)+" "+(h+l/2)+" Z",t.merge(r,{d:a});break;case"Image":t.merge(r,{href:n,height:s,width:l,x:d,y:p})}return r}function O(e,t,i){var o=0,n=0,r=t.filter(function(t){return o=Math.min(t.start,t.end),n=Math.max(t.start,t.end),e>=o&&n>=e});return r.length?r[0].rangeColor:i}function z(e){var t;switch(e){case"MaterialDark":case"FabricDark":case"BootstrapDark":case"Highcontrast":case"HighContrast":t={backgroundColor:"#000000",titleFontColor:"#FFFFFF",tooltipFillColor:"#ffffff",tooltipFontColor:"#000000",labelColor:"#FFFFFF",lineColor:"#FFFFFF",majorTickColor:"#FFFFFF",minorTickColor:"#FFFFFF",pointerColor:"#FFFFFF",capColor:"#FFFFFF",needleColor:"#FFFFFF",needleTailColor:"#FFFFFF"};break;case"Bootstrap4":t={backgroundColor:"#F8F9FA",titleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",labelColor:"#212529",lineColor:"#DEE2E6",majorTickColor:"#ADB5BD",minorTickColor:"#CED4DA",pointerColor:"#6C757D",capColor:"#6C757D",needleColor:"#6C757D",needleTailColor:"#6C757D"};break;default:t={backgroundColor:"#FFFFFF",titleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",labelColor:"#212121",lineColor:"#757575",majorTickColor:"#757575",minorTickColor:"#757575",pointerColor:"#757575",capColor:"#FFFFFF",needleColor:"#757575",needleTailColor:"#757575"}}return t}var I,j=function(){var e=function(t,i){return(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])})(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)}}(),B=function(){function e(e){this.id=e}return e}(),W=function(e){function t(t,i,o,n,r,a,l,s,u){void 0===s&&(s=""),void 0===u&&(u="");var h=e.call(this,t)||this;return h.opacity=r,h.fill=i,h.stroke=n,h["stroke-width"]=o,h["stroke-dasharray"]=a,h.d=l,h.transform=s,h.style=u,h}return j(t,e),t}(B),N=function(e){function t(t,i,o,n,r){var a=e.call(this,t)||this;return a.y=r.y,a.x=r.x,a.height=r.height,a.width=r.width,a.opacity=n,a.fill=i,a.stroke=o.color,a["stroke-width"]=o.width,a}return j(t,e),t}(B),V=function(){function e(e,t){this.width=e,this.height=t}return e}(),D=function(){function e(e,t){this.x=e,this.y=t}return e}(),G=function(){function e(e,t,i,o){this.x=e,this.y=t,this.width=i,this.height=o}return e}(),U=function(e){function t(t,i,o,n,r,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=n,s.text=r,s.transform=a,s.baseLine=l,s}return j(t,e),t}(B),H=function(){function e(e,t,i){this.text=e,this.value=t,this.size=i}return e}(),X=function(){var e=function(t,i){return(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])})(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)}}(),Y=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},Z=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property("")],i.prototype,"color",void 0),Y([t.Property(1)],i.prototype,"width",void 0),i}(t.ChildProperty),J=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property("16px")],i.prototype,"size",void 0),Y([t.Property("")],i.prototype,"color",void 0),Y([t.Property("segoe UI")],i.prototype,"fontFamily",void 0),Y([t.Property("Normal")],i.prototype,"fontWeight",void 0),Y([t.Property("Normal")],i.prototype,"fontStyle",void 0),Y([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),q=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property(10)],i.prototype,"left",void 0),Y([t.Property(10)],i.prototype,"right",void 0),Y([t.Property(10)],i.prototype,"top",void 0),Y([t.Property(10)],i.prototype,"bottom",void 0),i}(t.ChildProperty),$=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return X(i,e),Y([t.Property(!1)],i.prototype,"enable",void 0),Y([t.Property(null)],i.prototype,"fill",void 0),Y([t.Complex({size:"13px"},J)],i.prototype,"textStyle",void 0),Y([t.Property(null)],i.prototype,"format",void 0),Y([t.Property(null)],i.prototype,"template",void 0),Y([t.Property(!0)],i.prototype,"enableAnimation",void 0),Y([t.Complex({},Z)],i.prototype,"border",void 0),Y([t.Property(!1)],i.prototype,"showAtMousePosition",void 0),i}(t.ChildProperty);!function(e){e.axisLabelFont={size:"12px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"}}(I||(I={}));var K=function(){var e=function(t,i){return(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])})(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)}}(),Q=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},ee=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(2)],i.prototype,"width",void 0),Q([t.Property("")],i.prototype,"dashArray",void 0),Q([t.Property(null)],i.prototype,"color",void 0),i}(t.ChildProperty),te=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Complex(I.axisLabelFont,J)],i.prototype,"font",void 0),Q([t.Property("")],i.prototype,"format",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property("None")],i.prototype,"hiddenLabel",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),i}(t.ChildProperty),ie=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"start",void 0),Q([t.Property(null)],i.prototype,"end",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(10)],i.prototype,"startWidth",void 0),Q([t.Property(10)],i.prototype,"endWidth",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(1)],i.prototype,"opacity",void 0),i}(t.ChildProperty),oe=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"width",void 0),Q([t.Property(null)],i.prototype,"height",void 0),Q([t.Property(null)],i.prototype,"interval",void 0),Q([t.Property(0)],i.prototype,"offset",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Property("Inside")],i.prototype,"position",void 0),Q([t.Property(!1)],i.prototype,"useRangeColor",void 0),i}(t.ChildProperty),ne=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:null,width:8},Z)],i.prototype,"border",void 0),Q([t.Property(8)],i.prototype,"radius",void 0),i}(t.ChildProperty),re=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:null,width:0},Z)],i.prototype,"border",void 0),Q([t.Property("0%")],i.prototype,"length",void 0),i}(t.ChildProperty),ae=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(!0)],i.prototype,"enable",void 0),Q([t.Property(1e3)],i.prototype,"duration",void 0),i}(t.ChildProperty),le=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"content",void 0),Q([t.Property(90)],i.prototype,"angle",void 0),Q([t.Property("50%")],i.prototype,"radius",void 0),Q([t.Property("-1")],i.prototype,"zIndex",void 0),Q([t.Property(!1)],i.prototype,"autoAngle",void 0),Q([t.Complex({size:"12px",color:"#686868"},J)],i.prototype,"textStyle",void 0),Q([t.Property(null)],i.prototype,"description",void 0),i}(t.ChildProperty),se=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return K(i,e),Q([t.Property(null)],i.prototype,"value",void 0),Q([t.Property("Needle")],i.prototype,"type",void 0),Q([t.Property(0)],i.prototype,"roundedCornerRadius",void 0),Q([t.Property(null)],i.prototype,"imageUrl",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Property(20)],i.prototype,"pointerWidth",void 0),Q([t.Complex({},ne)],i.prototype,"cap",void 0),Q([t.Complex({},re)],i.prototype,"needleTail",void 0),Q([t.Property(null)],i.prototype,"color",void 0),Q([t.Complex({color:"#DDDDDD",width:0},Z)],i.prototype,"border",void 0),Q([t.Complex(null,ae)],i.prototype,"animation",void 0),Q([t.Property("Circle")],i.prototype,"markerShape",void 0),Q([t.Property(5)],i.prototype,"markerHeight",void 0),Q([t.Property(null)],i.prototype,"description",void 0),Q([t.Property(5)],i.prototype,"markerWidth",void 0),i}(t.ChildProperty),ue=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.visibleLabels=[],t}return K(i,e),Q([t.Property(null)],i.prototype,"minimum",void 0),Q([t.Property(null)],i.prototype,"maximum",void 0),Q([t.Property(!1)],i.prototype,"showLastLabel",void 0),Q([t.Property(null)],i.prototype,"roundingPlaces",void 0),Q([t.Property(null)],i.prototype,"radius",void 0),Q([t.Complex({},ee)],i.prototype,"lineStyle",void 0),Q([t.Collection([{}],ie)],i.prototype,"ranges",void 0),Q([t.Collection([{}],se)],i.prototype,"pointers",void 0),Q([t.Collection([{}],le)],i.prototype,"annotations",void 0),Q([t.Complex({width:2,height:10},oe)],i.prototype,"majorTicks",void 0),Q([t.Complex({width:2,height:5},oe)],i.prototype,"minorTicks",void 0),Q([t.Property(200)],i.prototype,"startAngle",void 0),Q([t.Property(160)],i.prototype,"endAngle",void 0),Q([t.Property("ClockWise")],i.prototype,"direction",void 0),Q([t.Property(null)],i.prototype,"background",void 0),Q([t.Property(null)],i.prototype,"rangeGap",void 0),Q([t.Property(!1)],i.prototype,"startAndEndRangeGap",void 0),Q([t.Complex({},te)],i.prototype,"labelStyle",void 0),i}(t.ChildProperty),he=function(){function e(e){this.gauge=e,this.elementId=e.element.id}return e.prototype.renderAnnotation=function(e,i){var o=this,n=parseInt(this.gauge.width,10),r=t.createElement("div",{id:this.elementId+"_Annotations_"+i}),a=M(this.elementId+"_Secondary_Element");document.getElementById(this.elementId+"_Secondary_Element").style.width=n+"px",e.annotations.map(function(e,t){null!==e.content&&o.createTemplate(r,t,i)}),a&&r.childElementCount&&a.appendChild(r)},e.prototype.createTemplate=function(e,i,o){var n=this.gauge.axes[o],a=n.annotations[i],l=t.createElement("div",{id:this.elementId+"_Axis_"+o+"_Annotation_"+i,styles:"position: absolute; z-index:"+a.zIndex+";transform:"+(a.autoAngle?"rotate("+(a.angle-90)+"deg)":"rotate(0deg)")+";"}),s={cancel:!1,name:"annotationRender",content:a.content,axis:n,annotation:a,textStyle:a.textStyle};this.gauge.trigger("annotationRender",s);var u,h;if(!s.cancel){if((u=_(s.content))&&u(n).length)for(var d=(h=Array.prototype.slice.call(u(n))).length,p=0;p<d;p++)l.appendChild(h[p]);else l.appendChild(t.createElement("div",{innerHTML:s.content,styles:r(s.textStyle)}));this.updateLocation(l,n,a),e.appendChild(l)}},e.prototype.updateLocation=function(e,t,i){var o=f(i.angle-90,s(i.radius,t.currentRadius),this.gauge.midPoint),n=l(e);e.style.left=o.x-n.width/2+"px",e.style.top=o.y-n.height/2+"px",e.setAttribute("aria-label",i.description||"Annotation")},e.prototype.getModuleName=function(){return"Annotations"},e.prototype.destroy=function(e){},e}(),de=function(){function e(e){this.gauge=e,this.tooltipId=this.gauge.element.id+"_CircularGauge_Tooltip",this.tooltip=e.tooltip,this.textStyle=this.tooltip.textStyle,this.borderStyle=this.tooltip.border,this.addEventListener()}return e.prototype.renderTooltip=function(e){var o,n,r,a,l,s=!1;if(-1!==e.type.indexOf("touch")?(r=(a=e).target,o=a.changedTouches[0].pageX,n=a.changedTouches[0].pageY):(r=e.target,o=e.pageX,n=e.pageY),r.id.indexOf("_Pointer_")>=0){null!==this.pointerEle&&(s=this.pointerEle===r);var u=this.gauge.svgObject.getBoundingClientRect(),h=this.gauge.element.getBoundingClientRect(),d=document.getElementById(this.gauge.element.id+"_AxesCollection").getBoundingClientRect(),p=new G(Math.abs(h.left-u.left),Math.abs(h.top-u.top),u.width,u.height),g=E(r.id,this.gauge);this.currentAxis=this.gauge.axes[g.axisIndex],this.currentPointer=this.currentAxis.pointers[g.pointerIndex];var m=c(this.currentPointer.currentValue,this.currentAxis.visibleRange.max,this.currentAxis.visibleRange.min,this.currentAxis.startAngle,this.currentAxis.endAngle,"ClockWise"===this.currentAxis.direction)%360,y=this.gauge.tooltip.format||this.currentAxis.labelStyle.format,v=y&&null!==y.match("{value}"),x=this.gauge.intl.getNumberFormat({format:T(y),useGrouping:this.gauge.useGroupingSeparator});document.getElementById(this.tooltipId)?this.tooltipEle=document.getElementById(this.tooltipId):(this.tooltipEle=t.createElement("div",{id:this.tooltipId,className:"EJ2-CircularGauge-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.gauge.element.id+"_Secondary_Element").appendChild(this.tooltipEle));var b=void 0;b=this.currentAxis.roundingPlaces?parseFloat(this.currentPointer.currentValue.toFixed(this.currentAxis.roundingPlaces)):this.currentPointer.currentValue;var P=v?y.replace(new RegExp("{value}","g"),x(b)):x(b);(l=f(m,this.currentAxis.currentRadius,this.gauge.midPoint)).x=this.tooltip.template&&(m>=150&&m<=250||m>=330&&m<=360||m>=0&&m<=45)?l.x+10:l.x;var R={name:"tooltipRender",cancel:!1,content:P,location:l,axis:this.currentAxis,tooltip:this.tooltip,pointer:this.currentPointer,event:e,gauge:this.gauge};this.gauge.trigger("tooltipRender",R);var w=R.tooltip.template;if(null!==w&&1===Object.keys(w).length&&(w=w[Object.keys(w)[0]]),this.tooltip.showAtMousePosition)R.location=F(o,n,this.gauge.svgObject),this.tooltipRect=p;else if(w){var C=L(w,this.gauge,this.tooltipEle);this.tooltipRect=Math.abs(d.left-u.left)>C.width?this.findPosition(p,m,P,R.location):p}else this.findPosition(p,m,P,R.location);R.cancel||s||(R.tooltip.textStyle.color=R.tooltip.textStyle.color||this.gauge.themeStyle.tooltipFontColor,this.svgTooltip=new i.Tooltip({enable:!0,data:{value:R.content},template:w,enableAnimation:R.tooltip.enableAnimation,content:[R.content],location:R.location,inverted:this.arrowInverted,areaBounds:this.tooltipRect,fill:R.tooltip.fill||this.gauge.themeStyle.tooltipFillColor,textStyle:R.tooltip.textStyle,border:R.tooltip.border}),this.svgTooltip.appendTo(this.tooltipEle),w&&Math.abs(n-this.tooltipEle.getBoundingClientRect().top)<=0&&(this.tooltipEle.style.top=parseFloat(this.tooltipEle.style.top)+20+"px"))}else this.removeTooltip()},e.prototype.findPosition=function(e,t,i,o){var n,r,a,l;switch(!0){case t>=0&&t<45:this.arrowInverted=!0,n=t>=15&&t<=30?o.y:0,this.tooltipRect=new G(e.x,e.y+r,e.width,e.height),this.tooltipPosition="RightBottom";break;case t>=45&&t<90:this.arrowInverted=!1,this.tooltipRect=new G(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomRight";break;case t>=90&&t<135:this.arrowInverted=!1,this.tooltipRect=new G(e.x,e.y+o.y,e.width,e.height),this.tooltipPosition="BottomLeft";break;case t>=135&&t<180:this.arrowInverted=!0,r=t>=150&&t<=160?o.y:0,this.tooltipRect=new G(e.x-e.width,e.y+r,e.width,e.height),this.tooltipPosition="LeftBottom";break;case t>=180&&t<225:this.arrowInverted=!0,a=t>=200&&t<=225?Math.abs(e.y-o.y):e.height,this.tooltipRect=new G(e.x-e.width,e.y,e.width,a),this.tooltipPosition="LeftTop";break;case t>=225&&t<270:this.arrowInverted=!1,l=t>=250&&t<=290?e.width:Math.abs(e.x-o.x),this.tooltipRect=new G(e.x,e.y,l,e.height),this.tooltipPosition="TopLeft";break;case t>=270&&t<315:this.arrowInverted=!1,n=t>=270&&t>290?o.x:0,this.tooltipRect=new G(e.x+n,e.y,e.width,e.height),this.tooltipPosition="TopRight";break;case t>=315&&t<=360:this.arrowInverted=!0,a=t>=315&&t<=340?Math.abs(e.y-o.y):e.height,this.tooltipRect=new G(e.x,e.y,e.width,a),this.tooltipPosition="RightTop"}return this.tooltipRect},e.prototype.removeTooltip=function(){document.getElementsByClassName("EJ2-CircularGauge-Tooltip").length>0&&(document.getElementsByClassName("EJ2-CircularGauge-Tooltip")[0].remove(),this.pointerEle=null)},e.prototype.mouseUpHandler=function(e){this.renderTooltip(e),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},e.prototype.addEventListener=function(){this.gauge.isDestroyed||(this.gauge.on(t.Browser.touchMoveEvent,this.renderTooltip,this),this.gauge.on(t.Browser.touchEndEvent,this.mouseUpHandler,this))},e.prototype.removeEventListener=function(){this.gauge.isDestroyed||(this.gauge.off(t.Browser.touchMoveEvent,this.renderTooltip),this.gauge.off(t.Browser.touchEndEvent,this.mouseUpHandler))},e.prototype.getModuleName=function(){return"Tooltip"},e.prototype.destroy=function(e){this.removeEventListener()},e}(),pe=function(){function e(e){this.gauge=e}return e.prototype.drawAxisOuterLine=function(e,t,i,o){var n=e.background;this.setRangeColor(e),null!==n&&h(new W(o.element.id+"_AxisOuterLine_"+t,n,0,"transparent",null,"0",x(o.midPoint,0,360,Math.min(e.rect.width,e.rect.height)/2),"","pointer-events:none;"),i,o)},e.prototype.drawAxisLine=function(e,t,i,o){var n=e.startAngle,r=e.endAngle;e.lineStyle.width>0&&(n=y(n,r)?[0,r=360][0]:n,h(new W(o.element.id+"_AxisLine_"+t,"transparent",e.lineStyle.width,e.lineStyle.color||this.gauge.themeStyle.lineColor,null,e.lineStyle.dashArray,x(o.midPoint,n-90,r-90,e.currentRadius),"","pointer-events:none;"),i,o))},e.prototype.drawAxisLabels=function(e,t,i,o){var n,r,a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Labels_"+t}),h=e.visibleRange.min,d=e.visibleRange.max,p=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=p.length;y<v;y++)0===y&&"First"===g.hiddenLabel||y===v-1&&"Last"===g.hiddenLabel||(l=p[y],n=f(a=Math.round(c(l.value,d,h,e.startAngle,e.endAngle,"ClockWise"===e.direction)),m,o.midPoint),r=this.findAnchor(n,g,a,l),u(new U(o.element.id+"_Axis_"+t+"_Label_"+y,n.x,n.y,r,l.text,g.autoAngle?"rotate("+(a+90)+","+n.x+","+n.y+")":"","auto"),g.font,g.useRangeColor?O(l.value,e.ranges,g.font.color||this.gauge.themeStyle.labelColor):g.font.color||this.gauge.themeStyle.labelColor,s,"pointer-events:none;"));i.appendChild(s)},e.prototype.findAnchor=function(e,t,i,o){if(t.autoAngle)return"middle";var n="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,n},e.prototype.drawMinorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MinorTickLines_"+t}),r=e.minorTicks,a=null!==r.interval?r.interval:e.visibleRange.interval/2,l=r.useRangeColor;if(r.width&&r.height&&a){for(var s=e.visibleRange.min,u=e.visibleRange.max;s<=u;s+=a)this.majorValues.indexOf(+s.toFixed(3))<0&&h(new W(o.element.id+"_Axis_Minor_TickLine_"+t+"_"+s,"transparent",r.width,l?O(s,e.ranges,r.color||this.gauge.themeStyle.minorTickColor):r.color||this.gauge.themeStyle.minorTickColor,null,"0",this.calculateTicks(s,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.drawMajorTickLines=function(e,t,i,o){var n=o.renderer.createGroup({id:o.element.id+"_Axis_MajorTickLines_"+t}),r=e.majorTicks,a=r.useRangeColor;if(this.majorValues=[],r.width&&r.height&&e.visibleRange.interval){for(var l=e.visibleRange.min,s=e.visibleRange.max,u=e.visibleRange.interval;l<=s;l+=u)this.majorValues.push(+l.toFixed(3)),h(new W(o.element.id+"_Axis_Major_TickLine_"+t+"_"+l,"transparent",r.width,a?O(l,e.ranges,r.color||this.gauge.themeStyle.majorTickColor):r.color||this.gauge.themeStyle.majorTickColor,null,"0",this.calculateTicks(l,r,e),"","pointer-events:none;"),n,o);i.appendChild(n)}},e.prototype.calculateTicks=function(e,t,i){var o=i.lineStyle.width/2+t.offset,n="Outside"===t.position,r=c(e,i.visibleRange.max,i.visibleRange.min,i.startAngle,i.endAngle,"ClockWise"===i.direction),a=f(r,i.currentRadius+(n?o:-o),this.gauge.midPoint),l=f(r,i.currentRadius+(n?o:-o)+(n?t.height:-t.height),this.gauge.midPoint);return"M "+a.x+" "+a.y+" L "+l.x+" "+l.y+" "},e.prototype.drawAxisRange=function(e,t,i,o){var r,a,l,s,u,d,p,g,m,y,v=this,f=o.renderer.createGroup({id:o.element.id+"_Axis_Ranges_"+t}),b=this.gauge.midPoint,R="ClockWise"===e.direction,w=e.visibleRange.min,C=e.visibleRange.max;e.ranges.map(function(i,A){v.calculateRangeRadius(e,i),l=Math.min(Math.max(i.start,w),i.end),s=Math.min(Math.max(i.start,i.end),C),r=c(l,C,w,e.startAngle,e.endAngle,R),a=c(s,C,w,e.startAngle,e.endAngle,R);var M=r>a;if(null!=e.rangeGap&&e.rangeGap>0&&(r=0!==A||e.startAndEndRangeGap?r+e.rangeGap/Math.PI:r,a=A!==e.ranges.length-1||e.startAndEndRangeGap?a-e.rangeGap/Math.PI:a),l!==s&&(M?r<a+360:r<a)){u=i.startWidth.length>0?n(i.startWidth,i.currentRadius):i.startWidth,d=i.endWidth.length>0?n(i.endWidth,i.currentRadius):i.endWidth,a=R?a:[r,r=a][0],d=R?d:[u,u=d][0];var _=i.roundedCornerRadius,S=.25*_;m=((i.currentRadius-u/2)*(r*Math.PI/180)-_/S)/(i.currentRadius-u/2)*180/Math.PI,y=((i.currentRadius-d/2)*(a*Math.PI/180)+_/S)/(i.currentRadius-d/2)*180/Math.PI,p=(i.currentRadius*(r*Math.PI/180)+_)/i.currentRadius*180/Math.PI,g=(i.currentRadius*(a*Math.PI/180)-_)/i.currentRadius*180/Math.PI,i.roundedCornerRadius?h(new W(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",P(b,Math.floor(p),Math.ceil(g),m,y,i.currentRadius,u,d),"","pointer-events:none;"),f,o):h(new W(o.element.id+"_Axis_"+t+"_Range_"+A,i.rangeColor,0,i.rangeColor,i.opacity,"0",x(o.midPoint,Math.floor(r),Math.ceil(a),i.currentRadius,u,d),"","pointer-events:none;"),f,o)}}),i.appendChild(f)},e.prototype.calculateRangeRadius=function(e,t){var i=null!==t.radius?t.radius:"100%";t.currentRadius=s(i,e.currentRadius)},e.prototype.setRangeColor=function(e){var t=(this.gauge.theme,["#50c917","#27d5ff","#fcde0b","#ffb133","#ff5985"]);e.ranges.map(function(e,i){e.rangeColor=e.color?e.color:t[i%t.length]})},e}(),ce=function(){function e(e){this.gauge=e}return e.prototype.drawPointers=function(e,t,i,o,n){var r=this;void 0===n&&(n=!0);var a,l,s=o.renderer.createGroup({id:o.element.id+"_Axis_Pointers_"+t});e.pointers.map(function(i,u){l=e.visibleRange,i.pathElement=[],r.calculatePointerRadius(e,i),a=o.renderer.createGroup({id:o.element.id+"_Axis_"+t+"_Pointer_"+u}),r["draw"+i.type+"Pointer"](e,t,u,a,o),r.setPointerValue(e,i,i.currentValue),s.appendChild(a),n&&r.doPointerAnimation(i,e)}),i.appendChild(s)},e.prototype.calculatePointerRadius=function(e,t){t.currentRadius=null===t.radius?e.currentRadius-(e.farSize+5):s(t.radius,e.currentRadius)},e.prototype.drawNeedlePointer=function(e,t,i,o,n){var r,a,l,u,d=e.pointers[i],p=n.midPoint,c=d.pointerWidth/2;a=f(0,d.currentRadius,p),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+p.y+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new W(n.element.id+"_Axis_"+t+"_Pointer_Needle_"+i,d.color||this.gauge.themeStyle.needleColor,d.border.width,d.border.color,null,"0",l),o,n)),r=s(d.needleTail.length,d.currentRadius),u="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c),r&&(a=f(180,r,n.midPoint),l="M "+p.x+" "+(p.y-c)+" L "+a.x+" "+(p.y-c)+" L "+a.x+" "+(p.y+c)+" L "+p.x+" "+(p.y+c)+" Z",d.pathElement.push(h(new W(n.element.id+"_Axis_"+t+"_Pointer_NeedleTail_"+i,d.needleTail.color||this.gauge.themeStyle.needleTailColor,d.needleTail.border.width,d.needleTail.border.color,null,"0",l),o,n)),u+=" L "+a.x+" "+(p.y+c)+" L "+a.x+" "+(p.y-c)),d.cap.radius&&d.pathElement.push(h(k(p,"Circle",new V(2*d.cap.radius,2*d.cap.radius),"",new W(n.element.id+"_Axis_"+t+"_Pointer_NeedleCap_"+i,d.cap.color||this.gauge.themeStyle.capColor,d.cap.border.width,d.cap.border.color,null,"0","","")),o,n,"Ellipse")),d.pathElement.push(h(new W(n.element.id+"_Axis_"+t+"_Pointer_NeedleRect_"+i,"transparent",0,"transpanret",null,"0",u+" Z"),o,n))},e.prototype.setPointerValue=function(e,i,o){var n=this.gauge.midPoint,r="ClockWise"===e.direction,a=c(e.visibleRange.min,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r),l=c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r);l=r?a===l?l+1:l:a===l?[a,a=l-1][0]:[a,a=l][0];var s,u,h,d,p=i.roundedCornerRadius,g=.25*p;o<=g&&(p=8,g=.25*(p/=2)),h=((i.currentRadius-i.pointerWidth/2)*(a*Math.PI/180)-p/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,d=((i.currentRadius-i.pointerWidth/2)*(l*Math.PI/180)+p/g)/(i.currentRadius-i.pointerWidth/2)*180/Math.PI,s=(i.currentRadius*(a*Math.PI/180)+p)/i.currentRadius*180/Math.PI,u=(i.currentRadius*(l*Math.PI/180)-p)/i.currentRadius*180/Math.PI,t.isNullOrUndefined(i.currentRadius)&&this.calculatePointerRadius(e,i),i.pathElement.map(function(t){"RangeBar"===i.type?i.roundedCornerRadius&&o?(t.setAttribute("d",P(n,Math.floor(s),Math.ceil(u),h,d,i.currentRadius,i.pointerWidth,i.pointerWidth)),p=0):t.setAttribute("d",w(n,a,l,i.currentRadius,i.currentRadius-i.pointerWidth)):t.setAttribute("transform","rotate("+c(o,e.visibleRange.max,e.visibleRange.min,e.startAngle,e.endAngle,r)+","+n.x+","+n.y+")"),t.setAttribute("aria-label",i.description||"Pointer:"+o.toString())})},e.prototype.drawMarkerPointer=function(e,t,i,o,n){var r=e.pointers[i],a=f(0,r.currentRadius,n.midPoint);r.pathElement.push(h(k(a,r.markerShape,new V(r.markerWidth,r.markerHeight),r.imageUrl,new W(n.element.id+"_Axis_"+t+"_Pointer_Marker_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,null,"0","","")),o,n,"Circle"===r.markerShape?"Ellipse":"Image"===r.markerShape?"Image":"Path"))},e.prototype.drawRangeBarPointer=function(e,t,i,o,n){var r=e.pointers[i];r.pathElement.push(h(new W(n.element.id+"_Axis_"+t+"_Pointer_RangeBar_"+i,r.color||this.gauge.themeStyle.pointerColor,r.border.width,r.border.color,1,"0",""),o,n))},e.prototype.doPointerAnimation=function(e,t){var i=this,o=t.visibleRange.min,n=e.currentValue;e.animation.enable&&o!==n&&this.gauge.animatePointer&&e.pathElement.map(function(r){"RangeBar"===e.type?i.performRangeBarAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth):i.performNeedleAnimation(r,o,n,t,e,e.currentRadius,e.currentRadius-e.pointerWidth)})},e.prototype.performNeedleAnimation=function(e,i,o,n,r,a,l){var s,u=this,h="ClockWise"===n.direction,d=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),g=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,h),m=d>g?g+360:g;new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){s=i<o||Math.round(d)===Math.round(m)?h?m-d:m-d-360:h?m-d-360:m-d,e.style.animation="None",e.setAttribute("transform","rotate("+p(t.timeStamp,d,s,t.duration)+","+u.gauge.midPoint.x.toString()+","+u.gauge.midPoint.y.toString()+")")},end:function(t){u.setPointerValue(n,r,o),("Marker"===r.type||e.id.indexOf("_Pointer_NeedleCap")>=0)&&u.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e.prototype.performRangeBarAnimation=function(e,i,o,n,r,a,l){var s,u,h,d=this,g="ClockWise"===n.direction,m=c(i,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),y=c(n.visibleRange.min,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),v=c(o,n.visibleRange.max,n.visibleRange.min,n.startAngle,n.endAngle,g),f=r.roundedCornerRadius,x=.25*a;o<=x&&(a=8,x=.25*(a/=2)),f&&(y=(r.currentRadius*(y*Math.PI/180)+f)/r.currentRadius*180/Math.PI,v=(r.currentRadius*(v*Math.PI/180)-f)/r.currentRadius*180/Math.PI,h=((r.currentRadius-r.pointerWidth/2)*(m*Math.PI/180)-a/x)/(r.currentRadius-r.pointerWidth/2)*180/Math.PI),u=m>v?v+360:v,new t.Animation({}).animate(e,{duration:r.animation.duration,progress:function(t){e.style.animation="None",s=i<o||Math.round(m)===Math.round(u)?g?u-m:u-m-360:g?u-m-360:u-m,g?f?e.setAttribute("d",P(d.gauge.midPoint,Math.floor(y),p(t.timeStamp,Math.floor(y),s,t.duration)+1e-4,h,p(t.timeStamp,Math.floor(y+f/2),s,t.duration)+1e-4,a,r.pointerWidth,r.pointerWidth)):e.setAttribute("d",w(d.gauge.midPoint,y,p(t.timeStamp,m,s,t.duration)+1e-4,a,l)):f?(s+=f,e.setAttribute("d",P(d.gauge.midPoint,p(t.timeStamp,Math.floor(h),s,t.duration),Math.floor(h)+1e-4,p(t.timeStamp,Math.floor(y-f-f/2),s,t.duration),Math.floor(h+f/2)+1e-4,a,r.pointerWidth,r.pointerWidth))):e.setAttribute("d",w(d.gauge.midPoint,p(t.timeStamp,m,s,t.duration),y+1e-4,a,l))},end:function(e){d.setPointerValue(n,r,o),d.gauge.trigger("animationComplete",{axis:n,pointer:r})}})},e}(),ge=function(){function e(e){this.gauge=e,this.axisRenderer=new pe(e),this.pointerRenderer=new ce(e)}return e.prototype.measureAxis=function(e){this.measureAxisSize(this.gauge,e),this.calculateAxesRadius()},e.prototype.calculateAxesRadius=function(){for(var e,i,o=0,n=this.gauge.margin.left+this.gauge.margin.right,r=this.gauge.margin.top+this.gauge.margin.bottom,a=0,l=this.gauge.axes;a<l.length;a++){var u=l[a];if(e=Math.min(u.rect.width,u.rect.height)/2,i=null!=u.radius?s(u.radius,e):e,o=Math.max.apply(Math,u.ranges.map(function(e){return e.radius?e.radius.indexOf("%")<0?100:parseInt(e.radius,10):0})),i=o>100&&null==u.radius?100*i/o:i,u.currentRadius=i-u.nearSize,this.gauge.moveToCenter&&1===this.gauge.axes.length&&t.isNullOrUndefined(this.gauge.centerX)&&t.isNullOrUndefined(this.gauge.centerY)){var h=void 0,d=void 0,p=f((h=y(h=u.startAngle,u.endAngle)?[0,d=360][0]:h)-90,i,this.gauge.midPoint);d=u.endAngle;var c=f((d-=y(h,d)?1e-4:0)-90,i,this.gauge.midPoint),g=void 0,m=void 0,v=void 0,x=void 0,b=void 0,P=void 0,R=void 0;h>d&&!(Math.abs(h-d)>90)||(h>=270&&h<=360&&(d>270&&d<=360||d>=0&&d<=180)?(v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),R=d<=360&&d>=270?this.gauge.midPoint:d<=90?c:f(0,i,this.gauge.midPoint),x=Math.abs(R.x-this.gauge.gaugeRect.width),p=d<=360&&d>=270?c:f(270,i,this.gauge.midPoint),b=Math.abs(p.y-this.gauge.gaugeRect.y),c=d<=360&&d>=270||d>=0&&d<90?this.gauge.midPoint:d>=90&&d<=180?c:f(90,i,this.gauge.midPoint),P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=0&&h<90&&d>=0&&d<=270?(b=Math.abs(p.y-this.gauge.gaugeRect.y),R=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(R.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height)),p=d>=180?c:this.gauge.midPoint,v=Math.abs(this.gauge.gaugeRect.x-Math.abs(p.x-this.gauge.gaugeRect.x)),c=d>=90?f(0,i,this.gauge.midPoint):c,x=Math.abs(c.x-this.gauge.gaugeRect.width)):h>=90&&h<180&&d>90&&d<=360?(R=d<=180?this.gauge.midPoint:d>=270?f(180,i,this.gauge.midPoint):c,v=Math.abs(R.x-this.gauge.gaugeRect.x),x=Math.abs(p.x-this.gauge.gaugeRect.width),p=d>270?f(d-90,i,this.gauge.midPoint):this.gauge.midPoint,b=Math.abs(this.gauge.gaugeRect.y-p.y),c=d>=180?f(90,i,this.gauge.midPoint):c,P=Math.abs(c.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))):h>=180&&h<=270&&(d<=360&&d>=270||d<=180&&d>=0)&&(R=d>180&&d<270?c:f(180,i,this.gauge.midPoint),v=Math.abs(this.gauge.gaugeRect.x-Math.abs(R.x-this.gauge.gaugeRect.x)),R=d>=180&&d<=360?this.gauge.midPoint:c,x=Math.abs(R.x-this.gauge.gaugeRect.width),R=d>180&&d<270?this.gauge.midPoint:d>=270&&d<=360?c:f(270,i,this.gauge.midPoint),b=Math.abs(R.y-this.gauge.gaugeRect.y),P=Math.abs(p.y-(this.gauge.gaugeRect.y+this.gauge.gaugeRect.height))),t.isNullOrUndefined(v)||t.isNullOrUndefined(x)||t.isNullOrUndefined(b)||t.isNullOrUndefined(P)||!(v>0||x>0)||!(b>0||P>0)||(g=Math.abs(v+x-n),m=Math.abs(b+P-r),this.gauge.midPoint.x=this.gauge.midPoint.x-v/2+x/2,this.gauge.midPoint.y=this.gauge.midPoint.y-b/2+P/2,e=Math.min(this.gauge.gaugeRect.width,this.gauge.gaugeRect.height)/2+Math.min(g,m)/2,u.currentRadius=(null!=u.radius?s(u.radius,e):e)-u.nearSize))}u.visibleRange.interval=this.calculateNumericInterval(u,u.rect);var w=void 0;w={cancel:!1,name:"radiusCalculate",currentRadius:u.currentRadius,gauge:this.gauge,midPoint:this.gauge.midPoint,axis:u},this.gauge.trigger("radiusCalculate",w),u.currentRadius=w.currentRadius,this.gauge.midPoint=w.midPoint,this.calculateVisibleLabels(u)}},e.prototype.measureAxisSize=function(e,t){var i,o=this;this.computeSize(e.axes,t),e.axes.map(function(e,n){i=d(n,o.farSizes.length-1,o.farSizes),e.rect=new G(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),n=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>n?n:t.value:o,o=null===e.minimum?Math.min(t.currentValue,o):o,n=null===e.maximum?Math.max(t.currentValue,n):n}),o=o===n?null!==i?o-i:o-1:o,e.visibleRange={min:o,max:n,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 n=e-t,r=2*Math.PI*i*(o/360),a=Math.max(.01599*r,1),l=n/a,s=Math.pow(10,Math.floor(Math.log(l)/Math.log(10))),u=0,h=[10,5,2,1];u<h.length;u++){var d=s*h[u];if(a<n/d)break;l=d}return l},e.prototype.calculateVisibleLabels=function(e){var t,i=e.labelStyle,o=i.format&&null!==i.format.match("{value}"),n=this.gauge.intl.getNumberFormat({format:T(i.format),useGrouping:this.gauge.useGroupingSeparator});e.visibleLabels=[];for(var r,a=e.visibleRange.min,l=e.visibleRange.interval,s=e.visibleRange.max;a<=s&&l;a+=l)r=e.roundingPlaces?parseFloat(a.toFixed(e.roundingPlaces)):a,t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(r)):n(r),value:r},this.gauge.trigger("axisLabelRender",t),t.cancel||e.visibleLabels.push(new H(t.text,a));var u=e.visibleLabels[e.visibleLabels.length-1].value,h=e.visibleRange.max;u!==h&&!0===e.showLastLabel&&(t={cancel:!1,name:"axisLabelRender",axis:e,text:o?i.format.replace(new RegExp("{value}","g"),n(h)):n(h),value:h},this.gauge.trigger("axisLabelRender",t),t.cancel||e.visibleLabels.push(new H(t.text,h))),this.getMaxLabelWidth(this.gauge,e)},e.prototype.computeSize=function(e,t){var i,o,n,r,a,l,s=0,u=0,h=0;this.farSizes=[],this.calculateAxisValues(t);for(var d=0,p=e;d<p.length;d++){var c=p[d];i=c.lineStyle.width/2,o=0,n=0,r="Outside"===c.majorTicks.position,s=c.majorTicks.offset,a="Outside"===c.minorTicks.position,u=c.minorTicks.offset,l="Outside"===c.labelStyle.position,h=c.labelStyle.offset,o+=r&&a&&l?0:5,o+=(r?c.majorTicks.height+i:0)+(l?c.maxLabelSize.height+10+h:0)+(a&&!r?c.minorTicks.height+i:0)+i,o+=r&&a?Math.max(s,u):r?s:a?u:0,n+=(r?0:c.majorTicks.height+i)+(l?0:c.maxLabelSize.height+10+h)+(!a&&r?c.minorTicks.height+i:0)+i,n+=r||a?r?a?0:u:s:Math.max(s,u),this.farSizes[this.farSizes.length-1]&&(this.farSizes[this.farSizes.length-1]+=n+o),c.nearSize=o-5,c.farSize=n,o=this.gauge.axes.length===this.farSizes.length+1?0:o,this.farSizes.push(o)}},e.prototype.renderAxes=function(e){var i=this;void 0===e&&(e=!0);var o,n=this.gauge,r=this.axisRenderer,a=n.renderer.createGroup({id:n.element.id+"_AxesCollection","clip-path":"url(#"+n.element.id+"_GaugeAreaClipRect_)"});n.element.appendChild(t.createElement("div",{id:n.element.id+"_Secondary_Element",styles:"position: relative"})),n.axes.map(function(t,l){o=n.renderer.createGroup({id:n.element.id+"_Axis_Group_"+l}),r.drawAxisOuterLine(t,l,o,n),r.drawAxisRange(t,l,o,n),r.drawAxisLine(t,l,o,n),r.drawMajorTickLines(t,l,o,n),r.drawMinorTickLines(t,l,o,n),r.drawAxisLabels(t,l,o,n),i.pointerRenderer.drawPointers(t,l,o,n,e),n.annotationsModule&&n.annotationsModule.renderAnnotation(t,l),a.appendChild(o)}),n.svgObject.appendChild(n.renderer.drawClipPath({id:n.element.id+"_GaugeAreaClipRect_",x:0,y:0,width:n.availableSize.width,height:n.availableSize.height,fill:"transparent",stroke:"transparent"})),n.svgObject.appendChild(a)},e.prototype.getMaxLabelWidth=function(e,t){t.maxLabelSize=new V(0,0);for(var i=0,n=t.visibleLabels;i<n.length;i++){var r=n[i];r.size=o(r.text,t.labelStyle.font),t.maxLabelSize.width=r.size.width>t.maxLabelSize.width?r.size.width:t.maxLabelSize.width,t.maxLabelSize.height=r.size.height>t.maxLabelSize.height?r.size.height:t.maxLabelSize.height}},e}(),me=function(){var e=function(t,i){return(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])})(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)}}(),ye=function(e,t,i,o){var n,r=arguments.length,a=r<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--)(n=e[l])&&(a=(r<3?n(a):r>3?n(t,i,a):n(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a},ve=function(e){function r(t,i){return e.call(this,t,i)||this}return me(r,e),r.prototype.preRender=function(){this.unWireEvents(),this.trigger("load",{gauge:this}),this.initPrivateVariable(),this.setCulture(),this.createSvg(),this.wireEvents()},r.prototype.render=function(){this.setTheme(),this.calculateBounds(),this.renderElements()},r.prototype.setTheme=function(){this.themeStyle=z(this.theme)},r.prototype.unWireEvents=function(){t.EventHandler.remove(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown),t.EventHandler.remove(this.element,t.Browser.touchMoveEvent,this.mouseMove),t.EventHandler.remove(this.element,t.Browser.touchEndEvent,this.mouseEnd),t.EventHandler.remove(this.element,"contextmenu",this.gaugeRightClick),t.EventHandler.remove(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize)},r.prototype.wireEvents=function(){t.EventHandler.add(this.element,t.Browser.touchStartEvent,this.gaugeOnMouseDown,this),t.EventHandler.add(this.element,t.Browser.touchMoveEvent,this.mouseMove,this),t.EventHandler.add(this.element,t.Browser.touchEndEvent,this.mouseEnd,this),t.EventHandler.add(this.element,"contextmenu",this.gaugeRightClick,this),t.EventHandler.add(this.element,t.Browser.isPointer?"pointerleave":"mouseleave",this.mouseLeave,this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.gaugeResize.bind(this)),this.setGaugeStyle(this.element)},r.prototype.mouseMove=function(e){var i=this.getMouseArgs(e,"touchmove","gaugeMouseMove");this.trigger("gaugeMouseMove",i);var o;this.tooltipModule;return i.cancel||this.enablePointerDrag&&this.activePointer&&(o={axis:this.activeAxis,pointer:this.activePointer,previousValue:this.activePointer.currentValue,name:"dragMove",currentValue:null},this.pointerDrag(new D(i.x,i.y)),o.currentValue=this.activePointer.currentValue,this.trigger("dragMove",o)),this.notify(t.Browser.touchMoveEvent,e),!1},r.prototype.mouseLeave=function(e){this.activeAxis=null,this.activePointer=null,this.svgObject.setAttribute("cursor","auto");var t=this.getMouseArgs(e,"touchmove","gaugeMouseLeave");return this.trigger("gaugeMouseLeave",t),!1},r.prototype.gaugeRightClick=function(e){return 2!==e.buttons&&"touch"!==e.pointerType||(e.preventDefault(),e.stopPropagation(),!1)},r.prototype.pointerDrag=function(e){var t=this.activeAxis,i=t.visibleRange,o=m(v(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.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(t,this.activePointer,o))},r.prototype.gaugeOnMouseDown=function(e){var i,o=this.getMouseArgs(e,"touchstart","gaugeMouseDown");return this.trigger("gaugeMouseDown",o),!o.cancel&&o.target.id.indexOf("_Pointer_")>=0&&o.target.id.indexOf(this.element.id+"_Axis_")>=0&&(i=E(o.target.id,this),this.activeAxis=this.axes[i.axisIndex],this.activePointer=this.activeAxis.pointers[i.pointerIndex],t.isNullOrUndefined(this.activePointer.pathElement)&&(this.activePointer.pathElement=[e.target]),this.trigger("dragStart",{axis:this.activeAxis,name:"dragStart",pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.svgObject.setAttribute("cursor","pointer")),!1},r.prototype.mouseEnd=function(e){var i=this.getMouseArgs(e,"touchend","gaugeMouseUp");"touch"===e.pointerType||"2"===e.pointerType||e.type,this.tooltipModule;return this.trigger("gaugeMouseUp",i),this.activeAxis&&this.activePointer&&(this.trigger("dragEnd",{name:"dragEnd",axis:this.activeAxis,pointer:this.activePointer,currentValue:this.activePointer.currentValue}),this.activePointer.value=this.activePointer.currentValue,this.activeAxis=null,this.activePointer=null),this.svgObject.setAttribute("cursor","auto"),this.notify(t.Browser.touchEndEvent,e),!1},r.prototype.getMouseArgs=function(e,t,i){var o=this.element.getBoundingClientRect(),n=new D(-o.left,-o.top),r=e.type===t;return n.x+=r?e.changedTouches[0].clientX:e.clientX,n.y+=r?e.changedTouches[0].clientY:e.clientY,{cancel:!1,name:i,x:n.x,y:n.y,target:e.target}},r.prototype.gaugeResize=function(e){var t=this,i={gauge:this,previousSize:new V(this.availableSize.width,this.availableSize.height),name:"resized",currentSize:new V(0,0)};return this.animatePointer=!1,this.resizeTo&&clearTimeout(this.resizeTo),this.element.classList.contains("e-circulargauge")&&(this.resizeTo=window.setTimeout(function(){t.createSvg(),t.calculateBounds(),t.renderElements(),i.currentSize=t.availableSize,t.trigger("resized",i)},500)),!1},r.prototype.setGaugeStyle=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"},r.prototype.setCulture=function(){this.intl=new t.Internationalization},r.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})},r.prototype.removeSvg=function(){if(S(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&&t.remove(this.svgObject)}},r.prototype.initPrivateVariable=function(){if(""===this.element.id){var e=document.getElementsByClassName("e-circulargauge").length;this.element.id="circulargauge_control_"+e}this.renderer=new i.SvgRenderer(this.element.id),this.gaugeAxisLayoutPanel=new ge(this),this.animatePointer=!0},r.prototype.calculateSvgSize=function(){var e=this.element.offsetWidth,t=this.element.offsetHeight,i=s(this.width,e)||e||600,o=s(this.height,t)||t||450;this.availableSize=new V(i,o)},r.prototype.calculateBounds=function(){var e,i=this.margin,n=0;this.title&&(n=o(this.title,this.titleStyle).height+5);var r=i.top+n+this.border.width,a=i.left+this.border.width,l=this.availableSize.width-a-i.right-this.border.width,u=this.availableSize.height-r-this.border.width-i.bottom,h=Math.min(l,u)/2;e=this.moveToCenter&&1===this.axes.length&&t.isNullOrUndefined(this.centerX)&&t.isNullOrUndefined(this.centerY)?new G(a,r,l,u):new G(a+l/2-h,r+u/2-h,2*h,2*h),this.gaugeRect=e;var d=null!==this.centerX?s(this.centerX,this.availableSize.width):e.x+e.width/2,p=null!==this.centerY?s(this.centerY,this.availableSize.height):e.y+e.height/2;this.midPoint=new D(d,p),this.gaugeAxisLayoutPanel.measureAxis(e)},r.prototype.renderElements=function(e){void 0===e&&(e=!0),this.renderBorder(),this.renderTitle(),this.gaugeAxisLayoutPanel.renderAxes(e),this.element.appendChild(this.svgObject),this.trigger("loaded",{gauge:this})},r.prototype.renderTitle=function(){if(this.title){var e=o(this.title,this.titleStyle),t=u(new U(this.element.id+"_CircularGaugeTitle",this.availableSize.width/2,this.margin.top+e.height/4*3,"middle",this.title),this.titleStyle,this.titleStyle.color||this.themeStyle.titleFontColor,this.svgObject,"");t.setAttribute("aria-label",this.description||this.title),t.setAttribute("tabindex",this.tabIndex.toString())}},r.prototype.renderBorder=function(){var e=this.border.width;(e>0||this.background||this.themeStyle.backgroundColor)&&this.svgObject.appendChild(this.renderer.drawRectangle(new N(this.element.id+"_CircularGaugeBorder",this.background||this.themeStyle.backgroundColor,this.border,null,new G(e/2,e/2,this.availableSize.width-e,this.availableSize.height-e))))},r.prototype.setPointerValue=function(e,t,i){var o=this,n=this.axes[e],r=n.pointers[t],l=r.currentRadius,s=r.animation.enable;i=i<n.visibleRange.min?n.visibleRange.min:i,i=i>n.visibleRange.max?n.visibleRange.max:i,r.pathElement.map(function(e){"RangeBar"===r.type?(a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i)):(e.id.indexOf("_Pointer_NeedleCap_")>=0?a(e,r.cap.color,r.cap.border):e.id.indexOf("_Pointer_NeedleTail_")>=0?a(e,r.needleTail.color,r.needleTail.border):e.id.indexOf("_Pointer_NeedleRect_")>=0?a(e,"transparent",{color:"transparent",width:0}):a(e,r.color,r.border),s?o.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(e,r.currentValue,i,n,r,l,l-r.pointerWidth):o.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(n,r,i))}),this.isProtectedOnChange=!0,r.currentValue=i,r.value=i,this.isProtectedOnChange=!1},r.prototype.setAnnotationValue=function(e,i,o){var n=null!==M(this.element.id+"_Annotations_"+e),r=M(this.element.id+"_Annotations_"+e)||t.createElement("div",{id:this.element.id+"_Annotations_"+e}),a=this.axes[e].annotations[i];null!==o&&(S(this.element.id+"_Axis_"+e+"_Annotation_"+i),a.content=o,this.annotationsModule.createTemplate(r,i,e),n||M(this.element.id+"_Secondary_Element").appendChild(r))},r.prototype.setRangeValue=function(e,t,i,o){var r,l=M(this.element.id+"_Axis_"+e+"_Range_"+t),s=this.axes[e],u=s.ranges[t],h=s.visibleRange,d="ClockWise"===s.direction,p=Math.min(Math.max(i,h.min),o),g=Math.min(Math.max(i,o),h.max),m=c(p,h.max,h.min,s.startAngle,s.endAngle,d),y=c(g,h.max,h.min,s.startAngle,s.endAngle,d);r=u.startWidth.length>0?n(u.startWidth,u.currentRadius):u.startWidth;var v;v=u.endWidth.length>0?n(u.endWidth,u.currentRadius):u.endWidth,y=d?y:[m,m=y][0],v=d?v:[r,r=v][0],l.setAttribute("d",x(this.midPoint,Math.round(m),Math.round(y),u.currentRadius,r,v)),a(l,u.color?u.color:u.rangeColor,{color:u.color?u.color:u.rangeColor,width:0})},r.prototype.destroy=function(){this.unWireEvents(),this.removeSvg(),e.prototype.destroy.call(this)},r.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,he]}),this.tooltip.enable&&e.push({member:"Tooltip",args:[this,de]}),e},r.prototype.getPersistData=function(){return this.addOnPersist([])},r.prototype.onPropertyChanged=function(e,i){var o=!1,n=!1,r=!1,a=null,l=null,s=null,u=JSON.stringify(e).split("},");if(u)for(var h=0;h<u.length;h++)if(u[h].indexOf("pointers")>-1)for(var d=u[h].split("{"),p=0;p<d.length;p++){var c=d[p].replace(/([^a-z0-9]+)/gi,"");a=null===a&&"axes"===c?d[p+1].replace(/([^a-z0-9]+)/gi,""):a,l=null===l&&"pointers"===c?d[p+1].replace(/([^a-z0-9]+)/gi,""):l,s=c.indexOf("value")>-1?d[p].replace(/[value&\/\\#,+()$~%'":*?<>{}]/g,""):s}a&&l&&s&&(this.axes[parseFloat(a)].pointers[parseFloat(l)].currentValue,parseFloat(s));for(var g=1===Object.keys(e).length&&e instanceof Object&&!t.isNullOrUndefined(this.activePointer),m=0,y=Object.keys(e);m<y.length;m++)switch(y[m]){case"height":case"width":case"centerX":case"centerY":case"margin":this.createSvg(),n=!0;break;case"title":n=""===e.title||""===i.title,o=!(""===e.title||""===i.title);break;case"titleStyle":e.titleStyle&&e.titleStyle.size?n=!0:o=!0;break;case"border":case"background":o=!0;break;case"axes":r=!0}g||(!n&&o&&(this.removeSvg(),this.renderElements()),n&&(this.removeSvg(),this.calculateBounds(),this.renderElements()),!r||o||n||(this.removeSvg(),this.calculateBounds(),this.renderElements(!1)))},r.prototype.getModuleName=function(){return"circulargauge"},ye([t.Property(null)],r.prototype,"width",void 0),ye([t.Property(null)],r.prototype,"height",void 0),ye([t.Complex({color:"transparent",width:0},Z)],r.prototype,"border",void 0),ye([t.Property(null)],r.prototype,"background",void 0),ye([t.Property("")],r.prototype,"title",void 0),ye([t.Complex({size:"15px",color:null},J)],r.prototype,"titleStyle",void 0),ye([t.Complex({},q)],r.prototype,"margin",void 0),ye([t.Collection([{}],ue)],r.prototype,"axes",void 0),ye([t.Complex({},$)],r.prototype,"tooltip",void 0),ye([t.Property(!1)],r.prototype,"enablePointerDrag",void 0),ye([t.Property(null)],r.prototype,"centerX",void 0),ye([t.Property(null)],r.prototype,"centerY",void 0),ye([t.Property(!1)],r.prototype,"moveToCenter",void 0),ye([t.Property("Material")],r.prototype,"theme",void 0),ye([t.Property(!1)],r.prototype,"useGroupingSeparator",void 0),ye([t.Property(null)],r.prototype,"description",void 0),ye([t.Property(1)],r.prototype,"tabIndex",void 0),ye([t.Event()],r.prototype,"loaded",void 0),ye([t.Event()],r.prototype,"load",void 0),ye([t.Event()],r.prototype,"animationComplete",void 0),ye([t.Event()],r.prototype,"axisLabelRender",void 0),ye([t.Event()],r.prototype,"radiusCalculate",void 0),ye([t.Event()],r.prototype,"annotationRender",void 0),ye([t.Event()],r.prototype,"tooltipRender",void 0),ye([t.Event()],r.prototype,"dragStart",void 0),ye([t.Event()],r.prototype,"dragMove",void 0),ye([t.Event()],r.prototype,"dragEnd",void 0),ye([t.Event()],r.prototype,"gaugeMouseMove",void 0),ye([t.Event()],r.prototype,"gaugeMouseLeave",void 0),ye([t.Event()],r.prototype,"gaugeMouseDown",void 0),ye([t.Event()],r.prototype,"gaugeMouseUp",void 0),ye([t.Event()],r.prototype,"resized",void 0),r=ye([t.NotifyPropertyChanges],r)}(t.Component);return e.CircularGauge=ve,e.Annotations=he,e.Line=ee,e.Label=te,e.Range=ie,e.Tick=oe,e.Cap=ne,e.NeedleTail=re,e.Animation=ae,e.Annotation=le,e.Pointer=se,e.Axis=ue,e.Border=Z,e.Font=J,e.Margin=q,e.TooltipSettings=$,e.GaugeTooltip=de,e.measureText=o,e.toPixel=n,e.getFontStyle=r,e.setStyles=a,e.measureElementRect=l,e.stringToNumber=s,e.textElement=u,e.appendPath=h,e.calculateSum=d,e.linear=p,e.getAngleFromValue=c,e.getDegree=g,e.getValueFromAngle=m,e.isCompleteAngle=y,e.getAngleFromLocation=v,e.getLocationFromAngle=f,e.getPathArc=x,e.getRangePath=b,e.getRoundedPathArc=P,e.getRoundedPath=R,e.getCompleteArc=w,e.getCirclePath=C,e.getCompletePath=A,e.getElement=M,e.getTemplateFunction=_,e.removeElement=S,e.getPointer=E,e.getElementSize=L,e.getMousePosition=F,e.getLabelFormat=T,e.calculateShapes=k,e.getRangeColor=O,e.CustomizeOption=B,e.PathOption=W,e.RectOption=N,e.Size=V,e.GaugeLocation=D,e.Rect=G,e.TextOption=U,e.VisibleLabels=H,e}({},ej.base,ej.svgbase),this.ejs=ej;
//# sourceMappingURL=ej2-circulargauge.min.js.map
/*!
* filename: index.d.ts
* version : 17.1.1-beta
* version : 17.1.32-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-circulargauge",
"version": "17.1.1-beta",
"version": "17.1.32-beta",
"description": "Essential JS 2 CircularGauge Components",

@@ -8,13 +8,7 @@ "author": "Syncfusion Inc.",

"dependencies": {
"@syncfusion/ej2-base": "~17.1.1-beta",
"@syncfusion/ej2-svg-base": "~17.1.1-beta",
"@syncfusion/ej2-popups": "~17.1.1-beta"
"@syncfusion/ej2-base": "~17.1.32-beta",
"@syncfusion/ej2-svg-base": "~17.1.32-beta",
"@syncfusion/ej2-popups": "~17.1.32-beta"
},
"devDependencies": {
"@types/chai": "^3.4.28",
"@types/es6-promise": "0.0.28",
"@types/jasmine": "2.8.9",
"@types/jasmine-ajax": "^3.1.27",
"@types/requirejs": "^2.1.26"
},
"devDependencies": {},
"keywords": [

@@ -21,0 +15,0 @@ "ej2",

@@ -225,3 +225,3 @@ import { Property, Complex, ChildProperty, Collection } from '@syncfusion/ej2-base';import { Font, Border } from '../model/base';import { Position, PointerType, GaugeDirection, HiddenLabel, GaugeShape } from '../utils/enum';import { FontModel, BorderModel } from '../model/base-model';import { Size, Rect, VisibleLabels } from '../utils/helper';import { Theme } from '../model/theme';

* The color of the cap.
* @default '#ffffff'
* @default null
*/

@@ -228,0 +228,0 @@

@@ -114,3 +114,3 @@ import { createElement, isNullOrUndefined } from '@syncfusion/ej2-base';

if ((!isNullOrUndefined(startXDiff) && !isNullOrUndefined(endXDiff) && !isNullOrUndefined(startYDiff) &&
!isNullOrUndefined(endYDiff)) && ((startXDiff > 5 || endXDiff > 5) && (startYDiff > 5 || endYDiff > 5))) {
!isNullOrUndefined(endYDiff)) && ((startXDiff > 0 || endXDiff > 0) && (startYDiff > 0 || endYDiff > 0))) {
xDiff = Math.abs((startXDiff + endXDiff) - xMarginDiff);

@@ -233,6 +233,4 @@ yDiff = Math.abs((startYDiff + endYDiff) - yMarginDiff);

var roundValue;
var roundingPlaces = ((axis.visibleRange.interval + '').indexOf('.') > -1) ?
((axis.visibleRange.interval + '').split('.')[1]).length : 0;
for (var i = axis.visibleRange.min, interval = axis.visibleRange.interval, max = axis.visibleRange.max; (i <= max && interval); i += interval) {
roundValue = axis.roundingPlaces ? parseFloat(i.toFixed(axis.roundingPlaces)) : parseFloat(i.toFixed(roundingPlaces));
roundValue = axis.roundingPlaces ? parseFloat(i.toFixed(axis.roundingPlaces)) : i;
argsData = {

@@ -239,0 +237,0 @@ cancel: false, name: axisLabelRender, axis: axis,

@@ -37,3 +37,3 @@ import { getLocationFromAngle, PathOption, stringToNumber, TextOption, textElement, appendPath, toPixel } from '../utils/helper';

startAngle = !isCompleteAngle(startAngle, endAngle) ? startAngle : [0, endAngle = 360][0];
appendPath(new PathOption(gauge.element.id + '_AxisLine_' + index, 'transparent', axis.lineStyle.width, axis.lineStyle.color, null, axis.lineStyle.dashArray, getPathArc(gauge.midPoint, startAngle - 90, endAngle - 90, axis.currentRadius), '', 'pointer-events:none;'), element, gauge);
appendPath(new PathOption(gauge.element.id + '_AxisLine_' + index, 'transparent', axis.lineStyle.width, axis.lineStyle.color || this.gauge.themeStyle.lineColor, null, axis.lineStyle.dashArray, getPathArc(gauge.midPoint, startAngle - 90, endAngle - 90, axis.currentRadius), '', 'pointer-events:none;'), element, gauge);
}

@@ -77,3 +77,3 @@ };

anchor = this.findAnchor(location, style, angle, label);
textElement(new TextOption(gauge.element.id + '_Axis_' + index + '_Label_' + i, location.x, location.y, anchor, label.text, style.autoAngle ? 'rotate(' + (angle + 90) + ',' + (location.x) + ',' + location.y + ')' : '', 'auto'), style.font, style.useRangeColor ? getRangeColor(label.value, axis.ranges, style.font.color) : style.font.color, labelElement, 'pointer-events:none;');
textElement(new TextOption(gauge.element.id + '_Axis_' + index + '_Label_' + i, location.x, location.y, anchor, label.text, style.autoAngle ? 'rotate(' + (angle + 90) + ',' + (location.x) + ',' + location.y + ')' : '', 'auto'), style.font, style.useRangeColor ? getRangeColor(label.value, axis.ranges, style.font.color || this.gauge.themeStyle.labelColor) : style.font.color || this.gauge.themeStyle.labelColor, labelElement, 'pointer-events:none;');
}

@@ -116,3 +116,4 @@ element.appendChild(labelElement);

if (this.majorValues.indexOf(+i.toFixed(3)) < 0) {
appendPath(new PathOption(gauge.element.id + '_Axis_Minor_TickLine_' + index + '_' + i, 'transparent', minorLineStyle.width, isRangeColor ? getRangeColor(i, axis.ranges, minorLineStyle.color) : minorLineStyle.color, null, '0', this.calculateTicks(i, minorLineStyle, axis), '', 'pointer-events:none;'), minorTickElements, gauge);
appendPath(new PathOption(gauge.element.id + '_Axis_Minor_TickLine_' + index + '_' + i, 'transparent', minorLineStyle.width, isRangeColor ? getRangeColor(i, axis.ranges, minorLineStyle.color ||
this.gauge.themeStyle.minorTickColor) : minorLineStyle.color || this.gauge.themeStyle.minorTickColor, null, '0', this.calculateTicks(i, minorLineStyle, axis), '', 'pointer-events:none;'), minorTickElements, gauge);
}

@@ -138,3 +139,4 @@ }

this.majorValues.push(+i.toFixed(3));
appendPath(new PathOption(gauge.element.id + '_Axis_Major_TickLine_' + index + '_' + i, 'transparent', majorLineStyle.width, isRangeColor ? getRangeColor(i, axis.ranges, majorLineStyle.color) : majorLineStyle.color, null, '0', this.calculateTicks(i, majorLineStyle, axis), '', 'pointer-events:none;'), majorTickElements, gauge);
appendPath(new PathOption(gauge.element.id + '_Axis_Major_TickLine_' + index + '_' + i, 'transparent', majorLineStyle.width, isRangeColor ? getRangeColor(i, axis.ranges, majorLineStyle.color ||
this.gauge.themeStyle.majorTickColor) : majorLineStyle.color || this.gauge.themeStyle.majorTickColor, null, '0', this.calculateTicks(i, majorLineStyle, axis), '', 'pointer-events:none;'), majorTickElements, gauge);
}

@@ -141,0 +143,0 @@ element.appendChild(majorTickElements);

@@ -175,3 +175,3 @@ import { ChildProperty } from '@syncfusion/ej2-base';

* The color of the cap.
* @default '#ffffff'
* @default null
*/

@@ -178,0 +178,0 @@ color: string;

@@ -38,3 +38,3 @@ var __extends = (this && this.__extends) || (function () {

__decorate([
Property(Theme.axisLineColor)
Property(null)
], Line.prototype, "color", void 0);

@@ -132,3 +132,3 @@ return Line;

__decorate([
Property(Theme.tickLineColor)
Property(null)
], Tick.prototype, "color", void 0);

@@ -153,6 +153,6 @@ __decorate([

__decorate([
Property('#ffffff')
Property(null)
], Cap.prototype, "color", void 0);
__decorate([
Complex({ color: Theme.pointerColor, width: 8 }, Border)
Complex({ color: null, width: 8 }, Border)
], Cap.prototype, "border", void 0);

@@ -174,6 +174,6 @@ __decorate([

__decorate([
Property(Theme.pointerColor)
Property(null)
], NeedleTail.prototype, "color", void 0);
__decorate([
Complex({ color: Theme.pointerColor, width: 0 }, Border)
Complex({ color: null, width: 0 }, Border)
], NeedleTail.prototype, "border", void 0);

@@ -268,3 +268,3 @@ __decorate([

__decorate([
Property(Theme.pointerColor)
Property(null)
], Pointer.prototype, "color", void 0);

@@ -271,0 +271,0 @@ __decorate([

import { stringToNumber, Size, calculateShapes, appendPath } from '../utils/helper';
import { getLocationFromAngle, PathOption } from '../utils/helper';
import { linear, getAngleFromValue, getCompleteArc, getRoundedPathArc } from '../utils/helper';
import { Animation } from '@syncfusion/ej2-base';
import { Animation, isNullOrUndefined } from '@syncfusion/ej2-base';
import { animationComplete } from '../model/constants';

@@ -72,3 +72,3 @@ /**

' L ' + (mid.x) + ' ' + (mid.y + width) + ' Z';
pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_Needle_' + index, pointer.color, pointer.border.width, pointer.border.color, null, '0', direction), parentElement, gauge));
pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_Needle_' + index, pointer.color || this.gauge.themeStyle.needleColor, pointer.border.width, pointer.border.color, null, '0', direction), parentElement, gauge));
pointerRadius = stringToNumber(pointer.needleTail.length, pointer.currentRadius);

@@ -85,3 +85,3 @@ // To render the rect element for touch

' L ' + (mid.x) + ' ' + (mid.y + width) + ' Z';
pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_NeedleTail_' + index, pointer.needleTail.color, pointer.needleTail.border.width, pointer.needleTail.border.color, null, '0', direction), parentElement, gauge));
pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_NeedleTail_' + index, pointer.needleTail.color || this.gauge.themeStyle.needleTailColor, pointer.needleTail.border.width, pointer.needleTail.border.color, null, '0', direction), parentElement, gauge));
rectDirection += ' L ' + location.x + ' ' + (mid.y + width) + ' L ' + location.x + ' ' + (mid.y - width);

@@ -91,3 +91,3 @@ }

if (pointer.cap.radius) {
pointer.pathElement.push(appendPath(calculateShapes(mid, 'Circle', new Size(pointer.cap.radius * 2, pointer.cap.radius * 2), '', new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_NeedleCap_' + index, pointer.cap.color, pointer.cap.border.width, pointer.cap.border.color, null, '0', '', '')), parentElement, gauge, 'Ellipse'));
pointer.pathElement.push(appendPath(calculateShapes(mid, 'Circle', new Size(pointer.cap.radius * 2, pointer.cap.radius * 2), '', new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_NeedleCap_' + index, pointer.cap.color || this.gauge.themeStyle.capColor, pointer.cap.border.width, pointer.cap.border.color, null, '0', '', '')), parentElement, gauge, 'Ellipse'));
}

@@ -131,2 +131,5 @@ pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_NeedleRect_' + index, 'transparent', 0, 'transpanret', null, '0', rectDirection + ' Z'), parentElement, gauge));

radius) / (pointer.currentRadius)) * 180) / Math.PI;
if (isNullOrUndefined(pointer.currentRadius)) {
this.calculatePointerRadius(axis, pointer);
}
pointer.pathElement.map(function (element) {

@@ -155,3 +158,3 @@ if (pointer.type === 'RangeBar') {

var location = getLocationFromAngle(0, pointer.currentRadius, gauge.midPoint);
pointer.pathElement.push(appendPath(calculateShapes(location, pointer.markerShape, new Size(pointer.markerWidth, pointer.markerHeight), pointer.imageUrl, new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_Marker_' + index, pointer.color, pointer.border.width, pointer.border.color, null, '0', '', '')), parentElement, gauge, pointer.markerShape === 'Circle' ? 'Ellipse' : (pointer.markerShape === 'Image' ? 'Image' : 'Path')));
pointer.pathElement.push(appendPath(calculateShapes(location, pointer.markerShape, new Size(pointer.markerWidth, pointer.markerHeight), pointer.imageUrl, new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_Marker_' + index, pointer.color || this.gauge.themeStyle.pointerColor, pointer.border.width, pointer.border.color, null, '0', '', '')), parentElement, gauge, pointer.markerShape === 'Circle' ? 'Ellipse' : (pointer.markerShape === 'Image' ? 'Image' : 'Path')));
};

@@ -164,3 +167,3 @@ /**

var pointer = axis.pointers[index];
pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_RangeBar_' + index, pointer.color, pointer.border.width, pointer.border.color, 1, '0', ''), parentElement, gauge));
pointer.pathElement.push(appendPath(new PathOption(gauge.element.id + '_Axis_' + axisIndex + '_Pointer_RangeBar_' + index, pointer.color || this.gauge.themeStyle.pointerColor, pointer.border.width, pointer.border.color, 1, '0', ''), parentElement, gauge));
};

@@ -227,4 +230,21 @@ /**

var pointAngle = getAngleFromValue(end, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise);
var roundRadius = pointer.roundedCornerRadius;
var sweepAngle;
var endAngle = startAngle > pointAngle ? (pointAngle + 360) : pointAngle;
var endAngle;
var oldStart;
var minRadius = (radius * 0.25);
if (end <= minRadius) {
radius = end === 1 || 2 ? 8 : radius;
radius /= 2;
minRadius = radius * 0.25;
}
if (roundRadius) {
minAngle = ((((pointer.currentRadius) * ((minAngle * Math.PI) / 180) +
roundRadius) / (pointer.currentRadius)) * 180) / Math.PI;
pointAngle = ((((pointer.currentRadius) * ((pointAngle * Math.PI) / 180) -
roundRadius) / (pointer.currentRadius)) * 180) / Math.PI;
oldStart = ((((pointer.currentRadius - (pointer.pointerWidth / 2)) * ((startAngle * Math.PI) / 180) -
(radius / minRadius)) / (pointer.currentRadius - (pointer.pointerWidth / 2))) * 180) / Math.PI;
}
endAngle = startAngle > pointAngle ? (pointAngle + 360) : pointAngle;
new Animation({}).animate(element, {

@@ -238,6 +258,17 @@ duration: pointer.animation.duration,

if (isClockWise) {
element.setAttribute('d', getCompleteArc(_this.gauge.midPoint, minAngle, linear(arg.timeStamp, startAngle, sweepAngle, arg.duration) + 0.0001, radius, innerRadius));
if (!roundRadius) {
element.setAttribute('d', getCompleteArc(_this.gauge.midPoint, minAngle, linear(arg.timeStamp, startAngle, sweepAngle, arg.duration) + 0.0001, radius, innerRadius));
}
else {
element.setAttribute('d', getRoundedPathArc(_this.gauge.midPoint, Math.floor(minAngle), linear(arg.timeStamp, Math.floor(minAngle), sweepAngle, arg.duration) + 0.0001, oldStart, linear(arg.timeStamp, Math.floor(minAngle + (roundRadius / 2)), sweepAngle, arg.duration) + 0.0001, radius, pointer.pointerWidth, pointer.pointerWidth));
}
}
else {
element.setAttribute('d', getCompleteArc(_this.gauge.midPoint, linear(arg.timeStamp, startAngle, sweepAngle, arg.duration), minAngle + 0.0001, radius, innerRadius));
if (!roundRadius) {
element.setAttribute('d', getCompleteArc(_this.gauge.midPoint, linear(arg.timeStamp, startAngle, sweepAngle, arg.duration), minAngle + 0.0001, radius, innerRadius));
}
else {
sweepAngle += roundRadius;
element.setAttribute('d', getRoundedPathArc(_this.gauge.midPoint, linear(arg.timeStamp, Math.floor(oldStart), sweepAngle, arg.duration), Math.floor(oldStart) + 0.0001, linear(arg.timeStamp, Math.floor(minAngle - roundRadius - (roundRadius / 2)), sweepAngle, arg.duration), Math.floor(oldStart + (roundRadius / 2)) + 0.0001, radius, pointer.pointerWidth, pointer.pointerWidth));
}
}

@@ -244,0 +275,0 @@ },

@@ -1,2 +0,2 @@

import { Property, NotifyPropertyChanges, Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { Complex, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';import { Event, EmitType, SvgRenderer, EventHandler, Collection, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';import { remove, createElement } from '@syncfusion/ej2-base';import { ILoadedEventArgs, IAnimationCompleteEventArgs, IVisiblePointer } from './model/interface';import { IAxisLabelRenderEventArgs, IRadiusCalculateEventArgs, IPointerDragEventArgs, IResizeEventArgs } from './model/interface';import { ITooltipRenderEventArgs, IAnnotationRenderEventArgs, IMouseEventArgs } from './model/interface';import { TextOption, textElement, RectOption, getAngleFromLocation, getValueFromAngle, removeElement } from './utils/helper';import { Size, stringToNumber, measureText, Rect, GaugeLocation, getElement, getPointer, setStyles, toPixel } from './utils/helper';import { getAngleFromValue, getPathArc } from './utils/helper';import { GaugeTheme } from './utils/enum';import { Border, Margin, Font, TooltipSettings } from './model/base';import { BorderModel, MarginModel, FontModel, TooltipSettingsModel } from './model/base-model';import { Axis, Range, Pointer, Annotation, VisibleRangeModel } from './axes/axis';import { Annotations } from './annotations/annotations';import { GaugeTooltip } from './user-interaction/tooltip';import { AxisModel } from './axes/axis-model';import { load, loaded, gaugeMouseMove, gaugeMouseLeave, gaugeMouseDown } from './model/constants';import { gaugeMouseUp, dragEnd, dragMove, dragStart, resized } from './model/constants';import { AxisLayoutPanel } from './axes/axis-panel';
import { Property, NotifyPropertyChanges, Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';import { Complex, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';import { Event, EmitType, EventHandler, Collection, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';import { remove, createElement } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { ILoadedEventArgs, IAnimationCompleteEventArgs, IVisiblePointer, IThemeStyle } from './model/interface';import { IAxisLabelRenderEventArgs, IRadiusCalculateEventArgs, IPointerDragEventArgs, IResizeEventArgs } from './model/interface';import { ITooltipRenderEventArgs, IAnnotationRenderEventArgs, IMouseEventArgs } from './model/interface';import { TextOption, textElement, RectOption, getAngleFromLocation, getValueFromAngle, removeElement } from './utils/helper';import { Size, stringToNumber, measureText, Rect, GaugeLocation, getElement, getPointer, setStyles, toPixel } from './utils/helper';import { getAngleFromValue, getPathArc } from './utils/helper';import { GaugeTheme } from './utils/enum';import { Border, Margin, Font, TooltipSettings } from './model/base';import { BorderModel, MarginModel, FontModel, TooltipSettingsModel } from './model/base-model';import { Axis, Range, Pointer, Annotation, VisibleRangeModel } from './axes/axis';import { Annotations } from './annotations/annotations';import { GaugeTooltip } from './user-interaction/tooltip';import { AxisModel } from './axes/axis-model';import { load, loaded, gaugeMouseMove, gaugeMouseLeave, gaugeMouseDown } from './model/constants';import { gaugeMouseUp, dragEnd, dragMove, dragStart, resized } from './model/constants';import { AxisLayoutPanel } from './axes/axis-panel';import { getThemeStyle } from './model/theme';
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -33,3 +33,3 @@

* The background color of the gauge, which accepts value in hex, rgba as a valid CSS color string.
* @default 'transparent'
* @default null
*/

@@ -36,0 +36,0 @@ background?: string;

@@ -5,5 +5,6 @@ /**

import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';
import { EmitType, SvgRenderer, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';
import { EmitType, Internationalization, ModuleDeclaration } from '@syncfusion/ej2-base';
import { SvgRenderer } from '@syncfusion/ej2-svg-base';
import { CircularGaugeModel } from './circular-gauge-model';
import { ILoadedEventArgs, IAnimationCompleteEventArgs } from './model/interface';
import { ILoadedEventArgs, IAnimationCompleteEventArgs, IThemeStyle } from './model/interface';
import { IAxisLabelRenderEventArgs, IRadiusCalculateEventArgs, IPointerDragEventArgs, IResizeEventArgs } from './model/interface';

@@ -56,3 +57,3 @@ import { ITooltipRenderEventArgs, IAnnotationRenderEventArgs, IMouseEventArgs } from './model/interface';

* The background color of the gauge, which accepts value in hex, rgba as a valid CSS color string.
* @default 'transparent'
* @default null
*/

@@ -225,2 +226,6 @@ background: string;

/**
* @private
*/
themeStyle: IThemeStyle;
/**
* Constructor for creating the widget

@@ -234,4 +239,2 @@ * @hidden

protected preRender(): void;
private themeEffect;
private setThemeColors;
/**

@@ -241,2 +244,3 @@ * To render the circular gauge elements

protected render(): void;
private setTheme;
/**

@@ -243,0 +247,0 @@ * Method to unbind events for circular gauge

@@ -25,4 +25,5 @@ var __extends = (this && this.__extends) || (function () {

import { Complex, Browser, isNullOrUndefined } from '@syncfusion/ej2-base';
import { Event, SvgRenderer, EventHandler, Collection, Internationalization } from '@syncfusion/ej2-base';
import { Event, EventHandler, Collection, Internationalization } from '@syncfusion/ej2-base';
import { remove, createElement } from '@syncfusion/ej2-base';
import { SvgRenderer } from '@syncfusion/ej2-svg-base';
import { TextOption, textElement, RectOption, getAngleFromLocation, getValueFromAngle, removeElement } from './utils/helper';

@@ -38,2 +39,3 @@ import { Size, stringToNumber, measureText, Rect, GaugeLocation, getElement, getPointer, setStyles, toPixel } from './utils/helper';

import { AxisLayoutPanel } from './axes/axis-panel';
import { getThemeStyle } from './model/theme';
/**

@@ -64,3 +66,2 @@ * Represents the Circular gauge control.

this.trigger(load, { gauge: this });
this.themeEffect();
this.initPrivateVariable();

@@ -71,46 +72,2 @@ this.setCulture();

};
CircularGauge.prototype.themeEffect = function () {
var themes = this.theme.toLowerCase();
if (themes === 'highcontrast') {
this.titleStyle.color = this.titleStyle.color || '#FFFFFF';
this.setThemeColors('#FFFFFF', '#FFFFFF');
}
else if (themes.indexOf('dark') > -1) {
for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
var axis = _a[_i];
axis.labelStyle.font.color = axis.labelStyle.font.color || '#DADADA ';
axis.majorTicks.color = axis.majorTicks.color || '#C8C8C8';
axis.minorTicks.color = axis.minorTicks.color || '#9A9A9A';
for (var _b = 0, _c = axis.pointers; _b < _c.length; _b++) {
var pointer = _c[_b];
pointer.color = pointer.color || '#DADADA';
pointer.needleTail.color = pointer.needleTail.color || '#9A9A9A';
pointer.needleTail.border.color = pointer.needleTail.border.color || '#9A9A9A';
pointer.cap.color = pointer.cap.color || '#9A9A9A';
pointer.cap.border.color = pointer.cap.border.color || '#9A9A9A';
}
}
}
else {
this.titleStyle.color = this.titleStyle.color || '#424242';
this.setThemeColors('#212121', '#757575');
}
};
CircularGauge.prototype.setThemeColors = function (labelcolor, others) {
for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
var axis = _a[_i];
axis.lineStyle.color = axis.lineStyle.color || others;
axis.labelStyle.font.color = axis.labelStyle.font.color || labelcolor;
axis.majorTicks.color = axis.majorTicks.color || others;
axis.minorTicks.color = axis.minorTicks.color || others;
for (var _b = 0, _c = axis.pointers; _b < _c.length; _b++) {
var pointer = _c[_b];
pointer.color = pointer.color || others;
pointer.needleTail.color = pointer.needleTail.color || others;
pointer.needleTail.border.color = pointer.needleTail.border.color || others;
pointer.cap.color = pointer.cap.color || others;
pointer.cap.border.color = pointer.cap.border.color || others;
}
}
};
/**

@@ -120,5 +77,9 @@ * To render the circular gauge elements

CircularGauge.prototype.render = function () {
this.setTheme();
this.calculateBounds();
this.renderElements();
};
CircularGauge.prototype.setTheme = function () {
this.themeStyle = getThemeStyle(this.theme);
};
/**

@@ -212,3 +173,2 @@ * Method to unbind events for circular gauge

this.activePointer.currentValue = value;
this.activePointer.value = value;
this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(axis, this.activePointer, value);

@@ -231,2 +191,5 @@ }

this.activePointer = this.activeAxis.pointers[currentPointer.pointerIndex];
if (isNullOrUndefined(this.activePointer.pathElement)) {
this.activePointer.pathElement = [e.target];
}
this.trigger(dragStart, {

@@ -260,2 +223,3 @@ axis: this.activeAxis,

});
this.activePointer.value = this.activePointer.currentValue;
this.activeAxis = null;

@@ -430,3 +394,3 @@ this.activePointer = null;

var options = new TextOption(this.element.id + '_CircularGaugeTitle', this.availableSize.width / 2, this.margin.top + 3 * (size.height / 4), 'middle', this.title);
var element = textElement(options, this.titleStyle, this.titleStyle.color, this.svgObject, '');
var element = textElement(options, this.titleStyle, this.titleStyle.color || this.themeStyle.titleFontColor, this.svgObject, '');
element.setAttribute('aria-label', this.description || this.title);

@@ -441,4 +405,4 @@ element.setAttribute('tabindex', this.tabIndex.toString());

var borderWidth = this.border.width;
if (borderWidth > 0 || (this.background !== null && this.background !== 'transparent')) {
this.svgObject.appendChild(this.renderer.drawRectangle(new RectOption(this.element.id + '_CircularGaugeBorder', this.background, this.border, null, new Rect(borderWidth / 2, borderWidth / 2, this.availableSize.width - borderWidth, this.availableSize.height - borderWidth))));
if (borderWidth > 0 || (this.background || this.themeStyle.backgroundColor)) {
this.svgObject.appendChild(this.renderer.drawRectangle(new RectOption(this.element.id + '_CircularGaugeBorder', this.background || this.themeStyle.backgroundColor, this.border, null, new Rect(borderWidth / 2, borderWidth / 2, this.availableSize.width - borderWidth, this.availableSize.height - borderWidth))));
}

@@ -488,4 +452,6 @@ };

});
this.isProtectedOnChange = true;
pointer.currentValue = value;
pointer.value = value;
this.isProtectedOnChange = false;
};

@@ -601,2 +567,29 @@ /**

var refreshWithoutAnimation = false;
var axisIndex = null;
var pointerIndex = null;
var pointerValue = null;
var changedProperties = JSON.stringify(newProp);
var splitProperties = changedProperties.split('},');
if (splitProperties) {
for (var j = 0; j < splitProperties.length; j++) {
if (splitProperties[j].indexOf('pointers') > -1) {
var properties = splitProperties[j].split('{');
for (var k = 0; k < properties.length; k++) {
var value = properties[k].replace(/([^a-z0-9]+)/gi, '');
axisIndex = axisIndex === null && (value === 'axes') ? properties[k + 1].replace(/([^a-z0-9]+)/gi, '') : axisIndex;
pointerIndex = pointerIndex === null && (value === 'pointers') ? properties[k + 1].replace(/([^a-z0-9]+)/gi, '') :
pointerIndex;
pointerValue = (value.indexOf('value') > -1) ? properties[k].replace(/[value&\/\\#,+()$~%'":*?<>{}]/g, '') :
pointerValue;
}
}
}
}
var samePointerValue = false;
if (axisIndex && pointerIndex && pointerValue) {
samePointerValue = this.axes[parseFloat(axisIndex)].pointers[parseFloat(pointerIndex)].currentValue
=== parseFloat(pointerValue);
}
var isPointerValueSame = (Object.keys(newProp).length === 1 && newProp instanceof Object &&
!isNullOrUndefined(this.activePointer));
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {

@@ -636,16 +629,18 @@ var prop = _a[_i];

}
if (!refreshBounds && renderer) {
this.removeSvg();
this.renderElements();
if (!isPointerValueSame) {
if (!refreshBounds && renderer) {
this.removeSvg();
this.renderElements();
}
if (refreshBounds) {
this.removeSvg();
this.calculateBounds();
this.renderElements();
}
if (refreshWithoutAnimation && !renderer && !refreshBounds) {
this.removeSvg();
this.calculateBounds();
this.renderElements(false);
}
}
if (refreshBounds) {
this.removeSvg();
this.calculateBounds();
this.renderElements();
}
if (refreshWithoutAnimation && !renderer && !refreshBounds) {
this.removeSvg();
this.calculateBounds();
this.renderElements(false);
}
};

@@ -669,3 +664,3 @@ /**

__decorate([
Property('transparent')
Property(null)
], CircularGauge.prototype, "background", void 0);

@@ -672,0 +667,0 @@ __decorate([

@@ -108,3 +108,3 @@ import { Property, ChildProperty, Complex } from '@syncfusion/ej2-base';

* The fill color of the tooltip, which accepts value in hex, rgba as a valid CSS color string.
* @default '#000000'
* @default null
*/

@@ -111,0 +111,0 @@

@@ -87,3 +87,3 @@ import { ChildProperty } from '@syncfusion/ej2-base';

* The fill color of the tooltip, which accepts value in hex, rgba as a valid CSS color string.
* @default '#000000'
* @default null
*/

@@ -90,0 +90,0 @@ fill: string;

@@ -102,6 +102,6 @@ var __extends = (this && this.__extends) || (function () {

__decorate([
Property('#000000')
Property(null)
], TooltipSettings.prototype, "fill", void 0);
__decorate([
Complex({ color: '#ffffff', size: '13px' }, Font)
Complex({ size: '13px' }, Font)
], TooltipSettings.prototype, "textStyle", void 0);

@@ -108,0 +108,0 @@ __decorate([

@@ -237,1 +237,15 @@ /**

}
export interface IThemeStyle {
backgroundColor: string;
titleFontColor: string;
tooltipFillColor: string;
tooltipFontColor: string;
lineColor: string;
labelColor: string;
majorTickColor: string;
minorTickColor: string;
pointerColor: string;
needleColor: string;
needleTailColor: string;
capColor: string;
}

@@ -1,2 +0,3 @@

import { IFontMapping } from './interface';
import { IFontMapping, IThemeStyle } from './interface';
import { GaugeTheme } from '../utils/enum';
/**

@@ -8,10 +9,6 @@ * Specifies gauge Themes

let axisLabelFont: IFontMapping;
/** @private */
let axisLineColor: string;
/** @private */
let tickLineColor: string;
/** @private */
let pointerColor: string;
}
/** @private */
export declare function getRangePalette(theme: string): string[];
/** @private */
export declare function getThemeStyle(theme: GaugeTheme): IThemeStyle;

@@ -14,8 +14,2 @@ /**

};
/** @private */
Theme.axisLineColor = null;
/** @private */
Theme.tickLineColor = null;
/** @private */
Theme.pointerColor = null;
})(Theme || (Theme = {}));

@@ -35,1 +29,60 @@ /** @private */

}
/** @private */
export function getThemeStyle(theme) {
var style;
switch (theme) {
case 'MaterialDark':
case 'FabricDark':
case 'BootstrapDark':
case 'Highcontrast':
case 'HighContrast':
style = {
backgroundColor: '#000000',
titleFontColor: '#FFFFFF',
tooltipFillColor: '#ffffff',
tooltipFontColor: '#000000',
labelColor: '#FFFFFF',
lineColor: '#FFFFFF',
majorTickColor: '#FFFFFF',
minorTickColor: '#FFFFFF',
pointerColor: '#FFFFFF',
capColor: '#FFFFFF',
needleColor: '#FFFFFF',
needleTailColor: '#FFFFFF'
};
break;
case 'Bootstrap4':
style = {
backgroundColor: '#F8F9FA',
titleFontColor: '#212529',
tooltipFillColor: '#000000',
tooltipFontColor: '#FFFFFF',
labelColor: '#212529',
lineColor: '#DEE2E6',
majorTickColor: '#ADB5BD',
minorTickColor: '#CED4DA',
pointerColor: '#6C757D',
capColor: '#6C757D',
needleColor: '#6C757D',
needleTailColor: '#6C757D'
};
break;
default:
style = {
backgroundColor: '#FFFFFF',
titleFontColor: '#424242',
tooltipFillColor: '#363F4C',
tooltipFontColor: '#ffffff',
labelColor: '#212121',
lineColor: '#757575',
majorTickColor: '#757575',
minorTickColor: '#757575',
pointerColor: '#757575',
capColor: '#FFFFFF',
needleColor: '#757575',
needleTailColor: '#757575'
};
break;
}
return style;
}

@@ -107,5 +107,3 @@ import { Tooltip } from '@syncfusion/ej2-svg-base';

if (!tooltipArgs.cancel && !samePointerEle) {
var themes = this.gauge.theme.toLowerCase();
var tooltipColor = (themes.indexOf('dark') > -1 || themes === 'highcontrast') ? '#00000' : '#FFFFFF';
tooltipArgs['tooltip']['properties']['textStyle']['color'] = tooltipColor;
tooltipArgs.tooltip.textStyle.color = tooltipArgs.tooltip.textStyle.color || this.gauge.themeStyle.tooltipFontColor;
this.svgTooltip = new Tooltip({

@@ -120,3 +118,3 @@ enable: true,

areaBounds: this.tooltipRect,
fill: (themes.indexOf('dark') > -1 || themes === 'highcontrast') ? '#FFFFFF' : tooltipArgs.tooltip.fill,
fill: tooltipArgs.tooltip.fill || this.gauge.themeStyle.tooltipFillColor,
textStyle: tooltipArgs.tooltip.textStyle,

@@ -123,0 +121,0 @@ border: tooltipArgs.tooltip.border

@@ -61,3 +61,5 @@ /**

/** Render a chart with Bootstrap Dark theme. */
'BootstrapDark';
'BootstrapDark' |
/** Render a chart with Bootstrap 4 theme. */
'Bootstrap4';
/**

@@ -64,0 +66,0 @@ * Defines Hidden label of the axis. They are

@@ -17,4 +17,5 @@ var __extends = (this && this.__extends) || (function () {

*/
import { SvgRenderer, compile as templateComplier } from '@syncfusion/ej2-base';
import { compile as templateComplier } from '@syncfusion/ej2-base';
import { merge } from '@syncfusion/ej2-base';
import { SvgRenderer } from '@syncfusion/ej2-svg-base';
import { createElement, remove, setStyleAttribute } from '@syncfusion/ej2-base';

@@ -21,0 +22,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc