react-chartjs-2
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("chart.js")):"function"==typeof define&&define.amd?define(["exports","react","chart.js"],e):e(t.ReactChartjs2={},t.React,t.Chart)}(this,function(t,e,r){"use strict";function n(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(t){return function(){return t}}e=e&&e.hasOwnProperty("default")?e.default:e,r=r&&r.hasOwnProperty("default")?r.default:r;var i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=function(){};a.thatReturns=o,a.thatReturnsFalse=o(!1),a.thatReturnsTrue=o(!0),a.thatReturnsNull=o(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(t){return t};var u=a,c=function(t){};"production"!==process.env.NODE_ENV&&(c=function(t){if(void 0===t)throw Error("invariant requires an error message argument")});var s=function(t,e,r,n,o,i,a,u){if(c(e),!t){var s;if(void 0===e)s=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[r,n,o,i,a,u],p=0;(s=Error(e.replace(/%s/g,function(){return f[p++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}},f=u;if("production"!==process.env.NODE_ENV){var p=function(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;e>n;n++)r[n-1]=arguments[n];var o=0,i="Warning: "+t.replace(/%s/g,function(){return r[o++]});void 0!==console&&console.error(i);try{throw Error(i)}catch(t){}};f=function(t,e){if(void 0===e)throw Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var r=arguments.length,n=Array(r>2?r-2:0),o=2;r>o;o++)n[o-2]=arguments[o];p.apply(void 0,[e].concat(n))}}}var l=f,h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";if("production"!==process.env.NODE_ENV)var d=s,y=l,v=h,_={};var b=function(t,e,r,n,o){if("production"!==process.env.NODE_ENV)for(var i in t)if(t.hasOwnProperty(i)){var a;try{d("function"==typeof t[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",n||"React class",r,i),a=t[i](e,i,n,r,null,v)}catch(t){a=t}if(y(!a||a instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",r,i,typeof a),a instanceof Error&&!(a.message in _)){_[a.message]=!0;var u=o?o():"";y(!1,"Failed %s type: %s%s",r,a.message,null!=u?u:"")}}},g=function(t,e){function r(t){var e=t&&(_&&t[_]||t[g]);if("function"==typeof e)return e}function n(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function o(t){this.message=t,this.stack=""}function i(t){function r(r,a,u,c,f,p,d){if(c=c||m,p=p||u,d!==h)if(e)s(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==process.env.NODE_ENV&&void 0!==console){var y=c+":"+u;!n[y]&&3>i&&(l(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",p,c),n[y]=!0,i++)}return null==a[u]?r?new o(null===a[u]?"The "+f+" `"+p+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+f+" `"+p+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:t(a,u,c,f,p)}if("production"!==process.env.NODE_ENV)var n={},i=0;var a=r.bind(null,!1);return a.isRequired=r.bind(null,!0),a}function a(t){return i(function(e,r,n,i,a,u){var c=e[r];return p(c)!==t?new o("Invalid "+i+" `"+a+"` of type `"+d(c)+"` supplied to `"+n+"`, expected `"+t+"`."):null})}function c(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(c);if(null===e||t(e))return!0;var n=r(e);if(!n)return!1;var o,i=n.call(e);if(n!==e.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function f(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function p(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":f(e,t)?"symbol":e}function d(t){if(void 0===t||null===t)return""+t;var e=p(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function y(t){var e=d(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function v(t){return t.constructor&&t.constructor.name?t.constructor.name:m}var _="function"==typeof Symbol&&Symbol.iterator,g="@@iterator",m="<<anonymous>>",j={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:i(u.thatReturnsNull),arrayOf:function(t){return i(function(e,r,n,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside arrayOf.");var u=e[r];if(!Array.isArray(u))return new o("Invalid "+i+" `"+a+"` of type `"+p(u)+"` supplied to `"+n+"`, expected an array.");for(var c=0;u.length>c;c++){var s=t(u,c,n,i,a+"["+c+"]",h);if(s instanceof Error)return s}return null})},element:function(){return i(function(e,r,n,i,a){var u=e[r];return t(u)?null:new o("Invalid "+i+" `"+a+"` of type `"+p(u)+"` supplied to `"+n+"`, expected a single ReactElement.")})}(),instanceOf:function(t){return i(function(e,r,n,i,a){if(!(e[r]instanceof t)){var u=t.name||m;return new o("Invalid "+i+" `"+a+"` of type `"+v(e[r])+"` supplied to `"+n+"`, expected instance of `"+u+"`.")}return null})},node:function(){return i(function(t,e,r,n,i){return c(t[e])?null:new o("Invalid "+n+" `"+i+"` supplied to `"+r+"`, expected a ReactNode.")})}(),objectOf:function(t){return i(function(e,r,n,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var u=e[r],c=p(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected an object.");for(var s in u)if(u.hasOwnProperty(s)){var f=t(u,s,n,i,a+"."+s,h);if(f instanceof Error)return f}return null})},oneOf:function(t){return Array.isArray(t)?i(function(e,r,i,a,u){for(var c=e[r],s=0;t.length>s;s++)if(n(c,t[s]))return null;return new o("Invalid "+a+" `"+u+"` of value `"+c+"` supplied to `"+i+"`, expected one of "+JSON.stringify(t)+".")}):("production"!==process.env.NODE_ENV&&l(!1,"Invalid argument supplied to oneOf, expected an instance of array."),u.thatReturnsNull)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&l(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),u.thatReturnsNull;for(var e=0;t.length>e;e++){var r=t[e];if("function"!=typeof r)return l(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",y(r),e),u.thatReturnsNull}return i(function(e,r,n,i,a){for(var u=0;t.length>u;u++)if(null==(0,t[u])(e,r,n,i,a,h))return null;return new o("Invalid "+i+" `"+a+"` supplied to `"+n+"`.")})},shape:function(t){return i(function(e,r,n,i,a){var u=e[r],c=p(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+n+"`, expected `object`.");for(var s in t){var f=t[s];if(f){var l=f(u,s,n,i,a+"."+s,h);if(l)return l}}return null})}};return o.prototype=Error.prototype,j.checkPropTypes=b,j.PropTypes=j,j},m=function(){function t(t,e,r,n,o,i){i!==h&&s(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return r.checkPropTypes=u,r.PropTypes=r,r},j=n(function(t){if("production"!==process.env.NODE_ENV){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=g(function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},!0)}else t.exports=m()}),w=n(function(t,e){function r(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}function n(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function o(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function a(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function u(t,e){return t.has(e)}function c(t,e){return null==t?void 0:t[e]}function s(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function f(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function p(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function l(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function d(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new h;++e<r;)this.add(t[e])}function y(t){var e=this.__data__=new l(t);this.size=e.size}function v(t,e){var r=se(t),n=!r&&ce(t),o=!r&&!n&&fe(t),i=!r&&!n&&!o&&pe(t),u=r||n||o||i,c=u?a(t.length,String):[],s=c.length;for(var f in t)!e&&!Dt.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||C(f,s))||c.push(f);return c}function _(t,e){for(var r=t.length;r--;)if(M(t[r][0],e))return r;return-1}function b(t,e,r){var o=e(t);return se(t)?o:n(o,r(t))}function g(t){return null==t?void 0===t?ht:at:Bt&&Bt in Object(t)?R(t):I(t)}function m(t){return B(t)&&g(t)==J}function j(t,e,r,n,o){return t===e||(null==t||null==e||!B(t)&&!B(e)?t!==t&&e!==e:w(t,e,r,n,j,o))}function w(t,e,r,n,o,i){var a=se(t),u=se(e),c=a?Q:ue(t),s=u?Q:ue(e),f=(c=c==J?ut:c)==ut,p=(s=s==J?ut:s)==ut,l=c==s;if(l&&fe(t)){if(!fe(e))return!1;a=!0,f=!1}if(l&&!f)return i||(i=new y),a||pe(t)?A(t,e,r,n,o,i):P(t,e,c,r,n,o,i);if(!(r&Y)){var h=f&&Dt.call(t,"__wrapped__"),d=p&&Dt.call(e,"__wrapped__");if(h||d){var v=h?t.value():t,_=d?e.value():e;return i||(i=new y),o(v,_,r,n,i)}}return!!l&&(i||(i=new y),x(t,e,r,n,o,i))}function O(t){return!(!V(t)||D(t))&&(U(t)?$t:_t).test($(t))}function E(t){if(!N(t))return Kt(t);var e=[];for(var r in Object(t))Dt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function A(t,e,r,n,i,a){var c=r&Y,s=t.length,f=e.length;if(!(s==f||c&&f>s))return!1;var p=a.get(t);if(p&&a.get(e))return p==e;var l=-1,h=!0,y=r&G?new d:void 0;for(a.set(t,e),a.set(e,t);++l<s;){var v=t[l],_=e[l];if(n)var b=c?n(_,v,l,e,t,a):n(v,_,l,t,e,a);if(void 0!==b){if(b)continue;h=!1;break}if(y){if(!o(e,function(t,e){if(!u(y,e)&&(v===t||i(v,t,r,n,a)))return y.push(e)})){h=!1;break}}else if(v!==_&&!i(v,_,r,n,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function P(t,e,r,n,o,i,a){switch(r){case yt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case dt:return!(t.byteLength!=e.byteLength||!i(new Ut(t),new Ut(e)));case Z:case tt:case it:return M(+t,+e);case et:return t.name==e.name&&t.message==e.message;case st:case pt:return t==e+"";case ot:var u=s;case ft:var c=n&Y;if(u||(u=f),t.size!=e.size&&!c)return!1;var p=a.get(t);if(p)return p==e;n|=G,a.set(t,e);var l=A(u(t),u(e),n,o,i,a);return a.delete(t),l;case lt:if(ie)return ie.call(t)==ie.call(e)}return!1}function x(t,e,r,n,o,i){var a=r&Y,u=T(t),c=u.length;if(c!=T(e).length&&!a)return!1;for(var s=c;s--;){var f=u[s];if(!(a?f in e:Dt.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var l=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var d=t[f=u[s]],y=e[f];if(n)var v=a?n(y,d,f,e,t,i):n(d,y,f,t,e,i);if(!(void 0===v?d===y||o(d,y,r,n,i):v)){l=!1;break}h||(h="constructor"==f)}if(l&&!h){var _=t.constructor,b=e.constructor;_!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(l=!1)}return i.delete(t),i.delete(e),l}function T(t){return b(t,W,ae)}function k(t,e){var r=t.__data__;return z(e)?r["string"==typeof e?"string":"hash"]:r.map}function S(t,e){var r=c(t,e);return O(r)?r:void 0}function R(t){var e=Dt.call(t,Bt),r=t[Bt];try{t[Bt]=void 0;var n=!0}catch(t){}var o=It.call(t);return n&&(e?t[Bt]=r:delete t[Bt]),o}function C(t,e){return!!(e=null==e?H:e)&&("number"==typeof t||bt.test(t))&&t>-1&&t%1==0&&e>t}function z(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function D(t){return!!Nt&&Nt in t}function N(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function I(t){return It.call(t)}function $(t){if(null!=t){try{return zt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function M(t,e){return t===e||t!==t&&e!==e}function F(t){return null!=t&&L(t.length)&&!U(t)}function U(t){if(!V(t))return!1;var e=g(t);return e==rt||e==nt||e==X||e==ct}function L(t){return"number"==typeof t&&t>-1&&t%1==0&&H>=t}function V(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function B(t){return null!=t&&"object"==typeof t}function W(t){return F(t)?v(t):E(t)}var q=200,K="__lodash_hash_undefined__",Y=1,G=2,H=9007199254740991,J="[object Arguments]",Q="[object Array]",X="[object AsyncFunction]",Z="[object Boolean]",tt="[object Date]",et="[object Error]",rt="[object Function]",nt="[object GeneratorFunction]",ot="[object Map]",it="[object Number]",at="[object Null]",ut="[object Object]",ct="[object Proxy]",st="[object RegExp]",ft="[object Set]",pt="[object String]",lt="[object Symbol]",ht="[object Undefined]",dt="[object ArrayBuffer]",yt="[object DataView]",vt=/[\\^$.*+?()[\]{}|]/g,_t=/^\[object .+?Constructor\]$/,bt=/^(?:0|[1-9]\d*)$/,gt={};gt["[object Float32Array]"]=gt["[object Float64Array]"]=gt["[object Int8Array]"]=gt["[object Int16Array]"]=gt["[object Int32Array]"]=gt["[object Uint8Array]"]=gt["[object Uint8ClampedArray]"]=gt["[object Uint16Array]"]=gt["[object Uint32Array]"]=!0,gt[J]=gt[Q]=gt[dt]=gt[Z]=gt[yt]=gt[tt]=gt[et]=gt[rt]=gt[ot]=gt[it]=gt[ut]=gt[st]=gt[ft]=gt[pt]=gt["[object WeakMap]"]=!1;var mt="object"==typeof i&&i&&i.Object===Object&&i,jt="object"==typeof self&&self&&self.Object===Object&&self,wt=mt||jt||Function("return this")(),Ot=e&&!e.nodeType&&e,Et=Ot&&!0&&t&&!t.nodeType&&t,At=Et&&Et.exports===Ot,Pt=At&&mt.process,xt=function(){try{return Pt&&Pt.binding&&Pt.binding("util")}catch(t){}}(),Tt=xt&&xt.isTypedArray,kt=Array.prototype,St=Function.prototype,Rt=Object.prototype,Ct=wt["__core-js_shared__"],zt=St.toString,Dt=Rt.hasOwnProperty,Nt=function(){var t=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),It=Rt.toString,$t=RegExp("^"+zt.call(Dt).replace(vt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mt=At?wt.Buffer:void 0,Ft=wt.Symbol,Ut=wt.Uint8Array,Lt=Rt.propertyIsEnumerable,Vt=kt.splice,Bt=Ft?Ft.toStringTag:void 0,Wt=Object.getOwnPropertySymbols,qt=Mt?Mt.isBuffer:void 0,Kt=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Yt=S(wt,"DataView"),Gt=S(wt,"Map"),Ht=S(wt,"Promise"),Jt=S(wt,"Set"),Qt=S(wt,"WeakMap"),Xt=S(Object,"create"),Zt=$(Yt),te=$(Gt),ee=$(Ht),re=$(Jt),ne=$(Qt),oe=Ft?Ft.prototype:void 0,ie=oe?oe.valueOf:void 0;p.prototype.clear=function(){this.__data__=Xt?Xt(null):{},this.size=0},p.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},p.prototype.get=function(t){var e=this.__data__;if(Xt){var r=e[t];return r===K?void 0:r}return Dt.call(e,t)?e[t]:void 0},p.prototype.has=function(t){var e=this.__data__;return Xt?void 0!==e[t]:Dt.call(e,t)},p.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Xt&&void 0===e?K:e,this},l.prototype.clear=function(){this.__data__=[],this.size=0},l.prototype.delete=function(t){var e=this.__data__,r=_(e,t);return r>=0&&(r==e.length-1?e.pop():Vt.call(e,r,1),--this.size,!0)},l.prototype.get=function(t){var e=this.__data__,r=_(e,t);return 0>r?void 0:e[r][1]},l.prototype.has=function(t){return _(this.__data__,t)>-1},l.prototype.set=function(t,e){var r=this.__data__,n=_(r,t);return 0>n?(++this.size,r.push([t,e])):r[n][1]=e,this},h.prototype.clear=function(){this.size=0,this.__data__={hash:new p,map:new(Gt||l),string:new p}},h.prototype.delete=function(t){var e=k(this,t).delete(t);return this.size-=e?1:0,e},h.prototype.get=function(t){return k(this,t).get(t)},h.prototype.has=function(t){return k(this,t).has(t)},h.prototype.set=function(t,e){var r=k(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},d.prototype.add=d.prototype.push=function(t){return this.__data__.set(t,K),this},d.prototype.has=function(t){return this.__data__.has(t)},y.prototype.clear=function(){this.__data__=new l,this.size=0},y.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},y.prototype.get=function(t){return this.__data__.get(t)},y.prototype.has=function(t){return this.__data__.has(t)},y.prototype.set=function(t,e){var r=this.__data__;if(r instanceof l){var n=r.__data__;if(!Gt||q-1>n.length)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new h(n)}return r.set(t,e),this.size=r.size,this};var ae=Wt?function(t){return null==t?[]:(t=Object(t),r(Wt(t),function(e){return Lt.call(t,e)}))}:function(){return[]},ue=g;(Yt&&ue(new Yt(new ArrayBuffer(1)))!=yt||Gt&&ue(new Gt)!=ot||Ht&&"[object Promise]"!=ue(Ht.resolve())||Jt&&ue(new Jt)!=ft||Qt&&"[object WeakMap]"!=ue(new Qt))&&(ue=function(t){var e=g(t),r=e==ut?t.constructor:void 0,n=r?$(r):"";if(n)switch(n){case Zt:return yt;case te:return ot;case ee:return"[object Promise]";case re:return ft;case ne:return"[object WeakMap]"}return e});var ce=m(function(){return arguments}())?m:function(t){return B(t)&&Dt.call(t,"callee")&&!Lt.call(t,"callee")},se=Array.isArray,fe=qt||function(){return!1},pe=Tt?function(t){return function(e){return t(e)}}(Tt):function(t){return B(t)&&L(t.length)&&!!gt[g(t)]};t.exports=function(t,e){return j(t,e)}}),O=n(function(t,e){function r(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}function n(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function o(t){return function(e){return null==e?void 0:e[t]}}function a(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function u(t,e){return null==t?void 0:t[e]}function c(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function s(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function f(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function p(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function l(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function h(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function d(t){var e=-1,r=t?t.length:0;for(this.__data__=new h;++e<r;)this.add(t[e])}function y(t){this.__data__=new l(t)}function v(t,e){var r=$e(t)||H(t)?a(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!pe.call(t,i)||o&&("length"==i||M(i,n))||r.push(i);return r}function _(t,e){for(var r=t.length;r--;)if(G(t[r][0],e))return r;return-1}function b(t,e){for(var r=0,n=(e=F(e,t)?[e]:S(e)).length;null!=t&&n>r;)t=t[q(e[r++])];return r&&r==n?t:void 0}function g(t,e){return null!=t&&e in Object(t)}function m(t,e,r,n,o){return t===e||(null==t||null==e||!tt(t)&&!et(e)?t!==t&&e!==e:j(t,e,m,r,n,o))}function j(t,e,r,n,o,i){var a=$e(t),u=$e(e),s=wt,f=wt;a||(s=(s=De(t))==jt?St:s),u||(f=(f=De(e))==jt?St:f);var p=s==St&&!c(t),l=f==St&&!c(e),h=s==f;if(h&&!p)return i||(i=new y),a||Me(t)?R(t,e,r,n,o,i):C(t,e,s,r,n,o,i);if(!(o&vt)){var d=p&&pe.call(t,"__wrapped__"),v=l&&pe.call(e,"__wrapped__");if(d||v){var _=d?t.value():t,b=v?e.value():e;return i||(i=new y),r(_,b,n,o,i)}}return!!h&&(i||(i=new y),z(t,e,r,n,o,i))}function w(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=r[o])[0],s=t[c],f=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var p=new y;if(n)var l=n(s,f,c,t,e,p);if(!(void 0===l?m(f,s,n,yt|vt,p):l))return!1}}return!0}function O(t){return!(!tt(t)||L(t))&&(X(t)||c(t)?he:Kt).test(K(t))}function E(t){return"function"==typeof t?t:null==t?ft:"object"==typeof t?$e(t)?x(t[0],t[1]):P(t):pt(t)}function A(t){if(!V(t))return be(t);var e=[];for(var r in Object(t))pe.call(t,r)&&"constructor"!=r&&e.push(r);return e}function P(t){var e=N(t);return 1==e.length&&e[0][2]?W(e[0][0],e[0][1]):function(r){return r===t||w(r,t,e)}}function x(t,e){return F(t)&&B(e)?W(q(t),e):function(r){var n=ut(r,t);return void 0===n&&n===e?ct(r,t):m(e,n,void 0,yt|vt)}}function T(t){return function(e){return b(e,t)}}function k(t){if("string"==typeof t)return t;if(rt(t))return ze?ze.call(t):"";var e=t+"";return"0"==e&&1/t==-_t?"-0":e}function S(t){return $e(t)?t:Ne(t)}function R(t,e,n,o,i,a){var u=i&vt,c=t.length,s=e.length;if(!(c==s||u&&s>c))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var p=-1,l=!0,h=i&yt?new d:void 0;for(a.set(t,e),a.set(e,t);++p<c;){var y=t[p],v=e[p];if(o)var _=u?o(v,y,p,e,t,a):o(y,v,p,t,e,a);if(void 0!==_){if(_)continue;l=!1;break}if(h){if(!r(e,function(t,e){if(!h.has(e)&&(y===t||n(y,t,o,i,a)))return h.add(e)})){l=!1;break}}else if(y!==v&&!n(y,v,o,i,a)){l=!1;break}}return a.delete(t),a.delete(e),l}function C(t,e,r,n,o,i,a){switch(r){case It:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Nt:return!(t.byteLength!=e.byteLength||!n(new ye(t),new ye(e)));case Ot:case Et:case kt:return G(+t,+e);case At:return t.name==e.name&&t.message==e.message;case Rt:case zt:return t==e+"";case Tt:var u=s;case Ct:var c=i&vt;if(u||(u=f),t.size!=e.size&&!c)return!1;var p=a.get(t);if(p)return p==e;i|=yt,a.set(t,e);var l=R(u(t),u(e),n,o,i,a);return a.delete(t),l;case Dt:if(Ce)return Ce.call(t)==Ce.call(e)}return!1}function z(t,e,r,n,o,i){var a=o&vt,u=st(t),c=u.length;if(c!=st(e).length&&!a)return!1;for(var s=c;s--;){var f=u[s];if(!(a?f in e:pe.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var l=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var d=t[f=u[s]],y=e[f];if(n)var v=a?n(y,d,f,e,t,i):n(d,y,f,t,e,i);if(!(void 0===v?d===y||r(d,y,n,o,i):v)){l=!1;break}h||(h="constructor"==f)}if(l&&!h){var _=t.constructor,b=e.constructor;_!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b)&&(l=!1)}return i.delete(t),i.delete(e),l}function D(t,e){var r=t.__data__;return U(e)?r["string"==typeof e?"string":"hash"]:r.map}function N(t){for(var e=st(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,B(o)]}return e}function I(t,e){var r=u(t,e);return O(r)?r:void 0}function $(t,e,r){for(var n,o=-1,i=(e=F(e,t)?[e]:S(e)).length;++o<i;){var a=q(e[o]);if(!(n=null!=t&&r(t,a)))break;t=t[a]}return n||!!(i=t?t.length:0)&&Z(i)&&M(a,i)&&($e(t)||H(t))}function M(t,e){return!!(e=null==e?bt:e)&&("number"==typeof t||Gt.test(t))&&t>-1&&t%1==0&&e>t}function F(t,e){if($e(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!rt(t))||(Mt.test(t)||!$t.test(t)||null!=e&&t in Object(e))}function U(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function L(t){return!!se&&se in t}function V(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ue)}function B(t){return t===t&&!tt(t)}function W(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}function q(t){if("string"==typeof t||rt(t))return t;var e=t+"";return"0"==e&&1/t==-_t?"-0":e}function K(t){if(null!=t){try{return fe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Y(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(ht);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(Y.Cache||h),r}function G(t,e){return t===e||t!==t&&e!==e}function H(t){return Q(t)&&pe.call(t,"callee")&&(!ve.call(t,"callee")||le.call(t)==jt)}function J(t){return null!=t&&Z(t.length)&&!X(t)}function Q(t){return et(t)&&J(t)}function X(t){var e=tt(t)?le.call(t):"";return e==Pt||e==xt}function Z(t){return"number"==typeof t&&t>-1&&t%1==0&&bt>=t}function tt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function et(t){return!!t&&"object"==typeof t}function rt(t){return"symbol"==typeof t||et(t)&&le.call(t)==Dt}function nt(t){return t?(t=it(t))===_t||t===-_t?(0>t?-1:1)*gt:t===t?t:0:0===t?t:0}function ot(t){var e=nt(t),r=e%1;return e===e?r?e-r:e:0}function it(t){if("number"==typeof t)return t;if(rt(t))return mt;if(tt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=tt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Vt,"");var r=qt.test(t);return r||Yt.test(t)?Jt(t.slice(2),r?2:8):Wt.test(t)?mt:+t}function at(t){return null==t?"":k(t)}function ut(t,e,r){var n=null==t?void 0:b(t,e);return void 0===n?r:n}function ct(t,e){return null!=t&&$(t,e,g)}function st(t){return J(t)?v(t):A(t)}function ft(t){return t}function pt(t){return F(t)?o(q(t)):T(t)}var lt=200,ht="Expected a function",dt="__lodash_hash_undefined__",yt=1,vt=2,_t=1/0,bt=9007199254740991,gt=1.7976931348623157e308,mt=NaN,jt="[object Arguments]",wt="[object Array]",Ot="[object Boolean]",Et="[object Date]",At="[object Error]",Pt="[object Function]",xt="[object GeneratorFunction]",Tt="[object Map]",kt="[object Number]",St="[object Object]",Rt="[object RegExp]",Ct="[object Set]",zt="[object String]",Dt="[object Symbol]",Nt="[object ArrayBuffer]",It="[object DataView]",$t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mt=/^\w*$/,Ft=/^\./,Ut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lt=/[\\^$.*+?()[\]{}|]/g,Vt=/^\s+|\s+$/g,Bt=/\\(\\)?/g,Wt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Kt=/^\[object .+?Constructor\]$/,Yt=/^0o[0-7]+$/i,Gt=/^(?:0|[1-9]\d*)$/,Ht={};Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht[jt]=Ht[wt]=Ht[Nt]=Ht[Ot]=Ht[It]=Ht[Et]=Ht[At]=Ht[Pt]=Ht[Tt]=Ht[kt]=Ht[St]=Ht[Rt]=Ht[Ct]=Ht[zt]=Ht["[object WeakMap]"]=!1;var Jt=parseInt,Qt="object"==typeof i&&i&&i.Object===Object&&i,Xt="object"==typeof self&&self&&self.Object===Object&&self,Zt=Qt||Xt||Function("return this")(),te=e&&!e.nodeType&&e,ee=te&&!0&&t&&!t.nodeType&&t,re=ee&&ee.exports===te&&Qt.process,ne=function(){try{return re&&re.binding("util")}catch(t){}}(),oe=ne&&ne.isTypedArray,ie=Array.prototype,ae=Function.prototype,ue=Object.prototype,ce=Zt["__core-js_shared__"],se=function(){var t=/[^.]+$/.exec(ce&&ce.keys&&ce.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),fe=ae.toString,pe=ue.hasOwnProperty,le=ue.toString,he=RegExp("^"+fe.call(pe).replace(Lt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),de=Zt.Symbol,ye=Zt.Uint8Array,ve=ue.propertyIsEnumerable,_e=ie.splice,be=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),ge=Math.max,me=I(Zt,"DataView"),je=I(Zt,"Map"),we=I(Zt,"Promise"),Oe=I(Zt,"Set"),Ee=I(Zt,"WeakMap"),Ae=I(Object,"create"),Pe=K(me),xe=K(je),Te=K(we),ke=K(Oe),Se=K(Ee),Re=de?de.prototype:void 0,Ce=Re?Re.valueOf:void 0,ze=Re?Re.toString:void 0;p.prototype.clear=function(){this.__data__=Ae?Ae(null):{}},p.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},p.prototype.get=function(t){var e=this.__data__;if(Ae){var r=e[t];return r===dt?void 0:r}return pe.call(e,t)?e[t]:void 0},p.prototype.has=function(t){var e=this.__data__;return Ae?void 0!==e[t]:pe.call(e,t)},p.prototype.set=function(t,e){return this.__data__[t]=Ae&&void 0===e?dt:e,this},l.prototype.clear=function(){this.__data__=[]},l.prototype.delete=function(t){var e=this.__data__,r=_(e,t);return r>=0&&(r==e.length-1?e.pop():_e.call(e,r,1),!0)},l.prototype.get=function(t){var e=this.__data__,r=_(e,t);return 0>r?void 0:e[r][1]},l.prototype.has=function(t){return _(this.__data__,t)>-1},l.prototype.set=function(t,e){var r=this.__data__,n=_(r,t);return 0>n?r.push([t,e]):r[n][1]=e,this},h.prototype.clear=function(){this.__data__={hash:new p,map:new(je||l),string:new p}},h.prototype.delete=function(t){return D(this,t).delete(t)},h.prototype.get=function(t){return D(this,t).get(t)},h.prototype.has=function(t){return D(this,t).has(t)},h.prototype.set=function(t,e){return D(this,t).set(t,e),this},d.prototype.add=d.prototype.push=function(t){return this.__data__.set(t,dt),this},d.prototype.has=function(t){return this.__data__.has(t)},y.prototype.clear=function(){this.__data__=new l},y.prototype.delete=function(t){return this.__data__.delete(t)},y.prototype.get=function(t){return this.__data__.get(t)},y.prototype.has=function(t){return this.__data__.has(t)},y.prototype.set=function(t,e){var r=this.__data__;if(r instanceof l){var n=r.__data__;if(!je||lt-1>n.length)return n.push([t,e]),this;r=this.__data__=new h(n)}return r.set(t,e),this};var De=function(t){return le.call(t)};(me&&De(new me(new ArrayBuffer(1)))!=It||je&&De(new je)!=Tt||we&&"[object Promise]"!=De(we.resolve())||Oe&&De(new Oe)!=Ct||Ee&&"[object WeakMap]"!=De(new Ee))&&(De=function(t){var e=le.call(t),r=e==St?t.constructor:void 0,n=r?K(r):void 0;if(n)switch(n){case Pe:return It;case xe:return Tt;case Te:return"[object Promise]";case ke:return Ct;case Se:return"[object WeakMap]"}return e});var Ne=Y(function(t){t=at(t);var e=[];return Ft.test(t)&&e.push(""),t.replace(Ut,function(t,r,n,o){e.push(n?o.replace(Bt,"$1"):r||t)}),e}),Ie=function(t){return function(e,r,n){var o=Object(e);if(!J(e)){var i=E(r,3);e=st(e),r=function(t){return i(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[i?e[a]:a]:void 0}}(function(t,e,r){var o=t?t.length:0;if(!o)return-1;var i=null==r?0:ot(r);return 0>i&&(i=ge(o+i,0)),n(t,E(e,3),i)});Y.Cache=h;var $e=Array.isArray,Me=oe?function(t){return function(e){return t(e)}}(oe):function(t){return et(t)&&Z(t.length)&&!!Ht[le.call(t)]};t.exports=Ie}),E=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},A=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},P=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},x=function(t,e){var r={};for(var n in t)0>e.indexOf(n)&&Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},T=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},k=function(t){function n(){var e,r,o;E(this,n);for(var i=arguments.length,a=Array(i),u=0;i>u;u++)a[u]=arguments[u];return e=r=T(this,t.call.apply(t,[this].concat(a))),r.handleOnClick=function(t){var e=r.chart_instance,n=r.props,o=n.getDatasetAtEvent,i=n.getElementAtEvent,a=n.getElementsAtEvent,u=n.onElementsClick;o&&o(e.getDatasetAtEvent(t),t),i&&i(e.getElementAtEvent(t),t),a&&a(e.getElementsAtEvent(t),t),u&&u(e.getElementsAtEvent(t),t)},r.ref=function(t){r.element=t},o=e,T(r,o)}return P(n,t),n.prototype.componentWillMount=function(){this.chart_instance=void 0},n.prototype.componentDidMount=function(){this.renderChart()},n.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.chart_instance.destroy(),void this.renderChart();this.updateChart()},n.prototype.shouldComponentUpdate=function(t){var e=this.props,r=e.type,n=e.options,o=e.plugins,i=e.legend,a=e.height,u=e.width;if(!0===t.redraw)return!0;if(a!==t.height||u!==t.width)return!0;if(r!==t.type)return!0;if(!w(i,t.legend))return!0;if(!w(n,t.options))return!0;var c=this.transformDataProp(t);return!w(this.shadowDataProp,c)||!w(o,t.plugins)},n.prototype.componentWillUnmount=function(){this.chart_instance.destroy()},n.prototype.transformDataProp=function(t){var e=t.data;return"function"==typeof e?e(this.element):e},n.prototype.memoizeDataProps=function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=A({},t,{datasets:t.datasets&&t.datasets.map(function(t){return A({},t)})}),t}},n.prototype.updateChart=function(){var t=this,e=this.props.options,n=this.memoizeDataProps(this.props);if(this.chart_instance){e&&(this.chart_instance.options=r.helpers.configMerge(this.chart_instance.options,e));for(var o=this.chart_instance.config.data&&this.chart_instance.config.data.datasets||[],i=n.datasets||[],a=o.map(this.props.datasetKeyProvider),u=i.map(this.props.datasetKeyProvider),c=i.filter(function(e){return-1===a.indexOf(t.props.datasetKeyProvider(e))}),s=o.length-1;s>=0;s-=1)!function(e){var r=t.props.datasetKeyProvider(o[e]);if(-1===u.indexOf(r))o.splice(e,1);else{var n=O(i,function(e){return t.props.datasetKeyProvider(e)===r});if(n){o[e].data.splice(n.data.length),n.data.forEach(function(t,r){o[e].data[r]=n.data[r]});var a=x(n,["data"]);o[e]=A({data:o[e].data},o[e],a)}}}(s);c.forEach(function(t){return o.push(t)});var f=x(n,["datasets"]);this.chart_instance.config.data=A({},this.chart_instance.config.data,f),this.chart_instance.update()}},n.prototype.renderChart=function(){var t=this.props,e=t.options,o=t.legend,i=t.type,a=t.plugins,u=this.element,c=this.memoizeDataProps();void 0===o||w(n.defaultProps.legend,o)||(e.legend=o),this.chart_instance=new r(u,{type:i,data:c,options:e,plugins:a})},n.prototype.render=function(){var t=this.props,r=t.height,n=t.width;return e.createElement("canvas",{ref:this.ref,height:r,width:n,onClick:this.handleOnClick})},n}(e.Component);k.getLabelAsKey=function(t){return t.label},k.propTypes={data:j.oneOfType([j.object,j.func]).isRequired,getDatasetAtEvent:j.func,getElementAtEvent:j.func,getElementsAtEvent:j.func,height:j.number,legend:j.object,onElementsClick:j.func,options:j.object,plugins:j.arrayOf(j.object),redraw:j.bool,type:function(t,e,n){if(!r.controllers[t[e]])return Error("Invalid chart type `"+t[e]+"` supplied to `"+n+"`.")},width:j.number,datasetKeyProvider:j.func},k.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:k.getLabelAsKey};var S=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"doughnut"}))},r}(e.Component),R=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"pie"}))},r}(e.Component),C=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"line"}))},r}(e.Component),z=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bar"}))},r}(e.Component),D=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"horizontalBar"}))},r}(e.Component),N=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"radar"}))},r}(e.Component),I=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"polarArea"}))},r}(e.Component),$=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bubble"}))},r}(e.Component),M=function(t){function r(){return E(this,r),T(this,t.apply(this,arguments))}return P(r,t),r.prototype.render=function(){var t=this;return e.createElement(k,A({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"scatter"}))},r}(e.Component),F=r.defaults;t.default=k,t.Doughnut=S,t.Pie=R,t.Line=C,t.Bar=z,t.HorizontalBar=D,t.Radar=N,t.Polar=I,t.Bubble=$,t.Scatter=M,t.defaults=F,t.Chart=r,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("chart.js")):"function"==typeof define&&define.amd?define(["exports","react","chart.js"],e):e(t.ReactChartjs2={},t.React,t.Chart)}(this,function(t,e,n){"use strict";function r(t,e){return e={exports:{}},t(e,e.exports),e.exports}function o(t){return function(){return t}}function i(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function a(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function c(t){var e=this.__data__=new k(t);this.size=e.size}function s(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Pt;++e<n;)this.add(t[e])}function f(t,e,n,r,o){return t===e||(null==t||null==e||!ce(t)&&!ce(e)?t!==t&&e!==e:nn(t,e,n,r,f,o))}function p(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(_n);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(p.Cache||Pt),n}function l(t){if("string"==typeof t)return t;if(ee(t))return Pn(t,l)+"";if(yn(t))return Tn?Tn.call(t):"";var e=t+"";return"0"==e&&1/t==-An?"-0":e}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var h="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},y=function(){};y.thatReturns=o,y.thatReturnsFalse=o(!1),y.thatReturnsTrue=o(!0),y.thatReturnsNull=o(null),y.thatReturnsThis=function(){return this},y.thatReturnsArgument=function(t){return t};var d=y,v=function(t){};"production"!==process.env.NODE_ENV&&(v=function(t){if(void 0===t)throw Error("invariant requires an error message argument")});var b=function(t,e,n,r,o,i,a,u){if(v(e),!t){var c;if(void 0===e)c=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,u],f=0;(c=Error(e.replace(/%s/g,function(){return s[f++]}))).name="Invariant Violation"}throw c.framesToPop=1,c}},_=d;if("production"!==process.env.NODE_ENV){var g=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+t.replace(/%s/g,function(){return n[o++]});void 0!==console&&console.error(i);try{throw Error(i)}catch(t){}};_=function(t,e){if(void 0===e)throw Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==e.indexOf("Failed Composite propType: ")&&!t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];g.apply(void 0,[e].concat(r))}}}var m=_,j="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";if("production"!==process.env.NODE_ENV)var O=b,w=m,E=j,P={};var A=function(t,e,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in t)if(t.hasOwnProperty(i)){var a;try{O("function"==typeof t[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",r||"React class",n,i),a=t[i](e,i,r,n,null,E)}catch(t){a=t}if(w(!a||a instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,i,typeof a),a instanceof Error&&!(a.message in P)){P[a.message]=!0;var u=o?o():"";w(!1,"Failed %s type: %s%s",n,a.message,null!=u?u:"")}}},x=function(t,e){function n(t){var e=t&&(h&&t[h]||t[y]);if("function"==typeof e)return e}function r(t,e){return t===e?0!==t||1/t==1/e:t!==t&&e!==e}function o(t){this.message=t,this.stack=""}function i(t){function n(n,a,u,c,s,f,p){if(c=c||v,f=f||u,p!==j)if(e)b(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==process.env.NODE_ENV&&void 0!==console){var l=c+":"+u;!r[l]&&3>i&&(m(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",f,c),r[l]=!0,i++)}return null==a[u]?n?new o(null===a[u]?"The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`.":"The "+s+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:t(a,u,c,s,f)}if("production"!==process.env.NODE_ENV)var r={},i=0;var a=n.bind(null,!1);return a.isRequired=n.bind(null,!0),a}function a(t){return i(function(e,n,r,i,a,u){var c=e[n];return s(c)!==t?new o("Invalid "+i+" `"+a+"` of type `"+f(c)+"` supplied to `"+r+"`, expected `"+t+"`."):null})}function u(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(u);if(null===e||t(e))return!0;var r=n(e);if(!r)return!1;var o,i=r.call(e);if(r!==e.entries){for(;!(o=i.next()).done;)if(!u(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!u(a[1]))return!1}return!0;default:return!1}}function c(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function s(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":c(e,t)?"symbol":e}function f(t){if(void 0===t||null===t)return""+t;var e=s(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function p(t){var e=f(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function l(t){return t.constructor&&t.constructor.name?t.constructor.name:v}var h="function"==typeof Symbol&&Symbol.iterator,y="@@iterator",v="<<anonymous>>",_={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:i(d.thatReturnsNull),arrayOf:function(t){return i(function(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u))return new o("Invalid "+i+" `"+a+"` of type `"+s(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;u.length>c;c++){var f=t(u,c,r,i,a+"["+c+"]",j);if(f instanceof Error)return f}return null})},element:function(){return i(function(e,n,r,i,a){var u=e[n];return t(u)?null:new o("Invalid "+i+" `"+a+"` of type `"+s(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})}(),instanceOf:function(t){return i(function(e,n,r,i,a){if(!(e[n]instanceof t)){var u=t.name||v;return new o("Invalid "+i+" `"+a+"` of type `"+l(e[n])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null})},node:function(){return i(function(t,e,n,r,i){return u(t[e])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})}(),objectOf:function(t){return i(function(e,n,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],c=s(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var f in u)if(u.hasOwnProperty(f)){var p=t(u,f,r,i,a+"."+f,j);if(p instanceof Error)return p}return null})},oneOf:function(t){return Array.isArray(t)?i(function(e,n,i,a,u){for(var c=e[n],s=0;t.length>s;s++)if(r(c,t[s]))return null;return new o("Invalid "+a+" `"+u+"` of value `"+c+"` supplied to `"+i+"`, expected one of "+JSON.stringify(t)+".")}):("production"!==process.env.NODE_ENV&&m(!1,"Invalid argument supplied to oneOf, expected an instance of array."),d.thatReturnsNull)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&m(!1,"Invalid argument supplied to oneOfType, expected an instance of array."),d.thatReturnsNull;for(var e=0;t.length>e;e++){var n=t[e];if("function"!=typeof n)return m(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",p(n),e),d.thatReturnsNull}return i(function(e,n,r,i,a){for(var u=0;t.length>u;u++)if(null==(0,t[u])(e,n,r,i,a,j))return null;return new o("Invalid "+i+" `"+a+"` supplied to `"+r+"`.")})},shape:function(t){return i(function(e,n,r,i,a){var u=e[n],c=s(u);if("object"!==c)return new o("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var f in t){var p=t[f];if(p){var l=p(u,f,r,i,a+"."+f,j);if(l)return l}}return null})}};return o.prototype=Error.prototype,_.checkPropTypes=A,_.PropTypes=_,_},T=function(){function t(t,e,n,r,o,i){i!==j&&b(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=d,n.PropTypes=n,n},S=r(function(t){if("production"!==process.env.NODE_ENV){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=x(function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},!0)}else t.exports=T()}),R=function(t,e){return t===e||t!==t&&e!==e},C=function(t,e){for(var n=t.length;n--;)if(R(t[n][0],e))return n;return-1},D=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=C(e,t);return n>=0&&(n==e.length-1?e.pop():D.call(e,n,1),--this.size,!0)},i.prototype.get=function(t){var e=this.__data__,n=C(e,t);return 0>n?void 0:e[n][1]},i.prototype.has=function(t){return C(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=C(n,t);return 0>r?(++this.size,n.push([t,e])):n[r][1]=e,this};var k=i,N="object"==typeof h&&h&&h.Object===Object&&h,z="object"==typeof self&&self&&self.Object===Object&&self,I=N||z||Function("return this")(),$=I.Symbol,M=Object.prototype,V=M.hasOwnProperty,F=M.toString,B=$?$.toStringTag:void 0,U=function(t){var e=V.call(t,B),n=t[B];try{t[B]=void 0;var r=!0}catch(t){}var o=F.call(t);return r&&(e?t[B]=n:delete t[B]),o},q=Object.prototype.toString,L=function(t){return q.call(t)},K="[object Null]",W="[object Undefined]",Y=$?$.toStringTag:void 0,H=function(t){return null==t?void 0===t?W:K:Y&&Y in Object(t)?U(t):L(t)},G=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},J="[object AsyncFunction]",Q="[object Function]",X="[object GeneratorFunction]",Z="[object Proxy]",tt=function(t){if(!G(t))return!1;var e=H(t);return e==Q||e==X||e==J||e==Z},et=I["__core-js_shared__"],nt=function(){var t=/[^.]+$/.exec(et&&et.keys&&et.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),rt=function(t){return!!nt&&nt in t},ot=Function.prototype.toString,it=function(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""},at=/[\\^$.*+?()[\]{}|]/g,ut=/^\[object .+?Constructor\]$/,ct=Function.prototype,st=Object.prototype,ft=ct.toString,pt=st.hasOwnProperty,lt=RegExp("^"+ft.call(pt).replace(at,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ht=function(t){return!(!G(t)||rt(t))&&(tt(t)?lt:ut).test(it(t))},yt=function(t,e){return null==t?void 0:t[e]},dt=function(t,e){var n=yt(t,e);return ht(n)?n:void 0},vt=dt(I,"Map"),bt=dt(Object,"create"),_t="__lodash_hash_undefined__",gt=Object.prototype.hasOwnProperty,mt=Object.prototype.hasOwnProperty,jt="__lodash_hash_undefined__";a.prototype.clear=function(){this.__data__=bt?bt(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(bt){var n=e[t];return n===_t?void 0:n}return gt.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:mt.call(e,t)},a.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bt&&void 0===e?jt:e,this};var Ot=a,wt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},Et=function(t,e){var n=t.__data__;return wt(e)?n["string"==typeof e?"string":"hash"]:n.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new Ot,map:new(vt||k),string:new Ot}},u.prototype.delete=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e},u.prototype.get=function(t){return Et(this,t).get(t)},u.prototype.has=function(t){return Et(this,t).has(t)},u.prototype.set=function(t,e){var n=Et(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Pt=u,At=200;c.prototype.clear=function(){this.__data__=new k,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!vt||At-1>r.length)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(t,e),this.size=n.size,this};var xt=c,Tt="__lodash_hash_undefined__";s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,Tt),this},s.prototype.has=function(t){return this.__data__.has(t)};var St=s,Rt=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},Ct=function(t,e){return t.has(e)},Dt=1,kt=2,Nt=function(t,e,n,r,o,i){var a=n&Dt,u=t.length,c=e.length;if(!(u==c||a&&c>u))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var f=-1,p=!0,l=n&kt?new St:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],y=e[f];if(r)var d=a?r(y,h,f,e,t,i):r(h,y,f,t,e,i);if(void 0!==d){if(d)continue;p=!1;break}if(l){if(!Rt(e,function(t,e){if(!Ct(l,e)&&(h===t||o(h,t,n,r,i)))return l.push(e)})){p=!1;break}}else if(h!==y&&!o(h,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},zt=I.Uint8Array,It=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},$t=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n},Mt=1,Vt=2,Ft="[object Boolean]",Bt="[object Date]",Ut="[object Error]",qt="[object Map]",Lt="[object Number]",Kt="[object RegExp]",Wt="[object Set]",Yt="[object String]",Ht="[object Symbol]",Gt="[object ArrayBuffer]",Jt="[object DataView]",Qt=$?$.prototype:void 0,Xt=Qt?Qt.valueOf:void 0,Zt=function(t,e,n,r,o,i,a){switch(n){case Jt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Gt:return!(t.byteLength!=e.byteLength||!i(new zt(t),new zt(e)));case Ft:case Bt:case Lt:return R(+t,+e);case Ut:return t.name==e.name&&t.message==e.message;case Kt:case Yt:return t==e+"";case qt:var u=It;case Wt:var c=r&Mt;if(u||(u=$t),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=Vt,a.set(t,e);var f=Nt(u(t),u(e),r,o,i,a);return a.delete(t),f;case Ht:if(Xt)return Xt.call(t)==Xt.call(e)}return!1},te=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},ee=Array.isArray,ne=function(t,e,n){var r=e(t);return ee(t)?r:te(r,n(t))},re=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i},oe=Object.prototype.propertyIsEnumerable,ie=Object.getOwnPropertySymbols,ae=ie?function(t){return null==t?[]:(t=Object(t),re(ie(t),function(e){return oe.call(t,e)}))}:function(){return[]},ue=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},ce=function(t){return null!=t&&"object"==typeof t},se="[object Arguments]",fe=function(t){return ce(t)&&H(t)==se},pe=Object.prototype,le=pe.hasOwnProperty,he=pe.propertyIsEnumerable,ye=fe(function(){return arguments}())?fe:function(t){return ce(t)&&le.call(t,"callee")&&!he.call(t,"callee")},de=function(){return!1},ve=r(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===n?I.Buffer:void 0,i=(o?o.isBuffer:void 0)||de;t.exports=i}),be=9007199254740991,_e=/^(?:0|[1-9]\d*)$/,ge=function(t,e){return!!(e=null==e?be:e)&&("number"==typeof t||_e.test(t))&&t>-1&&t%1==0&&e>t},me=9007199254740991,je=function(t){return"number"==typeof t&&t>-1&&t%1==0&&me>=t},Oe={};Oe["[object Float32Array]"]=Oe["[object Float64Array]"]=Oe["[object Int8Array]"]=Oe["[object Int16Array]"]=Oe["[object Int32Array]"]=Oe["[object Uint8Array]"]=Oe["[object Uint8ClampedArray]"]=Oe["[object Uint16Array]"]=Oe["[object Uint32Array]"]=!0,Oe["[object Arguments]"]=Oe["[object Array]"]=Oe["[object ArrayBuffer]"]=Oe["[object Boolean]"]=Oe["[object DataView]"]=Oe["[object Date]"]=Oe["[object Error]"]=Oe["[object Function]"]=Oe["[object Map]"]=Oe["[object Number]"]=Oe["[object Object]"]=Oe["[object RegExp]"]=Oe["[object Set]"]=Oe["[object String]"]=Oe["[object WeakMap]"]=!1;var we=function(t){return function(e){return t(e)}},Ee=r(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,o=r&&r.exports===n&&N.process,i=function(){try{return o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i}),Pe=Ee&&Ee.isTypedArray,Ae=Pe?we(Pe):function(t){return ce(t)&&je(t.length)&&!!Oe[H(t)]},xe=Object.prototype.hasOwnProperty,Te=function(t,e){var n=ee(t),r=!n&&ye(t),o=!n&&!r&&ve(t),i=!n&&!r&&!o&&Ae(t),a=n||r||o||i,u=a?ue(t.length,String):[],c=u.length;for(var s in t)!e&&!xe.call(t,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||ge(s,c))||u.push(s);return u},Se=Object.prototype,Re=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Se)},Ce=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),De=Object.prototype.hasOwnProperty,ke=function(t){if(!Re(t))return Ce(t);var e=[];for(var n in Object(t))De.call(t,n)&&"constructor"!=n&&e.push(n);return e},Ne=function(t){return null!=t&&je(t.length)&&!tt(t)},ze=function(t){return Ne(t)?Te(t):ke(t)},Ie=function(t){return ne(t,ze,ae)},$e=1,Me=Object.prototype.hasOwnProperty,Ve=function(t,e,n,r,o,i){var a=n&$e,u=Ie(t),c=u.length;if(c!=Ie(e).length&&!a)return!1;for(var s=c;s--;){var f=u[s];if(!(a?f in e:Me.call(e,f)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var l=!0;i.set(t,e),i.set(e,t);for(var h=a;++s<c;){var y=t[f=u[s]],d=e[f];if(r)var v=a?r(d,y,f,e,t,i):r(y,d,f,t,e,i);if(!(void 0===v?y===d||o(y,d,n,r,i):v)){l=!1;break}h||(h="constructor"==f)}if(l&&!h){var b=t.constructor,_=e.constructor;b!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(l=!1)}return i.delete(t),i.delete(e),l},Fe=dt(I,"DataView"),Be=dt(I,"Promise"),Ue=dt(I,"Set"),qe=dt(I,"WeakMap"),Le=it(Fe),Ke=it(vt),We=it(Be),Ye=it(Ue),He=it(qe),Ge=H;(Fe&&"[object DataView]"!=Ge(new Fe(new ArrayBuffer(1)))||vt&&"[object Map]"!=Ge(new vt)||Be&&"[object Promise]"!=Ge(Be.resolve())||Ue&&"[object Set]"!=Ge(new Ue)||qe&&"[object WeakMap]"!=Ge(new qe))&&(Ge=function(t){var e=H(t),n="[object Object]"==e?t.constructor:void 0,r=n?it(n):"";if(r)switch(r){case Le:return"[object DataView]";case Ke:return"[object Map]";case We:return"[object Promise]";case Ye:return"[object Set]";case He:return"[object WeakMap]"}return e});var Je=Ge,Qe=1,Xe="[object Arguments]",Ze="[object Array]",tn="[object Object]",en=Object.prototype.hasOwnProperty,nn=function(t,e,n,r,o,i){var a=ee(t),u=ee(e),c=a?Ze:Je(t),s=u?Ze:Je(e),f=(c=c==Xe?tn:c)==tn,p=(s=s==Xe?tn:s)==tn,l=c==s;if(l&&ve(t)){if(!ve(e))return!1;a=!0,f=!1}if(l&&!f)return i||(i=new xt),a||Ae(t)?Nt(t,e,n,r,o,i):Zt(t,e,c,n,r,o,i);if(!(n&Qe)){var h=f&&en.call(t,"__wrapped__"),y=p&&en.call(e,"__wrapped__");if(h||y){var d=h?t.value():t,v=y?e.value():e;return i||(i=new xt),o(d,v,n,r,i)}}return!!l&&(i||(i=new xt),Ve(t,e,n,r,o,i))},rn=f,on=function(t,e){return rn(t,e)},an=1,un=2,cn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=Object(t);o--;){var u=n[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var c=(u=n[o])[0],s=t[c],f=u[1];if(a&&u[2]){if(void 0===s&&!(c in t))return!1}else{var p=new xt;if(r)var l=r(s,f,c,t,e,p);if(!(void 0===l?rn(f,s,an|un,r,p):l))return!1}}return!0},sn=function(t){return t===t&&!G(t)},fn=function(t){for(var e=ze(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,sn(o)]}return e},pn=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},ln=function(t){var e=fn(t);return 1==e.length&&e[0][2]?pn(e[0][0],e[0][1]):function(n){return n===t||cn(n,t,e)}},hn="[object Symbol]",yn=function(t){return"symbol"==typeof t||ce(t)&&H(t)==hn},dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vn=/^\w*$/,bn=function(t,e){if(ee(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!yn(t))||vn.test(t)||!dn.test(t)||null!=e&&t in Object(e)},_n="Expected a function";p.Cache=Pt;var gn=p,mn=500,jn=/^\./,On=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wn=/\\(\\)?/g,En=function(t){var e=gn(t,function(t){return n.size===mn&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return jn.test(t)&&e.push(""),t.replace(On,function(t,n,r,o){e.push(r?o.replace(wn,"$1"):n||t)}),e}),Pn=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},An=1/0,xn=$?$.prototype:void 0,Tn=xn?xn.toString:void 0,Sn=l,Rn=function(t){return null==t?"":Sn(t)},Cn=function(t,e){return ee(t)?t:bn(t,e)?[t]:En(Rn(t))},Dn=1/0,kn=function(t){if("string"==typeof t||yn(t))return t;var e=t+"";return"0"==e&&1/t==-Dn?"-0":e},Nn=function(t,e){for(var n=0,r=(e=Cn(e,t)).length;null!=t&&r>n;)t=t[kn(e[n++])];return n&&n==r?t:void 0},zn=function(t,e,n){var r=null==t?void 0:Nn(t,e);return void 0===r?n:r},In=function(t,e){return null!=t&&e in Object(t)},$n=function(t,e,n){for(var r=-1,o=(e=Cn(e,t)).length,i=!1;++r<o;){var a=kn(e[r]);if(!(i=null!=t&&n(t,a)))break;t=t[a]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&je(o)&&ge(a,o)&&(ee(t)||ye(t))},Mn=function(t,e){return null!=t&&$n(t,e,In)},Vn=1,Fn=2,Bn=function(t,e){return bn(t)&&sn(e)?pn(kn(t),e):function(n){var r=zn(n,t);return void 0===r&&r===e?Mn(n,t):rn(e,r,Vn|Fn)}},Un=function(t){return t},qn=function(t){return function(e){return null==e?void 0:e[t]}},Ln=function(t){return function(e){return Nn(e,t)}},Kn=function(t){return bn(t)?qn(kn(t)):Ln(t)},Wn=function(t){return"function"==typeof t?t:null==t?Un:"object"==typeof t?ee(t)?Bn(t[0],t[1]):ln(t):Kn(t)},Yn=function(t){return function(e,n,r){var o=Object(e);if(!Ne(e)){var i=Wn(n,3);e=ze(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:void 0}},Hn=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},Gn=NaN,Jn=/^\s+|\s+$/g,Qn=/^[-+]0x[0-9a-f]+$/i,Xn=/^0b[01]+$/i,Zn=/^0o[0-7]+$/i,tr=parseInt,er=function(t){if("number"==typeof t)return t;if(yn(t))return Gn;if(G(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=G(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jn,"");var n=Xn.test(t);return n||Zn.test(t)?tr(t.slice(2),n?2:8):Qn.test(t)?Gn:+t},nr=1/0,rr=1.7976931348623157e308,or=function(t){return t?(t=er(t))===nr||t===-nr?(0>t?-1:1)*rr:t===t?t:0:0===t?t:0},ir=function(t){var e=or(t),n=e%1;return e===e?n?e-n:e:0},ar=Math.max,ur=Yn(function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ir(n);return 0>o&&(o=ar(r+o,0)),Hn(t,Wn(e,3),o)}),cr=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},sr=Object.assign||function(t){for(var e=1;arguments.length>e;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fr=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},pr=function(t,e){var n={};for(var r in t)0>e.indexOf(r)&&Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},lr=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},hr=function(t){function r(){var e,n,o;cr(this,r);for(var i=arguments.length,a=Array(i),u=0;i>u;u++)a[u]=arguments[u];return e=n=lr(this,t.call.apply(t,[this].concat(a))),n.handleOnClick=function(t){var e=n.chart_instance,r=n.props,o=r.getDatasetAtEvent,i=r.getElementAtEvent,a=r.getElementsAtEvent,u=r.onElementsClick;o&&o(e.getDatasetAtEvent(t),t),i&&i(e.getElementAtEvent(t),t),a&&a(e.getElementsAtEvent(t),t),u&&u(e.getElementsAtEvent(t),t)},n.ref=function(t){n.element=t},o=e,lr(n,o)}return fr(r,t),r.prototype.componentWillMount=function(){this.chart_instance=void 0},r.prototype.componentDidMount=function(){this.renderChart()},r.prototype.componentDidUpdate=function(){if(this.props.redraw)return this.chart_instance.destroy(),void this.renderChart();this.updateChart()},r.prototype.shouldComponentUpdate=function(t){var e=this.props,n=e.type,r=e.options,o=e.plugins,i=e.legend,a=e.height,u=e.width;if(!0===t.redraw)return!0;if(a!==t.height||u!==t.width)return!0;if(n!==t.type)return!0;if(!on(i,t.legend))return!0;if(!on(r,t.options))return!0;var c=this.transformDataProp(t);return!on(this.shadowDataProp,c)||!on(o,t.plugins)},r.prototype.componentWillUnmount=function(){this.chart_instance.destroy()},r.prototype.transformDataProp=function(t){var e=t.data;return"function"==typeof e?e(this.element):e},r.prototype.memoizeDataProps=function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=sr({},t,{datasets:t.datasets&&t.datasets.map(function(t){return sr({},t)})}),t}},r.prototype.updateChart=function(){var t=this,e=this.props.options,r=this.memoizeDataProps(this.props);if(this.chart_instance){e&&(this.chart_instance.options=n.helpers.configMerge(this.chart_instance.options,e));for(var o=this.chart_instance.config.data&&this.chart_instance.config.data.datasets||[],i=r.datasets||[],a=o.map(this.props.datasetKeyProvider),u=i.map(this.props.datasetKeyProvider),c=i.filter(function(e){return-1===a.indexOf(t.props.datasetKeyProvider(e))}),s=o.length-1;s>=0;s-=1)!function(e){var n=t.props.datasetKeyProvider(o[e]);if(-1===u.indexOf(n))o.splice(e,1);else{var r=ur(i,function(e){return t.props.datasetKeyProvider(e)===n});if(r){o[e].data.splice(r.data.length),r.data.forEach(function(t,n){o[e].data[n]=r.data[n]});var a=pr(r,["data"]);o[e]=sr({data:o[e].data},o[e],a)}}}(s);c.forEach(function(t){return o.push(t)});var f=pr(r,["datasets"]);this.chart_instance.config.data=sr({},this.chart_instance.config.data,f),this.chart_instance.update()}},r.prototype.renderChart=function(){var t=this.props,e=t.options,o=t.legend,i=t.type,a=t.plugins,u=this.element,c=this.memoizeDataProps();void 0===o||on(r.defaultProps.legend,o)||(e.legend=o),this.chart_instance=new n(u,{type:i,data:c,options:e,plugins:a})},r.prototype.render=function(){var t=this.props,n=t.height,r=t.width;return e.createElement("canvas",{ref:this.ref,height:n,width:r,onClick:this.handleOnClick})},r}(e.Component);hr.getLabelAsKey=function(t){return t.label},hr.propTypes={data:S.oneOfType([S.object,S.func]).isRequired,getDatasetAtEvent:S.func,getElementAtEvent:S.func,getElementsAtEvent:S.func,height:S.number,legend:S.object,onElementsClick:S.func,options:S.object,plugins:S.arrayOf(S.object),redraw:S.bool,type:function(t,e,r){if(!n.controllers[t[e]])return Error("Invalid chart type `"+t[e]+"` supplied to `"+r+"`.")},width:S.number,datasetKeyProvider:S.func},hr.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:hr.getLabelAsKey};var yr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"doughnut"}))},n}(e.Component),dr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"pie"}))},n}(e.Component),vr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"line"}))},n}(e.Component),br=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bar"}))},n}(e.Component),_r=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"horizontalBar"}))},n}(e.Component),gr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"radar"}))},n}(e.Component),mr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"polarArea"}))},n}(e.Component),jr=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bubble"}))},n}(e.Component),Or=function(t){function n(){return cr(this,n),lr(this,t.apply(this,arguments))}return fr(n,t),n.prototype.render=function(){var t=this;return e.createElement(hr,sr({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"scatter"}))},n}(e.Component),wr=n.defaults;t.default=hr,t.Doughnut=yr,t.Pie=dr,t.Line=vr,t.Bar=br,t.HorizontalBar=_r,t.Radar=gr,t.Polar=mr,t.Bubble=jr,t.Scatter=Or,t.defaults=wr,t.Chart=n,Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -14,4 +14,4 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import Chart from 'chart.js'; | ||
import isEqual from 'lodash.isequal'; | ||
import find from 'lodash.find'; | ||
import isEqual from 'lodash/isEqual'; | ||
import find from 'lodash/find'; | ||
@@ -18,0 +18,0 @@ var ChartComponent = function (_React$Component) { |
@@ -20,9 +20,9 @@ 'use strict'; | ||
var _lodash = require('lodash.isequal'); | ||
var _isEqual = require('lodash/isEqual'); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
var _isEqual2 = _interopRequireDefault(_isEqual); | ||
var _lodash3 = require('lodash.find'); | ||
var _find = require('lodash/find'); | ||
var _lodash4 = _interopRequireDefault(_lodash3); | ||
var _find2 = _interopRequireDefault(_find); | ||
@@ -111,7 +111,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
if (!(0, _lodash2.default)(legend, nextProps.legend)) { | ||
if (!(0, _isEqual2.default)(legend, nextProps.legend)) { | ||
return true; | ||
} | ||
if (!(0, _lodash2.default)(options, nextProps.options)) { | ||
if (!(0, _isEqual2.default)(options, nextProps.options)) { | ||
return true; | ||
@@ -122,7 +122,7 @@ } | ||
if (!(0, _lodash2.default)(this.shadowDataProp, nextData)) { | ||
if (!(0, _isEqual2.default)(this.shadowDataProp, nextData)) { | ||
return true; | ||
} | ||
return !(0, _lodash2.default)(plugins, nextProps.plugins); | ||
return !(0, _isEqual2.default)(plugins, nextProps.plugins); | ||
}; | ||
@@ -201,3 +201,3 @@ | ||
} else { | ||
var retainedDataset = (0, _lodash4.default)(nextDatasets, function (d) { | ||
var retainedDataset = (0, _find2.default)(nextDatasets, function (d) { | ||
return _this2.props.datasetKeyProvider(d) === currentDatasetKey; | ||
@@ -249,3 +249,3 @@ }); | ||
if (typeof legend !== 'undefined' && !(0, _lodash2.default)(ChartComponent.defaultProps.legend, legend)) { | ||
if (typeof legend !== 'undefined' && !(0, _isEqual2.default)(ChartComponent.defaultProps.legend, legend)) { | ||
options.legend = legend; | ||
@@ -252,0 +252,0 @@ } |
{ | ||
"name": "react-chartjs-2", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "react-chartjs-2", | ||
@@ -18,4 +18,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"lodash.find": "^4.6.0", | ||
"lodash.isequal": "^4.4.0", | ||
"lodash": "^4.17.4", | ||
"prop-types": "^15.5.8" | ||
@@ -22,0 +21,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
5
3
1905753
42684
+ Addedlodash@^4.17.4
+ Addedlodash@4.17.21(transitive)
- Removedlodash.find@^4.6.0
- Removedlodash.isequal@^4.4.0
- Removedlodash.find@4.6.0(transitive)
- Removedlodash.isequal@4.5.0(transitive)