diff --git a/dist/progressbar.js b/dist/progressbar.js index 4efa145..5ad6956 100644 --- a/dist/progressbar.js +++ b/dist/progressbar.js @@ -1,7 +1,3 @@ -// ProgressBar.js 1.1.1 -// https://kimmobrunfeldt.github.io/progressbar.js -// License: MIT - (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ProgressBar = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i=0?t:0-t};return l=1-(p=3*n)-(h=3*(r-n)-p),s=1-(f=3*e)-(c=3*(i-e)-f),u=t,a=function(t){return 1/(200*t)}(o),function(t){return((s*t+c)*t+f)*t}(function(t,n){var e,r,i,o,u,a;for(i=t,a=0;a<8;a++){if(o=v(i)-t,_(o)(r=1))return r;for(;eo?e=i:r=i,i=.5*(r-e)+e}return i}(u,a))}var z,U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(i){return R(i,t,n,e,r,1)}},$=function(t,n,e,r,i){var o=U(n,e,r,i);return o.displayName=t,o.x1=n,o.y1=e,o.x2=r,o.y2=i,kt.formulas[t]=o},L=function(t){return delete kt.formulas[t]};function V(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function W(t,n){for(var e=0;et.length)&&(n=t.length);for(var e=0,r=new Array(n);ea?a:n;t._hasEnded=s>=a;var c=o-(a-s),f=t._filters.length>0;if(t._hasEnded)return t._render(u,t._data,c),t.stop(!0);f&&t._applyFilter(ut),s1&&void 0!==arguments[1]?arguments[1]:et,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(n)){var r=U.apply(void 0,H(n));return r}var i=G(n);if(vt[n])return vt[n];if(i===ct||i===st)for(var o in t)e[o]=n;else for(var u in t)e[u]=n[u]||et;return e},St=function(t){t===ht?(ht=t._next)?ht._previous=null:pt=null:t===pt?(pt=t._previous)?pt._next=null:ht=null:(tt=t._previous,nt=t._next,tt._next=nt,nt._previous=tt),t._previous=t._next=null},jt="function"==typeof Promise?Promise:null;z=Symbol.toStringTag;var kt=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;V(this,t),Y(this,z,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=n||{},this._originalState={},this._targetState={},this._start=lt,this._render=lt,this._promiseCtor=jt,e&&this.setConfig(e)}var n,e;return n=t,e=[{key:"_applyFilter",value:function(t){for(var n=this._filters.length;n>0;n--){var e=this._filters[n-n][t];e&&e(this)}}},{key:"tween",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!n&&this._config||this.setConfig(n),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._config;for(var r in n)e[r]=n[r];var i=e.promise,o=void 0===i?this._promiseCtor:i,u=e.start,a=void 0===u?lt:u,s=e.finish,c=e.render,f=void 0===c?this._config.step||lt:c,l=e.step,h=void 0===l?lt:l;this._data=e.data||e.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=n.delay||0,this._start=a,this._render=f||h,this._duration=e.duration||500,this._promiseCtor=o,s&&(this._resolve=s);var p=n.from,v=n.to,y=void 0===v?{}:v,_=this._currentState,d=this._originalState,g=this._targetState;for(var m in p)_[m]=p[m];var b=!1;for(var w in _){var O=_[w];b||G(O)!==ct||(b=!0),d[w]=O,g[w]=y.hasOwnProperty(w)?y[w]:O}if(this._easing=Ot(this._currentState,e.easing,this._easing),this._filters.length=0,b){for(var S in t.filters)t.filters[S].doesApply(this)&&this._filters.push(t.filters[S]);this._applyFilter(at)}return this}},{key:"then",value:function(t,n){var e=this;return this._promise=new this._promiseCtor((function(t,n){e._resolve=t,e._reject=n})),this._promise.then(t,n)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return X({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,St(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=n-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ht?(ht=this,pt=this):(this._previous=pt,pt._next=this,pt=this),this)}},{key:"seek",value:function(n){n=Math.max(n,0);var e=t.now();return this._timestamp+n===0||(this._timestamp=e-n,_t(this,e)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,St(this);var n=this._filters.length>0;return t&&(n&&this._applyFilter(ut),yt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),n&&(this._applyFilter(it),this._applyFilter(ot))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._currentState,e=this._data,r=this._isPlaying;return r?(this._reject&&this._reject({data:e,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(n){t.setScheduleFunction(n)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=X({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}],e&&W(n.prototype,e),t}();function Pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new kt;return n.tween(t),n.tweenable=n,n}Y(kt,"now",(function(){return Z})),Y(kt,"setScheduleFunction",(function(t){return ft=t})),Y(kt,"filters",{}),Y(kt,"formulas",vt),bt(!0);var Mt,Et,At=/(\d|-|\.)/,Tt=/([^\-0-9.]+)/g,It=/[0-9.-]+/g,Ft=(Mt=It.source,Et=/,\s*/.source,new RegExp("rgba?\\(".concat(Mt).concat(Et).concat(Mt).concat(Et).concat(Mt,"(").concat(Et).concat(Mt,")?\\)"),"g")),xt=/^.*\(/,Ct=/#([0-9]|[a-f]){3,6}/gi,Dt="VAL",qt=function(t,n){return t.map((function(t,e){return"_".concat(n,"_").concat(e)}))};function Qt(t){return parseInt(t,16)}var Bt=function(t){return"rgb(".concat((n=t,3===(n=n.replace(/#/,"")).length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]),[Qt(n.substr(0,2)),Qt(n.substr(2,2)),Qt(n.substr(4,2))]).join(","),")");var n},Nt=function(t,n,e){var r=n.match(t),i=n.replace(t,Dt);return r&&r.forEach((function(t){return i=i.replace(Dt,e(t))})),i},Rt=function(t){for(var n in t){var e=t[n];"string"==typeof e&&e.match(Ct)&&(t[n]=Nt(Ct,e,Bt))}},zt=function(t){var n=t.match(It),e=n.slice(0,3).map(Math.floor),r=t.match(xt)[0];if(3===n.length)return"".concat(r).concat(e.join(","),")");if(4===n.length)return"".concat(r).concat(e.join(","),",").concat(n[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},Ut=function(t){return t.match(It)},$t=function(t,n){var e={};return n.forEach((function(n){e[n]=t[n],delete t[n]})),e},Lt=function(t,n){return n.map((function(n){return t[n]}))},Vt=function(t,n){return n.forEach((function(n){return t=t.replace(Dt,+n.toFixed(4))})),t},Wt=function(t){for(var n in t._currentState)if("string"==typeof t._currentState[n])return!0;return!1};function Gt(t){var n=t._currentState;[n,t._originalState,t._targetState].forEach(Rt),t._tokenData=function(t){var n,e,r={};for(var i in t){var o=t[i];"string"==typeof o&&(r[i]={formatString:(n=o,e=void 0,e=n.match(Tt),e?(1===e.length||n.charAt(0).match(At))&&e.unshift(""):e=["",""],e.join(Dt)),chunkNames:qt(Ut(o),i)})}return r}(n)}function Ht(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,o=t._tokenData;!function(t,n){var e=function(e){var r=n[e].chunkNames,i=t[e];if("string"==typeof i){var o=i.split(" "),u=o[o.length-1];r.forEach((function(n,e){return t[n]=o[e]||u}))}else r.forEach((function(n){return t[n]=i}));delete t[e]};for(var r in n)e(r)}(i,o),[n,e,r].forEach((function(t){return function(t,n){var e=function(e){Ut(t[e]).forEach((function(r,i){return t[n[e].chunkNames[i]]=+r})),delete t[e]};for(var r in n)e(r)}(t,o)}))}function Jt(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,o=t._tokenData;[n,e,r].forEach((function(t){return function(t,n){for(var e in n){var r=n[e],i=r.chunkNames,o=r.formatString,u=Vt(o,Lt($t(t,i),i));t[e]=Nt(Ft,u,zt)}}(t,o)})),function(t,n){for(var e in n){var r=n[e].chunkNames,i=t[r[0]];t[e]="string"==typeof i?r.map((function(n){var e=t[n];return delete t[n],e})).join(" "):i}}(i,o)}function Kt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Xt(t){for(var n=1;n4&&void 0!==arguments[4]?arguments[4]:0,o=Xt({},t),u=Ot(t,r);for(var a in Zt._filters.length=0,Zt.set({}),Zt._currentState=o,Zt._originalState=t,Zt._targetState=n,Zt._easing=u,tn)tn[a].doesApply(Zt)&&Zt._filters.push(tn[a]);Zt._applyFilter("tweenCreated"),Zt._applyFilter("beforeTween");var s=yt(e,o,t,n,1,i,u);return Zt._applyFilter("afterTween"),s};function en(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);es=>function(e,t,n,i,s,r){let a=0,o=0,u=0,l=0,c=0,h=0;const p=e=>((a*e+o)*e+u)*e,d=e=>(3*a*e+2*o)*e+u,_=e=>e>=0?e:0-e;return u=3*t,o=3*(i-t)-u,a=1-u-o,h=3*n,c=3*(s-n)-h,l=1-h-c,f=e,g=(e=>1/(200*e))(r),(e=>((l*e+c)*e+h)*e)(((e,t)=>{let n,i,s,r,a,o;for(s=e,o=0;o<8;o++){if(r=p(s)-e,_(r)i)return i;for(;nr?n=s:i=s,s=.5*(i-n)+n}return s})(f,g));var f,g}(s,e,t,n,i,1),t.setBezierFunction=(e,n,s,r,a)=>{const o=(0,t.getCubicBezierTransition)(n,s,r,a);return o.displayName=e,o.x1=n,o.y1=s,o.x2=r,o.y2=a,i.Tweenable.easing[e]=o}},156:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.standardEasingFunctions=t.setBezierFunction=t.Scene=t.interpolate=t.tween=t.Tweenable=t.shouldScheduleUpdate=t.processTweens=void 0;const r=n(55);Object.defineProperty(t,"processTweens",{enumerable:!0,get:function(){return r.processTweens}}),Object.defineProperty(t,"shouldScheduleUpdate",{enumerable:!0,get:function(){return r.shouldScheduleUpdate}}),Object.defineProperty(t,"Tweenable",{enumerable:!0,get:function(){return r.Tweenable}}),Object.defineProperty(t,"tween",{enumerable:!0,get:function(){return r.tween}});var a=n(243);Object.defineProperty(t,"interpolate",{enumerable:!0,get:function(){return a.interpolate}});var o=n(612);Object.defineProperty(t,"Scene",{enumerable:!0,get:function(){return o.Scene}});var u=n(933);Object.defineProperty(t,"setBezierFunction",{enumerable:!0,get:function(){return u.setBezierFunction}});var l=n(809);Object.defineProperty(t,"standardEasingFunctions",{enumerable:!0,get:function(){return l.standardEasingFunctions}}),s(n(613),t),t.VERSION=String("3.0.4")},243:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.interpolate=void 0;const i=n(55),s=new i.Tweenable,{filters:r}=i.Tweenable;t.interpolate=(e,t,n,a=i.Tweenable.easing.linear,o=0)=>{const u=Object.assign({},e),l=(0,i.composeEasingObject)(e,a);s._filters.length=0,s.setState({}),s._currentState=u,s._originalState=e,s._targetState=t,s._easing=l;for(const e in r)r[e].doesApply(s)&&s._filters.push(r[e]);s._applyFilter("tweenCreated"),s._applyFilter("beforeTween");const c=(0,i.tweenProps)(n,u,e,t,1,o,l);return s._applyFilter("afterTween"),c}},612:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Scene=void 0,t.Scene=class{constructor(...e){this._tweenables=[],e.forEach(this.add.bind(this))}get tweenables(){return[...this._tweenables]}get promises(){return this._tweenables.map((e=>e.then()))}add(e){return this._tweenables.push(e),e}remove(e){const t=this._tweenables.indexOf(e);return t>-1&&this._tweenables.splice(t,1),e}empty(){return this.tweenables.map(this.remove.bind(this))}get isPlaying(){return this._tweenables.some((({isPlaying:e})=>e))}tween(){return this._tweenables.forEach((e=>e.tween())),this}pause(){return this._tweenables.forEach((e=>e.pause())),this}resume(){return this._tweenables.filter((({hasEnded:e})=>!e)).forEach((e=>e.resume())),this}stop(e){return this._tweenables.forEach((t=>t.stop(e))),this}}},809:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.standardEasingFunctions=void 0,t.standardEasingFunctions=Object.freeze({linear:e=>e,easeInQuad:e=>Math.pow(e,2),easeOutQuad:e=>-(Math.pow(e-1,2)-1),easeInOutQuad:e=>(e/=.5)<1?.5*Math.pow(e,2):-.5*((e-=2)*e-2),easeInCubic:e=>Math.pow(e,3),easeOutCubic:e=>Math.pow(e-1,3)+1,easeInOutCubic:e=>(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2),easeInQuart:e=>Math.pow(e,4),easeOutQuart:e=>-(Math.pow(e-1,4)-1),easeInOutQuart:e=>(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2),easeInQuint:e=>Math.pow(e,5),easeOutQuint:e=>Math.pow(e-1,5)+1,easeInOutQuint:e=>(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2),easeInSine:e=>1-Math.cos(e*(Math.PI/2)),easeOutSine:e=>Math.sin(e*(Math.PI/2)),easeInOutSine:e=>-.5*(Math.cos(Math.PI*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e)),easeInCirc:e=>-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInBack:e=>{const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:e=>{const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:e=>{let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},elastic:e=>-1*Math.pow(4,-8*e)*Math.sin((6*e-1)*(2*Math.PI)/2)+1,swingFromTo:e=>{let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},swingFrom:e=>{const t=1.70158;return e*e*((t+1)*e-t)},swingTo:e=>{const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},bounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,bouncePast:e=>e<1/2.75?7.5625*e*e:e<2/2.75?2-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?2-(7.5625*(e-=2.25/2.75)*e+.9375):2-(7.5625*(e-=2.625/2.75)*e+.984375),easeFromTo:e=>(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2),easeFrom:e=>Math.pow(e,4),easeTo:e=>Math.pow(e,.25)})},525:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.afterTween=t.beforeTween=t.tweenCreated=t.doesApply=void 0;const i=n(613),s=/(\d|-|\.)/,r=/([^\-0-9.]+)/g,a=/[0-9.-]+/g,o=(()=>{const e=a.source,t=/,\s*/.source;return new RegExp(`rgba?\\(${e}${t}${e}${t}${e}(${t}${e})?\\)`,"g")})(),u=/^.*\(/,l=/#([0-9]|[a-f]){3,6}/gi,c="VAL",h=(e,t)=>e.map(((e,n)=>`_${t}_${n}`)),p=e=>{let t=e.match(r);return t?(1===t.length||e.charAt(0).match(s))&&t.unshift(""):t=["",""],t.join(c)};function d(e){return parseInt(e,16)}const _=e=>`rgb(${(e=>{if(3===(e=e.replace(/#/,"")).length){const[t,n,i]=e.split("");e=t+t+n+n+i+i}return[d(e.substring(0,2)),d(e.substring(2,4)),d(e.substring(4,6))]})(e).join(",")})`,f=(e,t,n)=>{const i=t.match(e);let s=t.replace(e,c);return i&&i.forEach((e=>s=s.replace(c,n(e)))),s},g=e=>{for(const t in e){const n=e[t];"string"==typeof n&&n.match(l)&&(e[t]=f(l,n,_))}},w=e=>{var t,n;const i=null!==(t=e.match(a))&&void 0!==t?t:[],s=i.slice(0,3).map((e=>Math.floor(Number(e)))),r=null===(n=e.match(u))||void 0===n?void 0:n[0];if(3===i.length)return`${r}${s.join(",")})`;if(4===i.length)return`${r}${s.join(",")},${i[3]})`;throw new Error(`Invalid rgbChunk: ${e}`)},m=e=>{var t;return null!==(t=e.match(a))&&void 0!==t?t:[]},b=(e,t)=>{const n={};return t.forEach((t=>{n[t]=e[t],delete e[t]})),n},y=(e,t)=>t.map((t=>Number(e[t]))),v=(e,t)=>(t.forEach((t=>e=e.replace(c,String(+t.toFixed(4))))),e);t.doesApply=e=>{for(const t in e._currentState)if("string"==typeof e._currentState[t])return!0;return!1},t.tweenCreated=function(e){const{_currentState:t,_originalState:n,_targetState:i}=e;[t,n,i].forEach(g),e._tokenData=(e=>{var t;const n={};for(const i in e){const s=e[i];"string"==typeof s&&(n[i]={formatString:p(s),chunkNames:h(null===(t=m(s))||void 0===t?void 0:t.map(Number),i)})}return n})(t)},t.beforeTween=function(e){const{_currentState:t,_originalState:n,_targetState:s,_easing:r,_tokenData:a}=e;"function"!=typeof r&&a&&((e,t)=>{var n;for(const s in t){const{chunkNames:r}=t[s],a=e[s];if("string"==typeof a){const t=a.split(" "),s=t[t.length-1];for(let a=0;ae[t]=a));delete e[s]}})(r,a),[t,n,s].forEach((e=>((e,t)=>{for(const n in t)m(String(e[n])).forEach(((i,s)=>e[t[n].chunkNames[s]]=+i)),delete e[n]})(e,null!=a?a:{})))},t.afterTween=function(e){const{_currentState:t,_originalState:n,_targetState:i,_easing:s,_tokenData:r}=e;[t,n,i].forEach((e=>((e,t)=>{for(const n in t){const{chunkNames:i,formatString:s}=t[n],r=v(s,y(b(e,i),i));e[n]=f(o,r,w)}})(e,null!=r?r:{}))),"function"!=typeof s&&r&&((e,t)=>{for(const n in t){const{chunkNames:i}=t[n],s=e[i[0]];e[n]="string"==typeof s?i.map((t=>{const n=e[t];return delete e[t],n})).join(" "):s}})(s,r)}},55:function(e,t,n){var i,s=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.shouldScheduleUpdate=t.tween=t.Tweenable=t.composeEasingObject=t.scheduleUpdate=t.processTweens=t.tweenProps=t.getListTail=t.getListHead=t.resetList=void 0;const o=n(809),u=n(933),l=n(613),c=a(n(525)),h="linear",p=1e3/60,d="undefined"!=typeof window?window:n.g,_="afterTween",f="beforeTween",g="string",w="function";let m=d.requestAnimationFrame;m||(m="undefined"==typeof window?setTimeout:window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout);const b=()=>{};let y=null,v=null;t.resetList=()=>{y=v=null},t.getListHead=()=>y,t.getListTail=()=>v,t.tweenProps=(e,t,n,i,s,r,a)=>{var u;let l,c=0;const h=e{var i;let s=null!==(i=e._timestamp)&&void 0!==i?i:0;const r=e._currentState,a=e._delay;if(nl?l:n;e._hasEnded=c>=l;const h=o-(l-c);if(e._hasEnded)return e._render(u,h,e._data),e.stop(!0);e._applyFilter(f),c{let e;const t=E.now();let n=y;for(;n;)e=n._next,S(n,t),n=e};const{now:O}=Date;let j,M=!1;t.scheduleUpdate=()=>{j=O(),M&&m.call(d,t.scheduleUpdate,p),(0,t.processTweens)()},t.composeEasingObject=(e,t=h,n={})=>{if(typeof t===g&&(0,l.isEasingKey)(t))return E.easing[t];if(Array.isArray(t))return(0,u.getCubicBezierTransition)(...t);if("object"==typeof n)if(typeof t===g||typeof t===w)for(const i in e)n[i]=t;else for(const i in e)n[i]=t[i]||h;return n};const P=(()=>{let e,t;return n=>{e=null,t=null,n===y?(y=n._next,y?y._previous=null:v=null):n===v?(v=n._previous,v?v._next=null:y=null):(e=n._previous,t=n._next,e&&(e._next=t),t&&(t._previous=e)),n._previous=n._next=null}})(),T=typeof Promise===w?Promise:null;class E{constructor(e={},t){this[i]="Promise",this._next=null,this._previous=null,this._config={},this._data={},this._delay=0,this._duration=500,this._filters=[],this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._originalState={},this._targetState={},this._start=b,this._render=b,this._promiseCtor=T,this._promise=null,this._isPlaying=!1,this._pausedAtTime=null,this._easing={},this._currentState=e||{},t&&this.setConfig(t)}_applyFilter(e){var t;for(let n=this._filters.length;n>0;n--){const i=this._filters[n-n];null===(t=i[e])||void 0===t||t.call(i,this)}}tween(e){return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=E.now(),this._start(this.state,this._data),this._delay&&this._render(this._currentState,0,this._data),this._resume(this._timestamp)}setConfig(e={}){var n;const{_config:i}=this;let s;for(s in e)i[s]=e[s];const{promise:r=this._promiseCtor,start:a=b,finish:o,render:u=b}=i;this._data=i.data||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._delay=e.delay||0,this._start=a,this._render=u,this._duration=i.duration||500,this._promiseCtor=r,o&&(this._resolve=o);const{from:l,to:c={}}=e,{_currentState:h,_originalState:p,_targetState:d}=this;for(const e in l)h[e]=l[e];let _=!1;for(const e in h){const t=h[e];_||typeof t!==g||(_=!0),p[e]=t,d[e]=null!==(n=c[e])&&void 0!==n?n:t}if(this._easing=(0,t.composeEasingObject)(this._currentState,i.easing,this._easing),this._filters.length=0,_){for(const e in E.filters)E.filters[e].doesApply(this)&&this._filters.push(E.filters[e]);this._applyFilter("tweenCreated")}return this}then(e,t){if(!this._promiseCtor)throw new Error("Promise implementation is unavailable");return this._promise=new this._promiseCtor(((e,t)=>{this._resolve=e,this._reject=t})),this._promise.then(e,t)}catch(e){return this.then().catch(e)}finally(e){return this.then().finally(e)}get state(){return Object.assign({},this._currentState)}setState(e){this._currentState=e}pause(){return this._isPlaying?(this._pausedAtTime=E.now(),this._isPlaying=!1,P(this),this):this}resume(){return this._resume()}_resume(e=E.now()){if(null===this._timestamp)return this.tween();if(this._isPlaying&&this._promise)return this;this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0;const n=Boolean(y);return null===y?(y=this,v=this):(this._previous=v,v&&(v._next=this),v=this),n||(0,t.shouldScheduleUpdate)(!0),this}seek(e){var t;e=Math.max(e,0);const n=E.now();return(null!==(t=this._timestamp)&&void 0!==t?t:0)+e===0||(this._timestamp=n-e,S(this,n)),this}stop(e=!1){var n;return this._isPlaying?(this._isPlaying=!1,P(this),e&&(this._applyFilter(f),(0,t.tweenProps)(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),this._applyFilter(_),this._applyFilter("afterTweenEnd")),null===(n=this._resolve)||void 0===n||n.call(this,{data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this):this}cancel(e=!1){var t;const{_currentState:n,_data:i,_isPlaying:s}=this;return s?(null===(t=this._reject)||void 0===t||t.call(this,{data:i,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(e)):this}get isPlaying(){return this._isPlaying}get hasEnded(){return this._hasEnded}data(e=null){return e&&(this._data=Object.assign({},e)),this._data}dispose(){for(const e in this)delete this[e]}}t.Tweenable=E,i=Symbol.toStringTag,E.now=()=>(M||(j=O()),j),E.setScheduleFunction=e=>m=e,E.filters={token:c},E.easing=Object.create(o.standardEasingFunctions),t.tween=function(e={}){return new E({},{}).tween(e)},t.shouldScheduleUpdate=e=>{e&&M||(M=e,e&&(0,t.scheduleUpdate)())}},613:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isEasingKey=void 0;const i=n(55);t.isEasingKey=e=>e in i.Tweenable.easing}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(156)}()})); },{}],3:[function(require,module,exports){ // Circle shaped progress bar @@ -2092,6 +2088,7 @@ var shifty = require('shifty'); var utils = require('./utils'); var Tweenable = shifty.Tweenable; +var interpolate = shifty.interpolate; var EASING_ALIASES = { easeIn: 'easeInCubic', @@ -2100,12 +2097,10 @@ var EASING_ALIASES = { }; var Path = function Path(path, opts) { - // Throw a better error if not initialized with `new` keyword if (!(this instanceof Path)) { throw new Error('Constructor was called without new keyword'); } - // Default parameters for animation opts = utils.extend({ delay: 0, duration: 800, @@ -2122,12 +2117,10 @@ var Path = function Path(path, opts) { element = path; } - // Reveal .path as public attribute this.path = element; this._opts = opts; this._tweenable = null; - // Set up the starting positions var length = this.path.getTotalLength(); this.path.style.strokeDasharray = length + ' ' + length; this.set(0); @@ -2136,18 +2129,12 @@ var Path = function Path(path, opts) { Path.prototype.value = function value() { var offset = this._getComputedDashOffset(); var length = this.path.getTotalLength(); - - var progress = 1 - offset / length; - // Round number to prevent returning very small number like 1e-30, which - // is practically 0 - return parseFloat(progress.toFixed(6), 10); + return parseFloat((1 - offset / length).toFixed(6), 10); }; Path.prototype.set = function set(progress) { this.stop(); - this.path.style.strokeDashoffset = this._progressToOffset(progress); - var step = this._opts.step; if (utils.isFunction(step)) { var easing = this._easing(this._opts.easing); @@ -2162,19 +2149,14 @@ Path.prototype.stop = function stop() { this.path.style.strokeDashoffset = this._getComputedDashOffset(); }; -// Method introduced here: -// http://jakearchibald.com/2013/animated-line-drawing-svg/ Path.prototype.animate = function animate(progress, opts, cb) { opts = opts || {}; - if (utils.isFunction(opts)) { cb = opts; opts = {}; } var passedOpts = utils.extend({}, opts); - - // Copy default opts to new object so defaults are not modified var defaultOpts = utils.extend({}, this._opts); opts = utils.extend(defaultOpts, opts); @@ -2182,9 +2164,6 @@ Path.prototype.animate = function animate(progress, opts, cb) { var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts); this.stop(); - - // Trigger a layout so styles are calculated & the browser - // picks up the starting position before animating this.path.getBoundingClientRect(); var offset = this._getComputedDashOffset(); @@ -2203,7 +2182,7 @@ Path.prototype.animate = function animate(progress, opts, cb) { var reference = opts.shape || self; opts.step(state, reference, opts.attachment); } - }).then(function(state) { + }).then(function() { if (utils.isFunction(cb)) { cb(); } @@ -2223,29 +2202,19 @@ Path.prototype._progressToOffset = function _progressToOffset(progress) { return length - progress * length; }; -// Resolves from and to values for animation. Path.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) { if (opts.from && opts.to) { - return { - from: opts.from, - to: opts.to - }; + return { from: opts.from, to: opts.to }; } - - return { - from: this._calculateFrom(easing), - to: this._calculateTo(progress, easing) - }; + return { from: this._calculateFrom(easing), to: this._calculateTo(progress, easing) }; }; -// Calculate `from` values from options passed at initialization Path.prototype._calculateFrom = function _calculateFrom(easing) { - return shifty.interpolate(this._opts.from, this._opts.to, this.value(), easing); + return interpolate(this._opts.from, this._opts.to, this.value(), easing); }; -// Calculate `to` values from options passed at initialization Path.prototype._calculateTo = function _calculateTo(progress, easing) { - return shifty.interpolate(this._opts.from, this._opts.to, progress, easing); + return interpolate(this._opts.from, this._opts.to, progress, easing); }; Path.prototype._stopTween = function _stopTween() { @@ -2256,11 +2225,7 @@ Path.prototype._stopTween = function _stopTween() { }; Path.prototype._easing = function _easing(easing) { - if (EASING_ALIASES.hasOwnProperty(easing)) { - return EASING_ALIASES[easing]; - } - - return easing; + return EASING_ALIASES[easing] || easing; }; module.exports = Path; diff --git a/dist/progressbar.min.js b/dist/progressbar.min.js index ff2f301..acc6e0c 100644 --- a/dist/progressbar.min.js +++ b/dist/progressbar.min.js @@ -1,7 +1,2 @@ -// ProgressBar.js 1.1.1 -// https://kimmobrunfeldt.github.io/progressbar.js -// License: MIT - -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.ProgressBar=a()}}(function(){var a;return function(){function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){return e(b[g][1][a]||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g-1}function t(a,b){var c=this.__data__,d=J(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function u(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b1?c[e-1]:void 0,g=e>2?c[2]:void 0;for(f=a.length>3&&"function"==typeof f?(e--,f):void 0,g&&da(c[0],c[1],g)&&(f=e<3?void 0:f,e=1),b=Object(b);++d-1&&a%1==0&&a0){if(++b>=Ca)return arguments[0]}else b=0;return a.apply(void 0,arguments)}}function ma(a){if(null!=a){try{return cb.call(a)}catch(a){}try{return a+""}catch(a){}}return""}function na(a,b){return a===b||a!==a&&b!==b}function oa(a){return null!=a&&ra(a.length)&&!qa(a)}function pa(a){return ta(a)&&oa(a)}function qa(a){if(!sa(a))return!1;var b=L(a);return b==Ha||b==Ia||b==Ga||b==La}function ra(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=Ea}function sa(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function ta(a){return null!=a&&"object"==typeof a}function ua(a){if(!ta(a)||L(a)!=Ka)return!1;var b=mb(a);if(null===b)return!0;var c=db.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&cb.call(c)==gb}function va(a){return X(a,wa(a))}function wa(a){return oa(a)?G(a,!0):P(a)}function xa(a){return function(){return a}}function ya(a){return a}function za(){return!1}var Aa=200,Ba="__lodash_hash_undefined__",Ca=800,Da=16,Ea=9007199254740991,Fa="[object Arguments]",Ga="[object AsyncFunction]",Ha="[object Function]",Ia="[object GeneratorFunction]",Ja="[object Null]",Ka="[object Object]",La="[object Proxy]",Ma="[object Undefined]",Na=/[\\^$.*+?()[\]{}|]/g,Oa=/^\[object .+?Constructor\]$/,Pa=/^(?:0|[1-9]\d*)$/,Qa={};Qa["[object Float32Array]"]=Qa["[object Float64Array]"]=Qa["[object Int8Array]"]=Qa["[object Int16Array]"]=Qa["[object Int32Array]"]=Qa["[object Uint8Array]"]=Qa["[object Uint8ClampedArray]"]=Qa["[object Uint16Array]"]=Qa["[object Uint32Array]"]=!0,Qa[Fa]=Qa["[object Array]"]=Qa["[object ArrayBuffer]"]=Qa["[object Boolean]"]=Qa["[object DataView]"]=Qa["[object Date]"]=Qa["[object Error]"]=Qa[Ha]=Qa["[object Map]"]=Qa["[object Number]"]=Qa[Ka]=Qa["[object RegExp]"]=Qa["[object Set]"]=Qa["[object String]"]=Qa["[object WeakMap]"]=!1;var Ra="object"==typeof a&&a&&a.Object===Object&&a,Sa="object"==typeof self&&self&&self.Object===Object&&self,Ta=Ra||Sa||Function("return this")(),Ua="object"==typeof c&&c&&!c.nodeType&&c,Va=Ua&&"object"==typeof b&&b&&!b.nodeType&&b,Wa=Va&&Va.exports===Ua,Xa=Wa&&Ra.process,Ya=function(){try{var a=Va&&Va.require&&Va.require("util").types;return a||Xa&&Xa.binding&&Xa.binding("util")}catch(a){}}(),Za=Ya&&Ya.isTypedArray,$a=Array.prototype,_a=Function.prototype,ab=Object.prototype,bb=Ta["__core-js_shared__"],cb=_a.toString,db=ab.hasOwnProperty,eb=function(){var a=/[^.]+$/.exec(bb&&bb.keys&&bb.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),fb=ab.toString,gb=cb.call(Object),hb=RegExp("^"+cb.call(db).replace(Na,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ib=Wa?Ta.Buffer:void 0,jb=Ta.Symbol,kb=Ta.Uint8Array,lb=ib?ib.allocUnsafe:void 0,mb=h(Object.getPrototypeOf,Object),nb=Object.create,ob=ab.propertyIsEnumerable,pb=$a.splice,qb=jb?jb.toStringTag:void 0,rb=function(){try{var a=_(Object,"defineProperty");return a({},"",{}),a}catch(a){}}(),sb=ib?ib.isBuffer:void 0,tb=Math.max,ub=Date.now,vb=_(Ta,"Map"),wb=_(Object,"create"),xb=function(){function a(){}return function(b){if(!sa(b))return{};if(nb)return nb(b);a.prototype=b;var c=new a;return a.prototype=void 0,c}}();i.prototype.clear=j,i.prototype.delete=k,i.prototype.get=l,i.prototype.has=m,i.prototype.set=n,o.prototype.clear=p,o.prototype.delete=q,o.prototype.get=r,o.prototype.has=s,o.prototype.set=t,u.prototype.clear=v,u.prototype.delete=w,u.prototype.get=x,u.prototype.has=y,u.prototype.set=z,A.prototype.clear=B,A.prototype.delete=C,A.prototype.get=D,A.prototype.has=E,A.prototype.set=F;var yb=Z(),zb=rb?function(a,b){return rb(a,"toString",{configurable:!0,enumerable:!1,value:xa(b),writable:!0})}:ya,Ab=la(zb),Bb=M(function(){return arguments}())?M:function(a){return ta(a)&&db.call(a,"callee")&&!ob.call(a,"callee")},Cb=Array.isArray,Db=sb||za,Eb=Za?f(Za):O,Fb=Y(function(a,b,c){Q(a,b,c)});b.exports=Fb}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(b,c,d){!function(b,e){"object"==typeof d&&"object"==typeof c?c.exports=e():"function"==typeof a&&a.amd?a("shifty",[],e):"object"==typeof d?d.shifty=e():b.shifty=e()}(self,function(){return function(){"use strict";function a(d){if(c[d])return c[d].exports;var e=c[d]={exports:{}};return b[d](e,e.exports,a),e.exports}var b={720:function(a,b,c){function d(a,b,c,d,e,f){var g,h,i,j,k,l=0,m=0,n=0,o=function(a){return((l*a+m)*a+n)*a},p=function(a){return(3*l*a+2*m)*a+n},q=function(a){return a>=0?a:0-a};return l=1-(n=3*b)-(m=3*(d-b)-n),i=1-(k=3*c)-(j=3*(e-c)-k),g=a,h=function(a){return 1/(200*a)}(f),function(a){return((i*a+j)*a+k)*a}(function(a,b){var c,d,e,f,g,h;for(e=a,h=0;h<8;h++){if(f=o(e)-a,q(f)(d=1))return d;for(;cf?c=e:d=e,e=.5*(d-c)+c}return e}(g,h))}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){for(var c=0;ca.length)&&(b=a.length);for(var c=0,d=new Array(b);c0&&void 0!==arguments[0]?arguments[0]:{},b=new La;return b.tween(a),b.tweenable=b,b}function n(a){return parseInt(a,16)}function o(a){var b=a._currentState;[b,a._originalState,a._targetState].forEach(Ya),a._tokenData=function(a){var b,c,d={};for(var e in a){var f=a[e];"string"==typeof f&&(d[e]={formatString:(b=f,c=void 0,c=b.match(Pa),c?(1===c.length||b.charAt(0).match(Oa))&&c.unshift(""):c=["",""],c.join(Ua)),chunkNames:Va($a(f),e)})}return d}(b)}function p(a){var b=a._currentState,c=a._originalState,d=a._targetState,e=a._easing,f=a._tokenData;!function(a,b){var c=function(c){var d=b[c].chunkNames,e=a[c];if("string"==typeof e){var f=e.split(" "),g=f[f.length-1];d.forEach(function(b,c){return a[b]=f[c]||g})}else d.forEach(function(b){return a[b]=e});delete a[c]};for(var d in b)c(d)}(e,f),[b,c,d].forEach(function(a){return function(a,b){var c=function(c){$a(a[c]).forEach(function(d,e){return a[b[c].chunkNames[e]]=+d}),delete a[c]};for(var d in b)c(d)}(a,f)})}function q(a){var b=a._currentState,c=a._originalState,d=a._targetState,e=a._easing,f=a._tokenData;[b,c,d].forEach(function(a){return function(a,b){for(var c in b){var d=b[c],e=d.chunkNames,f=d.formatString,g=bb(f,ab(_a(a,e),e));a[c]=Xa(Ra,g,Za)}}(a,f)}),function(a,b){for(var c in b){var d=b[c].chunkNames,e=a[d[0]];a[c]="string"==typeof e?d.map(function(b){var c=a[b];return delete a[b],c}).join(" "):e}}(e,f)}function r(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function s(a){for(var b=1;ba.length)&&(b=a.length);for(var c=0,d=new Array(b);c0&&void 0!==arguments[0]?arguments[0]:.25,b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(f){return d(f,a,b,c,e,1)}},ma=function(a,b,c,d,e){var f=la(b,c,d,e);return f.displayName=a,f.x1=b,f.y1=c,f.x2=d,f.y2=e,La.formulas[a]=f},na=function(a){return delete La.formulas[a]},oa="linear",pa="undefined"!=typeof window?window:c.g,qa="afterTween",ra="afterTweenEnd",sa="beforeTween",ta="tweenCreated",ua="function",va="string",wa=pa.requestAnimationFrame||pa.webkitRequestAnimationFrame||pa.oRequestAnimationFrame||pa.msRequestAnimationFrame||pa.mozCancelRequestAnimationFrame&&pa.mozRequestAnimationFrame||setTimeout,xa=function(){},ya=null,za=null,Aa=k({},y),Ba=function(a,b,c,d,e,f,g){var h,i,j,k=ah?h:b;a._hasEnded=i>=h;var j=f-(h-i),k=a._filters.length>0;if(a._hasEnded)return a._render(g,a._data,j),a.stop(!0);k&&a._applyFilter(sa),i1&&void 0!==arguments[1]?arguments[1]:oa,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(b)){return la.apply(void 0,h(b))}var d=g(b);if(Aa[b])return Aa[b];if(d===va||d===ua)for(var e in a)c[e]=b;else for(var f in a)c[f]=b[f]||oa;return c},Ja=function(a){a===ya?(ya=a._next)?ya._previous=null:za=null:a===za?(za=a._previous)?za._next=null:ya=null:(C=a._previous,D=a._next,C._next=D,D._previous=C),a._previous=a._next=null},Ka="function"==typeof Promise?Promise:null;A=Symbol.toStringTag;var La=function(){function a(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;e(this,a),l(this,A,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=b||{},this._originalState={},this._targetState={},this._start=xa,this._render=xa,this._promiseCtor=Ka,c&&this.setConfig(c)}var b,c;return b=a,c=[{key:"_applyFilter",value:function(a){for(var b=this._filters.length;b>0;b--){var c=this._filters[b-b][a];c&&c(this)}}},{key:"tween",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!b&&this._config||this.setConfig(b),this._pausedAtTime=null,this._timestamp=a.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=this._config;for(var d in b)c[d]=b[d];var e=c.promise,f=void 0===e?this._promiseCtor:e,h=c.start,i=void 0===h?xa:h,j=c.finish,k=c.render,l=void 0===k?this._config.step||xa:k,m=c.step,n=void 0===m?xa:m;this._data=c.data||c.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=b.delay||0,this._start=i,this._render=l||n,this._duration=c.duration||500,this._promiseCtor=f,j&&(this._resolve=j);var o=b.from,p=b.to,q=void 0===p?{}:p,r=this._currentState,s=this._originalState,t=this._targetState;for(var u in o)r[u]=o[u];var v=!1;for(var w in r){var x=r[w];v||g(x)!==va||(v=!0),s[w]=x,t[w]=q.hasOwnProperty(w)?q[w]:x}if(this._easing=Ia(this._currentState,c.easing,this._easing),this._filters.length=0,v){for(var y in a.filters)a.filters[y].doesApply(this)&&this._filters.push(a.filters[y]);this._applyFilter(ta)}return this}},{key:"then",value:function(a,b){var c=this;return this._promise=new this._promiseCtor(function(a,b){c._resolve=a,c._reject=b}),this._promise.then(a,b)}},{key:"catch",value:function(a){return this.then().catch(a)}},{key:"finally",value:function(a){return this.then().finally(a)}},{key:"get",value:function(){return k({},this._currentState)}},{key:"set",value:function(a){this._currentState=a}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=a.now(),this._isPlaying=!1,Ja(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=b-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ya?(ya=this,za=this):(this._previous=za,za._next=this,za=this),this)}},{key:"seek",value:function(b){b=Math.max(b,0);var c=a.now();return this._timestamp+b===0||(this._timestamp=c-b,Ca(this,c)),this}},{key:"stop",value:function(){var a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,Ja(this);var b=this._filters.length>0;return a&&(b&&this._applyFilter(sa),Ba(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),b&&(this._applyFilter(qa),this._applyFilter(ra))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var a=arguments.length>0&&void 0!==arguments[0]&&arguments[0],b=this._currentState,c=this._data;return this._isPlaying?(this._reject&&this._reject({data:c,state:b,tweenable:this}),this._resolve=null,this._reject=null,this.stop(a)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(b){a.setScheduleFunction(b)}},{key:"data",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return a&&(this._data=k({},a)),this._data}},{key:"dispose",value:function(){for(var a in this)delete this[a]}}],c&&f(b.prototype,c),a}();l(La,"now",function(){return B}),l(La,"setScheduleFunction",function(a){return wa=a}),l(La,"filters",{}),l(La,"formulas",Aa),Ga(!0);var Ma,Na,Oa=/(\d|-|\.)/,Pa=/([^\-0-9.]+)/g,Qa=/[0-9.-]+/g,Ra=(Ma=Qa.source,Na=/,\s*/.source,new RegExp("rgba?\\(".concat(Ma).concat(Na).concat(Ma).concat(Na).concat(Ma,"(").concat(Na).concat(Ma,")?\\)"),"g")),Sa=/^.*\(/,Ta=/#([0-9]|[a-f]){3,6}/gi,Ua="VAL",Va=function(a,b){return a.map(function(a,c){return"_".concat(b,"_").concat(c)})},Wa=function(a){return"rgb(".concat((b=a,3===(b=b.replace(/#/,"")).length&&(b=(b=b.split(""))[0]+b[0]+b[1]+b[1]+b[2]+b[2]),[n(b.substr(0,2)),n(b.substr(2,2)),n(b.substr(4,2))]).join(","),")");var b},Xa=function(a,b,c){var d=b.match(a),e=b.replace(a,Ua);return d&&d.forEach(function(a){return e=e.replace(Ua,c(a))}),e},Ya=function(a){for(var b in a){var c=a[b];"string"==typeof c&&c.match(Ta)&&(a[b]=Xa(Ta,c,Wa))}},Za=function(a){var b=a.match(Qa),c=b.slice(0,3).map(Math.floor),d=a.match(Sa)[0];if(3===b.length)return"".concat(d).concat(c.join(","),")");if(4===b.length)return"".concat(d).concat(c.join(","),",").concat(b[3],")");throw new Error("Invalid rgbChunk: ".concat(a))},$a=function(a){return a.match(Qa)},_a=function(a,b){var c={};return b.forEach(function(b){c[b]=a[b],delete a[b]}),c},ab=function(a,b){return b.map(function(b){return a[b]})},bb=function(a,b){return b.forEach(function(b){return a=a.replace(Ua,+b.toFixed(4))}),a},cb=function(a){for(var b in a._currentState)if("string"==typeof a._currentState[b])return!0;return!1},db=new La,eb=La.filters,fb=function(a,b,c,d){var e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,f=s({},a),g=Ia(a,d);for(var h in db._filters.length=0,db.set({}),db._currentState=f,db._originalState=a,db._targetState=b,db._easing=g,eb)eb[h].doesApply(db)&&db._filters.push(eb[h]);db._applyFilter("tweenCreated"),db._applyFilter("beforeTween");var i=Ba(c,f,a,b,1,e,g);return db._applyFilter("afterTween"),i},gb=new WeakMap,hb=function(){function a(){v(this,a),gb.set(this,{writable:!0,value:[]});for(var b=arguments.length,c=new Array(b),d=0;da.strokeWidth&&(b=a.trailWidth);var c=50-b/2;return e.render(this._pathTemplate,{radius:c,"2radius":2*c})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":8,"./utils":10}],4:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){this._pathTemplate=b.vertical?"M {center},100 L {center},0":"M 0,{center} L 100,{center}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._initializeSvg=function(a,b){var c=b.vertical?"0 0 "+b.strokeWidth+" 100":"0 0 100 "+b.strokeWidth;a.setAttribute("viewBox",c),a.setAttribute("preserveAspectRatio","none")},f.prototype._pathString=function(a){return e.render(this._pathTemplate,{center:a.strokeWidth/2})},f.prototype._trailString=function(a){return this._pathString(a)},b.exports=f},{"./shape":8,"./utils":10}],5:[function(a,b,c){ -b.exports={Line:a("./line"),Circle:a("./circle"),SemiCircle:a("./semicircle"),Square:a("./square"),Path:a("./path"),Shape:a("./shape"),utils:a("./utils")}},{"./circle":3,"./line":4,"./path":6,"./semicircle":7,"./shape":8,"./square":9,"./utils":10}],6:[function(a,b,c){var d=a("shifty"),e=a("./utils"),f=d.Tweenable,g={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},h=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");c=e.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},c);var d;d=e.isString(b)?document.querySelector(b):b,this.path=d,this._opts=c,this._tweenable=null;var f=this.path.getTotalLength();this.path.style.strokeDasharray=f+" "+f,this.set(0)};h.prototype.value=function(){var a=this._getComputedDashOffset(),b=this.path.getTotalLength(),c=1-a/b;return parseFloat(c.toFixed(6),10)},h.prototype.set=function(a){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(a);var b=this._opts.step;if(e.isFunction(b)){var c=this._easing(this._opts.easing);b(this._calculateTo(a,c),this._opts.shape||this,this._opts.attachment)}},h.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},h.prototype.animate=function(a,b,c){b=b||{},e.isFunction(b)&&(c=b,b={});var d=e.extend({},b),g=e.extend({},this._opts);b=e.extend(g,b);var h=this._easing(b.easing),i=this._resolveFromAndTo(a,h,d);this.stop(),this.path.getBoundingClientRect();var j=this._getComputedDashOffset(),k=this._progressToOffset(a),l=this;this._tweenable=new f,this._tweenable.tween({from:e.extend({offset:j},i.from),to:e.extend({offset:k},i.to),duration:b.duration,delay:b.delay,easing:h,step:function(a){l.path.style.strokeDashoffset=a.offset;var c=b.shape||l;b.step(a,c,b.attachment)}}).then(function(a){e.isFunction(c)&&c()}).catch(function(a){throw console.error("Error in tweening:",a),a})},h.prototype._getComputedDashOffset=function(){var a=window.getComputedStyle(this.path,null);return parseFloat(a.getPropertyValue("stroke-dashoffset"),10)},h.prototype._progressToOffset=function(a){var b=this.path.getTotalLength();return b-a*b},h.prototype._resolveFromAndTo=function(a,b,c){return c.from&&c.to?{from:c.from,to:c.to}:{from:this._calculateFrom(b),to:this._calculateTo(a,b)}},h.prototype._calculateFrom=function(a){return d.interpolate(this._opts.from,this._opts.to,this.value(),a)},h.prototype._calculateTo=function(a,b){return d.interpolate(this._opts.from,this._opts.to,a,b)},h.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(!0),this._tweenable=null)},h.prototype._easing=function(a){return g.hasOwnProperty(a)?g[a]:a},b.exports=h},{"./utils":10,shifty:2}],7:[function(a,b,c){var d=a("./shape"),e=a("./circle"),f=a("./utils"),g=function(a,b){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,d.apply(this,arguments)};g.prototype=new d,g.prototype.constructor=g,g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 50")},g.prototype._initializeTextContainer=function(a,b,c){a.text.style&&(c.style.top="auto",c.style.bottom="0",a.text.alignToBottom?f.setStyle(c,"transform","translate(-50%, 0)"):f.setStyle(c,"transform","translate(-50%, 50%)"))},g.prototype._pathString=e.prototype._pathString,g.prototype._trailString=e.prototype._trailString,b.exports=g},{"./circle":3,"./shape":8,"./utils":10}],8:[function(a,b,c){var d=a("./path"),e=a("./utils"),f="Object is destroyed",g=function a(b,c){if(!(this instanceof a))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=e.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},c,!0),e.isObject(c)&&void 0!==c.svgStyle&&(this._opts.svgStyle=c.svgStyle),e.isObject(c)&&e.isObject(c.text)&&void 0!==c.text.style&&(this._opts.text.style=c.text.style);var f,g=this._createSvgView(this._opts);if(!(f=e.isString(b)?document.querySelector(b):b))throw new Error("Container does not exist: "+b);this._container=f,this._container.appendChild(g.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&e.setStyles(g.svg,this._opts.svgStyle),this.svg=g.svg,this.path=g.path,this.trail=g.trail,this.text=null;var h=e.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new d(g.path,h),e.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};g.prototype.animate=function(a,b,c){if(null===this._progressPath)throw new Error(f);this._progressPath.animate(a,b,c)},g.prototype.stop=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath.stop()},g.prototype.pause=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},g.prototype.resume=function(){if(null===this._progressPath)throw new Error(f);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},g.prototype.destroy=function(){if(null===this._progressPath)throw new Error(f);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},g.prototype.set=function(a){if(null===this._progressPath)throw new Error(f);this._progressPath.set(a)},g.prototype.value=function(){if(null===this._progressPath)throw new Error(f);return void 0===this._progressPath?0:this._progressPath.value()},g.prototype.setText=function(a){if(null===this._progressPath)throw new Error(f);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),e.isObject(a)?(e.removeChildren(this.text),this.text.appendChild(a)):this.text.innerHTML=a},g.prototype._createSvgView=function(a){var b=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(b,a);var c=null;(a.trailColor||a.trailWidth)&&(c=this._createTrail(a),b.appendChild(c));var d=this._createPath(a);return b.appendChild(d),{svg:b,path:d,trail:c}},g.prototype._initializeSvg=function(a,b){a.setAttribute("viewBox","0 0 100 100")},g.prototype._createPath=function(a){var b=this._pathString(a);return this._createPathElement(b,a)},g.prototype._createTrail=function(a){var b=this._trailString(a),c=e.extend({},a);return c.trailColor||(c.trailColor="#eee"),c.trailWidth||(c.trailWidth=c.strokeWidth),c.color=c.trailColor,c.strokeWidth=c.trailWidth,c.fill=null,this._createPathElement(b,c)},g.prototype._createPathElement=function(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",a),c.setAttribute("stroke",b.color),c.setAttribute("stroke-width",b.strokeWidth),b.fill?c.setAttribute("fill",b.fill):c.setAttribute("fill-opacity","0"),c},g.prototype._createTextContainer=function(a,b){var c=document.createElement("div");c.className=a.text.className;var d=a.text.style;return d&&(a.text.autoStyleContainer&&(b.style.position="relative"),e.setStyles(c,d),d.color||(c.style.color=a.color)),this._initializeTextContainer(a,b,c),c},g.prototype._initializeTextContainer=function(a,b,c){},g.prototype._pathString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._trailString=function(a){throw new Error("Override this function for each progress bar")},g.prototype._warnContainerAspectRatio=function(a){if(this.containerAspectRatio){var b=window.getComputedStyle(a,null),c=parseFloat(b.getPropertyValue("width"),10),d=parseFloat(b.getPropertyValue("height"),10);e.floatEquals(this.containerAspectRatio,c/d)||(console.warn("Incorrect aspect ratio of container","#"+a.id,"detected:",b.getPropertyValue("width")+"(width)","/",b.getPropertyValue("height")+"(height)","=",c/d),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},b.exports=g},{"./path":6,"./utils":10}],9:[function(a,b,c){var d=a("./shape"),e=a("./utils"),f=function(a,b){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}",d.apply(this,arguments)};f.prototype=new d,f.prototype.constructor=f,f.prototype._pathString=function(a){var b=100-a.strokeWidth/2;return e.render(this._pathTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2})},f.prototype._trailString=function(a){var b=100-a.strokeWidth/2;return e.render(this._trailTemplate,{width:b,strokeWidth:a.strokeWidth,halfOfStrokeWidth:a.strokeWidth/2,startMargin:a.strokeWidth/2-a.trailWidth/2})},b.exports=f},{"./shape":8,"./utils":10}],10:[function(a,b,c){function d(a,b){var c=a;for(var d in b)if(b.hasOwnProperty(d)){var e=b[d],f="\\{"+d+"\\}",g=new RegExp(f,"g");c=c.replace(g,e)}return c}function e(a,b,c){for(var d=a.style,e=0;e{try{var t=i&&i.require&&i.require("util").types;return t?t:o&&o.binding&&o.binding("util")}catch(t){}})(),t=t&&t.isTypedArray;var H,G,J=Array.prototype,s=Function.prototype,a=Object.prototype,l=r["__core-js_shared__"],b=s.toString,m=a.hasOwnProperty,X=(s=/[^.]+$/.exec(l&&l.keys&&l.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"",Y=a.toString,Z=b.call(Object),tt=RegExp("^"+b.call(m).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),l=n?r.Buffer:void 0,s=r.Symbol,et=r.Uint8Array,rt=l?l.allocUnsafe:void 0,nt=(H=Object.getPrototypeOf,function(t){return H(G(t))}),it=(G=Object).create,ot=a.propertyIsEnumerable,st=J.splice,u=s?s.toStringTag:void 0,h=(()=>{try{var t=v(Object,"defineProperty");return t({},"",{}),t}catch(t){}})(),n=l?l.isBuffer:void 0,at=Math.max,lt=Date.now,ut=v(r,"Map"),c=v(Object,"create"),ht=function(t){if(!F(t))return{};if(it)return it(t);p.prototype=t;t=new p;return p.prototype=void 0,t};function p(){}function f(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{for(var r=-1,n=Array(t);++r{if(null!=t){try{return b.call(t)}catch(t){}try{return t+""}catch(t){}}return""})(t))}function gt(t){if(!F(t)){var e=t,r=[];if(null!=e)for(var n in Object(e))r.push(n);return r}var i,o=bt(t),s=[];for(i in t)("constructor"!=i||!o&&m.call(t,i))&&s.push(i);return s}function yt(_,g,y,v,w){_!==g&&ft(g,function(t,e){var r,n,i,o,s,a,l,u,h,c,p,f,d;w=w||new S,F(t)?(n=g,o=y,s=yt,a=v,l=w,p=P(r=_,i=e),f=P(n,i),(d=l.get(f))?O(r,i,d):(d=a?a(p,f,i+"",r,n,l):void 0,(n=void 0===d)&&(u=M(f),h=!u&&Ot(f),c=!u&&!h&&Pt(f),d=f,u||h||c?d=M(p)?p:(t=>z(t)&&A(t))(p)?((t,e)=>{var r=-1,n=t.length;for(e=e||Array(n);++re?t.slice():(e=t.length,e=rt?rt(e):new t.constructor(e),t.copy(e),e))(f,!(n=!1)):c?((t,e)=>(e=e?(t=>{var e=new t.constructor(t.byteLength);return new et(e).set(new et(t)),e})(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)))(f,!(n=!1)):[]:(t=>z(t)&&x(t)==U&&(null===(t=nt(t))||"function"==typeof(t=m.call(t,"constructor")&&t.constructor)&&t instanceof t&&b.call(t)==Z))(f)||C(f)?C(d=p)?d=(t=>{for(var e=t,r=Tt(t),n=void 0,i=void 0,o=!n,s=(n=n||{},-1),a=r.length;++s{var n=t[e];m.call(t,e)&&E(n,r)&&(void 0!==r||e in t)||j(t,e,r)})(n,l,u)}return n})(p):F(p)&&!k(p)||(d=(t=>"function"!=typeof t.constructor||bt(t)?{}:ht(nt(t)))(f)):n=!1),n&&(l.set(f,d),s(d,f,o,a,l),l.delete(f)),O(r,i,d))):(u=v?v(P(_,e),t,e+"",_,g,w):void 0,O(_,e,u=void 0===u?t:u))},Tt)}function vt(t,e){return St((l=t,h=Et,u=at(void 0===(u=e)?l.length-1:u,0),function(){for(var t=arguments,e=-1,r=at(t.length-u,0),n=Array(r);++e{if(F(r)){var n=typeof e;if("number"==n?A(r)&&wt(e,r.length):"string"==n&&e in r)return E(r[e],t)}})(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++rn=>{{let l,u,h,t,e,r,c=t=>((l*t+u)*t+h)*t,p=t=>0<=t?t:0-t;return h=3*i,u=3*(s-i)-h,l=1-h-u,r=3*o,e=3*(a-o)-r,t=1-r-e,n=(t=>{let e,r,n,i,o,s;for(n=t,s=0;s<8;s++){if(i=c(n)-t,p(i)<.005)return n;if(a=n,o=(3*l*a+2*u)*a+h,p(o)<1e-6)break;n-=i/o}var a;if(e=0,r=1,(n=t)r)return r;for(;ei?e=n:r=n,n=.5*(r-e)+e}return n})(n),((t*n+e)*n+r)*n}},s.setBezierFunction=(t,e,r,n,i)=>{var o=(0,s.getCubicBezierTransition)(e,r,n,i);return o.displayName=t,o.x1=e,o.y1=r,o.x2=n,o.y2=i,a.Tweenable.easing[t]=o}},156:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.standardEasingFunctions=e.setBezierFunction=e.Scene=e.interpolate=e.tween=e.Tweenable=e.shouldScheduleUpdate=e.processTweens=void 0;let o=r(55);Object.defineProperty(e,"processTweens",{enumerable:!0,get:function(){return o.processTweens}}),Object.defineProperty(e,"shouldScheduleUpdate",{enumerable:!0,get:function(){return o.shouldScheduleUpdate}}),Object.defineProperty(e,"Tweenable",{enumerable:!0,get:function(){return o.Tweenable}}),Object.defineProperty(e,"tween",{enumerable:!0,get:function(){return o.tween}});var s=r(243),a=(Object.defineProperty(e,"interpolate",{enumerable:!0,get:function(){return s.interpolate}}),r(612)),l=(Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return a.Scene}}),r(933)),u=(Object.defineProperty(e,"setBezierFunction",{enumerable:!0,get:function(){return l.setBezierFunction}}),r(809));Object.defineProperty(e,"standardEasingFunctions",{enumerable:!0,get:function(){return u.standardEasingFunctions}}),i(r(613),e),e.VERSION=String("3.0.4")},243:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.interpolate=void 0;let s=r(55),a=new s.Tweenable,l=s.Tweenable.filters;e.interpolate=(t,e,r,n=s.Tweenable.easing.linear,i=0)=>{var o=Object.assign({},t),n=(0,s.composeEasingObject)(t,n);a._filters.length=0,a.setState({}),a._currentState=o,a._originalState=t,a._targetState=e,a._easing=n;for(let t in l)l[t].doesApply(a)&&a._filters.push(l[t]);a._applyFilter("tweenCreated"),a._applyFilter("beforeTween");r=(0,s.tweenProps)(r,o,t,e,1,i,n);return a._applyFilter("afterTween"),r}},612:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=void 0,e.Scene=class{constructor(...t){this._tweenables=[],t.forEach(this.add.bind(this))}get tweenables(){return[...this._tweenables]}get promises(){return this._tweenables.map(t=>t.then())}add(t){return this._tweenables.push(t),t}remove(t){var e=this._tweenables.indexOf(t);return-1t)}tween(){return this._tweenables.forEach(t=>t.tween()),this}pause(){return this._tweenables.forEach(t=>t.pause()),this}resume(){return this._tweenables.filter(({hasEnded:t})=>!t).forEach(t=>t.resume()),this}stop(e){return this._tweenables.forEach(t=>t.stop(e)),this}}},809:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardEasingFunctions=void 0,e.standardEasingFunctions=Object.freeze({linear:t=>t,easeInQuad:t=>Math.pow(t,2),easeOutQuad:t=>-(Math.pow(t-1,2)-1),easeInOutQuad:t=>(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2),easeInCubic:t=>Math.pow(t,3),easeOutCubic:t=>Math.pow(t-1,3)+1,easeInOutCubic:t=>(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2),easeInQuart:t=>Math.pow(t,4),easeOutQuart:t=>-(Math.pow(t-1,4)-1),easeInOutQuart:t=>(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2),easeInQuint:t=>Math.pow(t,5),easeOutQuint:t=>Math.pow(t-1,5)+1,easeInOutQuint:t=>(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2),easeInSine:t=>1-Math.cos(t*(Math.PI/2)),easeOutSine:t=>Math.sin(t*(Math.PI/2)),easeInOutSine:t=>-.5*(Math.cos(Math.PI*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t)),easeInCirc:t=>-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeOutBounce:t=>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:t=>t*t*(2.70158*t-1.70158),easeOutBack:t=>--t*t*(2.70158*t+1.70158)+1,easeInOutBack:t=>{let 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:t=>-1*Math.pow(4,-8*t)*Math.sin(2*Math.PI*(6*t-1)/2)+1,swingFromTo:t=>{let 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:t=>t*t*(2.70158*t-1.70158),swingTo:t=>--t*t*(2.70158*t+1.70158)+1,bounce:t=>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:t=>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:t=>(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2),easeFrom:t=>Math.pow(t,4),easeTo:t=>Math.pow(t,.25)})},525:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.afterTween=e.beforeTween=e.tweenCreated=e.doesApply=void 0;let c=r(613),i=/(\d|-|\.)/,o=/([^\-0-9.]+)/g,s=/[0-9.-]+/g,p=(r=s.source,l=/,\s*/.source,new RegExp(`rgba?\\(${r}${l}${r}${l}${r}(${l}${r})?\\)`,"g")),a=/^.*\(/,n=/#([0-9]|[a-f]){3,6}/gi,f="VAL";var l;function u(t){return parseInt(t,16)}let h=t=>{return`rgb(${t=t,3===(t=t.replace(/#/,"")).length&&([e,r,n]=t.split(""),t=e+e+r+r+n+n),[u(t.substring(0,2)),u(t.substring(2,4)),u(t.substring(4,6))].join(",")})`;var e,r,n},d=(t,e,r)=>{var n=e.match(t);let i=e.replace(t,f);return n&&n.forEach(t=>i=i.replace(f,r(t))),i},_=t=>{for(var e in t){var r=t[e];"string"==typeof r&&r.match(n)&&(t[e]=d(n,r,h))}},g=t=>{var e=null!=(e=t.match(s))?e:[],r=e.slice(0,3).map(t=>Math.floor(Number(t))),n=null==(n=t.match(a))?void 0:n[0];if(3===e.length)return""+n+r.join(",")+")";if(4===e.length)return""+n+r.join(",")+`,${e[3]})`;throw new Error("Invalid rgbChunk: "+t)},y=t=>null!=(t=t.match(s))?t:[];e.doesApply=t=>{for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1},e.tweenCreated=function(t){var{_currentState:e,_originalState:r,_targetState:n}=t;[e,r,n].forEach(_),t._tokenData=(t=>{var e,r={};for(e in t){var n=t[e];"string"==typeof n&&(r[e]={formatString:(t=>{let e=t.match(o);return e?1!==e.length&&!t.charAt(0).match(i)||e.unshift(""):e=["",""],e.join(f)})(n),chunkNames:((t,r)=>t.map((t,e)=>`_${r}_`+e))(null==(n=y(n))?void 0:n.map(Number),e)})}return r})(e)},e.beforeTween=function(t){let{_currentState:e,_originalState:r,_targetState:n,_easing:i,_tokenData:o}=t;if("function"!=typeof i&&o){var s=i,a=o,l;for(l in a){let n=a[l].chunkNames,i=s[l];if("string"==typeof i){let e=i.split(" "),r=e[e.length-1];for(let t=0;ts[t]=i);delete s[l]}}[e,r,n].forEach(t=>{var n=t,i=null!=o?o:{};for(let r in i)y(String(n[r])).forEach((t,e)=>n[i[r].chunkNames[e]]=+t),delete n[r]})},e.afterTween=function(t){let{_currentState:e,_originalState:r,_targetState:n,_easing:i,_tokenData:s}=t;if([e,r,n].forEach(t=>{var e,r=t,n=null!=s?s:{};for(e in n){var{chunkNames:i,formatString:o}=n[e],o=((e,t)=>(t.forEach(t=>e=e.replace(f,String(+t.toFixed(4)))),e))(o,((e,t)=>t.map(t=>Number(e[t])))(((e,t)=>{let r={};return t.forEach(t=>{r[t]=e[t],delete e[t]}),r})(r,i),i));r[e]=d(p,o,g)}}),"function"!=typeof i&&s){var o,a=i,l=s;for(o in l){var u=l[o].chunkNames,h=a[u[0]];a[o]="string"==typeof h?u.map(t=>{var e=a[t];return delete a[t],e}).join(" "):h}}}},55:function(t,d,e){var r,n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){t[n=void 0===n?r:n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(d,"__esModule",{value:!0}),d.shouldScheduleUpdate=d.tween=d.Tweenable=d.composeEasingObject=d.scheduleUpdate=d.processTweens=d.tweenProps=d.getListTail=d.getListHead=d.resetList=void 0;let c=e(809),s=e(933),a=e(613),l=o(e(525)),u="undefined"!=typeof window?window:e.g,h="afterTween",p="beforeTween",_="string",f="function",g=u.requestAnimationFrame,y=(g=g||"undefined"!=typeof window&&(window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame)||setTimeout,()=>{}),v=null,w=null,b=(d.resetList=()=>{v=w=null},d.getListHead=()=>v,d.getListTail=()=>w,d.tweenProps=(t,r,n,i,e,o,s)=>{var a,l,u=t{let t,i=null!=(t=r._timestamp)?t:0;var o=r._currentState,s=r._delay;if(!(n=l;n=t-(l-e);if(r._hasEnded)return r._render(a,n,r._data),r.stop(!0);r._applyFilter(p),e{var t,e=P.now();let r=v;for(;r;)t=r._next,b(r,e),r=t},Date).now,S,O=!1,j=(d.scheduleUpdate=()=>{S=m(),O&&g.call(u,d.scheduleUpdate,1e3/60),(0,d.processTweens)()},d.composeEasingObject=(t,e="linear",r={})=>{if(typeof e==_&&(0,a.isEasingKey)(e))return P.easing[e];if(Array.isArray(e))return(0,s.getCubicBezierTransition)(...e);if("object"==typeof r)if(typeof e==_||typeof e==f)for(var n in t)r[n]=e;else for(var i in t)r[i]=e[i]||"linear";return r},(()=>{let e,r;return t=>{e=null,r=null,t===v?(v=t._next)?v._previous=null:w=null:t===w?(w=t._previous)?w._next=null:v=null:(e=t._previous,r=t._next,e&&(e._next=r),r&&(r._previous=e)),t._previous=t._next=null}})()),x=typeof Promise==f?Promise:null;class P{constructor(t={},e){this[r]="Promise",this._next=null,this._previous=null,this._config={},this._data={},this._delay=0,this._duration=500,this._filters=[],this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._originalState={},this._targetState={},this._start=y,this._render=y,this._promiseCtor=x,this._promise=null,this._isPlaying=!1,this._pausedAtTime=null,this._easing={},this._currentState=t||{},e&&this.setConfig(e)}_applyFilter(e){var r;for(let t=this._filters.length;0{this._resolve=t,this._reject=e}),this._promise.then(t,e);throw new Error("Promise implementation is unavailable")}catch(t){return this.then().catch(t)}finally(t){return this.then().finally(t)}get state(){return Object.assign({},this._currentState)}setState(t){this._currentState=t}pause(){return this._isPlaying&&(this._pausedAtTime=P.now(),this._isPlaying=!1,j(this)),this}resume(){return this._resume()}_resume(t=P.now()){return null===this._timestamp?this.tween():(this._isPlaying&&this._promise||(this._pausedAtTime&&(this._timestamp+=t-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,t=Boolean(v),w=(null===v?v=this:(this._previous=w)&&(w._next=this),this),t)||(0,d.shouldScheduleUpdate)(!0),this)}seek(t){t=Math.max(t,0);var e,r=P.now();return(null!=(e=this._timestamp)?e:0)+t!==0&&(this._timestamp=r-t,b(this,r)),this}stop(t=!1){return this._isPlaying&&(this._isPlaying=!1,j(this),t&&(this._applyFilter(p),(0,d.tweenProps)(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),this._applyFilter(h),this._applyFilter("afterTweenEnd")),null!=(t=this._resolve)&&t.call(this,{data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null),this}cancel(t=!1){var{_currentState:e,_data:r,_isPlaying:n}=this;return n?(null!=(n=this._reject)&&n.call(this,{data:r,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}get isPlaying(){return this._isPlaying}get hasEnded(){return this._hasEnded}data(t=null){return t&&(this._data=Object.assign({},t)),this._data}dispose(){for(var t in this)delete this[t]}}d.Tweenable=P,r=Symbol.toStringTag,P.now=()=>S=O?S:m(),P.setScheduleFunction=t=>g=t,P.filters={token:l},P.easing=Object.create(c.standardEasingFunctions),d.tween=function(t={}){return new P({},{}).tween(t)},d.shouldScheduleUpdate=t=>{t&&O||(O=t)&&(0,d.scheduleUpdate)()}},613:function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.isEasingKey=void 0;let n=r(55);e.isEasingKey=t=>t in n.Tweenable.easing}},i={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(156);function r(t){var e=i[t];return void 0!==e||(e=i[t]={exports:{}},n[t].call(e.exports,e,e.exports,r)),e.exports}var n,i},"object"==typeof r&&"object"==typeof e?e.exports=i():"object"==typeof r?r.shifty=i():n.shifty=i()},{}],3:[function(t,e,r){function n(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)}var i=t("./shape"),o=t("./utils");((n.prototype=new i).constructor=n).prototype._pathString=function(t){var e=t.strokeWidth,t=50-(e=t.trailWidth&&t.trailWidth>t.strokeWidth?t.trailWidth:e)/2;return o.render(this._pathTemplate,{radius:t,"2radius":2*t})},n.prototype._trailString=function(t){return this._pathString(t)},e.exports=n},{"./shape":8,"./utils":10}],4:[function(t,e,r){function n(t,e){this._pathTemplate=e.vertical?"M {center},100 L {center},0":"M 0,{center} L 100,{center}",i.apply(this,arguments)}var i=t("./shape"),o=t("./utils");((n.prototype=new i).constructor=n).prototype._initializeSvg=function(t,e){e=e.vertical?"0 0 "+e.strokeWidth+" 100":"0 0 100 "+e.strokeWidth;t.setAttribute("viewBox",e),t.setAttribute("preserveAspectRatio","none")},n.prototype._pathString=function(t){return o.render(this._pathTemplate,{center:t.strokeWidth/2})},n.prototype._trailString=function(t){return this._pathString(t)},e.exports=n},{"./shape":8,"./utils":10}],5:[function(t,e,r){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Square:t("./square"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":3,"./line":4,"./path":6,"./semicircle":7,"./shape":8,"./square":9,"./utils":10}],6:[function(t,e,r){function n(t,e){if(!(this instanceof n))throw new Error("Constructor was called without new keyword");e=a.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},e),t=a.isString(t)?document.querySelector(t):t,this.path=t,this._opts=e,this._tweenable=null,t=this.path.getTotalLength(),this.path.style.strokeDasharray=t+" "+t,this.set(0)}var i=t("shifty"),a=t("./utils"),l=i.Tweenable,o=i.interpolate,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"};n.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},n.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e,r=this._opts.step;a.isFunction(r)&&(e=this._easing(this._opts.easing),r(this._calculateTo(t,e),this._opts.shape||this,this._opts.attachment))},n.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},n.prototype.animate=function(t,r,e){r=r||{},a.isFunction(r)&&(e=r,r={});var n=a.extend({},r),i=a.extend({},this._opts),i=(r=a.extend(i,r),this._easing(r.easing)),n=this._resolveFromAndTo(t,i,n),o=(this.stop(),this.path.getBoundingClientRect(),this._getComputedDashOffset()),t=this._progressToOffset(t),s=this;this._tweenable=new l,this._tweenable.tween({from:a.extend({offset:o},n.from),to:a.extend({offset:t},n.to),duration:r.duration,delay:r.delay,easing:i,step:function(t){s.path.style.strokeDashoffset=t.offset;var e=r.shape||s;r.step(t,e,r.attachment)}}).then(function(){a.isFunction(e)&&e()}).catch(function(t){throw console.error("Error in tweening:",t),t})},n.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},n.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},n.prototype._resolveFromAndTo=function(t,e,r){return r.from&&r.to?{from:r.from,to:r.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},n.prototype._calculateFrom=function(t){return o(this._opts.from,this._opts.to,this.value(),t)},n.prototype._calculateTo=function(t,e){return o(this._opts.from,this._opts.to,t,e)},n.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(!0),this._tweenable=null)},n.prototype._easing=function(t){return s[t]||t},e.exports=n},{"./utils":10,shifty:2}],7:[function(t,e,r){function n(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)}var i=t("./shape"),o=t("./circle"),s=t("./utils");((n.prototype=new i).constructor=n).prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},n.prototype._initializeTextContainer=function(t,e,r){t.text.style&&(r.style.top="auto",r.style.bottom="0",t.text.alignToBottom?s.setStyle(r,"transform","translate(-50%, 0)"):s.setStyle(r,"transform","translate(-50%, 50%)"))},n.prototype._pathString=o.prototype._pathString,n.prototype._trailString=o.prototype._trailString,e.exports=n},{"./circle":3,"./shape":8,"./utils":10}],8:[function(t,e,r){function n(t,e){if(!(this instanceof n))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=o.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},e,!0),o.isObject(e)&&void 0!==e.svgStyle&&(this._opts.svgStyle=e.svgStyle),o.isObject(e)&&o.isObject(e.text)&&void 0!==e.text.style&&(this._opts.text.style=e.text.style);var e=this._createSvgView(this._opts),r=o.isString(t)?document.querySelector(t):t;if(!r)throw new Error("Container does not exist: "+t);this._container=r,this._container.appendChild(e.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&o.setStyles(e.svg,this._opts.svgStyle),this.svg=e.svg,this.path=e.path,this.trail=e.trail,this.text=null;t=o.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new i(e.path,t),o.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}}var i=t("./path"),o=t("./utils"),s="Object is destroyed";n.prototype.animate=function(t,e,r){if(null===this._progressPath)throw new Error(s);this._progressPath.animate(t,e,r)},n.prototype.stop=function(){if(null===this._progressPath)throw new Error(s);void 0!==this._progressPath&&this._progressPath.stop()},n.prototype.pause=function(){if(null===this._progressPath)throw new Error(s);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},n.prototype.resume=function(){if(null===this._progressPath)throw new Error(s);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},n.prototype.destroy=function(){if(null===this._progressPath)throw new Error(s);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)},n.prototype.set=function(t){if(null===this._progressPath)throw new Error(s);this._progressPath.set(t)},n.prototype.value=function(){if(null===this._progressPath)throw new Error(s);return void 0===this._progressPath?0:this._progressPath.value()},n.prototype.setText=function(t){if(null===this._progressPath)throw new Error(s);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),o.isObject(t)?(o.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},n.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=(this._initializeSvg(e,t),null),t=((t.trailColor||t.trailWidth)&&(r=this._createTrail(t),e.appendChild(r)),this._createPath(t));return e.appendChild(t),{svg:e,path:t,trail:r}},n.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},n.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},n.prototype._createTrail=function(t){var e=this._trailString(t),t=o.extend({},t);return t.trailColor||(t.trailColor="#eee"),t.trailWidth||(t.trailWidth=t.strokeWidth),t.color=t.trailColor,t.strokeWidth=t.trailWidth,t.fill=null,this._createPathElement(e,t)},n.prototype._createPathElement=function(t,e){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),r.setAttribute("stroke",e.color),r.setAttribute("stroke-width",e.strokeWidth),e.fill?r.setAttribute("fill",e.fill):r.setAttribute("fill-opacity","0"),r},n.prototype._createTextContainer=function(t,e){var r=document.createElement("div"),n=(r.className=t.text.className,t.text.style);return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),o.setStyles(r,n),n.color||(r.style.color=t.color)),this._initializeTextContainer(t,e,r),r},n.prototype._initializeTextContainer=function(t,e,r){},n.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},n.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},n.prototype._warnContainerAspectRatio=function(t){var e,r,n;this.containerAspectRatio&&(e=window.getComputedStyle(t,null),r=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10),o.floatEquals(this.containerAspectRatio,r/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",r/n),console.warn("Aspect ratio of should be",this.containerAspectRatio)))},e.exports=n},{"./path":6,"./utils":10}],9:[function(t,e,r){function n(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)}var i=t("./shape"),o=t("./utils");((n.prototype=new i).constructor=n).prototype._pathString=function(t){var e=100-t.strokeWidth/2;return o.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},n.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return o.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},e.exports=n},{"./shape":8,"./utils":10}],10:[function(t,e,r){var t=t("lodash.merge"),o="Webkit Moz O ms".split(" ");function n(t,e,r){for(var n=t.style,i=0;i=0.10.0" + "node": ">=12" + } + }, + "node_modules/grunt-contrib-uglify/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" }, - "peerDependencies": { - "grunt": "~0.4.0" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/grunt-contrib-uglify/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/grunt-contrib-uglify/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/grunt-contrib-uglify/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/grunt-contrib-uglify/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/grunt-karma": { @@ -5952,19 +6022,17 @@ "dev": true }, "node_modules/gzip-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", - "integrity": "sha512-mu66twX6zg8WB6IPfUtrquS7fjwGnDJ7kdVcggd5rpjwBItQKjHtvhu6VcQMkqPYAR7DjWpEaN3xiBSNmxvzPg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", "dev": true, + "license": "MIT", "dependencies": { - "browserify-zlib": "^0.1.4", - "concat-stream": "^1.4.1" - }, - "bin": { - "gzip-size": "cli.js" + "duplexer": "^0.1.1", + "pify": "^4.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, "node_modules/handlebars": { @@ -5997,19 +6065,6 @@ "node": ">=0.10.0" } }, - "node_modules/handlebars/node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -10063,85 +10118,104 @@ } }, "node_modules/maxmin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", - "integrity": "sha512-jypoV6wTPuz/ngkc2sDZnFvpvx14QICNKS/jK9RbkmiQQJZ4JWstIszA8iT/z9tPSF/vXQ5qtG0h65N9tiLIKA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz", + "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==", "dev": true, + "license": "MIT", "dependencies": { - "chalk": "^1.0.0", - "figures": "^1.0.1", - "gzip-size": "^1.0.0", - "pretty-bytes": "^1.0.0" + "chalk": "^4.1.0", + "figures": "^3.2.0", + "gzip-size": "^5.1.1", + "pretty-bytes": "^5.3.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/maxmin/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/maxmin/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/maxmin/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/maxmin/node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "node_modules/maxmin/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-regex": "^2.0.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=0.10.0" + "node": ">=7.0.0" } }, - "node_modules/maxmin/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "node_modules/maxmin/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, + "license": "MIT" + }, + "node_modules/maxmin/node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", "dependencies": { - "ansi-regex": "^2.0.0" + "escape-string-regexp": "^1.0.5" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/maxmin/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, "node_modules/md5.js": { @@ -12309,235 +12383,16 @@ } }, "node_modules/pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha512-LNisJvAjy+hruxp3GV4IkZZscTI34+ISfeM1hesB9V6ezIDfXYrBi9TIXVjjMcEB4QFN7tL+dFDEk4s8jMBMyA==", - "dev": true, - "dependencies": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - }, - "bin": { - "pretty-bytes": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", - "dev": true, - "dependencies": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", - "dev": true, - "dependencies": { - "repeating": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==", - "dev": true, - "dependencies": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true, - "dependencies": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "dependencies": { - "is-finite": "^1.0.0" - }, + "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", - "dev": true, - "dependencies": { - "get-stdin": "^4.0.1" - }, - "bin": { - "strip-indent": "cli.js" + "node": ">=6" }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pretty-bytes/node_modules/trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/printf": { @@ -13848,9 +13703,10 @@ "dev": true }, "node_modules/shifty": { - "version": "2.20.4", - "resolved": "https://registry.npmjs.org/shifty/-/shifty-2.20.4.tgz", - "integrity": "sha512-4Y0qRkg8ME5XN8yGNAwmFOmsIURGFKT9UQfNL6DDJQErYtN5HsjyoBuJn41ZQfTkuu2rIbRMn9qazjKsDpO2TA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/shifty/-/shifty-3.0.4.tgz", + "integrity": "sha512-vZf0i3Pn29p1H0TE4Ffk+mHL1RX3aHCTbm3LUHNemR2OdmCSI1qcnbNYxd92Bo1gJX9X6ZyCIi9Qkapad9XE5w==", + "license": "MIT", "optionalDependencies": { "fsevents": "^2.3.2" } @@ -15752,60 +15608,17 @@ } }, "node_modules/uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", "dev": true, - "dependencies": { - "source-map": "~0.5.1", - "yargs": "~3.10.0" - }, + "license": "BSD-2-Clause", "bin": { "uglifyjs": "bin/uglifyjs" }, - "engines": { - "node": ">=0.8.0" - }, - "optionalDependencies": { - "uglify-to-browserify": "~1.0.0" - } - }, - "node_modules/uglify-js/node_modules/camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/uglify-js/node_modules/window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/uglify-js/node_modules/yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", - "dev": true, - "dependencies": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - }, - "node_modules/uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", - "dev": true, - "optional": true + "engines": { + "node": ">=0.8.0" + } }, "node_modules/ultron": { "version": "1.1.1", @@ -16073,10 +15886,11 @@ } }, "node_modules/uri-path": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-0.0.2.tgz", - "integrity": "sha512-Jy+ZEVTqPoMgGQL2qW2uXpLKnZgwK+ypTI+u2f05qqWSHqyQBn+vvWE8DnODiw9GAcpf5QX2x3vZAuatzuyIjg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", + "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", "dev": true, + "license": "WTFPL OR MIT", "engines": { "node": ">= 0.10" } @@ -20215,6 +20029,12 @@ "dev": true, "optional": true }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, "duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -21953,16 +21773,60 @@ } }, "grunt-contrib-uglify": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-0.6.0.tgz", - "integrity": "sha512-2n/eG2doj3TCM9yH728yuxyxtbOANDPgre/s9uscrHQxpkPAPuhSvBoFphO0Bcwfcy85ii/U0+G0F9PS6w0bhw==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz", + "integrity": "sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q==", "dev": true, "requires": { - "chalk": "^0.5.1", - "lodash": "^2.4.1", - "maxmin": "^1.0.0", - "uglify-js": "^2.4.0", - "uri-path": "0.0.2" + "chalk": "^4.1.2", + "maxmin": "^3.0.0", + "uglify-js": "^3.16.1", + "uri-path": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "grunt-karma": { @@ -22108,13 +21972,13 @@ } }, "gzip-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", - "integrity": "sha512-mu66twX6zg8WB6IPfUtrquS7fjwGnDJ7kdVcggd5rpjwBItQKjHtvhu6VcQMkqPYAR7DjWpEaN3xiBSNmxvzPg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", "dev": true, "requires": { - "browserify-zlib": "^0.1.4", - "concat-stream": "^1.4.1" + "duplexer": "^0.1.1", + "pify": "^4.0.1" } }, "handlebars": { @@ -22135,13 +21999,6 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, - "optional": true } } }, @@ -25407,65 +25264,68 @@ } }, "maxmin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", - "integrity": "sha512-jypoV6wTPuz/ngkc2sDZnFvpvx14QICNKS/jK9RbkmiQQJZ4JWstIszA8iT/z9tPSF/vXQ5qtG0h65N9tiLIKA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz", + "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==", "dev": true, "requires": { - "chalk": "^1.0.0", - "figures": "^1.0.1", - "gzip-size": "^1.0.0", - "pretty-bytes": "^1.0.0" + "chalk": "^4.1.0", + "figures": "^3.2.0", + "gzip-size": "^5.1.1", + "pretty-bytes": "^5.3.0" }, "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } }, "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "color-name": "~1.1.4" } }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "escape-string-regexp": "^1.0.5" } }, "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } } } }, @@ -27181,178 +27041,10 @@ "dev": true }, "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha512-LNisJvAjy+hruxp3GV4IkZZscTI34+ISfeM1hesB9V6ezIDfXYrBi9TIXVjjMcEB4QFN7tL+dFDEk4s8jMBMyA==", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", - "dev": true - } - } + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true }, "printf": { "version": "0.2.5", @@ -28437,9 +28129,9 @@ "dev": true }, "shifty": { - "version": "2.20.4", - "resolved": "https://registry.npmjs.org/shifty/-/shifty-2.20.4.tgz", - "integrity": "sha512-4Y0qRkg8ME5XN8yGNAwmFOmsIURGFKT9UQfNL6DDJQErYtN5HsjyoBuJn41ZQfTkuu2rIbRMn9qazjKsDpO2TA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/shifty/-/shifty-3.0.4.tgz", + "integrity": "sha512-vZf0i3Pn29p1H0TE4Ffk+mHL1RX3aHCTbm3LUHNemR2OdmCSI1qcnbNYxd92Bo1gJX9X6ZyCIi9Qkapad9XE5w==", "requires": { "fsevents": "^2.3.2" }, @@ -30031,48 +29723,10 @@ "dev": true }, "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", - "dev": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", - "dev": true - }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", - "dev": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", - "dev": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } - }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", - "dev": true, - "optional": true + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true }, "ultron": { "version": "1.1.1", @@ -30287,9 +29941,9 @@ } }, "uri-path": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-0.0.2.tgz", - "integrity": "sha512-Jy+ZEVTqPoMgGQL2qW2uXpLKnZgwK+ypTI+u2f05qqWSHqyQBn+vvWE8DnODiw9GAcpf5QX2x3vZAuatzuyIjg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", + "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", "dev": true }, "urix": { diff --git a/package.json b/package.json index ed3a060..7f67f95 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/progressbar.js", "dependencies": { "lodash.merge": "^4.6.2", - "shifty": "^2.8.3" + "shifty": "^3.0.4" }, "devDependencies": { "bluebird": "^2.3.6", @@ -16,7 +16,7 @@ "grunt": "^0.4.5", "grunt-cli": "^0.1.13", "grunt-contrib-jshint": "^0.10.0", - "grunt-contrib-uglify": "^0.6.0", + "grunt-contrib-uglify": "^5.2.2", "grunt-karma": "^2.0.0", "grunt-shell": "^1.1.1", "jscs": "^2.0.0", @@ -71,4 +71,4 @@ "semi-circle", "indicator" ] -} \ No newline at end of file +} diff --git a/src/path.js b/src/path.js index fbd95eb..d019e95 100644 --- a/src/path.js +++ b/src/path.js @@ -4,6 +4,7 @@ var shifty = require('shifty'); var utils = require('./utils'); var Tweenable = shifty.Tweenable; +var interpolate = shifty.interpolate; var EASING_ALIASES = { easeIn: 'easeInCubic', @@ -12,12 +13,10 @@ var EASING_ALIASES = { }; var Path = function Path(path, opts) { - // Throw a better error if not initialized with `new` keyword if (!(this instanceof Path)) { throw new Error('Constructor was called without new keyword'); } - // Default parameters for animation opts = utils.extend({ delay: 0, duration: 800, @@ -34,12 +33,10 @@ var Path = function Path(path, opts) { element = path; } - // Reveal .path as public attribute this.path = element; this._opts = opts; this._tweenable = null; - // Set up the starting positions var length = this.path.getTotalLength(); this.path.style.strokeDasharray = length + ' ' + length; this.set(0); @@ -48,18 +45,12 @@ var Path = function Path(path, opts) { Path.prototype.value = function value() { var offset = this._getComputedDashOffset(); var length = this.path.getTotalLength(); - - var progress = 1 - offset / length; - // Round number to prevent returning very small number like 1e-30, which - // is practically 0 - return parseFloat(progress.toFixed(6), 10); + return parseFloat((1 - offset / length).toFixed(6), 10); }; Path.prototype.set = function set(progress) { this.stop(); - this.path.style.strokeDashoffset = this._progressToOffset(progress); - var step = this._opts.step; if (utils.isFunction(step)) { var easing = this._easing(this._opts.easing); @@ -74,19 +65,14 @@ Path.prototype.stop = function stop() { this.path.style.strokeDashoffset = this._getComputedDashOffset(); }; -// Method introduced here: -// http://jakearchibald.com/2013/animated-line-drawing-svg/ Path.prototype.animate = function animate(progress, opts, cb) { opts = opts || {}; - if (utils.isFunction(opts)) { cb = opts; opts = {}; } var passedOpts = utils.extend({}, opts); - - // Copy default opts to new object so defaults are not modified var defaultOpts = utils.extend({}, this._opts); opts = utils.extend(defaultOpts, opts); @@ -94,9 +80,6 @@ Path.prototype.animate = function animate(progress, opts, cb) { var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts); this.stop(); - - // Trigger a layout so styles are calculated & the browser - // picks up the starting position before animating this.path.getBoundingClientRect(); var offset = this._getComputedDashOffset(); @@ -115,7 +98,7 @@ Path.prototype.animate = function animate(progress, opts, cb) { var reference = opts.shape || self; opts.step(state, reference, opts.attachment); } - }).then(function(state) { + }).then(function() { if (utils.isFunction(cb)) { cb(); } @@ -135,29 +118,19 @@ Path.prototype._progressToOffset = function _progressToOffset(progress) { return length - progress * length; }; -// Resolves from and to values for animation. Path.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) { if (opts.from && opts.to) { - return { - from: opts.from, - to: opts.to - }; + return { from: opts.from, to: opts.to }; } - - return { - from: this._calculateFrom(easing), - to: this._calculateTo(progress, easing) - }; + return { from: this._calculateFrom(easing), to: this._calculateTo(progress, easing) }; }; -// Calculate `from` values from options passed at initialization Path.prototype._calculateFrom = function _calculateFrom(easing) { - return shifty.interpolate(this._opts.from, this._opts.to, this.value(), easing); + return interpolate(this._opts.from, this._opts.to, this.value(), easing); }; -// Calculate `to` values from options passed at initialization Path.prototype._calculateTo = function _calculateTo(progress, easing) { - return shifty.interpolate(this._opts.from, this._opts.to, progress, easing); + return interpolate(this._opts.from, this._opts.to, progress, easing); }; Path.prototype._stopTween = function _stopTween() { @@ -168,11 +141,7 @@ Path.prototype._stopTween = function _stopTween() { }; Path.prototype._easing = function _easing(easing) { - if (EASING_ALIASES.hasOwnProperty(easing)) { - return EASING_ALIASES[easing]; - } - - return easing; + return EASING_ALIASES[easing] || easing; }; module.exports = Path;