!function(a){"use strict";functionb(a){returna||0===a}functionc(a){return"undefined"==typeofa}functiond(a){return"undefined"!=typeofa}functione(a,b){functionc(a,b){a.attr("transform",function(a){return"translate("+Math.ceil(b(a)+s)+", 0)"})}functiond(a,b){a.attr("transform",function(a){return"translate(0,"+Math.ceil(b(a))+")"})}functione(a){varb=a[0],c=a[a.length-1];returnc>b?[b,c]:[c,b]}functionf(a){varb,c,d=[];if(a.ticks)returna.ticks.apply(a,k);for(c=a.domain(),b=Math.ceil(c[0]);b<c[1];b++)d.push(b);returnd.length>0&&d[0]>0&&d.unshift(d[0]-(d[1]-d[0])),d}functiong(){vara,c=m.copy();returnb&&(a=m.domain(),c.domain([a[0],a[1]-1])),c}functionh(a){varc=b&&a<u.length?u[a]:a;returnj?j(c):c}functioni(i){i.each(function(){functioni(a){varb=m(a)+s;returnB[0]<b&&b<B[1]?o:0}varj,k,t=a.select(this),u=this.__chart__||m,v=this.__chart__=g(),w=r?r:f(v),x=t.selectAll(".tick").data(w,v),y=x.enter().insert("g",".domain").attr("class","tick").style("opacity",1e-6),z=a.transition(x.exit()).style("opacity",1e-6).remove(),A=a.transition(x).style("opacity",1),B=m.rangeExtent?m.rangeExtent():e(m.range()),C=t.selectAll(".domain").data([0]),D=(C.enter().append("path").attr("class","domain"),a.transition(C));y.append("line"),y.append("text");varE=y.select("line"),F=A.select("line"),G=x.select("text").text(h),H=y.select("text"),I=A.select("text");switch(b?(s=Math.ceil((v(1)-v(0))/2),k=l?0:s):s=k=0,n){case"bottom":j=c,E.attr("y2",o),H.attr("y",Math.max(o,0)+q),F.attr("x1",k).attr("x2",k).attr("y2",i),I.attr("x",0).attr("y",Math.max(o,0)+q),G.attr("dy",".71em").style("text-anchor","middle"),D.attr("d","M"+B[0]+","+p+"V0H"+B[1]+"V"+p);break;case"top":j=c,E.attr("y2",-o),H.attr("y",-(Math.max(o,0)+q)),F.attr("x2",0).attr("y2",-o),I.attr("x",0).attr("y",-(Math.max(o,0)+q)),G.attr("dy","0em").style("text-anchor","middle"),D.attr("d","M"+B[0]+","+-p+"V0H"+B[1]+"V"+-p);break;case"left":j=d,E.attr("x2",-o),H.attr("x",-(Math.max(o,0)+q)),F.attr("x2",-o).attr("y2",0),I.attr("x",-(Math.max(o,0)+q)).attr("y",s),G.attr("dy",".32em").style("text-anchor","end"),D.attr("d","M"+-p+","+B[0]+"H0V"+B[1]+"H"+-p);break;case"right":j=d,E.attr("x2",o),H.attr("x",Math.max(o,0)+q),F.attr("x2",o).attr("y2",0),I.attr("x",Math.max(o,0)+q).attr("y",0),G.attr("dy",".32em").style("text-anchor","start"),D.attr("d","M"+p+","+B[0]+"H0V"+B[1]+"H"+p)}if(v.rangeBand){varJ=v,K=J.rangeBand()/2;u=v=function(a){returnJ(a)+K}}elseu.rangeBand?u=v:z.call(j,v);y.call(j,u),A.call(j,v)})}varj,k,l,m=a.scale.linear(),n="bottom",o=6,p=6,q=3,r=null,s=0,t=!0,u=[];returni.scale=function(a){returnarguments.length?(m=a,i):m},i.orient=function(a){returnarguments.length?(n=ain{top:1,right:1,bottom:1,left:1}?a+"":"bottom",i):n},i.tickFormat=function(a){returnarguments.length?(j=a,i):j},i.tickCentered=function(a){returnarguments.length?(l=a,i):l},i.tickOffset=function(){returns},i.ticks=function(){returnarguments.length?(k=arguments,i):k},i.tickCulling=function(a){returnarguments.length?(t=a,i):t},i.tickValues=function(a){returnarguments.length?(r=a,i):r},i.categories=function(a){returnarguments.length?(u=a,i):u},i}varf={version:"0.1.41"},g={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",eventRectsSingle:"c3-event-rects-single",eventRectsMultiple:"c3-event-rects-multiple",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",region:"c3-region",regions:"c3-regions",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",lines:"c3-lines",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",arcs:"c3-arcs",area:"c3-area",areas:"c3-areas",text:"c3-text",texts:"c3-texts",grid:"c3-grid",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",legendItemHidden:"c3-legend-item-hidden",legendItemFocused:"c3-legend-item-focused",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};f.generate=function(f){functionh(a,b){if(!(ainf))throwError(b)}functioni(a,b){varc,d,e,g=f;for(c=0;c<a.length;c++){if("object"==typeofg&&!(a[c]ing))returnb;if(d=c===a.length-1,e=g[a[c]],!d&&"object"!=typeofe)returnb;g=e}returng}functionj(b){varc=a.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url("+(c?"":document.URL.split("#")[0])+"#"+b+")"}functionk(a){returnMath.ceil(a)+.5}functionl(a,b){varc,d,e;b&&b.axisX?c=b.axisX:(c=Gj.select("."+g.axisX),a&&(c=c.transition())),b&&b.axisY?d=b.axisY:(d=Gj.select("."+g.axisY),a&&(d=d.transition())),b&&b.axisY2?e=b.axisY2:(e=Gj.select("."+g.axisY2),a&&(e=e.transition())),Gj.attr("transform",qj.main),c.attr("transform",qj.x),d.attr("transform",qj.y),e.attr("transform",qj.y2),Gj.select("."+g.chartArcs).attr("transform",qj.arc)}functionm(a,b){varc;b&&b.axisSubX?c=b.axisSubX:(c=Hj.select("."+g.axisX),a&&(c=c.transition())),Hj.attr("transform",qj.context),c.attr("transform",qj.subx)}functionn(a){(a?Ij.transition():Ij).attr("transform",qj.legend)}functiono(a,b){l(a,b),rh&&m(a,b),n(a)}functionp(){vara=V(),b=U(),c=rj?0:a,d=me(Rf.data.targets),e=Ah||d?0:A("x"),f=rh&&!d?sh+e:0;og=t(),pg=u(),Ah?(hg={top:A("y2")+v(),right:d?0:y(),bottom:A("y")+c+w(),left:f+(d?0:x())},ig={top:hg.top,right:0/0,bottom:20+c,left:wj}):(hg={top:4+v(),right:d?0:y(),bottom:e+f+c+w(),left:d?0:x()},ig={top:pg-f-c,right:0/0,bottom:e+c,left:hg.left}),jg={top:rj?0:pg-a,right:0/0,bottom:0,left:rj?og-b:0},kg=og-hg.left-hg.right,mg=pg-hg.top-hg.bottom,0>kg&&(kg=0),0>mg&&(mg=0),lg=Ah?hg.left-wj-xj:kg,ng=Ah?mg:pg-ig.top-ig.bottom,0>lg&&(lg=0),0>ng&&(ng=0),tg=kg-(rj?b+10:0),ug=mg-(rj?0:10),r(),rj&&d&&(jg.left=tg/2+1.1*rg)}functionq(){Gj.select("line."+g.xgridFocus).attr("x1",Ah?0:-10).attr("x2",Ah?kg:-10).attr("y1",Ah?-10:hg.top).attr("y2",Ah?-10:mg)}functionr(){rg=Math.min(tg,ug)/2,qg=.95*rg,sg=le(Rf.data.targets)?.6*qg:0}functions(){vara=Ah?g.axisX:g.axisY,b=Gj.select("."+a).node(),c=b?b.getBoundingClientRect():{right:0},d=Kj.node().getBoundingClientRect(),e=me(Rf.data.targets),f=c.right-d.left-(e?0:x());returnf>0?f:0}functiont(){returnUf?Uf:C()}functionu(){vara=Vf?Vf:D();returna>0?a:320}functionv(){returnYf?Yf:0}functionw(){returnZf?Zf:0}functionx(){returnWf?Wf:Ah?Bh?Math.max(Le(z("x")),40):1:!Th||Yh?1:Le(z("y"))}functiony(){vara=10,b=rj?U()+20:0;returnXf?Xf:Ah?a+b:(!ai||fi?a:Le(z("y2")))+b}functionz(a){varb=pb(a);returnb.isInner?20+Ib(a):40+Ib(a)}functionA(a){return"x"!==a||Bh?"x"===a&&Qh?Qh:"y"!==a||Th?"y2"!==a||ai?(pb(a).isInner?30:40)+("y2"===a?-10:0):yj:uh&&!rj?10:1:0}functionB(a){for(varb,c=Kj.node();c&&"BODY"!==c.tagName&&!(b=c.getBoundingClientRect()[a]);)c=c.parentNode;returnb}functionC(){returnB("width")}functionD(){vara=Kj.style("height");returna.indexOf("px")>0?+a.replace("px",""):0}functionE(a){returna?-31:-(hg.left-1)}functionF(a){returna?-20:-4}functionG(){returnE(!Ah)}functionH(){returnF(!Ah)}functionI(){returnE(Ah)}functionJ(){returnF(Ah)}functionK(a){returna?kg+2+30+30:hg.left+20}functionL(a){returna?(Qh?Qh:0)+80:mg+8}functionM(){returnK(!Ah)}functionN(){returnL(!Ah)}functionO(){returnK(Ah)}functionP(){returnL(Ah)}functionQ(){vara,b,c,d,e,f,g=Fc(Rf.data.targets);returng?(a=g.values[0],b=g.values[g.values.length-1],c=Hg(b.x)-Hg(a.x),0===c?Ah?mg:kg:(d=Ec(),e=ie(Rf.data.targets)?(d-($i?.25:1))/d:1,f=d>1?c*e/(d-1):c,1>f?1:f)):0}functionR(a){sj=a}functionS(a){tj=a}functionT(a){uj=a}functionU(){returnuh?rj?tj*(sj+1):og:0}functionV(){returnuh?rj?pg:uj*(sj+1):0}functionW(){vara,b,c=!Hg;zg=Ah?1:0,Ag=Ah?mg:kg,Bg=Ah?0:mg,Cg=Ah?kg:1,Dg=zg,Eg=Ag,Fg=Ah?0:ng,Gg=Ah?lg:1,Hg=Z(zg,Ag,c?void0:Hg.domain(),function(){returnNg.tickOffset()}),Ig=$(Bg,Cg,c?void0:Ig.domain()),Jg=$(Bg,Cg,c?void0:Jg.domain()),Kg=Z(zg,Ag,Lj,function(a){returna%1?0:Qg.tickOffset()}),Lg=$(Fg,Gg,c?void0:Lg.domain()),Mg=$(Fg,Gg,c?void0:Mg.domain()),a=eb(),b=Lh?Lh:c?void0:Ng.tickValues(),Ng=bb(Hg,mj,a,b),Qg=bb(Kg,pj,a,b),Og=cb(Ig,nj,Zh,_h),Pg=cb(Jg,oj,gi,ii),c||(zj.scale(Kg),$f&&Dj.scale(Hg)),X()}functionX(){vg=Lb(),wg=Mb(),xg=Mb(.98)}functionY(a,b,c){return(c?Qf.time.scale():Qf.scale.linear()).range([a,b])}functionZ(a,b,c,d){vare,f=Y(a,b,Zi),g=c?f.domain(c):f;$i?(d=d||function(){return0},f=function(a,b){varc=g(a)+d(a);returnb?c:Math.ceil(c)}):f=function(a,b){varc=g(a);returnb?c:Math.ceil(c)};for(eing)f[e]=g[e];returnf.orgDomain=function(){vara=g.domain();returnLj&&Lj[0]===a[0]&&Lj[1]<a[1]&&(a[1]=Lj[1]),a},$i&&(f.domain=function(a){returnarguments.length?(g.domain(a),f):(a=this.orgDomain(),[a[0],a[1]+1])}),f}function$(a,b,c){vard=Y(a,b);returnc&&d.domain(c),d}function_(a){return"y2"===db(a)?Jg:Ig}functionab(a){return"y2"===db(a)?Mg:Lg}functionbb(a,b,c,d){varf=e(Qf,$i).scale(a).orient(b);returnf.tickFormat(c).tickValues(d),$i?(f.tickCentered(Fh),Fe(Hh)&&(Hh=!1),f.categories(Eh)):f.tickOffset=function(){vara=Gc(Rf.data.targets),b=Hg(a[1])-Hg(a[0]),c=b?b:Ah?mg:kg;returnc/Ec()/2},f}functioncb(a,b,c,d){returne(Qf).scale(a).orient(b).tickFormat(c).ticks(d)}functiondb(a){returnainYg?Yg[a]:"y"}functioneb(){vara=Zi?ij:$i?Xc:function(a){return0>a?a.toFixed(0):a};returnGh&&("function"==typeofGh?a=Gh:Zi&&(a=function(a){returna?hj(Gh)(a):""})),a}functionfb(a){varb;return"y"===a?b=Xh:"y2"===a?b=ei:"x"===a&&(b=Sh),b}functiongb(a){varb=fb(a);return"string"==typeofb?b:b?b.text:null}functionhb(a,b){varc=fb(a);"string"==typeofc?"y"===a?Xh=b:"y2"===a?ei=b:"x"===a&&(Sh=b):c&&(c.text=b)}functionib(a){return10*Math.sin(Math.PI*(a/180))}functionjb(a){return11.5-2.5*(a/15)}functionkb(a,b,c){a.selectAll(".tick text").style("text-anchor","start"),b.selectAll(".tick text").attr("y",jb(c)).attr("x",ib(c)).attr("transform","rotate("+c+")")}functionlb(a,b){varc=fb(a),d=c&&"object"==typeofc&&c.position?c.position:b;return{isInner:d.indexOf("inner")>=0,isOuter:d.indexOf("outer")>=0,isLeft:d.indexOf("left")>=0,isCenter:d.indexOf("center")>=0,isRight:d.indexOf("right")>=0,isTop:d.indexOf("top")>=0,isMiddle:d.indexOf("middle")>=0,isBottom:d.indexOf("bottom")>=0}}functionmb(){returnlb("x",Ah?"inner-top":"inner-right")}functionnb(){returnlb("y",Ah?"inner-right":"inner-top")}functionob(){returnlb("y2",Ah?"inner-right":"inner-top")}functionpb(a){return"y2"===a?ob():"y"===a?nb():mb()}functionqb(){returngb("x")}functionrb(){returngb("y")}functionsb(){returngb("y2")}functiontb(a,b){returna?b.isLeft?0:b.isCenter?kg/2:kg:b.isBottom?-mg:b.isMiddle?-mg/2:0}functionub(a,b){returna?b.isLeft?"0.5em":b.isRight?"-0.5em":"0":b.isTop?"-0.5em":b.isBottom?"0.5em":"0"}functionvb(a,b){returna?b.isLeft?"start":b.isCenter?"middle":"end":b.isBottom?"start":b.isMiddle?"middle":"end"}functionwb(){returntb(!Ah,mb())}functionxb(){returntb(Ah,nb())}functionyb(){returntb(Ah,ob())}functionzb(){returnub(!Ah,mb())}functionAb(){returnub(Ah,nb())}functionBb(){returnub(Ah,ob())}functionCb(){vara=mb();returnAh?a.isInner?"1.2em":-25-Ib("x"):a.isInner?"-0.5em":Qh?Qh-10:"3em"}functionDb(){vara=nb();returnAh?a.isInner?"-0.5em":"3em":a.isInner?"1.2em":-20-Ib("y")}functionEb(){vara=ob();returnAh?a.isInner?"1.2em":"-2.2em":a.isInner?"-0.5em":30+Ib("y2")}functionFb(){returnvb(!Ah,mb())}functionGb(){returnvb(Ah,nb())}functionHb(){returnvb(Ah,ob())}functionIb(a){varb=0,c="x"===a?g.axisX:"y"===a?g.axisY:g.axisY2;returnQf.selectAll("."+c+" .tick text").each(function(){vara=this.getBoundingClientRect();b<a.width&&(b=a.width)}),0>b?0:b}functionJb(a){varb=Gj.select("."+g.axisX+" ."+g.axisXLabel),c=Gj.select("."+g.axisY+" ."+g.axisYLabel),d=Gj.select("."+g.axisY2+" ."+g.axisY2Label);(a?b.transition():b).attr("x",wb).attr("dx",zb).attr("dy",Cb).text(qb),(a?c.transition():c).attr("x",xb).attr("dx",Ab).attr("dy",Db).attr("dy",Db).text(rb),(a?d.transition():d).attr("x",yb).attr("dx",Bb).attr("dy",Eb).text(sb)}functionKb(a){varb=!1;returnyg(Mc(Rf.data.targets)).forEach(function(c){b||c.data.id!==a.data.id||(b=!0,a=c)}),b?a:null}functionLb(){vara=Qf.svg.arc().outerRadius(qg).innerRadius(sg),b=function(b,c){vard;returnc?a(b):(d=Kb(b),d?a(d):"M 0 0")};returnb.centroid=a.centroid,b}functionMb(a){varb=Qf.svg.arc().outerRadius(rg*(a?a:1)).innerRadius(sg);returnfunction(a){varc=Kb(a);returnc?b(c):"M 0 0"}}functionNb(a,b){returnte(a.data)?vg(a,b):"M 0 0"}functionOb(a){varb,c,d,e,f,g=Kb(a),h="";returng&&(b=vg.centroid(g),c=b[0],d=b[1],e=Math.sqrt(c*c+d*d),f=(36/qg>.375?1.175-36/qg:.8)*qg/e,h="translate("+c*f+","+d*f+")"),h}functionPb(a){returna?(a.endAngle-a.startAngle)/(2*Math.PI):null}functionQb(a){returnuc({id:a.data.id,value:a.value,ratio:Pb(a)})}functionRb(a){varb,c,d,e;returnUb()?(b=Kb(a),c=b?b.value:null,d=Pb(b),e=Vb(),e?e(c,d):Hd(c,d)):""}functionSb(a,b){varc=Ej.selectAll("."+g.chartArc+td(a)),d=Ej.selectAll("."+g.arc).filter(function(b){returnb.data.id!==a});ze(a)&&c.selectAll("path").transition().duration(50).attr("d",wg).transition().duration(100).attr("d",xg).each(function(a){se(a.data)}),b||d.style("opacity",.3)}functionTb(a){varb=Ej.selectAll("."+g.chartArc+td(a));b.selectAll("path").transition().duration(50).attr("d",vg),Ej.selectAll("."+g.arc).style("opacity",1)}functionUb(){returnle(Rf.data.targets)?Ei:yi}functionVb(){returnle(Rf.data.targets)?Fi:zi}functionWb(){returnle(Rf.data.targets)?Hi:""}functionXb(){vara=le(Rf.data.targets)?Ii:Bi;return"function"==typeofa?a:function(){}}functionYb(){vara=le(Rf.data.targets)?Ji:Ci;return"function"==typeofa?a:function(){}}functionZb(){vara=le(Rf.data.targets)?Ki:Di;return"function"==typeofa?a:function(){}}function$b(a){varb,c,d,e,f,g,h=Hc(a),i=Tc(a);if(Xg.length>0)for(g=Vc(a),b=0;b<Xg.length;b++)if(e=Xg[b].filter(function(a){returnh.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&i[d]&&i[d].forEach(function(a,b){i[d][b]=0>a?a:0}),c=1;c<e.length;c++)f=e[c],i[f]&&i[f].forEach(function(a,b){db(f)!==db(d)||!i[d]||g&&+a>0||(i[d][b]+=+a)});returnQf.min(Object.keys(i).map(function(a){returnQf.min(i[a])}))}function_b(a){varb,c,d,e,f,g,h=Hc(a),i=Tc(a);if(Xg.length>0)for(g=Wc(a),b=0;b<Xg.length;b++)if(e=Xg[b].filter(function(a){returnh.indexOf(a)>=0}),0!==e.length)for(d=e[0],g&&i[d]&&i[d].forEach(function(a,b){i[d][b]=a>0?a:0}),c=1;c<e.length;c++)f=e[c],i[f]&&i[f].forEach(function(a,b){db(f)!==db(d)||!i[d]||g&&0>+a||(i[d][b]+=+a)});returnQf.max(Object.keys(i).map(function(a){returnQf.max(i[a])}))}functionac(a,c){vard,e,f,g,h,i,j,k,l=a.filter(function(a){returndb(a.id)===c}),m="y2"===c?ci:Vh,n="y2"===c?bi:Uh,o=b(m)?m:$b(l),p=b(n)?n:_b(l),q="y2"===c?di:Wh,r=Bd()&&Ah;return0===l.length?"y2"===c?Jg.domain():Ig.domain():(o===p&&(0>o?p=0:o=0),d=Math.abs(p-o),e=f=g=r?0:.1*d,q&&(h=Math.max(Math.abs(o),Math.abs(p)),p=h-q,o=q-h),r&&(i=Cd(o,p),j=fc(Ig.range()),k=[i[0]/j,i[1]/j],f+=d*(k[1]/(1-k[0]-k[1])),g+=d*(k[0]/(1-k[0]-k[1]))),"y"===c&&$h&&(f=b($h.top)?$h.top:e,g=b($h.bottom)?$h.bottom:e),"y2"===c&&hi&&(f=b(hi.top)?hi.top:e,g=b(hi.bottom)?hi.bottom:e),ie(l)&&!Vc(l)&&(g=o),[o-g,p+f])}functionbc(a){returnOh?Zi?Be(Oh):Oh:Qf.min(a,function(a){returnQf.min(a.values,function(a){returna.x})})}functioncc(a){returnNh?Zi?Be(Nh):Nh:Qf.max(a,function(a){returnQf.max(a.values,function(a){returna.x})})}functiondc(a){varc,d,e,f,g=Gc(a),h=g[1]-g[0];return$i?d=0:ie(a)?(c=Ec(),d=c>1?h/(c-1)/2:.5):d=.01*h,"object"==typeofPh&&Ge(Ph)?(e=b(Ph.left)?Ph.left:d,f=b(Ph.right)?Ph.right:d):e=f="number"==typeofPh?Ph:d,{left:e,right:f}}functionec(a){varb=[bc(a),cc(a)],c=b[0],d=b[1],e=dc(a),f=0,g=0;returnc-d!==0||$i||(c=Zi?newDate(.5*c.getTime()):-.5,d=Zi?newDate(1.5*d.getTime()):.5),(c||0===c)&&(f=Zi?newDate(c.getTime()-e.left):c-e.left),(d||0===d)&&(g=Zi?newDate(d.getTime()+e.right):d+e.right),[f,g]}functionfc(a){returna[1]-a[0]}functiongc(a){for(varb=0;b<a.length;b++)if(!(a[b]inSf))return!1;return!0}functionhc(a,b){Sf[a]=Bc(b)}functionic(a){for(varb=[],c=0;c<a.length;c++)a[c]inSf&&b.push(Bc(Sf[a[c]]));returnb}functionjc(a){varb,c="y"===a.axis?Ig:Jg;returnb="y"===a.axis||"y2"===a.axis?Ah?"start"ina?c(a.start):0:0:Ah?0:"start"ina?Hg(Zi?Be(a.start):a.start):0}functionkc(a){varb,c="y"===a.axis?Ig:Jg;returnb="y"===a.axis||"y2"===a.axis?Ah?0:"end"ina?c(a.end):0:Ah?"start"ina?Hg(Zi?Be(a.start):a.start):0:0}functionlc(a){varb,c=jc(a),d="y"===a.axis?Ig:Jg;returnb="y"===a.axis||"y2"===a.axis?Ah?"end"ina?d(a.end):kg:kg:Ah?kg:"end"ina?Hg(Zi?Be(a.end):a.end):kg,c>b?0:b-c}functionmc(a){varb,c=kc(a),d="y"===a.axis?Ig:Jg;returnb="y"===a.axis||"y2"===a.axis?Ah?mg:"start"ina?d(a.start):mg:Ah?"end"ina?Hg(Zi?Be(a.end):a.end):mg:mg,c>b?0:b-c}functionnc(a){returnRg&&a===Rg||Ge(Sg)&&He(Sg,a)}functionoc(a){return!nc(a)}functionpc(a){returnRg?Rg:Ge(Sg)?Sg[a]:null}functionqc(a,b){varc,d=b&&Ge(b)?Hc(b):[];returnd.forEach(function(b){pc(b)===a&&(c=Rf.data.xs[b])}),c}functionrc(a,b){returnainRf.data.xs&&Rf.data.xs[a]&&Rf.data.xs[a][b]?Rf.data.xs[a][b]:b}functionsc(a){Object.keys(a).forEach(function(b){Sg[b]=a[b]})}functiontc(a){return1===Qf.set(Object.keys(a).map(function(b){returna[b]})).size()}functionuc(a){varb;returna&&(b=Vg[a.id],a.name=b?b:a.id),a}functionvc(a,b){a.forEach(function(a){a.values.forEach(function(c,d){c.x=xc(b[d],a.id,d)}),Rf.data.xs[a.id]=b})}functionwc(a,b){a.forEach(function(a){b[a.id]&&vc([a],b[a.id])})}functionxc(a,c,d){vare;returne=Zi?a?ainstanceofDate?a:Be(a):Be(rc(c,d)):_i&&!$i?b(a)?+a:rc(c,d):d}functionyc(a){varb,c,d=a[0],e={},f=[];for(b=1;b<a.length;b++){for(e={},c=0;c<a[b].length;c++)e[d[c]]=a[b][c];f.push(e)}returnf}functionzc(a){varb,d,e,f=[];for(b=0;b<a.length;b++)for(e=a[b][0],d=1;d<a[b].length;d++)c(f[d-1])&&(f[d-1]={}),f[d-1][e]=a[b][d];returnf}functionAc(a){varc,d=Qf.keys(a[0]).filter(oc),e=Qf.keys(a[0]).filter(nc);returnd.forEach(function(c){vard,f=pc(c);_i||Zi?e.indexOf(f)>=0?Rf.data.xs[c]=a.map(function(a){returna[f]}).filter(b).map(function(a,b){returnxc(a,c,b)}):Rg?(d=Object.keys(Rf.data.xs),Rf.data.xs[c]=d.length>0?Rf.data.xs[d[0]]:void0):Ge(Sg)&&(Rf.data.xs[c]=qc(f,Rf.data.targets)):Rf.data.xs[c]=a.map(function(a,b){returnb})}),d.forEach(function(a){if(!Rf.data.xs[a])thrownewError('x is not defined for id = "'+a+'".')}),c=d.map(function(b,c){vard=Ug(b);return{id:d,id_org:b,values:a.map(function(a,e){varf=pc(b),g=a[f],h=xc(g,b,e);return_i&&$i&&0===c&&g&&(0===e&&(Eh=[]),Eh.push(g)),("undefined"==typeofa[b]||Rf.data.xs[b].length<=e)&&(h=void0),{x:h,value:null===a[b]||isNaN(a[b])?null:+a[b],id:d}}).filter(function(a){return"undefined"!=typeofa.x})}}),c.forEach(function(a){varb;a.values=a.values.sort(function(a,b){varc=a.x||0===a.x?a.x:1/0,d=b.x||0===b.x?b.x:1/0;returnc-d}),b=0,a.values.forEach(function(a){a.index=b++})}),Zg&&ge(Hc(c).filter(function(a){return!(ain$g)}),Zg),c.forEach(function(a){hc(a.id_org,a)}),c}functionBc(a){return{id:a.id,id_org:a.id_org,values:a.values.map(function(a){return{x:a.x,value:a.value,id:a.id}})}}functionCc(a){returna>0&&Rf.data.targets[0].values[a-1]?Rf.data.targets[0].values[a-1].x:void0}functionDc(a){returna<Ec()-1?Rf.data.targets[0].values[a+1].x:void0}functionEc(){returnQf.max(Rf.data.targets,function(a){returna.values.length})}functionFc(a){varb,c=a.length,d=0;returnc>1?a.forEach(function(a){a.values.length>d&&(b=a,d=a.values.length)}):b=c?a[0]:null,b}functionGc(a){varb,c,d=Fc(a);returnd?(b=d.values[0],c=d.values[d.values.length-1],[b.x,c.x]):[0,0]}functionHc(a){returna.map(function(a){returna.id})}functionIc(a){returna?"string"==typeofa?[a]:a:Hc(Rf.data.targets)}functionJc(a,b){varc,d=Hc(a);for(c=0;c<d.length;c++)if(d[c]===b)return!0;return!1}functionKc(a){returnjj.indexOf(a)<0}functionLc(a){returnkj.indexOf(a)<0}functionMc(a){returna.filter(function(a){returnKc(a.id)})}functionNc(a){varb=Qf.set(Qf.merge(a.map(function(a){returna.values.map(function(a){returna.x})}))).values();returnb.map(Zi?function(a){returnnewDate(a)}:function(a){return+a})}functionOc(a,b){varc,d,e,f,g,h,i,j=a;if(b)if(c="function"==typeofb?b():b,1===c)j=[a[0]];elseif(2===c)j=[a[0],a[a.length-1]];elseif(c>2){for(f=c-2,d=a[0],e=a[a.length-1],g=(e-d)/(f+1),j=[d],h=0;f>h;h++)i=+d+g*(h+1),j.push(Zi?newDate(i):i);j.push(e)}returnZi||(j=j.sort(function(a,b){returna-b})),j}functionPc(a){jj=jj.concat(a)}functionQc(a){jj=jj.filter(function(b){returna.indexOf(b)<0})}functionRc(a){kj=kj.concat(a)}functionSc(a){kj=kj.filter(function(b){returna.indexOf(b)<0})}functionTc(a){varb={};returna.forEach(function(a){b[a.id]=[],a.values.forEach(function(c){b[a.id].push(c.value)})}),b}functionUc(a,b){varc,d,e,f=Object.keys(a);for(c=0;c<f.length;c++)for(e=a[f[c]].values,d=0;d<e.length;d++)if(b(e[d].value))return!0;return!1}functionVc(a){returnUc(a,function(a){return0>a})}functionWc(a){returnUc(a,function(a){returna>0})}functionXc(a){returna<Eh.length?Eh[a]:a}functionYc(a,b){return" "+a+" "+a+sd(b)}functionZc(a){returnYc(g.text,a.id)}function$c(a){returnYc(g.texts,a.id)}function_c(a,b){returnYc(g.shape,b)}functionad(a){returnYc(g.shapes,a.id)}functionbd(a){return_c(a)+Yc(g.line,a.id)}functioncd(a){returnad(a)+Yc(g.lines,a.id)}functiondd(a,b){return_c(a,b)+Yc(g.circle,b)}functioned(a){returnad(a)+Yc(g.circles,a.id)}functionfd(a,b){return_c(a,b)+Yc(g.bar,b)}functiongd(a){returnad(a)+Yc(g.bars,a.id)}functionhd(a){return_c(a.data)+Yc(g.arc,a.data.id)}functionid(a){returnad(a.data)+Yc(g.arcs,a.data.id)}functionjd(a){return_c(a)+Yc(g.area,a.id)}functionkd(a){returnad(a)+Yc(g.areas,a.id)}functionld(a,b){returnYc(g.region,b)+" "+("class"ina?a.class:"")}functionmd(a,b){returnYc(g.eventRect,b)}functionnd(a){varb=Wg[a],c="";returnb&&(c=" "+g.target+"-"+b),Yc(g.target,a)+c}functionod(a){returng.chartText+nd(a.id)}functionpd(a){returng.chartLine+nd(a.id)}functionqd(a){returng.chartBar+nd(a.id)}functionrd(a){returng.chartArc+nd(a.data.id)}functionsd(a){returna||0===a?"-"+(a.replace?a.replace(/([^a-zA-Z0-9-_])/g,"-"):a):""}functiontd(a){return"."+g.target+sd(a)}functionud(a){returna.length?a.map(function(a){returntd(a)}):null}functionvd(a){return"."+g.legendItem+sd(a)}functionwd(a){returna.length?a.map(function(a){returnvd(a)}):null}functionxd(a){returnnull!==a.value&&Nj[a.id]?1:0}functionyd(a){varb=Ad(a);returnxd(a)*b}functionzd(a){returnb(a.value)?qe(a)?.5:1:0}functionAd(){returnBd()?1:0}functionBd(){return"boolean"==typeof_g&&_g?!0:"object"==typeof_g&&Ge(_g)?!0:!1}functionCd(a,b){varc=[],d=1.3;returnKj.select("svg").selectAll(".dummy").data([a,b]).enter().append("text").text(function(a){returnId(a.id)(a.value,a.id)}).each(function(a,b){c[b]=this.getBoundingClientRect().width*d}).remove(),c}functionDd(a){varb=a?Hd:Ed,c=a?Hd:Fd;returnfunction(a,d,e){varf="y2"===db(e)?c:b;returnf(a,d)}}functionEd(a){varb=Zh?Zh:Gd;returnb(a)}functionFd(a){varb=gi?gi:Gd;returnb(a)}functionGd(a){returnb(a)?+a:""}functionHd(a,b){return(100*b).toFixed(1)+"%"}functionId(a){varc=function(a){returnb(a)?+a:""},d=db(a),e=c;return"function"==typeof_g.format?e=_g.format:"object"==typeof_g.format&&"function"==typeof_g.format[d]&&(e=_g.format[d]),e}functionJd(a){returna?Hg(a.x):null}functionKd(a){returnMath.ceil(Hg(Zi?Be(a.value):a.value))}functionLd(a){varb=a.axis&&"y2"===a.axis?Jg:Ig;returnMath.ceil(b(a.value))}functionMd(a){returna?Kg(a.x):null}functionNd(a,b){varc,d=a[b].x,e=[];for(c=b-1;c>=0&&d===a[c].x;c--)e.push(a[c]);for(c=b;c<a.length&&d===a[c].x;c++)e.push(a[c]);returne}functionOd(a,b,c,d){vare,f=c?c:0,g=d?d:a.length-1,h=Math.floor((g-f)/2)+f,i=a[h],j=Hg(i.x)-b[Ah?1:0];returnj>0?g=h:f=h,g-f===1||0===f&&0===g?(e=[],(a[f].x||0===a[f].x)&&(e=e.concat(Nd(a,f))),(a[g].x||0===a[g].x)&&(e=e.concat(Nd(a,g))),Qd(e,b)):Od(a,b,f,g)}functionPd(a,b){varc;returnc=a.map(function(a){returnOd(a.values,b)}),Qd(c,b)}functionQd(a,b){varc,d;returna.forEach(function(a){vare=Ie(a,b);(c>e||!c)&&(c=e,d=a)}),d}functionRd(a,b){returnQf.merge(a.map(function(a){returna.values})).filter(function(a){returna.x-b===0})}functionSd(a){varb=a.getBoundingClientRect(),c=[a.pathSegList.getItem(0),a.pathSegList.getItem(1)],d=c[0].x,e=Math.min(c[0].y,c[1].y);return{x:d,y:e,width:b.width,height:b.height}}functionTd(){returnah&&"desc"===ah.toLowerCase()}functionUd(){returnah&&"asc"===ah.toLowerCase()}functionVd(a){varb=Ud(),c=Td();returnb||c?a.sort(function(a,c){vard=function(a,b){returna+Math.abs(b.value)},e=a.values.reduce(d,0),f=c.values.reduce(d,0);returnb?f-e:e-f}):"function"==typeofah&&a.sort(ah),a}functionWd(a,c){vard,e,f,g,h,i,j,k=me(Rf.data.targets),l=a.filter(function(a){returna&&b(a.value)});0!==l.length&&Mi&&(Jj.html(Pi(a,eb(),Dd(k),gj)).style("display","block"),d=Jj.property("offsetWidth"),e=Jj.property("offsetHeight"),k?(g=kg/2+c[0],i=mg/2+c[1]+20):(Ah?(f=s(),g=f+c[0]+100,h=g+d,j=t()-y(),i=Hg(l[0].x)+20):(f=s(),g=f+x()+Hg(l[0].x)+20,h=g+d,j=f+t()-y(),i=c[1]+15),h>j&&(g-=h-j),i+e>u()&&(i-=e+30)),Jj.style("top",i+"px").style("left",g+"px"))}functionXd(){Jj.style("display","none")}functionYd(a){varc=a.filter(function(a){returna&&b(a.value)});if(Mi&&!je(Rf.data.targets)&&!me(Rf.data.targets)){vard=Gj.selectAll("line."+g.xgridFocus);d.style("visibility","visible").data([c[0]]).attr(Ah?"y1":"x1",Jd).attr(Ah?"y2":"x2",Jd),tf(d,"grid")}}functionZd(){Gj.select("line."+g.xgridFocus).style("visibility","hidden")}function$d(a,b){varc,d,e,f,h=[],i=Gj.select("."+g.axisX).selectAll(".tick").size();if("year"===a)for(c=ec(),d=c[0].getFullYear(),e=c[1].getFullYear(),f=d;e>=f;f++)h.push(newDate(f+"-01-01 00:00:00"));elseh=b.ticks(10);returnh.slice(0,i)}function_d(a){returna.x||0===a.x?Hg(a.x):null}functionae(a){return_(a.id)(a.value)}functionbe(){vara,b,d={},e=0;returnMc(Rf.data.targets.filter(pe)).forEach(function(f){for(a=0;a<Xg.length;a++)if(!(Xg[a].indexOf(f.id)<0))for(b=0;b<Xg[a].length;b++)if(Xg[a][b]ind){d[f.id]=d[Xg[a][b]];break}c(d[f.id])&&(d[f.id]=e++)}),d.__max__=e-1,d}functionce(a,b,c,d){vare=d?Kg:Hg;returnfunction(d){varf=d.idinc?c[d.id]:0;returnd.x||0===d.x?e(d.x)-a*(b/2-f):0}}functionde(a){returnfunction(b){varc=a?ab(b.id):_(b.id);returnc(b.value)}}functionee(a,b){varc=Vd(Mc(Rf.data.targets.filter(pe))),d=c.map(function(a){returna.id});returnfunction(e,f){varg=b?ab(e.id):_(e.id),h=g(0),i=h;returnc.forEach(function(b){b.id!==e.id&&a[b.id]===a[e.id]&&d.indexOf(b.id)<d.indexOf(e.id)&&b.values[f].value*e.value>0&&(i+=g(b.values[f].value)-h)}),i}}functionfe(a,b){return"number"==typeofwi?wi:b?2*a.tickOffset()*xi/b:0}functionge(a,b){Ic(a).forEach(function(a){Nj[a]=b===$g[a],$g[a]=b})}functionhe(a,b){varc=!1;returna.forEach(function(a){$g[a.id]===b&&(c=!0),a.idin$g||"line"!==b||(c=!0)}),c}functionie(a){returnhe(a,"bar")}functionje(a){returnhe(a,"scatter")}functionke(a){return"pie"===Zg||he(a,"pie")}functionle(a){return"donut"===Zg||he(a,"donut")}functionme(a){returnke(a)||le(a)}functionne(a){varb="string"==typeofa?a:a.id;return!(bin$g)||"line"===$g[b]||"spline"===$g[b]||"area"===$g[b]||"area-spline"===$g[b]}functionoe(a){varb="string"==typeofa?a:a.id;return"spline"===$g[b]||"area-spline"===$g[b]}functionpe(a){varb="string"==typeofa?a:a.id;return"bar"===$g[b]}functionqe(a){varb="string"==typeofa?a:a.id;return"scatter"===$g[b]}functionre(a){varb="string"==typeofa?a:a.id;return"pie"===$g[b]}functionse(a){varb="string"==typeofa?a:a.id;return"donut"===$g[b]}functionte(a){returnre(a)||se(a)}functionue(a){returnne(a)?[a]:[]}functionve(a){returnte(a.data)?[a]:[]}functionwe(a){returnpe(a)?a.values:[]}functionxe(a){returnne(a)||qe(a)?a.values:[]}functionye(a){returnpe(a)||ne(a)?a.values:[]}functionze(a){returnse(a)&&Gi||re(a)&&Ai}functionAe(a,b,c){vard=[];returnfunction(e){varf,g=e.id||e;returna[g]instanceofFunction?f=a[g](e):a[g]?f=a[g]:(d.indexOf(g)<0&&d.push(g),f=b[d.indexOf(g)%b.length]),cinstanceofFunction?c(f,e):f}}functionBe(b){varc;try{c=Tg?Qf.time.format(Tg).parse(b):newDate(b)}catch(d){a.console.error("Failed to parse x '"+b+"' to Date with format "+Tg)}returnc}functionCe(a,b){varc=Qf.mouse(a),d=Qf.select(a),e=1*d.attr("cx"),f=1*d.attr("cy");returnMath.sqrt(Math.pow(e-c[0],2)+Math.pow(f-c[1],2))<b}functionDe(a){varb=Qf.mouse(a),c=a.getBoundingClientRect(),d=a.pathSegList.getItem(0),e=a.pathSegList.getItem(1),f=d.x,g=Math.min(d.y,e.y),h=c.width,i=c.height,j=2,k=f-j,l=f+h+j,m=g+i+j,n=g-j;returnk<b[0]&&b[0]<l&&n<b[1]&&b[1]<m}functionEe(a,b){varc;for(c=0;c<b.length;c++)if(b[c].start<a&&a<=b[c].end)return!0;return!1}functionFe(a){return!a||"string"==typeofa&&0===a.length||"object"==typeofa&&0===Object.keys(a).length}functionGe(a){returnObject.keys(a).length>0}functionHe(a,b){varc=!1;returnObject.keys(a).forEach(function(d){a[d]===b&&(c=!0)}),c}functionIe(a,b){varc="y"===db(a.id)?Ig:Jg,d=Ah?1:0,e=Ah?0:1;returnMath.pow(Hg(a.x)-b[d],2)+Math.pow(c(a.value)-b[e],2)}functionJe(a,b){varc=0;a.each(function(){++c}).each("end",function(){--c||b.apply(this,arguments)})}functionKe(a,b,c){returnd(a[b])?a[b]:c}functionLe(a){return10*Math.ceil(a/10)}functionMe(a,b){varc;returnQf.select("body").selectAll(".dummy").data([a]).enter().append("text").classed(b?b:"",!0).text(a).each(function(){c=this.getBoundingClientRect()}).remove(),c}functionNe(a,b,c){nh(b,a.node()),Gj.select("."+g.selectedCircles+sd(b.id)).selectAll("."+g.selectedCircle+"-"+c).data([b]).enter().append("circle").attr("class",function(){returnYc(g.selectedCircle,c)}).attr("cx",Ah?ae:_d).attr("cy",Ah?_d:ae).attr("stroke",function(){returngj(b)}).attr("r",1.4*Ye(b)).transition().duration(100).attr("r",Ye)}functionOe(a,b,c){oh(b,a.node()),Gj.select("."+g.selectedCircles+sd(b.id)).selectAll("."+g.selectedCircle+"-"+c).transition().duration(100).attr("r",0).remove()}functionPe(a,b,c,d){a?Ne(b,c,d):Oe(b,c,d)}functionQe(a,b){nh(b,a.node()),a.transition().duration(100).style("fill",function(){returnQf.rgb(gj(b)).brighter(.75)})}functionRe(a,b){oh(b,a.node()),a.transition().duration(100).style("fill",function(){returngj(b)})}functionSe(a,b,c,d){a?Qe(b,c,d):Re(b,c,d)}functionTe(a,b,c,d){Se(a,b,c.data,d)}functionUe(a){return"circle"===a.nodeName?Pe:Qf.select(a).classed(g.bar)?Se:Te}functionVe(a){returna.filter(function(a){returnb(a.value)})}functionWe(a){returnpi?"function"==typeofqi?qi(a):qi:0}functionXe(a){returnsi?ti?ti:1.75*We(a):We(a)}functionYe(a){returnui?ui:4*We(a)}functionZe(a,c){return(c?Gj.selectAll("."+g.circles+sd(c)):Gj).selectAll("."+g.circle+(b(a)?"-"+a:""))}function$e(a,b){Ze(a,b).classed(g.EXPANDED,!0).attr("r",Xe)}function_e(a){Ze(a).filter(function(){returnQf.select(this).classed(g.EXPANDED)}).classed(g.EXPANDED,!1).attr("r",We)}functionaf(a){returnGj.selectAll("."+g.bar+(b(a)?"-"+a:""))}functionbf(a){af(a).classed(g.EXPANDED,!0)}functioncf(a){af(a).classed(g.EXPANDED,!1)}functiondf(a){varb=a?ab:_,c=a?Jd:Md,d=function(a){returnb(a.id)(a.value)},e=Qf.svg.line().x(Ah?d:c).y(Ah?c:d);returnvi||(e=e.defined(function(a){returnnull!=a.value})),function(c){vard=vi?Ve(c.values):c.values,f=a?f:Kg,g=b(c.id),h=0,i=0;returnne(c)?bh[c.id]?kf(d,f,g,bh[c.id]):(e.interpolate(oe(c)?"cardinal":"linear"),e(d)):(d[0]&&(h=f(d[0].x),i=g(d[0].value)),Ah?"M "+i+" "+h:"M "+h+" "+i)}}functionef(a,b){varc=jf(a,b);returnfunction(a,b){vard=c(a,b),e=Ah?1:0,f=Ah?0:1,g="M "+d[0][e]+","+d[0][f]+" L"+d[1][e]+","+d[1][f]+" L"+d[2][e]+","+d[2][f]+" L"+d[3][e]+","+d[3][f]+" z";
returng}}functionff(a,b){varc=jf(a,!1),d=b?gf:hf;returnfunction(a,b){returnd(c(a,b),a,this)}}functiongf(a,b){varc;returnAh?(c=pe(b)?4:6,a[2][1]+c*(b.value<0?-1:1)):a[0][0]+(a[2][0]-a[0][0])/2}functionhf(a,b,c){vard=c.getBoundingClientRect();returnAh?(a[0][0]+a[2][0]+.6*d.height)/2:a[2][1]+(b.value<0?d.height:pe(b)?-3:-6)}functionjf(a,b){varc=a.__max__+1,d=fe(Ng,c),e=ce(d,c,a,!!b),f=de(!!b),g=ee(a,!!b),h=b?ab:_;returnfunction(a,b){varc=h(a.id)(0),i=g(a,b)||c,j=e(a),k=f(a);returnAh&&(0<a.value&&c>k||a.value<0&&k>c)&&(k=c),[[j,i],[j,k-(c-i)],[j+d,k-(c-i)],[j+d,i]]}}functionkf(a,b,e,f){varg,h,i,j,k,l,m,n,o,p,q,r,s=-1,t="M",u=[];if(d(f))for(g=0;g<f.length;g++)u[g]={},u[g].start=c(f[g].start)?a[0].x:Zi?Be(f[g].start):f[g].start,u[g].end=c(f[g].end)?a[a.length-1].x:Zi?Be(f[g].end):f[g].end;for(q=Ah?function(a){returne(a.value)}:function(a){returnb(a.x)},r=Ah?function(a){returnb(a.x)}:function(a){returne(a.value)},i=Zi?function(a,c,d,f){varg=a.x.getTime(),h=c.x-a.x,i=newDate(g+h*d),j=newDate(g+h*(d+f));return"M"+b(i)+" "+e(k(d))+" "+b(j)+" "+e(k(d+f))}:function(a,c,d,f){return"M"+b(j(d),!0)+" "+e(k(d))+" "+b(j(d+f),!0)+" "+e(k(d+f))},g=0;g<a.length;g++){if(c(u)||!Ee(a[g].x,u))t+=" "+q(a[g])+" "+r(a[g]);elsefor(j=Y(a[g-1].x,a[g].x,Zi),k=Y(a[g-1].value,a[g].value),l=b(a[g].x)-b(a[g-1].x),m=e(a[g].value)-e(a[g-1].value),n=Math.sqrt(Math.pow(l,2)+Math.pow(m,2)),o=2/n,p=2*o,h=o;1>=h;h+=p)t+=i(a[g-1],a[g],h,o);s=a[g].x}returnt}functionlf(b){varc=newMutationObserver(function(d){d.forEach(function(d){if("childList"===d.type&&d.previousSibling){c.disconnect();vare=a.setInterval(function(){b.node().parentNode&&(a.clearInterval(e),uf({withUpdateTranslate:!0,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),b.transition().style("opacity",1))},10)}})});c.observe(b.node(),{attributes:!0,childList:!0,characterData:!0})}functionmf(b){varc,d,e,f=!0;if(Kj=Qf.select(Tf),Kj.empty()&&(Kj=Qf.select(document.createElement("div")).style("opacity",0),lf(Kj),f=!1),Kj.html("").classed("c3",!0),Rf.data.xs={},Rf.data.targets=Ac(b),fh&&(Rf.data.targets=Rf.data.targets.filter(fh)),eh&&Pc(eh===!0?Hc(Rf.data.targets):eh),p(),W(),Hg.domain(Qf.extent(ec(Rf.data.targets))),Ig.domain(ac(Rf.data.targets,"y")),Jg.domain(ac(Rf.data.targets,"y2")),Kg.domain(Hg.domain()),Lg.domain(Ig.domain()),Mg.domain(Jg.domain()),Lj=Hg.domain(),zj.scale(Kg),$f&&Dj.scale(Hg),Ej=Kj.append("svg").style("overflow","hidden").on("mouseenter",cg).on("mouseleave",dg),Fj=Ej.append("defs"),Fj.append("clipPath").attr("id",Ti).append("rect"),Fj.append("clipPath").attr("id",Ui).append("rect"),Fj.append("clipPath").attr("id",Vi).append("rect"),yf(),Gj=Ej.append("g").attr("transform",qj.main),Hj=Ej.append("g").attr("transform",qj.context),Ij=Ej.append("g").attr("transform",qj.legend),rh||Hj.style("visibility","hidden"),uh||(Ij.style("visibility","hidden"),kj=Hc(Rf.data.targets)),Jj=Kj.style("position","relative").append("div").style("position","absolute").style("pointer-events","none").style("z-index","10").style("display","none"),Lf(Hc(Rf.data.targets),{withTransform:!1,withTransitionForTransform:!1}),d=Gj.append("g").attr("clip-path",Wi).attr("class",g.grid),ji&&d.append("g").attr("class",g.xgrids),Ge(li)&&d.append("g").attr("class",g.xgridLines),ri&&d.append("g").attr("class",g.xgridFocus).append("line").attr("class",g.xgridFocus),mi&&d.append("g").attr("class",g.ygrids),Ge(ni)&&d.append("g").attr("class",g.ygridLines),Gj.append("g").attr("clip-path",Wi).attr("class",g.regions),Gj.append("g").attr("clip-path",Wi).attr("class",g.chart),c=Gj.select("."+g.chart).append("g").attr("class",g.eventRects).style("fill-opacity",0).style("cursor",$f?Ah?"ns-resize":"ew-resize":null),Gj.select("."+g.chart).append("g").attr("class",g.chartBars),Gj.select("."+g.chart).append("g").attr("class",g.chartLines),Gj.select("."+g.chart).append("g").attr("class",g.chartArcs).attr("transform",qj.arc).append("text").attr("class",g.chartArcsTitle).style("text-anchor","middle").text(Wb()),Gj.select("."+g.chart).append("g").attr("class",g.chartTexts),$f&&Gj.insert("rect",ag?null:"g."+g.grid).attr("class",g.zoomRect).attr("width",kg).attr("height",mg).style("opacity",0).style("cursor",Ah?"ns-resize":"ew-resize").call(Dj).on("dblclick.zoom",null),Rh&&zj.extent("function"!=typeofRh?Rh:Rh(ec())),lj.x=Gj.append("g").attr("class",g.axisX).attr("clip-path",Xi).attr("transform",qj.x).style("visibility",Bh?"visible":"hidden"),lj.x.append("text").attr("class",g.axisXLabel).attr("transform",Ah?"rotate(-90)":"").style("text-anchor",Fb),lj.y=Gj.append("g").attr("class",g.axisY).attr("clip-path",Yi).attr("transform",qj.y).style("visibility",Th?"visible":"hidden"),lj.y.append("text").attr("class",g.axisYLabel).attr("transform",Ah?"":"rotate(-90)").style("text-anchor",Gb),lj.y2=Gj.append("g").attr("class",g.axisY2).attr("transform",qj.y2).style("visibility",ai?"visible":"hidden"),lj.y2.append("text").attr("class",g.axisY2Label).attr("transform",Ah?"":"rotate(-90)").style("text-anchor",Hb),Hj.append("g").attr("clip-path",Wi).attr("class",g.chart),Hj.select("."+g.chart).append("g").attr("class",g.chartBars),Hj.select("."+g.chart).append("g").attr("class",g.chartLines),Hj.append("g").attr("clip-path",Wi).attr("class",g.brush).call(zj).selectAll("rect").attr(Ah?"width":"height",Ah?lg:ng),lj.subx=Hj.append("g").attr("class",g.axisX).attr("transform",qj.subx).attr("clip-path",Ah?"":Xi),Bf(Rf.data.targets),f&&uf({withUpdateTranslate:!0,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1}),Qi){if(Zi&&"string"==typeofRi){for(Ri=Be(Ri),e=0;e<Rf.data.targets[0].values.length&&Rf.data.targets[0].values[e].x-Ri!==0;e++);Ri=e}Jj.html(Pi(Rf.data.targets.map(function(a){returnuc(a.values[Ri])}),eb(),Dd(me(Rf.data.targets)),gj)),Jj.style("top",Si.top).style("left",Si.left).style("display","block")}null==a.onresize&&(a.onresize=xf()),a.onresize.add&&(a.onresize.add(eg),a.onresize.add(function(){Rf.flush()}),a.onresize.add(fg)),Rf.element=Kj.node()}functionnf(a){a.append("rect").attr("class",md).style("cursor",gh&&hh?"pointer":null).on("mouseover",function(a,b){if(!bj&&!me(Rf.data.targets)){varc=Rf.data.targets.map(function(a){returnuc(a.values[b])}),d=[];Object.keys(Vg).forEach(function(a){for(varb=0;b<c.length;b++)if(c[b]&&c[b].id===a){d.push(c[b]),c.shift(b);break}}),c=d.concat(c),si&&$e(b),bf(b),Gj.selectAll("."+g.shape+"-"+b).each(function(a){lh(a)})}}).on("mouseout",function(a,b){me(Rf.data.targets)||(Zd(),Xd(),_e(b),cf(),Gj.selectAll("."+g.shape+"-"+b).each(function(a){mh(a)}))}).on("mousemove",function(a,b){varc;bj||me(Rf.data.targets)||(c=Mc(Rf.data.targets).map(function(a){returnuc(a.values[b])}),Wd(c,Qf.mouse(this)),Yd(c),gh&&(hh||Gj.selectAll("."+g.shape+"-"+b).filter(function(a){returnih(a)}).each(function(){vara=Qf.select(this).classed(g.EXPANDED,!0);"circle"===this.nodeName&&a.attr("r",Xe),Ej.select("."+g.eventRect+"-"+b).style("cursor",null)}).filter(function(a){return"circle"===this.nodeName?Ce(this,Ye(a)):"path"===this.nodeName?De(this):void0}).each(function(){vara=Qf.select(this);a.classed(g.EXPANDED)||(a.classed(g.EXPANDED,!0),"circle"===this.nodeName&&a.attr("r",Ye)),Ej.select("."+g.eventRect+"-"+b).style("cursor","pointer")})))}).on("click",function(a,b){returnme(Rf.data.targets)?void0:cj?void(cj=!1):voidGj.selectAll("."+g.shape+"-"+b).each(function(a){pf(this,a,b)})}).call(Qf.behavior.drag().origin(Object).on("drag",function(){qf(Qf.mouse(this))}).on("dragstart",function(){rf(Qf.mouse(this))}).on("dragend",function(){sf()})).call(Dj).on("dblclick.zoom",null)}functionof(a){a.append("rect").attr("x",0).attr("y",0).attr("width",kg).attr("height",mg).attr("class",g.eventRect).on("mouseout",function(){me(Rf.data.targets)||(Zd(),Xd(),_e())}).on("mousemove",function(){vara,b,c,d,e=Mc(Rf.data.targets);bj||me(e)||(a=Qf.mouse(this),b=Pd(e,a),b&&(c=qe(b)?[b]:Rd(e,b.x),d=c.map(function(a){returnuc(a)}),Wd(d,a),si&&(_e(),$e(b.index,b.id)),Yd(d),Ie(b,a)<100?(Ej.select("."+g.eventRect).style("cursor","pointer"),dj||(lh(b),dj=!0)):(Ej.select("."+g.eventRect).style("cursor",null),mh(b),dj=!1)))}).on("click",function(){vara,b,c=Mc(Rf.data.targets);me(c)||(a=Qf.mouse(this),b=Pd(c,a),b&&Ie(b,a)<100&&Gj.select("."+g.circles+"-"+sd(b.id)).select("."+g.circle+"-"+b.index).each(function(){pf(this,b,b.index)}))}).call(Qf.behavior.drag().origin(Object).on("drag",function(){qf(Qf.mouse(this))}).on("dragstart",function(){rf(Qf.mouse(this))}).on("dragend",function(){sf()})).call(Dj).on("dblclick.zoom",null)}functionpf(a,b,c){vard,e,f=Qf.select(a),h=f.classed(g.SELECTED);"circle"===a.nodeName?(d=Ce(a,1.5*Ye(b)),e=Pe):"path"===a.nodeName&&(f.classed(g.bar)?(d=De(a),e=Se):(d=!0,e=Te)),(hh||d)&&(gh&&ih(b)&&(jh||Gj.selectAll("."+g.shapes+(hh?sd(b.id):"")).selectAll("."+g.shape).each(function(a,b){varc=Qf.select(this);c.classed(g.SELECTED)&&e(!1,c.classed(g.SELECTED,!1),a,b)}),f.classed(g.SELECTED,!h),e(!h,f,b,c)),kh(b,a))}functionqf(a){varb,c,d,e,f,h,i,j;me(Rf.data.targets)||gh&&(!$f||Dj.altDomain)&&jh&&(b=aj[0],c=aj[1],d=a[0],e=a[1],f=Math.min(b,d),h=Math.max(b,d),i=hh?hg.top:Math.min(c,e),j=hh?mg:Math.max(c,e),Gj.select("."+g.dragarea).attr("x",f).attr("y",i).attr("width",h-f).attr("height",j-i),Gj.selectAll("."+g.shapes).selectAll("."+g.shape).filter(function(a){returnih(a)}).each(function(a,b){varc,d,e,k,l,m,n=Qf.select(this),o=n.classed(g.SELECTED),p=n.classed(g.INCLUDED),q=!1;if(n.classed(g.circle))c=1*n.attr("cx"),d=1*n.attr("cy"),l=Pe,q=c>f&&h>c&&d>i&&j>d;else{if(!n.classed(g.bar))return;m=Sd(this),c=m.x,d=m.y,e=m.width,k=m.height,l=Se,q=!(c>h||f>c+e||d>j||i>d+k)}q^p&&(n.classed(g.INCLUDED,!p),n.classed(g.SELECTED,!o),l(!o,n,a,b))}))}functionrf(a){me(Rf.data.targets)||gh&&(aj=a,Gj.select("."+g.chart).append("rect").attr("class",g.dragarea).style("opacity",.1),bj=!0,ph())}functionsf(){me(Rf.data.targets)||gh&&(Gj.select("."+g.dragarea).transition().duration(100).style("opacity",0).remove(),Gj.selectAll("."+g.shape).classed(g.INCLUDED,!1),bj=!1,qh())}functiontf(a,b){"grid"===b&&a.each(function(){vara=Qf.select(this),b=a.attr("x1"),c=a.attr("x2"),d=a.attr("y1"),e=a.attr("y2");a.attr({x1:Math.ceil(b),x2:Math.ceil(c),y1:Math.ceil(d),y2:Math.ceil(e)})})}functionuf(a,c){vard,e,f,h,i,j,k,l,m,n,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,R,S,T,U,V,X,Y,Z,$=be(),_=me(Rf.data.targets),ab=Mc(Rf.data.targets);if(a=a||{},E=Ke(a,"withY",!0),F=Ke(a,"withSubchart",!0),G=Ke(a,"withTransition",!0),J=Ke(a,"withTransform",!1),K=Ke(a,"withUpdateXDomain",!1),L=Ke(a,"withUpdateOrgXDomain",!1),N=Ke(a,"withUpdateTranslate",!1),M=Ke(a,"withLegend",!1),H=Ke(a,"withTransitionForExit",G),I=Ke(a,"withTransitionForAxis",G),T=G?gg:0,U=H?T:0,V=I?T:0,c=c||zf(V),N&&(Ah?(lj.x.call(Ng),lj.subx.call(Qg)):(lj.y.call(Og),lj.y2.call(Pg)),p(),W(),yf(),o(!1)),M&&uh&&Lf(Hc(Rf.data.targets),a,c),$i&&0===ab.length&&Hg.domain([0,lj.x.selectAll(".tick").size()]),ab.length&&(L&&(Hg.domain(Qf.extent(ec(ab))),Lj=Hg.domain(),$f&&Dj.scale(Hg).updateScaleExtent(),Kg.domain(Hg.domain()),zj.scale(Kg)),K&&(Hg.domain(zj.empty()?Lj:zj.extent()),$f&&Dj.scale(Hg).updateScaleExtent()),Lh||!Kh&&!Jh||(X=Oc(Nc(ab),Jh),Ng.tickValues(X),Qg.tickValues(X))),Ig.domain(ac(ab,"y")),Jg.domain(ac(ab,"y2")),lj.x.style("opacity",_?0:1),lj.y.style("opacity",_?0:1),lj.y2.style("opacity",_?0:1),lj.subx.style("opacity",_?0:1),c.axisX.call(Ng),c.axisY.call(Og),c.axisY2.call(Pg),c.axisSubX.call(Qg),Jb(G),K&&ab.length)if(Hh&&X){for(Y=1;Y<X.length;Y++)if(X.length/Y<Ih){Z=Y;break}Ej.selectAll("."+g.axisX+" .tick text").each(function(a){varb=X.indexOf(a);b>=0&&Qf.select(this).style("display",b%Z?"none":"block")})}elseEj.selectAll("."+g.axisX+" .tick text").style("display","block");!Ah&&Mh&&kb(lj.x,c.axisX,Mh),O=ef($),R=ff($,!0),S=ff($,!1),Lg.domain(Ig.domain()),Mg.domain(Jg.domain()),Jj.style("display","none"),q(),Gj.select("line."+g.xgridFocus).style("visibility","hidden"),ji&&(f=$d(ki,Hg),B=$i?Ng.tickOffset():0,e=Ah?{x1:0,x2:kg,y1:function(a){returnHg(a)-B},y2:function(a){returnHg(a)-B}}:{x1:function(a){returnHg(a)+B},x2:function(a){returnHg(a)+B},y1:hg.top,y2:mg},d=Gj.select("."+g.xgrids).selectAll("."+g.xgrid).data(f),d.enter().append("line").attr("class",g.xgrid),d.attr(e).style("opacity",function(){return+Qf.select(this).attr(Ah?"y1":"x1")===(Ah?mg:0)?0:1}),d.exit().remove()),Ge(li)&&(h=Gj.select("."+g.xgridLines).selectAll("."+g.xgridLine).data(li),i=h.enter().append("g").attr("class",function(a){returng.xgridLine+(a.class?a.class:"")}),i.append("line").style("opacity",0),i.append("text").attr("text-anchor","end").attr("transform",Ah?"":"rotate(-90)").attr("dx",Ah?0:-hg.top).attr("dy",-5).style("opacity",0),h.select("line").transition().duration(T).attr("x1",Ah?0:Kd).attr("x2",Ah?kg:Kd).attr("y1",Ah?Kd:hg.top).attr("y2",Ah?Kd:mg).style("opacity",1),h.select("text").transition().duration(T).attr("x",Ah?kg:0).attr("y",Kd).text(function(a){returna.text}).style("opacity",1),h.exit().transition().duration(T).style("opacity",0).remove()),E&&mi&&(j=Gj.select("."+g.ygrids).selectAll("."+g.ygrid).data(Ig.ticks(oi)),j.enter().append("line").attr("class",g.ygrid),j.attr("x1",Ah?Ig:0).attr("x2",Ah?Ig:kg).attr("y1",Ah?0:Ig).attr("y2",Ah?mg:Ig),j.exit().remove(),tf(j,"grid")),E&&Ge(ni)&&(k=Gj.select("."+g.ygridLines).selectAll("."+g.ygridLine).data(ni),l=k.enter().append("g").attr("class",function(a){returng.ygridLine+(a.class?a.class:"")}),l.append("line").style("opacity",0),l.append("text").attr("text-anchor","end").attr("transform",Ah?"rotate(-90)":"").attr("dx",Ah?0:-hg.top).attr("dy",-5).style("opacity",0),k.select("line").transition().duration(T).attr("x1",Ah?Ld:0).attr("x2",Ah?Ld:kg).attr("y1",Ah?0:Ld).attr("y2",Ah?mg:Ld).style("opacity",1),k.select("text").transition().duration(T).attr("x",Ah?0:kg).attr("y",Ld).text(function(a){returna.text}).style("opacity",1),k.exit().transition().duration(T).style("opacity",0).remove()),u=Gj.select("."+g.regions).selectAll("."+g.region).data(Li),u.enter().append("g").attr("class",ld).append("rect").style("fill-opacity",0),u.selectAll("rect").transition().duration(T).attr("x",jc).attr("y",kc).attr("width",lc).attr("height",mc).style("fill-opacity",function(a){returnb(a.opacity)?a.opacity:.1}),u.exit().transition().duration(T).style("opacity",0).remove(),s=Gj.selectAll("."+g.bars).selectAll("."+g.bar).data(we),s.enter().append("path").attr("class",fd).style("stroke","none").style("fill",gj),s.style("opacity",xd).transition().duration(T).attr("d",O).style("fill",gj).style("opacity",1),s.exit().transition().duration(U).style("opacity",0).remove(),m=Gj.selectAll("."+g.lines).selectAll("."+g.line).data(ue),m.enter().append("path").attr("class",bd).style("stroke",gj),m.style("opacity",xd).transition().duration(T).attr("d",Aj).style("stroke",gj).style("opacity",1),m.exit().transition().duration(U).style("opacity",0).remove(),n=Gj.selectAll("."+g.areas).selectAll("."+g.area).data(ue),n.enter().append("path").attr("class",jd).style("fill",gj).style("opacity",function(){returnMj=+Qf.select(this).style("opacity"),0}),n.style("opacity",0).transition().duration(T).attr("d",Cj).style("fill",gj).style("opacity",Mj),n.exit().transition().duration(U).style("opacity",0).remove(),pi&&(r=Gj.selectAll("."+g.circles).selectAll("."+g.circle).data(xe),r.enter().append("circle").attr("class",dd).attr("r",We).style("fill",gj),r.style("opacity",xd).transition().duration(T).style("opacity",zd).style("fill",gj).attr("cx",Ah?ae:_d).attr("cy",Ah?_d:ae),r.exit().remove()),Bd()&&(v=Gj.selectAll("."+g.texts).selectAll("."+g.text).data(ye),v.enter().append("text").attr("class",Zc).attr("text-anchor",function(a){returnAh?a.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",gj).style("fill-opacity",0),v.text(function(a){returnId(a.id)(a.value,a.id)}).style("fill-opacity",yd).transition().duration(T).attr("x",R).attr("y",S).style("fill",gj).style("fill-opacity",Ad),v.exit().transition().duration(U).style("fill-opacity",0).remove()),t=Gj.selectAll("."+g.arcs).selectAll("."+g.arc).data(ve),t.enter().append("path").attr("class",hd).style("fill",function(a){returngj(a.data)}).style("cursor",function(a){returnih(a)?"pointer":null}).style("opacity",0).each(function(a){this._current=a}).on("mouseover",function(a,b){varc,d,e;ej||(c=Kb(a),d=Qb(c),e=Yb(),Sb(c.data.id),Hf(c.data.id,!0),e(d,b))}).on("mousemove",function(a){varb=Kb(a),c=Qb(b),d=[c];Wd(d,Qf.mouse(this))}).on("mouseout",function(a,b){varc,d,e;ej||(c=Kb(a),d=Qb(c),e=Zb(),Tb(c.data.id),If(),Xd(),e(d,b))}).on("click",function(a,b){varc=Kb(a),d=Qb(c),e=Xb();pf(this,a,b),e(d,b)}),t.attr("transform",J?"scale(0)":"").style("opacity",function(a){returna===this._current?0:1}).each(function(){ej=!0}).transition().duration(T).attrTween("d",function(a){varb,c=Kb(a);returnc?(b=Qf.interpolate(this._current,c),this._current=b(0),function(a){returnNb(b(a),!0)}):function(){return"M 0 0"}}).attr("transform",J?"scale(1)":"").style("fill",function(a){returngj(a.data)}).style("opacity",1).call(Je,function(){ej=!1}),t.exit().transition().duration(U).style("opacity",0).remove(),Gj.selectAll("."+g.chartArc).select("text").style("opacity",0).text(Rb).attr("transform",Ob).transition().duration(T).style("opacity",function(a){returnKc(a.data.id)&&te(a.data)?1:0}),Gj.select("."+g.chartArcsTitle).style("opacity",le(Rf.data.targets)?1:0),rh&&(Qf.event&&"zoom"===Qf.event.type&&zj.extent(Hg.orgDomain()).update(),F&&(!Ah&&Mh&&kb(lj.subx,c.axisSubX,Mh),zj.empty()||zj.extent(Hg.orgDomain()).update(),P=ef($,!0),x=Hj.selectAll("."+g.bars).selectAll("."+g.bar).data(we),x.enter().append("path").attr("class",fd).style("stroke","none").style("fill",gj),x.style("opacity",xd).transition().duration(T).attr("d",P).style("opacity",1),x.exit().transition().duration(T).style("opacity",0).remove(),w=Hj.selectAll("."+g.lines).selectAll("."+g.line).data(ue),w.enter().append("path").attr("class",bd).style("stroke",gj),w.style("opacity",xd).transition().duration(T).attr("d",Bj).style("opacity",1),w.exit().transition().duration(T).style("opacity",0).remove())),Gj.selectAll("."+g.selectedCircles).filter(function(a){returnpe(a)}).selectAll("circle").remove(),Gj.selectAll("."+g.selectedCircle).transition().duration(T).attr("cx",Ah?ae:_d).attr("cy",Ah?_d:ae),bg&&(y=Gj.select("."+g.eventRects),Ge(Sg)&&!tc(Sg)?(y.classed(g.eventRectsMultiple)||y.classed(g.eventRectsMultiple,!0).classed(g.eventRectsSingle,!1).selectAll("."+g.eventRect).remove(),z=Gj.select("."+g.eventRects).selectAll("."+g.eventRect).data([0]),of(z.enter()),z.attr("x",0).attr("y",0).attr("width",kg).attr("height",mg)):(y.classed(g.eventRectsSingle)||y.classed(g.eventRectsMultiple,!1).classed(g.eventRectsSingle,!0).selectAll("."+g.eventRect).remove(),!_i&&!Zi||$i?(D=Q(),C=function(a){returnHg(a.x)-D/2}):(D=function(a,b){varc=Cc(b),d=Dc(b),e=Rf.data.xs[a.id][b];return(Hg(d?d:1.1*e)-Hg(c?c:.9*e))/2},C=function(a,b){varc=Cc(b),d=Rf.data.xs[a.id][b];return(Hg(d)+Hg(c?c:.9*d))/2}),A=Fc(Rf.data.targets),Gj.select("."+g.eventRects).datum(A?A.values:[]),z=Gj.select("."+g.eventRects).selectAll("."+g.eventRect).data(function(a){returna}),nf(z.enter()),z.attr("class",md).attr("x",Ah?0:C).attr("y",Ah?C:0).attr("width",Ah?kg:D).attr("height",Ah?D:mg),z.exit().remove())),Hc(Rf.data.targets).forEach(function(a){Nj[a]=!0})}functionvf(){uf({withTransition:!1,withY:!1,withSubchart:!1,withUpdateXDomain:!0})}functionwf(){if(0!==Mc(Rf.data.targets).length){if("mousemove"===Qf.event.sourceEvent.type&&Dj.altDomain)returnHg.domain(Dj.altDomain),voidDj.scale(Hg).updateScaleExtent();$i&&Hg.orgDomain()[0]===Lj[0]&&Hg.domain([Lj[0]-1e-10,Hg.orgDomain()[1]]),uf({withTransition:!1,withY:!1,withSubchart:!1}),"mousemove"===Qf.event.sourceEvent.type&&(cj=!0)}}functionxf(){functiona(){b.forEach(function(a){a()})}varb=[];returna.add=function(a){b.push(a)},a}functionyf(){Ej.attr("width",og).attr("height",pg),Ej.select("#"+Ti).select("rect").attr("width",kg).attr("height",mg),Ej.select("#"+Ui).select("rect").attr("x",G).attr("y",H).attr("width",M).attr("height",N),Ej.select("#"+Vi).select("rect").attr("x",I).attr("y",J).attr("width",O).attr("height",P),Ej.select("."+g.zoomRect).attr("width",kg).attr("height",mg),Kj.style("max-height",pg+"px")}functionzf(a){return{axisX:a?lj.x.transition().duration(a):lj.x,axisY:a?lj.y.transition().duration(a):lj.y,axisY2:a?lj.y2.transition().duration(a):lj.y2,axisSubX:a?lj.subx.transition().duration(a):lj.subx}}functionAf(a){varb;a=a||{},a.withTransition=Ke(a,"withTransition",!0),a.withTransform=Ke(a,"withTransform",!1),a.withLegend=Ke(a,"withLegend",!1),a.withUpdateXDomain=!0,a.withUpdateOrgXDomain=!0,a.withTransitionForExit=!1,a.withLegend&&uh||(b=zf(a.withTransitionForAxis?gg:0),p(),W(),yf(),o(a.withTransition,b)),uf(a,b)}functionBf(a){varb,c,d,e,f,h,i,j,k,l,m,n;i=Gj.select("."+g.chartTexts).selectAll("."+g.chartText).data(a).attr("class",od),j=i.enter().append("g").attr("class",od).style("opacity",0).style("pointer-events","none"),j.append("g").attr("class",$c),e=Gj.select("."+g.chartBars).selectAll("."+g.chartBar).data(a).attr("class",qd),d=e.enter().append("g").attr("class",qd).style("opacity",0).style("pointer-events","none"),d.append("g").attr("class",gd).style("cursor",function(a){returnih(a)?"pointer":null}),c=Gj.select("."+g.chartLines).selectAll("."+g.chartLine).data(a).attr("class",pd),b=c.enter().append("g").attr("class",pd).style("opacity",0).style("pointer-events","none"),b.append("g").attr("class",cd),b.append("g").attr("class",kd),b.append("g").attr("class",function(a){returnYc(g.selectedCircles,a.id)}),b.append("g").attr("class",ed).style("cursor",function(a){returnih(a)?"pointer":null}),a.forEach(function(a){Gj.selectAll("."+g.selectedCircles+sd(a.id)).selectAll("."+g.selectedCircle).each(function(b){b.value=a.values[b.index].value})}),h=Gj.select("."+g.chartArcs).selectAll("."+g.chartArc).data(yg(a)).attr("class",rd),f=h.enter().append("g").attr("class",rd),f.append("g").attr("class",id),f.append("text").attr("dy",".35em").style("opacity",0).style("text-anchor","middle").style("pointer-events","none"),rh&&(n=Hj.select("."+g.chartBars).selectAll("."+g.chartBar).data(a).attr("class",qd),m=n.enter().append("g").style("opacity",0).attr("class",qd),m.append("g").attr("class",gd),l=Hj.select("."+g.chartLines).selectAll("."+g.chartLine).data(a).attr("class",pd),k=l.enter().append("g").style("opacity",0).attr("class",pd),k.append("g").attr("class",cd)),Ej.selectAll("."+g.target).filter(function(a){returnKc(a.id)}).transition().duration(gg).style("opacity",1)}functionCf(a,b){b.filter&&(a=a.filter(b.filter)),(b.type||b.types)&&a.forEach(function(a){b.types?ge(a.id,b.types[a.id]):ge(a.id,b.type)}),Rf.data.targets.forEach(function(b){for(varc=0;c<a.length;c++)if(b.id===a[c].id){b.values=a[c].values,a.splice(c,1);break}}),Rf.data.targets=Rf.data.targets.concat(a),Bf(Rf.data.targets),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),"function"==typeofb.done&&b.done()}functionDf(a){if("data"ina)Cf(Ac(a.data),a);elseif("url"ina)Qf.csv(a.url,function(b,c){Cf(Ac(c),a)});elseif("rows"ina)Cf(Ac(yc(a.rows)),a);else{if(!("columns"ina))throwError("url or rows or columns is required.");Cf(Ac(zc(a.columns)),a)}}functionEf(a,b){return"function"!=typeofb&&(b=function(){}),a=a.filter(function(a){returnJc(Rf.data.targets,a)}),a&&0!==a.length?(Ej.selectAll(a.map(function(a){returntd(a)})).transition().style("opacity",0).remove().call(Je,b),voida.forEach(function(a){Nj[a]=!1,Ij.selectAll("."+g.legendItem+sd(a)).remove(),Rf.data.targets=Rf.data.targets.filter(function(b){returnb.id!==a})})):voidb()}functionFf(a){returna.classed(g.legendItemHidden)?vj:1}functionGf(a){returna.classed(g.legendItemHidden)?vj:.3}functionHf(a,b){Ij.selectAll("."+g.legendItem).transition().duration(100).style("opacity",function(c){vard=Qf.select(this);returna&&c!==a?b?Gf(d):Ff(d):b?Ff(d):Gf(d)})}functionIf(){Ij.selectAll("."+g.legendItem).transition().duration(100).style("opacity",function(){returnFf(Qf.select(this))})}functionJf(a){uh||(uh=!0,Ij.style("visibility","visible")),Sc(a),Ij.selectAll(wd(a)).style("visibility","visible").transition().style("opacity",function(){returnFf(Qf.select(this))})}functionKf(a){uh&&Fe(a)&&(uh=!1,Ij.style("visibility","hidden")),Rc(a),Ij.selectAll(wd(a)).style("opacity",0).style("visibility","hidden")}functionLf(a,b,c){functione(b,c,d){functione(a,b){b||(f=(m-z-l)/2,y>f&&(f=(m-l)/2,z=0,F++)),E[a]=F,D[F]=f,A[a]=z,z+=l}varf,h,i=Me(b.textContent,g.legendItem),j=10*Math.ceil((i.width+v)/10),k=10*Math.ceil((i.height+u)/10),l=rj?k:j,m=rj?V():U();returnd&&(z=0,F=0,w=0,x=0),uh&&!Lc(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=rj?x:w,void(zh?(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=26,w=0,x=0,y=10,z=0,A={},B={},C={},D=[0],E={},F=0,G=Ij.selectAll("."+g.legendItemFocused).size();b=b||{},n=Ke(b,"withTransition",!0),q=Ke(b,"withTransitionForTransform",!0),rj?(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=Ij.selectAll("."+g.legendItem).data(a).enter().append("g").attr("class",function(a){returnYc(g.legendItem,a)}).style("visibility",function(a){returnLc(a)?"visible":"hidden"}).style("cursor","pointer").on("click",function(a){"function"==typeofwh?wh(a):Rf.toggle(a)}).on("mouseover",function(a){Qf.select(this).classed(g.legendItemFocused,!0),ej||Rf.focus(a),"function"==typeofxh&&xh(a)}).on("mouseout",function(a){Qf.select(this).classed(g.legendItemFocused,!1),ej||Rf.revert(),"function"==typeofyh&&yh(a)}),m.append("text").text(function(a){returnd(Vg[a])?Vg[a]:a}).each(function(a,b){e(this,a,0===b)}).style("pointer-events","none").attr("x",rj?h:-200).attr("y",rj?-200:k),m.append("rect").attr("class",g.legendItemEvent).style("fill-opacity",0).attr("x",rj?i:-200).attr("y",rj?-200:l),m.append("rect").attr("class",g.legendItemTile).style("pointer-events","none").style("fill",gj).attr("x",rj?h:-200).attr("y",rj?-200:j).attr("width",10).attr("height",10),r=Ij.selectAll("text").data(a).text(function(a){returnd(Vg[a])?Vg[a]:a}).each(function(a,b){e(this,a,0===b)}),(n?r.transition():r).attr("x",h).attr("y",k),s=Ij.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=Ij.selectAll("rect."+g.legendItemTile).data(a),(n?t.transition():t).style("fill",gj).attr("x",f).attr("y",j),Ij.selectAll("."+g.legendItem).classed(g.legendItemHidden,function(a){return!Kc(a)}).transition().style("opacity",function(a){varb=Qf.select(this);returnKc(a)?!G||b.classed(g.legendItemFocused)?Ff(b):Gf(b):vj}),S(w),T(x),R(F),p(),W(),yf(),o(q,c)}functionMf(a){returnJc(Rf.data.targets,a.id)}functionNf(a){return"data"ina&&Jc(Rf.data.targets,a.data.id)}functionOf(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}}functionPf(a,b,c){vard=!me(Rf.data.targets);ej=!1,ge(a,b),Af(c||{withTransitionForAxis:d})}varQf=a.d3?a.d3:"undefined"!=typeofrequire?require("d3"):void0,Rf={data:{},axis:{},legend:{}},Sf={},Tf=i(["bindto"],"#chart"),Uf=i(["size","width"]),Vf=i(["size","height"]),Wf=i(["padding","left"]),Xf=i(["padding","right"]),Yf=i(["padding","top"]),Zf=i(["padding","bottom"]),$f=i(["zoom","enabled"],!1),_f=i(["zoom","extent"]),ag=i(["zoom","privileged"],!1),bg=i(["interaction","enabled"],!0),cg=i(["onenter"],function(){}),dg=i(["onleave"],function(){}),eg=i(["onresize"],function(){}),fg=i(["onresized"],function(){}),gg=i(["transition","duration"],350);h("data","data is required in config");varhg,ig,jg,kg,lg,mg,ng,og,pg,qg,rg,sg,tg,ug,vg,wg,xg,yg,zg,Ag,Bg,Cg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg,Lg,Mg,Ng,Og,Pg,Qg,Rg=i(["data","x"]),Sg=i(["data","xs"],{}),Tg=i(["data","x_format"]),Ug=i(["data","id_converter"],function(a){returna}),Vg=i(["data","names"],{}),Wg=i(["data","classes"],{}),Xg=i(["data","groups"],[]),Yg=i(["data","axes"],{}),Zg=i(["data","type"]),$g=i(["data","types"],{}),_g=i(["data","labels"],{}),ah=i(["data","order"]),bh=i(["data","regions"],{}),ch=i(["data","color"]),dh=i(["data","colors"],{}),eh=i(["data","hide"],!1),fh=i(["data","filter"]),gh=i(["data","selection","enabled"],!1),hh=i(["data","selection","grouped"],!1),ih=i(["data","selection","isselectable"],function(){return!0}),jh=i(["data","selection","multiple"],!0),kh=i(["data","onclick"],function(){}),lh=i(["data","onenter"],function(){}),mh=i(["data","onleave"],function(){}),nh=i(["data","onselected"],function(){}),oh=i(["data","onunselected"],function(){}),ph=i(["data","ondragstart"],function(){}),qh=i(["data","ondragend"],function(){}),rh=i(["subchart","show"],!1),sh=i(["subchart","size","height"],60),th=i(["color","pattern"],[]),uh=i(["legend","show"],!0),vh=i(["legend","position"],"bottom"),wh=i(["legend","item","onclick"]),xh=i(["legend","item","onmouseover"]),yh=i(["legend","item","onmouseout"]),zh=i(["legend","equally"],!1),Ah=i(["axis","rotated"],!1),Bh=i(["axis","x","show"],!0),Ch=i(["axis","x","type"],"indexed"),Dh=i(["axis","x","localtime"],!0),Eh=i(["axis","x","categories"],[]),Fh=i(["axis","x","tick","centered"],!1),Gh=i(["axis","x","tick","format"]),Hh=i(["axis","x","tick","culling"],{}),Ih=i(["axis","x","tick","culling","max"],10),Jh=i(["axis","x","tick","count"]),Kh=i(["axis","x","tick","fit"],!0),Lh=i(["axis","x","tick","values"],null),Mh=i(["axis","x","tick","rotate"]),Nh=i(["axis","x","max"],null),Oh=i(["axis","x","min"],null),Ph=i(["axis","x","padding"],{}),Qh=i(["axis","x","height"]),Rh=i(["axis","x","default"]),Sh=i(["axis","x","label"],{}),Th=i(["axis","y","show"],!0),Uh=i(["axis","y","max"]),Vh=i(["axis","y","min"]),Wh=i(["axis","y","center"]),Xh=i(["axis","y","label"],{}),Yh=i(["axis","y","inner"],!1),Zh=i(["axis","y","tick","format"]),$h=i(["axis","y","padding"]),_h=i(["axis","y","ticks"],10),ai=i(["axis","y2","show"],!1),bi=i(["axis","y2","max"]),ci=i(["axis","y2","min"]),di=i(["axis","y2","center"]),ei=i(["axis","y2","label"],{}),fi=i(["axis","y2","inner"],!1),gi=i(["axis","y2","tick","format"]),hi=i(["axis","y2","padding"]),ii=i(["axis","y2","ticks"],10),ji=i(["grid","x","show"],!1),ki=i(["grid","x","type"],"tick"),li=i(["grid","x","lines"],[]),mi=i(["grid","y","show"],!1),ni=i(["grid","y","lines"],[]),oi=i(["grid","y","ticks"],10),pi=i(["point","show"],!0),qi=i(["point","r"],2.5),ri=i(["point","focus","line","enabled"],!0),si=i(["point","focus","expand","enabled"],!0),ti=i(["point","focus","expand","r"]),ui=i(["point","focus","select","r"]),vi=i(["line","connect_null"],!1),wi=i(["bar","width"]),xi=i(["bar","width","ratio"],.6),yi=i(["pie","label","show"],!0),zi=i(["pie","label","format"]),Ai=i(["pie","expand"],!0),Bi=i(["pie","onclick"],function(){}),Ci=i(["pie","onmouseover"],function(){}),Di=i(["pie","onmouseout"],function(){}),Ei=i(["donut","label","show"],!0),Fi=i(["donut","label","format"]),Gi=i(["donut","expand"],!0),Hi=i(["donut","title"],""),Ii=i(["donut","onclick"],function(){}),Ji=i(["donut","onmouseover"],function(){}),Ki=i(["donut","onmouseout"],function(){}),Li=i(["regions"],[]),Mi=i(["tooltip","show"],!0),Ni=i(["tooltip","format","title"]),Oi=i(["tooltip","format","value"]),Pi=i(["tooltip","contents"],function(a,b,c,d){vare,f,h,i,j,k=Ni?Ni:b,l=Oi?Oi:c;for(f=0;f<a.length;f++)a[f]&&(a[f].value||0===a[f].value)&&(e||(h=k?k(a[f].x):a[f].x,e="<table class='"+g.tooltip+"'>"+(h||0===h?"<tr><th colspan='2'>"+h+"</th></tr>":"")),j=a[f].name,i=l(a[f].value,a[f].ratio,a[f].id,a[f].index),e+="<tr class='"+g.tooltipName+"-"+a[f].id+"'>",e+="<td class='name'><span style='background-color:"+d(a[f].id)+"'></span>"+j+"</td>",e+="<td class='value'>"+i+"</td>",e+="</tr>");
returne+"</table>"}),Qi=i(["tooltip","init","show"],!1),Ri=i(["tooltip","init","x"],0),Si=i(["tooltip","init","position"],{top:"0px",left:"50px"}),Ti="c3-"++newDate+"-clip",Ui=Ti+"-xaxis",Vi=Ti+"-yaxis",Wi=j(Ti),Xi=j(Ui),Yi=j(Vi),Zi="timeseries"===Ch,$i="categorized"===Ch,_i=!Zi&&(Rg||Ge(Sg)),aj=null,bj=!1,cj=!1,dj=!1,ej=!1,fj=Qf.scale.category10().range(),gj=Ae(dh,Ge(th)?th:fj,ch),hj=Dh?Qf.time.format:Qf.time.format.utc,ij=hj.multi([[".%L",function(a){returna.getMilliseconds()}],[":%S",function(a){returna.getSeconds()}],["%I:%M",function(a){returna.getMinutes()}],["%I %p",function(a){returna.getHours()}],["%-m/%-d",function(a){returna.getDay()&&1!==a.getDate()}],["%-m/%-d",function(a){return1!==a.getDate()}],["%-m/%-d",function(a){returna.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),jj=[],kj=[],lj={},mj=Ah?"left":"bottom",nj=Ah?Yh?"top":"bottom":Yh?"right":"left",oj=Ah?fi?"bottom":"top":fi?"left":"right",pj=Ah?"left":"bottom",qj={main:function(){return"translate("+k(hg.left)+","+k(hg.top)+")"},context:function(){return"translate("+k(ig.left)+","+k(ig.top)+")"},legend:function(){return"translate("+jg.left+","+jg.top+")"},x:function(){return"translate(0,"+(Ah?0:mg)+")"},y:function(){return"translate(0,"+(Ah?mg:0)+")"},y2:function(){return"translate("+(Ah?0:kg)+","+(Ah?1:0)+")"},subx:function(){return"translate(0,"+(Ah?0:ng)+")"},arc:function(){return"translate("+tg/2+","+ug/2+")"}},rj="right"===vh,sj=0,tj=0,uj=0,vj=.15,wj=30,xj=Ah&&!Bh?0:30,yj=5;yg=Qf.layout.pie().value(function(a){returna.values.reduce(function(a,b){returna+b.value},0)});varzj,Aj=df(!1),Bj=df(!0),Cj=function(){vara;returna=Ah?Qf.svg.area().x0(function(a){return_(a.id)(0)}).x1(function(a){return_(a.id)(a.value)}).y(Jd):Qf.svg.area().x(Jd).y0(function(a){return_(a.id)(0)}).y1(function(a){return_(a.id)(a.value)}),function(b){varc,d,e=Ve(b.values);returnhe([b],"area")||he([b],"area-spline")?(a.interpolate(oe(b)?"cardinal":"linear"),a(e)):(c=e[0]?Hg(e[0].x):0,d=e[0]?_(b.id)(e[0].value):0,Ah?"M "+d+" "+c:"M "+c+" "+d)}}(),Dj=function(){};zj=Qf.svg.brush().on("brush",vf),zj.update=function(){returnHj&&Hj.select("."+g.brush).call(this),this},zj.scale=function(a){returnAh?this.y(a):this.x(a)},$f&&(Dj=Qf.behavior.zoom().on("zoomstart",function(){Dj.altDomain=Qf.event.sourceEvent.altKey?Hg.orgDomain():null}).on("zoom",$f?wf:null),Dj.scale=function(a){returnAh?this.y(a):this.x(a)},Dj.orgScaleExtent=function(){vara=_f?_f:[1,10];return[a[0],Math.max(Ec()/a[1],a[1])]},Dj.updateScaleExtent=function(){vara=fc(Hg.orgDomain())/fc(Lj),b=this.orgScaleExtent();returnthis.scaleExtent([b[0]*a,b[1]*a]),this});varEj,Fj,Gj,Hj,Ij,Jj,Kj,Lj,Mj,Nj={};if(Rf.focus=function(a){functionb(a){Mc(a).transition().duration(100).style("opacity",1)}varc=Ej.selectAll(td(a)),d=c.filter(Mf),e=c.filter(Nf);Rf.revert(),Rf.defocus(),b(d.classed(g.focused,!0)),b(e),me(Rf.data.targets)&&Sb(a,!0),Hf(a,!0)},Rf.defocus=function(a){functionb(a){Mc(a).transition().duration(100).style("opacity",.3)}varc=Ej.selectAll(td(a)),d=c.filter(Mf),e=c.filter(Nf);Rf.revert(),b(d.classed(g.focused,!1)),b(e),me(Rf.data.targets)&&Tb(a),Hf(a,!1)},Rf.revert=function(a){functionb(a){Mc(a).transition().duration(100).style("opacity",1)}varc=Ej.selectAll(td(a)),d=c.filter(Mf),e=c.filter(Nf);b(d.classed(g.focused,!1)),b(e),me(Rf.data.targets)&&Tb(a),If()},Rf.show=function(a,b){a=Ic(a),b=b||{},Qc(a),Ej.selectAll(ud(a)).transition().style("opacity",1),b.withLegend&&Jf(a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},Rf.hide=function(a,b){a=Ic(a),b=b||{},Pc(a),Ej.selectAll(ud(a)).transition().style("opacity",0),b.withLegend&&Kf(a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},Rf.toggle=function(a){Kc(a)?Rf.hide(a):Rf.show(a)},Rf.unzoom=function(){zj.clear().update(),uf({withUpdateXDomain:!0})},Rf.load=function(a){returna.xs&&sc(a.xs),"classes"ina&&Object.keys(a.classes).forEach(function(b){Wg[b]=a.classes[b]}),"categories"ina&&$i&&(Eh=a.categories,Ng.categories(Eh)),"cacheIds"ina&&gc(a.cacheIds)?voidCf(ic(a.cacheIds),a.done):void("unload"ina?Ef(Ic("boolean"==typeofa.unload&&a.unload?null:a.unload),function(){Df(a)}):Df(a))},Rf.unload=function(a,b){Ef(Ic(a),function(){uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),"function"==typeofb&&b()})},Rf.selected=function(a){returnQf.merge(Gj.selectAll("."+g.shapes+sd(a)).selectAll("."+g.shape).filter(function(){returnQf.select(this).classed(g.SELECTED)}).map(function(a){returna.map(function(a){varb=a.__data__;returnb.data?b.data:b})}))},Rf.select=function(a,b,c){gh&&Gj.selectAll("."+g.shapes).selectAll("."+g.shape).each(function(e,f){varh=Qf.select(this),i=e.data?e.data.id:e.id,j=Ue(this),k=hh||!a||a.indexOf(i)>=0,l=!b||b.indexOf(f)>=0,m=h.classed(g.SELECTED);h.classed(g.line)||h.classed(g.area)||(k&&l?ih(e)&&!m&&j(!0,h.classed(g.SELECTED,!0),e,f):d(c)&&c&&m&&j(!1,h.classed(g.SELECTED,!1),e,f))})},Rf.unselect=function(a,b){gh&&Gj.selectAll("."+g.shapes).selectAll("."+g.shape).each(function(c,d){vare=Qf.select(this),f=c.data?c.data.id:c.id,h=Ue(this),i=hh||!a||a.indexOf(f)>=0,j=!b||b.indexOf(d)>=0,k=e.classed(g.SELECTED);e.classed(g.line)||e.classed(g.area)||i&&j&&ih(c)&&k&&h(!1,e.classed(g.SELECTED,!1),c,d)})},Rf.toLine=function(a){Pf(a,"line")},Rf.toSpline=function(a){Pf(a,"spline")},Rf.toBar=function(a){Pf(a,"bar")},Rf.toScatter=function(a){Pf(a,"scatter")},Rf.toArea=function(a){Pf(a,"area")},Rf.toAreaSpline=function(a){Pf(a,"area-spline")},Rf.toPie=function(a){Pf(a,"pie",{withTransform:!0})},Rf.toDonut=function(a){Pf(a,"donut",{withTransform:!0})},Rf.groups=function(a){returnc(a)?Xg:(Xg=a,uf(),Xg)},Rf.xgrids=function(a){returna?(li=a,uf(),li):li},Rf.xgrids.add=function(a){returna?Rf.xgrids(li.concat(a)):void0},Rf.xgrids.remove=function(a){varb=Of(a);returnRf.xgrids(li.filter(b))},Rf.ygrids=function(a){returna?(ni=a,uf(),ni):ni},Rf.ygrids.add=function(a){returna?Rf.ygrids(ni.concat(a)):void0},Rf.ygrids.remove=function(a){varb=Of(a);returnRf.ygrids(ni.filter(b))},Rf.regions=function(a){returna?(Li=a,uf(),Li):Li},Rf.regions.add=function(a){returna?(Li=Li.concat(a),uf(),Li):Li},Rf.regions.remove=function(a){varb,c,d;returna=a||{},b=Ke(a,"duration",gg),c=Ke(a,"classes",[g.region]),d=Gj.select("."+g.regions).selectAll(c.map(function(a){return"."+a})),(b?d.transition().duration(b):d).style("opacity",0).remove(),Li=Li.filter(function(a){varb=!1;returna.class?(a.class.split(" ").forEach(function(a){c.indexOf(a)>=0&&(b=!0)}),!b):!0})},Rf.data.get=function(a){varb=Rf.data.getAsTarget(a);returnd(b)?b.values.map(function(a){returna.value}):void0},Rf.data.getAsTarget=function(a){varb=Rf.data.targets.filter(function(b){returnb.id===a});returnb.length>0?b[0]:void0},Rf.data.names=function(a){returnarguments.length?(Object.keys(a).forEach(function(b){Vg[b]=a[b]}),uf({withLegend:!0}),Vg):Vg},Rf.data.colors=function(a){returnarguments.length?(Object.keys(a).forEach(function(b){dh[b]=a[b]}),uf({withLegend:!0}),dh):dh},Rf.x=function(a){returnarguments.length&&(vc(Rf.data.targets,a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),Rf.data.xs},Rf.xs=function(a){returnarguments.length&&(wc(Rf.data.targets,a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),Rf.data.xs},Rf.axis.labels=function(a){arguments.length&&(Object.keys(a).forEach(function(b){hb(b,a[b])}),Jb())},Rf.axis.max=function(a){arguments.length&&("object"==typeofa?(b(a.x)&&(Nh=+a.x),b(a.y)&&(Uh=+a.y),b(a.y2)&&(bi=+a.y2)):Uh=bi=+a,uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))},Rf.axis.min=function(a){arguments.length&&("object"==typeofa?(b(a.x)&&(Oh=+a.x),b(a.y)&&(Vh=+a.y),b(a.y2)&&(ci=+a.y2)):Vh=ci=+a,uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))},Rf.axis.range=function(a){arguments.length&&("undefined"!=typeofa.max&&Rf.axis.max(a.max),"undefined"!=typeofa.min&&Rf.axis.min(a.min))},Rf.legend.show=function(a){Jf(Ic(a)),uf({withLegend:!0})},Rf.legend.hide=function(a){Kf(Ic(a)),uf({withLegend:!0})},Rf.resize=function(a){Uf=a?a.width:null,Vf=a?a.height:null,Rf.flush()},Rf.flush=function(){Af({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},Rf.destroy=function(){Rf.data.targets=void0,Rf.data.xs={},Kj.classed("c3",!1).html(""),a.onresize=null},"url"inf.data)Qf.xhr(f.data.url,function(a,b){varc,d=Qf.csv.parseRows(b.response);1===d.length?(c=[{}],d[0].forEach(function(a){c[0][a]=null})):c=Qf.csv.parse(b.response),mf(c)});elseif("rows"inf.data)mf(yc(f.data.rows));else{if(!("columns"inf.data))throwError("url or rows or columns is required.");mf(zc(f.data.columns))}returnRf},"function"==typeofdefine&&define.amd?define("c3",["d3"],f):"undefined"!=typeofexports&&"undefined"!=typeofmodule?module.exports=f:a.c3=f}(window);
\ No newline at end of file
returne+"</table>"}),Qi=i(["tooltip","init","show"],!1),Ri=i(["tooltip","init","x"],0),Si=i(["tooltip","init","position"],{top:"0px",left:"50px"}),Ti="c3-"++newDate+"-clip",Ui=Ti+"-xaxis",Vi=Ti+"-yaxis",Wi=j(Ti),Xi=j(Ui),Yi=j(Vi),Zi="timeseries"===Ch,$i="categorized"===Ch,_i=!Zi&&(Rg||Ge(Sg)),aj=null,bj=!1,cj=!1,dj=!1,ej=!1,fj=Qf.scale.category10().range(),gj=Ae(dh,Ge(th)?th:fj,ch),hj=Dh?Qf.time.format:Qf.time.format.utc,ij=hj.multi([[".%L",function(a){returna.getMilliseconds()}],[":%S",function(a){returna.getSeconds()}],["%I:%M",function(a){returna.getMinutes()}],["%I %p",function(a){returna.getHours()}],["%-m/%-d",function(a){returna.getDay()&&1!==a.getDate()}],["%-m/%-d",function(a){return1!==a.getDate()}],["%-m/%-d",function(a){returna.getMonth()}],["%Y/%-m/%-d",function(){return!0}]]),jj=[],kj=[],lj={},mj=Ah?"left":"bottom",nj=Ah?Yh?"top":"bottom":Yh?"right":"left",oj=Ah?fi?"bottom":"top":fi?"left":"right",pj=Ah?"left":"bottom",qj={main:function(){return"translate("+k(hg.left)+","+k(hg.top)+")"},context:function(){return"translate("+k(ig.left)+","+k(ig.top)+")"},legend:function(){return"translate("+jg.left+","+jg.top+")"},x:function(){return"translate(0,"+(Ah?0:mg)+")"},y:function(){return"translate(0,"+(Ah?mg:0)+")"},y2:function(){return"translate("+(Ah?0:kg)+","+(Ah?1:0)+")"},subx:function(){return"translate(0,"+(Ah?0:ng)+")"},arc:function(){return"translate("+tg/2+","+ug/2+")"}},rj="right"===vh,sj=0,tj=0,uj=0,vj=.15,wj=30,xj=Ah&&!Bh?0:30,yj=5;yg=Qf.layout.pie().value(function(a){returna.values.reduce(function(a,b){returna+b.value},0)});varzj,Aj=df(!1),Bj=df(!0),Cj=function(){vara;returna=Ah?Qf.svg.area().x0(function(a){return_(a.id)(0)}).x1(function(a){return_(a.id)(a.value)}).y(Jd):Qf.svg.area().x(Jd).y0(function(a){return_(a.id)(0)}).y1(function(a){return_(a.id)(a.value)}),function(b){varc,d,e=Ve(b.values);returnhe([b],"area")||he([b],"area-spline")?(a.interpolate(oe(b)?"cardinal":"linear"),a(e)):(c=e[0]?Hg(e[0].x):0,d=e[0]?_(b.id)(e[0].value):0,Ah?"M "+d+" "+c:"M "+c+" "+d)}}(),Dj=function(){};zj=Qf.svg.brush().on("brush",vf),zj.update=function(){returnHj&&Hj.select("."+g.brush).call(this),this},zj.scale=function(a){returnAh?this.y(a):this.x(a)},$f&&(Dj=Qf.behavior.zoom().on("zoomstart",function(){Dj.altDomain=Qf.event.sourceEvent.altKey?Hg.orgDomain():null}).on("zoom",$f?wf:null),Dj.scale=function(a){returnAh?this.y(a):this.x(a)},Dj.orgScaleExtent=function(){vara=_f?_f:[1,10];return[a[0],Math.max(Ec()/a[1],a[1])]},Dj.updateScaleExtent=function(){vara=fc(Hg.orgDomain())/fc(Lj),b=this.orgScaleExtent();returnthis.scaleExtent([b[0]*a,b[1]*a]),this});varEj,Fj,Gj,Hj,Ij,Jj,Kj,Lj,Mj,Nj={};if(Rf.focus=function(a){functionb(a){Mc(a).transition().duration(100).style("opacity",1)}varc=Ej.selectAll(td(a)),d=c.filter(Mf),e=c.filter(Nf);Rf.revert(),Rf.defocus(),b(d.classed(g.focused,!0)),b(e),me(Rf.data.targets)&&Sb(a,!0),Hf(a,!0)},Rf.defocus=function(a){functionb(a){Mc(a).transition().duration(100).style("opacity",.3)}varc=Ej.selectAll(td(a)),d=c.filter(Mf),e=c.filter(Nf);Rf.revert(),b(d.classed(g.focused,!1)),b(e),me(Rf.data.targets)&&Tb(a),Hf(a,!1)},Rf.revert=function(a){functionb(a){Mc(a).transition().duration(100).style("opacity",1)}varc=Ej.selectAll(td(a)),d=c.filter(Mf),e=c.filter(Nf);b(d.classed(g.focused,!1)),b(e),me(Rf.data.targets)&&Tb(a),If()},Rf.show=function(a,b){a=Ic(a),b=b||{},Qc(a),Ej.selectAll(ud(a)).transition().style("opacity",1),b.withLegend&&Jf(a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},Rf.hide=function(a,b){a=Ic(a),b=b||{},Pc(a),Ej.selectAll(ud(a)).transition().style("opacity",0),b.withLegend&&Kf(a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},Rf.toggle=function(a){Kc(a)?Rf.hide(a):Rf.show(a)},Rf.unzoom=function(){zj.clear().update(),uf({withUpdateXDomain:!0})},Rf.load=function(a){returna.xs&&sc(a.xs),"classes"ina&&Object.keys(a.classes).forEach(function(b){Wg[b]=a.classes[b]}),"categories"ina&&$i&&(Eh=a.categories,Ng.categories(Eh)),"cacheIds"ina&&gc(a.cacheIds)?voidCf(ic(a.cacheIds),a.done):void("unload"ina?Ef(Ic("boolean"==typeofa.unload&&a.unload?null:a.unload),function(){Df(a)}):Df(a))},Rf.unload=function(a,b){Ef(Ic(a),function(){uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),"function"==typeofb&&b()})},Rf.selected=function(a){returnQf.merge(Gj.selectAll("."+g.shapes+sd(a)).selectAll("."+g.shape).filter(function(){returnQf.select(this).classed(g.SELECTED)}).map(function(a){returna.map(function(a){varb=a.__data__;returnb.data?b.data:b})}))},Rf.select=function(a,b,c){gh&&Gj.selectAll("."+g.shapes).selectAll("."+g.shape).each(function(e,f){varh=Qf.select(this),i=e.data?e.data.id:e.id,j=Ue(this),k=hh||!a||a.indexOf(i)>=0,l=!b||b.indexOf(f)>=0,m=h.classed(g.SELECTED);h.classed(g.line)||h.classed(g.area)||(k&&l?ih(e)&&!m&&j(!0,h.classed(g.SELECTED,!0),e,f):d(c)&&c&&m&&j(!1,h.classed(g.SELECTED,!1),e,f))})},Rf.unselect=function(a,b){gh&&Gj.selectAll("."+g.shapes).selectAll("."+g.shape).each(function(c,d){vare=Qf.select(this),f=c.data?c.data.id:c.id,h=Ue(this),i=hh||!a||a.indexOf(f)>=0,j=!b||b.indexOf(d)>=0,k=e.classed(g.SELECTED);e.classed(g.line)||e.classed(g.area)||i&&j&&ih(c)&&k&&h(!1,e.classed(g.SELECTED,!1),c,d)})},Rf.toLine=function(a){Pf(a,"line")},Rf.toSpline=function(a){Pf(a,"spline")},Rf.toBar=function(a){Pf(a,"bar")},Rf.toScatter=function(a){Pf(a,"scatter")},Rf.toArea=function(a){Pf(a,"area")},Rf.toAreaSpline=function(a){Pf(a,"area-spline")},Rf.toPie=function(a){Pf(a,"pie",{withTransform:!0})},Rf.toDonut=function(a){Pf(a,"donut",{withTransform:!0})},Rf.groups=function(a){returnc(a)?Xg:(Xg=a,uf(),Xg)},Rf.xgrids=function(a){returna?(li=a,uf(),li):li},Rf.xgrids.add=function(a){returna?Rf.xgrids(li.concat(a)):void0},Rf.xgrids.remove=function(a){varb=Of(a);returnRf.xgrids(li.filter(b))},Rf.ygrids=function(a){returna?(ni=a,uf(),ni):ni},Rf.ygrids.add=function(a){returna?Rf.ygrids(ni.concat(a)):void0},Rf.ygrids.remove=function(a){varb=Of(a);returnRf.ygrids(ni.filter(b))},Rf.regions=function(a){returna?(Li=a,uf(),Li):Li},Rf.regions.add=function(a){returna?(Li=Li.concat(a),uf(),Li):Li},Rf.regions.remove=function(a){varb,c,d;returna=a||{},b=Ke(a,"duration",gg),c=Ke(a,"classes",[g.region]),d=Gj.select("."+g.regions).selectAll(c.map(function(a){return"."+a})),(b?d.transition().duration(b):d).style("opacity",0).remove(),Li=Li.filter(function(a){varb=!1;returna.class?(a.class.split(" ").forEach(function(a){c.indexOf(a)>=0&&(b=!0)}),!b):!0})},Rf.data.get=function(a){varb=Rf.data.getAsTarget(a);returnd(b)?b.values.map(function(a){returna.value}):void0},Rf.data.getAsTarget=function(a){varb=Rf.data.targets.filter(function(b){returnb.id===a});returnb.length>0?b[0]:void0},Rf.data.names=function(a){returnarguments.length?(Object.keys(a).forEach(function(b){Vg[b]=a[b]}),uf({withLegend:!0}),Vg):Vg},Rf.data.colors=function(a){returnarguments.length?(Object.keys(a).forEach(function(b){dh[b]=a[b]}),uf({withLegend:!0}),dh):dh},Rf.x=function(a){returnarguments.length&&(vc(Rf.data.targets,a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),Rf.data.xs},Rf.xs=function(a){returnarguments.length&&(wc(Rf.data.targets,a),uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),Rf.data.xs},Rf.axis.labels=function(a){arguments.length&&(Object.keys(a).forEach(function(b){hb(b,a[b])}),Jb())},Rf.axis.max=function(a){arguments.length&&("object"==typeofa?(b(a.x)&&(Nh=+a.x),b(a.y)&&(Uh=+a.y),b(a.y2)&&(bi=+a.y2)):Uh=bi=+a,uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))},Rf.axis.min=function(a){arguments.length&&("object"==typeofa?(b(a.x)&&(Oh=+a.x),b(a.y)&&(Vh=+a.y),b(a.y2)&&(ci=+a.y2)):Vh=ci=+a,uf({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))},Rf.axis.range=function(a){arguments.length&&("undefined"!=typeofa.max&&Rf.axis.max(a.max),"undefined"!=typeofa.min&&Rf.axis.min(a.min))},Rf.legend.show=function(a){Jf(Ic(a)),uf({withLegend:!0})},Rf.legend.hide=function(a){Kf(Ic(a)),uf({withLegend:!0})},Rf.resize=function(a){Uf=a?a.width:null,Vf=a?a.height:null,Rf.flush(),Rf.flush()},Rf.flush=function(){Af({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},Rf.destroy=function(){Rf.data.targets=void0,Rf.data.xs={},Kj.classed("c3",!1).html(""),a.onresize=null},"url"inf.data)Qf.xhr(f.data.url,function(a,b){varc,d=Qf.csv.parseRows(b.response);1===d.length?(c=[{}],d[0].forEach(function(a){c[0][a]=null})):c=Qf.csv.parse(b.response),mf(c)});elseif("rows"inf.data)mf(yc(f.data.rows));else{if(!("columns"inf.data))throwError("url or rows or columns is required.");mf(zc(f.data.columns))}returnRf},"function"==typeofdefine&&define.amd?define("c3",["d3"],f):"undefined"!=typeofexports&&"undefined"!=typeofmodule?module.exports=f:a.c3=f}(window);