returnd&&(z=0,F=0,w=0,x=0),Rh&&!Uc(c)?void(B[c]=C[c]=E[c]=A[c]=0):(B[c]=j,C[c]=k,(!w||j>=w)&&(w=j),(!x||k>=x)&&(x=k),h=ak?x:w,void(Wh?(Object.keys(B).forEach(function(a){B[a]=w}),Object.keys(C).forEach(function(a){C[a]=x}),f=(m-h*a.length)/2,y>f?(z=0,F=0,a.forEach(function(a){e(a)})):e(c,!0)):e(c)))}varf,h,i,j,k,l,m,n,q,r,s,t,u=4,v=36,w=0,x=0,y=10,z=0,A={},B={},C={},D=[0],E={},F=0,G=ok.selectAll("."+g.legendItemFocused).size();b=b||{},n=Ze(b,"withTransition",!0),q=Ze(b,"withTransitionForTransform",!0),ak?(f=function(a){returnw*E[a]},j=function(a){returnD[E[a]]+A[a]}):(f=function(a){returnD[E[a]]+A[a]},j=function(a){returnx*E[a]}),h=function(a,b){returnf(a,b)+14},k=function(a,b){returnj(a,b)+9},i=function(a,b){returnf(a,b)-4},l=function(a,b){returnj(a,b)-7},m=ok.selectAll("."+g.legendItem).data(a).enter().append("g").attr("class",function(a){returnfd(g.legendItem,a)}).style("visibility",function(a){returnUc(a)?"visible":"hidden"}).style("cursor","pointer").on("click",function(a){"function"==typeofTh?Th(a):kg.toggle(a)}).on("mouseover",function(a){jg.select(this).classed(g.legendItemFocused,!0),Oj||kg.focus(a),"function"==typeofUh&&Uh(a)}).on("mouseout",function(a){jg.select(this).classed(g.legendItemFocused,!1),Oj||kg.revert(),"function"==typeofVh&&Vh(a)}),m.append("text").text(function(a){returnd(oh[a])?oh[a]:a}).each(function(a,b){e(this,a,0===b)}).style("pointer-events","none").attr("x",ak?h:-200).attr("y",ak?-200:k),m.append("rect").attr("class",g.legendItemEvent).style("fill-opacity",0).attr("x",ak?i:-200).attr("y",ak?-200:l),m.append("rect").attr("class",g.legendItemTile).style("pointer-events","none").style("fill",Qj).attr("x",ak?h:-200).attr("y",ak?-200:j).attr("width",10).attr("height",10),r=ok.selectAll("text").data(a).text(function(a){returnd(oh[a])?oh[a]:a}).each(function(a,b){e(this,a,0===b)}),(n?r.transition():r).attr("x",h).attr("y",k),s=ok.selectAll("rect."+g.legendItemEvent).data(a),(n?s.transition():s).attr("width",function(a){returnB[a]}).attr("height",function(a){returnC[a]}).attr("x",i).attr("y",l),t=ok.selectAll("rect."+g.legendItemTile).data(a),(n?t.transition():t).style("fill",Qj).attr("x",f).attr("y",j),ok.selectAll("."+g.legendItem).classed(g.legendItemHidden,function(a){return!Tc(a)}).transition().style("opacity",function(a){varb=jg.select(this);returnTc(a)?!G||b.classed(g.legendItemFocused)?Zf(b):$f(b):ek}),S(w),T(x),R(F),p(),W(),Sf(),o(q,c)}functioneg(a){returnSc(kg.data.targets,a.id)}functionfg(a){return"data"ina&&Sc(kg.data.targets,a.data.id)}functiongg(a){varb=a&&a.value?a.value:null,c=a&&a["class"]?a["class"]:null;returnb?function(a){returna.value!==b}:c?function(a){returna["class"]!==c}:function(){return!0}}functionhg(a,b,c){vard=!we(kg.data.targets);Oj=!1,pe(a,b),Uf(c||{withTransitionForAxis:d})}functionig(a){varb=a.mimeType?a.mimeType:"csv";jg.xhr(a.url,function(c,d){vare;e="json"===b?Gc(JSON.parse(d.response),a.keys):Fc(d.response),Gf(e)})}varjg=a.d3?a.d3:"undefined"!=typeofrequire?require("d3"):void0,kg={data:{},axis:{},legend:{}},lg={},mg=i(["bindto"],"#chart"),ng=i(["size","width"]),og=i(["size","height"]),pg=i(["padding","left"]),qg=i(["padding","right"]),rg=i(["padding","top"]),sg=i(["padding","bottom"]),tg=i(["zoom","enabled"],!1),ug=i(["zoom","extent"]),vg=i(["zoom","privileged"],!1),wg=i(["interaction","enabled"],!0),xg=i(["onenter"],function(){}),yg=i(["onleave"],function(){}),zg=i(["onresize"],function(){}),Ag=i(["onresized"],function(){}),Bg=i(["transition","duration"],350);h("data","data is required in config");varCg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg,Sg,Tg,Ug,Vg,Wg,Xg,Yg,Zg,$g,_g,ah,bh,ch,dh,eh,fh,gh,hh,ih,jh,kh=i(["data","x"]),lh=i(["data","xs"],{}),mh=i(["data","x_format"],"%Y-%m-%d"),nh=i(["data","id_converter"],function(a){returna}),oh=i(["data","names"],{}),ph=i(["data","classes"],{}),qh=i(["data","groups"],[]),rh=i(["data","axes"],{}),sh=i(["data","type"]),th=i(["data","types"],{}),uh=i(["data","labels"],{}),vh=i(["data","order"]),wh=i(["data","regions"],{}),xh=i(["data","color"]),yh=i(["data","colors"],{}),zh=i(["da