Socket
Socket
Sign inDemoInstall

react-chartjs-2

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-chartjs-2 - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

196

.publish/example.js

@@ -198,3 +198,3 @@ require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"rcolor":15,"react":undefined,"react-chartjs-2":undefined}],4:[function(require,module,exports){
},{"rcolor":17,"react":undefined,"react-chartjs-2":undefined}],4:[function(require,module,exports){
'use strict';

@@ -358,2 +358,164 @@

var data = {
labels: ['Red', 'Green', 'Yellow'],
datasets: [{
data: [300, 50, 100],
backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
}]
};
var legendOpts = {
onClick: function onClick(e, item) {
return alert('Item with text ' + item.text + ' and index ' + item.index + ' clicked');
},
onHover: function onHover(e, item) {
return alert('Item with text ' + item.text + ' and index ' + item.index + ' hovered');
}
};
exports.default = _react2.default.createClass({
displayName: 'LegendExample',
getInitialState: function getInitialState() {
return {
legend: legendOpts
};
},
applyLegendSettings: function applyLegendSettings() {
var value = this.legendOptsInput.value;
try {
var opts = JSON.parse(value);
this.setState({
legend: opts
});
} catch (e) {
alert(e.message);
throw Error(e);
}
},
render: function render() {
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'h2',
null,
'Legend Handlers Example'
),
_react2.default.createElement(
'p',
null,
'Hover over label and click'
),
_react2.default.createElement(_reactChartjs.Pie, { data: data, legend: this.state.legend })
);
}
});
},{"react":undefined,"react-chartjs-2":undefined}],8:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _reactChartjs = require('react-chartjs-2');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var data = {
labels: ['Red', 'Green', 'Yellow'],
datasets: [{
data: [300, 50, 100],
backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
}]
};
var legendOpts = {
display: true,
position: 'top',
fullWidth: true,
reverse: false,
labels: {
fontColor: 'rgb(255, 99, 132)'
}
};
exports.default = _react2.default.createClass({
displayName: 'LegendExample',
getInitialState: function getInitialState() {
return {
legend: legendOpts
};
},
applyLegendSettings: function applyLegendSettings() {
var value = this.legendOptsInput.value;
try {
var opts = JSON.parse(value);
this.setState({
legend: opts
});
} catch (e) {
alert(e.message);
throw Error(e);
}
},
render: function render() {
var _this = this;
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'h2',
null,
'Legend Options Example'
),
_react2.default.createElement('textarea', {
cols: '40',
rows: '15',
ref: function ref(input) {
_this.legendOptsInput = input;
},
defaultValue: JSON.stringify(this.state.legend, null, 2) }),
_react2.default.createElement(
'div',
null,
_react2.default.createElement(
'button',
{ onClick: this.applyLegendSettings },
'Apply legend settings'
)
),
_react2.default.createElement(_reactChartjs.Pie, { data: data, legend: this.state.legend, redraw: true })
);
}
});
},{"react":undefined,"react-chartjs-2":undefined}],9:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _reactChartjs = require('react-chartjs-2');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var data = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],

@@ -400,3 +562,3 @@ datasets: [{

},{"react":undefined,"react-chartjs-2":undefined}],8:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],10:[function(require,module,exports){
'use strict';

@@ -517,3 +679,3 @@

},{"react":undefined,"react-chartjs-2":undefined}],9:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],11:[function(require,module,exports){
'use strict';

@@ -559,3 +721,3 @@

},{"react":undefined,"react-chartjs-2":undefined}],10:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],12:[function(require,module,exports){
'use strict';

@@ -601,3 +763,3 @@

},{"react":undefined,"react-chartjs-2":undefined}],11:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],13:[function(require,module,exports){
'use strict';

@@ -657,3 +819,3 @@

},{"react":undefined,"react-chartjs-2":undefined}],12:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],14:[function(require,module,exports){
'use strict';

@@ -750,3 +912,3 @@

},{"react":undefined,"react-chartjs-2":undefined}],13:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],15:[function(require,module,exports){
'use strict';

@@ -802,3 +964,3 @@

},{"react":undefined,"react-chartjs-2":undefined}],14:[function(require,module,exports){
},{"react":undefined,"react-chartjs-2":undefined}],16:[function(require,module,exports){
'use strict';

@@ -868,2 +1030,10 @@

var _legendOptions = require('./components/legend-options');
var _legendOptions2 = _interopRequireDefault(_legendOptions);
var _legendHandlers = require('./components/legend-handlers');
var _legendHandlers2 = _interopRequireDefault(_legendHandlers);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -917,3 +1087,7 @@

_react2.default.createElement('hr', null),
_react2.default.createElement(_crazyLine2.default, null)
_react2.default.createElement(_crazyLine2.default, null),
_react2.default.createElement('hr', null),
_react2.default.createElement(_legendOptions2.default, null),
_react2.default.createElement('hr', null),
_react2.default.createElement(_legendHandlers2.default, null)
);

@@ -928,3 +1102,3 @@ }

},{"./components/bar":1,"./components/bubble":2,"./components/crazyLine":3,"./components/doughnut":4,"./components/dynamic-doughnut":5,"./components/horizontalBar":6,"./components/line":7,"./components/mix":8,"./components/pie":9,"./components/polar":10,"./components/radar":11,"./components/randomizedLine":12,"./components/scatter":13,"react":undefined,"react-dom":undefined}],15:[function(require,module,exports){
},{"./components/bar":1,"./components/bubble":2,"./components/crazyLine":3,"./components/doughnut":4,"./components/dynamic-doughnut":5,"./components/horizontalBar":6,"./components/legend-handlers":7,"./components/legend-options":8,"./components/line":9,"./components/mix":10,"./components/pie":11,"./components/polar":12,"./components/radar":13,"./components/randomizedLine":14,"./components/scatter":15,"react":undefined,"react-dom":undefined}],17:[function(require,module,exports){
module.exports =

@@ -1100,2 +1274,2 @@ /******/ (function(modules) { // webpackBootstrap

/******/ ]);
},{}]},{},[14]);
},{}]},{},[16]);

2

dist/react-chartjs-2.min.js

