}:function(a){returne(a.value)},i=Vi?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)||!De(a[g].x,u))t+=" "+q(a[g])+" "+r(a[g]);elsefor(j=X(a[g-1].x,a[g].x,Vi),k=X(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}functionhf(b){varc,d,e;if(Gj=Mf.select(Pf),Gj.empty())thrownewError('Bind element not found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');if(Gj.html("").classed("c3",!0),Nf.data.xs={},Nf.data.targets=zc(b),bh&&(Nf.data.targets=Nf.data.targets.filter(bh)),ah&&Oc(ah===!0?Gc(Nf.data.targets):ah),p(),V(),Dg.domain(Mf.extent(dc(Nf.data.targets))),Eg.domain(_b(Nf.data.targets,"y")),Fg.domain(_b(Nf.data.targets,"y2")),Gg.domain(Dg.domain()),Hg.domain(Eg.domain()),Ig.domain(Fg.domain()),Hj=Dg.domain(),vj.scale(Gg),Wf&&zj.scale(Dg),Aj=Gj.append("svg").on("mouseenter",$f).on("mouseleave",_f),Bj=Aj.append("defs"),Bj.append("clipPath").attr("id",Pi).append("rect"),Bj.append("clipPath").attr("id",Qi).append("rect"),Bj.append("clipPath").attr("id",Ri).append("rect"),uf(),Cj=Aj.append("g").attr("transform",mj.main),Dj=Aj.append("g").attr("transform",mj.context),Ej=Aj.append("g").attr("transform",mj.legend),nh||Dj.style("visibility","hidden"),qh||(Ej.style("visibility","hidden"),gj=Gc(Nf.data.targets)),Fj=Mf.select(Pf).style("position","relative").append("div").style("position","absolute").style("pointer-events","none").style("z-index","10").style("display","none"),Hf(Gc(Nf.data.targets),{withTransform:!1,withTransitionForTransform:!1}),d=Cj.append("g").attr("clip-path",Si).attr("class",g.grid),fi&&d.append("g").attr("class",g.xgrids),Fe(hi)&&d.append("g").attr("class",g.xgridLines),ni&&d.append("g").attr("class",g.xgridFocus).append("line").attr("class",g.xgridFocus),ii&&d.append("g").attr("class",g.ygrids),Fe(ji)&&d.append("g").attr("class",g.ygridLines),Cj.append("g").attr("clip-path",Si).attr("class",g.regions),Cj.append("g").attr("clip-path",Si).attr("class",g.chart),c=Cj.select("."+g.chart).append("g").attr("class",g.eventRects).style("fill-opacity",0).style("cursor",Wf?wh?"ns-resize":"ew-resize":null),Cj.select("."+g.chart).append("g").attr("class",g.chartBars),Cj.select("."+g.chart).append("g").attr("class",g.chartLines),Cj.select("."+g.chart).append("g").attr("class",g.chartArcs).attr("transform",mj.arc).append("text").attr("class",g.chartArcsTitle).style("text-anchor","middle").text(Vb()),Cj.select("."+g.chart).append("g").attr("class",g.chartTexts),Wf&&Cj.insert("rect",Yf?null:"g."+g.grid).attr("class",g.zoomRect).attr("width",gg).attr("height",ig).style("opacity",0).style("cursor",wh?"ns-resize":"ew-resize").call(zj).on("dblclick.zoom",null),Nh&&vj.extent("function"!=typeofNh?Nh:Nh(dc())),hj.x=Cj.append("g").attr("class",g.axisX).attr("clip-path",Ti).attr("transform",mj.x).style("visibility",xh?"visible":"hidden"),hj.x.append("text").attr("class",g.axisXLabel).attr("transform",wh?"rotate(-90)":"").style("text-anchor",Eb),hj.y=Cj.append("g").attr("class",g.axisY).attr("clip-path",Ui).attr("transform",mj.y).style("visibility",Ph?"visible":"hidden"),hj.y.append("text").attr("class",g.axisYLabel).attr("transform",wh?"":"rotate(-90)").style("text-anchor",Fb),hj.y2=Cj.append("g").attr("class",g.axisY2).attr("transform",mj.y2).style("visibility",Yh?"visible":"hidden"),hj.y2.append("text").attr("class",g.axisY2Label).attr("transform",wh?"":"rotate(-90)").style("text-anchor",Gb),Dj.append("g").attr("clip-path",Si).attr("class",g.chart),Dj.select("."+g.chart).append("g").attr("class",g.chartBars),Dj.select("."+g.chart).append("g").attr("class",g.chartLines),Dj.append("g").attr("clip-path",Si).attr("class",g.brush).call(vj).selectAll("rect").attr(wh?"width":"height",wh?hg:jg),hj.subx=Dj.append("g").attr("class",g.axisX).attr("t