!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.countup=b()}(this,function(){"use strict";var a=function(a,b,c,d,e,f){for(var g=0,h=["webkit","moz","ms","o"],i=0;ithis.endval,this.starttime=null,this.timestamp=null,this.remaining=null,this.frameval=this.startval,this.raf=null,this.decimals=math.max(0,d||0),this.dec=math.pow(10,this.decimals),this.duration=1e3*e||2e3,this.version=function(){return"1.5.0"},this.printvalue=function(a){var b=isnan(a)?"--":k.formatnumber(a);"input"==k.d.tagname?this.d.value=b:"text"==k.d.tagname?this.d.textcontent=b:this.d.innerhtml=b},this.easeoutexpo=function(a,b,c,d){return 1024*c*(-math.pow(2,-10*a/d)+1)/1023+b},this.count=function(a){null===k.starttime&&(k.starttime=a),k.timestamp=a;var b=a-k.starttime;if(k.remaining=k.duration-b,k.options.useeasing)if(k.countdown){var c=k.easeoutexpo(b,0,k.startval-k.endval,k.duration);k.frameval=k.startval-c}else k.frameval=k.easeoutexpo(b,k.startval,k.endval-k.startval,k.duration);else if(k.countdown){var c=(k.startval-k.endval)*(b/k.duration);k.frameval=k.startval-c}else k.frameval=k.startval+(k.endval-k.startval)*(b/k.duration);k.frameval=k.countdown?k.framevalk.endval?k.endval:k.frameval,k.frameval=math.round(k.frameval*k.dec)/k.dec,k.printvalue(k.frameval),bk.endval,k.raf=requestanimationframe(k.count)},this.formatnumber=function(a){a=a.tofixed(k.decimals),a+="";var b,c,d,e;if(b=a.split("."),c=b[0],d=b.length>1?k.options.decimal+b[1]:"",e=/(\d+)(\d{3})/,k.options.usegrouping)for(;e.test(c);)c=c.replace(e,"$1"+k.options.separator+"$2");return k.options.prefix+c+d+k.options.suffix},k.printvalue(k.startval)};return a});