progressbar.min.js
21.4 KB
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).ProgressBar=t()}}(function(){return function o(s,a,u){function h(n,t){if(!a[n]){if(!s[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(p)return p(n,!0);var i=new Error("Cannot find module '"+n+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[n]={exports:{}};s[n][0].call(r.exports,function(t){var e=s[n][1][t];return h(e||t)},r,r.exports,o,s,a,u)}return a[n].exports}for(var p="function"==typeof require&&require,t=0;t<u.length;t++)h(u[t]);return h}({1:[function(t,v,S){(function(){var g,i=this||Function("return this")(),w=function(){"use strict";function r(){}function o(t,e){var n;for(n in t)Object.hasOwnProperty.call(t,n)&&e(n)}function s(e,n){return o(n,function(t){e[t]=n[t]}),e}function a(e,n){o(n,function(t){void 0===e[t]&&(e[t]=n[t])})}function l(t,e,n,i,r,o,s){var a,u,h,p=t<o?0:(t-o)/r;for(a in e)e.hasOwnProperty(a)&&(h="function"==typeof(u=s[a])?u:d[u],e[a]=c(n[a],i[a],h,p));return e}function c(t,e,n,i){return t+(e-t)*n(i)}function f(e,n){var i=t.prototype.filter,r=e._filterArgs;o(i,function(t){void 0!==i[t][n]&&i[t][n].apply(e,r)})}function u(t,e,n,i,r,o,s,a,u,h,p){_=e+n+i,g=Math.min(p||m(),_),w=_<=g,y=i-(_-g),t.isPlaying()&&(w?(u(s,t._attachment,y),t.stop(!0)):(t._scheduleId=h(t._timeoutHandler,1e3/60),f(t,"beforeTween"),g<e+n?l(1,r,o,s,1,1,a):l(g,r,o,s,i,e+n,a),f(t,"afterTween"),u(r,t._attachment,y)))}function h(t,e){var n={},i=typeof e;return o(t,"string"===i||"function"===i?function(t){n[t]=e}:function(t){n[t]||(n[t]=e[t]||p)}),n}function t(t,e){this._currentState=t||{},this._configured=!1,this._scheduleFunction=n,void 0!==e&&this.setConfig(e)}var d,n,_,g,w,y,p="linear",e=Date.now?Date.now:function(){return+new Date},m="undefined"!=typeof SHIFTY_DEBUG_NOW?SHIFTY_DEBUG_NOW:e;return n="undefined"!=typeof window&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame)||setTimeout,t.prototype.tween=function(t){return this._isTweening?this:(void 0===t&&this._configured||this.setConfig(t),this._timestamp=m(),this._start(this.get(),this._attachment),this.resume())},t.prototype.setConfig=function(t){t=t||{},this._configured=!0,this._attachment=t.attachment,this._pausedAtTime=null,this._scheduleId=null,this._delay=t.delay||0,this._start=t.start||r,this._step=t.step||r,this._finish=t.finish||r,this._duration=t.duration||500,this._currentState=s({},t.from||this.get()),this._originalState=this.get(),this._targetState=s({},t.to||this.get());var e=this;this._timeoutHandler=function(){u(e,e._timestamp,e._delay,e._duration,e._currentState,e._originalState,e._targetState,e._easing,e._step,e._scheduleFunction)};var n=this._currentState,i=this._targetState;return a(i,n),this._easing=h(n,t.easing||p),this._filterArgs=[n,this._originalState,i,this._easing],f(this,"tweenCreated"),this},t.prototype.get=function(){return s({},this._currentState)},t.prototype.set=function(t){this._currentState=t},t.prototype.pause=function(){return this._pausedAtTime=m(),this._isPaused=!0,this},t.prototype.resume=function(){return this._isPaused&&(this._timestamp+=m()-this._pausedAtTime),this._isPaused=!1,this._isTweening=!0,this._timeoutHandler(),this},t.prototype.seek=function(t){t=Math.max(t,0);var e=m();return this._timestamp+t===0||(this._timestamp=e-t,this.isPlaying()||(this._isTweening=!0,this._isPaused=!1,u(this,this._timestamp,this._delay,this._duration,this._currentState,this._originalState,this._targetState,this._easing,this._step,this._scheduleFunction,e),this.pause())),this},t.prototype.stop=function(t){return this._isTweening=!1,this._isPaused=!1,this._timeoutHandler=r,(i.cancelAnimationFrame||i.webkitCancelAnimationFrame||i.oCancelAnimationFrame||i.msCancelAnimationFrame||i.mozCancelRequestAnimationFrame||i.clearTimeout)(this._scheduleId),t&&(f(this,"beforeTween"),l(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),f(this,"afterTween"),f(this,"afterTweenEnd"),this._finish.call(this,this._currentState,this._attachment)),this},t.prototype.isPlaying=function(){return this._isTweening&&!this._isPaused},t.prototype.setScheduleFunction=function(t){this._scheduleFunction=t},t.prototype.dispose=function(){var t;for(t in this)this.hasOwnProperty(t)&&delete this[t]},t.prototype.filter={},d=t.prototype.formula={linear:function(t){return t}},s(t,{now:m,each:o,tweenProps:l,tweenProp:c,applyFilter:f,shallowCopy:s,defaults:a,composeEasingObject:h}),"function"==typeof SHIFTY_DEBUG_NOW&&(i.timeoutHandler=u),"object"==typeof S?v.exports=t:void 0===i.Tweenable&&(i.Tweenable=t),t}();w.shallowCopy(w.prototype.formula,{easeInQuad:function(t){return Math.pow(t,2)},easeOutQuad:function(t){return-(Math.pow(t-1,2)-1)},easeInOutQuad:function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},easeInCubic:function(t){return Math.pow(t,3)},easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},easeInQuart:function(t){return Math.pow(t,4)},easeOutQuart:function(t){return-(Math.pow(t-1,4)-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeInQuint:function(t){return Math.pow(t,5)},easeOutQuint:function(t){return Math.pow(t-1,5)+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-Math.pow(t-1,2))},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},elastic:function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},swingFromTo:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},swingFrom:function(t){return t*t*(2.70158*t-1.70158)},swingTo:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},bounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bouncePast:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},easeFromTo:function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},easeFrom:function(t){return Math.pow(t,4)},easeTo:function(t){return Math.pow(t,.25)}}),function(){function p(t,e,n,i,r,o){function h(t){return((l*t+c)*t+f)*t}function p(t){return 0<=t?t:0-t}var s,l=0,c=0,f=0,a=0,u=0,d=0;return l=1-(f=3*e)-(c=3*(i-e)-f),a=1-(d=3*n)-(u=3*(r-n)-d),s=function(t,e){var n,i,r,o,s,a,u;for(r=t,a=0;a<8;a++){if(p(o=h(r)-t)<e)return r;if(p(s=(3*l*(u=r)+2*c)*u+f)<1e-6)break;r-=o/s}if(i=1,(r=t)<(n=0))return n;if(i<r)return i;for(;n<i;){if(p((o=h(r))-t)<e)return r;o<t?n=r:i=r,r=.5*(i-n)+n}return r}(t,1/(200*o)),((a*s+u)*s+d)*s}w.setBezierFunction=function(t,e,n,i,r){var o,s,a,u,h=(o=e,s=n,a=i,u=r,function(t){return p(t,o,s,a,u,1)});return h.displayName=t,h.x1=e,h.y1=n,h.x2=i,h.y2=r,w.prototype.formula[t]=h},w.unsetBezierFunction=function(t){delete w.prototype.formula[t]}}(),(g=new w)._filterArgs=[],w.interpolate=function(t,e,n,i,r){var o=w.shallowCopy({},t),s=r||0,a=w.composeEasingObject(t,i||"linear");g.set({});var u=g._filterArgs;u.length=0,u[0]=o,u[1]=t,u[2]=e,u[3]=a,w.applyFilter(g,"tweenCreated"),w.applyFilter(g,"beforeTween");var h,p,l,c,f,d,_=(h=t,p=o,l=e,c=n,f=a,d=s,w.tweenProps(c,p,h,l,1,d,f));return w.applyFilter(g,"afterTween"),_},function(h){function r(n){h.each(n,function(t){var e=n[t];"string"==typeof e&&e.match(y)&&(n[t]=s(y,e,i))})}function i(t){var e,n=(3===(e=(e=t).replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),v[0]=o(e.substr(0,2)),v[1]=o(e.substr(2,2)),v[2]=o(e.substr(4,2)),v);return"rgb("+n[0]+","+n[1]+","+n[2]+")"}function o(t){return parseInt(t,16)}function s(t,e,n){var i=e.match(t),r=e.replace(t,m);if(i)for(var o,s=i.length,a=0;a<s;a++)o=i.shift(),r=r.replace(m,n(o));return r}function a(t){for(var e=t.match(_),n=e.length,i=t.match(w)[0],r=0;r<n;r++)i+=parseInt(e[r],10)+",";return i.slice(0,-1)+")"}function u(o){var s={};return h.each(o,function(t){var e,n,i=o[t];if("string"==typeof i){var r=c(i);s[t]={formatString:(e=i,n=e.match(d),n?(1===n.length||e.charAt(0).match(f))&&n.unshift(""):n=["",""],n.join(m)),chunkNames:function(t,e){var n,i=[],r=t.length;for(n=0;n<r;n++)i.push("_"+e+"_"+n);return i}(r,t)}}}),s}function p(r,o){h.each(o,function(t){for(var e=c(r[t]),n=e.length,i=0;i<n;i++)r[o[t].chunkNames[i]]=+e[i];delete r[t]})}function l(i,r){h.each(r,function(t){var e=i[t],n=function(t,e){S.length=0;for(var n=e.length,i=0;i<n;i++)S.push(t[e[i]]);return S}(function(t,e){for(var n,i={},r=e.length,o=0;o<r;o++)n=e[o],i[n]=t[n],delete t[n];return i}(i,r[t].chunkNames),r[t].chunkNames);e=function(t,e){for(var n=t,i=e.length,r=0;r<i;r++)n=n.replace(m,+e[r].toFixed(4));return n}(r[t].formatString,n),i[t]=s(g,e,a)})}function c(t){return t.match(_)}var f=/(\d|\-|\.)/,d=/([^\-0-9\.]+)/g,_=/[0-9.\-]+/g,g=new RegExp("rgb\\("+_.source+/,\s*/.source+_.source+/,\s*/.source+_.source+"\\)","g"),w=/^.*\(/,y=/#([0-9]|[a-f]){3,6}/gi,m="VAL",v=[],S=[];h.prototype.filter.token={tweenCreated:function(t,e,n,i){r(t),r(e),r(n),this._tokenData=u(t)},beforeTween:function(t,e,n,i){var a,u;a=i,u=this._tokenData,h.each(u,function(t){var e,n=u[t].chunkNames,i=n.length,r=a[t];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];for(e=0;e<i;e++)a[n[e]]=o[e]||s}else for(e=0;e<i;e++)a[n[e]]=r;delete a[t]}),p(t,this._tokenData),p(e,this._tokenData),p(n,this._tokenData)},afterTween:function(t,e,n,i){var s,a;l(t,this._tokenData),l(e,this._tokenData),l(n,this._tokenData),s=i,a=this._tokenData,h.each(a,function(t){var e=a[t].chunkNames,n=e.length,i=s[e[0]];if("string"==typeof i){for(var r="",o=0;o<n;o++)r+=" "+s[e[o]],delete s[e[o]];s[t]=r.substr(1)}else s[t]=i})}}}(w)}).call(null)},{}],2:[function(t,e,n){var i=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,i.apply(this,arguments)};((o.prototype=new i).constructor=o).prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var n=50-e/2;return r.render(this._pathTemplate,{radius:n,"2radius":2*n})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":7,"./utils":9}],3:[function(t,e,n){var i=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{center} L 100,{center}",i.apply(this,arguments)};((o.prototype=new i).constructor=o).prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 "+e.strokeWidth),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":7,"./utils":9}],4:[function(t,e,n){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Square:t("./square"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":2,"./line":3,"./path":5,"./semicircle":6,"./shape":7,"./square":8,"./utils":9}],5:[function(t,e,n){var p=t("shifty"),l=t("./utils"),i={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},r=function t(e,n){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var i;n=l.extend({duration:800,easing:"linear",from:{},to:{},step:function(){}},n),i=l.isString(e)?document.querySelector(e):e,this.path=i,this._opts=n,this._tweenable=null;var r=this.path.getTotalLength();this.path.style.strokeDasharray=r+" "+r,this.set(0)};r.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},r.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(l.isFunction(e)){var n=this._easing(this._opts.easing);e(this._calculateTo(t,n),this._opts.shape||this,this._opts.attachment)}},r.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},r.prototype.animate=function(t,n,e){n=n||{},l.isFunction(n)&&(e=n,n={});var i=l.extend({},n),r=l.extend({},this._opts);n=l.extend(r,n);var o=this._easing(n.easing),s=this._resolveFromAndTo(t,o,i);this.stop(),this.path.getBoundingClientRect();var a=this._getComputedDashOffset(),u=this._progressToOffset(t),h=this;this._tweenable=new p,this._tweenable.tween({from:l.extend({offset:a},s.from),to:l.extend({offset:u},s.to),duration:n.duration,easing:o,step:function(t){h.path.style.strokeDashoffset=t.offset;var e=n.shape||h;n.step(t,e,n.attachment)},finish:function(t){l.isFunction(e)&&e()}})},r.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},r.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},r.prototype._resolveFromAndTo=function(t,e,n){return n.from&&n.to?{from:n.from,to:n.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},r.prototype._calculateFrom=function(t){return p.interpolate(this._opts.from,this._opts.to,this.value(),t)},r.prototype._calculateTo=function(t,e){return p.interpolate(this._opts.from,this._opts.to,t,e)},r.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(),this._tweenable=null)},r.prototype._easing=function(t){return i.hasOwnProperty(t)?i[t]:t},e.exports=r},{"./utils":9,shifty:1}],6:[function(t,e,n){var i=t("./shape"),r=t("./circle"),o=t("./utils"),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,i.apply(this,arguments)};((s.prototype=new i).constructor=s).prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,n){t.text.style&&(n.style.top="auto",n.style.bottom="0",t.text.alignToBottom?o.setStyle(n,"transform","translate(-50%, 0)"):o.setStyle(n,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,e.exports=s},{"./circle":2,"./shape":7,"./utils":9}],7:[function(t,e,n){var s=t("./path"),a=t("./utils"),i="Object is destroyed",r=function t(e,n){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=a.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},n,!0),a.isObject(n)&&void 0!==n.svgStyle&&(this._opts.svgStyle=n.svgStyle),a.isObject(n)&&a.isObject(n.text)&&void 0!==n.text.style&&(this._opts.text.style=n.text.style);var i,r=this._createSvgView(this._opts);if(!(i=a.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=i,this._container.appendChild(r.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&a.setStyles(r.svg,this._opts.svgStyle),this.svg=r.svg,this.path=r.path,this.trail=r.trail,this.text=null;var o=a.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new s(r.path,o),a.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};r.prototype.animate=function(t,e,n){if(null===this._progressPath)throw new Error(i);this._progressPath.animate(t,e,n)},r.prototype.stop=function(){if(null===this._progressPath)throw new Error(i);void 0!==this._progressPath&&this._progressPath.stop()},r.prototype.destroy=function(){if(null===this._progressPath)throw new Error(i);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,(this._progressPath=null)!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},r.prototype.set=function(t){if(null===this._progressPath)throw new Error(i);this._progressPath.set(t)},r.prototype.value=function(){if(null===this._progressPath)throw new Error(i);return void 0===this._progressPath?0:this._progressPath.value()},r.prototype.setText=function(t){if(null===this._progressPath)throw new Error(i);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),a.isObject(t)?(a.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},r.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var n=null;(t.trailColor||t.trailWidth)&&(n=this._createTrail(t),e.appendChild(n));var i=this._createPath(t);return e.appendChild(i),{svg:e,path:i,trail:n}},r.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},r.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},r.prototype._createTrail=function(t){var e=this._trailString(t),n=a.extend({},t);return n.trailColor||(n.trailColor="#eee"),n.trailWidth||(n.trailWidth=n.strokeWidth),n.color=n.trailColor,n.strokeWidth=n.trailWidth,n.fill=null,this._createPathElement(e,n)},r.prototype._createPathElement=function(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n.setAttribute("stroke",e.color),n.setAttribute("stroke-width",e.strokeWidth),e.fill?n.setAttribute("fill",e.fill):n.setAttribute("fill-opacity","0"),n},r.prototype._createTextContainer=function(t,e){var n=document.createElement("div");n.className=t.text.className;var i=t.text.style;return i&&(t.text.autoStyleContainer&&(e.style.position="relative"),a.setStyles(n,i),i.color||(n.style.color=t.color)),this._initializeTextContainer(t,e,n),n},r.prototype._initializeTextContainer=function(t,e,n){},r.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},r.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},r.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),n=parseFloat(e.getPropertyValue("width"),10),i=parseFloat(e.getPropertyValue("height"),10);a.floatEquals(this.containerAspectRatio,n/i)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",n/i),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},e.exports=r},{"./path":5,"./utils":9}],8:[function(t,e,n){var i=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",i.apply(this,arguments)};((o.prototype=new i).constructor=o).prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},e.exports=o},{"./shape":7,"./utils":9}],9:[function(t,e,n){function i(t,e,n){for(var i=t.style,r=0;r<s.length;++r){i[s[r]+o(e)]=n}i[e]=n}function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function a(t){return e=t,"[object Array]"!==Object.prototype.toString.call(e)&&("object"===typeof t&&!!t);var e}function r(t,e){for(var n in t)if(t.hasOwnProperty(n)){e(t[n],n)}}var s="Webkit Moz O ms".split(" ");e.exports={extend:function t(e,n,i){for(var r in e=e||{},i=i||!1,n=n||{})if(n.hasOwnProperty(r)){var o=e[r],s=n[r];i&&a(o)&&a(s)?e[r]=t(o,s,i):e[r]=s}return e},render:function(t,e){var n=t;for(var i in e)if(e.hasOwnProperty(i)){var r=e[i],o=new RegExp("\\{"+i+"\\}","g");n=n.replace(o,r)}return n},setStyle:i,setStyles:function(n,t){r(t,function(t,e){null!=t&&(a(t)&&!0===t.prefix?i(n,e,t.value):n.style[e]=t)})},capitalize:o,isString:function(t){return"string"==typeof t||t instanceof String},isFunction:function(t){return"function"==typeof t},isObject:a,forEachObject:r,floatEquals:function(t,e){return Math.abs(t-e)<.001},removeChildren:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}}},{}]},{},[4])(4)});