Huge News!Announcing our $40M Series B led by Abstract Ventures.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 18.4.30 to 18.4.39

4

dist/ej2-progressbar.umd.min.js
/*!
* filename: ej2-progressbar.umd.min.js
* version : 18.4.30
* version : 18.4.39
* 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){var r;e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"})),(r=document.getElementById("chartmeasuretext")).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 u(e){return document.getElementById(e)}function d(e){if(!e)return null;var r="string"==typeof e?u(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),L=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),E=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,i;i=new S(0,0),(n=this.render(e,t))?this.setElementStyle(i,n,r):this.control.redraw&&(d(n.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"),u=l.getAttribute("x"),d=0,g=0,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(u,10):i,y=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-i:parseInt(p,10)-m,f=parseInt(u,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(u,10),parseInt(p,10),!0),d=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.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),d=h(e.timeStamp,.5,.5,e.duration,!0),o.setAttribute("opacity",d.toString()),l.setAttribute("width",g.toString())):(g=h(e.timeStamp,m,y,e.duration,!1),l.setAttribute("width",g.toString())))},end:function(t){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",u.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"),u=0,d=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?(u=h(e.timeStamp,parseInt(c,10)||i.progressRect.x+r,g,e.duration,!0),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(u,r,n)):l.setAttribute("x",u.toString())):(u=h(e.timeStamp,d,g,e.duration,!1),i.enableProgressSegments?l.setAttribute("d",i.getPathLine(u,r,n)):l.setAttribute("x",u.toString()))},end:function(){i.enableRtl&&!i.enableProgressSegments&&"Round4px"!==i.cornerRadius?l.setAttribute("x",c.toString()):i.enableProgressSegments||l.setAttribute("x",d.toString()),i.destroyIndeterminate||s.doLinearIndeterminate(e,r,n,i,o)}})},e.prototype.doStripedAnimation=function(e,r,n,i){var o=this,s=new t.Animation({}),a=1e3/r.animation.duration;s.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||o.doStripedAnimation(e,r,n,!1)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,u,d,g){var m,y,f=this,v=new t.Animation({}),b=s,R=a.startAngle,P=n+c/2,S=0,C=0,A=a.isActive?3e3:a.animation.duration;R+="Round"===a.cornerRadius&&o!==E&&0!==o?a.enableRtl?.45*c:-.45*c:0,o+="Round"===a.cornerRadius&&o!==E&&0!==o?.45*c:0,i+="Round"===a.cornerRadius&&o!==E&&0!==o?a.enableRtl?-.45*c:.45*c:0,m=t.isNullOrUndefined(u)?R:u,y=t.isNullOrUndefined(u)?o:o-d,b.setAttribute("visibility","Hidden"),v.animate(b,{duration:A,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(b.setAttribute("visibility","visible"),a.isActive?(S=f.activeAnimate(t.timeStamp/t.duration,m,y,a.enableRtl),C=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",C.toString()),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))):(S=h(t.timeStamp,m,y,t.duration,a.enableRtl),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))))},end:function(t){a.cancelResize=!1,b.setAttribute("visibility",""),b.setAttribute("d",l(e,r,P,R,i,a.enableRtl,!0)),a.isActive&&f.doCircularAnimation(e,r,n,i,o,s,a,c,p,u,d,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,u=new t.Animation({}),d=a+(r.enableProgressSegments?0:c/2),g=r.enableProgressSegments?2:3;u.animate(p,{progress:function(){e.style.visibility="visible",n+=r.enableRtl?-g:g,i+=r.enableRtl?-g:g,e.setAttribute("d",l(o,s,d,n%360,i%360,r.enableRtl,!r.enableProgressSegments))},end:function(t){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({}),u=e.innerHTML,d=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"),d=h(t.timeStamp,r,n,t.duration,!1),m=parseInt((d/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"),d=h(t.timeStamp,r,n,t.duration,!1),m=parseInt(((d-r)/i.totalAngle*100).toString(),10),e.innerHTML=m.toString()+"%")},end:function(){i.cancelResize=!1,""===y?(e.innerHTML=u,e.setAttribute("x",v.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),d=h(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",d.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,n,i){var o,s,a,l,c,p,u,d=new t.Animation({}),g=0,m=r.annotations.length>0,y=r.startAngle,f=r.totalAngle;m&&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=y+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),p=t.isNullOrUndefined(n)?y:n,u=t.isNullOrUndefined(n)?a:a-i,r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":d.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,m&&o&&(g=h(e.timeStamp,p,u,e.duration,!1),l=parseInt(((Math.round(g)-y)/f*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(e){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(e){},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 u,d,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++)u=R<h?R:h,b<e.segmentColor.length?(d=e.segmentColor[b],b++):(b=0,d=e.segmentColor[b],b++),g=new r.PathOption(e.element.id+t+S,"none",P,d,i,"0",this.getLinearSegmentPath(a,l,u,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 u=e.startAngle,d=this.widthToAngle(e.minimum,e.maximum,s,e.totalAngle);d-="Round"===e.cornerRadius&&e.totalAngle===E?this.widthToAngle(0,h,.45*c,p):0;var g=h-(e.totalAngle===E?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(e.totalAngle===E?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===E?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(d/m),w=Math.ceil((d-f*A)/y),k=(u+(e.enableRtl?-y:y))%360,T=0,x=e.progressThickness||e.themeStyle.circularProgressThickness,L=0;L<w;L++)v=l(n,i,o,u,R=e.enableRtl?e.startAngle-d>k?e.startAngle-d:k:e.startAngle+d<k?e.startAngle+d: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+L,"none",x,P,a,"0",v),b=e.renderer.drawPath(S),"Round"===e.cornerRadius&&b.setAttribute("stroke-linecap","round"),C.appendChild(b),u=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,u,d=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=d+(t.enableRtl?-a:a),p=d+(t.enableRtl?-l:l),c=i?t.isGradient&&S>0?c+P:c:d,p=i?p:d,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&&(u=y.length-1===S?y[S].color:y[S+1].color,n=this.setLinearGradientColor(S,y[S].color,u,c,p,t),m.appendChild(n));return m},e.prototype.createCircularRange=function(e,t,n,i){for(var o,s,a,c,p,h,u,d,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,u=i.isGradient?"url(#circleRangeGrad_"+S+")":m[S].color,h=new r.PathOption(i.element.id+"_CircularRange_"+S,"none",y,u,f,"0",l(e,t,n,s,a,i.enableRtl)),c=i.renderer.drawPath(h),g.appendChild(c),i.isGradient&&(d=m.length-1===S?m[S].color:m[S+1].color,o=this.setCircularGradientColor(S,m[S].color,d,s,a,n,e,t,i),g.appendChild(o));return g},e.prototype.setLinearGradientColor=function(e,t,r,n,i,o){var s,a,l=[];return a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()},l[0]={color:t,colorStop:"50%"},l[1]={color:r,colorStop:"100%"},(s=o.renderer.drawGradient("linearGradient",a,l)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),s},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p,h,u=[],d=a(s,l,o,n),g=a(s,l,o,i);return h={id:"circleRangeGrad_"+e,x1:d.x.toString(),x2:g.x.toString(),y1:d.y.toString(),y2:g.y.toString()},u[0]={color:t,colorStop:"50%"},u[1]={color:r,colorStop:"100%"},(p=c.renderer.drawGradient("linearGradient",h,u)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),p},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,i,o=this.progress,s=o.renderer.createGroup({id:o.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,n=o.trackThickness||o.themeStyle.linearTrackThickness,i=o.argsData.trackColor||o.themeStyle.linearTrackColor,"Round4px"===o.cornerRadius?o.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",i,n,!0,0,o):(t=new r.PathOption(o.element.id+"_Lineartrack",i,0,"none",o.themeStyle.trackOpacity,"0",this.cornerRadius(o.progressRect.x,o.progressRect.y,o.progressRect.width,n,4,"")),e=o.renderer.drawPath(t)):(t=new r.PathOption(o.element.id+"_Lineartrack","none",n,i,o.themeStyle.trackOpacity,"0",o.getPathLine(o.progressRect.x,o.progressRect.width,n)),e=o.renderer.drawPath(t),o.trackWidth=e.getTotalLength(),"Round"!==o.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),o.segmentCount>1&&!this.isRange&&!o.enableProgressSegments&&(o.segmentSize=o.calculateSegmentSize(o.trackWidth,n),e.setAttribute("stroke-dasharray",o.segmentSize))),s.appendChild(e),o.svgObject.appendChild(s)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,u,d,g,m=this.progress,y=m.value===m.maximum;o=m.calculateProgressRange(m.argsData.value),m.previousWidth=s=m.progressRect.width*(m.isIndeterminate&&!m.enableProgressSegments?1:o),c=e?r.getElement(m.element.id+"_LinearProgressGroup"):m.renderer.createGroup({id:m.element.id+"_LinearProgressGroup"}),h=m.progressThickness||m.themeStyle.linearProgressThickness,u=m.isStriped?"url(#"+m.element.id+"_LinearStriped)":this.checkingLinearProgressColor(),n="Round4px"===m.cornerRadius?new r.PathOption(m.element.id+"_Linearprogress",u,0,"none",m.themeStyle.progressOpacity,"0",this.cornerRadius(m.progressRect.x,m.progressRect.y,s,h,4,y||m.isIndeterminate?"":"start")):new r.PathOption(m.element.id+"_Linearprogress","none",h,u,m.themeStyle.progressOpacity,"0",m.getPathLine(m.progressRect.x,s,h)),m.progressWidth=m.renderer.drawPath(n).getTotalLength(),m.segmentSize=m.enableProgressSegments?m.calculateSegmentSize(m.progressWidth,h):m.segmentSize,null===m.secondaryProgress||m.isIndeterminate||this.renderLinearBuffer(m),null!==m.argsData.value&&("Round4px"===m.cornerRadius?i=m.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",u,h,!1,s,m,m.themeStyle.progressOpacity):m.renderer.drawPath(n):0===m.segmentColor.length||m.isIndeterminate||this.isRange?this.isRange&&!m.isIndeterminate?i=this.segment.createLinearRange(s,m):(e?((i=r.getElement(m.element.id+"_Linearprogress")).setAttribute("d",m.getPathLine(m.progressRect.x,s,h)),i.setAttribute("stroke",u)):i=m.renderer.drawPath(n),m.segmentCount>1&&i.setAttribute("stroke-dasharray",m.segmentSize),"Round"===m.cornerRadius&&o&&i.setAttribute("stroke-linecap","round")):(d=m.enableProgressSegments?m.progressWidth:m.trackWidth,i=this.segment.createLinearSegment(m,"_LinearProgressSegment",s,m.themeStyle.progressOpacity,h,d)),c.appendChild(i),m.isStriped&&!m.isIndeterminate&&(g=this.checkingLinearProgressColor(),this.renderLinearStriped(g,c,m)),!m.isActive||m.isIndeterminate||m.isStriped||this.renderActiveState(c,o,s,h,e),!m.animation.enable||m.isIndeterminate||m.isActive||m.isStriped||(p=null!==m.secondaryProgress?m.animation.delay+(this.bufferWidth-s):m.animation.delay,this.delay=p,a=m.createClipPath(m.clipPath,o,null,e,h,!1,"Round4px"===m.cornerRadius&&y),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearAnimation(a,m,p,e?t:0)),m.isIndeterminate&&(l=m.createClipPath(m.clipPath,m.enableProgressSegments?1:o,null,e,h,m.enableProgressSegments),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearIndeterminate(m.enableProgressSegments?i:l,s,h,m,l)),m.svgObject.appendChild(c))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a,l,c,p,h=e.secondaryProgress===e.maximum;n=e.calculateProgressRange(e.secondaryProgress),this.bufferWidth=s=e.progressRect.width*n,o=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),l=e.progressThickness||e.themeStyle.linearProgressThickness,c=this.checkingLinearProgressColor(),"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",c,l,!1,s,e,e.themeStyle.bufferOpacity):(a=new r.PathOption(e.element.id+"_Linearbuffer",c,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,s,l,4,h?"":"start")),t=e.renderer.drawPath(a)):(a=new r.PathOption(e.element.id+"_Linearbuffer","none",l,c,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,s,l)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(a),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(p=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",s,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,p))),o.appendChild(t),e.animation.enable&&(i=e.createClipPath(e.bufferClipPath,n,null,!1,l,!1,"Round4px"===e.cornerRadius&&h),o.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(i,e,e.animation.delay,0)),e.svgObject.appendChild(o)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,u,d,g,m,y,f,v=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,b=this.progress,P=b.labelStyle.textAlignment,S=b.labelStyle.text,C=this.checkingLinearProgressColor(),A=b.progressRect.width*b.calculateProgressRange(b.value);f=b.renderer.createGroup({id:b.element.id+"_LinearLabelGroup"}),c=(b.value-b.minimum)/(b.maximum-b.minimum)*100,t=b.value<b.minimum||b.value>b.maximum?0:Math.round(c),g=o(s(C)),m=Math.round((299*g.r+587*g.g+114*g.b)/1e3),a={cancel:!1,text:S||String(t)+"%",color:b.labelStyle.color},b.trigger("textRender",a),a.cancel||(l=r.measureText(a.text,b.labelStyle),h=b.enableRtl?b.progressRect.x+b.progressRect.width-l.width/2:b.progressRect.x+l.width/2,"Near"===P?n=h+(b.enableRtl?-5:5):"Center"===P?(d=b.enableRtl?b.progressRect.x+b.progressRect.width-A/2:b.progressRect.x+A/2,n=(b.enableRtl?d<=h:d>=h)?d:h):(u=b.enableRtl?b.progressRect.x+b.progressRect.width-A+l.width/2:b.progressRect.x+A-l.width/2,u+=b.enableRtl?5:-5,n=(b.enableRtl?u<=h:u>=h)?u:h),i="Round4px"===this.progress.cornerRadius?b.progressRect.y+v/2+l.height/4:b.progressRect.y+b.progressRect.height/2+l.height/4,p=new R(b.element.id+"_linearLabel",b.labelStyle.size||b.themeStyle.linearFontSize,b.labelStyle.fontStyle||b.themeStyle.linearFontStyle,b.labelStyle.fontFamily||b.themeStyle.linearFontFamily,b.labelStyle.fontWeight,"middle",a.color||(m>=128?"black":"white"),n,i),e=b.renderer.createText(p,a.text),f.appendChild(e),b.animation.enable&&!b.isIndeterminate&&(y=b.renderer.createClipPath({id:b.element.id+"_clippathLabel"}),b.createClipPath(y,1,null,!1,b.progressThickness||b.themeStyle.linearProgressThickness,!0),f.appendChild(y),e.setAttribute("style","clip-path:url(#"+b.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,0,A,b,this.delay,l.width)),b.svgObject.appendChild(f))},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l,c=this.progress,p=c.value===c.maximum;"Round4px"===c.cornerRadius?c.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,c,.5):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(c.progressRect.x,c.progressRect.y,n,i,4,p?"":"start")),s=c.renderer.drawPath(l)):(o?(s=r.getElement(c.element.id+"_LinearActiveProgress")).setAttribute("d",c.getPathLine(c.progressRect.x,n,i)):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",c.getPathLine(c.progressRect.x,n,i)),s=c.renderer.drawPath(l)),c.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",c.segmentSize),"Round"===c.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round")),a=c.createClipPath(c.clipPath,t,null,o,i,!1),s.setAttribute("style","clip-path:url(#"+c.element.id+"_clippath)"),e.appendChild(s),e.appendChild(c.clipPath),this.animation.doLinearAnimation(a,c,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,u=s.progressRect.x,d=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(u,d,y,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),u+=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(u,d,p,n,4,c)),h=s.renderer.drawPath(l),f.appendChild(h),u+=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,i,o,s,a,p,h,u=this.progress,d=u.renderer.createGroup({id:u.element.id+"_CircularTrackGroup"});t=u.startAngle,u.totalAngle=(u.endAngle-u.startAngle)%360,u.totalAngle=u.totalAngle<=0?360+u.totalAngle:u.totalAngle,u.totalAngle-=360===u.totalAngle?.01:0,this.trackEndAngle=n=(u.startAngle+(u.enableRtl?-u.totalAngle:+u.totalAngle))%360,this.centerX=u.progressRect.x+u.progressRect.width/2,this.centerY=u.progressRect.y+u.progressRect.height/2,this.maxThickness=Math.max(u.trackThickness,u.progressThickness)||Math.max(u.themeStyle.circularProgressThickness,u.themeStyle.circularTrackThickness),this.availableSize=Math.min(u.progressRect.height,u.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(u.radius,this.availableSize))?0:e,h=u.argsData.trackColor||u.themeStyle.circularTrackColor,a=u.enablePieProgress?u.argsData.trackColor||u.themeStyle.circularTrackColor:"none",p=u.enablePieProgress?0:u.trackThickness||u.themeStyle.circularTrackThickness,o=l(this.centerX,this.centerY,e,t,n,u.enableRtl,u.enablePieProgress),this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,s=new r.PathOption(u.element.id+"_Circulartrack",a,p,h,u.themeStyle.trackOpacity,"0",o),i=u.renderer.drawPath(s),u.trackWidth=i.getTotalLength(),u.segmentCount>1&&!u.enableProgressSegments&&!u.enablePieProgress&&!this.isRange&&(u.segmentSize=u.calculateSegmentSize(u.trackWidth,p),i.setAttribute("stroke-dasharray",u.segmentSize)),"Round"!==u.cornerRadius||u.enablePieProgress||this.isRange||i.setAttribute("stroke-linecap","round"),d.appendChild(i),u.svgObject.appendChild(d)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,u,d,g,m,y,f,v,b,R,P,S,C=this.progress,A=C.startAngle;f=n?r.getElement(C.element.id+"_CircularProgressGroup"):C.renderer.createGroup({id:C.element.id+"_CircularProgressGroup"}),s=null===(s=c(C.innerRadius,this.availableSize))?0:s,C.previousTotalEnd=u=C.calculateProgressRange(C.argsData.value),P=(C.startAngle+(C.enableRtl?-u:u))%360,C.previousEndAngle=i=C.isIndeterminate&&!C.enableProgressSegments?(C.startAngle+(C.enableRtl?-C.totalAngle:C.totalAngle))%360:P,p=(p=(u-C.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0,h=l(this.centerX,this.centerY,s,A,i,C.enableRtl,C.enablePieProgress),y=this.checkingCircularProgressColor(),v=C.enablePieProgress?y:"none",S=C.progressThickness||C.themeStyle.circularProgressThickness,b=C.enablePieProgress?0:S,g=new r.PathOption(C.element.id+"_Circularprogress",v,b,y,C.themeStyle.progressOpacity,"0",h),C.progressWidth=C.renderer.drawPath(g).getTotalLength(),C.segmentSize=this.validateSegmentSize(C,S),null===C.secondaryProgress||C.isIndeterminate||this.renderCircularBuffer(C,s,p),null!==C.argsData.value&&(0===C.segmentColor.length||C.isIndeterminate||C.enablePieProgress?this.isRange&&!C.isIndeterminate?d=this.segment.createCircularRange(this.centerX,this.centerY,s,C):(n?(a=(d=r.getElement(C.element.id+"_Circularprogress")).getAttribute("d"),d.setAttribute("stroke",y),d.setAttribute("d",h)):d=C.renderer.drawPath(g),C.segmentCount>1&&!C.enablePieProgress&&d.setAttribute("stroke-dasharray",C.segmentSize),"Round"===C.cornerRadius&&A!==i&&d.setAttribute("stroke-linecap","round")):(o=C.enableProgressSegments?p:C.totalAngle,R=C.enableProgressSegments?C.progressWidth:C.trackWidth,d=this.segment.createCircularSegment(C,"_CircularProgressSegment",this.centerX,this.centerY,s,C.argsData.value,C.themeStyle.progressOpacity,S,o,R)),f.appendChild(d),!C.isActive||C.isIndeterminate||C.enablePieProgress||this.renderActiveState(f,s,b,h,P,u,n),(C.animation.enable||C.isIndeterminate)&&(this.delay=null!==C.secondaryProgress?300:C.animation.delay,m=C.createClipPath(C.clipPath,null,n?a:"",n),f.appendChild(C.clipPath),!C.animation.enable||C.isIndeterminate||C.isActive||(d.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,P,u,m,C,S,this.delay,n?e:null,n?t:null)),C.isIndeterminate&&(C.enableProgressSegments&&m.setAttribute("d",l(this.centerX,this.centerY,s+S/2,C.startAngle,this.trackEndAngle,C.enableRtl,!0)),d.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularIndeterminate(C.enableProgressSegments?d:m,C,A,P,this.centerX,this.centerY,s,S,m))),C.svgObject.appendChild(f))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c,p,h,u,d,g,m,y;a=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),o=e.calculateProgressRange(e.secondaryProgress),m=(e.startAngle+(e.enableRtl?-o:o))%360,c=l(this.centerX,this.centerY,t,e.startAngle,m,e.enableRtl,e.enablePieProgress),y=this.checkingCircularProgressColor(),h=e.enablePieProgress?y:"none",u=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,p=new r.PathOption(e.element.id+"_Circularbuffer",h,u,y,e.themeStyle.bufferOpacity,"0",c),0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(s=e.renderer.drawPath(p),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&s.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||s.setAttribute("stroke-linecap","round")):(g=e.enableProgressSegments?n:e.totalAngle,d=e.enableProgressSegments?e.progressWidth:e.trackWidth,s=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,u,g,d)),a.appendChild(s),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),a.appendChild(e.bufferClipPath),s.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,m,o,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(a)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s,a,l,c,p=this.progress,h=p.labelStyle.text;c=p.renderer.createGroup({id:p.element.id+"_CircularLabelGroup"}),document.getElementById(c.id)&&document.getElementById(c.id).remove(),a=(p.value-p.minimum)/(p.maximum-p.minimum)*100,n=p.value<p.minimum||p.value>p.maximum?0:Math.round(a),o={cancel:!1,text:h||String(n)+"%",color:p.labelStyle.color},p.trigger("textRender",o),o.cancel||(s=r.measureText(o.text,p.labelStyle),i=this.centerY+s.height/2,l=new R(p.element.id+"_circularLabel",p.labelStyle.size||p.themeStyle.circularFontSize,p.labelStyle.fontStyle||p.themeStyle.circularFontStyle,p.labelStyle.fontFamily||p.themeStyle.circularFontFamily,p.labelStyle.fontWeight,"middle",o.color||p.themeStyle.fontColor,this.centerX,i,p.progressRect.width,p.progressRect.height),t=p.renderer.createText(l,o.text),c.appendChild(t),p.animation.enable&&!p.isIndeterminate&&(e=(p.value-p.minimum)/(p.maximum-p.minimum)*p.totalAngle,e=p.value<p.minimum||p.value>p.maximum?0:e,this.animation.doLabelAnimation(t,p.startAngle,e,p,this.delay)),p.svgObject.appendChild(c))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p,h=this.progress,u=n+1;a?(l=r.getElement(h.element.id+"_CircularActiveProgress")).setAttribute("d",i):(p=new r.PathOption(h.element.id+"_CircularActiveProgress","none",u,"#ffffff",.5,"0",i),l=h.renderer.drawPath(p)),h.segmentCount>1&&l.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&l.setAttribute("stroke-linecap","round"),c=h.createClipPath(h.clipPath,null,"",a),l.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),e.appendChild(l),e.appendChild(h.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,c,h,u,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i;return 0===(n=parseInt(e.radius,10)-parseInt(e.innerRadius,10))||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(i=e.trackWidth+(n<0?e.trackWidth*Math.abs(n)/parseInt(e.radius,10):-e.trackWidth*Math.abs(n)/parseInt(e.radius,10)),r=e.calculateSegmentSize(i,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.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,i=t||this.minimum,o=r||this.maximum;return n=(e-i)/(o-i)*("Linear"===this.type?1:this.totalAngle),e<i||e>o?0:n},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&this.totalAngle===E?this.segmentCount:this.segmentCount-1,n=this.totalAngle===E||"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,u,d,g=this.progressRect.x,y=this.progressRect.width;return"Linear"===this.type?("Round4px"===this.cornerRadius?(h=g,d=y*t,h+=s?0:-4,u=this.progressRect.y,d+=!s&&a||this.isIndeterminate?4:0):(h=this.enableRtl&&!s?g+y:g,d=y*t,h+="Round"!==this.cornerRadius||s?0:this.enableRtl?.45*o:-.45*o,u=this.progressRect.y+this.progressRect.height/2-o/2,d+="Round"!==this.cornerRadius||s?0:.9*o),i?((l=r.getElement(this.element.id+"_clippathrect")).setAttribute("width",d.toString()),this.isActive&&l.setAttribute("x",h.toString())):(c=new v(this.element.id+"_clippathrect","transparent",1,"transparent",1,new m(h,u,o,d)),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(e){var t=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var r={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(){t.isDestroyed?clearTimeout(t.resizeTo):(r.currentSize=t.progressSize,t.trigger("resized",r),null!==t.width&&null!==t.height||r.cancel||(t.secElement.innerHTML="",t.calculateProgressBarSize(),t.createSVG(),t.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(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([{}],L)],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=L,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=u,e.removeElement=d,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){var r;e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"})),(r=document.getElementById("chartmeasuretext")).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),L=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),E=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,i;i=new S(0,0),(n=this.render(e,t))?this.setElementStyle(i,n,r):this.control.redraw&&(u(n.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(t){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,i){var o=this,s=new t.Animation({}),a=1e3/r.animation.duration;s.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||o.doStripedAnimation(e,r,n,!1)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m,y,f=this,v=new t.Animation({}),b=s,R=a.startAngle,P=n+c/2,S=0,C=0,A=a.isActive?3e3:a.animation.duration;R+="Round"===a.cornerRadius&&o!==E&&0!==o?a.enableRtl?.45*c:-.45*c:0,o+="Round"===a.cornerRadius&&o!==E&&0!==o?.45*c:0,i+="Round"===a.cornerRadius&&o!==E&&0!==o?a.enableRtl?-.45*c:.45*c:0,m=t.isNullOrUndefined(d)?R:d,y=t.isNullOrUndefined(d)?o:o-u,b.setAttribute("visibility","Hidden"),v.animate(b,{duration:A,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(b.setAttribute("visibility","visible"),a.isActive?(S=f.activeAnimate(t.timeStamp/t.duration,m,y,a.enableRtl),C=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",C.toString()),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))):(S=h(t.timeStamp,m,y,t.duration,a.enableRtl),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))))},end:function(t){a.cancelResize=!1,b.setAttribute("visibility",""),b.setAttribute("d",l(e,r,P,R,i,a.enableRtl,!0)),a.isActive&&f.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(t){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,d,u=new t.Animation({}),g=0,m=r.annotations.length>0,y=r.startAngle,f=r.totalAngle;m&&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=y+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),p=t.isNullOrUndefined(n)?y:n,d=t.isNullOrUndefined(n)?a:a-i,r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":u.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,m&&o&&(g=h(e.timeStamp,p,d,e.duration,!1),l=parseInt(((Math.round(g)-y)/f*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(e){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(e){},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===E?this.widthToAngle(0,h,.45*c,p):0;var g=h-(e.totalAngle===E?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);g=(g-("Round"===e.cornerRadius?.9*(e.totalAngle===E?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===E?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,L=0;L<w;L++)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+L,"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,l=[];return a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()},l[0]={color:t,colorStop:"50%"},l[1]={color:r,colorStop:"100%"},(s=o.renderer.drawGradient("linearGradient",a,l)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),s},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p,h,d=[],u=a(s,l,o,n),g=a(s,l,o,i);return h={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:g.x.toString(),y1:u.y.toString(),y2:g.y.toString()},d[0]={color:t,colorStop:"50%"},d[1]={color:r,colorStop:"100%"},(p=c.renderer.drawGradient("linearGradient",h,d)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),p},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,i,o=this.progress,s=o.renderer.createGroup({id:o.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,n=o.trackThickness||o.themeStyle.linearTrackThickness,i=o.argsData.trackColor||o.themeStyle.linearTrackColor,"Round4px"===o.cornerRadius?o.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",i,n,!0,0,o):(t=new r.PathOption(o.element.id+"_Lineartrack",i,0,"none",o.themeStyle.trackOpacity,"0",this.cornerRadius(o.progressRect.x,o.progressRect.y,o.progressRect.width,n,4,"")),e=o.renderer.drawPath(t)):(t=new r.PathOption(o.element.id+"_Lineartrack","none",n,i,o.themeStyle.trackOpacity,"0",o.getPathLine(o.progressRect.x,o.progressRect.width,n)),e=o.renderer.drawPath(t),o.trackWidth=e.getTotalLength(),"Round"!==o.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),o.segmentCount>1&&!this.isRange&&!o.enableProgressSegments&&(o.segmentSize=o.calculateSegmentSize(o.trackWidth,n),e.setAttribute("stroke-dasharray",o.segmentSize))),s.appendChild(e),o.svgObject.appendChild(s)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d,u,g,m=this.progress,y=m.value===m.maximum;o=m.calculateProgressRange(m.argsData.value),m.previousWidth=s=m.progressRect.width*(m.isIndeterminate&&!m.enableProgressSegments?1:o),c=e?r.getElement(m.element.id+"_LinearProgressGroup"):m.renderer.createGroup({id:m.element.id+"_LinearProgressGroup"}),h=m.progressThickness||m.themeStyle.linearProgressThickness,d=m.isStriped?"url(#"+m.element.id+"_LinearStriped)":this.checkingLinearProgressColor(),n="Round4px"===m.cornerRadius?new r.PathOption(m.element.id+"_Linearprogress",d,0,"none",m.themeStyle.progressOpacity,"0",this.cornerRadius(m.progressRect.x,m.progressRect.y,s,h,4,y||m.isIndeterminate?"":"start")):new r.PathOption(m.element.id+"_Linearprogress","none",h,d,m.themeStyle.progressOpacity,"0",m.getPathLine(m.progressRect.x,s,h)),m.progressWidth=m.renderer.drawPath(n).getTotalLength(),m.segmentSize=m.enableProgressSegments?m.calculateSegmentSize(m.progressWidth,h):m.segmentSize,null===m.secondaryProgress||m.isIndeterminate||this.renderLinearBuffer(m),null!==m.argsData.value&&("Round4px"===m.cornerRadius?i=m.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",d,h,!1,s,m,m.themeStyle.progressOpacity):m.renderer.drawPath(n):0===m.segmentColor.length||m.isIndeterminate||this.isRange?this.isRange&&!m.isIndeterminate?i=this.segment.createLinearRange(s,m):(e?((i=r.getElement(m.element.id+"_Linearprogress")).setAttribute("d",m.getPathLine(m.progressRect.x,s,h)),i.setAttribute("stroke",d)):i=m.renderer.drawPath(n),m.segmentCount>1&&i.setAttribute("stroke-dasharray",m.segmentSize),"Round"===m.cornerRadius&&o&&i.setAttribute("stroke-linecap","round")):(u=m.enableProgressSegments?m.progressWidth:m.trackWidth,i=this.segment.createLinearSegment(m,"_LinearProgressSegment",s,m.themeStyle.progressOpacity,h,u)),c.appendChild(i),m.isStriped&&!m.isIndeterminate&&(g=this.checkingLinearProgressColor(),this.renderLinearStriped(g,c,m)),!m.isActive||m.isIndeterminate||m.isStriped||this.renderActiveState(c,o,s,h,e),!m.animation.enable||m.isIndeterminate||m.isActive||m.isStriped||(p=null!==m.secondaryProgress?m.animation.delay+(this.bufferWidth-s):m.animation.delay,this.delay=p,a=m.createClipPath(m.clipPath,o,null,e,h,!1,"Round4px"===m.cornerRadius&&y),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearAnimation(a,m,p,e?t:0)),m.isIndeterminate&&(l=m.createClipPath(m.clipPath,m.enableProgressSegments?1:o,null,e,h,m.enableProgressSegments),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearIndeterminate(m.enableProgressSegments?i:l,s,h,m,l)),m.svgObject.appendChild(c))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a,l,c,p,h=e.secondaryProgress===e.maximum;n=e.calculateProgressRange(e.secondaryProgress),this.bufferWidth=s=e.progressRect.width*n,o=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),l=e.progressThickness||e.themeStyle.linearProgressThickness,c=this.checkingLinearProgressColor(),"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",c,l,!1,s,e,e.themeStyle.bufferOpacity):(a=new r.PathOption(e.element.id+"_Linearbuffer",c,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,s,l,4,h?"":"start")),t=e.renderer.drawPath(a)):(a=new r.PathOption(e.element.id+"_Linearbuffer","none",l,c,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,s,l)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(a),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(p=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",s,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,p))),o.appendChild(t),e.animation.enable&&(i=e.createClipPath(e.bufferClipPath,n,null,!1,l,!1,"Round4px"===e.cornerRadius&&h),o.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(i,e,e.animation.delay,0)),e.svgObject.appendChild(o)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d,u,g,m,y,f,v=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,b=this.progress,P=b.labelStyle.textAlignment,S=b.labelStyle.text,C=this.checkingLinearProgressColor(),A=b.progressRect.width*b.calculateProgressRange(b.value);f=b.renderer.createGroup({id:b.element.id+"_LinearLabelGroup"}),c=(b.value-b.minimum)/(b.maximum-b.minimum)*100,t=b.value<b.minimum||b.value>b.maximum?0:Math.round(c),g=o(s(C)),m=Math.round((299*g.r+587*g.g+114*g.b)/1e3),a={cancel:!1,text:S||String(t)+"%",color:b.labelStyle.color},b.trigger("textRender",a),a.cancel||(l=r.measureText(a.text,b.labelStyle),h=b.enableRtl?b.progressRect.x+b.progressRect.width-l.width/2:b.progressRect.x+l.width/2,b.labelOnTrack?"Near"===P?n=h+(b.enableRtl?-5:5):"Center"===P?(u=b.enableRtl?b.progressRect.x+b.progressRect.width-A/2:b.progressRect.x+A/2,n=(b.enableRtl?u<=h:u>=h)?u:h):(d=b.enableRtl?b.progressRect.x+b.progressRect.width-A+l.width/2:b.progressRect.x+A-l.width/2,d+=b.enableRtl?5:-5,n=(b.enableRtl?d<=h:d>=h)?d:h):"Near"===P?n=h+(b.enableRtl?-5:5):"Center"===P?n=(b.progressRect.x+b.progressRect.width)/2:(n=b.enableRtl?b.progressRect.x+l.width/2:b.progressRect.x+b.progressRect.width-l.width/2,n+=b.enableRtl?5:-5),i="Round4px"===this.progress.cornerRadius?b.progressRect.y+v/2+l.height/4:b.progressRect.y+b.progressRect.height/2+l.height/4,p=new R(b.element.id+"_linearLabel",b.labelStyle.size||b.themeStyle.linearFontSize,b.labelStyle.fontStyle||b.themeStyle.linearFontStyle,b.labelStyle.fontFamily||b.themeStyle.linearFontFamily,b.labelStyle.fontWeight,"middle",a.color||(m>=128?"black":"white"),n,i),e=b.renderer.createText(p,a.text),f.appendChild(e),b.animation.enable&&!b.isIndeterminate&&(y=b.renderer.createClipPath({id:b.element.id+"_clippathLabel"}),b.createClipPath(y,1,null,!1,b.progressThickness||b.themeStyle.linearProgressThickness,!0),f.appendChild(y),e.setAttribute("style","clip-path:url(#"+b.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,0,A,b,this.delay,l.width)),b.svgObject.appendChild(f))},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l,c=this.progress,p=c.value===c.maximum;"Round4px"===c.cornerRadius?c.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,c,.5):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(c.progressRect.x,c.progressRect.y,n,i,4,p?"":"start")),s=c.renderer.drawPath(l)):(o?(s=r.getElement(c.element.id+"_LinearActiveProgress")).setAttribute("d",c.getPathLine(c.progressRect.x,n,i)):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",c.getPathLine(c.progressRect.x,n,i)),s=c.renderer.drawPath(l)),c.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",c.segmentSize),"Round"===c.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round")),a=c.createClipPath(c.clipPath,t,null,o,i,!1),s.setAttribute("style","clip-path:url(#"+c.element.id+"_clippath)"),e.appendChild(s),e.appendChild(c.clipPath),this.animation.doLinearAnimation(a,c,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,i,o,s,a,p,h,d=this.progress,u=d.renderer.createGroup({id:d.element.id+"_CircularTrackGroup"});t=d.startAngle,d.totalAngle=(d.endAngle-d.startAngle)%360,d.totalAngle=d.totalAngle<=0?360+d.totalAngle:d.totalAngle,d.totalAngle-=360===d.totalAngle?.01:0,this.trackEndAngle=n=(d.startAngle+(d.enableRtl?-d.totalAngle:+d.totalAngle))%360,this.centerX=d.progressRect.x+d.progressRect.width/2,this.centerY=d.progressRect.y+d.progressRect.height/2,this.maxThickness=Math.max(d.trackThickness,d.progressThickness)||Math.max(d.themeStyle.circularProgressThickness,d.themeStyle.circularTrackThickness),this.availableSize=Math.min(d.progressRect.height,d.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(d.radius,this.availableSize))?0:e,h=d.argsData.trackColor||d.themeStyle.circularTrackColor,a=d.enablePieProgress?d.argsData.trackColor||d.themeStyle.circularTrackColor:"none",p=d.enablePieProgress?0:d.trackThickness||d.themeStyle.circularTrackThickness,o=l(this.centerX,this.centerY,e,t,n,d.enableRtl,d.enablePieProgress),this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,s=new r.PathOption(d.element.id+"_Circulartrack",a,p,h,d.themeStyle.trackOpacity,"0",o),i=d.renderer.drawPath(s),d.trackWidth=i.getTotalLength(),d.segmentCount>1&&!d.enableProgressSegments&&!d.enablePieProgress&&!this.isRange&&(d.segmentSize=d.calculateSegmentSize(d.trackWidth,p),i.setAttribute("stroke-dasharray",d.segmentSize)),"Round"!==d.cornerRadius||d.enablePieProgress||this.isRange||i.setAttribute("stroke-linecap","round"),u.appendChild(i),d.svgObject.appendChild(u)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y,f,v,b,R,P,S,C=this.progress,A=C.startAngle;f=n?r.getElement(C.element.id+"_CircularProgressGroup"):C.renderer.createGroup({id:C.element.id+"_CircularProgressGroup"}),s=null===(s=c(C.innerRadius,this.availableSize))?0:s,C.previousTotalEnd=d=C.calculateProgressRange(C.argsData.value),P=(C.startAngle+(C.enableRtl?-d:d))%360,C.previousEndAngle=i=C.isIndeterminate&&!C.enableProgressSegments?(C.startAngle+(C.enableRtl?-C.totalAngle:C.totalAngle))%360:P,p=(p=(d-C.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0,h=l(this.centerX,this.centerY,s,A,i,C.enableRtl,C.enablePieProgress),y=this.checkingCircularProgressColor(),v=C.enablePieProgress?y:"none",S=C.progressThickness||C.themeStyle.circularProgressThickness,b=C.enablePieProgress?0:S,g=new r.PathOption(C.element.id+"_Circularprogress",v,b,y,C.themeStyle.progressOpacity,"0",h),C.progressWidth=C.renderer.drawPath(g).getTotalLength(),C.segmentSize=this.validateSegmentSize(C,S),null===C.secondaryProgress||C.isIndeterminate||this.renderCircularBuffer(C,s,p),null!==C.argsData.value&&(0===C.segmentColor.length||C.isIndeterminate||C.enablePieProgress?this.isRange&&!C.isIndeterminate?u=this.segment.createCircularRange(this.centerX,this.centerY,s,C):(n?(a=(u=r.getElement(C.element.id+"_Circularprogress")).getAttribute("d"),u.setAttribute("stroke",y),u.setAttribute("d",h)):u=C.renderer.drawPath(g),C.segmentCount>1&&!C.enablePieProgress&&u.setAttribute("stroke-dasharray",C.segmentSize),"Round"===C.cornerRadius&&A!==i&&u.setAttribute("stroke-linecap","round")):(o=C.enableProgressSegments?p:C.totalAngle,R=C.enableProgressSegments?C.progressWidth:C.trackWidth,u=this.segment.createCircularSegment(C,"_CircularProgressSegment",this.centerX,this.centerY,s,C.argsData.value,C.themeStyle.progressOpacity,S,o,R)),f.appendChild(u),!C.isActive||C.isIndeterminate||C.enablePieProgress||this.renderActiveState(f,s,b,h,P,d,n),(C.animation.enable||C.isIndeterminate)&&(this.delay=null!==C.secondaryProgress?300:C.animation.delay,m=C.createClipPath(C.clipPath,null,n?a:"",n),f.appendChild(C.clipPath),!C.animation.enable||C.isIndeterminate||C.isActive||(u.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,P,d,m,C,S,this.delay,n?e:null,n?t:null)),C.isIndeterminate&&(C.enableProgressSegments&&m.setAttribute("d",l(this.centerX,this.centerY,s+S/2,C.startAngle,this.trackEndAngle,C.enableRtl,!0)),u.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularIndeterminate(C.enableProgressSegments?u:m,C,A,P,this.centerX,this.centerY,s,S,m))),C.svgObject.appendChild(f))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c,p,h,d,u,g,m,y;a=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),o=e.calculateProgressRange(e.secondaryProgress),m=(e.startAngle+(e.enableRtl?-o:o))%360,c=l(this.centerX,this.centerY,t,e.startAngle,m,e.enableRtl,e.enablePieProgress),y=this.checkingCircularProgressColor(),h=e.enablePieProgress?y:"none",d=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,p=new r.PathOption(e.element.id+"_Circularbuffer",h,d,y,e.themeStyle.bufferOpacity,"0",c),0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(s=e.renderer.drawPath(p),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&s.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||s.setAttribute("stroke-linecap","round")):(g=e.enableProgressSegments?n:e.totalAngle,u=e.enableProgressSegments?e.progressWidth:e.trackWidth,s=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,d,g,u)),a.appendChild(s),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),a.appendChild(e.bufferClipPath),s.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,m,o,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(a)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s,a,l,c,p=this.progress,h=p.labelStyle.text;c=p.renderer.createGroup({id:p.element.id+"_CircularLabelGroup"}),document.getElementById(c.id)&&document.getElementById(c.id).remove(),a=(p.value-p.minimum)/(p.maximum-p.minimum)*100,n=p.value<p.minimum||p.value>p.maximum?0:Math.round(a),o={cancel:!1,text:h||String(n)+"%",color:p.labelStyle.color},p.trigger("textRender",o),o.cancel||(s=r.measureText(o.text,p.labelStyle),i=this.centerY+s.height/2,l=new R(p.element.id+"_circularLabel",p.labelStyle.size||p.themeStyle.circularFontSize,p.labelStyle.fontStyle||p.themeStyle.circularFontStyle,p.labelStyle.fontFamily||p.themeStyle.circularFontFamily,p.labelStyle.fontWeight,"middle",o.color||p.themeStyle.fontColor,this.centerX,i,p.progressRect.width,p.progressRect.height),t=p.renderer.createText(l,o.text),c.appendChild(t),p.animation.enable&&!p.isIndeterminate&&(e=(p.value-p.minimum)/(p.maximum-p.minimum)*p.totalAngle,e=p.value<p.minimum||p.value>p.maximum?0:e,this.animation.doLabelAnimation(t,p.startAngle,e,p,this.delay)),p.svgObject.appendChild(c))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p,h=this.progress,d=n+1;a?(l=r.getElement(h.element.id+"_CircularActiveProgress")).setAttribute("d",i):(p=new r.PathOption(h.element.id+"_CircularActiveProgress","none",d,"#ffffff",.5,"0",i),l=h.renderer.drawPath(p)),h.segmentCount>1&&l.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&l.setAttribute("stroke-linecap","round"),c=h.createClipPath(h.clipPath,null,"",a),l.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),e.appendChild(l),e.appendChild(h.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,c,h,d,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i;return 0===(n=parseInt(e.radius,10)-parseInt(e.innerRadius,10))||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(i=e.trackWidth+(n<0?e.trackWidth*Math.abs(n)/parseInt(e.radius,10):-e.trackWidth*Math.abs(n)/parseInt(e.radius,10)),r=e.calculateSegmentSize(i,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.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,i=t||this.minimum,o=r||this.maximum;return n=(e-i)/(o-i)*("Linear"===this.type?1:this.totalAngle),e<i||e>o?0:n},n.prototype.calculateSegmentSize=function(e,t){var r="Circular"===this.type&&this.totalAngle===E?this.segmentCount:this.segmentCount-1,n=this.totalAngle===E||"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(e){var t=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var r={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(){t.isDestroyed?clearTimeout(t.resizeTo):(r.currentSize=t.progressSize,t.trigger("resized",r),null!==t.width&&null!==t.height||r.cancel||(t.secElement.innerHTML="",t.calculateProgressBarSize(),t.createSVG(),t.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([{}],L)],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=L,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 : 18.4.30
* version : 18.4.39
* 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){var r;e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"})),(r=document.getElementById("chartmeasuretext")).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),L=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),E="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,i;i=new S(0,0),(n=this.render(e,t))?this.setElementStyle(i,n,r):this.control.redraw&&(u(n.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(t){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,i){var o=this,s=new t.Animation({}),a=1e3/r.animation.duration;s.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||o.doStripedAnimation(e,r,n,!1)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m,y,f=this,v=new t.Animation({}),b=s,R=a.startAngle,P=n+c/2,S=0,C=0,A=a.isActive?3e3:a.animation.duration;R+="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,m=t.isNullOrUndefined(d)?R:d,y=t.isNullOrUndefined(d)?o:o-u,b.setAttribute("visibility","Hidden"),v.animate(b,{duration:A,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(b.setAttribute("visibility","visible"),a.isActive?(S=f.activeAnimate(t.timeStamp/t.duration,m,y,a.enableRtl),C=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",C.toString()),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))):(S=h(t.timeStamp,m,y,t.duration,a.enableRtl),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))))},end:function(t){a.cancelResize=!1,b.setAttribute("visibility",""),b.setAttribute("d",l(e,r,P,R,i,a.enableRtl,!0)),a.isActive&&f.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(t){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,d,u=new t.Animation({}),g=0,m=r.annotations.length>0,y=r.startAngle,f=r.totalAngle;m&&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=y+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),p=t.isNullOrUndefined(n)?y:n,d=t.isNullOrUndefined(n)?a:a-i,r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":u.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,m&&o&&(g=h(e.timeStamp,p,d,e.duration,!1),l=parseInt(((Math.round(g)-y)/f*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(e){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(e){},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,L=0;L<w;L++)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+L,"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,l=[];return a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()},l[0]={color:t,colorStop:"50%"},l[1]={color:r,colorStop:"100%"},(s=o.renderer.drawGradient("linearGradient",a,l)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),s},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p,h,d=[],u=a(s,l,o,n),g=a(s,l,o,i);return h={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:g.x.toString(),y1:u.y.toString(),y2:g.y.toString()},d[0]={color:t,colorStop:"50%"},d[1]={color:r,colorStop:"100%"},(p=c.renderer.drawGradient("linearGradient",h,d)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),p},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,i,o=this.progress,s=o.renderer.createGroup({id:o.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,n=o.trackThickness||o.themeStyle.linearTrackThickness,i=o.argsData.trackColor||o.themeStyle.linearTrackColor,"Round4px"===o.cornerRadius?o.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",i,n,!0,0,o):(t=new r.PathOption(o.element.id+"_Lineartrack",i,0,"none",o.themeStyle.trackOpacity,"0",this.cornerRadius(o.progressRect.x,o.progressRect.y,o.progressRect.width,n,4,"")),e=o.renderer.drawPath(t)):(t=new r.PathOption(o.element.id+"_Lineartrack","none",n,i,o.themeStyle.trackOpacity,"0",o.getPathLine(o.progressRect.x,o.progressRect.width,n)),e=o.renderer.drawPath(t),o.trackWidth=e.getTotalLength(),"Round"!==o.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),o.segmentCount>1&&!this.isRange&&!o.enableProgressSegments&&(o.segmentSize=o.calculateSegmentSize(o.trackWidth,n),e.setAttribute("stroke-dasharray",o.segmentSize))),s.appendChild(e),o.svgObject.appendChild(s)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d,u,g,m=this.progress,y=m.value===m.maximum;o=m.calculateProgressRange(m.argsData.value),m.previousWidth=s=m.progressRect.width*(m.isIndeterminate&&!m.enableProgressSegments?1:o),c=e?r.getElement(m.element.id+"_LinearProgressGroup"):m.renderer.createGroup({id:m.element.id+"_LinearProgressGroup"}),h=m.progressThickness||m.themeStyle.linearProgressThickness,d=m.isStriped?"url(#"+m.element.id+"_LinearStriped)":this.checkingLinearProgressColor(),n="Round4px"===m.cornerRadius?new r.PathOption(m.element.id+"_Linearprogress",d,0,"none",m.themeStyle.progressOpacity,"0",this.cornerRadius(m.progressRect.x,m.progressRect.y,s,h,4,y||m.isIndeterminate?"":"start")):new r.PathOption(m.element.id+"_Linearprogress","none",h,d,m.themeStyle.progressOpacity,"0",m.getPathLine(m.progressRect.x,s,h)),m.progressWidth=m.renderer.drawPath(n).getTotalLength(),m.segmentSize=m.enableProgressSegments?m.calculateSegmentSize(m.progressWidth,h):m.segmentSize,null===m.secondaryProgress||m.isIndeterminate||this.renderLinearBuffer(m),null!==m.argsData.value&&("Round4px"===m.cornerRadius?i=m.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",d,h,!1,s,m,m.themeStyle.progressOpacity):m.renderer.drawPath(n):0===m.segmentColor.length||m.isIndeterminate||this.isRange?this.isRange&&!m.isIndeterminate?i=this.segment.createLinearRange(s,m):(e?((i=r.getElement(m.element.id+"_Linearprogress")).setAttribute("d",m.getPathLine(m.progressRect.x,s,h)),i.setAttribute("stroke",d)):i=m.renderer.drawPath(n),m.segmentCount>1&&i.setAttribute("stroke-dasharray",m.segmentSize),"Round"===m.cornerRadius&&o&&i.setAttribute("stroke-linecap","round")):(u=m.enableProgressSegments?m.progressWidth:m.trackWidth,i=this.segment.createLinearSegment(m,"_LinearProgressSegment",s,m.themeStyle.progressOpacity,h,u)),c.appendChild(i),m.isStriped&&!m.isIndeterminate&&(g=this.checkingLinearProgressColor(),this.renderLinearStriped(g,c,m)),!m.isActive||m.isIndeterminate||m.isStriped||this.renderActiveState(c,o,s,h,e),!m.animation.enable||m.isIndeterminate||m.isActive||m.isStriped||(p=null!==m.secondaryProgress?m.animation.delay+(this.bufferWidth-s):m.animation.delay,this.delay=p,a=m.createClipPath(m.clipPath,o,null,e,h,!1,"Round4px"===m.cornerRadius&&y),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearAnimation(a,m,p,e?t:0)),m.isIndeterminate&&(l=m.createClipPath(m.clipPath,m.enableProgressSegments?1:o,null,e,h,m.enableProgressSegments),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearIndeterminate(m.enableProgressSegments?i:l,s,h,m,l)),m.svgObject.appendChild(c))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a,l,c,p,h=e.secondaryProgress===e.maximum;n=e.calculateProgressRange(e.secondaryProgress),this.bufferWidth=s=e.progressRect.width*n,o=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),l=e.progressThickness||e.themeStyle.linearProgressThickness,c=this.checkingLinearProgressColor(),"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",c,l,!1,s,e,e.themeStyle.bufferOpacity):(a=new r.PathOption(e.element.id+"_Linearbuffer",c,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,s,l,4,h?"":"start")),t=e.renderer.drawPath(a)):(a=new r.PathOption(e.element.id+"_Linearbuffer","none",l,c,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,s,l)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(a),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(p=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",s,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,p))),o.appendChild(t),e.animation.enable&&(i=e.createClipPath(e.bufferClipPath,n,null,!1,l,!1,"Round4px"===e.cornerRadius&&h),o.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(i,e,e.animation.delay,0)),e.svgObject.appendChild(o)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d,u,g,m,y,f,v=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,b=this.progress,R=b.labelStyle.textAlignment,S=b.labelStyle.text,C=this.checkingLinearProgressColor(),A=b.progressRect.width*b.calculateProgressRange(b.value);f=b.renderer.createGroup({id:b.element.id+"_LinearLabelGroup"}),c=(b.value-b.minimum)/(b.maximum-b.minimum)*100,t=b.value<b.minimum||b.value>b.maximum?0:Math.round(c),g=o(s(C)),m=Math.round((299*g.r+587*g.g+114*g.b)/1e3),a={cancel:!1,text:S||String(t)+"%",color:b.labelStyle.color},b.trigger("textRender",a),a.cancel||(l=r.measureText(a.text,b.labelStyle),h=b.enableRtl?b.progressRect.x+b.progressRect.width-l.width/2:b.progressRect.x+l.width/2,"Near"===R?n=h+(b.enableRtl?-5:5):"Center"===R?(u=b.enableRtl?b.progressRect.x+b.progressRect.width-A/2:b.progressRect.x+A/2,n=(b.enableRtl?u<=h:u>=h)?u:h):(d=b.enableRtl?b.progressRect.x+b.progressRect.width-A+l.width/2:b.progressRect.x+A-l.width/2,d+=b.enableRtl?5:-5,n=(b.enableRtl?d<=h:d>=h)?d:h),i="Round4px"===this.progress.cornerRadius?b.progressRect.y+v/2+l.height/4:b.progressRect.y+b.progressRect.height/2+l.height/4,p=new P(b.element.id+"_linearLabel",b.labelStyle.size||b.themeStyle.linearFontSize,b.labelStyle.fontStyle||b.themeStyle.linearFontStyle,b.labelStyle.fontFamily||b.themeStyle.linearFontFamily,b.labelStyle.fontWeight,"middle",a.color||(m>=128?"black":"white"),n,i),e=b.renderer.createText(p,a.text),f.appendChild(e),b.animation.enable&&!b.isIndeterminate&&(y=b.renderer.createClipPath({id:b.element.id+"_clippathLabel"}),b.createClipPath(y,1,null,!1,b.progressThickness||b.themeStyle.linearProgressThickness,!0),f.appendChild(y),e.setAttribute("style","clip-path:url(#"+b.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,0,A,b,this.delay,l.width)),b.svgObject.appendChild(f))},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l,c=this.progress,p=c.value===c.maximum;"Round4px"===c.cornerRadius?c.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,c,.5):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(c.progressRect.x,c.progressRect.y,n,i,4,p?"":"start")),s=c.renderer.drawPath(l)):(o?(s=r.getElement(c.element.id+"_LinearActiveProgress")).setAttribute("d",c.getPathLine(c.progressRect.x,n,i)):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",c.getPathLine(c.progressRect.x,n,i)),s=c.renderer.drawPath(l)),c.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",c.segmentSize),"Round"===c.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round")),a=c.createClipPath(c.clipPath,t,null,o,i,!1),s.setAttribute("style","clip-path:url(#"+c.element.id+"_clippath)"),e.appendChild(s),e.appendChild(c.clipPath),this.animation.doLinearAnimation(a,c,0,0,s)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(E,"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(E,"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,i,o,s,a,p,h,d=this.progress,u=d.renderer.createGroup({id:d.element.id+"_CircularTrackGroup"});t=d.startAngle,d.totalAngle=(d.endAngle-d.startAngle)%360,d.totalAngle=d.totalAngle<=0?360+d.totalAngle:d.totalAngle,d.totalAngle-=360===d.totalAngle?.01:0,this.trackEndAngle=n=(d.startAngle+(d.enableRtl?-d.totalAngle:+d.totalAngle))%360,this.centerX=d.progressRect.x+d.progressRect.width/2,this.centerY=d.progressRect.y+d.progressRect.height/2,this.maxThickness=Math.max(d.trackThickness,d.progressThickness)||Math.max(d.themeStyle.circularProgressThickness,d.themeStyle.circularTrackThickness),this.availableSize=Math.min(d.progressRect.height,d.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(d.radius,this.availableSize))?0:e,h=d.argsData.trackColor||d.themeStyle.circularTrackColor,a=d.enablePieProgress?d.argsData.trackColor||d.themeStyle.circularTrackColor:"none",p=d.enablePieProgress?0:d.trackThickness||d.themeStyle.circularTrackThickness,o=l(this.centerX,this.centerY,e,t,n,d.enableRtl,d.enablePieProgress),this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,s=new r.PathOption(d.element.id+"_Circulartrack",a,p,h,d.themeStyle.trackOpacity,"0",o),i=d.renderer.drawPath(s),d.trackWidth=i.getTotalLength(),d.segmentCount>1&&!d.enableProgressSegments&&!d.enablePieProgress&&!this.isRange&&(d.segmentSize=d.calculateSegmentSize(d.trackWidth,p),i.setAttribute("stroke-dasharray",d.segmentSize)),"Round"!==d.cornerRadius||d.enablePieProgress||this.isRange||i.setAttribute("stroke-linecap","round"),u.appendChild(i),d.svgObject.appendChild(u)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y,f,v,b,R,P,S,C=this.progress,A=C.startAngle;f=n?r.getElement(C.element.id+"_CircularProgressGroup"):C.renderer.createGroup({id:C.element.id+"_CircularProgressGroup"}),s=null===(s=c(C.innerRadius,this.availableSize))?0:s,C.previousTotalEnd=d=C.calculateProgressRange(C.argsData.value),P=(C.startAngle+(C.enableRtl?-d:d))%360,C.previousEndAngle=i=C.isIndeterminate&&!C.enableProgressSegments?(C.startAngle+(C.enableRtl?-C.totalAngle:C.totalAngle))%360:P,p=(p=(d-C.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0,h=l(this.centerX,this.centerY,s,A,i,C.enableRtl,C.enablePieProgress),y=this.checkingCircularProgressColor(),v=C.enablePieProgress?y:"none",S=C.progressThickness||C.themeStyle.circularProgressThickness,b=C.enablePieProgress?0:S,g=new r.PathOption(C.element.id+"_Circularprogress",v,b,y,C.themeStyle.progressOpacity,"0",h),C.progressWidth=C.renderer.drawPath(g).getTotalLength(),C.segmentSize=this.validateSegmentSize(C,S),null===C.secondaryProgress||C.isIndeterminate||this.renderCircularBuffer(C,s,p),null!==C.argsData.value&&(0===C.segmentColor.length||C.isIndeterminate||C.enablePieProgress?this.isRange&&!C.isIndeterminate?u=this.segment.createCircularRange(this.centerX,this.centerY,s,C):(n?(a=(u=r.getElement(C.element.id+"_Circularprogress")).getAttribute("d"),u.setAttribute("stroke",y),u.setAttribute("d",h)):u=C.renderer.drawPath(g),C.segmentCount>1&&!C.enablePieProgress&&u.setAttribute("stroke-dasharray",C.segmentSize),"Round"===C.cornerRadius&&A!==i&&u.setAttribute("stroke-linecap","round")):(o=C.enableProgressSegments?p:C.totalAngle,R=C.enableProgressSegments?C.progressWidth:C.trackWidth,u=this.segment.createCircularSegment(C,"_CircularProgressSegment",this.centerX,this.centerY,s,C.argsData.value,C.themeStyle.progressOpacity,S,o,R)),f.appendChild(u),!C.isActive||C.isIndeterminate||C.enablePieProgress||this.renderActiveState(f,s,b,h,P,d,n),(C.animation.enable||C.isIndeterminate)&&(this.delay=null!==C.secondaryProgress?300:C.animation.delay,m=C.createClipPath(C.clipPath,null,n?a:"",n),f.appendChild(C.clipPath),!C.animation.enable||C.isIndeterminate||C.isActive||(u.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,P,d,m,C,S,this.delay,n?e:null,n?t:null)),C.isIndeterminate&&(C.enableProgressSegments&&m.setAttribute("d",l(this.centerX,this.centerY,s+S/2,C.startAngle,this.trackEndAngle,C.enableRtl,!0)),u.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularIndeterminate(C.enableProgressSegments?u:m,C,A,P,this.centerX,this.centerY,s,S,m))),C.svgObject.appendChild(f))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c,p,h,d,u,g,m,y;a=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),o=e.calculateProgressRange(e.secondaryProgress),m=(e.startAngle+(e.enableRtl?-o:o))%360,c=l(this.centerX,this.centerY,t,e.startAngle,m,e.enableRtl,e.enablePieProgress),y=this.checkingCircularProgressColor(),h=e.enablePieProgress?y:"none",d=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,p=new r.PathOption(e.element.id+"_Circularbuffer",h,d,y,e.themeStyle.bufferOpacity,"0",c),0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(s=e.renderer.drawPath(p),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&s.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||s.setAttribute("stroke-linecap","round")):(g=e.enableProgressSegments?n:e.totalAngle,u=e.enableProgressSegments?e.progressWidth:e.trackWidth,s=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,d,g,u)),a.appendChild(s),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),a.appendChild(e.bufferClipPath),s.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,m,o,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(a)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s,a,l,c,p=this.progress,h=p.labelStyle.text;c=p.renderer.createGroup({id:p.element.id+"_CircularLabelGroup"}),document.getElementById(c.id)&&document.getElementById(c.id).remove(),a=(p.value-p.minimum)/(p.maximum-p.minimum)*100,n=p.value<p.minimum||p.value>p.maximum?0:Math.round(a),o={cancel:!1,text:h||String(n)+"%",color:p.labelStyle.color},p.trigger("textRender",o),o.cancel||(s=r.measureText(o.text,p.labelStyle),i=this.centerY+s.height/2,l=new P(p.element.id+"_circularLabel",p.labelStyle.size||p.themeStyle.circularFontSize,p.labelStyle.fontStyle||p.themeStyle.circularFontStyle,p.labelStyle.fontFamily||p.themeStyle.circularFontFamily,p.labelStyle.fontWeight,"middle",o.color||p.themeStyle.fontColor,this.centerX,i,p.progressRect.width,p.progressRect.height),t=p.renderer.createText(l,o.text),c.appendChild(t),p.animation.enable&&!p.isIndeterminate&&(e=(p.value-p.minimum)/(p.maximum-p.minimum)*p.totalAngle,e=p.value<p.minimum||p.value>p.maximum?0:e,this.animation.doLabelAnimation(t,p.startAngle,e,p,this.delay)),p.svgObject.appendChild(c))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p,h=this.progress,d=n+1;a?(l=r.getElement(h.element.id+"_CircularActiveProgress")).setAttribute("d",i):(p=new r.PathOption(h.element.id+"_CircularActiveProgress","none",d,"#ffffff",.5,"0",i),l=h.renderer.drawPath(p)),h.segmentCount>1&&l.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&l.setAttribute("stroke-linecap","round"),c=h.createClipPath(h.clipPath,null,"",a),l.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),e.appendChild(l),e.appendChild(h.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,c,h,d,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i;return n=parseInt(e.radius,10)-parseInt(e.innerRadius,10),0===n||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(i=e.trackWidth+(n<0?e.trackWidth*Math.abs(n)/parseInt(e.radius,10):-e.trackWidth*Math.abs(n)/parseInt(e.radius,10)),r=e.calculateSegmentSize(i,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.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,i=t||this.minimum,o=r||this.maximum;return n=(e-i)/(o-i)*("Linear"===this.type?1:this.totalAngle),e<i||e>o?0:n},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(e){var t=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var r={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(t.isDestroyed)return void clearTimeout(t.resizeTo);r.currentSize=t.progressSize,t.trigger("resized",r),null!==t.width&&null!==t.height||r.cancel||(t.secElement.innerHTML="",t.calculateProgressBarSize(),t.createSVG(),t.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(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([{}],L)],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=L,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){var r;e="transparent"===e?"white":e,document.body.appendChild(t.createElement("text",{id:"chartmeasuretext"})),(r=document.getElementById("chartmeasuretext")).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),L=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),E="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,i;i=new S(0,0),(n=this.render(e,t))?this.setElementStyle(i,n,r):this.control.redraw&&(u(n.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(t){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,i){var o=this,s=new t.Animation({}),a=1e3/r.animation.duration;s.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(){n+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+n+") rotate(-45)")},end:function(){r.destroyIndeterminate||o.doStripedAnimation(e,r,n,!1)}})},e.prototype.doCircularAnimation=function(e,r,n,i,o,s,a,c,p,d,u,g){var m,y,f=this,v=new t.Animation({}),b=s,R=a.startAngle,P=n+c/2,S=0,C=0,A=a.isActive?3e3:a.animation.duration;R+="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,m=t.isNullOrUndefined(d)?R:d,y=t.isNullOrUndefined(d)?o:o-u,b.setAttribute("visibility","Hidden"),v.animate(b,{duration:A,delay:p,progress:function(t){a.cancelResize=!0,t.timeStamp>=t.delay&&(b.setAttribute("visibility","visible"),a.isActive?(S=f.activeAnimate(t.timeStamp/t.duration,m,y,a.enableRtl),C=h(t.timeStamp,.5,.5,t.duration,!0),g.setAttribute("opacity",C.toString()),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))):(S=h(t.timeStamp,m,y,t.duration,a.enableRtl),b.setAttribute("d",l(e,r,P,R,S%360,a.enableRtl,!0))))},end:function(t){a.cancelResize=!1,b.setAttribute("visibility",""),b.setAttribute("d",l(e,r,P,R,i,a.enableRtl,!0)),a.isActive&&f.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(t){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,d,u=new t.Animation({}),g=0,m=r.annotations.length>0,y=r.startAngle,f=r.totalAngle;m&&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=y+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),p=t.isNullOrUndefined(n)?y:n,d=t.isNullOrUndefined(n)?a:a-i,r.argsData.value<=r.minimum||r.argsData.value>r.maximum?o.innerHTML=c+"%":u.animate(e,{duration:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,m&&o&&(g=h(e.timeStamp,p,d,e.duration,!1),l=parseInt(((Math.round(g)-y)/f*100).toString(),10),o.innerHTML=l?l.toString()+"%":"0%")},end:function(e){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(e){},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,L=0;L<w;L++)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+L,"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,l=[];return a={id:"lineRangeGrad_"+e,x1:n.toString(),x2:i.toString()},l[0]={color:t,colorStop:"50%"},l[1]={color:r,colorStop:"100%"},(s=o.renderer.drawGradient("linearGradient",a,l)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),s},e.prototype.setCircularGradientColor=function(e,t,r,n,i,o,s,l,c){var p,h,d=[],u=a(s,l,o,n),g=a(s,l,o,i);return h={id:"circleRangeGrad_"+e,x1:u.x.toString(),x2:g.x.toString(),y1:u.y.toString(),y2:g.y.toString()},d[0]={color:t,colorStop:"50%"},d[1]={color:r,colorStop:"100%"},(p=c.renderer.drawGradient("linearGradient",h,d)).firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),p},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,i,o=this.progress,s=o.renderer.createGroup({id:o.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,n=o.trackThickness||o.themeStyle.linearTrackThickness,i=o.argsData.trackColor||o.themeStyle.linearTrackColor,"Round4px"===o.cornerRadius?o.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",i,n,!0,0,o):(t=new r.PathOption(o.element.id+"_Lineartrack",i,0,"none",o.themeStyle.trackOpacity,"0",this.cornerRadius(o.progressRect.x,o.progressRect.y,o.progressRect.width,n,4,"")),e=o.renderer.drawPath(t)):(t=new r.PathOption(o.element.id+"_Lineartrack","none",n,i,o.themeStyle.trackOpacity,"0",o.getPathLine(o.progressRect.x,o.progressRect.width,n)),e=o.renderer.drawPath(t),o.trackWidth=e.getTotalLength(),"Round"!==o.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),o.segmentCount>1&&!this.isRange&&!o.enableProgressSegments&&(o.segmentSize=o.calculateSegmentSize(o.trackWidth,n),e.setAttribute("stroke-dasharray",o.segmentSize))),s.appendChild(e),o.svgObject.appendChild(s)},e.prototype.renderLinearProgress=function(e,t){void 0===t&&(t=0);var n,i,o,s,a,l,c,p,h,d,u,g,m=this.progress,y=m.value===m.maximum;o=m.calculateProgressRange(m.argsData.value),m.previousWidth=s=m.progressRect.width*(m.isIndeterminate&&!m.enableProgressSegments?1:o),c=e?r.getElement(m.element.id+"_LinearProgressGroup"):m.renderer.createGroup({id:m.element.id+"_LinearProgressGroup"}),h=m.progressThickness||m.themeStyle.linearProgressThickness,d=m.isStriped?"url(#"+m.element.id+"_LinearStriped)":this.checkingLinearProgressColor(),n="Round4px"===m.cornerRadius?new r.PathOption(m.element.id+"_Linearprogress",d,0,"none",m.themeStyle.progressOpacity,"0",this.cornerRadius(m.progressRect.x,m.progressRect.y,s,h,4,y||m.isIndeterminate?"":"start")):new r.PathOption(m.element.id+"_Linearprogress","none",h,d,m.themeStyle.progressOpacity,"0",m.getPathLine(m.progressRect.x,s,h)),m.progressWidth=m.renderer.drawPath(n).getTotalLength(),m.segmentSize=m.enableProgressSegments?m.calculateSegmentSize(m.progressWidth,h):m.segmentSize,null===m.secondaryProgress||m.isIndeterminate||this.renderLinearBuffer(m),null!==m.argsData.value&&("Round4px"===m.cornerRadius?i=m.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",d,h,!1,s,m,m.themeStyle.progressOpacity):m.renderer.drawPath(n):0===m.segmentColor.length||m.isIndeterminate||this.isRange?this.isRange&&!m.isIndeterminate?i=this.segment.createLinearRange(s,m):(e?((i=r.getElement(m.element.id+"_Linearprogress")).setAttribute("d",m.getPathLine(m.progressRect.x,s,h)),i.setAttribute("stroke",d)):i=m.renderer.drawPath(n),m.segmentCount>1&&i.setAttribute("stroke-dasharray",m.segmentSize),"Round"===m.cornerRadius&&o&&i.setAttribute("stroke-linecap","round")):(u=m.enableProgressSegments?m.progressWidth:m.trackWidth,i=this.segment.createLinearSegment(m,"_LinearProgressSegment",s,m.themeStyle.progressOpacity,h,u)),c.appendChild(i),m.isStriped&&!m.isIndeterminate&&(g=this.checkingLinearProgressColor(),this.renderLinearStriped(g,c,m)),!m.isActive||m.isIndeterminate||m.isStriped||this.renderActiveState(c,o,s,h,e),!m.animation.enable||m.isIndeterminate||m.isActive||m.isStriped||(p=null!==m.secondaryProgress?m.animation.delay+(this.bufferWidth-s):m.animation.delay,this.delay=p,a=m.createClipPath(m.clipPath,o,null,e,h,!1,"Round4px"===m.cornerRadius&&y),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearAnimation(a,m,p,e?t:0)),m.isIndeterminate&&(l=m.createClipPath(m.clipPath,m.enableProgressSegments?1:o,null,e,h,m.enableProgressSegments),c.appendChild(m.clipPath),i.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doLinearIndeterminate(m.enableProgressSegments?i:l,s,h,m,l)),m.svgObject.appendChild(c))},e.prototype.renderLinearBuffer=function(e){var t,n,i,o,s,a,l,c,p,h=e.secondaryProgress===e.maximum;n=e.calculateProgressRange(e.secondaryProgress),this.bufferWidth=s=e.progressRect.width*n,o=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),l=e.progressThickness||e.themeStyle.linearProgressThickness,c=this.checkingLinearProgressColor(),"Round4px"===e.cornerRadius?e.segmentCount>1?t=this.createRoundCornerSegment("_Linearbuffer_",c,l,!1,s,e,e.themeStyle.bufferOpacity):(a=new r.PathOption(e.element.id+"_Linearbuffer",c,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,s,l,4,h?"":"start")),t=e.renderer.drawPath(a)):(a=new r.PathOption(e.element.id+"_Linearbuffer","none",l,c,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,s,l)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(t=e.renderer.drawPath(a),e.segmentCount>1&&!this.isRange&&t.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||t.setAttribute("stroke-linecap","round")):(p=e.enableProgressSegments?e.progressWidth:e.trackWidth,t=this.segment.createLinearSegment(e,"_LinearBufferSegment",s,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,p))),o.appendChild(t),e.animation.enable&&(i=e.createClipPath(e.bufferClipPath,n,null,!1,l,!1,"Round4px"===e.cornerRadius&&h),o.appendChild(e.bufferClipPath),t.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(i,e,e.animation.delay,0)),e.svgObject.appendChild(o)},e.prototype.renderLinearLabel=function(){var e,t,n,i,a,l,c,p,h,d,u,g,m,y,f,v=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,b=this.progress,R=b.labelStyle.textAlignment,S=b.labelStyle.text,C=this.checkingLinearProgressColor(),A=b.progressRect.width*b.calculateProgressRange(b.value);f=b.renderer.createGroup({id:b.element.id+"_LinearLabelGroup"}),c=(b.value-b.minimum)/(b.maximum-b.minimum)*100,t=b.value<b.minimum||b.value>b.maximum?0:Math.round(c),g=o(s(C)),m=Math.round((299*g.r+587*g.g+114*g.b)/1e3),a={cancel:!1,text:S||String(t)+"%",color:b.labelStyle.color},b.trigger("textRender",a),a.cancel||(l=r.measureText(a.text,b.labelStyle),h=b.enableRtl?b.progressRect.x+b.progressRect.width-l.width/2:b.progressRect.x+l.width/2,b.labelOnTrack?"Near"===R?n=h+(b.enableRtl?-5:5):"Center"===R?(u=b.enableRtl?b.progressRect.x+b.progressRect.width-A/2:b.progressRect.x+A/2,n=(b.enableRtl?u<=h:u>=h)?u:h):(d=b.enableRtl?b.progressRect.x+b.progressRect.width-A+l.width/2:b.progressRect.x+A-l.width/2,d+=b.enableRtl?5:-5,n=(b.enableRtl?d<=h:d>=h)?d:h):"Near"===R?n=h+(b.enableRtl?-5:5):"Center"===R?n=(b.progressRect.x+b.progressRect.width)/2:(n=b.enableRtl?b.progressRect.x+l.width/2:b.progressRect.x+b.progressRect.width-l.width/2,n+=b.enableRtl?5:-5),i="Round4px"===this.progress.cornerRadius?b.progressRect.y+v/2+l.height/4:b.progressRect.y+b.progressRect.height/2+l.height/4,p=new P(b.element.id+"_linearLabel",b.labelStyle.size||b.themeStyle.linearFontSize,b.labelStyle.fontStyle||b.themeStyle.linearFontStyle,b.labelStyle.fontFamily||b.themeStyle.linearFontFamily,b.labelStyle.fontWeight,"middle",a.color||(m>=128?"black":"white"),n,i),e=b.renderer.createText(p,a.text),f.appendChild(e),b.animation.enable&&!b.isIndeterminate&&(y=b.renderer.createClipPath({id:b.element.id+"_clippathLabel"}),b.createClipPath(y,1,null,!1,b.progressThickness||b.themeStyle.linearProgressThickness,!0),f.appendChild(y),e.setAttribute("style","clip-path:url(#"+b.element.id+"_clippathLabel)"),this.animation.doLabelAnimation(e,0,A,b,this.delay,l.width)),b.svgObject.appendChild(f))},e.prototype.renderActiveState=function(e,t,n,i,o){var s,a,l,c=this.progress,p=c.value===c.maximum;"Round4px"===c.cornerRadius?c.segmentCount>1?s=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",i,!1,n,c,.5):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(c.progressRect.x,c.progressRect.y,n,i,4,p?"":"start")),s=c.renderer.drawPath(l)):(o?(s=r.getElement(c.element.id+"_LinearActiveProgress")).setAttribute("d",c.getPathLine(c.progressRect.x,n,i)):(l=new r.PathOption(c.element.id+"_LinearActiveProgress","none",i,"#ffffff",.5,"",c.getPathLine(c.progressRect.x,n,i)),s=c.renderer.drawPath(l)),c.segmentCount>1&&!this.isRange&&s.setAttribute("stroke-dasharray",c.segmentSize),"Round"===c.cornerRadius&&t&&!this.isRange&&s.setAttribute("stroke-linecap","round")),a=c.createClipPath(c.clipPath,t,null,o,i,!1),s.setAttribute("style","clip-path:url(#"+c.element.id+"_clippath)"),e.appendChild(s),e.appendChild(c.clipPath),this.animation.doLinearAnimation(a,c,0,0,s)},e.prototype.renderLinearStriped=function(e,t,r){var n,i=r.renderer.createDefs(),o=document.createElementNS(E,"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(E,"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,i,o,s,a,p,h,d=this.progress,u=d.renderer.createGroup({id:d.element.id+"_CircularTrackGroup"});t=d.startAngle,d.totalAngle=(d.endAngle-d.startAngle)%360,d.totalAngle=d.totalAngle<=0?360+d.totalAngle:d.totalAngle,d.totalAngle-=360===d.totalAngle?.01:0,this.trackEndAngle=n=(d.startAngle+(d.enableRtl?-d.totalAngle:+d.totalAngle))%360,this.centerX=d.progressRect.x+d.progressRect.width/2,this.centerY=d.progressRect.y+d.progressRect.height/2,this.maxThickness=Math.max(d.trackThickness,d.progressThickness)||Math.max(d.themeStyle.circularProgressThickness,d.themeStyle.circularTrackThickness),this.availableSize=Math.min(d.progressRect.height,d.progressRect.width)/2-this.maxThickness/2,e=null===(e=c(d.radius,this.availableSize))?0:e,h=d.argsData.trackColor||d.themeStyle.circularTrackColor,a=d.enablePieProgress?d.argsData.trackColor||d.themeStyle.circularTrackColor:"none",p=d.enablePieProgress?0:d.trackThickness||d.themeStyle.circularTrackThickness,o=l(this.centerX,this.centerY,e,t,n,d.enableRtl,d.enablePieProgress),this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end,s=new r.PathOption(d.element.id+"_Circulartrack",a,p,h,d.themeStyle.trackOpacity,"0",o),i=d.renderer.drawPath(s),d.trackWidth=i.getTotalLength(),d.segmentCount>1&&!d.enableProgressSegments&&!d.enablePieProgress&&!this.isRange&&(d.segmentSize=d.calculateSegmentSize(d.trackWidth,p),i.setAttribute("stroke-dasharray",d.segmentSize)),"Round"!==d.cornerRadius||d.enablePieProgress||this.isRange||i.setAttribute("stroke-linecap","round"),u.appendChild(i),d.svgObject.appendChild(u)},e.prototype.renderCircularProgress=function(e,t,n){var i,o,s,a,p,h,d,u,g,m,y,f,v,b,R,P,S,C=this.progress,A=C.startAngle;f=n?r.getElement(C.element.id+"_CircularProgressGroup"):C.renderer.createGroup({id:C.element.id+"_CircularProgressGroup"}),s=null===(s=c(C.innerRadius,this.availableSize))?0:s,C.previousTotalEnd=d=C.calculateProgressRange(C.argsData.value),P=(C.startAngle+(C.enableRtl?-d:d))%360,C.previousEndAngle=i=C.isIndeterminate&&!C.enableProgressSegments?(C.startAngle+(C.enableRtl?-C.totalAngle:C.totalAngle))%360:P,p=(p=(d-C.startAngle)%360)<=0?360+p:p,p-=360===p?.01:0,h=l(this.centerX,this.centerY,s,A,i,C.enableRtl,C.enablePieProgress),y=this.checkingCircularProgressColor(),v=C.enablePieProgress?y:"none",S=C.progressThickness||C.themeStyle.circularProgressThickness,b=C.enablePieProgress?0:S,g=new r.PathOption(C.element.id+"_Circularprogress",v,b,y,C.themeStyle.progressOpacity,"0",h),C.progressWidth=C.renderer.drawPath(g).getTotalLength(),C.segmentSize=this.validateSegmentSize(C,S),null===C.secondaryProgress||C.isIndeterminate||this.renderCircularBuffer(C,s,p),null!==C.argsData.value&&(0===C.segmentColor.length||C.isIndeterminate||C.enablePieProgress?this.isRange&&!C.isIndeterminate?u=this.segment.createCircularRange(this.centerX,this.centerY,s,C):(n?(a=(u=r.getElement(C.element.id+"_Circularprogress")).getAttribute("d"),u.setAttribute("stroke",y),u.setAttribute("d",h)):u=C.renderer.drawPath(g),C.segmentCount>1&&!C.enablePieProgress&&u.setAttribute("stroke-dasharray",C.segmentSize),"Round"===C.cornerRadius&&A!==i&&u.setAttribute("stroke-linecap","round")):(o=C.enableProgressSegments?p:C.totalAngle,R=C.enableProgressSegments?C.progressWidth:C.trackWidth,u=this.segment.createCircularSegment(C,"_CircularProgressSegment",this.centerX,this.centerY,s,C.argsData.value,C.themeStyle.progressOpacity,S,o,R)),f.appendChild(u),!C.isActive||C.isIndeterminate||C.enablePieProgress||this.renderActiveState(f,s,b,h,P,d,n),(C.animation.enable||C.isIndeterminate)&&(this.delay=null!==C.secondaryProgress?300:C.animation.delay,m=C.createClipPath(C.clipPath,null,n?a:"",n),f.appendChild(C.clipPath),!C.animation.enable||C.isIndeterminate||C.isActive||(u.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularAnimation(this.centerX,this.centerY,s,P,d,m,C,S,this.delay,n?e:null,n?t:null)),C.isIndeterminate&&(C.enableProgressSegments&&m.setAttribute("d",l(this.centerX,this.centerY,s+S/2,C.startAngle,this.trackEndAngle,C.enableRtl,!0)),u.setAttribute("style","clip-path:url(#"+C.element.id+"_clippath)"),this.animation.doCircularIndeterminate(C.enableProgressSegments?u:m,C,A,P,this.centerX,this.centerY,s,S,m))),C.svgObject.appendChild(f))},e.prototype.renderCircularBuffer=function(e,t,n){var i,o,s,a,c,p,h,d,u,g,m,y;a=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),o=e.calculateProgressRange(e.secondaryProgress),m=(e.startAngle+(e.enableRtl?-o:o))%360,c=l(this.centerX,this.centerY,t,e.startAngle,m,e.enableRtl,e.enablePieProgress),y=this.checkingCircularProgressColor(),h=e.enablePieProgress?y:"none",d=e.enablePieProgress?0:e.progressThickness||e.themeStyle.circularProgressThickness,p=new r.PathOption(e.element.id+"_Circularbuffer",h,d,y,e.themeStyle.bufferOpacity,"0",c),0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(s=e.renderer.drawPath(p),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&s.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||s.setAttribute("stroke-linecap","round")):(g=e.enableProgressSegments?n:e.totalAngle,u=e.enableProgressSegments?e.progressWidth:e.trackWidth,s=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,t,e.secondaryProgress,e.themeStyle.bufferOpacity,d,g,u)),a.appendChild(s),e.animation.enable&&!e.isActive&&(i=e.createClipPath(e.bufferClipPath,null,"",!1),a.appendChild(e.bufferClipPath),s.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,t,m,o,i,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(a)},e.prototype.renderCircularLabel=function(){var e,t,n,i,o,s,a,l,c,p=this.progress,h=p.labelStyle.text;c=p.renderer.createGroup({id:p.element.id+"_CircularLabelGroup"}),document.getElementById(c.id)&&document.getElementById(c.id).remove(),a=(p.value-p.minimum)/(p.maximum-p.minimum)*100,n=p.value<p.minimum||p.value>p.maximum?0:Math.round(a),o={cancel:!1,text:h||String(n)+"%",color:p.labelStyle.color},p.trigger("textRender",o),o.cancel||(s=r.measureText(o.text,p.labelStyle),i=this.centerY+s.height/2,l=new P(p.element.id+"_circularLabel",p.labelStyle.size||p.themeStyle.circularFontSize,p.labelStyle.fontStyle||p.themeStyle.circularFontStyle,p.labelStyle.fontFamily||p.themeStyle.circularFontFamily,p.labelStyle.fontWeight,"middle",o.color||p.themeStyle.fontColor,this.centerX,i,p.progressRect.width,p.progressRect.height),t=p.renderer.createText(l,o.text),c.appendChild(t),p.animation.enable&&!p.isIndeterminate&&(e=(p.value-p.minimum)/(p.maximum-p.minimum)*p.totalAngle,e=p.value<p.minimum||p.value>p.maximum?0:e,this.animation.doLabelAnimation(t,p.startAngle,e,p,this.delay)),p.svgObject.appendChild(c))},e.prototype.renderActiveState=function(e,t,n,i,o,s,a){var l,c,p,h=this.progress,d=n+1;a?(l=r.getElement(h.element.id+"_CircularActiveProgress")).setAttribute("d",i):(p=new r.PathOption(h.element.id+"_CircularActiveProgress","none",d,"#ffffff",.5,"0",i),l=h.renderer.drawPath(p)),h.segmentCount>1&&l.setAttribute("stroke-dasharray",h.segmentSize),"Round"===h.cornerRadius&&l.setAttribute("stroke-linecap","round"),c=h.createClipPath(h.clipPath,null,"",a),l.setAttribute("style","clip-path:url(#"+h.element.id+"_clippath)"),e.appendChild(l),e.appendChild(h.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,o,s,c,h,d,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,n,i;return n=parseInt(e.radius,10)-parseInt(e.innerRadius,10),0===n||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(i=e.trackWidth+(n<0?e.trackWidth*Math.abs(n)/parseInt(e.radius,10):-e.trackWidth*Math.abs(n)/parseInt(e.radius,10)),r=e.calculateSegmentSize(i,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.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,i=t||this.minimum,o=r||this.maximum;return n=(e-i)/(o-i)*("Linear"===this.type?1:this.totalAngle),e<i||e>o?0:n},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(e){var t=this;if(!((new Date).getTime()>this.controlRenderedTimeStamp+800))return!1;var r={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(t.isDestroyed)return void clearTimeout(t.resizeTo);r.currentSize=t.progressSize,t.trigger("resized",r),null!==t.width&&null!==t.height||r.cancel||(t.secElement.innerHTML="",t.calculateProgressBarSize(),t.createSVG(),t.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([{}],L)],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=L,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 : 18.4.30
* version : 18.4.39
* 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@18.4.30",
"_inBundle": false,
"_integrity": "sha512-6h1Bct0dWn8U1om86NdjDBikcOV1KDv1JAK4rIAas8BA4K1PPbMW18jo3xd0T9MzD1jO3ZD477srPpRofSKGnA==",
"_integrity": "sha512-1y+OFfAKBgYK4t9I86JeefqFsmeGSkCAmYSsAVM1UMFP5eLJe0kq4kvIo0sX25Mudi4d+Oazn1UjK4DwPWyrIw==",
"_location": "/@syncfusion/ej2-progressbar",

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

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-progressbar/-/ej2-progressbar-18.3.0.tgz",
"_shasum": "86750c48f63f10bc17dad641d5e605514e2c652d",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-progressbar/-/ej2-progressbar-18.4.30.tgz",
"_shasum": "225f76698d815391b43e922c90d83d2a00a57868",
"_spec": "@syncfusion/ej2-progressbar@*",

@@ -36,5 +36,5 @@ "_where": "/jenkins/workspace/automation_release_18.4.0.1-WOJ6QVY6EU5ONBWOYGQFKS2VU2UW7E67MOXUPKCE5AX7QQX7M5JQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~18.4.30",
"@syncfusion/ej2-data": "~18.4.30",
"@syncfusion/ej2-svg-base": "~18.4.30"
"@syncfusion/ej2-base": "~18.4.39",
"@syncfusion/ej2-data": "~18.4.39",
"@syncfusion/ej2-svg-base": "~18.4.39"
},

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

"typings": "index.d.ts",
"version": "18.4.30",
"version": "18.4.39",
"sideEffects": false
}

@@ -136,2 +136,8 @@ import { Component, Property, NotifyPropertyChanges, Browser, Complex, Event, Collection, EventHandler } from '@syncfusion/ej2-base';import { EmitType, INotifyPropertyChanged, createElement, remove, ModuleDeclaration, isNullOrUndefined } from '@syncfusion/ej2-base';import { Rect, Size, RectOption, stringToNumber } from './utils/helper';import { MarginModel, AnimationModel, FontModel, RangeColorModel } from './model/progress-base-model';import { Margin, Animation, Font, RangeColor } from './model/progress-base';import { ILoadedEventArgs, IProgressStyle, IProgressValueEventArgs } from './model/progress-interface';import { ITextRenderEventArgs, IProgressResizeEventArgs, IMouseEventArgs } from './model/progress-interface';import { SvgRenderer, PathOption, getElement } from '@syncfusion/ej2-svg-base';import { ProgressType, CornerType, ProgressTheme, ModeType } from './utils/enum';import { getProgressThemeColor } from './utils/theme';import { lineCapRadius, completeAngle, valueChanged, progressCompleted } from './model/constant';import { mouseClick, mouseDown, mouseLeave, mouseMove, mouseUp } from './model/constant';import { ProgressAnnotation } from './model/index';import { ProgressAnnotationSettingsModel } from './model/index';import { ProgressAnnotationSettings } from './model/index';import { Linear } from './types/linear-progress';import { Circular } from './types/circular-progress';import { ProgressAnimation } from './utils/progress-animation';

/**
* labelOnTrack
* @default true
*/
labelOnTrack?: boolean;
/**
* trackColor

@@ -138,0 +144,0 @@ * @default null

@@ -126,2 +126,7 @@ import { Component } from '@syncfusion/ej2-base';

/**
* labelOnTrack
* @default true
*/
labelOnTrack: boolean;
/**
* trackColor

@@ -128,0 +133,0 @@ * @default null

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

__decorate([
Property(true)
], ProgressBar.prototype, "labelOnTrack", void 0);
__decorate([
Property(null)

@@ -552,0 +555,0 @@ ], ProgressBar.prototype, "trackColor", void 0);

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

/** Render the Linear Label */
//tslint:disable-next-line:max-func-body-length
Linear.prototype.renderLinearLabel = function () {

@@ -248,27 +249,43 @@ var linearlabel;

(progress.progressRect.x + textSize.width / 2);
if (textAlignment === 'Near') {
posX = defaultPos + ((progress.enableRtl) ? -padding : padding);
}
else if (textAlignment === 'Center') {
center = (progress.enableRtl) ? (progress.progressRect.x + progress.progressRect.width - progressWidth / 2) :
(progress.progressRect.x + progressWidth / 2);
pos = (progress.enableRtl) ? (center <= defaultPos) : (center >= defaultPos);
if (pos) {
posX = center;
if (progress.labelOnTrack) {
if (textAlignment === 'Near') {
posX = defaultPos + ((progress.enableRtl) ? -padding : padding);
}
else if (textAlignment === 'Center') {
center = (progress.enableRtl) ? (progress.progressRect.x + progress.progressRect.width - progressWidth / 2) :
(progress.progressRect.x + progressWidth / 2);
pos = (progress.enableRtl) ? (center <= defaultPos) : (center >= defaultPos);
if (pos) {
posX = center;
}
else {
posX = defaultPos;
}
}
else {
posX = defaultPos;
far = (progress.enableRtl) ?
((progress.progressRect.x + progress.progressRect.width - progressWidth) + textSize.width / 2) :
(progress.progressRect.x + progressWidth - textSize.width / 2);
far += (progress.enableRtl) ? padding : -padding;
pos = (progress.enableRtl) ? (far <= defaultPos) : (far >= defaultPos);
if (pos) {
posX = far;
}
else {
posX = defaultPos;
}
}
}
else {
far = (progress.enableRtl) ?
((progress.progressRect.x + progress.progressRect.width - progressWidth) + textSize.width / 2) :
(progress.progressRect.x + progressWidth - textSize.width / 2);
far += (progress.enableRtl) ? padding : -padding;
pos = (progress.enableRtl) ? (far <= defaultPos) : (far >= defaultPos);
if (pos) {
posX = far;
if (textAlignment === 'Near') {
posX = defaultPos + ((progress.enableRtl) ? -padding : padding);
}
else if (textAlignment === 'Center') {
posX = (progress.progressRect.x + progress.progressRect.width) / 2;
}
else {
posX = defaultPos;
posX = (progress.enableRtl) ?
(progress.progressRect.x + textSize.width / 2) :
(progress.progressRect.x + progress.progressRect.width - textSize.width / 2);
posX += (progress.enableRtl) ? padding : -padding;
}

@@ -275,0 +292,0 @@ }

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc