Na[a.id];a.name=p(b)?b:a.id;returna}functionrc(a){varb=a[0],c={},k=[],f,d;for(f=1;f<a.length;f++){c={};for(d=0;d<a[f].length;d++)c[b[d]]=a[f][d];k.push(c)}returnk}functionsc(a){varb=[],c,k,d;for(c=0;c<a.length;c++)for(d=a[c][0],k=1;k<a[c].length;k++)t(b[k-1])&&(b[k-1]={}),b[k-1][d]=a[c][k];returnb}functionOa(a){varb=d.keys(a[0]).filter(Ed),c=d.keys(a[0]).filter(qc);if(A&&0===c.length)returnU.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];Db&&b.forEach(function(b){vard=
a:a.id;return"spline"===C[a]||"area-spline"===C[a]}functionJa(a){return"bar"===C["string"===typeofa?a:a.id]}functionLc(a){return"pie"===C["string"===typeofa?a:a.id]}functionMc(a){returnJa(a)?a.values:[]}functionMd(a){varb;(b=Fb(a))||(b="scatter"===C["string"===typeofa?a:a.id]);returnb?a.values:[]}functionoa(a){varb;if(!a)throwError(a+" can not be parsed as d3.time with format "+Gb+". Maybe 'x' of this data is not defined. See data.x or data.xs option.");b=d.time.format(Gb).parse(a);if(!b)throwError("Failed to parse '"+
a+"' with format "+Gb);returnb}functionNc(a,b){varc=d.mouse(a),k=d.select(a),f=1*k.attr("cx"),k=1*k.attr("cy");returnMath.sqrt(Math.pow(f-c[0],2)+Math.pow(k-c[1],2))<b}functionOc(a){varb=d.mouse(a),c=d.select(a);a=1*c.attr("x");vark=1*c.attr("y"),c=1*c.attr("width");returna-10<b[0]&&b[0]<a+c+10&&k-10<b[1]}functionNd(a,b){varc;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}functionDd(a,b){varc=!1;Object.keys(a).forEach(function(d){a[d]===b&&(c=!0)});returnc}functionEb(a,
f))};for(f=0;f<a.length;f++)if(t(q)||!Nd(a[f].x,q))g+=" "+Uc(a[f])+" "+r(a[f]);else{l=L(a[f-1].x,a[f].x);m=J(a[f-1].value,a[f].value);e=b(a[f].x)-b(a[f-1].x);n=c(a[f].value)-c(a[f-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(n,2));n=2/e;vars=2*n;for(e=n;1>=e;e+=s)g+=d(a[f-1],a[f],e,n)}returng}functionMb(a){varb,c;pb=d.select(va);if(pb.empty())U.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{pb.html("");
".target-"+a:".target"}functionVb(a){returnuc(a.id)}functionWb(a){return"data"ina&&uc(a.data.id)}varg={data:{}},mb={},ba="_expanded_",ja="_selected_",Ub="_included_",va=e(["bindto"],"#chart"),bb=e(["size","width"],null),ic=e(["size","height"],null),ec=e(["padding","left"],null),cc=e(["padding","right"],null),qa=e(["zoom","enabled"],!1),fd=e(["zoom","extent"],null),ce=e(["zoom","privileged"],!1),Wd=e(["onenter"],function(){}),Xd=e(["onleave"],function(){});if(!("data"inca))throwError("data is required in config");
(Ia=a.categories,G.categories(Ia));if("cacheIds"ina&&Bd(a.cacheIds))Xa(Cd(a.cacheIds),a.done);elseif("data"ina)Xa(Oa(a.data),a.done);elseif("url"ina)d.csv(a.url,function(b,c){Xa(Oa(c),a.done)});elseif("rows"ina)Xa(Oa(rc(a.rows)),a.done);elseif("columns"ina)Xa(Oa(sc(a.columns)),a.done);elsethrowError("url or rows or columns is required.");};g.unload=function(a){g.data.targets=g.data.targets.filter(function(b){returnb.id!==a});d.selectAll(".target-"+a).transition().style("opacity",0).remove();
g.data.get=function(a){a=g.data.getAsTarget(a);returnp(a)?a.values.map(function(a){returna.value}):void0};g.data.getAsTarget=function(a){varb=kb(function(b){returnb.id===a});return0<b.length?b[0]:void0};g.destroy=function(){g.data.targets=void0;g.data.x={};pb.html("");U.onresize=null};if("url"inca.data)d.csv(ca.data.url,function(a,b){Mb(b)});elseif("rows"inca.data)Mb(rc(ca.data.rows));elseif("columns"inca.data)Mb(sc(ca.data.columns));elsethrowError("url or rows or columns is required.");
functionmb(a){varb=Na[a.id];a.name=p(b)?b:a.id;returna}functionqc(a){varb=a[0],c={},f=[],m,d;for(m=1;m<a.length;m++){c={};for(d=0;d<a[m].length;d++)c[b[d]]=a[m][d];f.push(c)}returnf}functionrc(a){varb=[],c,f,m;for(c=0;c<a.length;c++)for(m=a[c][0],f=1;f<a[c].length;f++)v(b[f-1])&&(b[f-1]={}),b[f-1][m]=a[c][f];returnb}functionOa(a){varb=d.keys(a[0]).filter(Dd),c=d.keys(a[0]).filter(pc);if(A&&0===c.length)returnL.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),
C[a]||"area"===C[a]||"area-spline"===C[a]}functionJc(a){a="string"===typeofa?a:a.id;return"spline"===C[a]||"area-spline"===C[a]}functionJa(a){return"bar"===C["string"===typeofa?a:a.id]}functionKc(a){return"pie"===C["string"===typeofa?a:a.id]}functionLc(a){returnJa(a)?a.values:[]}functionLd(a){varb;(b=Eb(a))||(b="scatter"===C["string"===typeofa?a:a.id]);returnb?a.values:[]}functionoa(a){varb;if(!a)throwError(a+" can not be parsed as d3.time with format "+Fb+". Maybe 'x' of this data is not defined. See data.x or data.xs option.");
b=d.time.format(Fb).parse(a);if(!b)throwError("Failed to parse '"+a+"' with format "+Fb);returnb}functionMc(a,b){varc=d.mouse(a),f=d.select(a),m=1*f.attr("cx"),f=1*f.attr("cy");returnMath.sqrt(Math.pow(m-c[0],2)+Math.pow(f-c[1],2))<b}functionNc(a){varb=d.mouse(a),c=d.select(a);a=1*c.attr("x");varf=1*c.attr("y"),c=1*c.attr("width");returna-10<b[0]&&b[0]<a+c+10&&f-10<b[1]}functionMd(a,b){varc;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}functionCd(a,b){varc=!1;
" "+c(l(f+e))}:function(a,d,f,e){return"M"+b(k(f))+" "+c(l(f))+" "+b(k(f+e))+" "+c(l(f+e))};for(d=0;d<a.length;d++)if(v(r)||!Md(a[d].x,r))h+=" "+Tc(a[d])+" "+q(a[d]);else{k=M(a[d-1].x,a[d].x);l=J(a[d-1].value,a[d].value);e=b(a[d].x)-b(a[d-1].x);n=c(a[d].value)-c(a[d-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(n,2));n=2/e;vart=2*n;for(e=n;1>=e;e+=t)h+=f(a[d-1],a[d],e,n)}returnh}functionLb(a){varb,c;ob=d.select(va);if(ob.empty())L.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');
"enabled"],!1),ed=e(["zoom","extent"],null),be=e(["zoom","privileged"],!1),Vd=e(["onenter"],function(){}),Wd=e(["onleave"],function(){});if(!("data"inca))throwError("data is required in config");varpa=e(["data","x"],null),aa=e(["data","xs"],null),Fb=e(["data","x_format"],"%Y-%m-%d"),Ed=e(["data","id_converter"],function(a){returna}),Na=e(["data","names"],{}),s=e(["data","groups"],[]),mc=e(["data","axes"],{}),bd=e(["data","type"],null),C=e(["data","types"],{}),fd=e(["data","regions"],{}),me=e(["data",
a.done);elsethrowError("url or rows or columns is required.");};h.unload=function(a){h.data.targets=h.data.targets.filter(function(b){returnb.id!==a});q.selectAll(".target-"+a).transition().style("opacity",0).remove();Aa&&(q.selectAll(".legend-item-"+a).remove(),rb(h.data.targets));0<h.data.targets.length&&E({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})};h.selected=function(a){a=p(a)?"-"+a:"";returnd.merge(k.selectAll(".-shapes"+a).selectAll(".-shape").filter(function(){returnd.select(this).classed(ja)}).map(function(a){returna.map(function(a){returna.__data__})}))};