UNPKG

@syncfusion/ej2-progressbar

Version:
11 lines 80.5 kB
/*! * filename: ej2-progressbar.min.js * version : 30.1.37 * Copyright Syncfusion Inc. 2001 - 2024. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing * licensing@syncfusion.com. Any infringement will be prosecuted under * applicable laws. */ /*! For license information please see ej2-progressbar.min.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("SyncfusionBase"),require("SyncfusionSvgBase")):"function"==typeof define&&define.amd?define(["SyncfusionBase","SyncfusionSvgBase"],t):"object"==typeof exports?exports.SyncfusionProgressbar=t(require("SyncfusionBase"),require("SyncfusionSvgBase")):e.SyncfusionProgressbar=t(e.SyncfusionBase,e.SyncfusionSvgBase)}(self,((e,t)=>(()=>{"use strict";var r={766:t=>{t.exports=e},727:e=>{e.exports=t}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={exports:{}};return r[e](n,n.exports,o),n.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{o.r(n),o.d(n,{Animation:()=>L,Border:()=>x,ColorValue:()=>p,Font:()=>w,Margin:()=>A,Pos:()=>l,ProgressAnimation:()=>N,ProgressAnnotation:()=>H,ProgressAnnotationSettings:()=>E,ProgressBar:()=>Z,ProgressLocation:()=>R,ProgressTooltip:()=>j,RangeColor:()=>W,Rect:()=>a,RectOption:()=>c,Size:()=>s,TextOption:()=>m,TooltipSettings:()=>O,annotationRender:()=>S,colorNameToHex:()=>g,componentToHex:()=>d,convertHexToColor:()=>u,convertToHexCode:()=>h,degreeToLocation:()=>y,effect:()=>P,getElement:()=>C,getPathArc:()=>f,removeElement:()=>F,setAttributes:()=>v,stringToNumber:()=>b});var e,t=o(766),r=o(727),i=(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])},e(t,r)},function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),a=function(e,t,r,i){this.x=e,this.y=t,this.height=r,this.width=i},s=function(e,t){this.height=e,this.width=t},l=function(e,t){this.x=e,this.y=t},c=function(e){function t(t,r,i,o,n,a,s,l,c,p){var h=e.call(this,t,r,i,o,n,p)||this;return h.y=a.y,h.x=a.x,h.height=a.height,h.width=a.width,h.rx=s||0,h.ry=l||0,h.transform=c||"",h.stroke=0!==i&&""!==h.stroke?o:"transparent",h}return i(t,e),t}(r.PathOption),p=function(e,t,r){this.r=e,this.g=t,this.b=r};function h(e){return"#"+d(e.r)+d(e.g)+d(e.b)}function d(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function u(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?new p(parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)):new p(255,255,255)}function g(e){e="transparent"===e?"white":e,document.body.appendChild((0,t.createElement)("text",{id:"chartmeasuretext"}));var r,i=document.getElementById("chartmeasuretext");return i.style.color=e,e=window.getComputedStyle(i).color,(0,t.remove)(i),0!==e.indexOf("rgb")&&0!==e.indexOf("hsl")||(r=(e=e.replace(/\s/g,"").replace(/[()]/g,"")).slice(3).split(",")),h(new p(parseInt(r[3],10),parseInt(r[4],10),parseInt(r[5],10)))}var m=function(e,t,r,i,o,n,a,s,l,c,p){this.id=e,this["font-size"]=t,this["font-style"]=r,this["font-family"]=i,this["font-weight"]=o,this["text-anchor"]=n,this.fill=a,this.x=s,this.y=l,this.width=c||0,this.height=p||0};function y(e,t,r,i){var o=(i-90)*(Math.PI/180);return{x:e+r*Math.cos(o),y:t+r*Math.sin(o)}}function f(e,t,r,i,o,n,a){var s=y(e,t,r,i),l=y(e,t,r,o),c="0",p=n?"0":"1";return c=n?(i>=o?i:i+360)-o<=180?"0":"1":(o>=i?o:o+360)-i<=180?"0":"1",a?"M "+e+" "+t+" L "+s.x+" "+s.y+" A "+r+" "+r+" 0 "+c+" "+p+" "+l.x+" "+l.y+" Z":"M"+s.x+" "+s.y+"A"+r+" "+r+" 0 "+c+" "+p+" "+l.x+" "+l.y}function b(e,t){return null!=e?-1!==e.indexOf("%")?t/100*parseInt(e,10):parseInt(e,10):null}function v(e,t){for(var r=Object.keys(e),i=0;i<r.length;i++)t.setAttribute(r[i],e[r[i]]);return t}function P(e,t,r,i,o){var n=t+(o?-r:r);return(o?r:-r)*Math.cos(e/i*(Math.PI/2))+n}var S="annotationRender";function C(e){return document.getElementById(e)}function F(e){if(!e)return null;var r="string"==typeof e?C(e):e;r&&(0,t.remove)(r)}var R=function(e,t){this.x=e,this.y=t},k=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])},e(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),T=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)(10)],r.prototype,"top",void 0),T([(0,t.Property)(10)],r.prototype,"bottom",void 0),T([(0,t.Property)(10)],r.prototype,"left",void 0),T([(0,t.Property)(10)],r.prototype,"right",void 0),r}(t.ChildProperty),w=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)("Normal")],r.prototype,"fontStyle",void 0),T([(0,t.Property)("16px")],r.prototype,"size",void 0),T([(0,t.Property)("Normal")],r.prototype,"fontWeight",void 0),T([(0,t.Property)("")],r.prototype,"color",void 0),T([(0,t.Property)("Segoe UI")],r.prototype,"fontFamily",void 0),T([(0,t.Property)(null)],r.prototype,"opacity",void 0),T([(0,t.Property)("Far")],r.prototype,"textAlignment",void 0),T([(0,t.Property)("")],r.prototype,"text",void 0),r}(t.ChildProperty),L=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)(!1)],r.prototype,"enable",void 0),T([(0,t.Property)(2e3)],r.prototype,"duration",void 0),T([(0,t.Property)(0)],r.prototype,"delay",void 0),r}(t.ChildProperty),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)(null)],r.prototype,"content",void 0),T([(0,t.Property)(0)],r.prototype,"annotationAngle",void 0),T([(0,t.Property)("0%")],r.prototype,"annotationRadius",void 0),r}(t.ChildProperty),x=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)("")],r.prototype,"color",void 0),T([(0,t.Property)(1)],r.prototype,"width",void 0),r}(t.ChildProperty),O=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)(!1)],r.prototype,"enable",void 0),T([(0,t.Property)(null)],r.prototype,"fill",void 0),T([(0,t.Property)(null)],r.prototype,"format",void 0),T([(0,t.Property)(!1)],r.prototype,"showTooltipOnHover",void 0),T([(0,t.Complex)({fontFamily:null,size:"12px",fontWeight:null,fontStyle:"Normal",color:null},w)],r.prototype,"textStyle",void 0),T([(0,t.Complex)({color:"#cccccc",width:.5},x)],r.prototype,"border",void 0),r}(t.ChildProperty),W=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return k(r,e),T([(0,t.Property)("")],r.prototype,"color",void 0),T([(0,t.Property)(null)],r.prototype,"start",void 0),T([(0,t.Property)(null)],r.prototype,"end",void 0),r}(t.ChildProperty);var D=.9,I=359.99,B="valueChanged",z="progressCompleted",M="http://www.w3.org/2000/svg",_="tooltipRender",G=function(){function e(e){this.control=e}return e.prototype.render=function(e,r){return this.annotation=e,(0,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 i=new R(0,0),o=this.render(e,t);o?this.setElementStyle(i,o,r):this.control.redraw&&(F(o.id),this.control.isReact&&this.control.clearTemplate())},e.prototype.setElementStyle=function(e,t,r){var i={cancel:!1,name:S,content:t,location:e};if(this.control.trigger(S,i),!i.cancel){var o=this.Location(this.annotation.annotationRadius,this.annotation.annotationAngle);i.content.style.left=o.left+"px",i.content.style.top=o.top+"px",i.content.style.transform="translate(-50%, -50%)",i.content.setAttribute("aria-label","Annotation"),r.appendChild(i.content),this.control.isReact&&this.control.renderReactTemplates()}},e.prototype.Location=function(e,t){var r,i,o=parseFloat(e);if(0===o&&0===t){var n=this.control.progressRect;i=n.x+n.width/2,r=n.y+n.height/2}else{t-=90,t*=Math.PI/180;var a=Math.round(this.control.progressSize.width/2.25),s=Math.round(this.control.progressSize.height/2.25);i=o*Math.cos(t)+a,r=o*Math.sin(t)+s}return{top:r,left:i}},e}(),N=function(){function e(){}return e.prototype.doLinearAnimation=function(e,r,i,o,n){var a=this,s=new t.Animation({}),l=e,c=r.isActive?3e3:r.animation.duration,p=l.getAttribute("width"),h=l.getAttribute("x"),d=0,u=0,g=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(h,10):o,m=r.enableRtl&&"Round4px"!==r.cornerRadius?parseInt(p,10)-o:parseInt(p,10)-g,y=parseInt(h,10)-m;l.style.visibility="hidden",s.animate(l,{duration:0===r.animation.duration&&"Enable"===t.animationMode?2e3:c,delay:i,progress:function(e){r.cancelResize=!0,r.enableRtl&&"Round4px"!==r.cornerRadius?e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(u=a.activeAnimate(e.timeStamp/e.duration,parseInt(h,10),parseInt(p,10),!0),d=P(e.timeStamp,.5,.5,e.duration,!0),n.setAttribute("opacity",d.toString()),l.setAttribute("x",u.toString())):(u=P(e.timeStamp,g,m,e.duration,!0),l.setAttribute("x",u.toString()))):e.timeStamp>=e.delay&&(l.style.visibility="visible",r.isActive?(u=a.activeAnimate(e.timeStamp/e.duration,0,parseInt(p,10),!1),d=P(e.timeStamp,.5,.5,e.duration,!0),n.setAttribute("opacity",d.toString()),l.setAttribute("width",u.toString())):(u=P(e.timeStamp,g,m,e.duration,!1),l.setAttribute("width",u.toString())))},end:function(){r.cancelResize=!1,l.style.visibility="",r.enableRtl&&"Round4px"!==r.cornerRadius?r.isActive?(l.setAttribute("x",h.toString()),a.doLinearAnimation(e,r,i,o,n)):l.setAttribute("x",y.toString()):(l.setAttribute("width",p),r.isActive&&a.doLinearAnimation(e,r,i,o,n)),r.trigger("animationComplete",{value:r.value,trackColor:r.trackColor,progressColor:r.progressColor})}})},e.prototype.doLinearIndeterminate=function(e,r,i,o,n){var a=this,s=new t.Animation({}),l=e,c=l.getAttribute("x"),p=l.getAttribute("width"),h=0,d=p?-parseInt(p,10):-r,u=o.progressRect.x+o.progressRect.width+(p?parseInt(p,10):r),g=o.enableProgressSegments?o.animation.duration+1e3:o.animation.duration;s.animate(n,{duration:0===o.animation.duration&&"Enable"===t.animationMode?2e3:g,delay:0,progress:function(e){o.enableRtl&&"Round4px"!==o.cornerRadius?(h=P(e.timeStamp,parseInt(c,10)||o.progressRect.x+r,u,e.duration,!0),o.enableProgressSegments?l.setAttribute("d",o.getPathLine(h,r,i)):l.setAttribute("x",h.toString())):(h=P(e.timeStamp,d,u,e.duration,!1),o.enableProgressSegments?l.setAttribute("d",o.getPathLine(h,r,i)):l.setAttribute("x",h.toString()))},end:function(){o.enableRtl&&!o.enableProgressSegments&&"Round4px"!==o.cornerRadius?l.setAttribute("x",c.toString()):o.enableProgressSegments||l.setAttribute("x",d.toString()),o.destroyIndeterminate||a.doLinearIndeterminate(e,r,i,o,n)}})},e.prototype.doStripedAnimation=function(e,r,i){var o=this,n=new t.Animation({}),a=1e3/r.animation.duration;n.animate(e,{duration:0===r.animation.duration&&"Enable"===t.animationMode?2e3:r.animation.duration,delay:r.animation.delay,progress:function(){i+=r.enableRtl?-a:a,e.setAttribute("gradientTransform","translate("+i+") rotate(-45)")},end:function(){r.destroyIndeterminate||o.doStripedAnimation(e,r,i)}})},e.prototype.doCircularAnimation=function(e,r,i,o,n,a,s,l,c,p,h,d){var u=this,g=new t.Animation({}),m=a,b=s.startAngle,v=i+l/2,S=0,C=0,F=s.isActive?3e3:s.animation.duration;if(b+="Round"===s.cornerRadius&&n!==I&&0!==n?s.enableRtl?.45*l:-.45*l:0,n+="Round"===s.cornerRadius&&n!==I&&0!==n?.45*l:0,o+="Round"===s.cornerRadius&&n!==I&&0!==n?s.enableRtl?-.45*l:.45*l:0,"Round"===s.cornerRadius&&n!==I&&0!==n&&s.startAngle===s.endAngle)for(var R=y(e,r,v,b).x,k=y(e,r,v,o).x;s.enableRtl!==s.startAngle>=180?k<=R:k>=R;)o+=s.enableRtl?.1:-.1,k=y(e,r,v,o).x;var T=(0,t.isNullOrUndefined)(p)?b:p,A=(0,t.isNullOrUndefined)(p)?n:n-h;m.setAttribute("visibility","Hidden"),g.animate(m,{duration:0===s.animation.duration&&"Enable"===t.animationMode?2e3:F,delay:c,progress:function(t){s.cancelResize=!0,t.timeStamp>=t.delay&&(m.setAttribute("visibility","visible"),s.isActive?(S=u.activeAnimate(t.timeStamp/t.duration,T,A,s.enableRtl),C=P(t.timeStamp,.5,.5,t.duration,!0),d.setAttribute("opacity",C.toString()),m.setAttribute("d",f(e,r,v,b,S%360,s.enableRtl,!0))):(S=P(t.timeStamp,T,A,t.duration,s.enableRtl),m.setAttribute("d",f(e,r,v,b,S%360,s.enableRtl,!0))))},end:function(){s.cancelResize=!1,m.setAttribute("visibility",""),m.setAttribute("d",f(e,r,v,b,o,s.enableRtl,!0)),s.isActive&&u.doCircularAnimation(e,r,i,o,n,a,s,l,c,p,h,d),s.trigger("animationComplete",{value:s.value,trackColor:s.trackColor,progressColor:s.progressColor})}})},e.prototype.doCircularIndeterminate=function(e,r,i,o,n,a,s,l,c){var p=this,h=new t.Animation({}),d=s+(r.enableProgressSegments?0:l/2),u=0===r.animation.duration&&"Enable"===t.animationMode?2e3:r.animation.duration,g=r.enableProgressSegments?4e3/u:6e3/u;h.animate(c,{progress:function(){e.style.visibility="visible",i+=r.enableRtl?-g:g,o+=r.enableRtl?-g:g,e.setAttribute("d",f(n,a,d,i%360,o%360,r.enableRtl,!r.enableProgressSegments))},end:function(){r.destroyIndeterminate||p.doCircularIndeterminate(e,r,i,o,n,a,s,l,c)}})},e.prototype.doLabelAnimation=function(e,r,i,o,n,a){var s,l,c=new t.Animation({}),p=new t.Animation({}),h=e.innerHTML,d=0,u=0,g=0,m=o.labelStyle.text,y=o.labelStyle.textAlignment,f=parseInt(e.getAttribute("x"),10);e.setAttribute("visibility","Hidden"),"Linear"===o.type&&(s=(s=o.enableRtl?o.progressRect.x+o.progressRect.width+a/2:r-a/2)<=0?0:s,l=o.enableRtl?s-f:f-s),c.animate(e,{duration:0===o.animation.duration&&"Enable"===t.animationMode?2e3:o.animation.duration,delay:n,progress:function(t){o.cancelResize=!0,t.name="SlideRight","Linear"===o.type?t.timeStamp>=t.delay&&""===m&&(e.setAttribute("visibility","visible"),d=P(t.timeStamp,r,i,t.duration,!1),g=parseInt((Math.round(d)/o.progressRect.width*100).toString(),10),e.innerHTML=g.toString()+"%","Far"!==y&&"Center"!==y||(u=P(t.timeStamp,s,l,t.duration,o.enableRtl),e.setAttribute("x",u.toString()))):"Circular"===o.type&&""===m&&(e.setAttribute("visibility","visible"),d=P(t.timeStamp,r,i-r,t.duration,!1),g=parseInt((Math.round(d)/o.totalAngle*100).toString(),10),e.innerHTML=g.toString()+"%")},end:function(){o.cancelResize=!1,""===m?(e.innerHTML=h,e.setAttribute("x",f.toString())):p.animate(e,{progress:function(t){e.setAttribute("visibility","visible"),d=P(t.timeStamp,0,1,t.duration,!1),e.setAttribute("opacity",d.toString())},end:function(){e.setAttribute("opacity","1")}})}})},e.prototype.doAnnotationAnimation=function(e,r,i,o){var n,a,s,l,c,p=new t.Animation({}),h=0,d=r.annotations.length>0,u=r.startAngle,g=r.totalAngle;d&&r.progressAnnotationModule&&(a=document.getElementById(r.element.id+"Annotation0").children[0])&&a.children[0]&&"SPAN"===a.children[0].tagName&&(n=a.children[0]),s=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*r.totalAngle,r.annotateTotal=s=r.argsData.value<r.minimum?0:s,r.annotateEnd=u+s,c=(r.argsData.value-r.minimum)/(r.maximum-r.minimum)*100,c=r.argsData.value<r.minimum?0:Math.round(c);var m=(0,t.isNullOrUndefined)(i)?u:i,y=(0,t.isNullOrUndefined)(i)?s:s-o;r.argsData.value<=r.minimum?n.innerHTML=c+"%":p.animate(e,{duration:0===r.animation.duration&&"Enable"===t.animationMode?2e3:r.animation.duration,delay:r.animation.delay,progress:function(e){r.cancelResize=!0,d&&n&&(h=P(e.timeStamp,m,y,e.duration,!1),l=parseInt(((Math.round(h)-u)/g*100).toString(),10),n.innerHTML=l?l.toString()+"%":"0%")},end:function(){r.cancelResize=!1,n.innerHTML=c+"%"}})},e.prototype.activeAnimate=function(e,t,r,i){var o=1-Math.pow(1-e,3);return t+(i?-o*r:o*r)},e}(),U=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])},e(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),H=function(e){function r(t,r){var i=e.call(this,t)||this;return i.animation=new N,i.progress=t,i.annotations=r,i}return U(r,e),r.prototype.renderAnnotations=function(e){var r=this;this.annotations=this.progress.annotations;var i=document.getElementById(this.progress.element.id+"Annotation_collections");this.parentElement=i||(0,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)})),i||e.appendChild(this.parentElement),this.progress.animation.enable&&!this.progress.isIndeterminate&&this.animation.doAnnotationAnimation(this.progress.clipPath,this.progress)},r.prototype.getModuleName=function(){return"ProgressAnnotation"},r.prototype.destroy=function(){},r}(G),j=function(){function e(e){this.text=[],this.previousPosition=0,this.control=e}return e.prototype.tooltip=function(e){var t=document.getElementById(this.control.element.id+"_tooltip"),r=t&&parseInt(t.getAttribute("opacity"),10)>0;if(this.previousPosition=t.style.left?parseInt(t.style.left,10):0,this.renderTooltip(e,this.control,!r),this.control.tooltip.enable&&"Circular"===this.control.type&&this.control.animation.enable&&!this.control.tooltip.showTooltipOnHover){t.style.visibility="hidden";var i=this.control.secondaryProgress?this.control.circular.delay+this.control.animation.duration:this.control.animation.duration;this.tooltipDelay(this.control,t,i)}if(this.control.animation.enable&&!this.control.tooltip.showTooltipOnHover&&"Circular"!==this.control.type){i=this.control.secondaryProgress?this.control.linear.delay:this.control.animation.delay;this.control.secondaryProgress&&(t.style.visibility="hidden"),this.toolTipAnimation(t,this.control,i)}},e.prototype.tooltipDelay=function(e,r,i){new t.Animation({}).animate(r,{duration:e.animation.duration,delay:i,progress:function(e){e.element.style.visibility="visible"}})},e.prototype.toolTipAnimation=function(e,r,i){var o=this,n=new t.Animation({}),a=parseInt(e.style.left,10),s=document.getElementById(this.control.element.id+"_tooltip_svg"),l=parseInt(s.getAttribute("width"),10);n.animate(e,{duration:r.animation.duration,delay:i,progress:function(e){if(r.cancelResize=!0,e.name="SlideRight","Linear"===r.type&&e.timeStamp>=e.delay){e.element.style.visibility="visible";var t=o.previousPosition?o.previousPosition:0-(l/2-o.control.progressRect.x-5),i=o.previousPosition?a-t:a+(l/2-o.control.progressRect.x-5),n=P(e.timeStamp,t,i,e.duration,r.enableRtl);e.element.style.left="",e.element.style.left=n+"px".toString()}},end:function(e){r.cancelResize=!1,e.element.style.left="",e.element.style.left=a+"px".toString()}})},e.prototype.renderTooltip=function(e,t,r){this.textFormat=this.format(this.control.tooltip.showTooltipOnHover&&(e.target.id.indexOf("Linearbuffer")>=0||e.target.id.indexOf("Circularbuffer")>=0)?this.control.secondaryProgress:this.control.value),this.triggerTooltipRender(e,r,this.textFormat)},e.prototype.format=function(e){var t,r=e.toString();return this.control.tooltip.format&&(r=this.control.tooltip.format,t=new RegExp("${value}","gm"),r=r.replace(t.source,e.toString())),r},e.prototype.removeTooltip=function(e){var t=this;document.getElementById(this.control.element.id+"_tooltip")&&(this.fadeInInterval=+setTimeout((function(){t.svgTooltip&&t.svgTooltip.fadeOut()}),e))},e.prototype.triggerTooltipRender=function(e,t,r){var i={cancel:!1,name:_,text:r+"%"};if(this.control.trigger(_,i),r=i.text,!i.cancel)if(this.text=[].concat(i.text),"Linear"===this.control.type){var o=this.control.linear.linearProgressWidth-2.5+this.control.progressRect.x,n="Round4px"===this.control.cornerRadius?this.control.progressRect.y+5:this.control.progressRect.y+this.control.progressRect.height/2-(this.control.progressThickness?this.control.progressThickness:this.control.themeStyle.linearProgressThickness)/2+5;this.createTooltip(this.control,t,(!this.control.tooltip.enable||this.control.tooltip.showTooltipOnHover)&&e.target.id.indexOf("Linearbuffer")>=0?new R(this.control.linear.bufferWidth-2.5+this.control.progressRect.x,n):new R("Round4px"===this.control.cornerRadius?o-5:o,n),this.control.initialClipRect)}else{var a=this.control.circular.endPosition.x-2.5,s=this.control.circular.endPosition.y+this.control.progressRect.y-2.5;this.createTooltip(this.control,t,(!this.control.tooltip.enable||this.control.tooltip.showTooltipOnHover)&&e.target.id.indexOf("Circularbuffer")>=0?new R(this.control.circular.bufferEndPosition.x-2.5,this.control.circular.bufferEndPosition.y+this.control.progressRect.y-2.5):new R(a,s),this.control.initialClipRect)}this.isRendered=!0},e.prototype.createTooltip=function(e,i,o,n){var a=(0,t.extend)({},this.control.tooltip.textStyle,null,!0);a.fontWeight=a.fontWeight||this.control.themeStyle.tooltipLabelFont.fontWeight,i?this.svgTooltip=new r.Tooltip({opacity:this.control.tooltip.textStyle.opacity?this.control.tooltip.textStyle.opacity:"Material3"===this.control.theme||"Material3Dark"===this.control.theme||this.control.theme.indexOf("Bootstrap5")>-1?1:.75,header:"",content:this.text,fill:this.control.tooltip.fill,border:this.control.tooltip.border,enableAnimation:!0,location:o,theme:this.control.theme,areaBounds:n,template:null,offset:7.5,marginX:8,marginY:4.5,textStyle:a,arrowPadding:7,availableSize:this.control.progressSize,duration:300,blazorTemplate:{name:"Template",parent:this.control.tooltip},controlInstance:this.control,enableRTL:e.enableRtl,controlName:"Progressbar"},"#"+this.control.element.id+"_tooltip"):this.svgTooltip&&(this.svgTooltip.location=o,this.svgTooltip.content=this.text,this.svgTooltip.header="",this.svgTooltip.offset=7.5,this.svgTooltip.textStyle=a,this.svgTooltip.areaBounds=n,this.svgTooltip.arrowPadding=7,this.svgTooltip.dataBind())},e.prototype.getModuleName=function(){return"ProgressTooltip"},e.prototype.destroy=function(){},e}(),X=function(){function e(){}return e.prototype.createLinearSegment=function(e,t,i,o,n,a){var s=e.enableRtl?"Round"===e.cornerRadius?e.progressRect.x+e.progressRect.width-.45*n:e.progressRect.x+e.progressRect.width:"Round"===e.cornerRadius?e.progressRect.x+.45*n:e.progressRect.x,l=e.progressRect.y+e.progressRect.height/2,c=e.gapWidth||e.themeStyle.linearGapWidth,p=a/e.segmentCount,h=a-(e.segmentCount-1)*c;h=(h-("Round"===e.cornerRadius?e.segmentCount*(D*n):0))/e.segmentCount;for(var d,u,g,m,y="Round"===e.cornerRadius?c+D*n:c,f=e.renderer.createGroup({id:e.element.id+t}),b=Math.ceil(i/p),v=0,P="Round"===e.cornerRadius?i-D*n:i,S=e.progressThickness||e.themeStyle.linearProgressThickness,C=0;C<b;C++)d=P<h?P:h,v<e.segmentColor.length?(u=e.segmentColor[v],v++):(v=0,u=e.segmentColor[v],v++),g=new r.PathOption(e.element.id+t+C,"none",S,u,o,"0",this.getLinearSegmentPath(s,l,d,e.enableRtl)),m=e.renderer.drawPath(g),"Round"===e.cornerRadius&&m.setAttribute("stroke-linecap","round"),f.appendChild(m),s+=e.enableRtl?-h-y:h+y,P=(P-=h+y)<0?0:P;return f},e.prototype.getLinearSegmentPath=function(e,t,r,i){return"M "+e+" "+t+" L"+(e+(i?-r:r))+" "+t},e.prototype.createCircularSegment=function(e,t,i,o,n,a,s,l,c,p){var h=e.startAngle,d=this.widthToAngle(e.minimum,e.maximum,a,e.totalAngle);d-="Round"===e.cornerRadius&&e.totalAngle===I?this.widthToAngle(0,p,.45*l,c):0;var u=p-(e.totalAngle===I?e.segmentCount:e.segmentCount-1)*(e.gapWidth||e.themeStyle.circularGapWidth);u=(u-("Round"===e.cornerRadius?(e.totalAngle===I?e.segmentCount:e.segmentCount-1)*D*l:0))/e.segmentCount;var g=this.widthToAngle(0,p,p/e.segmentCount,c);g-="Round"===e.cornerRadius&&e.totalAngle===I?this.widthToAngle(0,p,.45*l,c):0;var m=this.widthToAngle(0,p,u,c),y=this.widthToAngle(0,p,e.gapWidth||e.themeStyle.circularGapWidth,c);y+="Round"===e.cornerRadius?this.widthToAngle(0,p,D*l,c):0;for(var b,v,P,S,C,F=e.renderer.createGroup({id:e.element.id+t}),R=Math.floor(d/g),k=Math.ceil((d-y*R)/m),T=(h+(e.enableRtl?-m:m))%360,A=0,w=e.progressThickness||e.themeStyle.circularProgressThickness,L=0;L<k;L++)b=f(i,o,n,h,P=e.enableRtl?e.startAngle-d>T?e.startAngle-d:T:e.startAngle+d<T?e.startAngle+d:T,e.enableRtl),A<e.segmentColor.length?(S=e.segmentColor[A],A++):(A=0,S=e.segmentColor[A],A++),C=new r.PathOption(e.element.id+t+L,"none",w,S,s,"0",b),v=e.renderer.drawPath(C),"Round"===e.cornerRadius&&v.setAttribute("stroke-linecap","round"),F.appendChild(v),h=P+(e.enableRtl?-y:y),T+=e.enableRtl?-m-y:m+y;return F},e.prototype.widthToAngle=function(e,t,r,i){return(r-e)/(t-e)*i},e.prototype.createLinearRange=function(e,t,i){for(var o,n,a,s,l,c,p,h,d,u,g=t.progressRect.x+(t.enableRtl?t.progressRect.width:0),m=t.progressRect.y+t.progressRect.height/2,y=t.renderer.createGroup({id:t.element.id+"_LinearRangeGroup"}),f=t.rangeColors,b=t.progressThickness||t.themeStyle.linearProgressThickness,v=t.themeStyle.progressOpacity,P=t.minimum,S=t.value,C=t.enableRtl?.1:-.1,F=0;F<f.length;F++)n=f[F].start>=P&&f[F].start<=S&&f[F].end>=P&&f[F].end<=S,l=e*t.calculateProgressRange(f[F].start,P,S),c=e*t.calculateProgressRange(f[F].end,P,S),p=g+(t.enableRtl?-l:l),h=g+(t.enableRtl?-c:c),p=n?t.isGradient&&F>0?p+C:p:g,h=n?h:g,d=t.isGradient?"url(#lineRangeGrad_"+F+")":f[F].color,s=new r.PathOption(t.element.id+"_LinearRange_"+F,"none",b,d,v,"0","M "+p+" "+m+" L"+h+" "+m),a=t.renderer.drawPath(s),"Round"===t.cornerRadius&&i&&a.setAttribute("stroke-linecap","round"),y.appendChild(a),t.isGradient&&(u=f.length-1===F?f[F].color:f[F+1].color,o=this.setLinearGradientColor(F,f[F].color,u,p,h,t),y.appendChild(o));return y},e.prototype.createCircularRange=function(e,t,i,o){for(var n,a,s,l,c,p,h,d,u=o.renderer.createGroup({id:o.element.id+"_CircularRangeGroup"}),g=o.rangeColors,m=o.progressThickness||o.themeStyle.linearProgressThickness,y=o.themeStyle.progressOpacity,b=o.minimum,v=o.value,P=o.startAngle,S=this.widthToAngle(o.minimum,o.maximum,o.value,o.totalAngle),C=0;C<g.length;C++)c=g[C].start>=b&&g[C].start<=v&&g[C].end>=b&&g[C].end<=v,a=this.widthToAngle(b,v,g[C].start,S),s=this.widthToAngle(b,v,g[C].end,S),a=c?(P+(o.enableRtl?-a:a))%360:P,s=c?(P+(o.enableRtl?-s:s))%360:P,h=o.isGradient?"url(#circleRangeGrad_"+C+")":g[C].color,p=new r.PathOption(o.element.id+"_CircularRange_"+C,"none",m,h,y,"0",f(e,t,i,a,s,o.enableRtl)),l=o.renderer.drawPath(p),"Round"===o.cornerRadius&&a!==s&&l.setAttribute("stroke-linecap","round"),u.appendChild(l),o.isGradient&&(d=g.length-1===C?g[C].color:g[C+1].color,n=this.setCircularGradientColor(C,g[C].color,d,a,s,i,e,t,o),u.appendChild(n));return u},e.prototype.setLinearGradientColor=function(e,t,r,i,o,n){var a=[],s={id:"lineRangeGrad_"+e,x1:i.toString(),x2:o.toString()};a[0]={color:t,colorStop:"50%"},a[1]={color:r,colorStop:"100%"};var l=n.renderer.drawGradient("linearGradient",s,a);return l.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),l},e.prototype.setCircularGradientColor=function(e,t,r,i,o,n,a,s,l){var c=[],p=y(a,s,n,i),h=y(a,s,n,o),d={id:"circleRangeGrad_"+e,x1:p.x.toString(),x2:h.x.toString(),y1:p.y.toString(),y2:h.y.toString()};c[0]={color:t,colorStop:"50%"},c[1]={color:r,colorStop:"100%"};var u=l.renderer.drawGradient("linearGradient",d,c);return u.firstElementChild.setAttribute("gradientUnits","userSpaceOnUse"),u},e}(),Y=function(){function e(e){this.segment=new X,this.animation=new N,this.progress=e}return e.prototype.renderLinearTrack=function(){var e,t,i=this.progress,o=i.renderer.createGroup({id:i.element.id+"_LinearTrackGroup"});this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var n=i.trackThickness||i.themeStyle.linearTrackThickness,a=i.argsData.trackColor||i.themeStyle.linearTrackColor;"Round4px"===i.cornerRadius?i.segmentCount>1?e=this.createRoundCornerSegment("_LinearTrack_",a,n,!0,0,i):(t=new r.PathOption(i.element.id+"_Lineartrack",a,0,"none",i.themeStyle.trackOpacity,"0",this.cornerRadius(i.progressRect.x,i.progressRect.y,i.progressRect.width,n,4,"")),e=i.renderer.drawPath(t)):(t=new r.PathOption(i.element.id+"_Lineartrack","none",n,a,i.themeStyle.trackOpacity,"0",i.getPathLine(i.progressRect.x,i.progressRect.width,n)),e=i.renderer.drawPath(t),i.trackWidth=e.getTotalLength(),"Round"!==i.cornerRadius||this.isRange||e.setAttribute("stroke-linecap","round"),i.segmentCount>1&&!this.isRange&&!i.enableProgressSegments&&(i.segmentSize=i.calculateSegmentSize(i.trackWidth,n),e.setAttribute("stroke-dasharray",i.segmentSize))),o.appendChild(e),i.svgObject.appendChild(o)},e.prototype.renderLinearProgress=function(e,i){void 0===i&&(i=0);var o,n,a,s,l,c,p,h,d=this.progress,u=d.value>=d.maximum,g=d.progressRect.width*d.calculateProgressRange(d.value>d.maximum?d.maximum:d.value),m=d.calculateProgressRange(d.argsData.value>d.maximum?d.maximum:d.argsData.value);this.linearProgressWidth=d.progressRect.width*(d.isIndeterminate&&!d.enableProgressSegments?1:m),l=e?(0,r.getElement)(d.element.id+"_LinearProgressGroup"):d.renderer.createGroup({id:d.element.id+"_LinearProgressGroup"});var y=d.progressThickness||d.themeStyle.linearProgressThickness,f=d.isStriped?"url(#"+d.element.id+"_LinearStriped)":this.checkingLinearProgressColor();o="Round4px"===d.cornerRadius?new r.PathOption(d.element.id+"_Linearprogress",f,0,"none",d.themeStyle.progressOpacity,"0",this.cornerRadius(d.progressRect.x,d.progressRect.y,this.linearProgressWidth,y,4,u||d.isIndeterminate?"":"start")):new r.PathOption(d.element.id+"_Linearprogress","none",y,f,d.themeStyle.progressOpacity,"0",d.getPathLine(d.progressRect.x,this.linearProgressWidth,y)),d.progressWidth=d.renderer.drawPath(o).getTotalLength(),d.segmentSize=d.enableProgressSegments?d.calculateSegmentSize(d.progressWidth,y):d.segmentSize,null===d.secondaryProgress||d.isIndeterminate||this.renderLinearBuffer(d),null!==d.argsData.value&&("Round4px"===d.cornerRadius?n=d.segmentCount>1?this.createRoundCornerSegment("_Linearprogress_",f,y,!1,this.linearProgressWidth,d,d.themeStyle.progressOpacity):d.renderer.drawPath(o):0===d.segmentColor.length||d.isIndeterminate||this.isRange?this.isRange&&!d.isIndeterminate?n=this.segment.createLinearRange(this.linearProgressWidth,d,m):(e?((n=(0,r.getElement)(d.element.id+"_Linearprogress")).setAttribute("d",d.getPathLine(d.progressRect.x,this.linearProgressWidth,y)),n.setAttribute("stroke",f)):n=d.renderer.drawPath(o),d.segmentCount>1&&n.setAttribute("stroke-dasharray",d.segmentSize),"Round"===d.cornerRadius&&m&&n.setAttribute("stroke-linecap","round")):(p=d.enableProgressSegments?d.progressWidth:d.trackWidth,n=this.segment.createLinearSegment(d,"_LinearProgressSegment",this.linearProgressWidth,d.themeStyle.progressOpacity,y,p)),l.appendChild(n),d.isStriped&&!d.isIndeterminate&&(h=this.checkingLinearProgressColor(),this.renderLinearStriped(h,l,d)),!d.isActive||d.isIndeterminate||d.isStriped||this.renderActiveState(l,m,this.linearProgressWidth,y,e),!(d.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)||d.isIndeterminate||d.isActive||d.isStriped||(c=null!==d.secondaryProgress?d.animation.delay+(this.bufferWidth-this.linearProgressWidth):d.animation.delay,this.delay=c,a=d.createClipPath(d.clipPath,m,null,e,y,!1,"Round4px"===d.cornerRadius&&u),l.appendChild(d.clipPath),n.style.clipPath="url(#"+d.element.id+"_clippath)",this.animation.doLinearAnimation(a,d,c,e?i:0)),d.isIndeterminate&&(s=d.createClipPath(d.clipPath,d.enableProgressSegments?1:m,null,e,y,d.enableProgressSegments),l.appendChild(d.clipPath),n.setAttribute("style","clip-path:url(#"+d.element.id+"_clippath)"),this.animation.doLinearIndeterminate(d.enableProgressSegments?n:s,this.linearProgressWidth,y,d,s)),d.svgObject.appendChild(l),d.previousWidth=g)},e.prototype.renderLinearBuffer=function(e){var i,o,n,a,s,l=e.secondaryProgress>=e.maximum,c=e.calculateProgressRange(e.secondaryProgress>e.maximum?e.maximum:e.secondaryProgress);this.bufferWidth=n=e.progressRect.width*c;var p=e.renderer.createGroup({id:e.element.id+"_LinearBufferGroup"}),h=e.secondaryProgressThickness?e.secondaryProgressThickness:e.progressThickness||e.themeStyle.linearProgressThickness,d=e.secondaryProgressColor?e.secondaryProgressColor:e.themeStyle.bufferColor||this.checkingLinearProgressColor();"Round4px"===e.cornerRadius?e.segmentCount>1?i=this.createRoundCornerSegment("_Linearbuffer_",d,h,!1,n,e,e.themeStyle.bufferOpacity):(a=new r.PathOption(e.element.id+"_Linearbuffer",d,0,"none",e.themeStyle.bufferOpacity,"0",this.cornerRadius(e.progressRect.x,e.progressRect.y,n,h,4,l?"":"start")),i=e.renderer.drawPath(a)):(a=new r.PathOption(e.element.id+"_Linearbuffer","none",h,d,e.themeStyle.bufferOpacity,"0",e.getPathLine(e.progressRect.x,n,h)),0===e.segmentColor.length||e.isIndeterminate||this.isRange?(i=e.renderer.drawPath(a),e.segmentCount>1&&!this.isRange&&i.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||i.setAttribute("stroke-linecap","round")):(s=e.enableProgressSegments?e.progressWidth:e.trackWidth,i=this.segment.createLinearSegment(e,"_LinearBufferSegment",n,e.themeStyle.bufferOpacity,e.progressThickness||e.themeStyle.linearProgressThickness,s))),p.appendChild(i),(e.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&(o=e.createClipPath(e.bufferClipPath,c,null,!1,h,!1,"Round4px"===e.cornerRadius&&l),p.appendChild(e.bufferClipPath),i.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doLinearAnimation(o,e,e.animation.delay,0)),e.svgObject.appendChild(p)},e.prototype.renderLinearLabel=function(e){var i,o,n,a;void 0===e&&(e=!1);var s,l,c,p,h,d=this.progress.progressThickness||this.progress.themeStyle.linearProgressThickness,u=this.progress,g=u.labelStyle.textAlignment,y=u.labelStyle.text,f=u.progressRect.width*u.calculateProgressRange(u.value>u.maximum?u.maximum:u.value),b=u.renderer.createGroup({id:u.element.id+"_LinearLabelGroup"});document.getElementById(b.id)&&document.getElementById(b.id).remove();var v=(u.value-u.minimum)/(u.maximum-u.minimum)*100,P=u.value<u.minimum?0:+v.toFixed(2),S={cancel:!1,text:y||String(P)+"%",color:u.labelStyle.color||this.progress.themeStyle.linearLabelFont.color};u.trigger("textRender",S),S.cancel||(a=(0,r.measureText)(S.text,u.labelStyle,u.themeStyle.linearLabelFont),l=u.enableRtl?u.progressRect.x+u.progressRect.width-a.width/2:u.progressRect.x+a.width/2,u.labelOnTrack?"Near"===g?o=l+(u.enableRtl?-5:5):"Center"===g?(p=u.enableRtl?u.progressRect.x+u.progressRect.width-f/2:u.progressRect.x+f/2,u.enableRtl?p<=l:p>=l,o=f<a.width/2?l:p,!f&&!u.enableRtl&&o/2<u.progressRect.x+5&&(o+=5)):(c=u.enableRtl?u.progressRect.x+u.progressRect.width-f+a.width/2:u.progressRect.x+f-a.width/2,c+=u.enableRtl?5:-5,o=(u.enableRtl?c<=l:c>=l)?c:l,!f&&!u.enableRtl&&o/2<u.progressRect.x+5&&(o+=5)):"Near"===g?o=l+(u.enableRtl?-5:5):"Center"===g?o=(u.progressRect.x+u.progressRect.width)/2:(o=u.enableRtl?u.progressRect.x+a.width/2:u.progressRect.x+u.progressRect.width-a.width/2,o+=u.enableRtl?5:-5),n="Round4px"===this.progress.cornerRadius?u.progressRect.y+d/2+a.height/4:u.progressRect.y+u.progressRect.height/2+a.height/4,s=new m(u.element.id+"_linearLabel",u.labelStyle.size||u.themeStyle.linearLabelFont.size,u.labelStyle.fontStyle||u.themeStyle.linearLabelFont.fontStyle,u.labelStyle.fontFamily||u.themeStyle.linearLabelFont.fontFamily,u.labelStyle.fontWeight||u.themeStyle.linearLabelFont.fontWeight,"middle",S.color,o,n),i=u.renderer.createText(s,S.text),b.appendChild(i),(u.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&!u.isIndeterminate&&(h=u.renderer.createClipPath({id:u.element.id+"_clippathLabel"}),u.createClipPath(h,1,null,!1,u.progressThickness||u.themeStyle.linearProgressThickness,!0),b.appendChild(h),i.style.clipPath="url(#"+u.element.id+"_clippathLabel)",this.animation.doLabelAnimation(i,e?u.previousLabelWidth:0,f-(e?u.previousLabelWidth:0),u,this.delay,a.width)),u.svgObject.appendChild(b),u.previousLabelWidth=f)},e.prototype.renderActiveState=function(e,t,i,o,n){var a,s,l=this.progress,c=l.value===l.maximum;"Round4px"===l.cornerRadius?l.segmentCount>1?a=this.createRoundCornerSegment("_LinearActiveProgress_","#ffffff",o,!1,i,l,.5):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","#ffffff",0,"none",.5,"0",this.cornerRadius(l.progressRect.x,l.progressRect.y,i,o,4,c?"":"start")),a=l.renderer.drawPath(s)):(n?(a=(0,r.getElement)(l.element.id+"_LinearActiveProgress")).setAttribute("d",l.getPathLine(l.progressRect.x,i,o)):(s=new r.PathOption(l.element.id+"_LinearActiveProgress","none",o,"#ffffff",.5,"",l.getPathLine(l.progressRect.x,i,o)),a=l.renderer.drawPath(s)),l.segmentCount>1&&!this.isRange&&a.setAttribute("stroke-dasharray",l.segmentSize),"Round"===l.cornerRadius&&t&&!this.isRange&&a.setAttribute("stroke-linecap","round"));var p=l.createClipPath(l.clipPath,t,null,n,o,!1);a.setAttribute("style","clip-path:url(#"+l.element.id+"_clippath)"),e.appendChild(a),e.appendChild(l.clipPath),this.animation.doLinearAnimation(p,l,0,0,a)},e.prototype.renderLinearStriped=function(e,r,i){var o,n,a=i.renderer.createDefs(),s=document.createElementNS(M,"linearGradient");n=[{offset:"50%","stop-color":e,"stop-opacity":"1"},{offset:"50%","stop-color":e,"stop-opacity":"0.4"}],s=v({id:i.element.id+"_LinearStriped",x1:i.progressRect.x.toString(),x2:(i.progressRect.x+14).toString(),spreadMethod:"repeat",gradientUnits:"userSpaceOnUse",gradientTransform:"rotate(-45)"},s);for(var l=0;l<n.length;l++)o=document.createElementNS(M,"stop"),o=v(n[l],o),s.appendChild(o);a.appendChild(s),r.appendChild(a),(i.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&this.animation.doStripedAnimation(s,i,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,i,o,n){var a="",s=r,l=o;switch(n){case"start":a="M"+e+","+t+" h"+r+" v"+i+" h"+-r+" a"+o+","+o+" 0 0 1 "+-o+","+-o+" v"+(2*o-i)+" a"+o+","+o+" 0 0 1 "+o+","+-o+" z";break;case"end":a="M"+e+","+t+" h"+(s-l)+" a"+l+","+l+" 0 0 1 "+l+","+l+" v"+(i-2*l)+" a"+l+","+l+" 0 0 1 "+-l+","+l+" h"+(o-s)+" v"+-i+" z";break;case"none":a="M"+e+","+t+" h"+r+" v"+i+" h"+-r+" v"+-i+" z";break;default:a="M"+e+","+t+" h"+(r-o)+" a"+o+","+o+" 0 0 1 "+o+","+o+" v"+(i-2*o)+" a"+o+","+o+" 0 0 1 "+-o+","+o+" h"+(o-r)+" a"+o+","+o+" 0 0 1 "+-o+","+-o+" v"+(2*o-i)+" a"+o+","+o+" 0 0 1 "+o+","+-o+" z"}return a},e.prototype.createRoundCornerSegment=function(e,t,i,o,n,a,s){for(var l,c,p,h,d=a.progressRect.x,u=a.progressRect.y,g=a.progressRect.width,m=a.gapWidth||a.themeStyle.linearGapWidth,y=(g-(a.segmentCount-1)*m)/a.segmentCount,f=a.renderer.createGroup({id:a.element.id+e+"SegmentGroup"}),b=1;b<=a.segmentCount;b++)if(c=1===b||b===a.segmentCount?1===b?"start":"end":"none",o)l=new r.PathOption(a.element.id+e+b,t,0,"none",a.themeStyle.trackOpacity,"0",this.cornerRadius(d,u,y,i,4,c)),h=a.renderer.drawPath(l),f.appendChild(h),d+=y+m;else if(p=n<y?n:y,l=new r.PathOption(a.element.id+e+b,t,0,"none",s,"0",this.cornerRadius(d,u,p,i,4,c)),h=a.renderer.drawPath(l),f.appendChild(h),d+=y+m,(n-=y+m)<=0)break;return f},e}(),V=function(){function e(e){this.segment=new X,this.animation=new N,this.progress=e}return e.prototype.renderCircularTrack=function(){var e,t,i=this.progress,o=i.renderer.createGroup({id:i.element.id+"_CircularTrackGroup"}),n=i.startAngle;i.totalAngle=(i.endAngle-i.startAngle)%360,i.totalAngle=i.totalAngle<=0?360+i.totalAngle:i.totalAngle,i.totalAngle-=360===i.totalAngle?.01:0,this.trackEndAngle=t=(i.startAngle+(i.enableRtl?-i.totalAngle:+i.totalAngle))%360,this.centerX=i.progressRect.x+i.progressRect.width/2,this.centerY=i.progressRect.y+i.progressRect.height/2,this.maxThickness=Math.max(i.trackThickness,i.progressThickness)||Math.max(i.themeStyle.circularProgressThickness,i.themeStyle.circularTrackThickness),this.availableSize=Math.min(i.progressRect.height,i.progressRect.width)/2-this.maxThickness/2,e=null===(e=b(i.radius,this.availableSize))?0:e;var a=i.argsData.trackColor||i.themeStyle.circularTrackColor,s=i.enablePieProgress?i.argsData.trackColor||i.themeStyle.circularTrackColor:"none",l=i.enablePieProgress?0:i.trackThickness||i.themeStyle.circularTrackThickness,c=f(this.centerX,this.centerY,e,n,t,i.enableRtl,i.enablePieProgress);this.isRange=""!==this.progress.rangeColors[0].color||null!==this.progress.rangeColors[0].start||null!==this.progress.rangeColors[0].end;var p=new r.PathOption(i.element.id+"_Circulartrack",s,l,a,i.themeStyle.trackOpacity,"0",c),h=i.renderer.drawPath(p);i.trackWidth=h.getTotalLength(),i.segmentCount>1&&!i.enableProgressSegments&&!i.enablePieProgress&&!this.isRange&&(i.segmentSize=i.calculateSegmentSize(i.trackWidth,l),h.setAttribute("stroke-dasharray",i.segmentSize)),"Round"!==i.cornerRadius||i.enablePieProgress||this.isRange||h.setAttribute("stroke-linecap","round"),o.appendChild(h),i.svgObject.appendChild(o)},e.prototype.renderCircularProgress=function(e,i,o){var n,a,s,l,c,p,h,d,u,g,m=this.progress,v=m.startAngle;u=o?(0,r.getElement)(m.element.id+"_CircularProgressGroup"):m.renderer.createGroup({id:m.element.id+"_CircularProgressGroup"}),s=null===(s=b(m.innerRadius,this.availableSize))?0:s,m.previousTotalEnd=p=m.calculateProgressRange(m.argsData.value>m.maximum?m.maximum:m.argsData.value);var P=(m.startAngle+(m.enableRtl?-p:p))%360;m.previousEndAngle=n=m.isIndeterminate&&!m.enableProgressSegments?(m.startAngle+(m.enableRtl?-m.totalAngle:m.totalAngle))%360:P,c=(c=(p-m.startAngle)%360)<=0?360+c:c,c-=360===c?.01:0;var S=f(this.centerX,this.centerY,s,v,n,m.enableRtl,m.enablePieProgress),C=this.checkingCircularProgressColor(),F=m.enablePieProgress?C:"none",R=m.progressThickness||m.themeStyle.circularProgressThickness,k=m.enablePieProgress?0:R,T=new r.PathOption(m.element.id+"_Circularprogress",F,k,C,m.themeStyle.progressOpacity,"0",S);m.progressWidth=m.renderer.drawPath(T).getTotalLength(),m.segmentSize=this.validateSegmentSize(m,R),this.endPosition=y(this.centerX,this.centerY,s,n),null===m.secondaryProgress||m.isIndeterminate||this.renderCircularBuffer(m,s,c),null!==m.argsData.value&&(0===m.segmentColor.length||m.isIndeterminate||m.enablePieProgress?this.isRange&&!m.isIndeterminate?h=this.segment.createCircularRange(this.centerX,this.centerY,s,m):(o?(l=(h=(0,r.getElement)(m.element.id+"_Circularprogress")).getAttribute("d"),h.setAttribute("stroke",C),h.setAttribute("d",S)):h=m.renderer.drawPath(T),m.segmentCount>1&&!m.enablePieProgress&&h.setAttribute("stroke-dasharray",m.segmentSize),"Round"===m.cornerRadius&&v!==n&&h.setAttribute("stroke-linecap","round")):(a=m.enableProgressSegments?c:m.totalAngle,g=m.enableProgressSegments?m.progressWidth:m.trackWidth,h=this.segment.createCircularSegment(m,"_CircularProgressSegment",this.centerX,this.centerY,s,m.argsData.value,m.themeStyle.progressOpacity,R,a,g)),u.appendChild(h),!m.isActive||m.isIndeterminate||m.enablePieProgress||this.renderActiveState(u,s,k,S,P,p,o),(m.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode||m.isIndeterminate)&&(this.delay=null!==m.secondaryProgress?300:m.animation.delay,d=m.createClipPath(m.clipPath,null,o?l:"",o),u.appendChild(m.clipPath),!(m.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)||m.isIndeterminate||m.isActive||(h.style.clipPath="url(#"+m.element.id+"_clippath)",this.animation.doCircularAnimation(this.centerX,this.centerY,s,P,p,d,m,R,this.delay,o?e:null,o?i:null)),m.isIndeterminate&&(m.enableProgressSegments&&d.setAttribute("d",f(this.centerX,this.centerY,s+R/2,m.startAngle,this.trackEndAngle,m.enableRtl,!0)),h.setAttribute("style","clip-path:url(#"+m.element.id+"_clippath)"),this.animation.doCircularIndeterminate(m.enableProgressSegments?h:d,m,v,P,this.centerX,this.centerY,s,R,d))),m.svgObject.appendChild(u))},e.prototype.renderCircularBuffer=function(e,i,o){var n,a,s,l,c=e.renderer.createGroup({id:e.element.id+"_ CircularBufferGroup"}),p=e.calculateProgressRange(e.secondaryProgress>e.maximum?e.maximum:e.secondaryProgress),h=(e.startAngle+(e.enableRtl?-p:p))%360,d=f(this.centerX,this.centerY,i,e.startAngle,h,e.enableRtl,e.enablePieProgress);this.bufferEndPosition=y(this.centerX,this.centerY,i,h);var u=e.secondaryProgressColor?e.secondaryProgressColor:e.themeStyle.bufferColor||this.checkingCircularProgressColor(),g=e.enablePieProgress?u:"none",m=e.enablePieProgress?0:e.secondaryProgressThickness?e.secondaryProgressThickness:e.progressThickness||e.themeStyle.circularProgressThickness,b=new r.PathOption(e.element.id+"_Circularbuffer",g,m,u,e.themeStyle.bufferOpacity,"0",d);0===e.segmentColor.length||e.isIndeterminate||e.enablePieProgress||this.isRange?(a=e.renderer.drawPath(b),e.segmentCount>1&&!e.enablePieProgress&&!this.isRange&&a.setAttribute("stroke-dasharray",e.segmentSize),"Round"!==e.cornerRadius||this.isRange||a.setAttribute("stroke-linecap","round")):(l=e.enableProgressSegments?o:e.totalAngle,s=e.enableProgressSegments?e.progressWidth:e.trackWidth,a=this.segment.createCircularSegment(e,"_CircularBufferSegment",this.centerX,this.centerY,i,e.secondaryProgress>e.maximum?e.maximum:e.secondaryProgress,e.themeStyle.bufferOpacity,m,l,s)),c.appendChild(a),(e.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&!e.isActive&&(n=e.createClipPath(e.bufferClipPath,null,"",!1),c.appendChild(e.bufferClipPath),a.setAttribute("style","clip-path:url(#"+e.element.id+"_clippathBuffer)"),this.animation.doCircularAnimation(this.centerX,this.centerY,i,h,p,n,e,e.progressThickness||e.themeStyle.circularProgressThickness,e.animation.delay)),e.svgObject.appendChild(c)},e.prototype.renderCircularLabel=function(e){var i,o,n,a,s;void 0===e&&(e=!1);var l=this.progress,c=l.labelStyle.text,p=l.renderer.createGroup({id:l.element.id+"_CircularLabelGroup"});document.getElementById(p.id)&&document.getElementById(p.id).remove();var h=(l.value-l.minimum)/(l.maximum-l.minimum)*100,d=l.value<l.minimum?0:+h.toFixed(2),u={cancel:!1,text:c||String(d)+"%",color:l.labelStyle.color||l.themeStyle.circularLabelFont.color};l.trigger("textRender",u),u.cancel||(a=(0,r.measureText)(u.text,l.labelStyle,l.themeStyle.circularLabelFont),n=this.centerY+a.height/2,s=new m(l.element.id+"_circularLabel",l.labelStyle.size||l.themeStyle.circularLabelFont.size,l.labelStyle.fontStyle||l.themeStyle.circularLabelFont.fontStyle,l.labelStyle.fontFamily||l.themeStyle.circularLabelFont.fontFamily,l.labelStyle.fontWeight||l.themeStyle.circularLabelFont.fontWeight,"middle",u.color,this.centerX,n,l.progressRect.width,l.progressRect.height),o=l.renderer.createText(s,u.text),p.appendChild(o),(l.animation.enable&&"Disable"!==t.animationMode||"Enable"===t.animationMode)&&!l.isIndeterminate&&(i=(l.value-l.minimum)/(l.maximum-l.minimum)*l.totalAngle,i=l.value<l.minimum?0:i,this.animation.doLabelAnimation(o,e?l.previousWidth:l.startAngle,i,l,this.delay)),l.svgObject.appendChild(p),l.previousWidth=i)},e.prototype.renderActiveState=function(e,t,i,o,n,a,s){var l,c,p=this.progress,h=i+1;s?(l=(0,r.getElement)(p.element.id+"_CircularActiveProgress")).setAttribute("d",o):(c=new r.PathOption(p.element.id+"_CircularActiveProgress","none",h,"#ffffff",.5,"0",o),l=p.renderer.drawPath(c)),p.segmentCount>1&&l.setAttribute("stroke-dasharray",p.segmentSize),"Round"===p.cornerRadius&&l.setAttribute("stroke-linecap","round");var d=p.createClipPath(p.clipPath,null,"",s);l.setAttribute("style","clip-path:url(#"+p.element.id+"_clippath)"),e.appendChild(l),e.appendChild(p.clipPath),this.animation.doCircularAnimation(this.centerX,this.centerY,t,n,a,d,p,h,0,null,null,l)},e.prototype.validateSegmentSize=function(e,t){var r,i,o=parseInt(e.radius,10)-parseInt(e.innerRadius,10);return 0===o||e.enableProgressSegments?r=e.enableProgressSegments?e.calculateSegmentSize(e.progressWidth,t):e.segmentSize:(i=e.trackWidth+(o<0?e.trackWidth*Math.abs(o)/parseInt(e.radius,10):-e.trackWidth*Math.abs(o)/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}(),q=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])},e(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),$=function(e,t,r,i){var o,n=arguments.length,a=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,r,a):o(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a},Z=function(e){function i(t,r){var i=e.call(this,t,r)||this;return i.linear=new Y(i),i.circular=new V(i),i.annotateAnimation=new N,i.destroyIndeterminate=!1,i.scaleX=1,i.scaleY=1,o.Inject(j),i}var o;return q(i,e),o=i,i.prototype.getModuleName=function(){return"progressbar"},i.prototype.preRender=function(){this.unWireEvents(),this.initPriva