text: (self.webpackChunkperformance=self.webpackChunkperformance||[]).push([[185],{4185:function(t,e,i){"use strict";i.r(e),i.d(e,{default:function(){return c}});var s=i(7421),r=i.n(s),n=i(7294),h=i(5697),o=i.n(h);window.ApexCharts=r();class c extends n.Component{constructor(t){super(t),n.createRef?this.chartRef=n.createRef():this.setRef=t=>this.chartRef=t,this.chart=null}render(){const{...t}=this.props;return n.createElement("div",{ref:n.createRef?this.chartRef:this.setRef,...t})}componentDidMount(){const t=n.createRef?this.chartRef.current:this.chartRef;this.chart=new(r())(t,this.getConfig()),this.chart.render()}getConfig(){const{type:t,height:e,width:i,series:s,options:r}=this.props,n={chart:{type:t,height:e,width:i},series:s};return this.extend(r,n)}isObject(t){return t&&"object"==typeof t&&!Array.isArray(t)&&null!=t}extend(t,e){"function"!=typeof Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");let e=Object(t);for(let i=1;i<arguments.length;i++){let t=arguments[i];if(null!=t)for(let i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}return e});let i=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach((s=>{this.isObject(e[s])?s in t?i[s]=this.extend(t[s],e[s]):Object.assign(i,{[s]:e[s]}):Object.assign(i,{[s]:e[s]})})),i}componentDidUpdate(t){if(!this.chart)return null;const{options:e,series:i,height:s,width:r}=this.props,n=JSON.stringify(t.options),h=JSON.stringify(t.series),o=JSON.stringify(e),c=JSON.stringify(i);n===o&&h===c&&s===t.height&&r===t.width||(h===c?this.chart.updateOptions(this.getConfig()):n===o&&s===t.height&&r===t.width?this.chart.updateSeries(i):this.chart.updateOptions(this.getConfig()))}componentWillUnmount(){this.chart&&"function"==typeof this.chart.destroy&&this.chart.destroy()}}c.propTypes={type:o().string.isRequired,width:o().any,height:o().any,series:o().array.isRequired,options:o().object.isRequired},c.defaultProps={type:"line",width:"100%",height:"auto"}}}]);
  //# sourceMappingURL=185-60cc7abb8156462d17b9.js.map