New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-progressbar

Package Overview
Dependencies
Maintainers
3
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-progressbar - npm Package Compare versions

Comparing version 19.1.54 to 19.1.57

8

CHANGELOG.md

@@ -9,2 +9,10 @@ # Changelog

- `#F161003` - ProgressBar label is now rendering properly on live update.
## 19.1.54 (2021-03-30)
### ProgressBar
#### Bug Fixes
- `#F159325` - ProgressBar renders inside the Grid with out any console error.

@@ -11,0 +19,0 @@

4

dist/ej2-progressbar.umd.min.js
/*!
* filename: ej2-progressbar.umd.min.js
* version : 19.1.54
* version : 19.1.57
* Copyright Syncfusion Inc. 2001 - 2020. 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,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new b(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new b(255,255,255)}function s(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new b(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function a(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,s){var l=a(e,t,r,n),c=a(e,t,r,i),p="0",h=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return s?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function h(e,t,r,n,i){var o=t+(i?-r:r);return(i?r:-r)*Math.cos(e/n*(Math.PI/2))+o}function d(e){return document.getElementById(e)}function u(e){if(!e)return null;var r="string"==typeof e?d(e):e;r&&t.remove(r)}var g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return function(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}}(),y=function(){return function(e,t){this.height=e,this.width=t}}(),f=function(){return function(e,t){this.x=e,this.y=t}}(),v=function(e){function t(t,r,n,i,o,s,a,l,c,p){var h=e.call(this,t,r,n,i,o,p)||this;return h.y=s.y,h.x=s.x,h.height=s.height,h.width=s.width,h.rx=a||0,h.ry=l||0,h.transform=c||"",h.stroke=0!==n&&""!==h.stroke?i:"transparent",h}return g(t,e),t}(r.PathOption),b=function(){return function(e,t,r){this.r=e,this.g=t,this.b=r}}(),R=function(){return function(e,t,r,n,i,o,s,a,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=s,this.x=a,this.y=l,this.width=c||0,this.height=p||0}}(),P="annotationRender",S=function(){return function(e,t){this.x=e,this.y=t}}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(10)],r.prototype,"top",void 0),A([t.Property(10)],r.prototype,"bottom",void 0),A([t.Property(10)],r.prototype,"left",void 0),A([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),k=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("Normal")],r.prototype,"fontStyle",void 0),A([t.Property("16px")],r.prototype,"size",void 0),A([t.Property("Normal")],r.prototype,"fontWeight",void 0),A([t.Property("")],r.prototype,"color",void 0),A([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),A([t.Property(1)],r.prototype,"opacity",void 0),A([t.Property("Far")],r.prototype,"textAlignment",void 0),A([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),x=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(!1)],r.prototype,"enable",void 0),A([t.Property(2e3)],r.prototype,"duration",void 0),A([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(null)],r.prototype,"content",void 0),A([t.Property(0)],r.prototype,"annotationAngle",void 0),A([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("")],r.prototype,"color",void 0),A([t.Property(null)],r.prototype,"start",void 0),A([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),L=359.99,O="progressCompleted",_="http://www.w3.org/2000/svg",z=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){this.annotation=e;return t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(u(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:P,content:t,location:e};if(this.control.trigger(P,n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var s=Math.round(this.control.progressSize.width/2.25),a=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+s,r=i*Math.sin(t)+a}return{top:r,left:n}},e}(),I=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),d=l.getAttribute("x"),u=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(d,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(d,10)-y;l.style.visibility="hidden",a.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,parseInt(d,10),parseInt(p,10),!0),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("x",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("width",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",d.toString()),s.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&s.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),d=0,u=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;a.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(d=h(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString())):(d=h(e.timeStamp,u,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",u.toString()),i.destroyIndeterminate||s.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),s=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-s:s,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m=this,y=new t.Animation({}),f=s,v=a.startAngle,b=n+c/2,R=0,P=0,S=a.isActive?3e3:a.animation.duration;v+="Round"===a.cornerRadius&&o!==L&&0!==o?a.enableRtl?.45*c:-.45*c:0,o+="Round"===a.cornerRadius&&o!==L&&0!==o?.45*c:0,i+="Round"===a.cornerRadius&&o!==L&&0!==o?a.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(d)?v:d,A=t.isNullOrUndefined(d)?o:o-u;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),a.isActive?(R=m.activeAnimate(t.timeStamp/t.duration,C,A,a.enableRtl),P=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",P.toString()),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))):(R=h(t.timeStamp,C,A,t.duration,a.enableRtl),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))))},end:function(){a.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,a.enableRtl,!0)),a.isActive&&m.doCircularAnimation(e,r,n,i,o,s,a,c,p,d,u,g),a.trigger("animationComplete",{value:a.value,trackColor:a.trackColor,progressColor:a.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,s,a,c,p){var h=this,d=new t.Animation({}),u=a+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;d.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,s,u,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||h.doCircularIndeterminate(e,r,n,i,o,s,a,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,s){var a,l,c=new t.Animation({}),p=new t.Animation({}),d=e.innerHTML,u=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(a=(a=i.enableRtl?i.progressRect.x+i.progressRect.width+s/2:i.progressRect.x-s/2)<=0?0:a,l=i.enableRtl?a-v:v-a),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,"Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt((u/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=h(t.timeStamp,a,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt(((u-r)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=d,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),u=h(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",u.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,s,a,l,c,p=new t.Animation({}),d=0,u=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;u&&r.progressAnnotationModule&&(s=document.getElementById(r.element.id+"Annotation0").children[0])&&s.children[0]&&"SPAN"===s.children[0].tagName&&(o=s.children[0]),a=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=a=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:a,r.annotateEnd=g+a,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?a:a-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,u&&o&&(d=h(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(d)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),M=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),F=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new I,n.progress=t,n.annotations=r,n}return M(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(z),G=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,s){var a=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=s/e.segmentCount,h=s-(e.segmentCount-1)*c;h=(h-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var d,u,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,R="Round"===e.cornerRadius?n-.9*o:n,P=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)d=R<h?R:h,b<e.segmentColor.length?(u=e.segmentColor[b],b++):(b=0,u=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",P,u,i,"0",this.getLinearSegmentPath(a,l,d,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),a+=e.enableRtl?-h-y:h+y,R=(R-=h+y)<0?0:R;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,s,a,c,p,h){var d=e.startAngle,u=this.widthToAngle(e.minimum,e.maximum,s,e.totalAngle);u-="Round"===e.cornerRadius&&e.totalAngle===L?this.widthToAngle(0,h,.45*c,p):0;var g=h-(e.totalAngle===L?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(e.totalAngle===L?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,h,h/e.segmentCount,p);m-="Round"===e.cornerRadius&&e.totalAngle===L?this.widthToAngle(0,h,.45*c,p):0;var y=this.widthToAngle(0,h,g,p),f=this.widthToAngle(0,h,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,h,.9*c,p):0;for(var v,b,R,P,S,C=e.renderer.createGroup({id:e.element.id+t}),A=Math.floor(u/m),w=Math.ceil((u-f*A)/y),k=(d+(e.enableRtl?-y:y))%360,x=0,T=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<w;E++)v=l(n,i,o,d,R=e.enableRtl?e.startAngle-u>k?e.startAngle-u:k:e.startAngle+u<k?e.startAngle+u:k,e.enableRtl),x<e.segmentColor.length?(P=e.segmentColor[x],x++):(x=0,P=e.segmentColor[x],x++),S=new r.PathOption(e.element.id+t+E,"none",T,P,a,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),d=R+(e.enableRtl?-f:f),k+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,s,a,l,c,p,h,d,u=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,R=t.value,P=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=R&&y[S].end>=b&&y[S].end<=R,a=e*t.calculateProgressRange(y[S].start,b,R),l=e*t.calculateProgressRange(y[S].end,b,R),c=u+(t.enableRtl?-a:a),p=u+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+P:c:u,p=i?p:u,h=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,s=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,h,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(s),m.appendChild(o),t.isGradient&&(d=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,d,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,s,a,c,p,h,d,u,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,R=i.startAngle,P=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,s=this.widthToAngle(v,b,m[S].start,P),a=this.widthToAngle(v,b,m[S].end,P),s=p?(R+(i.enableRtl?-s:s))%360:R,a=p?(R+(i.enableRtl?-a:a))%360:R,d=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,h=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,d,f,"0",l(e,t,n,s,a,i.enableRtl)),c=i.renderer.drawPath(h),g.appendChild(c),i.isGradient&&(u=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,u,s,a,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var s=[],a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};s[0]={color:t,colorStop:"50%"},s[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",a,s);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p=[],h=a(s,l,o,n),d=a(s,l,o,i),u={id:"circleRangeGrad_"+e,x1:h.x.toString(),x2:d.x.toString(),y1:h.y.toString(),y2:d.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",u,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),B=function(){function e(e){this.segment=new G,this.animation=new I,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,s=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",s,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",s,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,s,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d=this.progress,u=d.value===d.maximum,g=d.calculateProgressRange(d.argsData.value);d.previousWidth=o=d.progressRect.width*(d.isIndeterminate&&!d.enableProgressSegments?1:g),l=e?r.getElement(d.element.id+"_LinearProgressGroup"):d.renderer.createGroup({id:d.element.id+"_LinearProgressGroup"});var m=d.progressThickness||d.themeStyle.linearProgressThickness,y=d.isStriped?"url(#"+d.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===d.cornerRadius?new r.PathOption(d.element.id+"_Linearprogress",y,0,"none",d.themeStyle.progressOpacity,"0",this.cornerRadius(d.progressRect.x,d.progressRect.y,o,m,4,u||d.isIndeterminate?"":"start")):new r.PathOption(d.element.id+"_Linearprogress","none",m,y,d.themeStyle.progressOpacity,"0",d.getPathLine(d.progressRect.x,o,m)),d.progressWidth=d.renderer.drawPath(n).getTotalLength(),d.segmentSize=d.enableProgressSegments?d.calculateSegmentSize(d.progressWidth,m):d.segmentSize,null===d.secondaryProgress||d.isIndeterminate||this.renderLinearBuffer(d),null!==d.argsData.value&&("Round4px"===d.cornerRadius?i=d.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",y,m,!1,o,d,d.themeStyle.progressOpacity):d.renderer.drawPath(n):0===d.segmentColor.length||d.isIndeterminate||this.isRange?this.isRange&&!d.isIndeterminate?i=this.segment.createLinearRange(o,d):(e?((i=r.getElement(d.element.id+"_Linearprogress")).setAttribute("d",d.getPathLine(d.progressRect.x,o,m)),i.setAttribute("stroke",y)):i=d.renderer.drawPath(n),d.segmentCount>1&&i.setAttribute("stroke-dasharray",d.segmentSize),"Round"===d.cornerRadius&&g&&i.setAttribute("stroke-linecap","round")):(p=d.enableProgressSegments?d.progressWidth:d.trackWidth,i=this.segment.createLinearSegment(d,"_LinearProgressSegment",o,d.themeStyle.progressOpacity,m,p)),l.appendChild(i),d.isStriped&&!d.isIndeterminate&&(h=this.checkingLinearProgressColor(),this.renderLinearStriped(h,l,d)),!d.isActive||d.isIndeterminate||d.isStriped||this.renderActiveState(l,g,o,m,e),!d.animation.enable||d.isIndeterminate||d.isActive||d.isStriped||(c=null!==d.secondaryProgress?d.animation.delay+(this.bufferWidth-o):d.animation.delay,this.delay=c,s=d.createClipPath(d.clipPath,g,null,e,m,!1,"Round4px"===d.cornerRadius&&u),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearAnimation(s,d,c,e?t:0)),d.isIndeterminate&&(a=d.createClipPath(d.clipPath,d.enableProgressSegments?1:g,null,e,m,d.enableProgressSegments),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearIndeterminate(d.enableProgressSegments?i:a,o,m,d,a)),d.svgObject.appendChild(l))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,h=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",h,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",h,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,a?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,h,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,s))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&a),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,u=this.progress,g=u.labelStyle.textAlignment,m=u.labelStyle.text,y=this.checkingLinearProgressColor(),f=u.progressRect.width*u.calculateProgressRange(u.value),v=u.renderer.createGroup({id:u.element.id+"_LinearLabelGroup"}),b=(u.value-u.minimum)/(u.maximum-u.minimum)*100,P=u.value<u.minimum||u.value>u.maximum?0:Math.round(b),S=o(s(y)),C=Math.round((299*S.r+587*S.g+114*S.b)/1e3),A={cancel:!1,text:m||String(P)+"%",color:u.labelStyle.color};u.trigger("textRender",A),A.cancel||(i=r.measureText(A.text,u.labelStyle),l=u.enableRtl?u.progressRect.x+u.progressRect.width-i.width/2:u.progressRect.x+i.width/2,u.labelOnTrack?"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?(p=u.enableRtl?u.progressRect.x+u.progressRect.width-f/2:u.progressRect.x+f/2,t=(u.enableRtl?p<=l:p>=l)?p:l):(c=u.enableRtl?u.progressRect.x+u.progressRect.width-f+i.width/2:u.progressRect.x+f-i.width/2,c+=u.enableRtl?5:-5,t=(u.enableRtl?c<=l:c>=l)?c:l):"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?t=(u.progressRect.x+u.progressRect.width)/2:(t=u.enableRtl?u.progressRect.x+i.width/2:u.progressRect.x+u.progressRect.width-i.width/2,t+=u.enableRtl?5:-5),n="Round4px"===this.progress.cornerRadius?u.progressRect.y+d/2+i.height/4:u.progressRect.y+u.progressRect.height/2+i.height/4,a=new R(u.element.id+"_linearLabel",u.labelStyle.size||u.themeStyle.linearFontSize,u.labelStyle.fontStyle||u.themeStyle.linearFontStyle,u.labelStyle.fontFamily||u.themeStyle.linearFontFamily,u.labelStyle.fontWeight,"middle",A.color||(C>=128?"black":"white"),t,n),e=u.renderer.createText(a,A.text),v.appendChild(e),u.animation.enable&&!u.isIndeterminate&&(h=u.renderer.createClipPath({id:u.element.id+"_clippathLabel"}),u.createClipPath(h,1,null,!1,u.progressThickness||u.themeStyle.linearProgressThickness,!0),v.appendChild(h),e.setAttribute("style","clip-path:url(#"+u.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,0,f,u,this.delay,i.width)),u.svgObject.appendChild(v))},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),s=l.renderer.drawPath(a)):(o?(s=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),s=l.renderer.drawPath(a)),l.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);s.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(s),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,s)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(_,"linearGradient"),s=[];s=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var a=0;a<s.length;a++)n=document.createElementNS(_,"stop"),n=p(s[a],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var s="";switch(o){case"start":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":s="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" v"+-n+" z";break;case"none":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:s="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return s},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,s,a){for(var l,c,p,h,d=s.progressRect.x,u=s.progressRect.y,g=s.progressRect.width,m=s.gapWidth||s.themeStyle.linearGapWidth,y=(g-(s.segmentCount-1)*m)/s.segmentCount,f=s.renderer.createGroup({id:s.element.id+e+"SegmentGroup"}),v=1;v<=s.segmentCount;v++)if(c=1===v||v===s.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(s.element.id+e+v,t,0,"none",s.themeStyle.trackOpacity,"0",this.cornerRadius(d,u,y,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m;else if(p=o<y?o:y,l=new r.PathOption(s.element.id+e+v,t,0,"none",a,"0",this.cornerRadius(d,u,p,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m,(o-=y+m)<=0)break;return f},e}(),W=function(){function e(e){this.segment=new G,this.animation=new I,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var s=n.argsData.trackColor||n.themeStyle.circularTrackColor,a=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,h=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var d=new r.PathOption(n.element.id+"_Circulartrack",a,p,s,n.themeStyle.trackOpacity,"0",h),u=n.renderer.drawPath(d);n.trackWidth=u.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),u.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||u.setAttribute("stroke-linecap","round"),i.appendChild(u),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),s=null===(s=c(y.innerRadius,this.availableSize))?0:s,y.previousTotalEnd=h=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-h:h))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(h-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,s,f,i,y.enableRtl,y.enablePieProgress),R=this.checkingCircularProgressColor(),P=y.enablePieProgress?R:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,A=new r.PathOption(y.element.id+"_Circularprogress",P,C,R,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(A).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,s,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?d=this.segment.createCircularRange(this.centerX,this.centerY,s,y):(n?(a=(d=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),d.setAttribute("stroke",R),d.setAttribute("d",b)):d=y.renderer.drawPath(A),y.segmentCount>1&&!y.enablePieProgress&&d.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&d.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,d=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,s,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(d),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,s,C,b,v,h,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,u=y.createClipPath(y.clipPath,null,n?a:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,v,h,u,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&u.setAttribute("d",l(this.centerX,this.centerY,s+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?d:u,y,f,v,this.centerX,this.centerY,s,S,u))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),h=(e.startAngle+(e.enableRtl?-p:p))%360,d=l(this.centerX,this.centerY,t,e.startAngle,h,e.enableRtl,e.enablePieProgress),u=this.checkingCircularProgressColor(),g=e.enablePieProgress?u:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,u,e.themeStyle.bufferOpacity,"0",d);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?n:e.totalAngle,s=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,a,s)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,h,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s=this.progress,a=s.labelStyle.text,l=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(l.id)&&document.getElementById(l.id).remove();var c=(s.value-s.minimum)/(s.maximum-s.minimum)*100,p=s.value<s.minimum||s.value>s.maximum?0:Math.round(c),h={cancel:!1,text:a||String(p)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(i=r.measureText(h.text,s.labelStyle),n=this.centerY+i.height/2,o=new R(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,n,s.progressRect.width,s.progressRect.height),t=s.renderer.createText(o,h.text),l.appendChild(t),s.animation.enable&&!s.isIndeterminate&&(e=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,e=s.value<s.minimum||s.value>s.maximum?0:e,this.animation.doLabelAnimation(t,s.startAngle,e,s,this.delay)),s.svgObject.appendChild(l))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p=this.progress,h=n+1;a?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",h,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var d=p.createClipPath(p.clipPath,null,"",a);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,d,p,h,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),D=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),j=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},H=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new B(n),n.circular=new W(n),n.annotateAnimation=new I,n.destroyIndeterminate=!1,n}return D(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new m(0,0,0,0),this.progressSize=new y(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this.isBlazor?{}:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger(O,this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this.isBlazor?{}:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.progressAnnotationModule&&this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect(),n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e,i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&this.totalAngle===L?this.segmentCount:this.segmentCount-1,n=this.totalAngle===L||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,s,a){var l,c,p,h,d,u,g=this.progressRect.x,y=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(h=g,u=y*t,h+=s?0:-4,d=this.progressRect.y,u+=!s&&a||this.isIndeterminate?4:0):(h=this.enableRtl&&!s?g+y:g,u=y*t,h+="Round"!==this.cornerRadius||s?0:this.enableRtl?.45*o:-.45*o,d=this.progressRect.y+this.progressRect.height/2-o/2,u+="Round"!==this.cornerRadius||s?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect")).setAttribute("width",u.toString()),this.isActive&&l.setAttribute("x",h.toString())):(c=new v(this.element.id+"_clippathrect","transparent",1,"transparent",1,new m(h,d,o,u)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=function(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new y(0,0),previousSize:new y(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){e.isDestroyed?clearTimeout(e.resizeTo):(t.currentSize=e.progressSize,e.trigger("resized",t),null!==e.width&&null!==e.height||t.cancel||(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements()))},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger(O,this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth);break;case"animation":this.createSVG(),this.renderElements()}}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},j([t.Property("Linear")],n.prototype,"type",void 0),j([t.Property(null)],n.prototype,"value",void 0),j([t.Property(null)],n.prototype,"secondaryProgress",void 0),j([t.Property(0)],n.prototype,"minimum",void 0),j([t.Property(100)],n.prototype,"maximum",void 0),j([t.Property(0)],n.prototype,"startAngle",void 0),j([t.Property(0)],n.prototype,"endAngle",void 0),j([t.Property("100%")],n.prototype,"radius",void 0),j([t.Property("100%")],n.prototype,"innerRadius",void 0),j([t.Property(1)],n.prototype,"segmentCount",void 0),j([t.Property(null)],n.prototype,"gapWidth",void 0),j([t.Property("")],n.prototype,"segmentColor",void 0),j([t.Property("Auto")],n.prototype,"cornerRadius",void 0),j([t.Property(null)],n.prototype,"height",void 0),j([t.Property(null)],n.prototype,"width",void 0),j([t.Property(!1)],n.prototype,"isIndeterminate",void 0),j([t.Property(!1)],n.prototype,"isActive",void 0),j([t.Property(!1)],n.prototype,"isGradient",void 0),j([t.Property(!1)],n.prototype,"isStriped",void 0),j([t.Property("Auto")],n.prototype,"role",void 0),j([t.Property(!1)],n.prototype,"enableRtl",void 0),j([t.Property(!0)],n.prototype,"labelOnTrack",void 0),j([t.Property(null)],n.prototype,"trackColor",void 0),j([t.Property(null)],n.prototype,"progressColor",void 0),j([t.Property(0)],n.prototype,"trackThickness",void 0),j([t.Property(0)],n.prototype,"progressThickness",void 0),j([t.Property(!1)],n.prototype,"enablePieProgress",void 0),j([t.Property("Fabric")],n.prototype,"theme",void 0),j([t.Property(!1)],n.prototype,"showProgressValue",void 0),j([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),j([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},k)],n.prototype,"labelStyle",void 0),j([t.Complex({},w)],n.prototype,"margin",void 0),j([t.Complex({},x)],n.prototype,"animation",void 0),j([t.Event()],n.prototype,"load",void 0),j([t.Event()],n.prototype,"textRender",void 0),j([t.Event()],n.prototype,"loaded",void 0),j([t.Event()],n.prototype,"valueChanged",void 0),j([t.Event()],n.prototype,"progressCompleted",void 0),j([t.Event()],n.prototype,"animationComplete",void 0),j([t.Event()],n.prototype,"mouseClick",void 0),j([t.Event()],n.prototype,"mouseMove",void 0),j([t.Event()],n.prototype,"mouseUp",void 0),j([t.Event()],n.prototype,"mouseDown",void 0),j([t.Event()],n.prototype,"mouseLeave",void 0),j([t.Collection([{}],T)],n.prototype,"annotations",void 0),j([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=j([t.NotifyPropertyChanges],n)}(t.Component);e.ProgressBar=H,e.Margin=w,e.Font=k,e.Animation=x,e.ProgressAnnotationSettings=T,e.RangeColor=E,e.ProgressAnnotation=F,e.Rect=m,e.Size=y,e.Pos=f,e.RectOption=v,e.ColorValue=b,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=s,e.TextOption=R,e.degreeToLocation=a,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=h,e.annotationRender=P,e.getElement=d,e.removeElement=u,e.ProgressLocation=S,e.ProgressAnimation=I,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,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new b(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new b(255,255,255)}function s(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new b(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function a(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,s){var l=a(e,t,r,n),c=a(e,t,r,i),p="0",h=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return s?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function h(e,t,r,n,i){var o=t+(i?-r:r);return(i?r:-r)*Math.cos(e/n*(Math.PI/2))+o}function d(e){return document.getElementById(e)}function u(e){if(!e)return null;var r="string"==typeof e?d(e):e;r&&t.remove(r)}var g=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),m=function(){return function(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}}(),y=function(){return function(e,t){this.height=e,this.width=t}}(),f=function(){return function(e,t){this.x=e,this.y=t}}(),v=function(e){function t(t,r,n,i,o,s,a,l,c,p){var h=e.call(this,t,r,n,i,o,p)||this;return h.y=s.y,h.x=s.x,h.height=s.height,h.width=s.width,h.rx=a||0,h.ry=l||0,h.transform=c||"",h.stroke=0!==n&&""!==h.stroke?i:"transparent",h}return g(t,e),t}(r.PathOption),b=function(){return function(e,t,r){this.r=e,this.g=t,this.b=r}}(),R=function(){return function(e,t,r,n,i,o,s,a,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=s,this.x=a,this.y=l,this.width=c||0,this.height=p||0}}(),P="annotationRender",S=function(){return function(e,t){this.x=e,this.y=t}}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(10)],r.prototype,"top",void 0),A([t.Property(10)],r.prototype,"bottom",void 0),A([t.Property(10)],r.prototype,"left",void 0),A([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),k=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("Normal")],r.prototype,"fontStyle",void 0),A([t.Property("16px")],r.prototype,"size",void 0),A([t.Property("Normal")],r.prototype,"fontWeight",void 0),A([t.Property("")],r.prototype,"color",void 0),A([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),A([t.Property(1)],r.prototype,"opacity",void 0),A([t.Property("Far")],r.prototype,"textAlignment",void 0),A([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(!1)],r.prototype,"enable",void 0),A([t.Property(2e3)],r.prototype,"duration",void 0),A([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),x=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(null)],r.prototype,"content",void 0),A([t.Property(0)],r.prototype,"annotationAngle",void 0),A([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("")],r.prototype,"color",void 0),A([t.Property(null)],r.prototype,"start",void 0),A([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),L=359.99,O="progressCompleted",_="http://www.w3.org/2000/svg",z=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){this.annotation=e;return t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(u(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:P,content:t,location:e};if(this.control.trigger(P,n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var s=Math.round(this.control.progressSize.width/2.25),a=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+s,r=i*Math.sin(t)+a}return{top:r,left:n}},e}(),I=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),d=l.getAttribute("x"),u=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(d,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(d,10)-y;l.style.visibility="hidden",a.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,parseInt(d,10),parseInt(p,10),!0),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("x",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("width",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",d.toString()),s.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&s.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),d=0,u=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;a.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(d=h(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString())):(d=h(e.timeStamp,u,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",u.toString()),i.destroyIndeterminate||s.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),s=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-s:s,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m=this,y=new t.Animation({}),f=s,v=a.startAngle,b=n+c/2,R=0,P=0,S=a.isActive?3e3:a.animation.duration;v+="Round"===a.cornerRadius&&o!==L&&0!==o?a.enableRtl?.45*c:-.45*c:0,o+="Round"===a.cornerRadius&&o!==L&&0!==o?.45*c:0,i+="Round"===a.cornerRadius&&o!==L&&0!==o?a.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(d)?v:d,A=t.isNullOrUndefined(d)?o:o-u;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),a.isActive?(R=m.activeAnimate(t.timeStamp/t.duration,C,A,a.enableRtl),P=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",P.toString()),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))):(R=h(t.timeStamp,C,A,t.duration,a.enableRtl),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))))},end:function(){a.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,a.enableRtl,!0)),a.isActive&&m.doCircularAnimation(e,r,n,i,o,s,a,c,p,d,u,g),a.trigger("animationComplete",{value:a.value,trackColor:a.trackColor,progressColor:a.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,s,a,c,p){var h=this,d=new t.Animation({}),u=a+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;d.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,s,u,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||h.doCircularIndeterminate(e,r,n,i,o,s,a,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,s){var a,l,c=new t.Animation({}),p=new t.Animation({}),d=e.innerHTML,u=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(a=(a=i.enableRtl?i.progressRect.x+i.progressRect.width+s/2:r-s/2)<=0?0:a,l=i.enableRtl?a-v:v-a),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,"Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt((u/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=h(t.timeStamp,a,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt(((u-r)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=d,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),u=h(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",u.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,s,a,l,c,p=new t.Animation({}),d=0,u=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;u&&r.progressAnnotationModule&&(s=document.getElementById(r.element.id+"Annotation0").children[0])&&s.children[0]&&"SPAN"===s.children[0].tagName&&(o=s.children[0]),a=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=a=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:a,r.annotateEnd=g+a,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?a:a-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,u&&o&&(d=h(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(d)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),M=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),F=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new I,n.progress=t,n.annotations=r,n}return M(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(z),G=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,s){var a=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=s/e.segmentCount,h=s-(e.segmentCount-1)*c;h=(h-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var d,u,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,R="Round"===e.cornerRadius?n-.9*o:n,P=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)d=R<h?R:h,b<e.segmentColor.length?(u=e.segmentColor[b],b++):(b=0,u=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",P,u,i,"0",this.getLinearSegmentPath(a,l,d,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),a+=e.enableRtl?-h-y:h+y,R=(R-=h+y)<0?0:R;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,s,a,c,p,h){var d=e.startAngle,u=this.widthToAngle(e.minimum,e.maximum,s,e.totalAngle);u-="Round"===e.cornerRadius&&e.totalAngle===L?this.widthToAngle(0,h,.45*c,p):0;var g=h-(e.totalAngle===L?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(e.totalAngle===L?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,h,h/e.segmentCount,p);m-="Round"===e.cornerRadius&&e.totalAngle===L?this.widthToAngle(0,h,.45*c,p):0;var y=this.widthToAngle(0,h,g,p),f=this.widthToAngle(0,h,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,h,.9*c,p):0;for(var v,b,R,P,S,C=e.renderer.createGroup({id:e.element.id+t}),A=Math.floor(u/m),w=Math.ceil((u-f*A)/y),k=(d+(e.enableRtl?-y:y))%360,T=0,x=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<w;E++)v=l(n,i,o,d,R=e.enableRtl?e.startAngle-u>k?e.startAngle-u:k:e.startAngle+u<k?e.startAngle+u:k,e.enableRtl),T<e.segmentColor.length?(P=e.segmentColor[T],T++):(T=0,P=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",x,P,a,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),d=R+(e.enableRtl?-f:f),k+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,s,a,l,c,p,h,d,u=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,R=t.value,P=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=R&&y[S].end>=b&&y[S].end<=R,a=e*t.calculateProgressRange(y[S].start,b,R),l=e*t.calculateProgressRange(y[S].end,b,R),c=u+(t.enableRtl?-a:a),p=u+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+P:c:u,p=i?p:u,h=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,s=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,h,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(s),m.appendChild(o),t.isGradient&&(d=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,d,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,s,a,c,p,h,d,u,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,R=i.startAngle,P=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,s=this.widthToAngle(v,b,m[S].start,P),a=this.widthToAngle(v,b,m[S].end,P),s=p?(R+(i.enableRtl?-s:s))%360:R,a=p?(R+(i.enableRtl?-a:a))%360:R,d=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,h=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,d,f,"0",l(e,t,n,s,a,i.enableRtl)),c=i.renderer.drawPath(h),g.appendChild(c),i.isGradient&&(u=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,u,s,a,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var s=[],a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};s[0]={color:t,colorStop:"50%"},s[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",a,s);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p=[],h=a(s,l,o,n),d=a(s,l,o,i),u={id:"circleRangeGrad_"+e,x1:h.x.toString(),x2:d.x.toString(),y1:h.y.toString(),y2:d.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",u,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),B=function(){function e(e){this.segment=new G,this.animation=new I,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,s=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",s,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",s,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,s,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d=this.progress,u=d.value===d.maximum,g=d.calculateProgressRange(d.argsData.value);o=d.progressRect.width*(d.isIndeterminate&&!d.enableProgressSegments?1:g),l=e?r.getElement(d.element.id+"_LinearProgressGroup"):d.renderer.createGroup({id:d.element.id+"_LinearProgressGroup"});var m=d.progressThickness||d.themeStyle.linearProgressThickness,y=d.isStriped?"url(#"+d.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===d.cornerRadius?new r.PathOption(d.element.id+"_Linearprogress",y,0,"none",d.themeStyle.progressOpacity,"0",this.cornerRadius(d.progressRect.x,d.progressRect.y,o,m,4,u||d.isIndeterminate?"":"start")):new r.PathOption(d.element.id+"_Linearprogress","none",m,y,d.themeStyle.progressOpacity,"0",d.getPathLine(d.progressRect.x,o,m)),d.progressWidth=d.renderer.drawPath(n).getTotalLength(),d.segmentSize=d.enableProgressSegments?d.calculateSegmentSize(d.progressWidth,m):d.segmentSize,null===d.secondaryProgress||d.isIndeterminate||this.renderLinearBuffer(d),null!==d.argsData.value&&("Round4px"===d.cornerRadius?i=d.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",y,m,!1,o,d,d.themeStyle.progressOpacity):d.renderer.drawPath(n):0===d.segmentColor.length||d.isIndeterminate||this.isRange?this.isRange&&!d.isIndeterminate?i=this.segment.createLinearRange(o,d):(e?((i=r.getElement(d.element.id+"_Linearprogress")).setAttribute("d",d.getPathLine(d.progressRect.x,o,m)),i.setAttribute("stroke",y)):i=d.renderer.drawPath(n),d.segmentCount>1&&i.setAttribute("stroke-dasharray",d.segmentSize),"Round"===d.cornerRadius&&g&&i.setAttribute("stroke-linecap","round")):(p=d.enableProgressSegments?d.progressWidth:d.trackWidth,i=this.segment.createLinearSegment(d,"_LinearProgressSegment",o,d.themeStyle.progressOpacity,m,p)),l.appendChild(i),d.isStriped&&!d.isIndeterminate&&(h=this.checkingLinearProgressColor(),this.renderLinearStriped(h,l,d)),!d.isActive||d.isIndeterminate||d.isStriped||this.renderActiveState(l,g,o,m,e),!d.animation.enable||d.isIndeterminate||d.isActive||d.isStriped||(c=null!==d.secondaryProgress?d.animation.delay+(this.bufferWidth-o):d.animation.delay,this.delay=c,s=d.createClipPath(d.clipPath,g,null,e,m,!1,"Round4px"===d.cornerRadius&&u),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearAnimation(s,d,c,e?t:0)),d.isIndeterminate&&(a=d.createClipPath(d.clipPath,d.enableProgressSegments?1:g,null,e,m,d.enableProgressSegments),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearIndeterminate(d.enableProgressSegments?i:a,o,m,d,a)),d.svgObject.appendChild(l))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,h=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",h,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",h,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,a?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,h,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,s))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&a),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,u=this.progress,g=u.labelStyle.textAlignment,m=u.labelStyle.text,y=this.checkingLinearProgressColor(),f=u.progressRect.width*u.calculateProgressRange(u.value),v=u.renderer.createGroup({id:u.element.id+"_LinearLabelGroup"});document.getElementById(v.id)&&document.getElementById(v.id).remove();var b=(u.value-u.minimum)/(u.maximum-u.minimum)*100,P=u.value<u.minimum||u.value>u.maximum?0:Math.round(b),S=o(s(y)),C=Math.round((299*S.r+587*S.g+114*S.b)/1e3),A={cancel:!1,text:m||String(P)+"%",color:u.labelStyle.color};u.trigger("textRender",A),A.cancel||(i=r.measureText(A.text,u.labelStyle),l=u.enableRtl?u.progressRect.x+u.progressRect.width-i.width/2:u.progressRect.x+i.width/2,u.labelOnTrack?"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?(p=u.enableRtl?u.progressRect.x+u.progressRect.width-f/2:u.progressRect.x+f/2,t=(u.enableRtl?p<=l:p>=l)?p:l):(c=u.enableRtl?u.progressRect.x+u.progressRect.width-f+i.width/2:u.progressRect.x+f-i.width/2,c+=u.enableRtl?5:-5,t=(u.enableRtl?c<=l:c>=l)?c:l):"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?t=(u.progressRect.x+u.progressRect.width)/2:(t=u.enableRtl?u.progressRect.x+i.width/2:u.progressRect.x+u.progressRect.width-i.width/2,t+=u.enableRtl?5:-5),n="Round4px"===this.progress.cornerRadius?u.progressRect.y+d/2+i.height/4:u.progressRect.y+u.progressRect.height/2+i.height/4,a=new R(u.element.id+"_linearLabel",u.labelStyle.size||u.themeStyle.linearFontSize,u.labelStyle.fontStyle||u.themeStyle.linearFontStyle,u.labelStyle.fontFamily||u.themeStyle.linearFontFamily,u.labelStyle.fontWeight,"middle",A.color||(C>=128?"black":"white"),t,n),e=u.renderer.createText(a,A.text),v.appendChild(e),u.animation.enable&&!u.isIndeterminate&&(h=u.renderer.createClipPath({id:u.element.id+"_clippathLabel"}),u.createClipPath(h,1,null,!1,u.progressThickness||u.themeStyle.linearProgressThickness,!0),v.appendChild(h),e.setAttribute("style","clip-path:url(#"+u.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,u.previousWidth?u.previousWidth:0,f,u,this.delay,i.width)),u.svgObject.appendChild(v),u.previousWidth=f)},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),s=l.renderer.drawPath(a)):(o?(s=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),s=l.renderer.drawPath(a)),l.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);s.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(s),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,s)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(_,"linearGradient"),s=[];s=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var a=0;a<s.length;a++)n=document.createElementNS(_,"stop"),n=p(s[a],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var s="";switch(o){case"start":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":s="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" v"+-n+" z";break;case"none":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:s="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return s},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,s,a){for(var l,c,p,h,d=s.progressRect.x,u=s.progressRect.y,g=s.progressRect.width,m=s.gapWidth||s.themeStyle.linearGapWidth,y=(g-(s.segmentCount-1)*m)/s.segmentCount,f=s.renderer.createGroup({id:s.element.id+e+"SegmentGroup"}),v=1;v<=s.segmentCount;v++)if(c=1===v||v===s.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(s.element.id+e+v,t,0,"none",s.themeStyle.trackOpacity,"0",this.cornerRadius(d,u,y,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m;else if(p=o<y?o:y,l=new r.PathOption(s.element.id+e+v,t,0,"none",a,"0",this.cornerRadius(d,u,p,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m,(o-=y+m)<=0)break;return f},e}(),W=function(){function e(e){this.segment=new G,this.animation=new I,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var s=n.argsData.trackColor||n.themeStyle.circularTrackColor,a=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,h=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var d=new r.PathOption(n.element.id+"_Circulartrack",a,p,s,n.themeStyle.trackOpacity,"0",h),u=n.renderer.drawPath(d);n.trackWidth=u.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),u.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||u.setAttribute("stroke-linecap","round"),i.appendChild(u),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),s=null===(s=c(y.innerRadius,this.availableSize))?0:s,y.previousTotalEnd=h=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-h:h))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(h-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,s,f,i,y.enableRtl,y.enablePieProgress),R=this.checkingCircularProgressColor(),P=y.enablePieProgress?R:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,A=new r.PathOption(y.element.id+"_Circularprogress",P,C,R,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(A).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,s,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?d=this.segment.createCircularRange(this.centerX,this.centerY,s,y):(n?(a=(d=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),d.setAttribute("stroke",R),d.setAttribute("d",b)):d=y.renderer.drawPath(A),y.segmentCount>1&&!y.enablePieProgress&&d.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&d.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,d=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,s,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(d),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,s,C,b,v,h,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,u=y.createClipPath(y.clipPath,null,n?a:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,v,h,u,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&u.setAttribute("d",l(this.centerX,this.centerY,s+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?d:u,y,f,v,this.centerX,this.centerY,s,S,u))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),h=(e.startAngle+(e.enableRtl?-p:p))%360,d=l(this.centerX,this.centerY,t,e.startAngle,h,e.enableRtl,e.enablePieProgress),u=this.checkingCircularProgressColor(),g=e.enablePieProgress?u:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,u,e.themeStyle.bufferOpacity,"0",d);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?n:e.totalAngle,s=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,a,s)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,h,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s=this.progress,a=s.labelStyle.text,l=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(l.id)&&document.getElementById(l.id).remove();var c=(s.value-s.minimum)/(s.maximum-s.minimum)*100,p=s.value<s.minimum||s.value>s.maximum?0:Math.round(c),h={cancel:!1,text:a||String(p)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(i=r.measureText(h.text,s.labelStyle),n=this.centerY+i.height/2,o=new R(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,n,s.progressRect.width,s.progressRect.height),t=s.renderer.createText(o,h.text),l.appendChild(t),s.animation.enable&&!s.isIndeterminate&&(e=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,e=s.value<s.minimum||s.value>s.maximum?0:e,this.animation.doLabelAnimation(t,s.startAngle,e,s,this.delay)),s.svgObject.appendChild(l))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p=this.progress,h=n+1;a?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",h,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var d=p.createClipPath(p.clipPath,null,"",a);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,d,p,h,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),D=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),j=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},H=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new B(n),n.circular=new W(n),n.annotateAnimation=new I,n.destroyIndeterminate=!1,n}return D(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new m(0,0,0,0),this.progressSize=new y(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this.isBlazor?{}:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger(O,this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this.isBlazor?{}:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect();if(r.getElement(this.svgObject.id)){var n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"}},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e,i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&this.totalAngle===L?this.segmentCount:this.segmentCount-1,n=this.totalAngle===L||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,s,a){var l,c,p,h,d,u,g=this.progressRect.x,y=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(h=g,u=y*t,h+=s?0:-4,d=this.progressRect.y,u+=!s&&a||this.isIndeterminate?4:0):(h=this.enableRtl&&!s?g+y:g,u=y*t,h+="Round"!==this.cornerRadius||s?0:this.enableRtl?.45*o:-.45*o,d=this.progressRect.y+this.progressRect.height/2-o/2,u+="Round"!==this.cornerRadius||s?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect"+(s?"label":""))).setAttribute("width",u.toString()),this.isActive&&l.setAttribute("x",h.toString())):(c=new v(this.element.id+"_clippathrect"+(s?"label":""),"transparent",1,"transparent",1,new m(h,d,o,u)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=function(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new y(0,0),previousSize:new y(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){e.isDestroyed?clearTimeout(e.resizeTo):(t.currentSize=e.progressSize,e.trigger("resized",t),null!==e.width&&null!==e.height||t.cancel||(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements()))},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++){switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger(O,this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):(this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth),this.showProgressValue&&this.linear.renderLinearLabel());break;case"animation":this.createSVG(),this.renderElements()}}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},j([t.Property("Linear")],n.prototype,"type",void 0),j([t.Property(null)],n.prototype,"value",void 0),j([t.Property(null)],n.prototype,"secondaryProgress",void 0),j([t.Property(0)],n.prototype,"minimum",void 0),j([t.Property(100)],n.prototype,"maximum",void 0),j([t.Property(0)],n.prototype,"startAngle",void 0),j([t.Property(0)],n.prototype,"endAngle",void 0),j([t.Property("100%")],n.prototype,"radius",void 0),j([t.Property("100%")],n.prototype,"innerRadius",void 0),j([t.Property(1)],n.prototype,"segmentCount",void 0),j([t.Property(null)],n.prototype,"gapWidth",void 0),j([t.Property("")],n.prototype,"segmentColor",void 0),j([t.Property("Auto")],n.prototype,"cornerRadius",void 0),j([t.Property(null)],n.prototype,"height",void 0),j([t.Property(null)],n.prototype,"width",void 0),j([t.Property(!1)],n.prototype,"isIndeterminate",void 0),j([t.Property(!1)],n.prototype,"isActive",void 0),j([t.Property(!1)],n.prototype,"isGradient",void 0),j([t.Property(!1)],n.prototype,"isStriped",void 0),j([t.Property("Auto")],n.prototype,"role",void 0),j([t.Property(!1)],n.prototype,"enableRtl",void 0),j([t.Property(!0)],n.prototype,"labelOnTrack",void 0),j([t.Property(null)],n.prototype,"trackColor",void 0),j([t.Property(null)],n.prototype,"progressColor",void 0),j([t.Property(0)],n.prototype,"trackThickness",void 0),j([t.Property(0)],n.prototype,"progressThickness",void 0),j([t.Property(!1)],n.prototype,"enablePieProgress",void 0),j([t.Property("Fabric")],n.prototype,"theme",void 0),j([t.Property(!1)],n.prototype,"showProgressValue",void 0),j([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),j([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},k)],n.prototype,"labelStyle",void 0),j([t.Complex({},w)],n.prototype,"margin",void 0),j([t.Complex({},T)],n.prototype,"animation",void 0),j([t.Event()],n.prototype,"load",void 0),j([t.Event()],n.prototype,"textRender",void 0),j([t.Event()],n.prototype,"loaded",void 0),j([t.Event()],n.prototype,"valueChanged",void 0),j([t.Event()],n.prototype,"progressCompleted",void 0),j([t.Event()],n.prototype,"animationComplete",void 0),j([t.Event()],n.prototype,"mouseClick",void 0),j([t.Event()],n.prototype,"mouseMove",void 0),j([t.Event()],n.prototype,"mouseUp",void 0),j([t.Event()],n.prototype,"mouseDown",void 0),j([t.Event()],n.prototype,"mouseLeave",void 0),j([t.Collection([{}],x)],n.prototype,"annotations",void 0),j([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=j([t.NotifyPropertyChanges],n)}(t.Component);e.ProgressBar=H,e.Margin=w,e.Font=k,e.Animation=T,e.ProgressAnnotationSettings=x,e.RangeColor=E,e.ProgressAnnotation=F,e.Rect=m,e.Size=y,e.Pos=f,e.RectOption=v,e.ColorValue=b,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=s,e.TextOption=R,e.degreeToLocation=a,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=h,e.annotationRender=P,e.getElement=d,e.removeElement=u,e.ProgressLocation=S,e.ProgressAnimation=I,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-progressbar.umd.min.js.map
/*!
* filename: ej2-progressbar.min.js
* version : 19.1.54
* version : 19.1.57
* Copyright Syncfusion Inc. 2001 - 2020. 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.progressbar=function(e,t,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new R(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new R(255,255,255)}function s(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new R(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function a(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,s){var l=a(e,t,r,n),c=a(e,t,r,i),p="0",h=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return s?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function h(e,t,r,n,i){var o=i?r:-r,s=t+(i?-r:r);return o*Math.cos(e/n*(Math.PI/2))+s}function d(e){return document.getElementById(e)}function u(e){if(!e)return null;var r="string"==typeof e?d(e):e;r&&t.remove(r)}function g(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}var m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),y=function(){function e(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}return e}(),f=function(){function e(e,t){this.height=e,this.width=t}return e}(),v=function(){function e(e,t){this.x=e,this.y=t}return e}(),b=function(e){function t(t,r,n,i,o,s,a,l,c,p){var h=e.call(this,t,r,n,i,o,p)||this;return h.y=s.y,h.x=s.x,h.height=s.height,h.width=s.width,h.rx=a||0,h.ry=l||0,h.transform=c||"",h.stroke=0!==n&&""!==h.stroke?i:"transparent",h}return m(t,e),t}(r.PathOption),R=function(){function e(e,t,r){this.r=e,this.g=t,this.b=r}return e}(),P=function(){function e(e,t,r,n,i,o,s,a,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=s,this.x=a,this.y=l,this.width=c||0,this.height=p||0}return e}(),S=function(){function e(e,t){this.x=e,this.y=t}return e}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(10)],r.prototype,"top",void 0),A([t.Property(10)],r.prototype,"bottom",void 0),A([t.Property(10)],r.prototype,"left",void 0),A([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),k=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("Normal")],r.prototype,"fontStyle",void 0),A([t.Property("16px")],r.prototype,"size",void 0),A([t.Property("Normal")],r.prototype,"fontWeight",void 0),A([t.Property("")],r.prototype,"color",void 0),A([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),A([t.Property(1)],r.prototype,"opacity",void 0),A([t.Property("Far")],r.prototype,"textAlignment",void 0),A([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(!1)],r.prototype,"enable",void 0),A([t.Property(2e3)],r.prototype,"duration",void 0),A([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),x=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(null)],r.prototype,"content",void 0),A([t.Property(0)],r.prototype,"annotationAngle",void 0),A([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("")],r.prototype,"color",void 0),A([t.Property(null)],r.prototype,"start",void 0),A([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),L="http://www.w3.org/2000/svg",O=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){return this.annotation=e,t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(u(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:"annotationRender",content:t,location:e};if(this.control.trigger("annotationRender",n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var s=Math.round(this.control.progressSize.width/2.25),a=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+s,r=i*Math.sin(t)+a}return{top:r,left:n}},e}(),_=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),d=l.getAttribute("x"),u=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(d,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(d,10)-y;l.style.visibility="hidden",a.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,parseInt(d,10),parseInt(p,10),!0),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("x",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("width",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",d.toString()),s.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&s.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),d=0,u=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;a.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(d=h(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString())):(d=h(e.timeStamp,u,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",u.toString()),i.destroyIndeterminate||s.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),s=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-s:s,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m=this,y=new t.Animation({}),f=s,v=a.startAngle,b=n+c/2,R=0,P=0,S=a.isActive?3e3:a.animation.duration;v+="Round"===a.cornerRadius&&359.99!==o&&0!==o?a.enableRtl?.45*c:-.45*c:0,o+="Round"===a.cornerRadius&&359.99!==o&&0!==o?.45*c:0,i+="Round"===a.cornerRadius&&359.99!==o&&0!==o?a.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(d)?v:d,A=t.isNullOrUndefined(d)?o:o-u;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),a.isActive?(R=m.activeAnimate(t.timeStamp/t.duration,C,A,a.enableRtl),P=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",P.toString()),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))):(R=h(t.timeStamp,C,A,t.duration,a.enableRtl),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))))},end:function(){a.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,a.enableRtl,!0)),a.isActive&&m.doCircularAnimation(e,r,n,i,o,s,a,c,p,d,u,g),a.trigger("animationComplete",{value:a.value,trackColor:a.trackColor,progressColor:a.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,s,a,c,p){var h=this,d=new t.Animation({}),u=a+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;d.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,s,u,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||h.doCircularIndeterminate(e,r,n,i,o,s,a,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,s){var a,l,c=new t.Animation({}),p=new t.Animation({}),d=e.innerHTML,u=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(a=i.enableRtl?i.progressRect.x+i.progressRect.width+s/2:i.progressRect.x-s/2,a=a<=0?0:a,l=i.enableRtl?a-v:v-a),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,"Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt((u/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=h(t.timeStamp,a,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt(((u-r)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=d,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),u=h(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",u.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,s,a,l,c,p=new t.Animation({}),d=0,u=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;u&&r.progressAnnotationModule&&(s=document.getElementById(r.element.id+"Annotation0").children[0])&&s.children[0]&&"SPAN"===s.children[0].tagName&&(o=s.children[0]),a=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=a=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:a,r.annotateEnd=g+a,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?a:a-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,u&&o&&(d=h(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(d)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),z=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),I=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new _,n.progress=t,n.annotations=r,n}return z(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(O),M=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,s){var a=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=s/e.segmentCount,h=s-(e.segmentCount-1)*c;h=(h-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var d,u,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,R="Round"===e.cornerRadius?n-.9*o:n,P=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)d=R<h?R:h,b<e.segmentColor.length?(u=e.segmentColor[b],b++):(b=0,u=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",P,u,i,"0",this.getLinearSegmentPath(a,l,d,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),a+=e.enableRtl?-h-y:h+y,R=(R-=h+y)<0?0:R;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,s,a,c,p,h){var d=e.startAngle,u=this.widthToAngle(e.minimum,e.maximum,s,e.totalAngle);u-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,h,.45*c,p):0;var g=h-(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,h,h/e.segmentCount,p);m-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,h,.45*c,p):0;var y=this.widthToAngle(0,h,g,p),f=this.widthToAngle(0,h,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,h,.9*c,p):0;for(var v,b,R,P,S,C=e.renderer.createGroup({id:e.element.id+t}),A=Math.floor(u/m),w=Math.ceil((u-f*A)/y),k=(d+(e.enableRtl?-y:y))%360,T=0,x=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<w;E++)v=l(n,i,o,d,R=e.enableRtl?e.startAngle-u>k?e.startAngle-u:k:e.startAngle+u<k?e.startAngle+u:k,e.enableRtl),T<e.segmentColor.length?(P=e.segmentColor[T],T++):(T=0,P=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",x,P,a,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),d=R+(e.enableRtl?-f:f),k+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,s,a,l,c,p,h,d,u=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,R=t.value,P=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=R&&y[S].end>=b&&y[S].end<=R,a=e*t.calculateProgressRange(y[S].start,b,R),l=e*t.calculateProgressRange(y[S].end,b,R),c=u+(t.enableRtl?-a:a),p=u+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+P:c:u,p=i?p:u,h=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,s=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,h,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(s),m.appendChild(o),t.isGradient&&(d=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,d,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,s,a,c,p,h,d,u,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,R=i.startAngle,P=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,s=this.widthToAngle(v,b,m[S].start,P),a=this.widthToAngle(v,b,m[S].end,P),s=p?(R+(i.enableRtl?-s:s))%360:R,a=p?(R+(i.enableRtl?-a:a))%360:R,d=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,h=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,d,f,"0",l(e,t,n,s,a,i.enableRtl)),c=i.renderer.drawPath(h),g.appendChild(c),i.isGradient&&(u=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,u,s,a,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var s=[],a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};s[0]={color:t,colorStop:"50%"},s[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",a,s);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p=[],h=a(s,l,o,n),d=a(s,l,o,i),u={id:"circleRangeGrad_"+e,x1:h.x.toString(),x2:d.x.toString(),y1:h.y.toString(),y2:d.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",u,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),F=function(){function e(e){this.segment=new M,this.animation=new _,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,s=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",s,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",s,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,s,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d=this.progress,u=d.value===d.maximum,g=d.calculateProgressRange(d.argsData.value);d.previousWidth=o=d.progressRect.width*(d.isIndeterminate&&!d.enableProgressSegments?1:g),l=e?r.getElement(d.element.id+"_LinearProgressGroup"):d.renderer.createGroup({id:d.element.id+"_LinearProgressGroup"});var m=d.progressThickness||d.themeStyle.linearProgressThickness,y=d.isStriped?"url(#"+d.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===d.cornerRadius?new r.PathOption(d.element.id+"_Linearprogress",y,0,"none",d.themeStyle.progressOpacity,"0",this.cornerRadius(d.progressRect.x,d.progressRect.y,o,m,4,u||d.isIndeterminate?"":"start")):new r.PathOption(d.element.id+"_Linearprogress","none",m,y,d.themeStyle.progressOpacity,"0",d.getPathLine(d.progressRect.x,o,m)),d.progressWidth=d.renderer.drawPath(n).getTotalLength(),d.segmentSize=d.enableProgressSegments?d.calculateSegmentSize(d.progressWidth,m):d.segmentSize,null===d.secondaryProgress||d.isIndeterminate||this.renderLinearBuffer(d),null!==d.argsData.value&&("Round4px"===d.cornerRadius?i=d.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",y,m,!1,o,d,d.themeStyle.progressOpacity):d.renderer.drawPath(n):0===d.segmentColor.length||d.isIndeterminate||this.isRange?this.isRange&&!d.isIndeterminate?i=this.segment.createLinearRange(o,d):(e?((i=r.getElement(d.element.id+"_Linearprogress")).setAttribute("d",d.getPathLine(d.progressRect.x,o,m)),i.setAttribute("stroke",y)):i=d.renderer.drawPath(n),d.segmentCount>1&&i.setAttribute("stroke-dasharray",d.segmentSize),"Round"===d.cornerRadius&&g&&i.setAttribute("stroke-linecap","round")):(p=d.enableProgressSegments?d.progressWidth:d.trackWidth,i=this.segment.createLinearSegment(d,"_LinearProgressSegment",o,d.themeStyle.progressOpacity,m,p)),l.appendChild(i),d.isStriped&&!d.isIndeterminate&&(h=this.checkingLinearProgressColor(),this.renderLinearStriped(h,l,d)),!d.isActive||d.isIndeterminate||d.isStriped||this.renderActiveState(l,g,o,m,e),!d.animation.enable||d.isIndeterminate||d.isActive||d.isStriped||(c=null!==d.secondaryProgress?d.animation.delay+(this.bufferWidth-o):d.animation.delay,this.delay=c,s=d.createClipPath(d.clipPath,g,null,e,m,!1,"Round4px"===d.cornerRadius&&u),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearAnimation(s,d,c,e?t:0)),d.isIndeterminate&&(a=d.createClipPath(d.clipPath,d.enableProgressSegments?1:g,null,e,m,d.enableProgressSegments),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearIndeterminate(d.enableProgressSegments?i:a,o,m,d,a)),d.svgObject.appendChild(l))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,h=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",h,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",h,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,a?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,h,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,s))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&a),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,u=this.progress,g=u.labelStyle.textAlignment,m=u.labelStyle.text,y=this.checkingLinearProgressColor(),f=u.progressRect.width*u.calculateProgressRange(u.value),v=u.renderer.createGroup({id:u.element.id+"_LinearLabelGroup"}),b=(u.value-u.minimum)/(u.maximum-u.minimum)*100,R=u.value<u.minimum||u.value>u.maximum?0:Math.round(b),S=o(s(y)),C=Math.round((299*S.r+587*S.g+114*S.b)/1e3),A={cancel:!1,text:m||String(R)+"%",color:u.labelStyle.color};u.trigger("textRender",A),A.cancel||(i=r.measureText(A.text,u.labelStyle),l=u.enableRtl?u.progressRect.x+u.progressRect.width-i.width/2:u.progressRect.x+i.width/2,u.labelOnTrack?"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?(p=u.enableRtl?u.progressRect.x+u.progressRect.width-f/2:u.progressRect.x+f/2,t=(u.enableRtl?p<=l:p>=l)?p:l):(c=u.enableRtl?u.progressRect.x+u.progressRect.width-f+i.width/2:u.progressRect.x+f-i.width/2,c+=u.enableRtl?5:-5,t=(u.enableRtl?c<=l:c>=l)?c:l):"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?t=(u.progressRect.x+u.progressRect.width)/2:(t=u.enableRtl?u.progressRect.x+i.width/2:u.progressRect.x+u.progressRect.width-i.width/2,t+=u.enableRtl?5:-5),n="Round4px"===this.progress.cornerRadius?u.progressRect.y+d/2+i.height/4:u.progressRect.y+u.progressRect.height/2+i.height/4,a=new P(u.element.id+"_linearLabel",u.labelStyle.size||u.themeStyle.linearFontSize,u.labelStyle.fontStyle||u.themeStyle.linearFontStyle,u.labelStyle.fontFamily||u.themeStyle.linearFontFamily,u.labelStyle.fontWeight,"middle",A.color||(C>=128?"black":"white"),t,n),e=u.renderer.createText(a,A.text),v.appendChild(e),u.animation.enable&&!u.isIndeterminate&&(h=u.renderer.createClipPath({id:u.element.id+"_clippathLabel"}),u.createClipPath(h,1,null,!1,u.progressThickness||u.themeStyle.linearProgressThickness,!0),v.appendChild(h),e.setAttribute("style","clip-path:url(#"+u.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,0,f,u,this.delay,i.width)),u.svgObject.appendChild(v))},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),s=l.renderer.drawPath(a)):(o?(s=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),s=l.renderer.drawPath(a)),l.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);s.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(s),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,s)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(L,"linearGradient"),s=[];s=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var a=0;a<s.length;a++)n=document.createElementNS(L,"stop"),n=p(s[a],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var s="",a=r,l=i;switch(o){case"start":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":s="M"+e+","+t+" h"+(a-l)+" a"+l+","+l+" 0 0 1 "+l+","+l+" v"+(n-2*l)+" a"+l+","+l+" 0 0 1 "+-l+","+l+" h"+(i-a)+" v"+-n+" z";break;case"none":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:s="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return s},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,s,a){for(var l,c,p,h,d=s.progressRect.x,u=s.progressRect.y,g=s.progressRect.width,m=s.gapWidth||s.themeStyle.linearGapWidth,y=(g-(s.segmentCount-1)*m)/s.segmentCount,f=s.renderer.createGroup({id:s.element.id+e+"SegmentGroup"}),v=1;v<=s.segmentCount;v++)if(c=1===v||v===s.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(s.element.id+e+v,t,0,"none",s.themeStyle.trackOpacity,"0",this.cornerRadius(d,u,y,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m;else if(p=o<y?o:y,l=new r.PathOption(s.element.id+e+v,t,0,"none",a,"0",this.cornerRadius(d,u,p,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m,(o-=y+m)<=0)break;return f},e}(),G=function(){function e(e){this.segment=new M,this.animation=new _,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var s=n.argsData.trackColor||n.themeStyle.circularTrackColor,a=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,h=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var d=new r.PathOption(n.element.id+"_Circulartrack",a,p,s,n.themeStyle.trackOpacity,"0",h),u=n.renderer.drawPath(d);n.trackWidth=u.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),u.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||u.setAttribute("stroke-linecap","round"),i.appendChild(u),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),s=null===(s=c(y.innerRadius,this.availableSize))?0:s,y.previousTotalEnd=h=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-h:h))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(h-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,s,f,i,y.enableRtl,y.enablePieProgress),R=this.checkingCircularProgressColor(),P=y.enablePieProgress?R:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,A=new r.PathOption(y.element.id+"_Circularprogress",P,C,R,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(A).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,s,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?d=this.segment.createCircularRange(this.centerX,this.centerY,s,y):(n?(a=(d=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),d.setAttribute("stroke",R),d.setAttribute("d",b)):d=y.renderer.drawPath(A),y.segmentCount>1&&!y.enablePieProgress&&d.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&d.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,d=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,s,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(d),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,s,C,b,v,h,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,u=y.createClipPath(y.clipPath,null,n?a:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,v,h,u,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&u.setAttribute("d",l(this.centerX,this.centerY,s+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?d:u,y,f,v,this.centerX,this.centerY,s,S,u))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),h=(e.startAngle+(e.enableRtl?-p:p))%360,d=l(this.centerX,this.centerY,t,e.startAngle,h,e.enableRtl,e.enablePieProgress),u=this.checkingCircularProgressColor(),g=e.enablePieProgress?u:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,u,e.themeStyle.bufferOpacity,"0",d);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?n:e.totalAngle,s=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,a,s)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,h,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s=this.progress,a=s.labelStyle.text,l=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(l.id)&&document.getElementById(l.id).remove();var c=(s.value-s.minimum)/(s.maximum-s.minimum)*100,p=s.value<s.minimum||s.value>s.maximum?0:Math.round(c),h={cancel:!1,text:a||String(p)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(i=r.measureText(h.text,s.labelStyle),n=this.centerY+i.height/2,o=new P(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,n,s.progressRect.width,s.progressRect.height),t=s.renderer.createText(o,h.text),l.appendChild(t),s.animation.enable&&!s.isIndeterminate&&(e=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,e=s.value<s.minimum||s.value>s.maximum?0:e,this.animation.doLabelAnimation(t,s.startAngle,e,s,this.delay)),s.svgObject.appendChild(l))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p=this.progress,h=n+1;a?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",h,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var d=p.createClipPath(p.clipPath,null,"",a);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,d,p,h,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),B=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),W=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},D=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new F(n),n.circular=new G(n),n.annotateAnimation=new _,n.destroyIndeterminate=!1,n}return B(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new y(0,0,0,0),this.progressSize=new f(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this.isBlazor?{}:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this.isBlazor?{}:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.progressAnnotationModule&&this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect(),n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e,i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&359.99===this.totalAngle?this.segmentCount:this.segmentCount-1,n=359.99===this.totalAngle||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,s,a){var l,c,p,h,d,u,g=this.progressRect.x,m=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(h=g,u=m*t,h+=s?0:-4,d=this.progressRect.y,u+=!s&&a||this.isIndeterminate?4:0):(h=this.enableRtl&&!s?g+m:g,u=m*t,h+="Round"!==this.cornerRadius||s?0:this.enableRtl?.45*o:-.45*o,d=this.progressRect.y+this.progressRect.height/2-o/2,u+="Round"!==this.cornerRadius||s?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect")).setAttribute("width",u.toString()),this.isActive&&l.setAttribute("x",h.toString())):(c=new b(this.element.id+"_clippathrect","transparent",1,"transparent",1,new y(h,d,o,u)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=g(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new f(0,0),previousSize:new f(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);t.currentSize=e.progressSize,e.trigger("resized",t),null!==e.width&&null!==e.height||t.cancel||(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements())},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++)switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth);break;case"animation":this.createSVG(),this.renderElements()}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},W([t.Property("Linear")],n.prototype,"type",void 0),W([t.Property(null)],n.prototype,"value",void 0),W([t.Property(null)],n.prototype,"secondaryProgress",void 0),W([t.Property(0)],n.prototype,"minimum",void 0),W([t.Property(100)],n.prototype,"maximum",void 0),W([t.Property(0)],n.prototype,"startAngle",void 0),W([t.Property(0)],n.prototype,"endAngle",void 0),W([t.Property("100%")],n.prototype,"radius",void 0),W([t.Property("100%")],n.prototype,"innerRadius",void 0),W([t.Property(1)],n.prototype,"segmentCount",void 0),W([t.Property(null)],n.prototype,"gapWidth",void 0),W([t.Property("")],n.prototype,"segmentColor",void 0),W([t.Property("Auto")],n.prototype,"cornerRadius",void 0),W([t.Property(null)],n.prototype,"height",void 0),W([t.Property(null)],n.prototype,"width",void 0),W([t.Property(!1)],n.prototype,"isIndeterminate",void 0),W([t.Property(!1)],n.prototype,"isActive",void 0),W([t.Property(!1)],n.prototype,"isGradient",void 0),W([t.Property(!1)],n.prototype,"isStriped",void 0),W([t.Property("Auto")],n.prototype,"role",void 0),W([t.Property(!1)],n.prototype,"enableRtl",void 0),W([t.Property(!0)],n.prototype,"labelOnTrack",void 0),W([t.Property(null)],n.prototype,"trackColor",void 0),W([t.Property(null)],n.prototype,"progressColor",void 0),W([t.Property(0)],n.prototype,"trackThickness",void 0),W([t.Property(0)],n.prototype,"progressThickness",void 0),W([t.Property(!1)],n.prototype,"enablePieProgress",void 0),W([t.Property("Fabric")],n.prototype,"theme",void 0),W([t.Property(!1)],n.prototype,"showProgressValue",void 0),W([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),W([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},k)],n.prototype,"labelStyle",void 0),W([t.Complex({},w)],n.prototype,"margin",void 0),W([t.Complex({},T)],n.prototype,"animation",void 0),W([t.Event()],n.prototype,"load",void 0),W([t.Event()],n.prototype,"textRender",void 0),W([t.Event()],n.prototype,"loaded",void 0),W([t.Event()],n.prototype,"valueChanged",void 0),W([t.Event()],n.prototype,"progressCompleted",void 0),W([t.Event()],n.prototype,"animationComplete",void 0),W([t.Event()],n.prototype,"mouseClick",void 0),W([t.Event()],n.prototype,"mouseMove",void 0),W([t.Event()],n.prototype,"mouseUp",void 0),W([t.Event()],n.prototype,"mouseDown",void 0),W([t.Event()],n.prototype,"mouseLeave",void 0),W([t.Collection([{}],x)],n.prototype,"annotations",void 0),W([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=W([t.NotifyPropertyChanges],n)}(t.Component);return D.Inject(I),e.ProgressBar=D,e.Margin=w,e.Font=k,e.Animation=T,e.ProgressAnnotationSettings=x,e.RangeColor=E,e.ProgressAnnotation=I,e.Rect=y,e.Size=f,e.Pos=v,e.RectOption=b,e.ColorValue=R,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=s,e.TextOption=P,e.degreeToLocation=a,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=h,e.annotationRender="annotationRender",e.getElement=d,e.removeElement=u,e.ProgressLocation=S,e.ProgressAnimation=_,e}({},ej.base,ej.svgbase),this.ejs=ej;
this.ej=this.ej||{},this.ej.progressbar=function(e,t,r){"use strict";function n(e){return"#"+i(e.r)+i(e.g)+i(e.b)}function i(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function o(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new R(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new R(255,255,255)}function s(e){e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"}));var r=document.getElementById("chartmeasuretext");r.style.color=e,e=window.getComputedStyle(r).color,t.remove(r);var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(e);return n(new R(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function a(e,t,r,n){var i=(n-90)*(Math.PI/180);return{x:e+r*Math.cos(i),y:t+r*Math.sin(i)}}function l(e,t,r,n,i,o,s){var l=a(e,t,r,n),c=a(e,t,r,i),p="0",h=o?"0":"1";p=o?(n>=i?n:n+360)-i<=180?"0":"1":(i>=n?i:i+360)-n<=180?"0":"1";return s?"M "+e+" "+t+" L "+l.x+" "+l.y+" A "+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y+" Z":"M"+l.x+" "+l.y+"A"+r+" "+r+" 0 "+p+" "+h+" "+c.x+" "+c.y}function c(e,t){return null!==e&&void 0!==e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function p(e,t){for(var r=Object.keys(e),n=0;n<r.length;n++)t.setAttribute(r[n],e[r[n]]);return t}function h(e,t,r,n,i){var o=i?r:-r,s=t+(i?-r:r);return o*Math.cos(e/n*(Math.PI/2))+s}function d(e){return document.getElementById(e)}function u(e){if(!e)return null;var r="string"==typeof e?d(e):e;r&&t.remove(r)}function g(e){var t;switch(e){case"Material":t={linearTrackColor:"#E3165B",linearProgressColor:"#E3165B",circularTrackColor:"#E3165B",circularProgressColor:"#E3165B",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Roboto",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Roboto",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:.26,bufferOpacity:.4,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:4,linearProgressThickness:4,circularTrackThickness:4,circularProgressThickness:4,success:"#4caf50",danger:"#ff6652",warning:"#ff9800",info:"#03a9f4"};break;case"Bootstrap":t={linearTrackColor:"#EEEEEE",linearProgressColor:"#317ab9",circularTrackColor:"#EEEEEE",circularProgressColor:"#317ab9",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:20,linearProgressThickness:20,circularTrackThickness:6,circularProgressThickness:6,success:"#48b14c",danger:"#d44f4f",warning:"#fac168",info:"#2aaac0"};break;case"Bootstrap4":t={linearTrackColor:"#E9ECEF",linearProgressColor:"#007bff",circularTrackColor:"#E9ECEF",circularProgressColor:"#007bff",backgroundColor:"transparent",fontColor:"#000000",linearFontFamily:"Helvetica",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Helvetica",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.44,linearGapWidth:4,circularGapWidth:4,linearTrackThickness:16,linearProgressThickness:16,circularTrackThickness:6,circularProgressThickness:6,success:"#28a745",danger:"#dc3545",warning:"#ffc107",info:"#17a2b8"};break;case"HighContrast":t={linearTrackColor:"#BFBFBF",linearProgressColor:"#FFD939",circularTrackColor:"#BFBFBF",circularProgressColor:"#FFD939",backgroundColor:"transparent",fontColor:"#FFFFFF",linearFontFamily:"Segoe UI",linearFontSize:"12",linearFontStyle:"Regular",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.35,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#2bc700",danger:"#ff6161",warning:"#ff7d1a",info:"#66b0ff"};break;default:t={linearTrackColor:"#EAEAEA",linearProgressColor:"#0078D6",circularTrackColor:"#E6E6E6",circularProgressColor:"#0078D6",backgroundColor:"transparent",fontColor:"#333333",linearFontFamily:"Segoe UI",linearFontStyle:"Regular",linearFontSize:"12",circularFontFamily:"Segoe UI",circularFontStyle:"Normal",circularFontSize:"20",progressOpacity:1,trackOpacity:1,bufferOpacity:.3,linearGapWidth:2,circularGapWidth:4,linearTrackThickness:2,linearProgressThickness:2,circularTrackThickness:4,circularProgressThickness:4,success:"#166600",danger:"#b30900",warning:"#944000",info:"#0056b3"}}return t}var m=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),y=function(){function e(e,t,r,n){this.x=e,this.y=t,this.height=r,this.width=n}return e}(),f=function(){function e(e,t){this.height=e,this.width=t}return e}(),v=function(){function e(e,t){this.x=e,this.y=t}return e}(),b=function(e){function t(t,r,n,i,o,s,a,l,c,p){var h=e.call(this,t,r,n,i,o,p)||this;return h.y=s.y,h.x=s.x,h.height=s.height,h.width=s.width,h.rx=a||0,h.ry=l||0,h.transform=c||"",h.stroke=0!==n&&""!==h.stroke?i:"transparent",h}return m(t,e),t}(r.PathOption),R=function(){function e(e,t,r){this.r=e,this.g=t,this.b=r}return e}(),P=function(){function e(e,t,r,n,i,o,s,a,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=n,this["font-weight"]=i,this["text-anchor"]=o,this.fill=s,this.x=a,this.y=l,this.width=c||0,this.height=p||0}return e}(),S=function(){function e(e,t){this.x=e,this.y=t}return e}(),C=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),A=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(10)],r.prototype,"top",void 0),A([t.Property(10)],r.prototype,"bottom",void 0),A([t.Property(10)],r.prototype,"left",void 0),A([t.Property(10)],r.prototype,"right",void 0),r}(t.ChildProperty),k=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("Normal")],r.prototype,"fontStyle",void 0),A([t.Property("16px")],r.prototype,"size",void 0),A([t.Property("Normal")],r.prototype,"fontWeight",void 0),A([t.Property("")],r.prototype,"color",void 0),A([t.Property("Segoe UI")],r.prototype,"fontFamily",void 0),A([t.Property(1)],r.prototype,"opacity",void 0),A([t.Property("Far")],r.prototype,"textAlignment",void 0),A([t.Property("")],r.prototype,"text",void 0),r}(t.ChildProperty),T=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(!1)],r.prototype,"enable",void 0),A([t.Property(2e3)],r.prototype,"duration",void 0),A([t.Property(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),x=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property(null)],r.prototype,"content",void 0),A([t.Property(0)],r.prototype,"annotationAngle",void 0),A([t.Property("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return C(r,e),A([t.Property("")],r.prototype,"color",void 0),A([t.Property(null)],r.prototype,"start",void 0),A([t.Property(null)],r.prototype,"end",void 0),r}(t.ChildProperty),L="http://www.w3.org/2000/svg",O=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){return this.annotation=e,t.createElement("div",{id:this.control.element.id+"Annotation"+r,styles:"position:absolute;z-index:1",innerHTML:e.content})},e.prototype.processAnnotation=function(e,t,r){var n=new S(0,0),i=this.render(e,t);i?this.setElementStyle(n,i,r):this.control.redraw&&(u(i.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var n={cancel:!1,name:"annotationRender",content:t,location:e};if(this.control.trigger("annotationRender",n),!n.cancel){var i=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);n.content.style.left=i.left+"px",n.content.style.top=i.top+"px",n.content.style.transform="translate(-50%, -50%)",n.content.setAttribute("aria-label","Annotation"),r.appendChild(n.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,n,i=parseFloat(e);if(0===i&&0===t){var o=this.control.progressRect;n=o.x+o.width/2,r=o.y+o.height/2}else{t-=90,t*=Math.PI/180;var s=Math.round(this.control.progressSize.width/2.25),a=Math.round(this.control.progressSize.height/2.25);n=i*Math.cos(t)+s,r=i*Math.sin(t)+a}return{top:r,left:n}},e}(),_=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),d=l.getAttribute("x"),u=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(d,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(d,10)-y;l.style.visibility="hidden",a.animate(l,{duration:c,delay:n,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,parseInt(d,10),parseInt(p,10),!0),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("x",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!0),l.setAttribute("x",g.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(g=s.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),u=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",u.toString()),l.setAttribute("width",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",d.toString()),s.doLinearAnimation(e,r,n,i,o)):l.setAttribute("x",f.toString()):(l.setAttribute("width",p),r.isActive&&s.doLinearAnimation(e,r,n,i,o)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,n,i,o){var s=this,a=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),d=0,u=p?-parseInt(p,10):-r,g=i.progressRect.x+i.progressRect.width+(p?parseInt(p,10):r),m=i.enableProgressSegments?3500:2500;a.animate(o,{duration:m,delay:0,progress:function(e){i.enableRtl&&"Round4px"!==i.cornerRadius?(d=h(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString())):(d=h(e.timeStamp,u,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(d,r,n)):l.setAttribute("x",d.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",u.toString()),i.destroyIndeterminate||s.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n){var i=this,o=new t.Animation({}),s=1e3/r.animation.duration;o.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-s:s,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||i.doStripedAnimation(e,r,n)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m=this,y=new t.Animation({}),f=s,v=a.startAngle,b=n+c/2,R=0,P=0,S=a.isActive?3e3:a.animation.duration;v+="Round"===a.cornerRadius&&359.99!==o&&0!==o?a.enableRtl?.45*c:-.45*c:0,o+="Round"===a.cornerRadius&&359.99!==o&&0!==o?.45*c:0,i+="Round"===a.cornerRadius&&359.99!==o&&0!==o?a.enableRtl?-.45*c:.45*c:0;var C=t.isNullOrUndefined(d)?v:d,A=t.isNullOrUndefined(d)?o:o-u;f.setAttribute("visibility","Hidden"),y.animate(f,{duration:S,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(f.setAttribute("visibility","visible"),a.isActive?(R=m.activeAnimate(t.timeStamp/t.duration,C,A,a.enableRtl),P=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",P.toString()),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))):(R=h(t.timeStamp,C,A,t.duration,a.enableRtl),f.setAttribute("d",l(e,r,b,v,R%360,a.enableRtl,!0))))},end:function(){a.cancelResize=!1,f.setAttribute("visibility",""),f.setAttribute("d",l(e,r,b,v,i,a.enableRtl,!0)),a.isActive&&m.doCircularAnimation(e,r,n,i,o,s,a,c,p,d,u,g),a.trigger("animationComplete",{value:a.value,trackColor:a.trackColor,progressColor:a.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,n,i,o,s,a,c,p){var h=this,d=new t.Animation({}),u=a+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;d.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,s,u,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||h.doCircularIndeterminate(e,r,n,i,o,s,a,c,p)}})},e.prototype.doLabelAnimation=function(e,r,n,i,o,s){var a,l,c=new t.Animation({}),p=new t.Animation({}),d=e.innerHTML,u=0,g=0,m=0,y=i.labelStyle.text,f=i.labelStyle.textAlignment,v=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===i.type&&(a=i.enableRtl?i.progressRect.x+i.progressRect.width+s/2:r-s/2,a=a<=0?0:a,l=i.enableRtl?a-v:v-a),c.animate(e,{duration:i.animation.duration,delay:o,progress:function(t){i.cancelResize=!0,"Linear"===i.type?t.timeStamp>=t.delay&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt((u/i.progressRect.width*100).toString(),10),e.innerHTML=m.toString()+"%","Far"!==f&&"Center"!==f||(g=h(t.timeStamp,a,l,t.duration,i.enableRtl),e.setAttribute("x",g.toString()))):"Circular"===i.type&&""===y&&(e.setAttribute("visibility","visible"),u=h(t.timeStamp,r,n,t.duration,!1),m=parseInt(((u-r)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=d,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),u=h(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",u.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,s,a,l,c,p=new t.Animation({}),d=0,u=r.annotations.length>0,g=r.startAngle,m=r.totalAngle;u&&r.progressAnnotationModule&&(s=document.getElementById(r.element.id+"Annotation0").children[0])&&s.children[0]&&"SPAN"===s.children[0].tagName&&(o=s.children[0]),a=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=a=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:a,r.annotateEnd=g+a,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum||r.argsData.value>r.maximum?0:Math.round(c);var y=t.isNullOrUndefined(n)?g:n,f=t.isNullOrUndefined(n)?a:a-i;r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":p.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,u&&o&&(d=h(e.timeStamp,y,f,e.duration,!1),l=parseInt(((Math.round(d)-g)/m*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,o.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,n){var i=1-Math.pow(1-e,3);return t+(n?-i*r:i*r)},e}(),z=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),I=function(e){function r(t,r){var n=e.call(this,t)||this;return n.animation=new _,n.progress=t,n.annotations=r,n}return z(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var n=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=n||t.createElement("div",{id:this.progress.element.id+"Annotation_collections",styles:"position:absolute"}),this.annotations.map(function(e,t){r.processAnnotation(e,t,r.parentElement)}),n||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(O),M=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,n,i,o,s){var a=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*o:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*o:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=s/e.segmentCount,h=s-(e.segmentCount-1)*c;h=(h-("Round"===e.cornerRadius?e.segmentCount*(.9*o):0))/e.segmentCount;for(var d,u,g,m,y="Round"===e.cornerRadius?c+.9*o:c,f=e.renderer.createGroup({id:e.element.id+t}),v=Math.ceil(n/p),b=0,R="Round"===e.cornerRadius?n-.9*o:n,P=e.progressThickness||e.themeStyle.linearProgressThickness,S=0;S<v;S++)d=R<h?R:h,b<e.segmentColor.length?(u=e.segmentColor[b],b++):(b=0,u=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",P,u,i,"0",this.getLinearSegmentPath(a,l,d,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),a+=e.enableRtl?-h-y:h+y,R=(R-=h+y)<0?0:R;return f},e.prototype.getLinearSegmentPath=function(e,t,r,n){return"M "+e+" "+t+" L"+(e+(n?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,n,i,o,s,a,c,p,h){var d=e.startAngle,u=this.widthToAngle(e.minimum,e.maximum,s,e.totalAngle);u-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,h,.45*c,p):0;var g=h-(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(359.99===e.totalAngle?e.segmentCount:e.segmentCount-1)*c:0))/e.segmentCount;var m=this.widthToAngle(0,h,h/e.segmentCount,p);m-="Round"===e.cornerRadius&&359.99===e.totalAngle?this.widthToAngle(0,h,.45*c,p):0;var y=this.widthToAngle(0,h,g,p),f=this.widthToAngle(0,h,e.gapWidth||e.themeStyle.circularGapWidth,p);f+="Round"===e.cornerRadius?this.widthToAngle(0,h,.9*c,p):0;for(var v,b,R,P,S,C=e.renderer.createGroup({id:e.element.id+t}),A=Math.floor(u/m),w=Math.ceil((u-f*A)/y),k=(d+(e.enableRtl?-y:y))%360,T=0,x=e.progressThickness||e.themeStyle.circularProgressThickness,E=0;E<w;E++)v=l(n,i,o,d,R=e.enableRtl?e.startAngle-u>k?e.startAngle-u:k:e.startAngle+u<k?e.startAngle+u:k,e.enableRtl),T<e.segmentColor.length?(P=e.segmentColor[T],T++):(T=0,P=e.segmentColor[T],T++),S=new r.PathOption(e.element.id+t+E,"none",x,P,a,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),d=R+(e.enableRtl?-f:f),k+=e.enableRtl?-y-f:y+f;return C},e.prototype.widthToAngle=function(e,t,r,n){return(r-e)/(t-e)*n},e.prototype.createLinearRange=function(e,t){for(var n,i,o,s,a,l,c,p,h,d,u=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),g=t.progressRect.y+t.progressRect.height/2,m=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),y=t.rangeColors,f=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,b=t.minimum,R=t.value,P=t.enableRtl?.1:-.1,S=0;S<y.length;S++)i=y[S].start>=b&&y[S].start<=R&&y[S].end>=b&&y[S].end<=R,a=e*t.calculateProgressRange(y[S].start,b,R),l=e*t.calculateProgressRange(y[S].end,b,R),c=u+(t.enableRtl?-a:a),p=u+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+P:c:u,p=i?p:u,h=t.isGradient?"url(#lineRangeGrad_"+S+")":y[S].color,s=new r.PathOption(t.element.id+"_LinearRange_"+S,"none",f,h,v,"0","M "+c+" "+g+" L"+p+" "+g),o=t.renderer.drawPath(s),m.appendChild(o),t.isGradient&&(d=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,d,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,s,a,c,p,h,d,u,g=i.renderer.createGroup({id:i.element.id+"_CircularRangeGroup"}),m=i.rangeColors,y=i.progressThickness||i.themeStyle.linearProgressThickness,f=i.themeStyle.progressOpacity,v=i.minimum,b=i.value,R=i.startAngle,P=this.widthToAngle(i.minimum,i.maximum,i.value,i.totalAngle),S=0;S<m.length;S++)p=m[S].start>=v&&m[S].start<=b&&m[S].end>=v&&m[S].end<=b,s=this.widthToAngle(v,b,m[S].start,P),a=this.widthToAngle(v,b,m[S].end,P),s=p?(R+(i.enableRtl?-s:s))%360:R,a=p?(R+(i.enableRtl?-a:a))%360:R,d=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,h=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,d,f,"0",l(e,t,n,s,a,i.enableRtl)),c=i.renderer.drawPath(h),g.appendChild(c),i.isGradient&&(u=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,u,s,a,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var s=[],a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()};s[0]={color:t,colorStop:"50%"},s[1]={color:r,colorStop:"100%"};var l=o.renderer.drawGradient("linearGradient",a,s);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p=[],h=a(s,l,o,n),d=a(s,l,o,i),u={id:"circleRangeGrad_"+e,x1:h.x.toString(),x2:d.x.toString(),y1:h.y.toString(),y2:d.y.toString()};p[0]={color:t,colorStop:"50%"},p[1]={color:r,colorStop:"100%"};var g=c.renderer.drawGradient("linearGradient",u,p);return g.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),g},e}(),F=function(){function e(e){this.segment=new M,this.animation=new _,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var o=n.trackThickness||n.themeStyle.linearTrackThickness,s=n.argsData.trackColor||n.themeStyle.linearTrackColor;"Round4px"===n.cornerRadius?n.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",s,o,!0,0,n):(t=new r.PathOption(n.element.id+"_Lineartrack",s,0,"none",n.themeStyle.trackOpacity,"0",this.cornerRadius(n.progressRect.x,n.progressRect.y,n.progressRect.width,o,4,"")),e=n.renderer.drawPath(t)):(t=new r.PathOption(n.element.id+"_Lineartrack","none",o,s,n.themeStyle.trackOpacity,"0",n.getPathLine(n.progressRect.x,n.progressRect.width,o)),e=n.renderer.drawPath(t),n.trackWidth=e.getTotalLength(),"Round"!==n.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),n.segmentCount>1&&!this.isRange&&!n.enableProgressSegments&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,o),e.setAttribute("stroke-dasharray",n.segmentSize))),i.appendChild(e),n.svgObject.appendChild(i)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d=this.progress,u=d.value===d.maximum,g=d.calculateProgressRange(d.argsData.value);o=d.progressRect.width*(d.isIndeterminate&&!d.enableProgressSegments?1:g),l=e?r.getElement(d.element.id+"_LinearProgressGroup"):d.renderer.createGroup({id:d.element.id+"_LinearProgressGroup"});var m=d.progressThickness||d.themeStyle.linearProgressThickness,y=d.isStriped?"url(#"+d.element.id+"_LinearStriped)":this.checkingLinearProgressColor();n="Round4px"===d.cornerRadius?new r.PathOption(d.element.id+"_Linearprogress",y,0,"none",d.themeStyle.progressOpacity,"0",this.cornerRadius(d.progressRect.x,d.progressRect.y,o,m,4,u||d.isIndeterminate?"":"start")):new r.PathOption(d.element.id+"_Linearprogress","none",m,y,d.themeStyle.progressOpacity,"0",d.getPathLine(d.progressRect.x,o,m)),d.progressWidth=d.renderer.drawPath(n).getTotalLength(),d.segmentSize=d.enableProgressSegments?d.calculateSegmentSize(d.progressWidth,m):d.segmentSize,null===d.secondaryProgress||d.isIndeterminate||this.renderLinearBuffer(d),null!==d.argsData.value&&("Round4px"===d.cornerRadius?i=d.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",y,m,!1,o,d,d.themeStyle.progressOpacity):d.renderer.drawPath(n):0===d.segmentColor.length||d.isIndeterminate||this.isRange?this.isRange&&!d.isIndeterminate?i=this.segment.createLinearRange(o,d):(e?((i=r.getElement(d.element.id+"_Linearprogress")).setAttribute("d",d.getPathLine(d.progressRect.x,o,m)),i.setAttribute("stroke",y)):i=d.renderer.drawPath(n),d.segmentCount>1&&i.setAttribute("stroke-dasharray",d.segmentSize),"Round"===d.cornerRadius&&g&&i.setAttribute("stroke-linecap","round")):(p=d.enableProgressSegments?d.progressWidth:d.trackWidth,i=this.segment.createLinearSegment(d,"_LinearProgressSegment",o,d.themeStyle.progressOpacity,m,p)),l.appendChild(i),d.isStriped&&!d.isIndeterminate&&(h=this.checkingLinearProgressColor(),this.renderLinearStriped(h,l,d)),!d.isActive||d.isIndeterminate||d.isStriped||this.renderActiveState(l,g,o,m,e),!d.animation.enable||d.isIndeterminate||d.isActive||d.isStriped||(c=null!==d.secondaryProgress?d.animation.delay+(this.bufferWidth-o):d.animation.delay,this.delay=c,s=d.createClipPath(d.clipPath,g,null,e,m,!1,"Round4px"===d.cornerRadius&&u),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearAnimation(s,d,c,e?t:0)),d.isIndeterminate&&(a=d.createClipPath(d.clipPath,d.enableProgressSegments?1:g,null,e,m,d.enableProgressSegments),l.appendChild(d.clipPath),i.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearIndeterminate(d.enableProgressSegments?i:a,o,m,d,a)),d.svgObject.appendChild(l))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a=e.secondaryProgress===e.maximum,l=e.calculateProgressRange(e.secondaryProgress);this.bufferWidth=i=e.progressRect.width*l;var c=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),p=e.progressThickness||e.themeStyle.linearProgressThickness,h=this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",h,p,!1,i,e,e.themeStyle.bufferOpacity):(o=new r.PathOption(e.element.id+"_Linearbuffer",h,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,i,p,4,a?"":"start")),t=e.renderer.drawPath(o)):(o=new r.PathOption(e.element.id+"_Linearbuffer","none",p,h,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,i,p)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(o),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",i,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,s))),c.appendChild(t),e.animation.enable&&(n=e.createClipPath(e.bufferClipPath,l,null,!1,p,!1,"Round4px"===e.cornerRadius&&a),c.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(n,e,e.animation.delay,0)),e.svgObject.appendChild(c)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,u=this.progress,g=u.labelStyle.textAlignment,m=u.labelStyle.text,y=this.checkingLinearProgressColor(),f=u.progressRect.width*u.calculateProgressRange(u.value),v=u.renderer.createGroup({id:u.element.id+"_LinearLabelGroup"});document.getElementById(v.id)&&document.getElementById(v.id).remove();var b=(u.value-u.minimum)/(u.maximum-u.minimum)*100,R=u.value<u.minimum||u.value>u.maximum?0:Math.round(b),S=o(s(y)),C=Math.round((299*S.r+587*S.g+114*S.b)/1e3),A={cancel:!1,text:m||String(R)+"%",color:u.labelStyle.color};u.trigger("textRender",A),A.cancel||(i=r.measureText(A.text,u.labelStyle),l=u.enableRtl?u.progressRect.x+u.progressRect.width-i.width/2:u.progressRect.x+i.width/2,u.labelOnTrack?"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?(p=u.enableRtl?u.progressRect.x+u.progressRect.width-f/2:u.progressRect.x+f/2,t=(u.enableRtl?p<=l:p>=l)?p:l):(c=u.enableRtl?u.progressRect.x+u.progressRect.width-f+i.width/2:u.progressRect.x+f-i.width/2,c+=u.enableRtl?5:-5,t=(u.enableRtl?c<=l:c>=l)?c:l):"Near"===g?t=l+(u.enableRtl?-5:5):"Center"===g?t=(u.progressRect.x+u.progressRect.width)/2:(t=u.enableRtl?u.progressRect.x+i.width/2:u.progressRect.x+u.progressRect.width-i.width/2,t+=u.enableRtl?5:-5),n="Round4px"===this.progress.cornerRadius?u.progressRect.y+d/2+i.height/4:u.progressRect.y+u.progressRect.height/2+i.height/4,a=new P(u.element.id+"_linearLabel",u.labelStyle.size||u.themeStyle.linearFontSize,u.labelStyle.fontStyle||u.themeStyle.linearFontStyle,u.labelStyle.fontFamily||u.themeStyle.linearFontFamily,u.labelStyle.fontWeight,"middle",A.color||(C>=128?"black":"white"),t,n),e=u.renderer.createText(a,A.text),v.appendChild(e),u.animation.enable&&!u.isIndeterminate&&(h=u.renderer.createClipPath({id:u.element.id+"_clippathLabel"}),u.createClipPath(h,1,null,!1,u.progressThickness||u.themeStyle.linearProgressThickness,!0),v.appendChild(h),e.setAttribute("style","clip-path:url(#"+u.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,u.previousWidth?u.previousWidth:0,f,u,this.delay,i.width)),u.svgObject.appendChild(v),u.previousWidth=f)},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,l,.5):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,n,i,4,c?"":"start")),s=l.renderer.drawPath(a)):(o?(s=r.getElement(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,n,i)):(a=new r.PathOption(l.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,n,i)),s=l.renderer.drawPath(a)),l.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,o,i,!1);s.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(s),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,s)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(L,"linearGradient"),s=[];s=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],o=p({id:r.element.id+"_LinearStriped",x1:r.progressRect.x.toString(),x2:(r.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},o);for(var a=0;a<s.length;a++)n=document.createElementNS(L,"stop"),n=p(s[a],n),o.appendChild(n);i.appendChild(o),t.appendChild(i),r.animation.enable&&this.animation.doStripedAnimation(o,r,0)},e.prototype.checkingLinearProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.linearProgressColor}return e},e.prototype.cornerRadius=function(e,t,r,n,i,o){var s="",a=r,l=i;switch(o){case"start":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z";break;case"end":s="M"+e+","+t+" h"+(a-l)+" a"+l+","+l+" 0 0 1 "+l+","+l+" v"+(n-2*l)+" a"+l+","+l+" 0 0 1 "+-l+","+l+" h"+(i-a)+" v"+-n+" z";break;case"none":s="M"+e+","+t+" h"+r+" v"+n+" h"+-r+" v"+-n+" z";break;default:s="M"+e+","+t+" h"+(r-i)+" a"+i+","+i+" 0 0 1 "+i+","+i+" v"+(n-2*i)+" a"+i+","+i+" 0 0 1 "+-i+","+i+" h"+(i-r)+" a"+i+","+i+" 0 0 1 "+-i+","+-i+" v"+(2*i-n)+" a"+i+","+i+" 0 0 1 "+i+","+-i+" z"}return s},e.prototype.createRoundCornerSegment=function(e,t,n,i,o,s,a){for(var l,c,p,h,d=s.progressRect.x,u=s.progressRect.y,g=s.progressRect.width,m=s.gapWidth||s.themeStyle.linearGapWidth,y=(g-(s.segmentCount-1)*m)/s.segmentCount,f=s.renderer.createGroup({id:s.element.id+e+"SegmentGroup"}),v=1;v<=s.segmentCount;v++)if(c=1===v||v===s.segmentCount?1===v?"start":"end":"none",i)l=new r.PathOption(s.element.id+e+v,t,0,"none",s.themeStyle.trackOpacity,"0",this.cornerRadius(d,u,y,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m;else if(p=o<y?o:y,l=new r.PathOption(s.element.id+e+v,t,0,"none",a,"0",this.cornerRadius(d,u,p,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),d+=y+m,(o-=y+m)<=0)break;return f},e}(),G=function(){function e(e){this.segment=new M,this.animation=new _,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,n=this.progress,i=n.renderer.createGroup({id:n.element.id+"_CircularTrackGroup"}),o=n.startAngle;n.totalAngle=(n.endAngle-n.startAngle)%360,n.totalAngle=n.totalAngle<=0?360+n.totalAngle:n.totalAngle,n.totalAngle-=360===n.totalAngle?.01:0,this.trackEndAngle=t=(n.startAngle+(n.enableRtl?-n.totalAngle:+n.totalAngle))%360,this.centerX=n.progressRect.x+n.progressRect.width/2,this.centerY=n.progressRect.y+n.progressRect.height/2,this.maxThickness=Math.max(n.trackThickness,n.progressThickness)||Math.max(n.themeStyle.circularProgressThickness,n.themeStyle.circularTrackThickness),this.availableSize=Math.min(n.progressRect.height,n.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(n.radius,this.availableSize))?0:e;var s=n.argsData.trackColor||n.themeStyle.circularTrackColor,a=n.enablePieProgress?n.argsData.trackColor||n.themeStyle.circularTrackColor:"none",p=n.enablePieProgress?0:n.trackThickness||n.themeStyle.circularTrackThickness,h=l(this.centerX,this.centerY,e,o,t,n.enableRtl,n.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var d=new r.PathOption(n.element.id+"_Circulartrack",a,p,s,n.themeStyle.trackOpacity,"0",h),u=n.renderer.drawPath(d);n.trackWidth=u.getTotalLength(),n.segmentCount>1&&!n.enableProgressSegments&&!n.enablePieProgress&&!this.isRange&&(n.segmentSize=n.calculateSegmentSize(n.trackWidth,p),u.setAttribute("stroke-dasharray",n.segmentSize)),"Round"!==n.cornerRadius||n.enablePieProgress||this.isRange||u.setAttribute("stroke-linecap","round"),i.appendChild(u),n.svgObject.appendChild(i)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y=this.progress,f=y.startAngle;g=n?r.getElement(y.element.id+"_CircularProgressGroup"):y.renderer.createGroup({id:y.element.id+"_CircularProgressGroup"}),s=null===(s=c(y.innerRadius,this.availableSize))?0:s,y.previousTotalEnd=h=y.calculateProgressRange(y.argsData.value);var v=(y.startAngle+(y.enableRtl?-h:h))%360;y.previousEndAngle=i=y.isIndeterminate&&!y.enableProgressSegments?(y.startAngle+(y.enableRtl?-y.totalAngle:y.totalAngle))%360:v,p=(p=(h-y.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0;var b=l(this.centerX,this.centerY,s,f,i,y.enableRtl,y.enablePieProgress),R=this.checkingCircularProgressColor(),P=y.enablePieProgress?R:"none",S=y.progressThickness||y.themeStyle.circularProgressThickness,C=y.enablePieProgress?0:S,A=new r.PathOption(y.element.id+"_Circularprogress",P,C,R,y.themeStyle.progressOpacity,"0",b);y.progressWidth=y.renderer.drawPath(A).getTotalLength(),y.segmentSize=this.validateSegmentSize(y,S),null===y.secondaryProgress||y.isIndeterminate||this.renderCircularBuffer(y,s,p),null!==y.argsData.value&&(0===y.segmentColor.length||y.isIndeterminate||y.enablePieProgress?this.isRange&&!y.isIndeterminate?d=this.segment.createCircularRange(this.centerX,this.centerY,s,y):(n?(a=(d=r.getElement(y.element.id+"_Circularprogress")).getAttribute("d"),d.setAttribute("stroke",R),d.setAttribute("d",b)):d=y.renderer.drawPath(A),y.segmentCount>1&&!y.enablePieProgress&&d.setAttribute("stroke-dasharray",y.segmentSize),"Round"===y.cornerRadius&&f!==i&&d.setAttribute("stroke-linecap","round")):(o=y.enableProgressSegments?p:y.totalAngle,m=y.enableProgressSegments?y.progressWidth:y.trackWidth,d=this.segment.createCircularSegment(y,"_CircularProgressSegment",this.centerX,this.centerY,s,y.argsData.value,y.themeStyle.progressOpacity,S,o,m)),g.appendChild(d),!y.isActive||y.isIndeterminate||y.enablePieProgress||this.renderActiveState(g,s,C,b,v,h,n),(y.animation.enable||y.isIndeterminate)&&(this.delay=null!==y.secondaryProgress?300:y.animation.delay,u=y.createClipPath(y.clipPath,null,n?a:"",n),g.appendChild(y.clipPath),!y.animation.enable||y.isIndeterminate||y.isActive||(d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,v,h,u,y,S,this.delay,n?e:null,n?t:null)),y.isIndeterminate&&(y.enableProgressSegments&&u.setAttribute("d",l(this.centerX,this.centerY,s+S/2,y.startAngle,this.trackEndAngle,y.enableRtl,!0)),d.setAttribute("style","clip-path:url(#"+y.element.id+"_clippath)"),this.animation.doCircularIndeterminate(y.enableProgressSegments?d:u,y,f,v,this.centerX,this.centerY,s,S,u))),y.svgObject.appendChild(g))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress),h=(e.startAngle+(e.enableRtl?-p:p))%360,d=l(this.centerX,this.centerY,t,e.startAngle,h,e.enableRtl,e.enablePieProgress),u=this.checkingCircularProgressColor(),g=e.enablePieProgress?u:"none",m=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,y=new r.PathOption(e.element.id+"_Circularbuffer",g,m,u,e.themeStyle.bufferOpacity,"0",d);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(o=e.renderer.drawPath(y),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&o.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||o.setAttribute("stroke-linecap","round")):(a=e.enableProgressSegments?n:e.totalAngle,s=e.enableProgressSegments?e.progressWidth:e.trackWidth,o=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,m,a,s)),c.appendChild(o),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),o.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,h,p,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s=this.progress,a=s.labelStyle.text,l=s.renderer.createGroup({id:s.element.id+"_CircularLabelGroup"});document.getElementById(l.id)&&document.getElementById(l.id).remove();var c=(s.value-s.minimum)/(s.maximum-s.minimum)*100,p=s.value<s.minimum||s.value>s.maximum?0:Math.round(c),h={cancel:!1,text:a||String(p)+"%",color:s.labelStyle.color};s.trigger("textRender",h),h.cancel||(i=r.measureText(h.text,s.labelStyle),n=this.centerY+i.height/2,o=new P(s.element.id+"_circularLabel",s.labelStyle.size||s.themeStyle.circularFontSize,s.labelStyle.fontStyle||s.themeStyle.circularFontStyle,s.labelStyle.fontFamily||s.themeStyle.circularFontFamily,s.labelStyle.fontWeight,"middle",h.color||s.themeStyle.fontColor,this.centerX,n,s.progressRect.width,s.progressRect.height),t=s.renderer.createText(o,h.text),l.appendChild(t),s.animation.enable&&!s.isIndeterminate&&(e=(s.value-s.minimum)/(s.maximum-s.minimum)*s.totalAngle,e=s.value<s.minimum||s.value>s.maximum?0:e,this.animation.doLabelAnimation(t,s.startAngle,e,s,this.delay)),s.svgObject.appendChild(l))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p=this.progress,h=n+1;a?(l=r.getElement(p.element.id+"_CircularActiveProgress")).setAttribute("d",i):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",h,"#ffffff",.5,"0",i),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var d=p.createClipPath(p.clipPath,null,"",a);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,d,p,h,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===i||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(n=e.trackWidth+(i<0?e.trackWidth*Math.abs(i)/parseInt(e.radius,10):-e.trackWidth*Math.abs(i)/parseInt(e.radius,10)),r=e.calculateSegmentSize(n,t)),r},e.prototype.checkingCircularProgressColor=function(){var e,t=this.progress;switch(t.role){case"Success":e=t.themeStyle.success;break;case"Info":e=t.themeStyle.info;break;case"Warning":e=t.themeStyle.warning;break;case"Danger":e=t.themeStyle.danger;break;default:e=t.argsData.progressColor||t.themeStyle.circularProgressColor}return e},e}(),B=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),W=function(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},D=function(e){function n(t,r){var n=e.call(this,t,r)||this;return n.linear=new F(n),n.circular=new G(n),n.annotateAnimation=new _,n.destroyIndeterminate=!1,n}return B(n,e),n.prototype.getModuleName=function(){return"progressbar"},n.prototype.preRender=function(){this.isBlazor=window.Blazor,this.unWireEvents(),this.initPrivateVariable(),this.wireEvents()},n.prototype.initPrivateVariable=function(){this.progressRect=new y(0,0,0,0),this.progressSize=new f(0,0)},n.prototype.render=function(){var e=this;this.trigger("load",{progressBar:this.isBlazor?{}:this}),this.element.style.display="block",this.element.style.position="relative",this.calculateProgressBarSize(),this.setTheme(),this.createSVG(),this.argsData={value:this.value,progressColor:this.progressColor,trackColor:this.trackColor},this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData,function(){e.controlRendering()}):this.trigger("valueChanged",this.argsData,function(){e.controlRendering()})},n.prototype.controlRendering=function(){this.renderElements(),this.trigger("loaded",{progressBar:this.isBlazor?{}:this}),this.renderComplete(),this.controlRenderedTimeStamp=(new Date).getTime()},n.prototype.calculateProgressBarSize=function(){var e=this.element.clientWidth||this.element.offsetWidth,t=this.element.clientHeight,r="Linear"===this.type?200:120,n="Linear"===this.type?30:120,i=Math.max(this.progressThickness,this.trackThickness);n="Linear"===this.type&&i>n-10?i+10:n,this.progressSize.width=c(this.width,e)||e||r,this.progressSize.height=c(this.height,t)||t||n,this.progressRect.x=this.margin.left,this.progressRect.y=this.margin.top,this.progressRect.width=this.progressSize.width-(this.margin.left+this.margin.right),this.progressRect.height=this.progressSize.height-(this.margin.top+this.margin.bottom)},n.prototype.renderAnnotations=function(){this.createSecElement(),this.renderAnnotation(),this.setSecondaryElementPosition()},n.prototype.renderElements=function(){this.renderTrack(),this.renderProgress(),this.renderLabel(),this.annotations.length>0&&this.renderAnnotations()},n.prototype.createSecElement=function(){var e=document.getElementById(this.element.id+"Secondary_Element");if(e)return e.innerHTML="",void(this.secElement=e);this.secElement=t.createElement("div",{id:this.element.id+"Secondary_Element",styles:"position: absolute"}),this.element.appendChild(this.secElement)},n.prototype.setSecondaryElementPosition=function(){var e=this.secElement,t=this.element.getBoundingClientRect();if(r.getElement(this.svgObject.id)){var n=r.getElement(this.svgObject.id).getBoundingClientRect();e.style.left=Math.max(n.left-t.left,0)+"px",e.style.top=Math.max(n.top-t.top,0)+"px"}},n.prototype.createSVG=function(){this.removeSvg(),this.renderer=new r.SvgRenderer(this.element.id),this.svgObject=this.renderer.createSvg({id:this.element.id+"SVG",width:this.progressSize.width,height:this.progressSize.height,style:"background-color:"+this.themeStyle.backgroundColor})},n.prototype.clipPathElement=function(){this.clipPath=this.renderer.createClipPath({id:this.element.id+"_clippath"}),this.bufferClipPath=this.renderer.createClipPath({id:this.element.id+"_clippathBuffer"})},n.prototype.renderTrack=function(){"Linear"===this.type?this.linear.renderLinearTrack():"Circular"===this.type&&this.circular.renderCircularTrack()},n.prototype.renderProgress=function(){this.clipPathElement(),"Linear"===this.type?this.linear.renderLinearProgress():"Circular"===this.type&&this.circular.renderCircularProgress()},n.prototype.renderLabel=function(){"Linear"===this.type&&this.showProgressValue&&!this.isIndeterminate?this.linear.renderLinearLabel():"Circular"===this.type&&this.showProgressValue&&!this.isIndeterminate&&this.circular.renderCircularLabel(),this.element.appendChild(this.svgObject)},n.prototype.getPathLine=function(e,t,r){var n=this.enableRtl?"Round"===this.cornerRadius?e+this.progressRect.width-.45*r:e+this.progressRect.width:"Round"===this.cornerRadius?e+.45*r:e,i=this.enableRtl?"Round"===this.cornerRadius&&t?n-t+.9*r:n-t:"Round"===this.cornerRadius&&t?n+t-.9*r:n+t;return"M"+n+" "+(this.progressRect.y+this.progressRect.height/2)+"L"+i+" "+(this.progressRect.y+this.progressRect.height/2)},n.prototype.calculateProgressRange=function(e,t,r){var n=t||this.minimum,i=r||this.maximum,o=(e-n)/(i-n)*("Linear"===this.type?1:this.totalAngle);return e<n||e>i?0:o},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&359.99===this.totalAngle?this.segmentCount:this.segmentCount-1,n=359.99===this.totalAngle||"Linear"===this.type?this.segmentCount:this.segmentCount-1,i=this.gapWidth||("Linear"===this.type?this.themeStyle.linearGapWidth:this.themeStyle.circularGapWidth),o=e-r*i;return o=(o-("Round"===this.cornerRadius?n*(.9*t):0))/this.segmentCount,i+="Round"===this.cornerRadius?.9*t:0," "+o+" "+i},n.prototype.createClipPath=function(e,t,n,i,o,s,a){var l,c,p,h,d,u,g=this.progressRect.x,m=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(h=g,u=m*t,h+=s?0:-4,d=this.progressRect.y,u+=!s&&a||this.isIndeterminate?4:0):(h=this.enableRtl&&!s?g+m:g,u=m*t,h+="Round"!==this.cornerRadius||s?0:this.enableRtl?.45*o:-.45*o,d=this.progressRect.y+this.progressRect.height/2-o/2,u+="Round"!==this.cornerRadius||s?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect"+(s?"label":""))).setAttribute("width",u.toString()),this.isActive&&l.setAttribute("x",h.toString())):(c=new b(this.element.id+"_clippathrect"+(s?"label":""),"transparent",1,"transparent",1,new y(h,d,o,u)),l=this.renderer.drawRectangle(c),e.appendChild(l))):i?(l=r.getElement(this.element.id+"_clippathcircle")).setAttribute("d",n):(p=new r.PathOption(this.element.id+"_clippathcircle","transparent",10,"transparent",1,"0",n),l=this.renderer.drawPath(p),e.appendChild(l)),l},n.prototype.setTheme=function(){switch(this.themeStyle=g(this.theme),this.theme){case"Bootstrap":case"Bootstrap4":this.cornerRadius="Auto"===this.cornerRadius?"Linear"===this.type?"Round4px":"Round":this.cornerRadius;break;default:this.cornerRadius="Auto"===this.cornerRadius?"Square":this.cornerRadius}},n.prototype.renderAnnotation=function(){this.progressAnnotationModule&&this.annotations.length>0&&this.progressAnnotationModule.renderAnnotations(this.secElement)},n.prototype.progressResize=function(){var e=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var t={bar:this,name:"resized",currentSize:new f(0,0),previousSize:new f(this.progressSize.width,this.progressSize.height),cancel:!!this.cancelResize};return this.resizeTo&&clearTimeout(this.resizeTo),this.resizeTo=setTimeout(function(){if(e.isDestroyed)return void clearTimeout(e.resizeTo);t.currentSize=e.progressSize,e.trigger("resized",t),null!==e.width&&null!==e.height||t.cancel||(e.secElement?e.secElement.innerHTML="":e.secElement,e.calculateProgressBarSize(),e.createSVG(),e.renderElements())},500),!1},n.prototype.progressMouseClick=function(e){this.mouseEvent("mouseClick",e)},n.prototype.progressMouseDown=function(e){this.mouseEvent("mouseDown",e)},n.prototype.progressMouseMove=function(e){this.mouseEvent("mouseMove",e)},n.prototype.progressMouseUp=function(e){this.mouseEvent("mouseUp",e)},n.prototype.progressMouseLeave=function(e){this.mouseEvent("mouseLeave",e)},n.prototype.mouseEvent=function(e,t){var r=t.target;this.trigger(e,{target:r.id})},n.prototype.unWireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.remove(this.element,"click",this.progressMouseClick),t.EventHandler.remove(this.element,e,this.progressMouseDown),t.EventHandler.remove(this.element,r,this.progressMouseMove),t.EventHandler.remove(this.element,n,this.progressMouseUp),t.EventHandler.remove(this.element,i,this.progressMouseLeave),window.removeEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.wireEvents=function(){var e=t.Browser.touchStartEvent,r=t.Browser.touchMoveEvent,n=t.Browser.touchEndEvent,i=t.Browser.isPointer?"pointerleave":"mouseleave";t.EventHandler.add(this.element,"click",this.progressMouseClick,this),t.EventHandler.add(this.element,e,this.progressMouseDown,this),t.EventHandler.add(this.element,r,this.progressMouseMove,this),t.EventHandler.add(this.element,n,this.progressMouseUp,this),t.EventHandler.add(this.element,i,this.progressMouseLeave,this),this.resizeBounds=this.progressResize.bind(this),window.addEventListener(t.Browser.isTouch&&"orientation"in window&&"onorientationchange"in window?"orientationchange":"resize",this.resizeBounds)},n.prototype.removeSvg=function(){var e=document.getElementById(this.element.id+"SVG");e&&t.remove(e)},n.prototype.onPropertyChanged=function(e,r){for(var n=0,i=Object.keys(e);n<i.length;n++)switch(i[n]){case"annotations":this.secElement.innerHTML="",this.renderAnnotation();break;case"value":this.cancelResize=!!this.animation.enable,this.argsData={value:this.value,progressColor:this.argsData.progressColor,trackColor:this.argsData.trackColor},this.argsData.value<r.value&&this.animation.enable&&(this.argsData.value=r.value),this.argsData.value===this.maximum?this.trigger("progressCompleted",this.argsData):this.trigger("valueChanged",this.argsData),"Circular"===this.type?(this.circular.renderCircularProgress(this.previousEndAngle,this.previousTotalEnd,!t.isNullOrUndefined(r.value)),this.showProgressValue&&this.circular.renderCircularLabel(),this.progressAnnotationModule&&this.animation.enable&&!this.isIndeterminate&&this.annotateAnimation.doAnnotationAnimation(this.clipPath,this,this.annotateEnd,this.annotateTotal)):(this.linear.renderLinearProgress(!t.isNullOrUndefined(r.value),this.previousWidth),this.showProgressValue&&this.linear.renderLinearLabel());break;case"animation":this.createSVG(),this.renderElements()}},n.prototype.requiredModules=function(){var e=[];return this.annotations.some(function(e){return null!==e.content})&&e.push({member:"ProgressAnnotation",args:[this]}),e},n.prototype.getPersistData=function(){return" "},n.prototype.show=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Visible"),this.isIndeterminate&&(this.destroyIndeterminate=!1,"Linear"===this.type?this.linear.renderLinearProgress(!0):this.circular.renderCircularProgress(null,null,!0)))},n.prototype.hide=function(){t.isNullOrUndefined(this.svgObject)||(this.svgObject.setAttribute("visibility","Hidden"),this.isIndeterminate&&(this.destroyIndeterminate=!0))},n.prototype.destroy=function(){this.unWireEvents(),e.prototype.destroy.call(this),this.removeSvg(),this.isReact&&this.clearTemplate(),this.svgObject=null,this.element.classList.remove("e-progressbar"),this.refreshing||(this.destroyIndeterminate=!0)},W([t.Property("Linear")],n.prototype,"type",void 0),W([t.Property(null)],n.prototype,"value",void 0),W([t.Property(null)],n.prototype,"secondaryProgress",void 0),W([t.Property(0)],n.prototype,"minimum",void 0),W([t.Property(100)],n.prototype,"maximum",void 0),W([t.Property(0)],n.prototype,"startAngle",void 0),W([t.Property(0)],n.prototype,"endAngle",void 0),W([t.Property("100%")],n.prototype,"radius",void 0),W([t.Property("100%")],n.prototype,"innerRadius",void 0),W([t.Property(1)],n.prototype,"segmentCount",void 0),W([t.Property(null)],n.prototype,"gapWidth",void 0),W([t.Property("")],n.prototype,"segmentColor",void 0),W([t.Property("Auto")],n.prototype,"cornerRadius",void 0),W([t.Property(null)],n.prototype,"height",void 0),W([t.Property(null)],n.prototype,"width",void 0),W([t.Property(!1)],n.prototype,"isIndeterminate",void 0),W([t.Property(!1)],n.prototype,"isActive",void 0),W([t.Property(!1)],n.prototype,"isGradient",void 0),W([t.Property(!1)],n.prototype,"isStriped",void 0),W([t.Property("Auto")],n.prototype,"role",void 0),W([t.Property(!1)],n.prototype,"enableRtl",void 0),W([t.Property(!0)],n.prototype,"labelOnTrack",void 0),W([t.Property(null)],n.prototype,"trackColor",void 0),W([t.Property(null)],n.prototype,"progressColor",void 0),W([t.Property(0)],n.prototype,"trackThickness",void 0),W([t.Property(0)],n.prototype,"progressThickness",void 0),W([t.Property(!1)],n.prototype,"enablePieProgress",void 0),W([t.Property("Fabric")],n.prototype,"theme",void 0),W([t.Property(!1)],n.prototype,"showProgressValue",void 0),W([t.Property(!1)],n.prototype,"enableProgressSegments",void 0),W([t.Complex({size:null,color:null,fontStyle:null,fontWeight:"Normal",fontFamily:null},k)],n.prototype,"labelStyle",void 0),W([t.Complex({},w)],n.prototype,"margin",void 0),W([t.Complex({},T)],n.prototype,"animation",void 0),W([t.Event()],n.prototype,"load",void 0),W([t.Event()],n.prototype,"textRender",void 0),W([t.Event()],n.prototype,"loaded",void 0),W([t.Event()],n.prototype,"valueChanged",void 0),W([t.Event()],n.prototype,"progressCompleted",void 0),W([t.Event()],n.prototype,"animationComplete",void 0),W([t.Event()],n.prototype,"mouseClick",void 0),W([t.Event()],n.prototype,"mouseMove",void 0),W([t.Event()],n.prototype,"mouseUp",void 0),W([t.Event()],n.prototype,"mouseDown",void 0),W([t.Event()],n.prototype,"mouseLeave",void 0),W([t.Collection([{}],x)],n.prototype,"annotations",void 0),W([t.Collection([{}],E)],n.prototype,"rangeColors",void 0),n=W([t.NotifyPropertyChanges],n)}(t.Component);return D.Inject(I),e.ProgressBar=D,e.Margin=w,e.Font=k,e.Animation=T,e.ProgressAnnotationSettings=x,e.RangeColor=E,e.ProgressAnnotation=I,e.Rect=y,e.Size=f,e.Pos=v,e.RectOption=b,e.ColorValue=R,e.convertToHexCode=n,e.componentToHex=i,e.convertHexToColor=o,e.colorNameToHex=s,e.TextOption=P,e.degreeToLocation=a,e.getPathArc=l,e.stringToNumber=c,e.setAttributes=p,e.effect=h,e.annotationRender="annotationRender",e.getElement=d,e.removeElement=u,e.ProgressLocation=S,e.ProgressAnimation=_,e}({},ej.base,ej.svgbase),this.ejs=ej;
//# sourceMappingURL=ej2-progressbar.min.js.map
/*!
* filename: index.d.ts
* version : 19.1.54
* version : 19.1.57
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

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

{
"_from": "@syncfusion/ej2-progressbar@*",
"_id": "@syncfusion/ej2-progressbar@18.3.0",
"_id": "@syncfusion/ej2-progressbar@19.1.54",
"_inBundle": false,
"_integrity": "sha512-MFKl32UuTMljWIWqa+crF8GfoqHE9SI/uoC1wjcfPkaiEE6CMf45m/d8XPTb9141jdv65GXrLsJxlQnuwt6Y8w==",
"_integrity": "sha512-Z1WTHgzoVcgWTdVDtBis5u42Pu+yce1nf8HTasgLeMxpsdh3NVSxCl660rhRjcIY7i8we1a2u9urFrhJfThoaw==",
"_location": "/@syncfusion/ej2-progressbar",

@@ -26,6 +26,6 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-progressbar/-/ej2-progressbar-18.3.0.tgz",
"_shasum": "d4f04ef53071ebc5daf8d0679f1c47b451c42218",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-progressbar/-/ej2-progressbar-19.1.54.tgz",
"_shasum": "3a0af70f3064a37c5f26255c930891ee5ef97157",
"_spec": "@syncfusion/ej2-progressbar@*",
"_where": "/jenkins/workspace/automation_release_18.4.0.1-WOJ6QVY6EU5ONBWOYGQFKS2VU2UW7E67MOXUPKCE5AX7QQX7M5JQ/packages/included",
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
"author": {

@@ -36,5 +36,5 @@ "name": "Syncfusion Inc."

"dependencies": {
"@syncfusion/ej2-base": "~19.1.54",
"@syncfusion/ej2-data": "~19.1.54",
"@syncfusion/ej2-svg-base": "~19.1.54"
"@syncfusion/ej2-base": "~19.1.57",
"@syncfusion/ej2-data": "~19.1.56",
"@syncfusion/ej2-svg-base": "~19.1.57"
},

@@ -59,4 +59,4 @@ "deprecated": false,

"typings": "index.d.ts",
"version": "19.1.54",
"version": "19.1.57",
"sideEffects": false
}

@@ -361,3 +361,3 @@ import { Component } from '@syncfusion/ej2-base';

/**
* Render Annotation
* Render Annotation in progress bar
*/