@@ -1,1 +0,1 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.reactChartjs2=t()}}(function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var s=n[a]={exports:{}};e[a][0].call(s.exports,function(t){var n=e[a][1][t];return o(n?n:t)},s,s.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},e.exports=o},{}],2:[function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,c){if(o(e),!t){var f;if(void 0===e)f=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,i,a,u,c],l=0;f=new Error(e.replace(/%s/g,function(){return s[l++]})),f.name="Invariant Violation"}throw f.framesToPop=1,f}}var o=function(t){};e.exports=r},{}],3:[function(t,e,n){"use strict";var r=t("./emptyFunction"),o=r;e.exports=o},{"./emptyFunction":1}],4:[function(t,e,n){(function(t){function r(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}function o(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function i(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function a(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function u(t){return function(e){return t(e)}}function c(t,e){return t.has(e)}function f(t,e){return null==t?void 0:t[e]}function s(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function l(t,e){return function(n){return t(e(n))}}function p(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function d(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 h(){this.__data__=Ue?Ue(null):{},this.size=0}function y(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function v(t){var e=this.__data__;if(Ue){var n=e[t];return n===mt?void 0:n}return ge.call(e,t)?e[t]:void 0}function _(t){var e=this.__data__;return Ue?void 0!==e[t]:ge.call(e,t)}function b(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ue&&void 0===e?mt:e,this}function g(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 m(){this.__data__=[],this.size=0}function j(t){var e=this.__data__,n=N(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Ae.call(e,n,1),--this.size,!0}function w(t){var e=this.__data__,n=N(e,t);return n<0?void 0:e[n][1]}function O(t){return N(this.__data__,t)>-1}function P(t,e){var n=this.__data__,r=N(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function E(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 k(){this.size=0,this.__data__={hash:new d,map:new(ze||g),string:new d}}function A(t){var e=tt(this,t)["delete"](t);return this.size-=e?1:0,e}function T(t){return tt(this,t).get(t)}function x(t){return tt(this,t).has(t)}function R(t,e){var n=tt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function C(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new E;++e<n;)this.add(t[e])}function S(t){return this.__data__.set(t,mt),this}function z(t){return this.__data__.has(t)}function D(t){var e=this.__data__=new g(t);this.size=e.size}function I(){this.__data__=new g,this.size=0}function F(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function U(t){return this.__data__.get(t)}function B(t){return this.__data__.has(t)}function M(t,e){var n=this.__data__;if(n instanceof g){var r=n.__data__;if(!ze||r.length<gt-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new E(r)}return n.set(t,e),this.size=n.size,this}function L(t,e){var n=Ge(t),r=!n&&Ve(t),o=!n&&!r&&Je(t),i=!n&&!r&&!o&&Ye(t),u=n||r||o||i,c=u?a(t.length,String):[],f=c.length;for(var s in t)!e&&!ge.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||rt(s,f))||c.push(s);return c}function N(t,e){for(var n=t.length;n--;)if(ft(t[n][0],e))return n;return-1}function q(t,e,n){var r=e(t);return Ge(t)?r:o(r,n(t))}function K(t){return null==t?void 0===t?qt:Dt:Te&&Te in Object(t)?nt(t):ut(t)}function W(t){return yt(t)&&K(t)==Pt}function $(t,e,n,r,o){return t===e||(null==t||null==e||!yt(t)&&!yt(e)?t!==t&&e!==e:H(t,e,n,r,$,o))}function H(t,e,n,r,o,i){var a=Ge(t),u=Ge(e),c=a?Et:He(t),f=u?Et:He(e);c=c==Pt?It:c,f=f==Pt?It:f;var s=c==It,l=f==It,p=c==f;if(p&&Je(t)){if(!Je(e))return!1;a=!0,s=!1}if(p&&!s)return i||(i=new D),a||Ye(t)?Y(t,e,n,r,o,i):Q(t,e,c,n,r,o,i);if(!(n&jt)){var d=s&&ge.call(t,"__wrapped__"),h=l&&ge.call(e,"__wrapped__");if(d||h){var y=d?t.value():t,v=h?e.value():e;return i||(i=new D),o(y,v,n,r,i)}}return!!p&&(i||(i=new D),X(t,e,n,r,o,i))}function V(t){if(!ht(t)||it(t))return!1;var e=pt(t)?we:ne;return e.test(ct(t))}function G(t){return yt(t)&&dt(t.length)&&!!oe[K(t)]}function J(t){if(!at(t))return Ce(t);var e=[];for(var n in Object(t))ge.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Y(t,e,n,r,o,a){var u=n&jt,f=t.length,s=e.length;if(f!=s&&!(u&&s>f))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var p=-1,d=!0,h=n&wt?new C:void 0;for(a.set(t,e),a.set(e,t);++p<f;){var y=t[p],v=e[p];if(r)var _=u?r(v,y,p,e,t,a):r(y,v,p,t,e,a);if(void 0!==_){if(_)continue;d=!1;break}if(h){if(!i(e,function(t,e){if(!c(h,e)&&(y===t||o(y,t,n,r,a)))return h.push(e)})){d=!1;break}}else if(y!==v&&!o(y,v,n,r,a)){d=!1;break}}return a["delete"](t),a["delete"](e),d}function Q(t,e,n,r,o,i,a){switch(n){case $t:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Wt:return!(t.byteLength!=e.byteLength||!i(new Ee(t),new Ee(e)));case At:case Tt:case zt:return ft(+t,+e);case xt:return t.name==e.name&&t.message==e.message;case Bt:case Lt:return t==e+"";case St:var u=s;case Mt:var c=r&jt;if(u||(u=p),t.size!=e.size&&!c)return!1;var f=a.get(t);if(f)return f==e;r|=wt,a.set(t,e);var l=Y(u(t),u(e),r,o,i,a);return a["delete"](t),l;case Nt:if(We)return We.call(t)==We.call(e)}return!1}function X(t,e,n,r,o,i){var a=n&jt,u=Z(t),c=u.length,f=Z(e),s=f.length;if(c!=s&&!a)return!1;for(var l=c;l--;){var p=u[l];if(!(a?p in e:ge.call(e,p)))return!1}var d=i.get(t);if(d&&i.get(e))return d==e;var h=!0;i.set(t,e),i.set(e,t);for(var y=a;++l<c;){p=u[l];var v=t[p],_=e[p];if(r)var b=a?r(_,v,p,e,t,i):r(v,_,p,t,e,i);if(!(void 0===b?v===_||o(v,_,n,r,i):b)){h=!1;break}y||(y="constructor"==p)}if(h&&!y){var g=t.constructor,m=e.constructor;g!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m)&&(h=!1)}return i["delete"](t),i["delete"](e),h}function Z(t){return q(t,vt,$e)}function tt(t,e){var n=t.__data__;return ot(e)?n["string"==typeof e?"string":"hash"]:n.map}function et(t,e){var n=f(t,e);return V(n)?n:void 0}function nt(t){var e=ge.call(t,Te),n=t[Te];try{t[Te]=void 0;var r=!0}catch(o){}var i=je.call(t);return r&&(e?t[Te]=n:delete t[Te]),i}function rt(t,e){return e=null==e?Ot:e,!!e&&("number"==typeof t||re.test(t))&&t>-1&&t%1==0&&t<e}function ot(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function it(t){return!!me&&me in t}function at(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||ve;return t===n}function ut(t){return je.call(t)}function ct(t){if(null!=t){try{return be.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function ft(t,e){return t===e||t!==t&&e!==e}function st(t){return null!=t&&dt(t.length)&&!pt(t)}function lt(t,e){return $(t,e)}function pt(t){if(!ht(t))return!1;var e=K(t);return e==Rt||e==Ct||e==kt||e==Ut}function dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Ot}function ht(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function yt(t){return null!=t&&"object"==typeof t}function vt(t){return st(t)?L(t):J(t)}function _t(){return[]}function bt(){return!1}var gt=200,mt="__lodash_hash_undefined__",jt=1,wt=2,Ot=9007199254740991,Pt="[object Arguments]",Et="[object Array]",kt="[object AsyncFunction]",At="[object Boolean]",Tt="[object Date]",xt="[object Error]",Rt="[object Function]",Ct="[object GeneratorFunction]",St="[object Map]",zt="[object Number]",Dt="[object Null]",It="[object Object]",Ft="[object Promise]",Ut="[object Proxy]",Bt="[object RegExp]",Mt="[object Set]",Lt="[object String]",Nt="[object Symbol]",qt="[object Undefined]",Kt="[object WeakMap]",Wt="[object ArrayBuffer]",$t="[object DataView]",Ht="[object Float32Array]",Vt="[object Float64Array]",Gt="[object Int8Array]",Jt="[object Int16Array]",Yt="[object Int32Array]",Qt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",Zt="[object Uint16Array]",te="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,oe={};oe[Ht]=oe[Vt]=oe[Gt]=oe[Jt]=oe[Yt]=oe[Qt]=oe[Xt]=oe[Zt]=oe[te]=!0,oe[Pt]=oe[Et]=oe[Wt]=oe[At]=oe[$t]=oe[Tt]=oe[xt]=oe[Rt]=oe[St]=oe[zt]=oe[It]=oe[Bt]=oe[Mt]=oe[Lt]=oe[Kt]=!1;var ie="object"==typeof t&&t&&t.Object===Object&&t,ae="object"==typeof self&&self&&self.Object===Object&&self,ue=ie||ae||Function("return this")(),ce="object"==typeof n&&n&&!n.nodeType&&n,fe=ce&&"object"==typeof e&&e&&!e.nodeType&&e,se=fe&&fe.exports===ce,le=se&&ie.process,pe=function(){try{return le&&le.binding&&le.binding("util")}catch(t){}}(),de=pe&&pe.isTypedArray,he=Array.prototype,ye=Function.prototype,ve=Object.prototype,_e=ue["__core-js_shared__"],be=ye.toString,ge=ve.hasOwnProperty,me=function(){var t=/[^.]+$/.exec(_e&&_e.keys&&_e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),je=ve.toString,we=RegExp("^"+be.call(ge).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=se?ue.Buffer:void 0,Pe=ue.Symbol,Ee=ue.Uint8Array,ke=ve.propertyIsEnumerable,Ae=he.splice,Te=Pe?Pe.toStringTag:void 0,xe=Object.getOwnPropertySymbols,Re=Oe?Oe.isBuffer:void 0,Ce=l(Object.keys,Object),Se=et(ue,"DataView"),ze=et(ue,"Map"),De=et(ue,"Promise"),Ie=et(ue,"Set"),Fe=et(ue,"WeakMap"),Ue=et(Object,"create"),Be=ct(Se),Me=ct(ze),Le=ct(De),Ne=ct(Ie),qe=ct(Fe),Ke=Pe?Pe.prototype:void 0,We=Ke?Ke.valueOf:void 0;d.prototype.clear=h,d.prototype["delete"]=y,d.prototype.get=v,d.prototype.has=_,d.prototype.set=b,g.prototype.clear=m,g.prototype["delete"]=j,g.prototype.get=w,g.prototype.has=O,g.prototype.set=P,E.prototype.clear=k,E.prototype["delete"]=A,E.prototype.get=T,E.prototype.has=x,E.prototype.set=R,C.prototype.add=C.prototype.push=S,C.prototype.has=z,D.prototype.clear=I,D.prototype["delete"]=F,D.prototype.get=U,D.prototype.has=B,D.prototype.set=M;var $e=xe?function(t){return null==t?[]:(t=Object(t),r(xe(t),function(e){return ke.call(t,e)}))}:_t,He=K;(Se&&He(new Se(new ArrayBuffer(1)))!=$t||ze&&He(new ze)!=St||De&&He(De.resolve())!=Ft||Ie&&He(new Ie)!=Mt||Fe&&He(new Fe)!=Kt)&&(He=function(t){var e=K(t),n=e==It?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case Be:return $t;case Me:return St;case Le:return Ft;case Ne:return Mt;case qe:return Kt}return e});var Ve=W(function(){return arguments}())?W:function(t){return yt(t)&&ge.call(t,"callee")&&!ke.call(t,"callee")},Ge=Array.isArray,Je=Re||bt,Ye=de?u(de):G;e.exports=lt}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e,n){"use strict";function r(t,e,n,r,o){}e.exports=r},{"./lib/ReactPropTypesSecret":9,"fbjs/lib/invariant":2,"fbjs/lib/warning":3}],6:[function(t,e,n){"use strict";var r=t("fbjs/lib/emptyFunction"),o=t("fbjs/lib/invariant"),i=t("./lib/ReactPropTypesSecret");e.exports=function(){function t(t,e,n,r,a,u){u!==i&&o(!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=r,n.PropTypes=n,n}},{"./lib/ReactPropTypesSecret":9,"fbjs/lib/emptyFunction":1,"fbjs/lib/invariant":2}],7:[function(t,e,n){"use strict";var r=t("fbjs/lib/emptyFunction"),o=t("fbjs/lib/invariant"),i=t("fbjs/lib/warning"),a=t("./lib/ReactPropTypesSecret"),u=t("./checkPropTypes");e.exports=function(t,e){function n(t){var e=t&&(A&&t[A]||t[T]);if("function"==typeof e)return e}function c(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function f(t){this.message=t,this.stack=""}function s(t){function n(n,r,i,u,c,s,l){if(u=u||x,s=s||i,l!==a)if(e)o(!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;return null==r[i]?n?new f(null===r[i]?"The "+c+" `"+s+"` is marked as required "+("in `"+u+"`, but its value is `null`."):"The "+c+" `"+s+"` is marked as required in "+("`"+u+"`, but its value is `undefined`.")):null:t(r,i,u,c,s)}var r=n.bind(null,!1);return r.isRequired=n.bind(null,!0),r}function l(t){function e(e,n,r,o,i,a){var u=e[n],c=O(u);if(c!==t){var s=P(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+t+"`."))}return null}return s(e)}function p(){return s(r.thatReturnsNull)}function d(t){function e(e,n,r,o,i){if("function"!=typeof t)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u)){var c=O(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var s=0;s<u.length;s++){var l=t(u,s,r,o,i+"["+s+"]",a);if(l instanceof Error)return l}return null}return s(e)}function h(){function e(e,n,r,o,i){var a=e[n];if(!t(a)){var u=O(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return s(e)}function y(t){function e(e,n,r,o,i){if(!(e[n]instanceof t)){var a=t.name||x,u=k(e[n]);return new f("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return s(e)}function v(t){function e(e,n,r,o,i){for(var a=e[n],u=0;u<t.length;u++)if(c(a,t[u]))return null;var s=JSON.stringify(t);return new f("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return Array.isArray(t)?s(e):r.thatReturnsNull}function _(t){function e(e,n,r,o,i){if("function"!=typeof t)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],c=O(u);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an object."));for(var s in u)if(u.hasOwnProperty(s)){var l=t(u,s,r,o,i+"."+s,a);if(l instanceof Error)return l}return null}return s(e)}function b(t){function e(e,n,r,o,i){for(var u=0;u<t.length;u++){var c=t[u];if(null==c(e,n,r,o,i,a))return null}return new f("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(t))return r.thatReturnsNull;for(var n=0;n<t.length;n++){var o=t[n];if("function"!=typeof o)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",E(o),n),r.thatReturnsNull}return s(e)}function g(){function t(t,e,n,r,o){return j(t[e])?null:new f("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return s(t)}function m(t){function e(e,n,r,o,i){var u=e[n],c=O(u);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var s in t){var l=t[s];if(l){var p=l(u,s,r,o,i+"."+s,a);if(p)return p}}return null}return s(e)}function j(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(j);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(!j(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!j(a[1]))return!1}return!0;default:return!1}}function w(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function O(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":w(e,t)?"symbol":e}function P(t){if("undefined"==typeof t||null===t)return""+t;var e=O(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function E(t){var e=P(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function k(t){return t.constructor&&t.constructor.name?t.constructor.name:x}var A="function"==typeof Symbol&&Symbol.iterator,T="@@iterator",x="<<anonymous>>",R={array:l("array"),bool:l("boolean"),func:l("function"),number:l("number"),object:l("object"),string:l("string"),symbol:l("symbol"),any:p(),arrayOf:d,element:h(),instanceOf:y,node:g(),objectOf:_,oneOf:v,oneOfType:b,shape:m};return f.prototype=Error.prototype,R.checkPropTypes=u,R.PropTypes=R,R}},{"./checkPropTypes":5,"./lib/ReactPropTypesSecret":9,"fbjs/lib/emptyFunction":1,"fbjs/lib/invariant":2,"fbjs/lib/warning":3}],8:[function(t,e,n){e.exports=t("./factoryWithThrowingShims")()},{"./factoryWithThrowingShims":6,"./factoryWithTypeCheckers":7}],9:[function(t,e,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},{}],10:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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}function u(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)}Object.defineProperty(n,"__esModule",{value:!0}),n.Chart=n.defaults=n.Scatter=n.Bubble=n.Polar=n.Radar=n.HorizontalBar=n.Bar=n.Line=n.Pie=n.Doughnut=void 0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,l=r(s),p=t("prop-types"),d=r(p),h="undefined"!=typeof window?window.ReactDOM:"undefined"!=typeof e?e.ReactDOM:null,y=(r(h),"undefined"!=typeof window?window.Chart:"undefined"!=typeof e?e.Chart:null),v=r(y),_=t("lodash.isequal"),b=r(_),g=function(t){function e(){var t,n,r,o;i(this,e);for(var u=arguments.length,c=Array(u),f=0;f<u;f++)c[f]=arguments[f];return n=r=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(c))),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=n,a(r,o)}return u(e,t),f(e,[{key:"componentWillMount",value:function(){this.chart_instance=void 0}},{key:"componentDidMount",value:function(){this.renderChart()}},{key:"componentDidUpdate",value:function(){return this.props.redraw?(this.chart_instance.destroy(),void this.renderChart()):void this.updateChart()}},{key:"shouldComponentUpdate",value:function(t){var e=this.props,n=(e.redraw,e.type),r=e.options,o=e.plugins,i=e.legend,a=e.height,u=e.width;if(t.redraw===!0)return!0;if(a!==t.height||u!==t.width)return!0;if(n!==t.type)return!0;if(!(0,b["default"])(i,t.legend))return!0;if(!(0,b["default"])(r,t.options))return!0;var c=this.transformDataProp(t);return!(0,b["default"])(this.shadowDataProp,c)||!(0,b["default"])(o,t.plugins)}},{key:"componentWillUnmount",value:function(){this.chart_instance.destroy()}},{key:"transformDataProp",value:function(t){var e=t.data;if("function"==typeof e){var n=this.element;return e(n)}return e}},{key:"memoizeDataProps",value:function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=c({},t,{datasets:t.datasets&&t.datasets.map(function(t){return c({},t)})}),t}}},{key:"updateChart",value:function(){var t=this,e=this.props.options,n=this.memoizeDataProps(this.props);if(this.chart_instance){e&&(this.chart_instance.options=v["default"].helpers.configMerge(this.chart_instance.options,e));for(var r=this.chart_instance.config.data&&this.chart_instance.config.data.datasets||[],i=n.datasets||[],a=r.map(this.props.datasetKeyProvider),u=i.map(this.props.datasetKeyProvider),f=i.filter(function(e){return a.indexOf(t.props.datasetKeyProvider(e))===-1}),s=function(e){var n=t.props.datasetKeyProvider(r[e]);if(u.indexOf(n)===-1)r.splice(e,1);else{var a=i.find(function(e){return t.props.datasetKeyProvider(e)===n});if(a){r[e].data.splice(a.data.length),a.data.forEach(function(t,n){r[e].data[n]=a.data[n]});var f=(a.data,o(a,["data"]));r[e]=c({data:r[e].data},r[e],f)}}},l=r.length-1;l>=0;l-=1)s(l);f.forEach(function(t){return r.push(t)});var p=(n.datasets,o(n,["datasets"]));this.chart_instance.config.data=c({},this.chart_instance.config.data,p),this.chart_instance.update()}}},{key:"renderChart",value:function(){var t=this.props,e=t.options,n=(t.legend,t.type),r=(t.redraw,t.plugins),o=this.element,i=this.memoizeDataProps();this.chart_instance=new v["default"](o,{type:n,data:i,options:e,plugins:r})}},{key:"render",value:function(){var t=this.props,e=t.height,n=t.width;t.onElementsClick;return l["default"].createElement("canvas",{ref:this.ref,height:e,width:n,onClick:this.handleOnClick})}}]),e}(l["default"].Component);g.getLabelAsKey=function(t){return t.label},g.propTypes={data:d["default"].oneOfType([d["default"].object,d["default"].func]).isRequired,getDatasetAtEvent:d["default"].func,getElementAtEvent:d["default"].func,getElementsAtEvent:d["default"].func,height:d["default"].number,legend:d["default"].object,onElementsClick:d["default"].func,options:d["default"].object,plugins:d["default"].arrayOf(d["default"].object),redraw:d["default"].bool,type:function(t,e,n){if(!Object.keys(v["default"].controllers).find(function(n){return n===t[e]}))return new Error("Invalid chart type `"+t[e]+"` supplied to `"+n+"`.")},width:d["default"].number,datasetKeyProvider:d["default"].func},g.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:g.getLabelAsKey},n["default"]=g;n.Doughnut=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"doughnut"}))}}]),e}(l["default"].Component),n.Pie=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"pie"}))}}]),e}(l["default"].Component),n.Line=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"line"}))}}]),e}(l["default"].Component),n.Bar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bar"}))}}]),e}(l["default"].Component),n.HorizontalBar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"horizontalBar"}))}}]),e}(l["default"].Component),n.Radar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"radar"}))}}]),e}(l["default"].Component),n.Polar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"polarArea"}))}}]),e}(l["default"].Component),n.Bubble=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bubble"}))}}]),e}(l["default"].Component),n.Scatter=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),f(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(g,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"scatter"}))}}]),e}(l["default"].Component),n.defaults=v["default"].defaults;n.Chart=v["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"lodash.isequal":4,"prop-types":8}]},{},[10])(10)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.reactChartjs2=t()}}(function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(i)return i(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=n[a]={exports:{}};e[a][0].call(f.exports,function(t){var n=e[a][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){"use strict";function r(t){return function(){return t}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},e.exports=o},{}],2:[function(t,e,n){(function(t){"use strict";function n(t,e,n,o,i,a,u,c){if(r(e),!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,o,i,a,u,c],l=0;s=new Error(e.replace(/%s/g,function(){return f[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var r=function(t){};"production"!==t.env.NODE_ENV&&(r=function(t){if(void 0===t)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(this,t("_process"))},{_process:5}],3:[function(t,e,n){(function(n){"use strict";var r=t("./emptyFunction"),o=r;"production"!==n.env.NODE_ENV&&!function(){var t=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+t.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(a){}};o=function(e,n){if(void 0===n)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==n.indexOf("Failed Composite propType: ")&&!e){for(var r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];t.apply(void 0,[n].concat(o))}}}(),e.exports=o}).call(this,t("_process"))},{"./emptyFunction":1,_process:5}],4:[function(t,e,n){(function(t){function r(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}function o(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function i(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function a(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function u(t){return function(e){return t(e)}}function c(t,e){return t.has(e)}function s(t,e){return null==t?void 0:t[e]}function f(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function l(t,e){return function(n){return t(e(n))}}function p(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function d(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 h(){this.__data__=Fe?Fe(null):{},this.size=0}function y(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function v(t){var e=this.__data__;if(Fe){var n=e[t];return n===mt?void 0:n}return ge.call(e,t)?e[t]:void 0}function b(t){var e=this.__data__;return Fe?void 0!==e[t]:ge.call(e,t)}function _(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Fe&&void 0===e?mt:e,this}function g(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 m(){this.__data__=[],this.size=0}function w(t){var e=this.__data__,n=B(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():ke.call(e,n,1),--this.size,!0}function j(t){var e=this.__data__,n=B(e,t);return n<0?void 0:e[n][1]}function O(t){return B(this.__data__,t)>-1}function E(t,e){var n=this.__data__,r=B(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function P(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 T(){this.size=0,this.__data__={hash:new d,map:new(De||g),string:new d}}function k(t){var e=tt(this,t)["delete"](t);return this.size-=e?1:0,e}function A(t){return tt(this,t).get(t)}function x(t){return tt(this,t).has(t)}function R(t,e){var n=tt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function C(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new P;++e<n;)this.add(t[e])}function S(t){return this.__data__.set(t,mt),this}function D(t){return this.__data__.has(t)}function z(t){var e=this.__data__=new g(t);this.size=e.size}function N(){this.__data__=new g,this.size=0}function I(t){var e=this.__data__,n=e["delete"](t);return this.size=e.size,n}function F(t){return this.__data__.get(t)}function L(t){return this.__data__.has(t)}function q(t,e){var n=this.__data__;if(n instanceof g){var r=n.__data__;if(!De||r.length<gt-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new P(r)}return n.set(t,e),this.size=n.size,this}function U(t,e){var n=He(t),r=!n&&Ye(t),o=!n&&!r&&Ge(t),i=!n&&!r&&!o&&Je(t),u=n||r||o||i,c=u?a(t.length,String):[],s=c.length;for(var f in t)!e&&!ge.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||rt(f,s))||c.push(f);return c}function B(t,e){for(var n=t.length;n--;)if(st(t[n][0],e))return n;return-1}function V(t,e,n){var r=e(t);return He(t)?r:o(r,n(t))}function M(t){return null==t?void 0===t?Vt:zt:Ae&&Ae in Object(t)?nt(t):ut(t)}function W(t){return yt(t)&&M(t)==Et}function K(t,e,n,r,o){return t===e||(null==t||null==e||!yt(t)&&!yt(e)?t!==t&&e!==e:$(t,e,n,r,K,o))}function $(t,e,n,r,o,i){var a=He(t),u=He(e),c=a?Pt:$e(t),s=u?Pt:$e(e);c=c==Et?Nt:c,s=s==Et?Nt:s;var f=c==Nt,l=s==Nt,p=c==s;if(p&&Ge(t)){if(!Ge(e))return!1;a=!0,f=!1}if(p&&!f)return i||(i=new z),a||Je(t)?J(t,e,n,r,o,i):Q(t,e,c,n,r,o,i);if(!(n&wt)){var d=f&&ge.call(t,"__wrapped__"),h=l&&ge.call(e,"__wrapped__");if(d||h){var y=d?t.value():t,v=h?e.value():e;return i||(i=new z),o(y,v,n,r,i)}}return!!p&&(i||(i=new z),X(t,e,n,r,o,i))}function Y(t){if(!ht(t)||it(t))return!1;var e=pt(t)?je:ne;return e.test(ct(t))}function H(t){return yt(t)&&dt(t.length)&&!!oe[M(t)]}function G(t){if(!at(t))return Ce(t);var e=[];for(var n in Object(t))ge.call(t,n)&&"constructor"!=n&&e.push(n);return e}function J(t,e,n,r,o,a){var u=n&wt,s=t.length,f=e.length;if(s!=f&&!(u&&f>s))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var p=-1,d=!0,h=n&jt?new C:void 0;for(a.set(t,e),a.set(e,t);++p<s;){var y=t[p],v=e[p];if(r)var b=u?r(v,y,p,e,t,a):r(y,v,p,t,e,a);if(void 0!==b){if(b)continue;d=!1;break}if(h){if(!i(e,function(t,e){if(!c(h,e)&&(y===t||o(y,t,n,r,a)))return h.push(e)})){d=!1;break}}else if(y!==v&&!o(y,v,n,r,a)){d=!1;break}}return a["delete"](t),a["delete"](e),d}function Q(t,e,n,r,o,i,a){switch(n){case Kt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Wt:return!(t.byteLength!=e.byteLength||!i(new Pe(t),new Pe(e)));case kt:case At:case Dt:return st(+t,+e);case xt:return t.name==e.name&&t.message==e.message;case Lt:case Ut:return t==e+"";case St:var u=f;case qt:var c=r&wt;if(u||(u=p),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;r|=jt,a.set(t,e);var l=J(u(t),u(e),r,o,i,a);return a["delete"](t),l;case Bt:if(We)return We.call(t)==We.call(e)}return!1}function X(t,e,n,r,o,i){var a=n&wt,u=Z(t),c=u.length,s=Z(e),f=s.length;if(c!=f&&!a)return!1;for(var l=c;l--;){var p=u[l];if(!(a?p in e:ge.call(e,p)))return!1}var d=i.get(t);if(d&&i.get(e))return d==e;var h=!0;i.set(t,e),i.set(e,t);for(var y=a;++l<c;){p=u[l];var v=t[p],b=e[p];if(r)var _=a?r(b,v,p,e,t,i):r(v,b,p,t,e,i);if(!(void 0===_?v===b||o(v,b,n,r,i):_)){h=!1;break}y||(y="constructor"==p)}if(h&&!y){var g=t.constructor,m=e.constructor;g!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof g&&g instanceof g&&"function"==typeof m&&m instanceof m)&&(h=!1)}return i["delete"](t),i["delete"](e),h}function Z(t){return V(t,vt,Ke)}function tt(t,e){var n=t.__data__;return ot(e)?n["string"==typeof e?"string":"hash"]:n.map}function et(t,e){var n=s(t,e);return Y(n)?n:void 0}function nt(t){var e=ge.call(t,Ae),n=t[Ae];try{t[Ae]=void 0;var r=!0}catch(o){}var i=we.call(t);return r&&(e?t[Ae]=n:delete t[Ae]),i}function rt(t,e){return e=null==e?Ot:e,!!e&&("number"==typeof t||re.test(t))&&t>-1&&t%1==0&&t<e}function ot(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function it(t){return!!me&&me in t}function at(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||ve;return t===n}function ut(t){return we.call(t)}function ct(t){if(null!=t){try{return _e.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function st(t,e){return t===e||t!==t&&e!==e}function ft(t){return null!=t&&dt(t.length)&&!pt(t)}function lt(t,e){return K(t,e)}function pt(t){if(!ht(t))return!1;var e=M(t);return e==Rt||e==Ct||e==Tt||e==Ft}function dt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Ot}function ht(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function yt(t){return null!=t&&"object"==typeof t}function vt(t){return ft(t)?U(t):G(t)}function bt(){return[]}function _t(){return!1}var gt=200,mt="__lodash_hash_undefined__",wt=1,jt=2,Ot=9007199254740991,Et="[object Arguments]",Pt="[object Array]",Tt="[object AsyncFunction]",kt="[object Boolean]",At="[object Date]",xt="[object Error]",Rt="[object Function]",Ct="[object GeneratorFunction]",St="[object Map]",Dt="[object Number]",zt="[object Null]",Nt="[object Object]",It="[object Promise]",Ft="[object Proxy]",Lt="[object RegExp]",qt="[object Set]",Ut="[object String]",Bt="[object Symbol]",Vt="[object Undefined]",Mt="[object WeakMap]",Wt="[object ArrayBuffer]",Kt="[object DataView]",$t="[object Float32Array]",Yt="[object Float64Array]",Ht="[object Int8Array]",Gt="[object Int16Array]",Jt="[object Int32Array]",Qt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",Zt="[object Uint16Array]",te="[object Uint32Array]",ee=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,re=/^(?:0|[1-9]\d*)$/,oe={};oe[$t]=oe[Yt]=oe[Ht]=oe[Gt]=oe[Jt]=oe[Qt]=oe[Xt]=oe[Zt]=oe[te]=!0,oe[Et]=oe[Pt]=oe[Wt]=oe[kt]=oe[Kt]=oe[At]=oe[xt]=oe[Rt]=oe[St]=oe[Dt]=oe[Nt]=oe[Lt]=oe[qt]=oe[Ut]=oe[Mt]=!1;var ie="object"==typeof t&&t&&t.Object===Object&&t,ae="object"==typeof self&&self&&self.Object===Object&&self,ue=ie||ae||Function("return this")(),ce="object"==typeof n&&n&&!n.nodeType&&n,se=ce&&"object"==typeof e&&e&&!e.nodeType&&e,fe=se&&se.exports===ce,le=fe&&ie.process,pe=function(){try{return le&&le.binding&&le.binding("util")}catch(t){}}(),de=pe&&pe.isTypedArray,he=Array.prototype,ye=Function.prototype,ve=Object.prototype,be=ue["__core-js_shared__"],_e=ye.toString,ge=ve.hasOwnProperty,me=function(){var t=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),we=ve.toString,je=RegExp("^"+_e.call(ge).replace(ee,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Oe=fe?ue.Buffer:void 0,Ee=ue.Symbol,Pe=ue.Uint8Array,Te=ve.propertyIsEnumerable,ke=he.splice,Ae=Ee?Ee.toStringTag:void 0,xe=Object.getOwnPropertySymbols,Re=Oe?Oe.isBuffer:void 0,Ce=l(Object.keys,Object),Se=et(ue,"DataView"),De=et(ue,"Map"),ze=et(ue,"Promise"),Ne=et(ue,"Set"),Ie=et(ue,"WeakMap"),Fe=et(Object,"create"),Le=ct(Se),qe=ct(De),Ue=ct(ze),Be=ct(Ne),Ve=ct(Ie),Me=Ee?Ee.prototype:void 0,We=Me?Me.valueOf:void 0;d.prototype.clear=h,d.prototype["delete"]=y,d.prototype.get=v,d.prototype.has=b,d.prototype.set=_,g.prototype.clear=m,g.prototype["delete"]=w,g.prototype.get=j,g.prototype.has=O,g.prototype.set=E,P.prototype.clear=T,P.prototype["delete"]=k,P.prototype.get=A,P.prototype.has=x,P.prototype.set=R,C.prototype.add=C.prototype.push=S,C.prototype.has=D,z.prototype.clear=N,z.prototype["delete"]=I,z.prototype.get=F,z.prototype.has=L,z.prototype.set=q;var Ke=xe?function(t){return null==t?[]:(t=Object(t),r(xe(t),function(e){return Te.call(t,e)}))}:bt,$e=M;(Se&&$e(new Se(new ArrayBuffer(1)))!=Kt||De&&$e(new De)!=St||ze&&$e(ze.resolve())!=It||Ne&&$e(new Ne)!=qt||Ie&&$e(new Ie)!=Mt)&&($e=function(t){var e=M(t),n=e==Nt?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case Le:return Kt;case qe:return St;case Ue:return It;case Be:return qt;case Ve:return Mt}return e});var Ye=W(function(){return arguments}())?W:function(t){return yt(t)&&ge.call(t,"callee")&&!Te.call(t,"callee")},He=Array.isArray,Ge=Re||_t,Je=de?u(de):H;e.exports=lt}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(t,e,n){function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function a(t){if(p===clearTimeout)return clearTimeout(t);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function u(){v&&h&&(v=!1,h.length?y=h.concat(y):b=-1,y.length&&c())}function c(){if(!v){var t=i(u);v=!0;for(var e=y.length;e;){for(h=y,y=[];++b<e;)h&&h[b].run();b=-1,e=y.length}h=null,v=!1,a(t)}}function s(t,e){this.fun=t,this.array=e}function f(){}var l,p,d=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(t){p=o}}();var h,y=[],v=!1,b=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];y.push(new s(t,e)),1!==y.length||v||i(c)},s.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=f,d.addListener=f,d.once=f,d.off=f,d.removeListener=f,d.removeAllListeners=f,d.emit=f,d.prependListener=f,d.prependOnceListener=f,d.listeners=function(t){return[]},d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],6:[function(t,e,n){(function(n){"use strict";function r(t,e,r,c,s){if("production"!==n.env.NODE_ENV)for(var f in t)if(t.hasOwnProperty(f)){var l;try{o("function"==typeof t[f],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",c||"React class",r,f),l=t[f](e,f,c,r,null,a)}catch(p){l=p}if(i(!l||l 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).",c||"React class",r,f,typeof l),l instanceof Error&&!(l.message in u)){u[l.message]=!0;var d=s?s():"";i(!1,"Failed %s type: %s%s",r,l.message,null!=d?d:"")}}}if("production"!==n.env.NODE_ENV)var o=t("fbjs/lib/invariant"),i=t("fbjs/lib/warning"),a=t("./lib/ReactPropTypesSecret"),u={};e.exports=r}).call(this,t("_process"))},{"./lib/ReactPropTypesSecret":10,_process:5,"fbjs/lib/invariant":2,"fbjs/lib/warning":3}],7:[function(t,e,n){"use strict";var r=t("fbjs/lib/emptyFunction"),o=t("fbjs/lib/invariant"),i=t("./lib/ReactPropTypesSecret");e.exports=function(){function t(t,e,n,r,a,u){u!==i&&o(!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=r,n.PropTypes=n,n}},{"./lib/ReactPropTypesSecret":10,"fbjs/lib/emptyFunction":1,"fbjs/lib/invariant":2}],8:[function(t,e,n){(function(n){"use strict";var r=t("fbjs/lib/emptyFunction"),o=t("fbjs/lib/invariant"),i=t("fbjs/lib/warning"),a=t("./lib/ReactPropTypesSecret"),u=t("./checkPropTypes");e.exports=function(t,e){function c(t){var e=t&&(A&&t[A]||t[x]);if("function"==typeof e)return e}function s(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function f(t){this.message=t,this.stack=""}function l(t){function r(r,s,l,p,d,h,y){if(p=p||R,h=h||l,y!==a)if(e)o(!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"!==n.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+l;!u[v]&&c<3&&(i(!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.",h,p),u[v]=!0,c++)}return null==s[l]?r?new f(null===s[l]?"The "+d+" `"+h+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+h+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:t(s,l,p,d,h)}if("production"!==n.env.NODE_ENV)var u={},c=0;var s=r.bind(null,!1);return s.isRequired=r.bind(null,!0),s}function p(t){function e(e,n,r,o,i,a){var u=e[n],c=E(u);if(c!==t){var s=P(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+t+"`."))}return null}return l(e)}function d(){return l(r.thatReturnsNull)}function h(t){function e(e,n,r,o,i){if("function"!=typeof t)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=e[n];if(!Array.isArray(u)){var c=E(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var s=0;s<u.length;s++){var l=t(u,s,r,o,i+"["+s+"]",a);if(l instanceof Error)return l}return null}return l(e)}function y(){function e(e,n,r,o,i){var a=e[n];if(!t(a)){var u=E(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return l(e)}function v(t){function e(e,n,r,o,i){if(!(e[n]instanceof t)){var a=t.name||R,u=k(e[n]);return new f("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return l(e)}function b(t){function e(e,n,r,o,i){for(var a=e[n],u=0;u<t.length;u++)if(s(a,t[u]))return null;var c=JSON.stringify(t);return new f("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return Array.isArray(t)?l(e):("production"!==n.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function _(t){function e(e,n,r,o,i){if("function"!=typeof t)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=e[n],c=E(u);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an object."));for(var s in u)if(u.hasOwnProperty(s)){var l=t(u,s,r,o,i+"."+s,a);if(l instanceof Error)return l}return null}return l(e)}function g(t){function e(e,n,r,o,i){for(var u=0;u<t.length;u++){var c=t[u];if(null==c(e,n,r,o,i,a))return null}return new f("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(t))return"production"!==n.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<t.length;o++){var u=t[o];if("function"!=typeof u)return i(!1,"Invalid argument supplid to oneOfType. Expected an array of check functions, but received %s at index %s.",T(u),o),r.thatReturnsNull}return l(e)}function m(){function t(t,e,n,r,o){return j(t[e])?null:new f("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return l(t)}function w(t){function e(e,n,r,o,i){var u=e[n],c=E(u);if("object"!==c)return new f("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var s in t){var l=t[s];if(l){var p=l(u,s,r,o,i+"."+s,a);if(p)return p}}return null}return l(e)}function j(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(j);if(null===e||t(e))return!0;var n=c(e);if(!n)return!1;var r,o=n.call(e);if(n!==e.entries){for(;!(r=o.next()).done;)if(!j(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!j(i[1]))return!1}return!0;default:return!1}}function O(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function E(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":O(e,t)?"symbol":e}function P(t){if("undefined"==typeof t||null===t)return""+t;var e=E(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function T(t){var e=P(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}function k(t){return t.constructor&&t.constructor.name?t.constructor.name:R}var A="function"==typeof Symbol&&Symbol.iterator,x="@@iterator",R="<<anonymous>>",C={array:p("array"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:d(),arrayOf:h,element:y(),instanceOf:v,node:m(),objectOf:_,oneOf:b,oneOfType:g,shape:w};return f.prototype=Error.prototype,C.checkPropTypes=u,C.PropTypes=C,C}}).call(this,t("_process"))},{"./checkPropTypes":6,"./lib/ReactPropTypesSecret":10,_process:5,"fbjs/lib/emptyFunction":1,"fbjs/lib/invariant":2,"fbjs/lib/warning":3}],9:[function(t,e,n){(function(n){if("production"!==n.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,o=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},i=!0;e.exports=t("./factoryWithTypeCheckers")(o,i)}else e.exports=t("./factoryWithThrowingShims")()}).call(this,t("_process"))},{"./factoryWithThrowingShims":7,"./factoryWithTypeCheckers":8,_process:5}],10:[function(t,e,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},{}],11:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(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}function u(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)}Object.defineProperty(n,"__esModule",{value:!0}),n.Chart=n.defaults=n.Scatter=n.Bubble=n.Polar=n.Radar=n.HorizontalBar=n.Bar=n.Line=n.Pie=n.Doughnut=void 0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),f="undefined"!=typeof window?window.React:"undefined"!=typeof e?e.React:null,l=r(f),p=t("prop-types"),d=r(p),h="undefined"!=typeof window?window.Chart:"undefined"!=typeof e?e.Chart:null,y=r(h),v=t("lodash.isequal"),b=r(v);Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError('"this" is null or not defined');var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var r=arguments[1],o=0;o<n;){var i=e[o];if(t.call(r,i,o,e))return i;o++}}});var _=function(t){function e(){var t,n,r,o;i(this,e);for(var u=arguments.length,c=Array(u),s=0;s<u;s++)c[s]=arguments[s];return n=r=a(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(c))),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=n,a(r,o)}return u(e,t),s(e,[{key:"componentWillMount",value:function(){this.chart_instance=void 0}},{key:"componentDidMount",value:function(){this.renderChart()}},{key:"componentDidUpdate",value:function(){return this.props.redraw?(this.chart_instance.destroy(),void this.renderChart()):void this.updateChart()}},{key:"shouldComponentUpdate",value:function(t){var e=this.props,n=(e.redraw,e.type),r=e.options,o=e.plugins,i=e.legend,a=e.height,u=e.width;if(t.redraw===!0)return!0;if(a!==t.height||u!==t.width)return!0;if(n!==t.type)return!0;if(!(0,b["default"])(i,t.legend))return!0;if(!(0,b["default"])(r,t.options))return!0;var c=this.transformDataProp(t);return!(0,b["default"])(this.shadowDataProp,c)||!(0,b["default"])(o,t.plugins)}},{key:"componentWillUnmount",value:function(){this.chart_instance.destroy()}},{key:"transformDataProp",value:function(t){var e=t.data;if("function"==typeof e){var n=this.element;return e(n)}return e}},{key:"memoizeDataProps",value:function(){if(this.props.data){var t=this.transformDataProp(this.props);return this.shadowDataProp=c({},t,{datasets:t.datasets&&t.datasets.map(function(t){return c({},t)})}),t}}},{key:"updateChart",value:function(){var t=this,e=this.props.options,n=this.memoizeDataProps(this.props);if(this.chart_instance){e&&(this.chart_instance.options=y["default"].helpers.configMerge(this.chart_instance.options,e));for(var r=this.chart_instance.config.data&&this.chart_instance.config.data.datasets||[],i=n.datasets||[],a=r.map(this.props.datasetKeyProvider),u=i.map(this.props.datasetKeyProvider),s=i.filter(function(e){return a.indexOf(t.props.datasetKeyProvider(e))===-1}),f=function(e){var n=t.props.datasetKeyProvider(r[e]);if(u.indexOf(n)===-1)r.splice(e,1);else{var a=i.find(function(e){return t.props.datasetKeyProvider(e)===n});if(a){r[e].data.splice(a.data.length),a.data.forEach(function(t,n){r[e].data[n]=a.data[n]});var s=(a.data,o(a,["data"]));r[e]=c({data:r[e].data},r[e],s)}}},l=r.length-1;l>=0;l-=1)f(l);s.forEach(function(t){return r.push(t)});var p=(n.datasets,o(n,["datasets"]));this.chart_instance.config.data=c({},this.chart_instance.config.data,p),this.chart_instance.update()}}},{key:"renderChart",value:function(){var t=this.props,e=t.options,n=t.legend,r=t.type,o=(t.redraw,t.plugins),i=this.element,a=this.memoizeDataProps();e.legend=n,this.chart_instance=new y["default"](i,{type:r,data:a,options:e,plugins:o})}},{key:"render",value:function(){var t=this.props,e=t.height,n=t.width;t.onElementsClick;return l["default"].createElement("canvas",{ref:this.ref,height:e,width:n,onClick:this.handleOnClick})}}]),e}(l["default"].Component);_.getLabelAsKey=function(t){return t.label},_.propTypes={data:d["default"].oneOfType([d["default"].object,d["default"].func]).isRequired,getDatasetAtEvent:d["default"].func,getElementAtEvent:d["default"].func,getElementsAtEvent:d["default"].func,height:d["default"].number,legend:d["default"].object,onElementsClick:d["default"].func,options:d["default"].object,plugins:d["default"].arrayOf(d["default"].object),redraw:d["default"].bool,type:function(t,e,n){if(!Object.keys(y["default"].controllers).find(function(n){return n===t[e]}))return new Error("Invalid chart type `"+t[e]+"` supplied to `"+n+"`.")},width:d["default"].number,datasetKeyProvider:d["default"].func},_.defaultProps={legend:{display:!0,position:"bottom"},type:"doughnut",height:150,width:300,redraw:!1,options:{},datasetKeyProvider:_.getLabelAsKey},n["default"]=_;n.Doughnut=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"doughnut"}))}}]),e}(l["default"].Component),n.Pie=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"pie"}))}}]),e}(l["default"].Component),n.Line=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"line"}))}}]),e}(l["default"].Component),n.Bar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bar"}))}}]),e}(l["default"].Component),n.HorizontalBar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"horizontalBar"}))}}]),e}(l["default"].Component),n.Radar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"radar"}))}}]),e}(l["default"].Component),n.Polar=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"polarArea"}))}}]),e}(l["default"].Component),n.Bubble=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"bubble"}))}}]),e}(l["default"].Component),n.Scatter=function(t){function e(){return i(this,e),a(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return u(e,t),s(e,[{key:"render",value:function(){var t=this;return l["default"].createElement(_,c({},this.props,{ref:function(e){return t.chart_instance=e&&e.chart_instance},type:"scatter"}))}}]),e}(l["default"].Component),n.defaults=y["default"].defaults;n.Chart=y["default"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"lodash.isequal":4,"prop-types":9}]},{},[11])(11)});

