You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue-chartkick

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-chartkick - npm Package Compare versions

Comparing version

to
0.6.0

4

CHANGELOG.md

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

## 0.6.0
- Updated Chartkick.js to 3.2.0
## 0.5.3

@@ -2,0 +6,0 @@

10

dist/vue-chartkick.esm.js

@@ -5,3 +5,3 @@ /*

* https://github.com/ankane/vue-chartkick
* v0.5.3
* v0.6.0
* MIT License

@@ -18,5 +18,5 @@ */

var chartProps = [
"adapter", "colors", "curve", "dataset", "decimal", "discrete", "donut", "download", "label",
"legend", "library", "max", "messages", "min", "points", "prefix", "refresh",
"stacked", "suffix", "thousands", "title", "xmax", "xmin", "xtitle", "ytitle"
"adapter", "bytes", "colors", "curve", "dataset", "decimal", "discrete", "donut", "download", "label",
"legend", "library", "max", "messages", "min", "points", "precision", "prefix", "refresh",
"round", "stacked", "suffix", "thousands", "title", "xmax", "xmin", "xtitle", "ytitle", "zeros"
];

@@ -116,3 +116,3 @@ Vue.component(tagName, {

Chartkick.version = "0.5.3"; // TODO remove in future versions
Chartkick.version = "0.6.0"; // TODO remove in future versions
Chartkick.install = function(Vue, options) {

@@ -119,0 +119,0 @@ if (options && options.adapter) {

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).VueChartkick=e()}(this,function(){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(t,e){return t(e={exports:{}},e.exports),e.exports}var r=t(function(t,e){t.exports=function(){function i(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return t instanceof Function}function n(t){return"[object Object]"===Object.prototype.toString.call(t)}function a(t,e){var r;for(r in e)n(e[r])||i(e[r])?(n(e[r])&&!n(t[r])&&(t[r]={}),i(e[r])&&!i(t[r])&&(t[r]=[]),a(t[r],e[r])):void 0!==e[r]&&(t[r]=e[r])}function rt(t,e){var r={};return a(r,t),a(r,e),r}var c=/^(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)$/i,d=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([.,]\d+)?($|Z|([+-])(\d\d)(:)?(\d\d)?)/i,h=String(1.5).charAt(1);function f(t){return""+t}function nt(t){return parseFloat(t)}function at(t){var e,r,n,a;if("object"!=typeof t)if("number"==typeof t)t=new Date(1e3*t);else{if(t=f(t),e=t.match(c))return r=parseInt(e[1],10),n=parseInt(e[3],10)-1,a=parseInt(e[5],10),new Date(r,n,a);var o=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=function(t){var e,r,n,a,o,i,s,c,l,u,p;if("[object Date]"===(u=Object.prototype.toString.call(t)))return t;if("[object String]"!==u)return;if(n=t.match(d))return p=parseInt(n[1],10),i=parseInt(n[3],10)-1,e=parseInt(n[5],10),r=parseInt(n[7],10),o=n[9]?parseInt(n[9],10):0,l=n[11]?parseInt(n[11],10):0,a=n[12]?1e3*parseFloat(h+n[12].slice(1)):0,c=Date.UTC(p,i,e,r,o,l,a),n[13]&&n[14]&&(s=60*n[15],n[17]&&(s+=parseInt(n[17],10)),s*="-"===n[14]?-1:1,c-=60*s*1e3),new Date(c)}(o)||new Date(t)}return t}function l(t){if(!i(t)){var e,r=[];for(e in t)t.hasOwnProperty(e)&&r.push([e,t[e]]);t=r}return t}function o(o,i,s,c,l,u,p,d){return function(t,e,r){var n=t.data,a=rt({},o);return a=rt(a,r||{}),(t.hideLegend||"legend"in e)&&i(a,e.legend,t.hideLegend),e.title&&s(a,e.title),"min"in e?c(a,e.min):function(t){var e,r,n;for(e=0;e<t.length;e++)for(n=t[e].data,r=0;r<n.length;r++)if(n[r][1]<0)return!0;return!1}(n)||c(a,0),e.max&&l(a,e.max),"stacked"in e&&u(a,e.stacked),e.colors&&(a.colors=e.colors),e.xtitle&&p(a,e.xtitle),e.ytitle&&d(a,e.ytitle),a=rt(a,e.library||{})}}function y(t,e){return t[0].getTime()-e[0].getTime()}function m(t,e){return t[0]-e[0]}function ot(t,e){return t-e}function it(t){return 0===t.getMilliseconds()&&0===t.getSeconds()}function st(t){return it(t)&&0===t.getMinutes()}function ct(t){return st(t)&&0===t.getHours()}function lt(t){return ct(t)&&1===t.getDate()}function u(t){return!isNaN(at(t))&&6<=f(t).length}function p(t){return"number"==typeof t}function g(t,e,r){if(t=t||"",r.prefix&&(e<0&&(e*=-1,t+="-"),t+=r.prefix),r.thousands||r.decimal){var n=(e=f(e)).split(".");e=n[0],r.thousands&&(e=e.replace(/\B(?=(\d{3})+(?!\d))/g,r.thousands)),1<n.length&&(e+=(r.decimal||".")+n[1])}return t+e+(r.suffix||"")}function ut(t,e,r){return r in e?e[r]:r in t.options?t.options[r]:null}var b={maintainAspectRatio:!1,animation:!1,tooltips:{displayColors:!1,callbacks:{}},legend:{},title:{fontSize:20,fontColor:"#333"}},v={scales:{yAxes:[{ticks:{maxTicksLimit:4},scaleLabel:{fontSize:16,fontColor:"#333"}}],xAxes:[{gridLines:{drawOnChartArea:!1},scaleLabel:{fontSize:16,fontColor:"#333"},time:{},ticks:{}}]}},pt=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],x=function(t,e,r){void 0!==e?(t.legend.display=!!e,e&&!0!==e&&(t.legend.position=e)):r&&(t.legend.display=!1)},z=function(t,e){t.title.display=!0,t.title.text=e},M=function(t,e){null!==e&&(t.scales.xAxes[0].ticks.min=nt(e))},w=function(t,e){t.scales.xAxes[0].ticks.max=nt(e)},A=function(t,e){t.scales.xAxes[0].stacked=!!e,t.scales.yAxes[0].stacked=!!e},C=function(t,e){t.scales.xAxes[0].scaleLabel.display=!0,t.scales.xAxes[0].scaleLabel.labelString=e},_=function(t,e){t.scales.yAxes[0].scaleLabel.display=!0,t.scales.yAxes[0].scaleLabel.labelString=e},dt=function(t){return null!=t},S=function(t,e,r){var n={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal};if("pie"!==r){var a=e.scales.yAxes;"bar"===r&&(a=e.scales.xAxes),a[0].ticks.callback||(a[0].ticks.callback=function(t){return g("",t,n)})}if(!e.tooltips.callbacks.label)if("scatter"===r)e.tooltips.callbacks.label=function(t,e){var r=e.datasets[t.datasetIndex].label||"";return r&&(r+=": "),r+"("+t.xLabel+", "+t.yLabel+")"};else if("bubble"===r)e.tooltips.callbacks.label=function(t,e){var r=e.datasets[t.datasetIndex].label||"";r&&(r+=": ");var n=e.datasets[t.datasetIndex].data[t.index];return r+"("+t.xLabel+", "+t.yLabel+", "+n.v+")"};else if("pie"===r)e.tooltips.callbacks.label=function(t,e){var r=e.labels[t.index];return i(r)?(r=r.slice())[0]+=": ":r+=": ",g(r,e.datasets[t.datasetIndex].data[t.index],n)};else{var o="bar"===r?"xLabel":"yLabel";e.tooltips.callbacks.label=function(t,e){var r=e.datasets[t.datasetIndex].label||"";return r&&(r+=": "),g(r,t[o],n)}}},k=o(rt(b,v),x,z,function(t,e){if(e!==null){t.scales.yAxes[0].ticks.min=nt(e)}},function(t,e){t.scales.yAxes[0].ticks.max=nt(e)},A,C,_),O=function(t,e,r,n){var a,o=[],i=[],s=t.options.colors||pt,c=!0,l=!0,u=!0,p=!0,d=!0,h=!0,f=t.data,y=0;if("bubble"===r)for(var m=0;m<f.length;m++)for(var g=f[m],b=0;b<g.data.length;b++)g.data[b][2]>y&&(y=g.data[b][2]);var v,x,z,M,w,A,C,_,S,k,O,T=[],D=[];if("bar"===r||"column"===r||"number"!==t.xtype&&"bubble"!==t.xtype){var L,j,E=[];for(v=0;v<f.length;v++)for(z=f[v],x=0;x<z.data.length;x++)M=z.data[x],w="datetime"==t.xtype?M[0].getTime():M[0],T[w]||(T[w]=new Array(f.length)),T[w][v]=nt(M[1]),-1===E.indexOf(w)&&E.push(w);for("datetime"!==t.xtype&&"number"!==t.xtype||E.sort(ot),x=0;x<f.length;x++)D.push([]);for(j=0;j<E.length;j++)for(v=E[j],"datetime"===t.xtype?(L=new Date(nt(v)),c=c&&ct(L),a||(a=L.getDay()),l=l&&(_=a,ct(C=L)&&C.getDay()===_),u=u&&lt(L),p=p&&(lt(A=L)&&0===A.getMonth()),d=d&&st(L),h=h&&it(L)):L=v,i.push(L),x=0;x<f.length;x++)D[x].push(void 0===T[v][x]?null:T[v][x])}else for(var I=0;I<f.length;I++){for(var B=f[I],N=[],F=0;F<B.data.length;F++){var H={x:nt(B.data[F][0]),y:nt(B.data[F][1])};"bubble"===r&&(H.r=20*nt(B.data[F][2])/y,H.v=B.data[F][2]),N.push(H)}D.push(N)}for(v=0;v<f.length;v++){var R=(z=f[v]).color||s[v],P="line"!==r?(k=.5,void 0,(O=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(S=R))?"rgba("+parseInt(O[1],16)+", "+parseInt(O[2],16)+", "+parseInt(O[3],16)+", "+k+")":S):R,U={label:z.name||"",data:D[v],fill:"area"===r,borderColor:R,backgroundColor:P,pointBackgroundColor:R,borderWidth:2,pointHoverBackgroundColor:R};z.stack&&(U.stack=z.stack);var V=ut(t,z,"curve");!1===V&&(U.lineTension=0);var W=ut(t,z,"points");!1===W&&(U.pointRadius=0,U.pointHitRadius=5),U=rt(U=rt(U=rt(U,t.options.dataset||{}),z.library||{}),z.dataset||{}),o.push(U)}var Q=t.options.xmin,J=t.options.xmax;if("datetime"===t.xtype){var G="math"in n.helpers,K=G?"ticks":"time";dt(Q)&&(e.scales.xAxes[0][K].min=at(Q).getTime()),dt(J)&&(e.scales.xAxes[0][K].max=at(J).getTime())}else"number"===t.xtype&&(dt(Q)&&(e.scales.xAxes[0].ticks.min=Q),dt(J)&&(e.scales.xAxes[0].ticks.max=J));if("datetime"===t.xtype&&0<i.length){var X=(dt(Q)?at(Q):i[0]).getTime(),Y=(dt(J)?at(J):i[0]).getTime();for(v=1;v<i.length;v++){var Z=i[v].getTime();Z<X&&(X=Z),Y<Z&&(Y=Z)}var $,q=(Y-X)/864e5;if(!e.scales.xAxes[0].time.unit)if(p||3650<q?(e.scales.xAxes[0].time.unit="year",$=365):u||300<q?(e.scales.xAxes[0].time.unit="month",$=30):c||10<q?(e.scales.xAxes[0].time.unit="day",$=1):d||.5<q?(e.scales.xAxes[0].time.displayFormats={hour:"MMM D, h a"},e.scales.xAxes[0].time.unit="hour",$=1/24):h&&(e.scales.xAxes[0].time.displayFormats={minute:"h:mm a"},e.scales.xAxes[0].time.unit="minute",$=1/24/60),$&&0<q){var tt=Math.ceil(q/$/(t.element.offsetWidth/100));l&&1===$&&(tt=7*Math.ceil(tt/7)),e.scales.xAxes[0].time.unitStepSize=tt}e.scales.xAxes[0].time.tooltipFormat||(c?e.scales.xAxes[0].time.tooltipFormat="ll":d?e.scales.xAxes[0].time.tooltipFormat="MMM D, h a":h&&(e.scales.xAxes[0].time.tooltipFormat="h:mm a"))}var et={labels:i,datasets:o};return et},T=function(t){this.name="chartjs",this.library=t};T.prototype.renderLineChart=function(t,e){var r={};!t.options.max&&function(t){var e,r,n;for(e=0;e<t.length;e++)for(n=t[e].data,r=0;r<n.length;r++)if(0!=n[r][1])return!1;return!0}(t.data)&&(r.max=1);var n=k(t,rt(r,t.options));S(t,n,e);var a=O(t,n,e||"line",this.library);"number"===t.xtype?(n.scales.xAxes[0].type="linear",n.scales.xAxes[0].position="bottom"):n.scales.xAxes[0].type="string"===t.xtype?"category":"time",this.drawChart(t,"line",a,n)},T.prototype.renderPieChart=function(t){var e=rt({},b);t.options.donut&&(e.cutoutPercentage=50),"legend"in t.options&&x(e,t.options.legend),t.options.title&&z(e,t.options.title),e=rt(e,t.options.library||{}),S(t,e,"pie");for(var r=[],n=[],a=0;a<t.data.length;a++){var o=t.data[a];r.push(o[0]),n.push(o[1])}var i={data:n,backgroundColor:t.options.colors||pt};i=rt(i,t.options.dataset||{});var s={labels:r,datasets:[i]};this.drawChart(t,"pie",s,e)},T.prototype.renderColumnChart=function(t,e){var r;if("bar"===e){var n=rt(b,v);delete n.scales.yAxes[0].ticks.maxTicksLimit,r=o(n,x,z,M,w,A,C,_)(t,t.options)}else r=k(t,t.options);S(t,r,e);var a=O(t,r,"column",this.library);"bar"!==e&&function(t,e,r){var n=Math.ceil(t.element.offsetWidth/4/e.labels.length);if(n>25){n=25}else if(n<10){n=10}if(!r.scales.xAxes[0].ticks.callback){r.scales.xAxes[0].ticks.callback=function(t){t=f(t);if(t.length>n){return t.substring(0,n-2)+"..."}else{return t}}}}(t,a,r),this.drawChart(t,"bar"===e?"horizontalBar":"bar",a,r)},T.prototype.renderAreaChart=function(t){this.renderLineChart(t,"area")},T.prototype.renderBarChart=function(t){this.renderColumnChart(t,"bar")},T.prototype.renderScatterChart=function(t,e){e=e||"scatter";var r=k(t,t.options);S(t,r,e),"showLines"in r||(r.showLines=!1);var n=O(t,r,e,this.library);r.scales.xAxes[0].type="linear",r.scales.xAxes[0].position="bottom",this.drawChart(t,e,n,r)},T.prototype.renderBubbleChart=function(t){this.renderScatterChart(t,"bubble")},T.prototype.destroy=function(t){t.chart&&t.chart.destroy()};var D={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:!(T.prototype.drawChart=function(t,e,r,n){this.destroy(t);var a={type:e,data:r,options:n};t.options.code&&window.console.log("new Chart(ctx, "+JSON.stringify(a)+");"),t.element.innerHTML="<canvas></canvas>";var o=t.element.getElementsByTagName("CANVAS")[0];t.chart=new this.library(o,a)})},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},area:{},series:{marker:{}}}},L=function(t,e,r){void 0!==e?(t.legend.enabled=!!e,e&&!0!==e&&("top"===e||"bottom"===e?t.legend.verticalAlign=e:(t.legend.layout="vertical",t.legend.verticalAlign="middle",t.legend.align=e))):r&&(t.legend.enabled=!1)},j=function(t,e){t.title.text=e},E=o(D,L,j,function(t,e){t.yAxis.min=e},function(t,e){t.yAxis.max=e},function(t,e){var r=e?!0===e?"normal":e:null;t.plotOptions.series.stacking=r,t.plotOptions.area.stacking=r,t.plotOptions.areaspline.stacking=r},function(t,e){t.xAxis.title.text=e},function(t,e){t.yAxis.title.text=e}),I=function(t,e,r){var n={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal};"pie"===r||e.yAxis.labels.formatter||(e.yAxis.labels.formatter=function(){return g("",this.value,n)}),e.tooltip.pointFormatter||(e.tooltip.pointFormatter=function(){return'<span style="color:'+this.color+'">●</span> '+g(this.series.name+": <b>",this.y,n)+"</b><br/>"})},B=function(t){this.name="highcharts",this.library=t};B.prototype.renderLineChart=function(t,e){var r={};"areaspline"===(e=e||"spline")&&(r={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:!1}}}}),!1===t.options.curve&&("areaspline"===e?e="area":"spline"===e&&(e="line"));var n,a,o,i=E(t,t.options,r);i.xAxis.type="string"===t.xtype?"category":"number"===t.xtype?"linear":"datetime",i.chart.type||(i.chart.type=e),I(t,i,e);var s=t.data;for(a=0;a<s.length;a++){if(s[a].name=s[a].name||"Value",n=s[a].data,"datetime"===t.xtype)for(o=0;o<n.length;o++)n[o][0]=n[o][0].getTime();!(s[a].marker={symbol:"circle"})===t.options.points&&(s[a].marker.enabled=!1)}this.drawChart(t,s,i)},B.prototype.renderScatterChart=function(t){var e=E(t,t.options,{});e.chart.type="scatter",this.drawChart(t,t.data,e)},B.prototype.renderPieChart=function(t){var e=rt(D,{});t.options.colors&&(e.colors=t.options.colors),t.options.donut&&(e.plotOptions={pie:{innerSize:"50%"}}),"legend"in t.options&&L(e,t.options.legend),t.options.title&&j(e,t.options.title);var r=rt(e,t.options.library||{});I(t,r,"pie");var n=[{type:"pie",name:t.options.label||"Value",data:t.data}];this.drawChart(t,n,r)},B.prototype.renderColumnChart=function(t,e){e=e||"column";var r,n,a,o,i=t.data,s=E(t,t.options),c=[],l=[];for(s.chart.type=e,I(t,s,e),r=0;r<i.length;r++)for(a=i[r],n=0;n<a.data.length;n++)o=a.data[n],c[o[0]]||(c[o[0]]=new Array(i.length),l.push(o[0])),c[o[0]][r]=o[1];"number"===t.xtype&&l.sort(ot),s.xAxis.categories=l;var u,p=[];for(r=0;r<i.length;r++){for(o=[],n=0;n<l.length;n++)o.push(c[l[n]][r]||0);u={name:i[r].name||"Value",data:o},i[r].stack&&(u.stack=i[r].stack),p.push(u)}this.drawChart(t,p,s)},B.prototype.renderBarChart=function(t){this.renderColumnChart(t,"bar")},B.prototype.renderAreaChart=function(t){this.renderLineChart(t,"areaspline")},B.prototype.destroy=function(t){t.chart&&t.chart.destroy()},B.prototype.drawChart=function(t,e,r){this.destroy(t),r.chart.renderTo=t.element.id,r.series=e,t.options.code&&window.console.log("new Highcharts.Chart("+JSON.stringify(r)+");"),t.chart=new this.library.Chart(r)};var N={},F=[],H={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},R=function(t,e,r){var n;void 0!==e?(n=e?!0===e?"right":e:"none",t.legend.position=n):r&&(t.legend.position="none")},P=function(t,e){t.title=e,t.titleTextStyle={color:"#333",fontSize:"20px"}},U=function(t,e){t.hAxis.viewWindow.min=e},V=function(t,e){t.hAxis.viewWindow.max=e},W=function(t,e){t.isStacked=e||!1},Q=function(t,e){t.hAxis.title=e,t.hAxis.titleTextStyle.italic=!1},J=function(t,e){t.vAxis.title=e,t.vAxis.titleTextStyle.italic=!1},G=o(H,R,P,function(t,e){t.vAxis.viewWindow.min=e},function(t,e){t.vAxis.viewWindow.max=e},W,Q,J),K=function(t){this.name="google",this.library=t};K.prototype.renderLineChart=function(n){var a=this;this.waitForLoaded(n,function(){var t={};!1===n.options.curve&&(t.curveType="none"),!1===n.options.points&&(t.pointSize=0);var e=G(n,n.options,t),r=a.createDataTable(n.data,n.xtype);a.drawChart(n,"LineChart",r,e)})},K.prototype.renderPieChart=function(n){var a=this;this.waitForLoaded(n,function(){var t={chartArea:{top:"10%",height:"80%"},legend:{}};n.options.colors&&(t.colors=n.options.colors),n.options.donut&&(t.pieHole=.5),"legend"in n.options&&R(t,n.options.legend),n.options.title&&P(t,n.options.title);var e=rt(rt(H,t),n.options.library||{}),r=new a.library.visualization.DataTable;r.addColumn("string",""),r.addColumn("number","Value"),r.addRows(n.data),a.drawChart(n,"PieChart",r,e)})},K.prototype.renderColumnChart=function(r){var n=this;this.waitForLoaded(r,function(){var t=G(r,r.options),e=n.createDataTable(r.data,r.xtype);n.drawChart(r,"ColumnChart",e,t)})},K.prototype.renderBarChart=function(r){var n=this;this.waitForLoaded(r,function(){var t=o(H,R,P,U,V,W,Q,J)(r,r.options,{hAxis:{gridlines:{color:"#ccc"}}}),e=n.createDataTable(r.data,r.xtype);n.drawChart(r,"BarChart",e,t)})},K.prototype.renderAreaChart=function(r){var n=this;this.waitForLoaded(r,function(){var t=G(r,r.options,{isStacked:true,pointSize:0,areaOpacity:.5}),e=n.createDataTable(r.data,r.xtype);n.drawChart(r,"AreaChart",e,t)})},K.prototype.renderGeoChart=function(n){var a=this;this.waitForLoaded(n,function(){var t={legend:"none",colorAxis:{colors:n.options.colors||["#f6c7b6","#ce502d"]}},e=rt(rt(H,t),n.options.library||{}),r=new a.library.visualization.DataTable;r.addColumn("string",""),r.addColumn("number",n.options.label||"Value"),r.addRows(n.data),a.drawChart(n,"GeoChart",r,e)})},K.prototype.renderScatterChart=function(c){var l=this;this.waitForLoaded(c,function(){var t,e,r,n,a=G(c,c.options,{}),o=c.data,i=[];for(t=0;t<o.length;t++)for(o[t].name=o[t].name||"Value",n=o[t].data,e=0;e<n.length;e++){var s=new Array(o.length+1);s[0]=n[e][0],s[t+1]=n[e][1],i.push(s)}for((r=new l.library.visualization.DataTable).addColumn("number",""),t=0;t<o.length;t++)r.addColumn("number",o[t].name);r.addRows(i),l.drawChart(c,"ScatterChart",r,a)})},K.prototype.renderTimeline=function(n){var a=this;this.waitForLoaded(n,"timeline",function(){var t={legend:"none"};n.options.colors&&(t.colors=n.options.colors);var e=rt(rt(H,t),n.options.library||{}),r=new a.library.visualization.DataTable;r.addColumn({type:"string",id:"Name"}),r.addColumn({type:"date",id:"Start"}),r.addColumn({type:"date",id:"End"}),r.addRows(n.data),n.element.style.lineHeight="normal",a.drawChart(n,"Timeline",r,e)})},K.prototype.destroy=function(t){t.chart&&t.chart.clearChart()},K.prototype.drawChart=function(t,e,r,n){this.destroy(t),t.options.code&&window.console.log("var data = new google.visualization.DataTable("+r.toJSON()+");\nvar chart = new google.visualization."+e+"(element);\nchart.draw(data, "+JSON.stringify(n)+");"),t.chart=new this.library.visualization[e](t.element),function(t){if(window.attachEvent){window.attachEvent("onresize",t)}else if(window.addEventListener){window.addEventListener("resize",t,true)}t()}(function(){t.chart.draw(r,n)})},K.prototype.waitForLoaded=function(t,e,r){var n=this;if(r||(r=e,e="corechart"),F.push({pack:e,callback:r}),N[e])this.runCallbacks();else{N[e]=!0;var a={packages:[e],callback:function(){n.runCallbacks()}},o=t.__config();o.language&&(a.language=o.language),"corechart"===e&&o.mapsApiKey&&(a.mapsApiKey=o.mapsApiKey),this.library.charts.load("current",a)}},K.prototype.runCallbacks=function(){for(var t,e=0;e<F.length;e++)t=F[e],this.library.visualization&&("corechart"===t.pack&&this.library.visualization.LineChart||"timeline"===t.pack&&this.library.visualization.Timeline)&&(t.callback(),F.splice(e,1),e--)},K.prototype.createDataTable=function(t,e){var r,n,a,o,i,s=[],c=[];for(r=0;r<t.length;r++)for(a=t[r],t[r].name=t[r].name||"Value",n=0;n<a.data.length;n++)o=a.data[n],i="datetime"===e?o[0].getTime():o[0],s[i]||(s[i]=new Array(t.length),c.push(i)),s[i][r]=nt(o[1]);var l,u=[],p=!0;for(n=0;n<c.length;n++)r=c[n],"datetime"===e?(l=new Date(nt(r)),p=p&&ct(l)):l="number"===e?nt(r):r,u.push([l].concat(s[r]));if("datetime"===e)u.sort(y);else if("number"===e){for(u.sort(m),r=0;r<u.length;r++)u[r][0]=f(u[r][0]);e="string"}var d=new this.library.visualization.DataTable;for(e="datetime"===e&&p?"date":e,d.addColumn(e,""),r=0;r<t.length;r++)d.addColumn("number",t[r].name);return d.addRows(u),d};var X=[],e=0,r=4;function Y(){if(e<r){var t=X.shift();t&&(e++,function(t,e,a){!function(t,e,r){var n=window.jQuery||window.Zepto||window.$;if(n&&n.ajax)n.ajax({dataType:"json",url:t,success:e,error:r,complete:Z});else{var a=new XMLHttpRequest;a.open("GET",t,!0),a.setRequestHeader("Content-Type","application/json"),a.onload=function(){Z(),200===a.status?e(JSON.parse(a.responseText),a.statusText,a):r(a,"error",a.statusText)},a.send()}}(t,e,function(t,e,r){var n="string"==typeof r?r:r.message;a(n)})}(t[0],t[1],t[2]),Y())}}function Z(){e--,Y()}var $={},q=[];function tt(t,e){document.body.innerText?t.innerText=e:t.textContent=e}function et(t,e,r){r||(e="Error Loading Chart: "+e),tt(t,e),t.style.color="#ff0000"}function ht(e){try{e.__render()}catch(t){throw et(e.element,t.message),t}}function ft(e,t){if("string"==typeof t)!function(t,e,r){X.push([t,e,r]),Y()}(t,function(t){e.rawData=t,ht(e)},function(t){et(e.element,t)});else if("function"==typeof t)try{t(function(t){e.rawData=t,ht(e)},function(t){et(e.element,t,!0)})}catch(t){et(e.element,t,!0)}else e.rawData=t,ht(e)}function yt(t,e,r){if(t.addEventListener)return t.addEventListener(e,r,!1),r;var n=function(){return r.call(t,window.event)};return t.attachEvent("on"+e,n),n}function t(t,e,r){t.removeEventListener?t.removeEventListener(e,r,!1):t.detachEvent("on"+e,r)}function mt(t,e){if(t===e)return!1;for(;e&&e!==t;)e=e.parentNode;return e===t}function gt(t){var e=function(t){if(t){if("Highcharts"===t.product)return B;if(t.charts)return K;if(s(t))return T}throw new Error("Unknown adapter")}(t),r=new e(t);-1===q.indexOf(r)&&q.push(r)}function bt(t,e){e.options.messages&&e.options.messages.empty&&function(t,e){{if("PieChart"===e||"GeoChart"===e||"Timeline"===e)return 0===t.length;for(var r=0;r<t.length;r++)if(0<t[r].data.length)return!1;return!0}}(e.data,t)?tt(e.element,e.options.messages.empty):(function(t,e){var r,n,a,o;for(a="render"+t,o=e.options.adapter,function(){"Chart"in window&&gt(window.Chart);"Highcharts"in window&&gt(window.Highcharts);window.google&&window.google.charts&&gt(window.google)}(),r=0;r<q.length;r++)if(n=q[r],(!o||o===n.name)&&s(n[a]))return e.adapter=n.name,(e.__adapterObject=n)[a](e);throw 0<q.length?new Error("No charting library found for "+t):new Error("No charting libraries found - be sure to include one before your charts")}(t,e),e.options.download&&!e.__downloadAttached&&"chartjs"===e.adapter&&function(r){var n=r.element,a=document.createElement("a"),o=r.options.download;!0===o?o={}:"string"==typeof o&&(o={filename:o});a.download=o.filename||"chart.png",a.style.position="absolute",a.style.top="20px",a.style.right="20px",a.style.zIndex=1e3,a.style.lineHeight="20px",a.target="_blank";var t=document.createElement("img");t.alt="Download",t.style.border="none",t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==",a.appendChild(t),n.style.position="relative",r.__downloadAttached=!0,r.__enterEvent=yt(n,"mouseover",function(t){var e=t.relatedTarget;e&&(e===this||mt(this,e))||!r.options.download||(a.href=r.toImage(o),n.appendChild(a))}),r.__leaveEvent=yt(n,"mouseout",function(t){var e=t.relatedTarget;e&&(e===this||mt(this,e))||a.parentNode&&a.parentNode.removeChild(a)})}(e))}var vt=function(t,e){return t="number"===e?nt(t):"datetime"===e?at(t):f(t)},xt=function(t,e){var r,n,a=[];for(n=0;n<t.length;n++)"bubble"===e?a.push([nt(t[n][0]),nt(t[n][1]),nt(t[n][2])]):(r=vt(t[n][0],e),a.push([r,nt(t[n][1])]));return"datetime"===e?a.sort(y):"number"===e&&a.sort(m),a};function zt(t,e){var r,n,a;for(r=0;r<t.length;r++)for(a=l(t[r].data),n=0;n<a.length;n++)if(!e(a[n][0]))return!1;return!0}function Mt(t,e,r){var n,a=t.options,o=t.rawData;for(!i(o)||"object"!=typeof o[0]||i(o[0])?(o=[{name:a.label,data:o}],t.hideLegend=!0):t.hideLegend=!1,t.xtype=e||(a.discrete?"string":function(t,e){return zt(t,p)?"number":!e&&zt(t,u)?"datetime":"string"}(o,r)),o=function(t){var e,r,n=[];for(e=0;e<t.length;e++){var a={};for(r in t[e])t[e].hasOwnProperty(r)&&(a[r]=t[e][r]);n.push(a)}return n}(o),n=0;n<o.length;n++)o[n].data=xt(l(o[n].data),t.xtype);return o}function wt(t){var e,r=l(t.rawData);for(e=0;e<r.length;e++)r[e]=[f(r[e][0]),nt(r[e][1])];return r}var At=function(t,e,r){var n;if("string"==typeof t&&(n=t,!(t=document.getElementById(t))))throw new Error("No element with id "+n);this.element=t,this.options=rt(Ct.options,r||{}),this.dataSource=e,ft(Ct.charts[t.id]=this,e),this.options.refresh&&this.startRefresh()};At.prototype.getElement=function(){return this.element},At.prototype.getDataSource=function(){return this.dataSource},At.prototype.getData=function(){return this.data},At.prototype.getOptions=function(){return this.options},At.prototype.getChartObject=function(){return this.chart},At.prototype.getAdapter=function(){return this.adapter},At.prototype.updateData=function(t,e){this.dataSource=t,e&&this.__updateOptions(e),ft(this,t)},At.prototype.setOptions=function(t){this.__updateOptions(t),this.redraw()},At.prototype.redraw=function(){ft(this,this.rawData)},At.prototype.refreshData=function(){if("string"==typeof this.dataSource){var t=-1===this.dataSource.indexOf("?")?"?":"&",e=this.dataSource+t+"_="+(new Date).getTime();ft(this,e)}else"function"==typeof this.dataSource&&ft(this,this.dataSource)},At.prototype.startRefresh=function(){var t=this,e=this.options.refresh;if(e&&"string"!=typeof this.dataSource&&"function"!=typeof this.dataSource)throw new Error("Data source must be a URL or callback for refresh");if(!this.intervalId){if(!e)throw new Error("No refresh interval");this.intervalId=setInterval(function(){t.refreshData()},1e3*e)}},At.prototype.stopRefresh=function(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)},At.prototype.toImage=function(t){if("chartjs"!==this.adapter)return null;if(t&&t.background&&"transparent"!==t.background){var e=this.chart.chart.canvas,r=this.chart.chart.ctx,n=document.createElement("canvas"),a=n.getContext("2d");return n.width=r.canvas.width,n.height=r.canvas.height,a.fillStyle=t.background,a.fillRect(0,0,n.width,n.height),a.drawImage(e,0,0),n.toDataURL("image/png")}return this.chart.toBase64Image()},At.prototype.destroy=function(){this.__adapterObject&&this.__adapterObject.destroy(this),this.__enterEvent&&t(this.element,"mouseover",this.__enterEvent),this.__leaveEvent&&t(this.element,"mouseout",this.__leaveEvent)},At.prototype.__updateOptions=function(t){var e=t.refresh&&t.refresh!==this.options.refresh;this.options=rt(Ct.options,t),e&&(this.stopRefresh(),this.startRefresh())},At.prototype.__render=function(){this.data=this.__processData(),bt(this.__chartName(),this)},At.prototype.__config=function(){return $};var Ct={LineChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return Mt(this)},e.prototype.__chartName=function(){return"LineChart"},e}(At),PieChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return wt(this)},e.prototype.__chartName=function(){return"PieChart"},e}(At),ColumnChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return Mt(this,null,!0)},e.prototype.__chartName=function(){return"ColumnChart"},e}(At),BarChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return Mt(this,null,!0)},e.prototype.__chartName=function(){return"BarChart"},e}(At),AreaChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return Mt(this)},e.prototype.__chartName=function(){return"AreaChart"},e}(At),GeoChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return wt(this)},e.prototype.__chartName=function(){return"GeoChart"},e}(At),ScatterChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return Mt(this,"number")},e.prototype.__chartName=function(){return"ScatterChart"},e}(At),BubbleChart:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){return Mt(this,"bubble")},e.prototype.__chartName=function(){return"BubbleChart"},e}(At),Timeline:function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).prototype.__processData=function(){var t,e=this.rawData;for(t=0;t<e.length;t++)e[t][1]=at(e[t][1]),e[t][2]=at(e[t][2]);return e},e.prototype.__chartName=function(){return"Timeline"},e}(At),charts:{},configure:function(t){for(var e in t)t.hasOwnProperty(e)&&($[e]=t[e])},setDefaultOptions:function(t){Ct.options=t},eachChart:function(t){for(var e in Ct.charts)Ct.charts.hasOwnProperty(e)&&t(Ct.charts[e])},config:$,options:{},adapters:q,addAdapter:gt,use:function(t){return gt(t),Ct}};return"undefined"==typeof window||window.Chartkick||(window.Chartkick=Ct),Ct.default=Ct}()}),p=t(function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}(t.exports="function"==typeof Object.keys?Object.keys:r).shim=r}),d=(p.shim,t(function(t,e){var r="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function a(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=r?n:a).supported=n,e.unsupported=a})),n=(d.supported,d.unsupported,t(function(t){var s=Array.prototype.slice,c=t.exports=function(t,e,r){return r||(r={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:function(t,e,r){var n,a;if(l(t)||l(e))return!1;if(t.prototype!==e.prototype)return!1;if(d(t))return!!d(e)&&(t=s.call(t),e=s.call(e),c(t,e,r));if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}try{var o=p(t),i=p(e)}catch(t){return!1}if(o.length!=i.length)return!1;for(o.sort(),i.sort(),n=o.length-1;0<=n;n--)if(o[n]!=i[n])return!1;for(n=o.length-1;0<=n;n--)if(a=o[n],!c(t[a],e[a],r))return!1;return typeof t==typeof e}(t,e,r))};function l(t){return null==t}function u(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(0<t.length&&"number"!=typeof t[0]))}})),a=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===o}(t)}(t)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?c(function(t){return Array.isArray(t)?[]:{}}(t),t,e):t}function s(t,e,r){return t.concat(e).map(function(t){return i(t,r)})}function c(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||s,r.isMergeableObject=r.isMergeableObject||a;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):function(e,r,n){var a={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(t){a[t]=i(e[t],n)}),Object.keys(r).forEach(function(t){n.isMergeableObject(r[t])&&e[t]?a[t]=c(e[t],r[t],n):a[t]=i(r[t],n)}),a}(t,e,r):i(e,r)}c.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,e){return c(t,e,r)},{})};function l(t,e,r){var a=["adapter","colors","curve","dataset","decimal","discrete","donut","download","label","legend","library","max","messages","min","points","prefix","refresh","stacked","suffix","thousands","title","xmax","xmin","xtitle","ytitle"];t.component(e,{props:["data","id","width","height"].concat(a),render:function(t){return t("div",{attrs:{id:this.chartId},style:this.chartStyle},["Loading..."])},data:function(){return{chartId:null}},computed:{chartStyle:function(){return this.data,this.chartOptions,{height:this.height||"300px",lineHeight:this.height||"300px",width:this.width||"100%",textAlign:"center",color:"#999",fontSize:"14px",fontFamily:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif"}},chartOptions:function(){for(var t={},e=a,r=0;r<e.length;r++){var n=e[r];void 0!==this[n]&&(t[n]=this[n])}return t}},created:function(){this.chartId=this.chartId||this.id||"chart-"+h++},mounted:function(){this.updateChart(),this.savedState=this.currentState()},updated:function(){var t=this.currentState();n(t,this.savedState)||(this.updateChart(),this.savedState=t)},beforeDestroy:function(){this.chart&&this.chart.destroy()},methods:{updateChart:function(){null!==this.data?this.chart?this.chart.updateData(this.data,this.chartOptions):this.chart=new r(this.chartId,this.data,this.chartOptions):this.chart&&(this.chart.destroy(),this.chart=null,this.$el.innerText="Loading...")},currentState:function(){return u({},{data:this.data,chartOptions:this.chartOptions})}}})}var u=c,h=1;r.version="0.5.3",r.install=function(t,e){e&&e.adapter&&r.addAdapter(e.adapter),l(t,"line-chart",r.LineChart),l(t,"pie-chart",r.PieChart),l(t,"column-chart",r.ColumnChart),l(t,"bar-chart",r.BarChart),l(t,"area-chart",r.AreaChart),l(t,"scatter-chart",r.ScatterChart),l(t,"geo-chart",r.GeoChart),l(t,"timeline",r.Timeline)};var e=r;return"undefined"!=typeof window&&window.Vue&&window.Vue.use(e),e});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).VueChartkick=e()}(this,function(){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function e(t){var e=o.call(t),r="[object Arguments]"===e;return r=r||"[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&0<=t.length&&"[object Function]"===o.call(t.callee)}var t,r,n=(function(t,e){t.exports=function(){function p(t){return Object.prototype.toString.call(t)==="[object Array]"}function a(t){return t instanceof Function}function n(t){return Object.prototype.toString.call(t)==="[object Object]"&&!a(t)&&t instanceof Object}function o(t,e){var r;for(r in e){if(r==="__proto__"){continue}if(n(e[r])||p(e[r])){if(n(e[r])&&!n(t[r])){t[r]={}}if(p(e[r])&&!p(t[r])){t[r]=[]}o(t[r],e[r])}else if(e[r]!==undefined){t[r]=e[r]}}}function Y(t,e){var r={};o(r,t);o(r,e);return r}var s=/^(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)$/i,h=/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)?(:)?(\d\d)?([.,]\d+)?($|Z|([+-])(\d\d)(:)?(\d\d)?)/i,d=String(1.5).charAt(1);function l(t){var e,r,n,o,i,a,s,l,c,f,u;f=Object.prototype.toString.call(t);if(f==="[object Date]"){return t}if(f!=="[object String]"){return}n=t.match(h);if(n){u=parseInt(n[1],10);a=parseInt(n[3],10)-1;e=parseInt(n[5],10);r=parseInt(n[7],10);i=n[9]?parseInt(n[9],10):0;c=n[11]?parseInt(n[11],10):0;o=n[12]?parseFloat(d+n[12].slice(1))*1e3:0;l=Date.UTC(u,a,e,r,i,c,o);if(n[13]&&n[14]){s=n[15]*60;if(n[17]){s+=parseInt(n[17],10)}s*=n[14]==="-"?-1:1;l-=s*60*1e3}return new Date(l)}}function y(t){var e,r,n;for(e=0;e<t.length;e++){n=t[e].data;for(r=0;r<n.length;r++){if(n[r][1]<0){return true}}}return false}function g(t){return""+t}function K(t){return parseFloat(t)}function Z(t){var e,r,n,o;if(typeof t!=="object"){if(typeof t==="number"){t=new Date(t*1e3)}else{t=g(t);if(e=t.match(s)){r=parseInt(e[1],10);n=parseInt(e[3],10)-1;o=parseInt(e[5],10);return new Date(r,n,o)}else{var i=t.replace(/ /,"T").replace(" ","").replace("UTC","Z");t=l(i)||new Date(t)}}}return t}function c(t){if(!p(t)){var e=[],r;for(r in t){if(t.hasOwnProperty(r)){e.push([r,t[r]])}}t=e}return t}function f(i,a,s,l,c,f,u,p){return function(t,e,r){var n=t.data;var o=Y({},i);o=Y(o,r||{});if(t.hideLegend||"legend"in e){a(o,e.legend,t.hideLegend)}if(e.title){s(o,e.title)}if("min"in e){l(o,e.min)}else if(!y(n)){l(o,0)}if(e.max){c(o,e.max)}if("stacked"in e){f(o,e.stacked)}if(e.colors){o.colors=e.colors}if(e.xtitle){u(o,e.xtitle)}if(e.ytitle){p(o,e.ytitle)}o=Y(o,e.library||{});return o}}function b(t,e){return t[0].getTime()-e[0].getTime()}function v(t,e){return t[0]-e[0]}function q(t,e){return t-e}function tt(t){return t.getMilliseconds()===0&&t.getSeconds()===0}function et(t){return tt(t)&&t.getMinutes()===0}function rt(t){return et(t)&&t.getHours()===0}function nt(t,e){return rt(t)&&t.getDay()===e}function ot(t){return rt(t)&&t.getDate()===1}function it(t){return ot(t)&&t.getMonth()===0}function r(t){return!isNaN(Z(t))&&g(t).length>=6}function i(t){return typeof t==="number"}function m(t,e,r,n){t=t||"";if(r.prefix){if(e<0){e=e*-1;t+="-"}t+=r.prefix}var o=r.suffix||"";var i=r.precision;var a=r.round;if(r.byteScale){var s=n?r.byteScale:e;if(s>=1099511627776){e/=1099511627776;o=" TB"}else if(s>=1073741824){e/=1073741824;o=" GB"}else if(s>=1048576){e/=1048576;o=" MB"}else if(s>=1024){e/=1024;o=" KB"}else{o=" bytes"}if(i===undefined&&a===undefined){i=3}}if(i!==undefined&&a!==undefined){throw Error("Use either round or precision, not both")}if(!n){if(i!==undefined){e=e.toPrecision(i);if(!r.zeros){e=parseFloat(e)}}if(a!==undefined){if(a<0){var l=Math.pow(10,-1*a);e=parseInt((1*e/l).toFixed(0))*l}else{e=e.toFixed(a);if(!r.zeros){e=parseFloat(e)}}}}if(r.thousands||r.decimal){e=g(e);var c=e.split(".");e=c[0];if(r.thousands){e=e.replace(/\B(?=(\d{3})+(?!\d))/g,r.thousands)}if(c.length>1){e+=(r.decimal||".")+c[1]}}return t+e+o}function at(t,e,r){if(r in e){return e[r]}else if(r in t.options){return t.options[r]}return null}function u(t){var e,r,n;for(e=0;e<t.length;e++){n=t[e].data;for(r=0;r<n.length;r++){if(n[r][1]!=0){return false}}}return true}var x={maintainAspectRatio:false,animation:false,tooltips:{displayColors:false,callbacks:{}},legend:{},title:{fontSize:20,fontColor:"#333"}},z={scales:{yAxes:[{ticks:{maxTicksLimit:4},scaleLabel:{fontSize:16,fontColor:"#333"}}],xAxes:[{gridLines:{drawOnChartArea:false},scaleLabel:{fontSize:16,fontColor:"#333"},time:{},ticks:{}}]}},st=["#3366CC","#DC3912","#FF9900","#109618","#990099","#3B3EAC","#0099C6","#DD4477","#66AA00","#B82E2E","#316395","#994499","#22AA99","#AAAA11","#6633CC","#E67300","#8B0707","#329262","#5574A6","#651067"],w=function(t,e,r){if(e!==undefined){t.legend.display=!!e;if(e&&e!==true){t.legend.position=e}}else if(r){t.legend.display=false}},M=function(t,e){t.title.display=true;t.title.text=e},t=function(t,e){if(e!==null){t.scales.yAxes[0].ticks.min=K(e)}},e=function(t,e){t.scales.yAxes[0].ticks.max=K(e)},A=function(t,e){if(e!==null){t.scales.xAxes[0].ticks.min=K(e)}},C=function(t,e){t.scales.xAxes[0].ticks.max=K(e)},S=function(t,e){t.scales.xAxes[0].stacked=!!e;t.scales.yAxes[0].stacked=!!e},_=function(t,e){t.scales.xAxes[0].scaleLabel.display=true;t.scales.xAxes[0].scaleLabel.labelString=e},O=function(t,e){t.scales.yAxes[0].scaleLabel.display=true;t.scales.yAxes[0].scaleLabel.labelString=e},lt=function(t,e){var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?"rgba("+parseInt(r[1],16)+", "+parseInt(r[2],16)+", "+parseInt(r[3],16)+", "+e+")":t},ct=function(t){return t!=null},j=function(t,e,r){var n=Math.ceil(t.element.offsetWidth/4/e.labels.length);if(n>25){n=25}else if(n<10){n=10}if(!r.scales.xAxes[0].ticks.callback){r.scales.xAxes[0].ticks.callback=function(t){t=g(t);if(t.length>n){return t.substring(0,n-2)+"..."}else{return t}}}},k=function(t,e,r){var o={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal,precision:t.options.precision,round:t.options.round,zeros:t.options.zeros};if(t.options.bytes){var n=t.data;if(r==="pie"){n=[{data:n}]}var i=0;for(var a=0;a<n.length;a++){var s=n[a];for(var l=0;l<s.data.length;l++){if(s.data[l][1]>i){i=s.data[l][1]}}}var c=1;while(i>=1024){c*=1024;i/=1024}o.byteScale=c}if(r!=="pie"){var f=e.scales.yAxes;if(r==="bar"){f=e.scales.xAxes}if(o.byteScale){if(!f[0].ticks.stepSize){f[0].ticks.stepSize=o.byteScale/2}if(!f[0].ticks.maxTicksLimit){f[0].ticks.maxTicksLimit=4}}if(!f[0].ticks.callback){f[0].ticks.callback=function(t){return m("",t,o,true)}}}if(!e.tooltips.callbacks.label){if(r==="scatter"){e.tooltips.callbacks.label=function(t,e){var r=e.datasets[t.datasetIndex].label||"";if(r){r+=": "}return r+"("+t.xLabel+", "+t.yLabel+")"}}else if(r==="bubble"){e.tooltips.callbacks.label=function(t,e){var r=e.datasets[t.datasetIndex].label||"";if(r){r+=": "}var n=e.datasets[t.datasetIndex].data[t.index];return r+"("+t.xLabel+", "+t.yLabel+", "+n.v+")"}}else if(r==="pie"){e.tooltips.callbacks.label=function(t,e){var r=e.labels[t.index];var n=": ";if(p(r)){r=r.slice();r[0]+=n}else{r+=n}return m(r,e.datasets[t.datasetIndex].data[t.index],o)}}else{var u=r==="bar"?"xLabel":"yLabel";e.tooltips.callbacks.label=function(t,e){var r=e.datasets[t.datasetIndex].label||"";if(r){r+=": "}return m(r,t[u],o)}}}},T=f(Y(x,z),w,M,t,e,S,_,O),D=function(t,e,r,n){var o=[];var i=[];var a=t.options.colors||st;var s=true;var l=true;var c;var f=true;var u=true;var p=true;var h=true;var d=t.data;var y=0;if(r==="bubble"){for(var g=0;g<d.length;g++){var b=d[g];for(var v=0;v<b.data.length;v++){if(b.data[v][2]>y){y=b.data[v][2]}}}}var m,x,z,w,M,A=[],C=[];if(r==="bar"||r==="column"||t.xtype!=="number"&&t.xtype!=="bubble"){var S=[];for(m=0;m<d.length;m++){z=d[m];for(x=0;x<z.data.length;x++){w=z.data[x];M=t.xtype=="datetime"?w[0].getTime():w[0];if(!A[M]){A[M]=new Array(d.length)}A[M][m]=K(w[1]);if(S.indexOf(M)===-1){S.push(M)}}}if(t.xtype==="datetime"||t.xtype==="number"){S.sort(q)}for(x=0;x<d.length;x++){C.push([])}var _;var O;for(O=0;O<S.length;O++){m=S[O];if(t.xtype==="datetime"){_=new Date(K(m));s=s&&rt(_);if(!c){c=_.getDay()}l=l&&nt(_,c);f=f&&ot(_);u=u&&it(_);p=p&&et(_);h=h&&tt(_)}else{_=m}i.push(_);for(x=0;x<d.length;x++){C[x].push(A[m][x]===undefined?null:A[m][x])}}}else{for(var j=0;j<d.length;j++){var k=d[j];var T=[];for(var D=0;D<k.data.length;D++){var E={x:K(k.data[D][0]),y:K(k.data[D][1])};if(r==="bubble"){E.r=K(k.data[D][2])*20/y;E.v=k.data[D][2]}T.push(E)}C.push(T)}}for(m=0;m<d.length;m++){z=d[m];var L=z.color||a[m];var I=r!=="line"?lt(L,.5):L;var F={label:z.name||"",data:C[m],fill:r==="area",borderColor:L,backgroundColor:I,pointBackgroundColor:L,borderWidth:2,pointHoverBackgroundColor:L};if(z.stack){F.stack=z.stack}var B=at(t,z,"curve");if(B===false){F.lineTension=0}var P=at(t,z,"points");if(P===false){F.pointRadius=0;F.pointHitRadius=5}F=Y(F,t.options.dataset||{});F=Y(F,z.library||{});F=Y(F,z.dataset||{});o.push(F)}var R=t.options.xmin;var N=t.options.xmax;if(t.xtype==="datetime"){var $="math"in n.helpers;var H=$?"ticks":"time";if(ct(R)){e.scales.xAxes[0][H].min=Z(R).getTime()}if(ct(N)){e.scales.xAxes[0][H].max=Z(N).getTime()}}else if(t.xtype==="number"){if(ct(R)){e.scales.xAxes[0].ticks.min=R}if(ct(N)){e.scales.xAxes[0].ticks.max=N}}if(t.xtype==="datetime"&&i.length>0){var U=(ct(R)?Z(R):i[0]).getTime();var V=(ct(N)?Z(N):i[0]).getTime();for(m=1;m<i.length;m++){var W=i[m].getTime();if(W<U){U=W}if(W>V){V=W}}var Q=(V-U)/(86400*1e3);if(!e.scales.xAxes[0].time.unit){var J;if(u||Q>365*10){e.scales.xAxes[0].time.unit="year";J=365}else if(f||Q>30*10){e.scales.xAxes[0].time.unit="month";J=30}else if(s||Q>10){e.scales.xAxes[0].time.unit="day";J=1}else if(p||Q>.5){e.scales.xAxes[0].time.displayFormats={hour:"MMM D, h a"};e.scales.xAxes[0].time.unit="hour";J=1/24}else if(h){e.scales.xAxes[0].time.displayFormats={minute:"h:mm a"};e.scales.xAxes[0].time.unit="minute";J=1/24/60}if(J&&Q>0){var G=Math.ceil(Q/J/(t.element.offsetWidth/100));if(l&&J===1){G=Math.ceil(G/7)*7}e.scales.xAxes[0].time.unitStepSize=G}}if(!e.scales.xAxes[0].time.tooltipFormat){if(s){e.scales.xAxes[0].time.tooltipFormat="ll"}else if(p){e.scales.xAxes[0].time.tooltipFormat="MMM D, h a"}else if(h){e.scales.xAxes[0].time.tooltipFormat="h:mm a"}}}var X={labels:i,datasets:o};return X},E=function t(e){this.name="chartjs";this.library=e};E.prototype.renderLineChart=function t(e,r){var n={};if(!e.options.max&&u(e.data)){n.max=1}var o=T(e,Y(n,e.options));k(e,o,r);var i=D(e,o,r||"line",this.library);if(e.xtype==="number"){o.scales.xAxes[0].type="linear";o.scales.xAxes[0].position="bottom"}else{o.scales.xAxes[0].type=e.xtype==="string"?"category":"time"}this.drawChart(e,"line",i,o)},E.prototype.renderPieChart=function t(e){var r=Y({},x);if(e.options.donut){r.cutoutPercentage=50}if("legend"in e.options){w(r,e.options.legend)}if(e.options.title){M(r,e.options.title)}r=Y(r,e.options.library||{});k(e,r,"pie");var n=[];var o=[];for(var i=0;i<e.data.length;i++){var a=e.data[i];n.push(a[0]);o.push(a[1])}var s={data:o,backgroundColor:e.options.colors||st};s=Y(s,e.options.dataset||{});var l={labels:n,datasets:[s]};this.drawChart(e,"pie",l,r)},E.prototype.renderColumnChart=function t(e,r){var n;if(r==="bar"){var o=Y(x,z);delete o.scales.yAxes[0].ticks.maxTicksLimit;n=f(o,w,M,A,C,S,_,O)(e,e.options)}else{n=T(e,e.options)}k(e,n,r);var i=D(e,n,"column",this.library);if(r!=="bar"){j(e,i,n)}this.drawChart(e,r==="bar"?"horizontalBar":"bar",i,n)},E.prototype.renderAreaChart=function t(e){this.renderLineChart(e,"area")},E.prototype.renderBarChart=function t(e){this.renderColumnChart(e,"bar")},E.prototype.renderScatterChart=function t(e,r){r=r||"scatter";var n=T(e,e.options);k(e,n,r);if(!("showLines"in n)){n.showLines=false}var o=D(e,n,r,this.library);n.scales.xAxes[0].type="linear";n.scales.xAxes[0].position="bottom";this.drawChart(e,r,o,n)},E.prototype.renderBubbleChart=function t(e){this.renderScatterChart(e,"bubble")},E.prototype.destroy=function t(e){if(e.chart){e.chart.destroy()}},E.prototype.drawChart=function t(e,r,n,o){this.destroy(e);var i={type:r,data:n,options:o};if(e.options.code){window.console.log("new Chart(ctx, "+JSON.stringify(i)+");")}e.element.innerHTML="<canvas></canvas>";var a=e.element.getElementsByTagName("CANVAS")[0];e.chart=new this.library(a,i)};var L={chart:{},xAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},yAxis:{title:{text:null},labels:{style:{fontSize:"12px"}}},title:{text:null},credits:{enabled:false},legend:{borderWidth:0},tooltip:{style:{fontSize:"12px"}},plotOptions:{areaspline:{},area:{},series:{marker:{}}}},I=function(t,e,r){if(e!==undefined){t.legend.enabled=!!e;if(e&&e!==true){if(e==="top"||e==="bottom"){t.legend.verticalAlign=e}else{t.legend.layout="vertical";t.legend.verticalAlign="middle";t.legend.align=e}}}else if(r){t.legend.enabled=false}},F=function(t,e){t.title.text=e},B,P,R,N,$,H=f(L,I,F,function(t,e){t.yAxis.min=e},function(t,e){t.yAxis.max=e},function(t,e){var r=e?e===true?"normal":e:null;t.plotOptions.series.stacking=r;t.plotOptions.area.stacking=r;t.plotOptions.areaspline.stacking=r},function(t,e){t.xAxis.title.text=e},function(t,e){t.yAxis.title.text=e}),U=function(t,e,r){var n={prefix:t.options.prefix,suffix:t.options.suffix,thousands:t.options.thousands,decimal:t.options.decimal,precision:t.options.precision,round:t.options.round,zeros:t.options.zeros};if(r!=="pie"&&!e.yAxis.labels.formatter){e.yAxis.labels.formatter=function(){return m("",this.value,n)}}if(!e.tooltip.pointFormatter){e.tooltip.pointFormatter=function(){return'<span style="color:'+this.color+'">●</span> '+m(this.series.name+": <b>",this.y,n)+"</b><br/>"}}},V=function t(e){this.name="highcharts";this.library=e};V.prototype.renderLineChart=function t(e,r){r=r||"spline";var n={};if(r==="areaspline"){n={plotOptions:{areaspline:{stacking:"normal"},area:{stacking:"normal"},series:{marker:{enabled:false}}}}}if(e.options.curve===false){if(r==="areaspline"){r="area"}else if(r==="spline"){r="line"}}var o=H(e,e.options,n),i,a,s;o.xAxis.type=e.xtype==="string"?"category":e.xtype==="number"?"linear":"datetime";if(!o.chart.type){o.chart.type=r}U(e,o,r);var l=e.data;for(a=0;a<l.length;a++){l[a].name=l[a].name||"Value";i=l[a].data;if(e.xtype==="datetime"){for(s=0;s<i.length;s++){i[s][0]=i[s][0].getTime()}}l[a].marker={symbol:"circle"};if(e.options.points===false){l[a].marker.enabled=false}}this.drawChart(e,l,o)},V.prototype.renderScatterChart=function t(e){var r=H(e,e.options,{});r.chart.type="scatter";this.drawChart(e,e.data,r)},V.prototype.renderPieChart=function t(e){var r=Y(L,{});if(e.options.colors){r.colors=e.options.colors}if(e.options.donut){r.plotOptions={pie:{innerSize:"50%"}}}if("legend"in e.options){I(r,e.options.legend)}if(e.options.title){F(r,e.options.title)}var n=Y(r,e.options.library||{});U(e,n,"pie");var o=[{type:"pie",name:e.options.label||"Value",data:e.data}];this.drawChart(e,o,n)},V.prototype.renderColumnChart=function t(e,r){r=r||"column";var n=e.data;var o=H(e,e.options),i,a,s,l,c=[],f=[];o.chart.type=r;U(e,o,r);for(i=0;i<n.length;i++){s=n[i];for(a=0;a<s.data.length;a++){l=s.data[a];if(!c[l[0]]){c[l[0]]=new Array(n.length);f.push(l[0])}c[l[0]][i]=l[1]}}if(e.xtype==="number"){f.sort(q)}o.xAxis.categories=f;var u=[],p;for(i=0;i<n.length;i++){l=[];for(a=0;a<f.length;a++){l.push(c[f[a]][i]||0)}p={name:n[i].name||"Value",data:l};if(n[i].stack){p.stack=n[i].stack}u.push(p)}this.drawChart(e,u,o)},V.prototype.renderBarChart=function t(e){this.renderColumnChart(e,"bar")},V.prototype.renderAreaChart=function t(e){this.renderLineChart(e,"areaspline")},V.prototype.destroy=function t(e){if(e.chart){e.chart.destroy()}},V.prototype.drawChart=function t(e,r,n){this.destroy(e);n.chart.renderTo=e.element.id;n.series=r;if(e.options.code){window.console.log("new Highcharts.Chart("+JSON.stringify(n)+");")}e.chart=new this.library.Chart(n)};var W={},Q=[],J={chartArea:{},fontName:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif",pointSize:6,legend:{textStyle:{fontSize:12,color:"#444"},alignment:"center",position:"right"},curveType:"function",hAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},gridlines:{color:"transparent"},baselineColor:"#ccc",viewWindow:{}},vAxis:{textStyle:{color:"#666",fontSize:12},titleTextStyle:{},baselineColor:"#ccc",viewWindow:{}},tooltip:{textStyle:{color:"#666",fontSize:12}}},G=function(t,e,r){if(e!==undefined){var n;if(!e){n="none"}else if(e===true){n="right"}else{n=e}t.legend.position=n}else if(r){t.legend.position="none"}},X=function(t,e){t.title=e;t.titleTextStyle={color:"#333",fontSize:"20px"}},ft,ut,pt=function(t,e){t.hAxis.viewWindow.min=e},ht=function(t,e){t.hAxis.viewWindow.max=e},dt=function(t,e){t.isStacked=e?e:false},yt=function(t,e){t.hAxis.title=e;t.hAxis.titleTextStyle.italic=false},gt=function(t,e){t.vAxis.title=e;t.vAxis.titleTextStyle.italic=false},bt=f(J,G,X,function(t,e){t.vAxis.viewWindow.min=e},function(t,e){t.vAxis.viewWindow.max=e},dt,yt,gt),vt=function(t){if(window.attachEvent){window.attachEvent("onresize",t)}else if(window.addEventListener){window.addEventListener("resize",t,true)}t()},mt=function t(e){this.name="google";this.library=e};mt.prototype.renderLineChart=function t(n){var o=this;this.waitForLoaded(n,function(){var t={};if(n.options.curve===false){t.curveType="none"}if(n.options.points===false){t.pointSize=0}var e=bt(n,n.options,t);var r=o.createDataTable(n.data,n.xtype);o.drawChart(n,"LineChart",r,e)})},mt.prototype.renderPieChart=function t(n){var o=this;this.waitForLoaded(n,function(){var t={chartArea:{top:"10%",height:"80%"},legend:{}};if(n.options.colors){t.colors=n.options.colors}if(n.options.donut){t.pieHole=.5}if("legend"in n.options){G(t,n.options.legend)}if(n.options.title){X(t,n.options.title)}var e=Y(Y(J,t),n.options.library||{});var r=new o.library.visualization.DataTable;r.addColumn("string","");r.addColumn("number","Value");r.addRows(n.data);o.drawChart(n,"PieChart",r,e)})},mt.prototype.renderColumnChart=function t(r){var n=this;this.waitForLoaded(r,function(){var t=bt(r,r.options);var e=n.createDataTable(r.data,r.xtype);n.drawChart(r,"ColumnChart",e,t)})},mt.prototype.renderBarChart=function t(n){var o=this;this.waitForLoaded(n,function(){var t={hAxis:{gridlines:{color:"#ccc"}}};var e=f(J,G,X,pt,ht,dt,yt,gt)(n,n.options,t);var r=o.createDataTable(n.data,n.xtype);o.drawChart(n,"BarChart",r,e)})},mt.prototype.renderAreaChart=function t(n){var o=this;this.waitForLoaded(n,function(){var t={isStacked:true,pointSize:0,areaOpacity:.5};var e=bt(n,n.options,t);var r=o.createDataTable(n.data,n.xtype);o.drawChart(n,"AreaChart",r,e)})},mt.prototype.renderGeoChart=function t(n){var o=this;this.waitForLoaded(n,function(){var t={legend:"none",colorAxis:{colors:n.options.colors||["#f6c7b6","#ce502d"]}};var e=Y(Y(J,t),n.options.library||{});var r=new o.library.visualization.DataTable;r.addColumn("string","");r.addColumn("number",n.options.label||"Value");r.addRows(n.data);o.drawChart(n,"GeoChart",r,e)})},mt.prototype.renderScatterChart=function t(c){var f=this;this.waitForLoaded(c,function(){var t={};var e=bt(c,c.options,t);var r=c.data,n=[],o,i,a,s;for(o=0;o<r.length;o++){r[o].name=r[o].name||"Value";s=r[o].data;for(i=0;i<s.length;i++){var l=new Array(r.length+1);l[0]=s[i][0];l[o+1]=s[i][1];n.push(l)}}a=new f.library.visualization.DataTable;a.addColumn("number","");for(o=0;o<r.length;o++){a.addColumn("number",r[o].name)}a.addRows(n);f.drawChart(c,"ScatterChart",a,e)})},mt.prototype.renderTimeline=function t(n){var o=this;this.waitForLoaded(n,"timeline",function(){var t={legend:"none"};if(n.options.colors){t.colors=n.options.colors}var e=Y(Y(J,t),n.options.library||{});var r=new o.library.visualization.DataTable;r.addColumn({type:"string",id:"Name"});r.addColumn({type:"date",id:"Start"});r.addColumn({type:"date",id:"End"});r.addRows(n.data);n.element.style.lineHeight="normal";o.drawChart(n,"Timeline",r,e)})},mt.prototype.destroy=function t(e){if(e.chart){e.chart.clearChart()}},mt.prototype.drawChart=function t(e,r,n,o){this.destroy(e);if(e.options.code){window.console.log("var data = new google.visualization.DataTable("+n.toJSON()+");\nvar chart = new google.visualization."+r+"(element);\nchart.draw(data, "+JSON.stringify(o)+");")}e.chart=new this.library.visualization[r](e.element);vt(function(){e.chart.draw(n,o)})},mt.prototype.waitForLoaded=function t(e,r,n){var o=this;if(!n){n=r;r="corechart"}Q.push({pack:r,callback:n});if(W[r]){this.runCallbacks()}else{W[r]=true;var i={packages:[r],callback:function(){o.runCallbacks()}};var a=e.__config();if(a.language){i.language=a.language}if(r==="corechart"&&a.mapsApiKey){i.mapsApiKey=a.mapsApiKey}this.library.charts.load("current",i)}},mt.prototype.runCallbacks=function t(){var e,r;for(var n=0;n<Q.length;n++){e=Q[n];r=this.library.visualization&&(e.pack==="corechart"&&this.library.visualization.LineChart||e.pack==="timeline"&&this.library.visualization.Timeline);if(r){e.callback();Q.splice(n,1);n--}}},mt.prototype.createDataTable=function t(e,r){var n,o,i,a,s,l=[],c=[];for(n=0;n<e.length;n++){i=e[n];e[n].name=e[n].name||"Value";for(o=0;o<i.data.length;o++){a=i.data[o];s=r==="datetime"?a[0].getTime():a[0];if(!l[s]){l[s]=new Array(e.length);c.push(s)}l[s][n]=K(a[1])}}var f=[];var u=true;var p;for(o=0;o<c.length;o++){n=c[o];if(r==="datetime"){p=new Date(K(n));u=u&&rt(p)}else if(r==="number"){p=K(n)}else{p=n}f.push([p].concat(l[n]))}if(r==="datetime"){f.sort(b)}else if(r==="number"){f.sort(v);for(n=0;n<f.length;n++){f[n][0]=g(f[n][0])}r="string"}var h=new this.library.visualization.DataTable;r=r==="datetime"&&u?"date":r;h.addColumn(r,"");for(n=0;n<e.length;n++){h.addColumn("number",e[n].name)}h.addRows(f);return h};var xt=[],zt=0,wt=4;function Mt(t,e,r){xt.push([t,e,r]);At()}function At(){if(zt<wt){var t=xt.shift();if(t){zt++;St(t[0],t[1],t[2]);At()}}}function Ct(){zt--;At()}function St(t,e,o){_t(t,e,function(t,e,r){var n=typeof r==="string"?r:r.message;o(n)})}function _t(t,e,r){var n=window.jQuery||window.Zepto||window.$;if(n&&n.ajax){n.ajax({dataType:"json",url:t,success:e,error:r,complete:Ct})}else{var o=new XMLHttpRequest;o.open("GET",t,true);o.setRequestHeader("Content-Type","application/json");o.onload=function(){Ct();if(o.status===200){e(JSON.parse(o.responseText),o.statusText,o)}else{r(o,"error",o.statusText)}};o.send()}}var Ot={},jt=[];function kt(t,e){if(document.body.innerText){t.innerText=e}else{t.textContent=e}}function Tt(t,e,r){if(!r){e="Error Loading Chart: "+e}kt(t,e);t.style.color="#ff0000"}function Dt(e){try{e.__render()}catch(t){Tt(e.element,t.message);throw t}}function Et(e,t){if(typeof t==="string"){Mt(t,function(t){e.rawData=t;Dt(e)},function(t){Tt(e.element,t)})}else if(typeof t==="function"){try{t(function(t){e.rawData=t;Dt(e)},function(t){Tt(e.element,t,true)})}catch(t){Tt(e.element,t,true)}}else{e.rawData=t;Dt(e)}}function Lt(r){var n=r.element;var o=document.createElement("a");var i=r.options.download;if(i===true){i={}}else if(typeof i==="string"){i={filename:i}}o.download=i.filename||"chart.png";o.style.position="absolute";o.style.top="20px";o.style.right="20px";o.style.zIndex=1e3;o.style.lineHeight="20px";o.target="_blank";var t=document.createElement("img");t.alt="Download";t.style.border="none";t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==";o.appendChild(t);n.style.position="relative";r.__downloadAttached=true;r.__enterEvent=It(n,"mouseover",function(t){var e=t.relatedTarget;if((!e||e!==this&&!Bt(this,e))&&r.options.download){o.href=r.toImage(i);n.appendChild(o)}});r.__leaveEvent=It(n,"mouseout",function(t){var e=t.relatedTarget;if(!e||e!==this&&!Bt(this,e)){if(o.parentNode){o.parentNode.removeChild(o)}}})}function It(t,e,r){if(t.addEventListener){t.addEventListener(e,r,false);return r}else{var n=function(){return r.call(t,window.event)};t.attachEvent("on"+e,n);return n}}function Ft(t,e,r){if(t.removeEventListener){t.removeEventListener(e,r,false)}else{t.detachEvent("on"+e,r)}}function Bt(t,e){if(t===e){return false}while(e&&e!==t){e=e.parentNode}return e===t}function Pt(t){if(t){if(t.product==="Highcharts"){return V}else if(t.charts){return mt}else if(a(t)){return E}}throw new Error("Unknown adapter")}function Rt(t){var e=Pt(t);var r=new e(t);if(jt.indexOf(r)===-1){jt.push(r)}}function Nt(){if("Chart"in window){Rt(window.Chart)}if("Highcharts"in window){Rt(window.Highcharts)}if(window.google&&window.google.charts){Rt(window.google)}}function $t(t,e){if(e==="PieChart"||e==="GeoChart"||e==="Timeline"){return t.length===0}else{for(var r=0;r<t.length;r++){if(t[r].data.length>0){return false}}return true}}function Ht(t,e){if(e.options.messages&&e.options.messages.empty&&$t(e.data,t)){kt(e.element,e.options.messages.empty)}else{Ut(t,e);if(e.options.download&&!e.__downloadAttached&&e.adapter==="chartjs"){Lt(e)}}}function Ut(t,e){var r,n,o,i;o="render"+t;i=e.options.adapter;Nt();for(r=0;r<jt.length;r++){n=jt[r];if((!i||i===n.name)&&a(n[o])){e.adapter=n.name;e.__adapterObject=n;return n[o](e)}}if(jt.length>0){throw new Error("No charting library found for "+t)}else{throw new Error("No charting libraries found - be sure to include one before your charts")}}var Vt=function(t,e){if(e==="number"){t=K(t)}else if(e==="datetime"){t=Z(t)}else{t=g(t)}return t},Wt=function(t,e){var r=[],n,o;for(o=0;o<t.length;o++){if(e==="bubble"){r.push([K(t[o][0]),K(t[o][1]),K(t[o][2])])}else{n=Vt(t[o][0],e);r.push([n,K(t[o][1])])}}if(e==="datetime"){r.sort(b)}else if(e==="number"){r.sort(v)}return r};function Qt(t,e){if(Jt(t,i)){return"number"}else if(!e&&Jt(t,r)){return"datetime"}else{return"string"}}function Jt(t,e){var r,n,o;for(r=0;r<t.length;r++){o=c(t[r].data);for(n=0;n<o.length;n++){if(!e(o[n][0])){return false}}}return true}function Gt(t){var e=[],r,n;for(r=0;r<t.length;r++){var o={};for(n in t[r]){if(t[r].hasOwnProperty(n)){o[n]=t[r][n]}}e.push(o)}return e}function Xt(t,e,r){var n;var o=t.options;var i=t.rawData;if(!p(i)||typeof i[0]!=="object"||p(i[0])){i=[{name:o.label,data:i}];t.hideLegend=true}else{t.hideLegend=false}t.xtype=e?e:o.discrete?"string":Qt(i,r);i=Gt(i);for(n=0;n<i.length;n++){i[n].data=Wt(c(i[n].data),t.xtype)}return i}function Yt(t){var e=c(t.rawData),r;for(r=0;r<e.length;r++){e[r]=[g(e[r][0]),K(e[r][1])]}return e}var Kt=function t(e,r,n){var o;if(typeof e==="string"){o=e;e=document.getElementById(e);if(!e){throw new Error("No element with id "+o)}}this.element=e;this.options=Y(se.options,n||{});this.dataSource=r;se.charts[e.id]=this;Et(this,r);if(this.options.refresh){this.startRefresh()}};Kt.prototype.getElement=function t(){return this.element},Kt.prototype.getDataSource=function t(){return this.dataSource},Kt.prototype.getData=function t(){return this.data},Kt.prototype.getOptions=function t(){return this.options},Kt.prototype.getChartObject=function t(){return this.chart},Kt.prototype.getAdapter=function t(){return this.adapter},Kt.prototype.updateData=function t(e,r){this.dataSource=e;if(r){this.__updateOptions(r)}Et(this,e)},Kt.prototype.setOptions=function t(e){this.__updateOptions(e);this.redraw()},Kt.prototype.redraw=function t(){Et(this,this.rawData)},Kt.prototype.refreshData=function t(){if(typeof this.dataSource==="string"){var e=this.dataSource.indexOf("?")===-1?"?":"&";var r=this.dataSource+e+"_="+(new Date).getTime();Et(this,r)}else if(typeof this.dataSource==="function"){Et(this,this.dataSource)}},Kt.prototype.startRefresh=function t(){var e=this;var r=this.options.refresh;if(r&&typeof this.dataSource!=="string"&&typeof this.dataSource!=="function"){throw new Error("Data source must be a URL or callback for refresh")}if(!this.intervalId){if(r){this.intervalId=setInterval(function(){e.refreshData()},r*1e3)}else{throw new Error("No refresh interval")}}},Kt.prototype.stopRefresh=function t(){if(this.intervalId){clearInterval(this.intervalId);this.intervalId=null}},Kt.prototype.toImage=function t(e){if(this.adapter==="chartjs"){if(e&&e.background&&e.background!=="transparent"){var r=this.chart.chart.canvas;var n=this.chart.chart.ctx;var o=document.createElement("canvas");var i=o.getContext("2d");o.width=n.canvas.width;o.height=n.canvas.height;i.fillStyle=e.background;i.fillRect(0,0,o.width,o.height);i.drawImage(r,0,0);return o.toDataURL("image/png")}else{return this.chart.toBase64Image()}}else{return null}},Kt.prototype.destroy=function t(){if(this.__adapterObject){this.__adapterObject.destroy(this)}if(this.__enterEvent){Ft(this.element,"mouseover",this.__enterEvent)}if(this.__leaveEvent){Ft(this.element,"mouseout",this.__leaveEvent)}},Kt.prototype.__updateOptions=function t(e){var r=e.refresh&&e.refresh!==this.options.refresh;this.options=Y(se.options,e);if(r){this.stopRefresh();this.startRefresh()}},Kt.prototype.__render=function t(){this.data=this.__processData();Ht(this.__chartName(),this)},Kt.prototype.__config=function t(){return Ot};var Zt,qt,te,ee,re,ne,oe,ie,ae,se={LineChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Xt(this)};e.prototype.__chartName=function t(){return"LineChart"};return e}(Kt),PieChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Yt(this)};e.prototype.__chartName=function t(){return"PieChart"};return e}(Kt),ColumnChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Xt(this,null,true)};e.prototype.__chartName=function t(){return"ColumnChart"};return e}(Kt),BarChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Xt(this,null,true)};e.prototype.__chartName=function t(){return"BarChart"};return e}(Kt),AreaChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Xt(this)};e.prototype.__chartName=function t(){return"AreaChart"};return e}(Kt),GeoChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Yt(this)};e.prototype.__chartName=function t(){return"GeoChart"};return e}(Kt),ScatterChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Xt(this,"number")};e.prototype.__chartName=function t(){return"ScatterChart"};return e}(Kt),BubbleChart:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){return Xt(this,"bubble")};e.prototype.__chartName=function t(){return"BubbleChart"};return e}(Kt),Timeline:function(t){function e(){t.apply(this,arguments)}if(t){e.__proto__=t}e.prototype=Object.create(t&&t.prototype);e.prototype.constructor=e;e.prototype.__processData=function t(){var e,r=this.rawData;for(e=0;e<r.length;e++){r[e][1]=Z(r[e][1]);r[e][2]=Z(r[e][2])}return r};e.prototype.__chartName=function t(){return"Timeline"};return e}(Kt),charts:{},configure:function(t){for(var e in t){if(t.hasOwnProperty(e)){Ot[e]=t[e]}}},setDefaultOptions:function(t){se.options=t},eachChart:function(t){for(var e in se.charts){if(se.charts.hasOwnProperty(e)){t(se.charts[e])}}},config:Ot,options:{},adapters:jt,addAdapter:Rt,use:function(t){Rt(t);return se}};if(typeof window!=="undefined"&&!window.Chartkick){window.Chartkick=se}return se.default=se}()}(t={exports:{}},t.exports),t.exports),o=Object.prototype.toString;if(!Object.keys){var p=Object.prototype.hasOwnProperty,h=Object.prototype.toString,d=e,i=Object.prototype.propertyIsEnumerable,y=!i.call({toString:null},"toString"),g=i.call(function(){},"prototype"),b=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],v=function(t){var e=t.constructor;return e&&e.prototype===t},a={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},m=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!a["$"+t]&&p.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{v(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===h.call(t),n=d(t),o=e&&"[object String]"===h.call(t),i=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=g&&r;if(o&&0<t.length&&!p.call(t,0))for(var s=0;s<t.length;++s)i.push(String(s));if(n&&0<t.length)for(var l=0;l<t.length;++l)i.push(String(l));else for(var c in t)a&&"prototype"===c||!p.call(t,c)||i.push(String(c));if(y)for(var f=function(t){if("undefined"==typeof window||!m)return v(t);try{return v(t)}catch(t){return!1}}(t),u=0;u<b.length;++u)f&&"constructor"===b[u]||!p.call(t,b[u])||i.push(b[u]);return i}}var s=r,l=Array.prototype.slice,c=Object.keys,f=c?function(t){return c(t)}:s,u=Object.keys;f.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return e(t)?u(l.call(t)):u(t)}):Object.keys=f;return Object.keys||f};function x(t){return!(M&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===A.call(t)}function z(t){return!!x(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&0<=t.length&&"[object Array]"!==A.call(t)&&"[object Function]"===A.call(t.callee)}var w=f,M="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,A=Object.prototype.toString,C=function(){return x(arguments)}();x.isLegacyArguments=z;function S(t){return t!=t}function _(t,e,r,n){e in t&&(!function(t){return"function"==typeof t&&"[object Function]"===N.call(t)}(n)||!n())||(U?H(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)}function O(t,e){var r=2<arguments.length?arguments[2]:{},n=w(e);R&&(n=$.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)_(t,n[o],e[n[o]],r[n[o]])}var j=C?x:z,k=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!S(t)||!S(e))},T=Array.prototype.slice,D=Object.prototype.toString,E=(Function.prototype.bind||function(e){var r=this;if("function"!=typeof r||"[object Function]"!==D.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var n,o=T.call(arguments,1),t=Math.max(0,r.length-o.length),i=[],a=0;a<t;a++)i.push("$"+a);if(n=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var t=r.apply(this,o.concat(T.call(arguments)));return Object(t)===t?t:this}return r.apply(e,o.concat(T.call(arguments)))}),r.prototype){var s=function(){};s.prototype=r.prototype,n.prototype=new s,s.prototype=null}return n}).call(Function.call,Object.prototype.hasOwnProperty),L=RegExp.prototype.exec,I=Object.getOwnPropertyDescriptor,F=Object.prototype.toString,B="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,P=function(t){if(!t||"object"!=typeof t)return!1;if(!B)return"[object RegExp]"===F.call(t);var e=I(t,"lastIndex");return!(!e||!E(e,"value"))&&function(t){try{var e=t.lastIndex;return t.lastIndex=0,L.call(t),!0}catch(t){return!1}finally{t.lastIndex=e}}(t)},R="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),N=Object.prototype.toString,$=Array.prototype.concat,H=Object.defineProperty,U=H&&function(){var t={};try{for(var e in H(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}();O.supportsDescriptors=!!U;function V(){if(null!=this&&this!==J(this))throw new G("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}function W(){if(!X)throw new K("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=Y(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof/a/.dotAll)return t.get}return V}var Q=O,J=Object,G=TypeError,X=Q.supportsDescriptors,Y=Object.getOwnPropertyDescriptor,K=TypeError,Z=Q.supportsDescriptors,q=Object.getOwnPropertyDescriptor,tt=Object.defineProperty,et=TypeError,rt=Object.getPrototypeOf,nt=/a/,ot=Function.call.bind(V);Q(ot,{getPolyfill:W,implementation:V,shim:function(){if(!Z||!rt)throw new et("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=W(),e=rt(nt),r=q(e,"flags");return r&&r.get===t||tt(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}});var it=ot,at=Date.prototype.getDay,st=Object.prototype.toString,lt="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,ct=function(t){return"object"==typeof t&&null!==t&&(lt?function(t){try{return at.call(t),!0}catch(t){return!1}}(t):"[object Date]"===st.call(t))},ft=Date.prototype.getTime;function ut(t,e,r){var n=r||{};return!(n.strict?!k(t,e):t!==e)||(!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?k(t,e):t==e:function(t,e,r){var n,o;if(typeof t!=typeof e)return!1;if(pt(t)||pt(e))return!1;if(t.prototype!==e.prototype)return!1;if(j(t)!==j(e))return!1;var i=P(t),a=P(e);if(i!==a)return!1;if(i||a)return t.source===e.source&&it(t)===it(e);if(ct(t)&&ct(e))return ft.call(t)===ft.call(e);var s=ht(t),l=ht(e);if(s!==l)return!1;if(s||l){if(t.length!==e.length)return!1;for(n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}if(typeof t!=typeof e)return!1;try{var c=w(t),f=w(e)}catch(t){return!1}if(c.length!==f.length)return!1;for(c.sort(),f.sort(),n=c.length-1;0<=n;n--)if(c[n]!=f[n])return!1;for(n=c.length-1;0<=n;n--)if(o=c[n],!ut(t[o],e[o],r))return!1;return!0}(t,e,n))}function pt(t){return null==t}function ht(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(0<t.length&&"number"!=typeof t[0]))}var dt=ut,yt=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===gt}(t)}(t)};var gt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function bt(t,e){return!1!==e.clone&&e.isMergeableObject(t)?wt(function(t){return Array.isArray(t)?[]:{}}(t),t,e):t}function vt(t,e,r){return t.concat(e).map(function(t){return bt(t,r)})}function mt(t){return Object.keys(t).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(t))}function xt(t,e){try{return e in t}catch(t){return!1}}function zt(e,r,n){var o={};return n.isMergeableObject(e)&&mt(e).forEach(function(t){o[t]=bt(e[t],n)}),mt(r).forEach(function(t){!function(t,e){return xt(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}(e,t)&&(xt(e,t)&&n.isMergeableObject(r[t])?o[t]=function(t,e){if(!e.customMerge)return wt;var r=e.customMerge(t);return"function"==typeof r?r:wt}(t,n)(e[t],r[t],n):o[t]=bt(r[t],n))}),o}function wt(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||vt,r.isMergeableObject=r.isMergeableObject||yt,r.cloneUnlessOtherwiseSpecified=bt;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):zt(t,e,r):bt(e,r)}wt.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(t,e){return wt(t,e,r)},{})};function Mt(t,e,r){var o=["adapter","bytes","colors","curve","dataset","decimal","discrete","donut","download","label","legend","library","max","messages","min","points","precision","prefix","refresh","round","stacked","suffix","thousands","title","xmax","xmin","xtitle","ytitle","zeros"];t.component(e,{props:["data","id","width","height"].concat(o),render:function(t){return t("div",{attrs:{id:this.chartId},style:this.chartStyle},["Loading..."])},data:function(){return{chartId:null}},computed:{chartStyle:function(){return this.data,this.chartOptions,{height:this.height||"300px",lineHeight:this.height||"300px",width:this.width||"100%",textAlign:"center",color:"#999",fontSize:"14px",fontFamily:"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif"}},chartOptions:function(){for(var t={},e=o,r=0;r<e.length;r++){var n=e[r];void 0!==this[n]&&(t[n]=this[n])}return t}},created:function(){this.chartId=this.chartId||this.id||"chart-"+Ct++},mounted:function(){this.updateChart(),this.savedState=this.currentState()},updated:function(){var t=this.currentState();dt(t,this.savedState)||(this.updateChart(),this.savedState=t)},beforeDestroy:function(){this.chart&&this.chart.destroy()},methods:{updateChart:function(){null!==this.data?this.chart?this.chart.updateData(this.data,this.chartOptions):this.chart=new r(this.chartId,this.data,this.chartOptions):this.chart&&(this.chart.destroy(),this.chart=null,this.$el.innerText="Loading...")},currentState:function(){return At({},{data:this.data,chartOptions:this.chartOptions})}}})}var At=wt,Ct=1;n.version="0.6.0",n.install=function(t,e){e&&e.adapter&&n.addAdapter(e.adapter),Mt(t,"line-chart",n.LineChart),Mt(t,"pie-chart",n.PieChart),Mt(t,"column-chart",n.ColumnChart),Mt(t,"bar-chart",n.BarChart),Mt(t,"area-chart",n.AreaChart),Mt(t,"scatter-chart",n.ScatterChart),Mt(t,"geo-chart",n.GeoChart),Mt(t,"timeline",n.Timeline)};var St=n;return"undefined"!=typeof window&&window.Vue&&window.Vue.use(St),St});
{
"name": "vue-chartkick",
"version": "0.5.3",
"version": "0.6.0",
"description": "Create beautiful JavaScript charts with one line of Vue",

@@ -34,6 +34,6 @@ "main": "dist/vue-chartkick.js",

"dependencies": {
"chartkick": "^3.1.3",
"chartkick": "^3.2.0",
"deep-equal": "^1.0.1",
"deepmerge": "^2.1.1"
"deepmerge": "^4.2.0"
}
}

@@ -199,2 +199,26 @@ # Vue Chartkick

Set significant digits - *Chart.js, Highcharts*
```vue
<line-chart :precision="3"></line-chart>
```
Set rounding - *Chart.js, Highcharts*
```vue
<line-chart :round="2"></line-chart>
```
Show insignificant zeros, useful for currency - *Chart.js, Highcharts*
```vue
<line-chart :round="2" :zeros="true"></line-chart>
```
Friendly file sizes - *Chart.js 2.8+*
```vue
<line-chart :bytes="true"></line-chart>
```
Show a message when data is empty

@@ -377,4 +401,4 @@

```html
<script src="https://unpkg.com/chart.js@2.9.1/dist/Chart.bundle.js"></script>
<script src="https://unpkg.com/vue-chartkick@0.5.3"></script>
<script src="https://unpkg.com/chart.js@2.8.0/dist/Chart.bundle.js"></script>
<script src="https://unpkg.com/vue-chartkick@0.6.0"></script>
```

@@ -381,0 +405,0 @@

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