@@ -364,0 +364,0 @@ private renderAnnotations;

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

/**
* Render Annotation
* Render Annotation in progress bar
*/

@@ -122,3 +122,3 @@ ProgressBar.prototype.renderAnnotations = function () {

this.renderLabel();
if (this.progressAnnotationModule && this.annotations.length > 0) {
if (this.annotations.length > 0) {
this.renderAnnotations();

@@ -146,5 +146,7 @@ }

var rect = this.element.getBoundingClientRect();
var svgRect = getElement(this.svgObject.id).getBoundingClientRect();
element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
if (getElement(this.svgObject.id)) {
var svgRect = getElement(this.svgObject.id).getBoundingClientRect();
element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
}
};

@@ -243,3 +245,3 @@ ProgressBar.prototype.createSVG = function () {

if (!refresh) {
rect = new RectOption(this.element.id + '_clippathrect', 'transparent', 1, 'transparent', 1, new Rect(posx, posy, thickness, pathWidth));
rect = new RectOption(this.element.id + '_clippathrect' + (isLabel ? 'label' : ''), 'transparent', 1, 'transparent', 1, new Rect(posx, posy, thickness, pathWidth));
path = this.renderer.drawRectangle(rect);

@@ -249,3 +251,3 @@ clipPath.appendChild(path);

else {
path = getElement(this.element.id + '_clippathrect');
path = getElement(this.element.id + '_clippathrect' + (isLabel ? 'label' : ''));
path.setAttribute('width', (pathWidth).toString());

@@ -426,2 +428,5 @@ if (this.isActive) {

this.linear.renderLinearProgress(!isNullOrUndefined(oldProp.value), this.previousWidth);
if (this.showProgressValue) {
this.linear.renderLinearLabel();
}
}

@@ -428,0 +433,0 @@ break;

@@ -65,3 +65,3 @@ import { ProgressAnimation } from '../utils/progress-animation';

var progressWidth = progress.calculateProgressRange(progress.argsData.value);
progress.previousWidth = linearProgressWidth = progress.progressRect.width *
linearProgressWidth = progress.progressRect.width *
((progress.isIndeterminate && !progress.enableProgressSegments) ? 1 : progressWidth);

@@ -221,2 +221,5 @@ if (!refresh) {

var linearLabelGroup = progress.renderer.createGroup({ 'id': progress.element.id + '_LinearLabelGroup' });
if (document.getElementById(linearLabelGroup.id)) {
document.getElementById(linearLabelGroup.id).remove();
}
var labelValue = ((progress.value - progress.minimum) / (progress.maximum - progress.minimum)) * percentage;

@@ -292,5 +295,6 @@ var linearValue = (progress.value < progress.minimum || progress.value > progress.maximum) ? 0 : Math.round(labelValue);

linearlabel.setAttribute('style', 'clip-path:url(#' + progress.element.id + '_clippathLabel)');
this.animation.doLabelAnimation(linearlabel, 0, progressWidth, progress, this.delay, textSize.width);
this.animation.doLabelAnimation(linearlabel, (progress.previousWidth ? progress.previousWidth : 0), progressWidth, progress, this.delay, textSize.width);
}
progress.svgObject.appendChild(linearLabelGroup);
progress.previousWidth = progressWidth;
}

@@ -297,0 +301,0 @@ };

@@ -243,3 +243,3 @@ /* eslint-disable valid-jsdoc */

startPos = (progress.enableRtl) ? (progress.progressRect.x + progress.progressRect.width) + (textSize / 2) :
progress.progressRect.x - (textSize / 2);
start - (textSize / 2);
startPos = (startPos <= 0) ? 0 : startPos;

@@ -246,0 +246,0 @@ endPos = (progress.enableRtl) ? startPos - posX : posX - startPos;

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