@@ -20,6 +20,2 @@ 'use strict';

var _reactDom = require('react-dom');
var _reactDom2 = _interopRequireDefault(_reactDom);
var _chart = require('chart.js');

@@ -43,2 +39,47 @@

//Taken from MDN
if (!Array.prototype.find) {
Object.defineProperty(Array.prototype, 'find', {
value: function value(predicate) {
// 1. Let O be ? ToObject(this value).
if (this == null) {
throw new TypeError('"this" is null or not defined');
}
var o = Object(this);
// 2. Let len be ? ToLength(? Get(O, "length")).
var len = o.length >>> 0;
// 3. If IsCallable(predicate) is false, throw a TypeError exception.
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
// 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
var thisArg = arguments[1];
// 5. Let k be 0.
var k = 0;
// 6. Repeat, while k < len
while (k < len) {
// a. Let Pk be ! ToString(k).
// b. Let kValue be ? Get(O, Pk).
// c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
// d. If testResult is true, return kValue.
var kValue = o[k];
if (predicate.call(thisArg, kValue, k, o)) {
return kValue;
}
// e. Increase k by 1.
k++;
}
// 7. Return undefined.
return undefined;
}
});
}
var ChartComponent = function (_React$Component) {

@@ -262,2 +303,3 @@ _inherits(ChartComponent, _React$Component);

var data = this.memoizeDataProps();
options.legend = legend;

@@ -308,2 +350,3 @@ this.chart_instance = new _chart2.default(node, {

type: function type(props, propName, componentName) {
if (!Object.keys(_chart2.default.controllers).find(function (chartType) {

@@ -310,0 +353,0 @@ return chartType === props[propName];

{
"name": "react-chartjs-2",
"version": "2.5.0",
"version": "2.5.1",
"description": "react-chartjs-2",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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 too big to display

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 too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc