s?-1:1),g=ao.sum(c),v=g?(s-l*p)/g:0,d=ao.range(l),y=[];return null!=e&&d.sort(e===bl?function(n,t){return c[t]-c[n]}:function(n,t){return e(o[n],o[t])}),d.forEach(function(n){y[n]={data:o[n],value:a=c[n],startAngle:f,endAngle:f+=a*v+p,padAngle:h}}),y}var t=Number,e=bl,r=0,i=Ho,u=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(u=t,n):u},n};var bl={};ao.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),f=c.map(function(t){return t.map(function(t,e){return[u.call(n,t,e),o.call(n,t,e)]})}),s=e.call(n,f,l);c=ao.permute(c,s),f=ao.permute(f,s);var h,p,g,v,d=r.call(n,f,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],v=d[g],f[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],v+=f[p-1][g][1],f[p][g][1]);return a}var t=m,e=gi,r=vi,i=pi,u=si,o=hi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e=\"function\"==typeof t?t:_l.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r=\"function\"==typeof t?t:wl.get(t)||vi,n):r},n.x=function(t){return arguments.length?(u=t,n):u},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(i=t,n):i},n};var _l=ao.map({\"inside-out\":function(n){var t,e,r=n.length,i=n.map(di),u=n.map(yi),o=ao.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],f=[];for(t=0;r>t;++t)e=o[t],l>a?(a+=u[e],c.push(e)):(l+=u[e],f.push(e));return f.reverse().concat(c)},reverse:function(n){return ao.range(n.length).reverse()},\"default\":gi}),wl=ao.map({silhouette:function(n){var t,e,r,i=n.length,u=n[0].length,o=[],a=0,l=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;u>e;++e)l[e]=(a-o[e])/2;return l},wiggle:function(n){var t,e,r,i,u,o,a,l,c,f=n.length,s=n[0],h=s.length,p=[];for(p[0]=l=c=0,e=1;h>e;++e){for(t=0,i=0;f>t;++t)i+=n[t][e][1];for(t=0,u=0,a=s[e][0]-s[e-1][0];f>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;u+=o*n[t][e][1]}p[e]=l-=i?u/i*a:0,c>l&&(c=l)}for(e=0;h>e;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,u=n[0].length,o=1/i,a=[];for(e=0;u>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=o}for(e=0;u>e;++e)a[e]=0;return a},zero:vi});ao.layout.histogram=function(){function n(n,u){for(var o,a,l=[],c=n.map(e,this),f=r.call(this,c,u),s=i.call(this,f,c,u),u=-1,h=c.length,p=s.length-1,g=t?1:1/h;++u0)for(u=-1;++u=f[0]&&a<=f[1]&&(o=l[ao.bisect(s,a,1,p)-1],o.y+=g,o.push(n[u]));return l}var t=!0,e=Number,r=bi,i=Mi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=En(t),n):r},n.bins=function(t){return arguments.length?(i=\"number\"==typeof t?function(n){return xi(n,t)}:En(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ao.layout.pack=function(){function n(n,u){var o=e.call(this,n,u),a=o[0],l=i[0],c=i[1],f=null==t?Math.sqrt:\"function\"==typeof t?t:function(){return t};if(a.x=a.y=0,oi(a,function(n){n.r=+f(n.value)}),oi(a,Ni),r){var s=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;oi(a,function(n){n.r+=s}),oi(a,Ni),oi(a,function(n){n.r-=s})}return Ci(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}var t,e=ao.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||\"function\"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},ii(n,e)},ao.layout.tree=function(){function n(n,i){var f=o.call(this,n,i),s=f[0],h=t(s);if(oi(h,e),h.parent.m=-h.z,ui(h,r),c)ui(s,u);else{var p=s,g=s,v=s;ui(s,function(n){n.xg.x&&(g=n),n.depth>v.depth&&(v=n)});var d=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+d),m=l[1]/(v.depth||1);ui(s,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return f}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;a>o;++o)r.push((u[o]=i={_:u[o],parent:t,children:(i=u[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var u=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-u):n.z=u}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,u=n,o=t,l=i.parent.children[0],c=i.m,f=u.m,s=o.m,h=l.m;o=Ti(o),i=qi(i),o&&i;)l=qi(l),u=Ti(u),u.a=n,r=o.z+s-i.z-c+a(o._,i._),r>0&&(Ri(Pi(o,n,e),n,r),c+=r,f+=r),s+=o.m,c+=i.m,h+=l.m,f+=u.m;o&&!Ti(u)&&(u.t=o,u.m+=s-f),i&&!qi(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function u(n){n.x*=l[0],n.y=n.depth*l[1]}var o=ao.layout.hierarchy().sort(null).value(null),a=Li,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?u:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:u,n):c?l:null},ii(n,o)},ao.layout.cluster=function(){function n(n,u){var o,a=t.call(this,n,u),l=a[0],c=0;oi(l,function(n){var t=n.children;t&&t.length?(n.x=ji(t),n.y=Ui(t)):(n.x=o?c+=e(n,o):0,n.y=0,o=n)});var f=Fi(l),s=Hi(l),h=f.x-e(f,s)/2,p=s.x+e(s,f)/2;return oi(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=ao.layout.hierarchy().sort(null).value(null),e=Li,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},ii(n,t)},ao.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,u=n.length;++it?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var u=e.children;if(u&&u.length){var o,a,l,c=s(e),f=[],h=u.slice(),g=1/0,v=\"slice\"===p?c.dx:\"dice\"===p?c.dy:\"slice-dice\"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),f.area=0;(l=h.length)>0;)f.push(o=h[l-1]),f.area+=o.area,\"squarify\"!==p||(a=r(f,v))<=g?(h.pop(),g=a):(f.area-=f.pop().area,i(f,v,c,!1),v=Math.min(c.dx,c.dy),f.length=f.area=0,g=1/0);f.length&&(i(f,v,c,!0),f.length=f.area=0),u.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var u,o=s(t),a=r.slice(),l=[];for(n(a,o.dx*o.dy/t.value),l.area=0;u=a.pop();)l.push(u),l.area+=u.area,null!=u.z&&(i(l,u.z?o.dx:o.dy,o,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oe&&(u=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*u*g)):1/0}function i(n,t,e,r){var i,u=-1,o=n.length,a=e.x,c=e.y,f=t?l(n.area/t):0;\nif(t==e.dx){for((r||f>e.dy)&&(f=e.dy);++ue.dx)&&(f=e.dx);++ue&&(t=1),1>e&&(n=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=ao.random.normal.apply(ao,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ao.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ao.scale={};var Sl={floor:m,ceil:m};ao.scale.linear=function(){return Wi([0,1],[0,1],Mr,!1)};var kl={s:1,g:1,p:1,r:1,e:1};ao.scale.log=function(){return ru(ao.scale.linear().domain([0,1]),10,!0,[1,10])};var Nl=ao.format(\".0e\"),El={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ao.scale.pow=function(){return iu(ao.scale.linear(),1,[0,1])},ao.scale.sqrt=function(){return ao.scale.pow().exponent(.5)},ao.scale.ordinal=function(){return ou([],{t:\"range\",a:[[]]})},ao.scale.category10=function(){return ao.scale.ordinal().range(Al)},ao.scale.category20=function(){return ao.scale.ordinal().range(Cl)},ao.scale.category20b=function(){return ao.scale.ordinal().range(zl)},ao.scale.category20c=function(){return ao.scale.ordinal().range(Ll)};var Al=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(xn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(xn),zl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(xn),Ll=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(xn);ao.scale.quantile=function(){return au([],[])},ao.scale.quantize=function(){return lu(0,1,[0,1])},ao.scale.threshold=function(){return cu([.5],[0,1])},ao.scale.identity=function(){return fu([0,1])},ao.svg={},ao.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=o.apply(this,arguments)-Io,s=a.apply(this,arguments)-Io,h=Math.abs(s-f),p=f>s?0:1;if(n>c&&(g=c,c=n,n=g),h>=Oo)return t(c,p)+(n?t(n,1-p):\"\")+\"Z\";var g,v,d,y,m,M,x,b,_,w,S,k,N=0,E=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=u===ql?Math.sqrt(n*n+c*c):+u.apply(this,arguments),p||(E*=-1),c&&(E=tn(d/c*Math.sin(y))),n&&(N=tn(d/n*Math.sin(y)))),c){m=c*Math.cos(f+E),M=c*Math.sin(f+E),x=c*Math.cos(s-E),b=c*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Fo?0:1;if(E&&yu(m,M,x,b)===p^C){var z=(f+s)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){_=n*Math.cos(s-N),w=n*Math.sin(s-N),S=n*Math.cos(f+N),k=n*Math.sin(f+N);var L=Math.abs(f-s+2*N)<=Fo?0:1;if(N&&yu(_,w,S,k)===1-p^L){var q=(f+s)/2;_=n*Math.cos(q),w=n*Math.sin(q),S=k=null}}else _=w=0;if(h>Uo&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){v=c>n^p?0:1;var T=g,R=g;if(Fo>h){var D=null==S?[_,w]:null==x?[m,M]:Re([m,M],[S,k],[x,b],[_,w]),P=m-D[0],U=M-D[1],j=x-D[0],F=b-D[1],H=1/Math.sin(Math.acos((P*j+U*F)/(Math.sqrt(P*P+U*U)*Math.sqrt(j*j+F*F)))/2),O=Math.sqrt(D[0]*D[0]+D[1]*D[1]);R=Math.min(g,(n-O)/(H-1)),T=Math.min(g,(c-O)/(H+1))}if(null!=x){var I=mu(null==S?[_,w]:[S,k],[m,M],c,T,p),Y=mu([x,b],[_,w],c,T,p);g===T?A.push(\"M\",I[0],\"A\",T,\",\",T,\" 0 0,\",v,\" \",I[1],\"A\",c,\",\",c,\" 0 \",1-p^yu(I[1][0],I[1][1],Y[1][0],Y[1][1]),\",\",p,\" \",Y[1],\"A\",T,\",\",T,\" 0 0,\",v,\" \",Y[0]):A.push(\"M\",I[0],\"A\",T,\",\",T,\" 0 1,\",v,\" \",Y[0])}else A.push(\"M\",m,\",\",M);if(null!=S){var Z=mu([m,M],[S,k],n,-R,p),V=mu([_,w],null==x?[m,M]:[x,b],n,-R,p);g===R?A.push(\"L\",V[0],\"A\",R,\",\",R,\" 0 0,\",v,\" \",V[1],\"A\",n,\",\",n,\" 0 \",p^yu(V[1][0],V[1][1],Z[1][0],Z[1][1]),\",\",1-p,\" \",Z[1],\"A\",R,\",\",R,\" 0 0,\",v,\" \",Z[0]):A.push(\"L\",V[0],\"A\",R,\",\",R,\" 0 0,\",v,\" \",Z[0])}else A.push(\"L\",_,\",\",w)}else A.push(\"M\",m,\",\",M),null!=x&&A.push(\"A\",c,\",\",c,\" 0 \",C,\",\",p,\" \",x,\",\",b),A.push(\"L\",_,\",\",w),null!=S&&A.push(\"A\",n,\",\",n,\" 0 \",L,\",\",1-p,\" \",S,\",\",k);return A.push(\"Z\"),A.join(\"\")}function t(n,t){return\"M0,\"+n+\"A\"+n+\",\"+n+\" 0 1,\"+t+\" 0,\"+-n+\"A\"+n+\",\"+n+\" 0 1,\"+t+\" 0,\"+n}var e=hu,r=pu,i=su,u=ql,o=gu,a=vu,l=du;return n.innerRadius=function(t){return arguments.length?(e=En(t),n):e},n.outerRadius=function(t){return arguments.length?(r=En(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=En(t),n):i},n.padRadius=function(t){return arguments.length?(u=t==ql?ql:En(t),n):u},n.startAngle=function(t){return arguments.length?(o=En(t),n):o},n.endAngle=function(t){return arguments.length?(a=En(t),n):a},n.padAngle=function(t){return arguments.length?(l=En(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Io;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql=\"auto\";ao.svg.line=function(){return Mu(m)};var Tl=ao.map({linear:xu,\"linear-closed\":bu,step:_u,\"step-before\":wu,\"step-after\":Su,basis:zu,\"basis-open\":Lu,\"basis-closed\":qu,bundle:Tu,cardinal:Eu,\"cardinal-open\":ku,\"cardinal-closed\":Nu,monotone:Fu});Tl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Rl=[0,2/3,1/3,0],Dl=[0,1/3,2/3,0],Pl=[0,1/6,2/3,1/6];ao.svg.line.radial=function(){var n=Mu(Hu);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},wu.reverse=Su,Su.reverse=wu,ao.svg.area=function(){return Ou(m)},ao.svg.area.radial=function(){var n=Ou(Hu);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ao.svg.chord=function(){function n(n,a){var l=t(this,u,n,a),c=t(this,o,n,a);return\"M\"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+\"Z\"}function t(n,t,e,r){var i=t.call(n,e,r),u=a.call(n,i,r),o=l.call(n,i,r)-Io,f=c.call(n,i,r)-Io;return{r:u,a0:o,a1:f,p0:[u*Math.cos(o),u*Math.sin(o)],p1:[u*Math.cos(f),u*Math.sin(f)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return\"A\"+n+\",\"+n+\" 0 \"+ +(e>Fo)+\",1 \"+t}function i(n,t,e,r){return\"Q 0,0 \"+r}var u=Me,o=xe,a=Iu,l=gu,c=vu;return n.radius=function(t){return arguments.length?(a=En(t),n):a},n.source=function(t){return arguments.length?(u=En(t),n):u},n.target=function(t){return arguments.length?(o=En(t),n):o},n.startAngle=function(t){return arguments.length?(l=En(t),n):l},n.endAngle=function(t){return arguments.length?(c=En(t),n):c},n},ao.svg.diagonal=function(){function n(n,i){var u=t.call(this,n,i),o=e.call(this,n,i),a=(u.y+o.y)/2,l=[u,{x:u.x,y:a},{x:o.x,y:a},o];return l=l.map(r),\"M\"+l[0]+\"C\"+l[1]+\" \"+l[2]+\" \"+l[3]}var t=Me,e=xe,r=Yu;return n.source=function(e){return arguments.length?(t=En(e),n):t},n.target=function(t){return arguments.length?(e=En(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ao.svg.diagonal.radial=function(){var n=ao.svg.diagonal(),t=Yu,e=n.projection;return n.projection=function(n){return arguments.length?e(Zu(t=n)):t},n},ao.svg.symbol=function(){function n(n,r){return(Ul.get(t.call(this,n,r))||$u)(e.call(this,n,r))}var t=Xu,e=Vu;return n.type=function(e){return arguments.length?(t=En(e),n):t},n.size=function(t){return arguments.length?(e=En(t),n):e},n};var Ul=ao.map({circle:$u,cross:function(n){var t=Math.sqrt(n/5)/2;return\"M\"+-3*t+\",\"+-t+\"H\"+-t+\"V\"+-3*t+\"H\"+t+\"V\"+-t+\"H\"+3*t+\"V\"+t+\"H\"+t+\"V\"+3*t+\"H\"+-t+\"V\"+t+\"H\"+-3*t+\"Z\"},diamond:function(n){var t=Math.sqrt(n/(2*Fl)),e=t*Fl;return\"M0,\"+-t+\"L\"+e+\",0 0,\"+t+\" \"+-e+\",0Z\"},square:function(n){var t=Math.sqrt(n)/2;return\"M\"+-t+\",\"+-t+\"L\"+t+\",\"+-t+\" \"+t+\",\"+t+\" \"+-t+\",\"+t+\"Z\"},\"triangle-down\":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return\"M0,\"+e+\"L\"+t+\",\"+-e+\" \"+-t+\",\"+-e+\"Z\"},\"triangle-up\":function(n){var t=Math.sqrt(n/jl),e=t*jl/2;return\"M0,\"+-e+\"L\"+t+\",\"+e+\" \"+-t+\",\"+e+\"Z\"}});ao.svg.symbolTypes=Ul.keys();var jl=Math.sqrt(3),Fl=Math.tan(30*Yo);Co.transition=function(n){for(var t,e,r=Hl||++Zl,i=Ku(n),u=[],o=Ol||{time:Date.now(),ease:Nr,delay:0,duration:250},a=-1,l=this.length;++au;u++){i.push(t=[]);for(var e=this[u],a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,u)&&t.push(r)}return Wu(i,this.namespace,this.id)},Yl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Yl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+=\"\",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function u(n){return null==n?r:(n+=\"\",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o=\"transform\"==n?$r:Mr,a=ao.ns.qualify(n);return Ju(this,\"attr.\"+n,t,a.local?u:i)},Yl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=ao.ns.qualify(n);return this.tween(\"attr.\"+n,i.local?r:e)},Yl.style=function(n,e,r){function i(){this.style.removeProperty(n)}function u(e){return null==e?i:(e+=\"\",function(){var i,u=t(this).getComputedStyle(this,null).getPropertyValue(n);return u!==e&&(i=Mr(u,e),function(t){this.style.setProperty(n,i(t),r)})})}var o=arguments.length;if(3>o){if(\"string\"!=typeof n){2>o&&(e=\"\");for(r in n)this.style(r,n[r],e);return this}r=\"\"}return Ju(this,\"style.\"+n,e,u)},Yl.styleTween=function(n,e,r){function i(i,u){var o=e.call(this,i,u,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=\"\"),this.tween(\"style.\"+n,i)},Yl.text=function(n){return Ju(this,\"text\",n,Gu)},Yl.remove=function(){var n=this.namespace;return this.each(\"end.transition\",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Yl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:(\"function\"!=typeof n&&(n=ao.ease.apply(ao,arguments)),Y(this,function(r){r[e][t].ease=n}))},Yl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,\"function\"==typeof n?function(r,i,u){r[e][t].delay=+n.call(r,r.__data__,i,u)}:(n=+n,function(r){r[e][t].delay=n}))},Yl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,\"function\"==typeof n?function(r,i,u){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,u))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Yl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ol,u=Hl;try{Hl=e,Y(this,function(t,i,u){Ol=t[r][e],n.call(t,t.__data__,i,u)})}finally{Ol=i,Hl=u}}else Y(this,function(i){var u=i[r][e];(u.event||(u.event=ao.dispatch(\"start\",\"end\",\"interrupt\"))).on(n,t)});return this},Yl.transition=function(){for(var n,t,e,r,i=this.id,u=++Zl,o=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],f=0,s=t.length;s>f;f++)(e=t[f])&&(r=e[o][i],Qu(e,f,o,u,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Wu(a,o,u)},ao.svg.axis=function(){function n(n){n.each(function(){var n,c=ao.select(this),f=this.__chart__||e,s=this.__chart__=e.copy(),h=null==l?s.ticks?s.ticks.apply(s,a):s.domain():l,p=null==t?s.tickFormat?s.tickFormat.apply(s,a):m:t,g=c.selectAll(\".tick\").data(h,s),v=g.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",Uo),d=ao.transition(g.exit()).style(\"opacity\",Uo).remove(),y=ao.transition(g.order()).style(\"opacity\",1),M=Math.max(i,0)+o,x=Zi(s),b=c.selectAll(\".domain\").data([0]),_=(b.enter().append(\"path\").attr(\"class\",\"domain\"),ao.transition(b));v.append(\"line\"),v.append(\"text\");var w,S,k,N,E=v.select(\"line\"),A=y.select(\"line\"),C=g.select(\"text\").text(p),z=v.select(\"text\"),L=y.select(\"text\"),q=\"top\"===r||\"left\"===r?-1:1;if(\"bottom\"===r||\"top\"===r?(n=no,w=\"x\",k=\"y\",S=\"x2\",N=\"y2\",C.attr(\"dy\",0>q?\"0em\":\".71em\").style(\"text-anchor\",\"middle\"),_.attr(\"d\",\"M\"+x[0]+\",\"+q*u+\"V0H\"+x[1]+\"V\"+q*u)):(n=to,w=\"y\",k=\"x\",S=\"y2\",N=\"x2\",C.attr(\"dy\",\".32em\").style(\"text-anchor\",0>q?\"end\":\"start\"),_.attr(\"d\",\"M\"+q*u+\",\"+x[0]+\"H0V\"+x[1]+\"H\"+q*u)),E.attr(N,q*i),z.attr(k,q*M),A.attr(S,0).attr(N,q*i),L.attr(w,0).attr(k,q*M),s.rangeBand){var T=s,R=T.rangeBand()/2;f=s=function(n){return T(n)+R}}else f.rangeBand?f=s:d.call(n,s,f);v.call(n,f,s),y.call(n,s,s)})}var t,e=ao.scale.linear(),r=Vl,i=6,u=6,o=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Xl?t+\"\":Vl,n):r},n.ticks=function(){return arguments.length?(a=co(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,u=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(u=+t,n):u},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Vl=\"bottom\",Xl={top:1,right:1,bottom:1,left:1};ao.svg.brush=function(){function n(t){t.each(function(){var t=ao.select(this).style(\"pointer-events\",\"all\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\").on(\"mousedown.brush\",u).on(\"touchstart.brush\",u),o=t.selectAll(\".background\").data([0]);o.enter().append(\"rect\").attr(\"class\",\"background\").style(\"visibility\",\"hidden\").style(\"cursor\",\"crosshair\"),t.selectAll(\".extent\").data([0]).enter().append(\"rect\").attr(\"class\",\"extent\").style(\"cursor\",\"move\");var a=t.selectAll(\".resize\").data(v,m);a.exit().remove(),a.enter().append(\"g\").attr(\"class\",function(n){return\"resize \"+n}).style(\"cursor\",function(n){return $l[n]}).append(\"rect\").attr(\"x\",function(n){return/[ew]$/.test(n)?-3:null}).attr(\"y\",function(n){return/^[ns]/.test(n)?-3:null}).attr(\"width\",6).attr(\"height\",6).style(\"visibility\",\"hidden\"),a.style(\"display\",n.empty()?\"none\":null);var l,s=ao.transition(t),h=ao.transition(o);c&&(l=Zi(c),h.attr(\"x\",l[0]).attr(\"width\",l[1]-l[0]),r(s)),f&&(l=Zi(f),h.attr(\"y\",l[0]).attr(\"height\",l[1]-l[0]),i(s)),e(s)})}function e(n){n.selectAll(\".resize\").attr(\"transform\",function(n){return\"translate(\"+s[+/e$/.test(n)]+\",\"+h[+/^s/.test(n)]+\")\"})}function r(n){n.select(\".extent\").attr(\"x\",s[0]),n.selectAll(\".extent,.n>rect,.s>rect\").attr(\"width\",s[1]-s[0])}function i(n){n.select(\".extent\").attr(\"y\",h[0]),n.selectAll(\".extent,.e>rect,.w>rect\").attr(\"height\",h[1]-h[0])}function u(){function u(){32==ao.event.keyCode&&(C||(M=null,L[0]-=s[1],L[1]-=h[1],C=2),S())}function v(){32==ao.event.keyCode&&2==C&&(L[0]+=s[1],L[1]+=h[1],C=0,S())}function d(){var n=ao.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ao.event.altKey?(M||(M=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(n[0]f?(i=r,r=f):i=f),v[0]!=r||v[1]!=i?(e?a=null:o=null,v[0]=r,v[1]=i,!0):void 0}function m(){d(),k.style(\"pointer-events\",\"all\").selectAll(\".resize\").style(\"display\",n.empty()?\"none\":null),ao.select(\"body\").style(\"cursor\",null),q.on(\"mousemove.brush\",null).on(\"mouseup.brush\",null).on(\"touchmove.brush\",null).on(\"touchend.brush\",null).on(\"keydown.brush\",null).on(\"keyup.brush\",null),z(),w({type:\"brushend\"})}var M,x,b=this,_=ao.select(ao.event.target),w=l.of(b,arguments),k=ao.select(b),N=_.datum(),E=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&f,C=_.classed(\"extent\"),z=W(b),L=ao.mouse(b),q=ao.select(t(b)).on(\"keydown.brush\",u).on(\"keyup.brush\",v);if(ao.event.changedTouches?q.on(\"touchmove.brush\",d).on(\"touchend.brush\",m):q.on(\"mousemove.brush\",d).on(\"mouseup.brush\",m),k.interrupt().selectAll(\"*\").interrupt(),C)L[0]=s[0]-L[0],L[1]=h[0]-L[1];else if(N){var T=+/w$/.test(N),R=+/^n/.test(N);x=[s[1-T]-L[0],h[1-R]-L[1]],L[0]=s[T],L[1]=h[R]}else ao.event.altKey&&(M=L.slice());k.style(\"pointer-events\",\"none\").selectAll(\".resize\").style(\"display\",null),ao.select(\"body\").style(\"cursor\",_.style(\"cursor\")),w({type:\"brushstart\"}),d()}var o,a,l=N(n,\"brushstart\",\"brush\",\"brushend\"),c=null,f=null,s=[0,0],h=[0,0],p=!0,g=!0,v=Bl[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:s,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Hl?ao.select(this).transition().each(\"start.brush\",function(){o=e.i,a=e.j,s=e.x,h=e.y,n({type:\"brushstart\"})}).tween(\"brush:brush\",function(){var e=xr(s,t.x),r=xr(h,t.y);return o=a=null,function(i){s=t.x=e(i),h=t.y=r(i),n({type:\"brush\",mode:\"resize\"})}}).each(\"end.brush\",function(){o=t.i,a=t.j,n({type:\"brush\",mode:\"resize\"}),n({type:\"brushend\"})}):(n({type:\"brushstart\"}),n({type:\"brush\",mode:\"resize\"}),n({type:\"brushend\"}))})},n.x=function(t){return arguments.length?(c=t,v=Bl[!c<<1|!f],n):c},n.y=function(t){return arguments.length?(f=t,v=Bl[!c<<1|!f],n):f},n.clamp=function(t){return arguments.length?(c&&f?(p=!!t[0],g=!!t[1]):c?p=!!t:f&&(g=!!t),n):c&&f?[p,g]:c?p:f?g:null},n.extent=function(t){var e,r,i,u,l;return arguments.length?(c&&(e=t[0],r=t[1],f&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(l=e,e=r,r=l),e==s[0]&&r==s[1]||(s=[e,r])),f&&(i=t[0],u=t[1],c&&(i=i[1],u=u[1]),a=[i,u],f.invert&&(i=f(i),u=f(u)),i>u&&(l=i,i=u,u=l),i==h[0]&&u==h[1]||(h=[i,u])),n):(c&&(o?(e=o[0],r=o[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(l=e,e=r,r=l))),f&&(a?(i=a[0],u=a[1]):(i=h[0],u=h[1],f.invert&&(i=f.invert(i),u=f.invert(u)),i>u&&(l=i,i=u,u=l))),c&&f?[[e,i],[r,u]]:c?[e,r]:f&&[i,u])},n.clear=function(){return n.empty()||(s=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!f&&h[0]==h[1]},ao.rebind(n,l,\"on\")};var $l={n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},Bl=[[\"n\",\"e\",\"s\",\"w\",\"nw\",\"ne\",\"se\",\"sw\"],[\"e\",\"w\"],[\"n\",\"s\"],[]],Wl=ga.format=xa.timeFormat,Jl=Wl.utc,Gl=Jl(\"%Y-%m-%dT%H:%M:%S.%LZ\");Wl.iso=Date.prototype.toISOString&&+new Date(\"2000-01-01T00:00:00.000Z\")?eo:Gl,eo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},eo.toString=Gl.toString,ga.second=On(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ga.seconds=ga.second.range,ga.seconds.utc=ga.second.utc.range,ga.minute=On(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ga.minutes=ga.minute.range,ga.minutes.utc=ga.minute.utc.range,ga.hour=On(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ga.hours=ga.hour.range,ga.hours.utc=ga.hour.utc.range,ga.month=On(function(n){return n=ga.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ga.months=ga.month.range,ga.months.utc=ga.month.utc.range;var Kl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ql=[[ga.second,1],[ga.second,5],[ga.second,15],[ga.second,30],[ga.minute,1],[ga.minute,5],[ga.minute,15],[ga.minute,30],[ga.hour,1],[ga.hour,3],[ga.hour,6],[ga.hour,12],[ga.day,1],[ga.day,2],[ga.week,1],[ga.month,1],[ga.month,3],[ga.year,1]],nc=Wl.multi([[\".%L\",function(n){return n.getMilliseconds()}],[\":%S\",function(n){return n.getSeconds()}],[\"%I:%M\",function(n){return n.getMinutes()}],[\"%I %p\",function(n){return n.getHours()}],[\"%a %d\",function(n){return n.getDay()&&1!=n.getDate()}],[\"%b %d\",function(n){return 1!=n.getDate()}],[\"%B\",function(n){return n.getMonth()}],[\"%Y\",zt]]),tc={range:function(n,t,e){return ao.range(Math.ceil(n/e)*e,+t,e).map(io)},floor:m,ceil:m};Ql.year=ga.year,ga.scale=function(){return ro(ao.scale.linear(),Ql,nc)};var ec=Ql.map(function(n){return[n[0].utc,n[1]]}),rc=Jl.multi([[\".%L\",function(n){return n.getUTCMilliseconds()}],[\":%S\",function(n){return n.getUTCSeconds()}],[\"%I:%M\",function(n){return n.getUTCMinutes()}],[\"%I %p\",function(n){return n.getUTCHours()}],[\"%a %d\",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],[\"%b %d\",function(n){return 1!=n.getUTCDate()}],[\"%B\",function(n){return n.getUTCMonth()}],[\"%Y\",zt]]);ec.year=ga.year.utc,ga.scale.utc=function(){return ro(ao.scale.linear(),ec,rc)},ao.text=An(function(n){return n.responseText}),ao.json=function(n,t){return Cn(n,\"application/json\",uo,t)},ao.html=function(n,t){return Cn(n,\"text/html\",oo,t)},ao.xml=An(function(n){return n.responseXML}),\"function\"==typeof define&&define.amd?(this.d3=ao,define(ao)):\"object\"==typeof module&&module.exports?module.exports=ao:this.d3=ao}();"
+ },
+ "redirectURL": "",
+ "headersSize": -1,
+ "bodySize": 0,
+ "_transferSize": 0
+ },
+ "cache": {},
+ "timings": {
+ "blocked": -1,
+ "dns": -1,
+ "connect": -1,
+ "send": 0,
+ "wait": 0,
+ "receive": 0,
+ "ssl": -1
+ },
+ "serverIPAddress": "10.1.39.72",
+ "connection": "339073"
+ },
+ {
+ "startedDateTime": "2017-08-19T00:25:56.562Z",
+ "time": 0,
+ "request": {
+ "method": "GET",
+ "url": "https://cdn.rawgit.com/novus/nvd3/v1.8.1/build/nv.d3.min.js",
+ "httpVersion": "unknown",
+ "headers": [
+ {
+ "name": ":path",
+ "value": "/novus/nvd3/v1.8.1/build/nv.d3.min.js"
+ },
+ {
+ "name": "pragma",
+ "value": "no-cache"
+ },
+ {
+ "name": "accept-encoding",
+ "value": "gzip, deflate, br"
+ },
+ {
+ "name": "accept-language",
+ "value": "en-US,en;q=0.8"
+ },
+ {
+ "name": "user-agent",
+ "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36"
+ },
+ {
+ "name": "accept",
+ "value": "*/*"
+ },
+ {
+ "name": "cache-control",
+ "value": "no-cache"
+ },
+ {
+ "name": ":authority",
+ "value": "cdn.rawgit.com"
+ },
+ {
+ "name": "cookie",
+ "value": "__cfduid=d1e73cb5f1e6fa5c71a76b55f6d63b0671502924974"
+ },
+ {
+ "name": ":scheme",
+ "value": "https"
+ },
+ {
+ "name": "referer",
+ "value": "http://localhost:9199/chart.html"
+ },
+ {
+ "name": ":method",
+ "value": "GET"
+ }
+ ],
+ "queryString": [],
+ "cookies": [
+ {
+ "name": "__cfduid",
+ "value": "d1e73cb5f1e6fa5c71a76b55f6d63b0671502924974",
+ "expires": null,
+ "httpOnly": false,
+ "secure": false
+ }
+ ],
+ "headersSize": -1,
+ "bodySize": 0
+ },
+ "response": {
+ "status": 200,
+ "statusText": "",
+ "httpVersion": "unknown",
+ "headers": [
+ {
+ "name": "date",
+ "value": "Sat, 19 Aug 2017 00:25:29 GMT"
+ },
+ {
+ "name": "content-encoding",
+ "value": "gzip"
+ },
+ {
+ "name": "x-content-type-options",
+ "value": "nosniff"
+ },
+ {
+ "name": "server",
+ "value": "NetDNA-cache/2.2"
+ },
+ {
+ "name": "status",
+ "value": "200"
+ },
+ {
+ "name": "etag",
+ "value": "W/\"801e721d3c0e8934fb5a630326679f7c2f5fbb98\""
+ },
+ {
+ "name": "vary",
+ "value": "Accept-Encoding"
+ },
+ {
+ "name": "x-cache",
+ "value": "HIT"
+ },
+ {
+ "name": "content-type",
+ "value": "application/javascript;charset=utf-8"
+ },
+ {
+ "name": "access-control-allow-origin",
+ "value": "*"
+ },
+ {
+ "name": "cache-control",
+ "value": "max-age=315569000, immutable"
+ },
+ {
+ "name": "x-robots-tag",
+ "value": "none"
+ },
+ {
+ "name": "rawgit-cache-status",
+ "value": "HIT"
+ }
+ ],
+ "cookies": [],
+ "content": {
+ "size": 217818,
+ "mimeType": "application/javascript",
+ "text": "/* nvd3 version 1.8.1 (https://github.com/novus/nvd3) 2015-06-15 */\n!function(){var a={};a.dev=!1,a.tooltip=a.tooltip||{},a.utils=a.utils||{},a.models=a.models||{},a.charts={},a.logs={},a.dom={},a.dispatch=d3.dispatch(\"render_start\",\"render_end\"),Function.prototype.bind||(Function.prototype.bind=function(a){if(\"function\"!=typeof this)throw new TypeError(\"Function.prototype.bind - what is trying to be bound is not callable\");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.dev&&(a.dispatch.on(\"render_start\",function(){a.logs.startTime=+new Date}),a.dispatch.on(\"render_end\",function(){a.logs.endTime=+new Date,a.logs.totalTime=a.logs.endTime-a.logs.startTime,a.log(\"total\",a.logs.totalTime)})),a.log=function(){if(a.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(a.dev&&window.console&&\"function\"==typeof console.log&&Function.prototype.bind){var b=Function.prototype.bind.call(console.log,console);b.apply(console,arguments)}return arguments[arguments.length-1]},a.deprecated=function(a,b){console&&console.warn&&console.warn(\"nvd3 warning: `\"+a+\"` has been deprecated. \",b||\"\")},a.render=function(b){b=b||1,a.render.active=!0,a.dispatch.render_start();var c=function(){for(var d,e,f=0;b>f&&(e=a.render.queue[f]);f++)d=e.generate(),typeof e.callback==typeof Function&&e.callback(d);a.render.queue.splice(0,f),a.render.queue.length?setTimeout(c):(a.dispatch.render_end(),a.render.active=!1)};setTimeout(c)},a.render.active=!1,a.render.queue=[],a.addGraph=function(b){typeof arguments[0]==typeof Function&&(b={generate:arguments[0],callback:arguments[1]}),a.render.queue.push(b),a.render.active||a.render()},\"undefined\"!=typeof module&&\"undefined\"!=typeof exports&&(module.exports=a),\"undefined\"!=typeof window&&(window.nv=a),a.dom.write=function(a){return void 0!==window.fastdom?fastdom.write(a):a()},a.dom.read=function(a){return void 0!==window.fastdom?fastdom.read(a):a()},a.interactiveGuideline=function(){\"use strict\";function b(l){l.each(function(l){function m(){var a=d3.mouse(this),d=a[0],e=a[1],i=!0,j=!1;if(k&&(d=d3.event.offsetX,e=d3.event.offsetY,\"svg\"!==d3.event.target.tagName&&(i=!1),d3.event.target.className.baseVal.match(\"nv-legend\")&&(j=!0)),i&&(d-=f.left,e-=f.top),0>d||0>e||d>o||e>p||d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement||j){if(k&&d3.event.relatedTarget&&void 0===d3.event.relatedTarget.ownerSVGElement&&(void 0===d3.event.relatedTarget.className||d3.event.relatedTarget.className.match(c.nvPointerEventsClass)))return;return h.elementMouseout({mouseX:d,mouseY:e}),b.renderGuideLine(null),void c.hidden(!0)}c.hidden(!1);var l=g.invert(d);h.elementMousemove({mouseX:d,mouseY:e,pointXValue:l}),\"dblclick\"===d3.event.type&&h.elementDblclick({mouseX:d,mouseY:e,pointXValue:l}),\"click\"===d3.event.type&&h.elementClick({mouseX:d,mouseY:e,pointXValue:l})}var n=d3.select(this),o=d||960,p=e||400,q=n.selectAll(\"g.nv-wrap.nv-interactiveLineLayer\").data([l]),r=q.enter().append(\"g\").attr(\"class\",\" nv-wrap nv-interactiveLineLayer\");r.append(\"g\").attr(\"class\",\"nv-interactiveGuideLine\"),j&&(j.on(\"touchmove\",m).on(\"mousemove\",m,!0).on(\"mouseout\",m,!0).on(\"dblclick\",m).on(\"click\",m),b.guideLine=null,b.renderGuideLine=function(c){i&&(b.guideLine&&b.guideLine.attr(\"x1\")===c||a.dom.write(function(){var b=q.select(\".nv-interactiveGuideLine\").selectAll(\"line\").data(null!=c?[a.utils.NaNtoZero(c)]:[],String);b.enter().append(\"line\").attr(\"class\",\"nv-guideline\").attr(\"x1\",function(a){return a}).attr(\"x2\",function(a){return a}).attr(\"y1\",p).attr(\"y2\",0),b.exit().remove()}))})})}var c=a.models.tooltip();c.duration(0).hideDelay(0)._isInteractiveLayer(!0).hidden(!1);var d=null,e=null,f={left:0,top:0},g=d3.scale.linear(),h=d3.dispatch(\"elementMousemove\",\"elementMouseout\",\"elementClick\",\"elementDblclick\"),i=!0,j=null,k=\"ActiveXObject\"in window;return b.dispatch=h,b.tooltip=c,b.margin=function(a){return arguments.length?(f.top=\"undefined\"!=typeof a.top?a.top:f.top,f.left=\"undefined\"!=typeof a.left?a.left:f.left,b):f},b.width=function(a){return arguments.length?(d=a,b):d},b.height=function(a){return arguments.length?(e=a,b):e},b.xScale=function(a){return arguments.length?(g=a,b):g},b.showGuideLine=function(a){return arguments.length?(i=a,b):i},b.svgContainer=function(a){return arguments.length?(j=a,b):j},b},a.interactiveBisect=function(a,b,c){\"use strict\";if(!(a instanceof Array))return null;var d;d=\"function\"!=typeof c?function(a){return a.x}:c;var e=function(a,b){return d(a)-b},f=d3.bisector(e).left,g=d3.max([0,f(a,b)-1]),h=d(a[g]);if(\"undefined\"==typeof h&&(h=g),h===b)return g;var i=d3.min([g+1,a.length-1]),j=d(a[i]);return\"undefined\"==typeof j&&(j=i),Math.abs(j-b)>=Math.abs(h-b)?g:i},a.nearestValueIndex=function(a,b,c){\"use strict\";var d=1/0,e=null;return a.forEach(function(a,f){var g=Math.abs(b-a);null!=a&&d>=g&&c>g&&(d=g,e=f)}),e},function(){\"use strict\";a.models.tooltip=function(){function b(){if(k){var a=d3.select(k);\"svg\"!==a.node().tagName&&(a=a.select(\"svg\"));var b=a.node()?a.attr(\"viewBox\"):null;if(b){b=b.split(\" \");var c=parseInt(a.style(\"width\"),10)/b[2];p.left=p.left*c,p.top=p.top*c}}}function c(){if(!n){var a;a=k?k:document.body,n=d3.select(a).append(\"div\").attr(\"class\",\"nvtooltip \"+(j?j:\"xy-tooltip\")).attr(\"id\",v),n.style(\"top\",0).style(\"left\",0),n.style(\"opacity\",0),n.selectAll(\"div, table, td, tr\").classed(w,!0),n.classed(w,!0),o=n.node()}}function d(){if(r&&B(e)){b();var f=p.left,g=null!==i?i:p.top;return a.dom.write(function(){c();var b=A(e);b&&(o.innerHTML=b),k&&u?a.dom.read(function(){var a=k.getElementsByTagName(\"svg\")[0],b={left:0,top:0};if(a){var c=a.getBoundingClientRect(),d=k.getBoundingClientRect(),e=c.top;if(0>e){var i=k.getBoundingClientRect();e=Math.abs(e)>i.height?0:e}b.top=Math.abs(e-d.top),b.left=Math.abs(c.left-d.left)}f+=k.offsetLeft+b.left-2*k.scrollLeft,g+=k.offsetTop+b.top-2*k.scrollTop,h&&h>0&&(g=Math.floor(g/h)*h),C([f,g])}):C([f,g])}),d}}var e=null,f=\"w\",g=25,h=0,i=null,j=null,k=null,l=!0,m=400,n=null,o=null,p={left:null,top:null},q={left:0,top:0},r=!0,s=100,t=!0,u=!1,v=\"nvtooltip-\"+Math.floor(1e5*Math.random()),w=\"nv-pointer-events-none\",x=function(a){return a},y=function(a){return a},z=function(a){return a},A=function(a){if(null===a)return\"\";var b=d3.select(document.createElement(\"table\"));if(t){var c=b.selectAll(\"thead\").data([a]).enter().append(\"thead\");c.append(\"tr\").append(\"td\").attr(\"colspan\",3).append(\"strong\").classed(\"x-value\",!0).html(y(a.value))}var d=b.selectAll(\"tbody\").data([a]).enter().append(\"tbody\"),e=d.selectAll(\"tr\").data(function(a){return a.series}).enter().append(\"tr\").classed(\"highlight\",function(a){return a.highlight});e.append(\"td\").classed(\"legend-color-guide\",!0).append(\"div\").style(\"background-color\",function(a){return a.color}),e.append(\"td\").classed(\"key\",!0).html(function(a,b){return z(a.key,b)}),e.append(\"td\").classed(\"value\",!0).html(function(a,b){return x(a.value,b)}),e.selectAll(\"td\").each(function(a){if(a.highlight){var b=d3.scale.linear().domain([0,1]).range([\"#fff\",a.color]),c=.6;d3.select(this).style(\"border-bottom-color\",b(c)).style(\"border-top-color\",b(c))}});var f=b.node().outerHTML;return void 0!==a.footer&&(f+=\"\"),f},B=function(a){if(a&&a.series){if(a.series instanceof Array)return!!a.series.length;if(a.series instanceof Object)return a.series=[a.series],!0}return!1},C=function(b){o&&a.dom.read(function(){var c,d,e=parseInt(o.offsetHeight,10),h=parseInt(o.offsetWidth,10),i=a.utils.windowSize().width,j=a.utils.windowSize().height,k=window.pageYOffset,p=window.pageXOffset;j=window.innerWidth>=document.body.scrollWidth?j:j-16,i=window.innerHeight>=document.body.scrollHeight?i:i-16;var r,t,u=function(a){var b=d;do isNaN(a.offsetTop)||(b+=a.offsetTop),a=a.offsetParent;while(a);return b},v=function(a){var b=c;do isNaN(a.offsetLeft)||(b+=a.offsetLeft),a=a.offsetParent;while(a);return b};switch(f){case\"e\":c=b[0]-h-g,d=b[1]-e/2,r=v(o),t=u(o),p>r&&(c=b[0]+g>p?b[0]+g:p-r+c),k>t&&(d=k-t+d),t+e>k+j&&(d=k+j-t+d-e);break;case\"w\":c=b[0]+g,d=b[1]-e/2,r=v(o),t=u(o),r+h>i&&(c=b[0]-h-g),k>t&&(d=k+5),t+e>k+j&&(d=k+j-t+d-e);break;case\"n\":c=b[0]-h/2-5,d=b[1]+g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),t+e>k+j&&(d=k+j-t+d-e);break;case\"s\":c=b[0]-h/2,d=b[1]-e-g,r=v(o),t=u(o),p>r&&(c=p+5),r+h>i&&(c=c-h/2+5),k>t&&(d=k);break;case\"none\":c=b[0],d=b[1]-g,r=v(o),t=u(o)}c-=q.left,d-=q.top;var w=o.getBoundingClientRect(),k=window.pageYOffset||document.documentElement.scrollTop,p=window.pageXOffset||document.documentElement.scrollLeft,x=\"translate(\"+(w.left+p)+\"px, \"+(w.top+k)+\"px)\",y=\"translate(\"+c+\"px, \"+d+\"px)\",z=d3.interpolateString(x,y),A=n.style(\"opacity\")<.1;l?n.transition().delay(m).duration(0).style(\"opacity\",0):n.interrupt().transition().duration(A?0:s).styleTween(\"transform\",function(){return z},\"important\").style(\"-webkit-transform\",y).style(\"opacity\",1)})};return d.nvPointerEventsClass=w,d.options=a.utils.optionsFunc.bind(d),d._options=Object.create({},{duration:{get:function(){return s},set:function(a){s=a}},gravity:{get:function(){return f},set:function(a){f=a}},distance:{get:function(){return g},set:function(a){g=a}},snapDistance:{get:function(){return h},set:function(a){h=a}},classes:{get:function(){return j},set:function(a){j=a}},chartContainer:{get:function(){return k},set:function(a){k=a}},fixedTop:{get:function(){return i},set:function(a){i=a}},enabled:{get:function(){return r},set:function(a){r=a}},hideDelay:{get:function(){return m},set:function(a){m=a}},contentGenerator:{get:function(){return A},set:function(a){A=a}},valueFormatter:{get:function(){return x},set:function(a){x=a}},headerFormatter:{get:function(){return y},set:function(a){y=a}},keyFormatter:{get:function(){return z},set:function(a){z=a}},headerEnabled:{get:function(){return t},set:function(a){t=a}},_isInteractiveLayer:{get:function(){return u},set:function(a){u=!!a}},position:{get:function(){return p},set:function(a){p.left=void 0!==a.left?a.left:p.left,p.top=void 0!==a.top?a.top:p.top}},offset:{get:function(){return q},set:function(a){q.left=void 0!==a.left?a.left:q.left,q.top=void 0!==a.top?a.top:q.top}},hidden:{get:function(){return l},set:function(a){l!=a&&(l=!!a,d())}},data:{get:function(){return e},set:function(a){a.point&&(a.value=a.point.x,a.series=a.series||{},a.series.value=a.point.y,a.series.color=a.point.color||a.series.color),e=a}},tooltipElem:{get:function(){return o},set:function(){}},id:{get:function(){return v},set:function(){}}}),a.utils.initOptions(d),d}}(),a.utils.windowSize=function(){var a={width:640,height:480};return window.innerWidth&&window.innerHeight?(a.width=window.innerWidth,a.height=window.innerHeight,a):\"CSS1Compat\"==document.compatMode&&document.documentElement&&document.documentElement.offsetWidth?(a.width=document.documentElement.offsetWidth,a.height=document.documentElement.offsetHeight,a):document.body&&document.body.offsetWidth?(a.width=document.body.offsetWidth,a.height=document.body.offsetHeight,a):a},a.utils.windowResize=function(b){return window.addEventListener?window.addEventListener(\"resize\",b):a.log(\"ERROR: Failed to bind to window.resize with: \",b),{callback:b,clear:function(){window.removeEventListener(\"resize\",b)}}},a.utils.getColor=function(b){if(void 0===b)return a.utils.defaultColor();if(Array.isArray(b)){var c=d3.scale.ordinal().range(b);return function(a,b){var d=void 0===b?a:b;return a.color||c(d)}}return b},a.utils.defaultColor=function(){return a.utils.getColor(d3.scale.category20().range())},a.utils.customTheme=function(a,b,c){b=b||function(a){return a.key},c=c||d3.scale.category20().range();var d=c.length;return function(e){var f=b(e);return\"function\"==typeof a[f]?a[f]():void 0!==a[f]?a[f]:(d||(d=c.length),d-=1,c[d])}},a.utils.pjax=function(b,c){var d=function(d){d3.html(d,function(d){var e=d3.select(c).node();e.parentNode.replaceChild(d3.select(d).select(c).node(),e),a.utils.pjax(b,c)})};d3.selectAll(b).on(\"click\",function(){history.pushState(this.href,this.textContent,this.href),d(this.href),d3.event.preventDefault()}),d3.select(window).on(\"popstate\",function(){d3.event.state&&d(d3.event.state)})},a.utils.calcApproxTextWidth=function(a){if(\"function\"==typeof a.style&&\"function\"==typeof a.text){var b=parseInt(a.style(\"font-size\").replace(\"px\",\"\"),10),c=a.text().length;return c*b*.5}return 0},a.utils.NaNtoZero=function(a){return\"number\"!=typeof a||isNaN(a)||null===a||1/0===a||a===-1/0?0:a},d3.selection.prototype.watchTransition=function(a){var b=[this].concat([].slice.call(arguments,1));return a.transition.apply(a,b)},a.utils.renderWatch=function(b,c){if(!(this instanceof a.utils.renderWatch))return new a.utils.renderWatch(b,c);var d=void 0!==c?c:250,e=[],f=this;this.models=function(a){return a=[].slice.call(arguments,0),a.forEach(function(a){a.__rendered=!1,function(a){a.dispatch.on(\"renderEnd\",function(){a.__rendered=!0,f.renderEnd(\"model\")})}(a),e.indexOf(a)<0&&e.push(a)}),this},this.reset=function(a){void 0!==a&&(d=a),e=[]},this.transition=function(a,b,c){if(b=arguments.length>1?[].slice.call(arguments,1):[],c=b.length>1?b.pop():void 0!==d?d:250,a.__rendered=!1,e.indexOf(a)<0&&e.push(a),0===c)return a.__rendered=!0,a.delay=function(){return this},a.duration=function(){return this},a;a.__rendered=0===a.length?!0:a.every(function(a){return!a.length})?!0:!1;var g=0;return a.transition().duration(c).each(function(){++g}).each(\"end\",function(){0===--g&&(a.__rendered=!0,f.renderEnd.apply(this,b))})},this.renderEnd=function(){e.every(function(a){return a.__rendered})&&(e.forEach(function(a){a.__rendered=!1}),b.renderEnd.apply(this,arguments))}},a.utils.deepExtend=function(b){var c=arguments.length>1?[].slice.call(arguments,1):[];c.forEach(function(c){for(var d in c){var e=b[d]instanceof Array,f=\"object\"==typeof b[d],g=\"object\"==typeof c[d];f&&!e&&g?a.utils.deepExtend(b[d],c[d]):b[d]=c[d]}})},a.utils.state=function(){if(!(this instanceof a.utils.state))return new a.utils.state;var b={},c=function(){},d=function(){return{}},e=null,f=null;this.dispatch=d3.dispatch(\"change\",\"set\"),this.dispatch.on(\"set\",function(a){c(a,!0)}),this.getter=function(a){return d=a,this},this.setter=function(a,b){return b||(b=function(){}),c=function(c,d){a(c),d&&b()},this},this.init=function(b){e=e||{},a.utils.deepExtend(e,b)};var g=function(){var a=d();if(JSON.stringify(a)===JSON.stringify(b))return!1;for(var c in a)void 0===b[c]&&(b[c]={}),b[c]=a[c],f=!0;return!0};this.update=function(){e&&(c(e,!1),e=null),g.call(this)&&this.dispatch.change(b)}},a.utils.optionsFunc=function(a){return a&&d3.map(a).forEach(function(a,b){\"function\"==typeof this[a]&&this[a](b)}.bind(this)),this},a.utils.calcTicksX=function(b,c){var d=1,e=0;for(e;ed?f:d}return a.log(\"Requested number of ticks: \",b),a.log(\"Calculated max values to be: \",d),b=b>d?b=d-1:b,b=1>b?1:b,b=Math.floor(b),a.log(\"Calculating tick count as: \",b),b},a.utils.calcTicksY=function(b,c){return a.utils.calcTicksX(b,c)},a.utils.initOption=function(a,b){a._calls&&a._calls[b]?a[b]=a._calls[b]:(a[b]=function(c){return arguments.length?(a._overrides[b]=!0,a._options[b]=c,a):a._options[b]},a[\"_\"+b]=function(c){return arguments.length?(a._overrides[b]||(a._options[b]=c),a):a._options[b]})},a.utils.initOptions=function(b){b._overrides=b._overrides||{};var c=Object.getOwnPropertyNames(b._options||{}),d=Object.getOwnPropertyNames(b._calls||{});c=c.concat(d);for(var e in c)a.utils.initOption(b,c[e])},a.utils.inheritOptionsD3=function(a,b,c){a._d3options=c.concat(a._d3options||[]),c.unshift(b),c.unshift(a),d3.rebind.apply(this,c)},a.utils.arrayUnique=function(a){return a.sort().filter(function(b,c){return!c||b!=a[c-1]})},a.utils.symbolMap=d3.map(),a.utils.symbol=function(){function b(b,e){var f=c.call(this,b,e),g=d.call(this,b,e);return-1!==d3.svg.symbolTypes.indexOf(f)?d3.svg.symbol().type(f).size(g)():a.utils.symbolMap.get(f)(g)}var c,d=64;return b.type=function(a){return arguments.length?(c=d3.functor(a),b):c},b.size=function(a){return arguments.length?(d=d3.functor(a),b):d},b},a.utils.inheritOptions=function(b,c){var d=Object.getOwnPropertyNames(c._options||{}),e=Object.getOwnPropertyNames(c._calls||{}),f=c._inherited||[],g=c._d3options||[],h=d.concat(e).concat(f).concat(g);h.unshift(c),h.unshift(b),d3.rebind.apply(this,h),b._inherited=a.utils.arrayUnique(d.concat(e).concat(f).concat(d).concat(b._inherited||[])),b._d3options=a.utils.arrayUnique(g.concat(b._d3options||[]))},a.utils.initSVG=function(a){a.classed({\"nvd3-svg\":!0})},a.utils.sanitizeHeight=function(a,b){return a||parseInt(b.style(\"height\"),10)||400},a.utils.sanitizeWidth=function(a,b){return a||parseInt(b.style(\"width\"),10)||960},a.utils.availableHeight=function(b,c,d){return a.utils.sanitizeHeight(b,c)-d.top-d.bottom},a.utils.availableWidth=function(b,c,d){return a.utils.sanitizeWidth(b,c)-d.left-d.right},a.utils.noData=function(b,c){var d=b.options(),e=d.margin(),f=d.noData(),g=null==f?[\"No Data Available.\"]:[f],h=a.utils.availableHeight(d.height(),c,e),i=a.utils.availableWidth(d.width(),c,e),j=e.left+i/2,k=e.top+h/2;c.selectAll(\"g\").remove();var l=c.selectAll(\".nv-noData\").data(g);l.enter().append(\"text\").attr(\"class\",\"nvd3 nv-noData\").attr(\"dy\",\"-.7em\").style(\"text-anchor\",\"middle\"),l.attr(\"x\",j).attr(\"y\",k).text(function(a){return a})},a.models.axis=function(){\"use strict\";function b(g){return s.reset(),g.each(function(b){var g=d3.select(this);a.utils.initSVG(g);var p=g.selectAll(\"g.nv-wrap.nv-axis\").data([b]),q=p.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-axis\"),t=(q.append(\"g\"),p.select(\"g\"));null!==n?c.ticks(n):(\"top\"==c.orient()||\"bottom\"==c.orient())&&c.ticks(Math.abs(d.range()[1]-d.range()[0])/100),t.watchTransition(s,\"axis\").call(c),r=r||c.scale();var u=c.tickFormat();null==u&&(u=r.tickFormat());var v=t.selectAll(\"text.nv-axislabel\").data([h||null]);v.exit().remove();var w,x,y;switch(c.orient()){case\"top\":v.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr(\"text-anchor\",\"middle\").attr(\"y\",0).attr(\"x\",y/2),i&&(x=p.selectAll(\"g.nv-axisMaxMin\").data(d.domain()),x.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-x\",0==b?\"nv-axisMin-x\":\"nv-axisMax-x\"].join(\" \")}).append(\"text\"),x.exit().remove(),x.attr(\"transform\",function(b){return\"translate(\"+a.utils.NaNtoZero(d(b))+\",0)\"}).select(\"text\").attr(\"dy\",\"-0.5em\").attr(\"y\",-c.tickPadding()).attr(\"text-anchor\",\"middle\").text(function(a){var b=u(a);return(\"\"+b).match(\"NaN\")?\"\":b}),x.watchTransition(s,\"min-max top\").attr(\"transform\",function(b,c){return\"translate(\"+a.utils.NaNtoZero(d.range()[c])+\",0)\"}));break;case\"bottom\":w=o+36;var z=30,A=0,B=t.selectAll(\"g\").select(\"text\"),C=\"\";if(j%360){B.each(function(){var a=this.getBoundingClientRect(),b=a.width;A=a.height,b>z&&(z=b)}),C=\"rotate(\"+j+\" 0,\"+(A/2+c.tickPadding())+\")\";var D=Math.abs(Math.sin(j*Math.PI/180));w=(D?D*z:z)+30,B.attr(\"transform\",C).style(\"text-anchor\",j%360>0?\"start\":\"end\")}v.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),y=d.range().length<2?0:2===d.range().length?d.range()[1]:d.range()[d.range().length-1]+(d.range()[1]-d.range()[0]),v.attr(\"text-anchor\",\"middle\").attr(\"y\",w).attr(\"x\",y/2),i&&(x=p.selectAll(\"g.nv-axisMaxMin\").data([d.domain()[0],d.domain()[d.domain().length-1]]),x.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-x\",0==b?\"nv-axisMin-x\":\"nv-axisMax-x\"].join(\" \")}).append(\"text\"),x.exit().remove(),x.attr(\"transform\",function(b){return\"translate(\"+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+\",0)\"}).select(\"text\").attr(\"dy\",\".71em\").attr(\"y\",c.tickPadding()).attr(\"transform\",C).style(\"text-anchor\",j?j%360>0?\"start\":\"end\":\"middle\").text(function(a){var b=u(a);return(\"\"+b).match(\"NaN\")?\"\":b}),x.watchTransition(s,\"min-max bottom\").attr(\"transform\",function(b){return\"translate(\"+a.utils.NaNtoZero(d(b)+(m?d.rangeBand()/2:0))+\",0)\"})),l&&B.attr(\"transform\",function(a,b){return\"translate(0,\"+(b%2==0?\"0\":\"12\")+\")\"});break;case\"right\":v.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),v.style(\"text-anchor\",k?\"middle\":\"begin\").attr(\"transform\",k?\"rotate(90)\":\"\").attr(\"y\",k?-Math.max(e.right,f)+12:-10).attr(\"x\",k?d3.max(d.range())/2:c.tickPadding()),i&&(x=p.selectAll(\"g.nv-axisMaxMin\").data(d.domain()),x.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-y\",0==b?\"nv-axisMin-y\":\"nv-axisMax-y\"].join(\" \")}).append(\"text\").style(\"opacity\",0),x.exit().remove(),x.attr(\"transform\",function(b){return\"translate(0,\"+a.utils.NaNtoZero(d(b))+\")\"}).select(\"text\").attr(\"dy\",\".32em\").attr(\"y\",0).attr(\"x\",c.tickPadding()).style(\"text-anchor\",\"start\").text(function(a){var b=u(a);return(\"\"+b).match(\"NaN\")?\"\":b}),x.watchTransition(s,\"min-max right\").attr(\"transform\",function(b,c){return\"translate(0,\"+a.utils.NaNtoZero(d.range()[c])+\")\"}).select(\"text\").style(\"opacity\",1));break;case\"left\":v.enter().append(\"text\").attr(\"class\",\"nv-axislabel\"),v.style(\"text-anchor\",k?\"middle\":\"end\").attr(\"transform\",k?\"rotate(-90)\":\"\").attr(\"y\",k?-Math.max(e.left,f)+25-(o||0):-10).attr(\"x\",k?-d3.max(d.range())/2:-c.tickPadding()),i&&(x=p.selectAll(\"g.nv-axisMaxMin\").data(d.domain()),x.enter().append(\"g\").attr(\"class\",function(a,b){return[\"nv-axisMaxMin\",\"nv-axisMaxMin-y\",0==b?\"nv-axisMin-y\":\"nv-axisMax-y\"].join(\" \")}).append(\"text\").style(\"opacity\",0),x.exit().remove(),x.attr(\"transform\",function(b){return\"translate(0,\"+a.utils.NaNtoZero(r(b))+\")\"}).select(\"text\").attr(\"dy\",\".32em\").attr(\"y\",0).attr(\"x\",-c.tickPadding()).attr(\"text-anchor\",\"end\").text(function(a){var b=u(a);return(\"\"+b).match(\"NaN\")?\"\":b}),x.watchTransition(s,\"min-max right\").attr(\"transform\",function(b,c){return\"translate(0,\"+a.utils.NaNtoZero(d.range()[c])+\")\"}).select(\"text\").style(\"opacity\",1))}if(v.text(function(a){return a}),!i||\"left\"!==c.orient()&&\"right\"!==c.orient()||(t.selectAll(\"g\").each(function(a){d3.select(this).select(\"text\").attr(\"opacity\",1),(d(a)d.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr(\"opacity\",0),d3.select(this).select(\"text\").attr(\"opacity\",0))}),d.domain()[0]==d.domain()[1]&&0==d.domain()[0]&&p.selectAll(\"g.nv-axisMaxMin\").style(\"opacity\",function(a,b){return b?0:1})),i&&(\"top\"===c.orient()||\"bottom\"===c.orient())){var E=[];p.selectAll(\"g.nv-axisMaxMin\").each(function(a,b){try{E.push(b?d(a)-this.getBoundingClientRect().width-4:d(a)+this.getBoundingClientRect().width+4)}catch(c){E.push(b?d(a)-4:d(a)+4)}}),t.selectAll(\"g\").each(function(a){(d(a)E[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select(\"text\").remove())})}t.selectAll(\".tick\").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)&&void 0!==a}).classed(\"zero\",!0),r=d.copy()}),s.renderEnd(\"axis immediate\"),b}var c=d3.svg.axis(),d=d3.scale.linear(),e={top:0,right:0,bottom:0,left:0},f=75,g=60,h=null,i=!0,j=0,k=!0,l=!1,m=!1,n=null,o=0,p=250,q=d3.dispatch(\"renderEnd\");c.scale(d).orient(\"bottom\").tickFormat(function(a){return a});var r,s=a.utils.renderWatch(q,p);return b.axis=c,b.dispatch=q,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{axisLabelDistance:{get:function(){return o},set:function(a){o=a}},staggerLabels:{get:function(){return l},set:function(a){l=a}},rotateLabels:{get:function(){return j},set:function(a){j=a}},rotateYLabel:{get:function(){return k},set:function(a){k=a}},showMaxMin:{get:function(){return i},set:function(a){i=a}},axisLabel:{get:function(){return h},set:function(a){h=a}},height:{get:function(){return g},set:function(a){g=a}},ticks:{get:function(){return n},set:function(a){n=a}},width:{get:function(){return f},set:function(a){f=a}},margin:{get:function(){return e},set:function(a){e.top=void 0!==a.top?a.top:e.top,e.right=void 0!==a.right?a.right:e.right,e.bottom=void 0!==a.bottom?a.bottom:e.bottom,e.left=void 0!==a.left?a.left:e.left}},duration:{get:function(){return p},set:function(a){p=a,s.reset(p)}},scale:{get:function(){return d},set:function(e){d=e,c.scale(d),m=\"function\"==typeof d.rangeBands,a.utils.inheritOptionsD3(b,d,[\"domain\",\"range\",\"rangeBand\",\"rangeBands\"])}}}),a.utils.initOptions(b),a.utils.inheritOptionsD3(b,c,[\"orient\",\"tickValues\",\"tickSubdivide\",\"tickSize\",\"tickPadding\",\"tickFormat\"]),a.utils.inheritOptionsD3(b,d,[\"domain\",\"range\",\"rangeBand\",\"rangeBands\"]),b},a.models.boxPlot=function(){\"use strict\";function b(l){return v.reset(),l.each(function(b){var l=j-i.left-i.right,p=k-i.top-i.bottom;r=d3.select(this),a.utils.initSVG(r),m.domain(c||b.map(function(a,b){return o(a,b)})).rangeBands(e||[0,l],.1);var w=[];if(!d){var x=d3.min(b.map(function(a){var b=[];return b.push(a.values.Q1),a.values.hasOwnProperty(\"whisker_low\")&&null!==a.values.whisker_low&&b.push(a.values.whisker_low),a.values.hasOwnProperty(\"outliers\")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.min(b)})),y=d3.max(b.map(function(a){var b=[];return b.push(a.values.Q3),a.values.hasOwnProperty(\"whisker_high\")&&null!==a.values.whisker_high&&b.push(a.values.whisker_high),a.values.hasOwnProperty(\"outliers\")&&null!==a.values.outliers&&(b=b.concat(a.values.outliers)),d3.max(b)}));w=[x,y]}n.domain(d||w),n.range(f||[p,0]),g=g||m,h=h||n.copy().range([n(0),n(0)]);{var z=r.selectAll(\"g.nv-wrap\").data([b]);z.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap\")}z.attr(\"transform\",\"translate(\"+i.left+\",\"+i.top+\")\");var A=z.selectAll(\".nv-boxplot\").data(function(a){return a}),B=A.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6);A.attr(\"class\",\"nv-boxplot\").attr(\"transform\",function(a,b){return\"translate(\"+(m(o(a,b))+.05*m.rangeBand())+\", 0)\"}).classed(\"hover\",function(a){return a.hover}),A.watchTransition(v,\"nv-boxplot: boxplots\").style(\"stroke-opacity\",1).style(\"fill-opacity\",.75).delay(function(a,c){return c*t/b.length}).attr(\"transform\",function(a,b){return\"translate(\"+(m(o(a,b))+.05*m.rangeBand())+\", 0)\"}),A.exit().remove(),B.each(function(a,b){var c=d3.select(this);[\"low\",\"high\"].forEach(function(d){a.values.hasOwnProperty(\"whisker_\"+d)&&null!==a.values[\"whisker_\"+d]&&(c.append(\"line\").style(\"stroke\",a.color?a.color:q(a,b)).attr(\"class\",\"nv-boxplot-whisker nv-boxplot-\"+d),c.append(\"line\").style(\"stroke\",a.color?a.color:q(a,b)).attr(\"class\",\"nv-boxplot-tick nv-boxplot-\"+d))})});var C=A.selectAll(\".nv-boxplot-outlier\").data(function(a){return a.values.hasOwnProperty(\"outliers\")&&null!==a.values.outliers?a.values.outliers:[]});C.enter().append(\"circle\").style(\"fill\",function(a,b,c){return q(a,c)}).style(\"stroke\",function(a,b,c){return q(a,c)}).on(\"mouseover\",function(a,b,c){d3.select(this).classed(\"hover\",!0),s.elementMouseover({series:{key:a,color:q(a,c)},e:d3.event})}).on(\"mouseout\",function(a,b,c){d3.select(this).classed(\"hover\",!1),s.elementMouseout({series:{key:a,color:q(a,c)},e:d3.event})}).on(\"mousemove\",function(){s.elementMousemove({e:d3.event})}),C.attr(\"class\",\"nv-boxplot-outlier\"),C.watchTransition(v,\"nv-boxplot: nv-boxplot-outlier\").attr(\"cx\",.45*m.rangeBand()).attr(\"cy\",function(a){return n(a)}).attr(\"r\",\"3\"),C.exit().remove();var D=function(){return null===u?.9*m.rangeBand():Math.min(75,.9*m.rangeBand())},E=function(){return.45*m.rangeBand()-D()/2},F=function(){return.45*m.rangeBand()+D()/2};[\"low\",\"high\"].forEach(function(a){var b=\"low\"===a?\"Q1\":\"Q3\";A.select(\"line.nv-boxplot-whisker.nv-boxplot-\"+a).watchTransition(v,\"nv-boxplot: boxplots\").attr(\"x1\",.45*m.rangeBand()).attr(\"y1\",function(b){return n(b.values[\"whisker_\"+a])}).attr(\"x2\",.45*m.rangeBand()).attr(\"y2\",function(a){return n(a.values[b])}),A.select(\"line.nv-boxplot-tick.nv-boxplot-\"+a).watchTransition(v,\"nv-boxplot: boxplots\").attr(\"x1\",E).attr(\"y1\",function(b){return n(b.values[\"whisker_\"+a])}).attr(\"x2\",F).attr(\"y2\",function(b){return n(b.values[\"whisker_\"+a])})}),[\"low\",\"high\"].forEach(function(a){B.selectAll(\".nv-boxplot-\"+a).on(\"mouseover\",function(b,c,d){d3.select(this).classed(\"hover\",!0),s.elementMouseover({series:{key:b.values[\"whisker_\"+a],color:q(b,d)},e:d3.event})}).on(\"mouseout\",function(b,c,d){d3.select(this).classed(\"hover\",!1),s.elementMouseout({series:{key:b.values[\"whisker_\"+a],color:q(b,d)},e:d3.event})}).on(\"mousemove\",function(){s.elementMousemove({e:d3.event})})}),B.append(\"rect\").attr(\"class\",\"nv-boxplot-box\").on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),s.elementMouseover({key:a.label,value:a.label,series:[{key:\"Q3\",value:a.values.Q3,color:a.color||q(a,b)},{key:\"Q2\",value:a.values.Q2,color:a.color||q(a,b)},{key:\"Q1\",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),s.elementMouseout({key:a.label,value:a.label,series:[{key:\"Q3\",value:a.values.Q3,color:a.color||q(a,b)},{key:\"Q2\",value:a.values.Q2,color:a.color||q(a,b)},{key:\"Q1\",value:a.values.Q1,color:a.color||q(a,b)}],data:a,index:b,e:d3.event})}).on(\"mousemove\",function(){s.elementMousemove({e:d3.event})}),A.select(\"rect.nv-boxplot-box\").watchTransition(v,\"nv-boxplot: boxes\").attr(\"y\",function(a){return n(a.values.Q3)}).attr(\"width\",D).attr(\"x\",E).attr(\"height\",function(a){return Math.abs(n(a.values.Q3)-n(a.values.Q1))||1}).style(\"fill\",function(a,b){return a.color||q(a,b)}).style(\"stroke\",function(a,b){return a.color||q(a,b)}),B.append(\"line\").attr(\"class\",\"nv-boxplot-median\"),A.select(\"line.nv-boxplot-median\").watchTransition(v,\"nv-boxplot: boxplots line\").attr(\"x1\",E).attr(\"y1\",function(a){return n(a.values.Q2)}).attr(\"x2\",F).attr(\"y2\",function(a){return n(a.values.Q2)}),g=m.copy(),h=n.copy()}),v.renderEnd(\"nv-boxplot immediate\"),b}var c,d,e,f,g,h,i={top:0,right:0,bottom:0,left:0},j=960,k=500,l=Math.floor(1e4*Math.random()),m=d3.scale.ordinal(),n=d3.scale.linear(),o=function(a){return a.x},p=function(a){return a.y},q=a.utils.defaultColor(),r=null,s=d3.dispatch(\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),t=250,u=null,v=a.utils.renderWatch(s,t);return b.dispatch=s,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},maxBoxWidth:{get:function(){return u},set:function(a){u=a}},x:{get:function(){return o},set:function(a){o=a}},y:{get:function(){return p},set:function(a){p=a}},xScale:{get:function(){return m},set:function(a){m=a}},yScale:{get:function(){return n},set:function(a){n=a}},xDomain:{get:function(){return c},set:function(a){c=a}},yDomain:{get:function(){return d},set:function(a){d=a}},xRange:{get:function(){return e},set:function(a){e=a}},yRange:{get:function(){return f},set:function(a){f=a}},id:{get:function(){return l},set:function(a){l=a}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}},duration:{get:function(){return t},set:function(a){t=a,v.reset(t)}}}),a.utils.initOptions(b),b},a.models.boxPlotChart=function(){\"use strict\";function b(k){return t.reset(),t.models(e),l&&t.models(f),m&&t.models(g),k.each(function(k){var p=d3.select(this);a.utils.initSVG(p);var t=(i||parseInt(p.style(\"width\"))||960)-h.left-h.right,u=(j||parseInt(p.style(\"height\"))||400)-h.top-h.bottom;if(b.update=function(){r.beforeUpdate(),p.transition().duration(s).call(b)},b.container=this,!(k&&k.length&&k.filter(function(a){return a.values.hasOwnProperty(\"Q1\")&&a.values.hasOwnProperty(\"Q2\")&&a.values.hasOwnProperty(\"Q3\")}).length)){var v=p.selectAll(\".nv-noData\").data([q]);return v.enter().append(\"text\").attr(\"class\",\"nvd3 nv-noData\").attr(\"dy\",\"-.7em\").style(\"text-anchor\",\"middle\"),v.attr(\"x\",h.left+t/2).attr(\"y\",h.top+u/2).text(function(a){return a}),b}p.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var w=p.selectAll(\"g.nv-wrap.nv-boxPlotWithAxes\").data([k]),x=w.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-boxPlotWithAxes\").append(\"g\"),y=x.append(\"defs\"),z=w.select(\"g\");\nx.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),x.append(\"g\").attr(\"class\",\"nv-y nv-axis\").append(\"g\").attr(\"class\",\"nv-zeroLine\").append(\"line\"),x.append(\"g\").attr(\"class\",\"nv-barsWrap\"),z.attr(\"transform\",\"translate(\"+h.left+\",\"+h.top+\")\"),n&&z.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+t+\",0)\"),e.width(t).height(u);var A=z.select(\".nv-barsWrap\").datum(k.filter(function(a){return!a.disabled}));if(A.transition().call(e),y.append(\"clipPath\").attr(\"id\",\"nv-x-label-clip-\"+e.id()).append(\"rect\"),z.select(\"#nv-x-label-clip-\"+e.id()+\" rect\").attr(\"width\",c.rangeBand()*(o?2:1)).attr(\"height\",16).attr(\"x\",-c.rangeBand()/(o?1:2)),l){f.scale(c).ticks(a.utils.calcTicksX(t/100,k)).tickSize(-u,0),z.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+d.range()[0]+\")\"),z.select(\".nv-x.nv-axis\").call(f);var B=z.select(\".nv-x.nv-axis\").selectAll(\"g\");o&&B.selectAll(\"text\").attr(\"transform\",function(a,b,c){return\"translate(0,\"+(c%2==0?\"5\":\"17\")+\")\"})}m&&(g.scale(d).ticks(Math.floor(u/36)).tickSize(-t,0),z.select(\".nv-y.nv-axis\").call(g)),z.select(\".nv-zeroLine line\").attr(\"x1\",0).attr(\"x2\",t).attr(\"y1\",d(0)).attr(\"y2\",d(0))}),t.renderEnd(\"nv-boxplot chart immediate\"),b}var c,d,e=a.models.boxPlot(),f=a.models.axis(),g=a.models.axis(),h={top:15,right:10,bottom:50,left:60},i=null,j=null,k=a.utils.getColor(),l=!0,m=!0,n=!1,o=!1,p=a.models.tooltip(),q=\"No Data Available.\",r=d3.dispatch(\"tooltipShow\",\"tooltipHide\",\"beforeUpdate\",\"renderEnd\"),s=250;f.orient(\"bottom\").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(n?\"right\":\"left\").tickFormat(d3.format(\",.1f\")),p.duration(0);var t=a.utils.renderWatch(r,s);return e.dispatch.on(\"elementMouseover.tooltip\",function(a){p.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(a){p.data(a).hidden(!0)}),e.dispatch.on(\"elementMousemove.tooltip\",function(){p.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.boxplot=e,b.xAxis=f,b.yAxis=g,b.tooltip=p,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},staggerLabels:{get:function(){return o},set:function(a){o=a}},showXAxis:{get:function(){return l},set:function(a){l=a}},showYAxis:{get:function(){return m},set:function(a){m=a}},tooltips:{get:function(){return tooltips},set:function(a){tooltips=a}},tooltipContent:{get:function(){return p},set:function(a){p=a}},noData:{get:function(){return q},set:function(a){q=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!==a.top?a.top:h.top,h.right=void 0!==a.right?a.right:h.right,h.bottom=void 0!==a.bottom?a.bottom:h.bottom,h.left=void 0!==a.left?a.left:h.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return k},set:function(b){k=a.utils.getColor(b),e.color(k)}},rightAlignYAxis:{get:function(){return n},set:function(a){n=a,g.orient(a?\"right\":\"left\")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.bullet=function(){\"use strict\";function b(d){return d.each(function(b,d){var p=m-c.left-c.right,s=n-c.top-c.bottom;o=d3.select(this),a.utils.initSVG(o);{var t=f.call(this,b,d).slice().sort(d3.descending),u=g.call(this,b,d).slice().sort(d3.descending),v=h.call(this,b,d).slice().sort(d3.descending),w=i.call(this,b,d).slice(),x=j.call(this,b,d).slice(),y=k.call(this,b,d).slice(),z=d3.scale.linear().domain(d3.extent(d3.merge([l,t]))).range(e?[p,0]:[0,p]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range())}this.__chart__=z;var A=d3.min(t),B=d3.max(t),C=t[1],D=o.selectAll(\"g.nv-wrap.nv-bullet\").data([b]),E=D.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-bullet\"),F=E.append(\"g\"),G=D.select(\"g\");F.append(\"rect\").attr(\"class\",\"nv-range nv-rangeMax\"),F.append(\"rect\").attr(\"class\",\"nv-range nv-rangeAvg\"),F.append(\"rect\").attr(\"class\",\"nv-range nv-rangeMin\"),F.append(\"rect\").attr(\"class\",\"nv-measure\"),D.attr(\"transform\",\"translate(\"+c.left+\",\"+c.top+\")\");var H=function(a){return Math.abs(z(a)-z(0))},I=function(a){return z(0>a?a:0)};G.select(\"rect.nv-rangeMax\").attr(\"height\",s).attr(\"width\",H(B>0?B:A)).attr(\"x\",I(B>0?B:A)).datum(B>0?B:A),G.select(\"rect.nv-rangeAvg\").attr(\"height\",s).attr(\"width\",H(C)).attr(\"x\",I(C)).datum(C),G.select(\"rect.nv-rangeMin\").attr(\"height\",s).attr(\"width\",H(B)).attr(\"x\",I(B)).attr(\"width\",H(B>0?A:B)).attr(\"x\",I(B>0?A:B)).datum(B>0?A:B),G.select(\"rect.nv-measure\").style(\"fill\",q).attr(\"height\",s/3).attr(\"y\",s/3).attr(\"width\",0>v?z(0)-z(v[0]):z(v[0])-z(0)).attr(\"x\",I(v)).on(\"mouseover\",function(){r.elementMouseover({value:v[0],label:y[0]||\"Current\",color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(){r.elementMousemove({value:v[0],label:y[0]||\"Current\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(){r.elementMouseout({value:v[0],label:y[0]||\"Current\",color:d3.select(this).style(\"fill\")})});var J=s/6,K=u.map(function(a,b){return{value:a,label:x[b]}});F.selectAll(\"path.nv-markerTriangle\").data(K).enter().append(\"path\").attr(\"class\",\"nv-markerTriangle\").attr(\"transform\",function(a){return\"translate(\"+z(a.value)+\",\"+s/2+\")\"}).attr(\"d\",\"M0,\"+J+\"L\"+J+\",\"+-J+\" \"+-J+\",\"+-J+\"Z\").on(\"mouseover\",function(a){r.elementMouseover({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\"),pos:[z(a.value),s/2]})}).on(\"mousemove\",function(a){r.elementMousemove({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a){r.elementMouseout({value:a.value,label:a.label||\"Previous\",color:d3.select(this).style(\"fill\")})}),D.selectAll(\".nv-range\").on(\"mouseover\",function(a,b){var c=w[b]||(b?1==b?\"Mean\":\"Minimum\":\"Maximum\");r.elementMouseover({value:a,label:c,color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(){r.elementMousemove({value:v[0],label:y[0]||\"Previous\",color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){var c=w[b]||(b?1==b?\"Mean\":\"Minimum\":\"Maximum\");r.elementMouseout({value:a,label:c,color:d3.select(this).style(\"fill\")})})}),b}var c={top:0,right:0,bottom:0,left:0},d=\"left\",e=!1,f=function(a){return a.ranges},g=function(a){return a.markers?a.markers:[0]},h=function(a){return a.measures},i=function(a){return a.rangeLabels?a.rangeLabels:[]},j=function(a){return a.markerLabels?a.markerLabels:[]},k=function(a){return a.measureLabels?a.measureLabels:[]},l=[0],m=380,n=30,o=null,p=null,q=a.utils.getColor([\"#1f77b4\"]),r=d3.dispatch(\"elementMouseover\",\"elementMouseout\",\"elementMousemove\");return b.dispatch=r,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return f},set:function(a){f=a}},markers:{get:function(){return g},set:function(a){g=a}},measures:{get:function(){return h},set:function(a){h=a}},forceX:{get:function(){return l},set:function(a){l=a}},width:{get:function(){return m},set:function(a){m=a}},height:{get:function(){return n},set:function(a){n=a}},tickFormat:{get:function(){return p},set:function(a){p=a}},margin:{get:function(){return c},set:function(a){c.top=void 0!==a.top?a.top:c.top,c.right=void 0!==a.right?a.right:c.right,c.bottom=void 0!==a.bottom?a.bottom:c.bottom,c.left=void 0!==a.left?a.left:c.left}},orient:{get:function(){return d},set:function(a){d=a,e=\"right\"==d||\"bottom\"==d}},color:{get:function(){return q},set:function(b){q=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.bulletChart=function(){\"use strict\";function b(d){return d.each(function(e,o){var p=d3.select(this);a.utils.initSVG(p);var q=a.utils.availableWidth(k,p,g),r=l-g.top-g.bottom;if(b.update=function(){b(d)},b.container=this,!e||!h.call(this,e,o))return a.utils.noData(b,p),b;p.selectAll(\".nv-noData\").remove();var s=h.call(this,e,o).slice().sort(d3.descending),t=i.call(this,e,o).slice().sort(d3.descending),u=j.call(this,e,o).slice().sort(d3.descending),v=p.selectAll(\"g.nv-wrap.nv-bulletChart\").data([e]),w=v.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-bulletChart\"),x=w.append(\"g\"),y=v.select(\"g\");x.append(\"g\").attr(\"class\",\"nv-bulletWrap\"),x.append(\"g\").attr(\"class\",\"nv-titles\"),v.attr(\"transform\",\"translate(\"+g.left+\",\"+g.top+\")\");var z=d3.scale.linear().domain([0,Math.max(s[0],t[0],u[0])]).range(f?[q,0]:[0,q]),A=this.__chart__||d3.scale.linear().domain([0,1/0]).range(z.range());this.__chart__=z;var B=x.select(\".nv-titles\").append(\"g\").attr(\"text-anchor\",\"end\").attr(\"transform\",\"translate(-6,\"+(l-g.top-g.bottom)/2+\")\");B.append(\"text\").attr(\"class\",\"nv-title\").text(function(a){return a.title}),B.append(\"text\").attr(\"class\",\"nv-subtitle\").attr(\"dy\",\"1em\").text(function(a){return a.subtitle}),c.width(q).height(r);var C=y.select(\".nv-bulletWrap\");d3.transition(C).call(c);var D=m||z.tickFormat(q/100),E=y.selectAll(\"g.nv-tick\").data(z.ticks(n?n:q/50),function(a){return this.textContent||D(a)}),F=E.enter().append(\"g\").attr(\"class\",\"nv-tick\").attr(\"transform\",function(a){return\"translate(\"+A(a)+\",0)\"}).style(\"opacity\",1e-6);F.append(\"line\").attr(\"y1\",r).attr(\"y2\",7*r/6),F.append(\"text\").attr(\"text-anchor\",\"middle\").attr(\"dy\",\"1em\").attr(\"y\",7*r/6).text(D);var G=d3.transition(E).attr(\"transform\",function(a){return\"translate(\"+z(a)+\",0)\"}).style(\"opacity\",1);G.select(\"line\").attr(\"y1\",r).attr(\"y2\",7*r/6),G.select(\"text\").attr(\"y\",7*r/6),d3.transition(E.exit()).attr(\"transform\",function(a){return\"translate(\"+z(a)+\",0)\"}).style(\"opacity\",1e-6).remove()}),d3.timer.flush(),b}var c=a.models.bullet(),d=a.models.tooltip(),e=\"left\",f=!1,g={top:5,right:40,bottom:20,left:120},h=function(a){return a.ranges},i=function(a){return a.markers?a.markers:[0]},j=function(a){return a.measures},k=null,l=55,m=null,n=null,o=null,p=d3.dispatch(\"tooltipShow\",\"tooltipHide\");return d.duration(0).headerEnabled(!1),c.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:a.label,value:a.value,color:a.color},d.data(a).hidden(!1)}),c.dispatch.on(\"elementMouseout.tooltip\",function(){d.hidden(!0)}),c.dispatch.on(\"elementMousemove.tooltip\",function(){d.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.bullet=c,b.dispatch=p,b.tooltip=d,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return h},set:function(a){h=a}},markers:{get:function(){return i},set:function(a){i=a}},measures:{get:function(){return j},set:function(a){j=a}},width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},tickFormat:{get:function(){return m},set:function(a){m=a}},ticks:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return o},set:function(a){o=a}},tooltips:{get:function(){return d.enabled()},set:function(b){a.deprecated(\"tooltips\",\"use chart.tooltip.enabled() instead\"),d.enabled(!!b)}},tooltipContent:{get:function(){return d.contentGenerator()},set:function(b){a.deprecated(\"tooltipContent\",\"use chart.tooltip.contentGenerator() instead\"),d.contentGenerator(b)}},margin:{get:function(){return g},set:function(a){g.top=void 0!==a.top?a.top:g.top,g.right=void 0!==a.right?a.right:g.right,g.bottom=void 0!==a.bottom?a.bottom:g.bottom,g.left=void 0!==a.left?a.left:g.left}},orient:{get:function(){return e},set:function(a){e=a,f=\"right\"==e||\"bottom\"==e}}}),a.utils.inheritOptions(b,c),a.utils.initOptions(b),b},a.models.candlestickBar=function(){\"use strict\";function b(x){return x.each(function(b){c=d3.select(this);var x=a.utils.availableWidth(i,c,h),y=a.utils.availableHeight(j,c,h);a.utils.initSVG(c);var A=x/b[0].values.length*.45;l.domain(d||d3.extent(b[0].values.map(n).concat(t))),l.range(v?f||[.5*x/b[0].values.length,x*(b[0].values.length-.5)/b[0].values.length]:f||[5+A/2,x-A/2-5]),m.domain(e||[d3.min(b[0].values.map(s).concat(u)),d3.max(b[0].values.map(r).concat(u))]).range(g||[y,0]),l.domain()[0]===l.domain()[1]&&l.domain(l.domain()[0]?[l.domain()[0]-.01*l.domain()[0],l.domain()[1]+.01*l.domain()[1]]:[-1,1]),m.domain()[0]===m.domain()[1]&&m.domain(m.domain()[0]?[m.domain()[0]+.01*m.domain()[0],m.domain()[1]-.01*m.domain()[1]]:[-1,1]);var B=d3.select(this).selectAll(\"g.nv-wrap.nv-candlestickBar\").data([b[0].values]),C=B.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-candlestickBar\"),D=C.append(\"defs\"),E=C.append(\"g\"),F=B.select(\"g\");E.append(\"g\").attr(\"class\",\"nv-ticks\"),B.attr(\"transform\",\"translate(\"+h.left+\",\"+h.top+\")\"),c.on(\"click\",function(a,b){z.chartClick({data:a,index:b,pos:d3.event,id:k})}),D.append(\"clipPath\").attr(\"id\",\"nv-chart-clip-path-\"+k).append(\"rect\"),B.select(\"#nv-chart-clip-path-\"+k+\" rect\").attr(\"width\",x).attr(\"height\",y),F.attr(\"clip-path\",w?\"url(#nv-chart-clip-path-\"+k+\")\":\"\");var G=B.select(\".nv-ticks\").selectAll(\".nv-tick\").data(function(a){return a});G.exit().remove();{var H=G.enter().append(\"g\").attr(\"class\",function(a,b,c){return(p(a,b)>q(a,b)?\"nv-tick negative\":\"nv-tick positive\")+\" nv-tick-\"+c+\"-\"+b});H.append(\"line\").attr(\"class\",\"nv-candlestick-lines\").attr(\"transform\",function(a,b){return\"translate(\"+l(n(a,b))+\",0)\"}).attr(\"x1\",0).attr(\"y1\",function(a,b){return m(r(a,b))}).attr(\"x2\",0).attr(\"y2\",function(a,b){return m(s(a,b))}),H.append(\"rect\").attr(\"class\",\"nv-candlestick-rects nv-bars\").attr(\"transform\",function(a,b){return\"translate(\"+(l(n(a,b))-A/2)+\",\"+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+\")\"}).attr(\"x\",0).attr(\"y\",0).attr(\"width\",A).attr(\"height\",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}c.selectAll(\".nv-candlestick-lines\").transition().attr(\"transform\",function(a,b){return\"translate(\"+l(n(a,b))+\",0)\"}).attr(\"x1\",0).attr(\"y1\",function(a,b){return m(r(a,b))}).attr(\"x2\",0).attr(\"y2\",function(a,b){return m(s(a,b))}),c.selectAll(\".nv-candlestick-rects\").transition().attr(\"transform\",function(a,b){return\"translate(\"+(l(n(a,b))-A/2)+\",\"+(m(o(a,b))-(p(a,b)>q(a,b)?m(q(a,b))-m(p(a,b)):0))+\")\"}).attr(\"x\",0).attr(\"y\",0).attr(\"width\",A).attr(\"height\",function(a,b){var c=p(a,b),d=q(a,b);return c>d?m(d)-m(c):m(c)-m(d)})}),b}var c,d,e,f,g,h={top:0,right:0,bottom:0,left:0},i=null,j=null,k=Math.floor(1e4*Math.random()),l=d3.scale.linear(),m=d3.scale.linear(),n=function(a){return a.x},o=function(a){return a.y},p=function(a){return a.open},q=function(a){return a.close},r=function(a){return a.high},s=function(a){return a.low},t=[],u=[],v=!1,w=!0,x=a.utils.defaultColor(),y=!1,z=d3.dispatch(\"tooltipShow\",\"tooltipHide\",\"stateChange\",\"changeState\",\"renderEnd\",\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\");return b.highlightPoint=function(a,d){b.clearHighlights(),c.select(\".nv-candlestickBar .nv-tick-0-\"+a).classed(\"hover\",d)},b.clearHighlights=function(){c.select(\".nv-candlestickBar .nv-tick.hover\").classed(\"hover\",!1)},b.dispatch=z,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return i},set:function(a){i=a}},height:{get:function(){return j},set:function(a){j=a}},xScale:{get:function(){return l},set:function(a){l=a}},yScale:{get:function(){return m},set:function(a){m=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},forceX:{get:function(){return t},set:function(a){t=a}},forceY:{get:function(){return u},set:function(a){u=a}},padData:{get:function(){return v},set:function(a){v=a}},clipEdge:{get:function(){return w},set:function(a){w=a}},id:{get:function(){return k},set:function(a){k=a}},interactive:{get:function(){return y},set:function(a){y=a}},x:{get:function(){return n},set:function(a){n=a}},y:{get:function(){return o},set:function(a){o=a}},open:{get:function(){return p()},set:function(a){p=a}},close:{get:function(){return q()},set:function(a){q=a}},high:{get:function(){return r},set:function(a){r=a}},low:{get:function(){return s},set:function(a){s=a}},margin:{get:function(){return h},set:function(a){h.top=void 0!=a.top?a.top:h.top,h.right=void 0!=a.right?a.right:h.right,h.bottom=void 0!=a.bottom?a.bottom:h.bottom,h.left=void 0!=a.left?a.left:h.left}},color:{get:function(){return x},set:function(b){x=a.utils.getColor(b)}}}),a.utils.initOptions(b),b},a.models.cumulativeLineChart=function(){\"use strict\";function b(l){return H.reset(),H.models(f),r&&H.models(g),s&&H.models(h),l.each(function(l){function A(){d3.select(b.container).style(\"cursor\",\"ew-resize\")}function E(){G.x=d3.event.x,G.i=Math.round(F.invert(G.x)),K()}function H(){d3.select(b.container).style(\"cursor\",\"auto\"),y.index=G.i,C.stateChange(y)}function K(){bb.data([G]);var a=b.duration();b.duration(0),b.update(),b.duration(a)}var L=d3.select(this);a.utils.initSVG(L),L.classed(\"nv-chart-\"+x,!0);var M=this,N=a.utils.availableWidth(o,L,m),O=a.utils.availableHeight(p,L,m);if(b.update=function(){0===D?L.call(b):L.transition().duration(D).call(b)},b.container=this,y.setter(J(l),b.update).getter(I(l)).update(),y.disabled=l.map(function(a){return!!a.disabled}),!z){var P;z={};for(P in y)z[P]=y[P]instanceof Array?y[P].slice(0):y[P]}var Q=d3.behavior.drag().on(\"dragstart\",A).on(\"drag\",E).on(\"dragend\",H);if(!(l&&l.length&&l.filter(function(a){return a.values.length}).length))return a.utils.noData(b,L),b;if(L.selectAll(\".nv-noData\").remove(),d=f.xScale(),e=f.yScale(),w)f.yDomain(null);else{var R=l.filter(function(a){return!a.disabled}).map(function(a){var b=d3.extent(a.values,f.y());return b[0]<-.95&&(b[0]=-.95),[(b[0]-b[1])/(1+b[1]),(b[1]-b[0])/(1+b[0])]}),S=[d3.min(R,function(a){return a[0]}),d3.max(R,function(a){return a[1]})];f.yDomain(S)}F.domain([0,l[0].values.length-1]).range([0,N]).clamp(!0);var l=c(G.i,l),T=v?\"none\":\"all\",U=L.selectAll(\"g.nv-wrap.nv-cumulativeLine\").data([l]),V=U.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-cumulativeLine\").append(\"g\"),W=U.select(\"g\");if(V.append(\"g\").attr(\"class\",\"nv-interactive\"),V.append(\"g\").attr(\"class\",\"nv-x nv-axis\").style(\"pointer-events\",\"none\"),V.append(\"g\").attr(\"class\",\"nv-y nv-axis\"),V.append(\"g\").attr(\"class\",\"nv-background\"),V.append(\"g\").attr(\"class\",\"nv-linesWrap\").style(\"pointer-events\",T),V.append(\"g\").attr(\"class\",\"nv-avgLinesWrap\").style(\"pointer-events\",\"none\"),V.append(\"g\").attr(\"class\",\"nv-legendWrap\"),V.append(\"g\").attr(\"class\",\"nv-controlsWrap\"),q&&(i.width(N),W.select(\".nv-legendWrap\").datum(l).call(i),m.top!=i.height()&&(m.top=i.height(),O=a.utils.availableHeight(p,L,m)),W.select(\".nv-legendWrap\").attr(\"transform\",\"translate(0,\"+-m.top+\")\")),u){var X=[{key:\"Re-scale y-axis\",disabled:!w}];j.width(140).color([\"#444\",\"#444\",\"#444\"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),W.select(\".nv-controlsWrap\").datum(X).attr(\"transform\",\"translate(0,\"+-m.top+\")\").call(j)}U.attr(\"transform\",\"translate(\"+m.left+\",\"+m.top+\")\"),t&&W.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+N+\",0)\");var Y=l.filter(function(a){return a.tempDisabled});U.select(\".tempDisabled\").remove(),Y.length&&U.append(\"text\").attr(\"class\",\"tempDisabled\").attr(\"x\",N/2).attr(\"y\",\"-.71em\").style(\"text-anchor\",\"end\").text(Y.map(function(a){return a.key}).join(\", \")+\" values cannot be calculated for this time period.\"),v&&(k.width(N).height(O).margin({left:m.left,top:m.top}).svgContainer(L).xScale(d),U.select(\".nv-interactive\").call(k)),V.select(\".nv-background\").append(\"rect\"),W.select(\".nv-background rect\").attr(\"width\",N).attr(\"height\",O),f.y(function(a){return a.display.y}).width(N).height(O).color(l.map(function(a,b){return a.color||n(a,b)}).filter(function(a,b){return!l[b].disabled&&!l[b].tempDisabled}));var Z=W.select(\".nv-linesWrap\").datum(l.filter(function(a){return!a.disabled&&!a.tempDisabled}));Z.call(f),l.forEach(function(a,b){a.seriesIndex=b});var $=l.filter(function(a){return!a.disabled&&!!B(a)}),_=W.select(\".nv-avgLinesWrap\").selectAll(\"line\").data($,function(a){return a.key}),ab=function(a){var b=e(B(a));return 0>b?0:b>O?O:b};_.enter().append(\"line\").style(\"stroke-width\",2).style(\"stroke-dasharray\",\"10,10\").style(\"stroke\",function(a){return f.color()(a,a.seriesIndex)}).attr(\"x1\",0).attr(\"x2\",N).attr(\"y1\",ab).attr(\"y2\",ab),_.style(\"stroke-opacity\",function(a){var b=e(B(a));return 0>b||b>O?0:1}).attr(\"x1\",0).attr(\"x2\",N).attr(\"y1\",ab).attr(\"y2\",ab),_.exit().remove();var bb=Z.selectAll(\".nv-indexLine\").data([G]);bb.enter().append(\"rect\").attr(\"class\",\"nv-indexLine\").attr(\"width\",3).attr(\"x\",-2).attr(\"fill\",\"red\").attr(\"fill-opacity\",.5).style(\"pointer-events\",\"all\").call(Q),bb.attr(\"transform\",function(a){return\"translate(\"+F(a.i)+\",0)\"}).attr(\"height\",O),r&&(g.scale(d)._ticks(a.utils.calcTicksX(N/70,l)).tickSize(-O,0),W.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+e.range()[0]+\")\"),W.select(\".nv-x.nv-axis\").call(g)),s&&(h.scale(e)._ticks(a.utils.calcTicksY(O/36,l)).tickSize(-N,0),W.select(\".nv-y.nv-axis\").call(h)),W.select(\".nv-background rect\").on(\"click\",function(){G.x=d3.mouse(this)[0],G.i=Math.round(F.invert(G.x)),y.index=G.i,C.stateChange(y),K()}),f.dispatch.on(\"elementClick\",function(a){G.i=a.pointIndex,G.x=F(G.i),y.index=G.i,C.stateChange(y),K()}),j.dispatch.on(\"legendClick\",function(a){a.disabled=!a.disabled,w=!a.disabled,y.rescaleY=w,C.stateChange(y),b.update()}),i.dispatch.on(\"stateChange\",function(a){for(var c in a)y[c]=a[c];C.stateChange(y),b.update()}),k.dispatch.on(\"elementMousemove\",function(c){f.clearHighlights();var d,e,i,j=[];if(l.filter(function(a,b){return a.seriesIndex=b,!a.disabled}).forEach(function(g,h){e=a.interactiveBisect(g.values,c.pointXValue,b.x()),f.highlightPoint(h,e,!0);var k=g.values[e];\"undefined\"!=typeof k&&(\"undefined\"==typeof d&&(d=k),\"undefined\"==typeof i&&(i=b.xScale()(b.x()(k,e))),j.push({key:g.key,value:b.y()(k,e),color:n(g,g.seriesIndex)}))}),j.length>2){var o=b.yScale().invert(c.mouseY),p=Math.abs(b.yScale().domain()[0]-b.yScale().domain()[1]),q=.03*p,r=a.nearestValueIndex(j.map(function(a){return a.value}),o,q);null!==r&&(j[r].highlight=!0)}var s=g.tickFormat()(b.x()(d,e),e);k.tooltip.position({left:i+m.left,top:c.mouseY+m.top}).chartContainer(M.parentNode).valueFormatter(function(a){return h.tickFormat()(a)}).data({value:s,series:j})(),k.renderGuideLine(i)}),k.dispatch.on(\"elementMouseout\",function(){f.clearHighlights()}),C.on(\"changeState\",function(a){\"undefined\"!=typeof a.disabled&&(l.forEach(function(b,c){b.disabled=a.disabled[c]}),y.disabled=a.disabled),\"undefined\"!=typeof a.index&&(G.i=a.index,G.x=F(G.i),y.index=a.index,bb.data([G])),\"undefined\"!=typeof a.rescaleY&&(w=a.rescaleY),b.update()})}),H.renderEnd(\"cumulativeLineChart immediate\"),b}function c(a,b){return K||(K=f.y()),b.map(function(b){if(!b.values)return b;var c=b.values[a];if(null==c)return b;var d=K(c,a);return-.95>d&&!E?(b.tempDisabled=!0,b):(b.tempDisabled=!1,b.values=b.values.map(function(a,b){return a.display={y:(K(a,b)-d)/(1+d)},a}),b)})}var d,e,f=a.models.line(),g=a.models.axis(),h=a.models.axis(),i=a.models.legend(),j=a.models.legend(),k=a.interactiveGuideline(),l=a.models.tooltip(),m={top:30,right:30,bottom:50,left:60},n=a.utils.defaultColor(),o=null,p=null,q=!0,r=!0,s=!0,t=!1,u=!0,v=!1,w=!0,x=f.id(),y=a.utils.state(),z=null,A=null,B=function(a){return a.average},C=d3.dispatch(\"stateChange\",\"changeState\",\"renderEnd\"),D=250,E=!1;y.index=0,y.rescaleY=w,g.orient(\"bottom\").tickPadding(7),h.orient(t?\"right\":\"left\"),l.valueFormatter(function(a,b){return h.tickFormat()(a,b)}).headerFormatter(function(a,b){return g.tickFormat()(a,b)}),j.updateState(!1);var F=d3.scale.linear(),G={i:0,x:0},H=a.utils.renderWatch(C,D),I=function(a){return function(){return{active:a.map(function(a){return!a.disabled}),index:G.i,rescaleY:w}}},J=function(a){return function(b){void 0!==b.index&&(G.i=b.index),void 0!==b.rescaleY&&(w=b.rescaleY),void 0!==b.active&&a.forEach(function(a,c){a.disabled=!b.active[c]})}};f.dispatch.on(\"elementMouseover.tooltip\",function(a){var c={x:b.x()(a.point),y:b.y()(a.point),color:a.point.color};a.point=c,l.data(a).position(a.pos).hidden(!1)}),f.dispatch.on(\"elementMouseout.tooltip\",function(){l.hidden(!0)});var K=null;return b.dispatch=C,b.lines=f,b.legend=i,b.controls=j,b.xAxis=g,b.yAxis=h,b.interactiveLayer=k,b.state=y,b.tooltip=l,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return o},set:function(a){o=a}},height:{get:function(){return p},set:function(a){p=a}},rescaleY:{get:function(){return w},set:function(a){w=a}},showControls:{get:function(){return u},set:function(a){u=a}},showLegend:{get:function(){return q},set:function(a){q=a}},average:{get:function(){return B},set:function(a){B=a}},defaultState:{get:function(){return z},set:function(a){z=a}},noData:{get:function(){return A},set:function(a){A=a}},showXAxis:{get:function(){return r},set:function(a){r=a}},showYAxis:{get:function(){return s},set:function(a){s=a}},noErrorCheck:{get:function(){return E},set:function(a){E=a}},tooltips:{get:function(){return l.enabled()},set:function(b){a.deprecated(\"tooltips\",\"use chart.tooltip.enabled() instead\"),l.enabled(!!b)}},tooltipContent:{get:function(){return l.contentGenerator()},set:function(b){a.deprecated(\"tooltipContent\",\"use chart.tooltip.contentGenerator() instead\"),l.contentGenerator(b)}},margin:{get:function(){return m},set:function(a){m.top=void 0!==a.top?a.top:m.top,m.right=void 0!==a.right?a.right:m.right,m.bottom=void 0!==a.bottom?a.bottom:m.bottom,m.left=void 0!==a.left?a.left:m.left}},color:{get:function(){return n},set:function(b){n=a.utils.getColor(b),i.color(n)}},useInteractiveGuideline:{get:function(){return v},set:function(a){v=a,a===!0&&(b.interactive(!1),b.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return t},set:function(a){t=a,h.orient(a?\"right\":\"left\")}},duration:{get:function(){return D},set:function(a){D=a,f.duration(D),g.duration(D),h.duration(D),H.reset(D)}}}),a.utils.inheritOptions(b,f),a.utils.initOptions(b),b},a.models.discreteBar=function(){\"use strict\";function b(m){return y.reset(),m.each(function(b){var m=k-j.left-j.right,x=l-j.top-j.bottom;c=d3.select(this),a.utils.initSVG(c),b.forEach(function(a,b){a.values.forEach(function(a){a.series=b})});var z=d&&e?[]:b.map(function(a){return a.values.map(function(a,b){return{x:p(a,b),y:q(a,b),y0:a.y0}})});n.domain(d||d3.merge(z).map(function(a){return a.x})).rangeBands(f||[0,m],.1),o.domain(e||d3.extent(d3.merge(z).map(function(a){return a.y}).concat(r))),o.range(t?g||[x-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]:g||[x,0]),h=h||n,i=i||o.copy().range([o(0),o(0)]);{var A=c.selectAll(\"g.nv-wrap.nv-discretebar\").data([b]),B=A.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-discretebar\"),C=B.append(\"g\");A.select(\"g\")}C.append(\"g\").attr(\"class\",\"nv-groups\"),A.attr(\"transform\",\"translate(\"+j.left+\",\"+j.top+\")\");var D=A.select(\".nv-groups\").selectAll(\".nv-group\").data(function(a){return a},function(a){return a.key});D.enter().append(\"g\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6),D.exit().watchTransition(y,\"discreteBar: exit groups\").style(\"stroke-opacity\",1e-6).style(\"fill-opacity\",1e-6).remove(),D.attr(\"class\",function(a,b){return\"nv-group nv-series-\"+b}).classed(\"hover\",function(a){return a.hover}),D.watchTransition(y,\"discreteBar: groups\").style(\"stroke-opacity\",1).style(\"fill-opacity\",.75);var E=D.selectAll(\"g.nv-bar\").data(function(a){return a.values});E.exit().remove();var F=E.enter().append(\"g\").attr(\"transform\",function(a,b){return\"translate(\"+(n(p(a,b))+.05*n.rangeBand())+\", \"+o(0)+\")\"}).on(\"mouseover\",function(a,b){d3.select(this).classed(\"hover\",!0),v.elementMouseover({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mouseout\",function(a,b){d3.select(this).classed(\"hover\",!1),v.elementMouseout({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"mousemove\",function(a,b){v.elementMousemove({data:a,index:b,color:d3.select(this).style(\"fill\")})}).on(\"click\",function(a,b){v.elementClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation()}).on(\"dblclick\",function(a,b){v.elementDblClick({data:a,index:b,color:d3.select(this).style(\"fill\")}),d3.event.stopPropagation()});F.append(\"rect\").attr(\"height\",0).attr(\"width\",.9*n.rangeBand()/b.length),t?(F.append(\"text\").attr(\"text-anchor\",\"middle\"),E.select(\"text\").text(function(a,b){return u(q(a,b))}).watchTransition(y,\"discreteBar: bars text\").attr(\"x\",.9*n.rangeBand()/2).attr(\"y\",function(a,b){return q(a,b)<0?o(q(a,b))-o(0)+12:-4})):E.selectAll(\"text\").remove(),E.attr(\"class\",function(a,b){return q(a,b)<0?\"nv-bar negative\":\"nv-bar positive\"}).style(\"fill\",function(a,b){return a.color||s(a,b)}).style(\"stroke\",function(a,b){return a.color||s(a,b)}).select(\"rect\").attr(\"class\",w).watchTransition(y,\"discreteBar: bars rect\").attr(\"width\",.9*n.rangeBand()/b.length),E.watchTransition(y,\"discreteBar: bars\").attr(\"transform\",function(a,b){var c=n(p(a,b))+.05*n.rangeBand(),d=q(a,b)<0?o(0):o(0)-o(q(a,b))<1?o(0)-1:o(q(a,b));return\"translate(\"+c+\", \"+d+\")\"}).select(\"rect\").attr(\"height\",function(a,b){return Math.max(Math.abs(o(q(a,b))-o(e&&e[0]||0))||1)}),h=n.copy(),i=o.copy()}),y.renderEnd(\"discreteBar immediate\"),b}var c,d,e,f,g,h,i,j={top:0,right:0,bottom:0,left:0},k=960,l=500,m=Math.floor(1e4*Math.random()),n=d3.scale.ordinal(),o=d3.scale.linear(),p=function(a){return a.x},q=function(a){return a.y},r=[0],s=a.utils.defaultColor(),t=!1,u=d3.format(\",.2f\"),v=d3.dispatch(\"chartClick\",\"elementClick\",\"elementDblClick\",\"elementMouseover\",\"elementMouseout\",\"elementMousemove\",\"renderEnd\"),w=\"discreteBar\",x=250,y=a.utils.renderWatch(v,x);return b.dispatch=v,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return k},set:function(a){k=a}},height:{get:function(){return l},set:function(a){l=a}},forceY:{get:function(){return r},set:function(a){r=a}},showValues:{get:function(){return t},set:function(a){t=a}},x:{get:function(){return p},set:function(a){p=a}},y:{get:function(){return q},set:function(a){q=a}},xScale:{get:function(){return n},set:function(a){n=a}},yScale:{get:function(){return o},set:function(a){o=a}},xDomain:{get:function(){return d},set:function(a){d=a}},yDomain:{get:function(){return e},set:function(a){e=a}},xRange:{get:function(){return f},set:function(a){f=a}},yRange:{get:function(){return g},set:function(a){g=a}},valueFormat:{get:function(){return u},set:function(a){u=a}},id:{get:function(){return m},set:function(a){m=a}},rectClass:{get:function(){return w},set:function(a){w=a}},margin:{get:function(){return j},set:function(a){j.top=void 0!==a.top?a.top:j.top,j.right=void 0!==a.right?a.right:j.right,j.bottom=void 0!==a.bottom?a.bottom:j.bottom,j.left=void 0!==a.left?a.left:j.left}},color:{get:function(){return s},set:function(b){s=a.utils.getColor(b)}},duration:{get:function(){return x},set:function(a){x=a,y.reset(x)}}}),a.utils.initOptions(b),b},a.models.discreteBarChart=function(){\"use strict\";function b(h){return t.reset(),t.models(e),m&&t.models(f),n&&t.models(g),h.each(function(h){var l=d3.select(this);a.utils.initSVG(l);var q=a.utils.availableWidth(j,l,i),t=a.utils.availableHeight(k,l,i);if(b.update=function(){r.beforeUpdate(),l.transition().duration(s).call(b)},b.container=this,!(h&&h.length&&h.filter(function(a){return a.values.length}).length))return a.utils.noData(b,l),b;l.selectAll(\".nv-noData\").remove(),c=e.xScale(),d=e.yScale().clamp(!0);var u=l.selectAll(\"g.nv-wrap.nv-discreteBarWithAxes\").data([h]),v=u.enter().append(\"g\").attr(\"class\",\"nvd3 nv-wrap nv-discreteBarWithAxes\").append(\"g\"),w=v.append(\"defs\"),x=u.select(\"g\");v.append(\"g\").attr(\"class\",\"nv-x nv-axis\"),v.append(\"g\").attr(\"class\",\"nv-y nv-axis\").append(\"g\").attr(\"class\",\"nv-zeroLine\").append(\"line\"),v.append(\"g\").attr(\"class\",\"nv-barsWrap\"),x.attr(\"transform\",\"translate(\"+i.left+\",\"+i.top+\")\"),o&&x.select(\".nv-y.nv-axis\").attr(\"transform\",\"translate(\"+q+\",0)\"),e.width(q).height(t);var y=x.select(\".nv-barsWrap\").datum(h.filter(function(a){return!a.disabled}));if(y.transition().call(e),w.append(\"clipPath\").attr(\"id\",\"nv-x-label-clip-\"+e.id()).append(\"rect\"),x.select(\"#nv-x-label-clip-\"+e.id()+\" rect\").attr(\"width\",c.rangeBand()*(p?2:1)).attr(\"height\",16).attr(\"x\",-c.rangeBand()/(p?1:2)),m){f.scale(c)._ticks(a.utils.calcTicksX(q/100,h)).tickSize(-t,0),x.select(\".nv-x.nv-axis\").attr(\"transform\",\"translate(0,\"+(d.range()[0]+(e.showValues()&&d.domain()[0]<0?16:0))+\")\"),x.select(\".nv-x.nv-axis\").call(f);\nvar z=x.select(\".nv-x.nv-axis\").selectAll(\"g\");p&&z.selectAll(\"text\").attr(\"transform\",function(a,b,c){return\"translate(0,\"+(c%2==0?\"5\":\"17\")+\")\"})}n&&(g.scale(d)._ticks(a.utils.calcTicksY(t/36,h)).tickSize(-q,0),x.select(\".nv-y.nv-axis\").call(g)),x.select(\".nv-zeroLine line\").attr(\"x1\",0).attr(\"x2\",q).attr(\"y1\",d(0)).attr(\"y2\",d(0))}),t.renderEnd(\"discreteBar chart immediate\"),b}var c,d,e=a.models.discreteBar(),f=a.models.axis(),g=a.models.axis(),h=a.models.tooltip(),i={top:15,right:10,bottom:50,left:60},j=null,k=null,l=a.utils.getColor(),m=!0,n=!0,o=!1,p=!1,q=null,r=d3.dispatch(\"beforeUpdate\",\"renderEnd\"),s=250;f.orient(\"bottom\").showMaxMin(!1).tickFormat(function(a){return a}),g.orient(o?\"right\":\"left\").tickFormat(d3.format(\",.1f\")),h.duration(0).headerEnabled(!1).valueFormatter(function(a,b){return g.tickFormat()(a,b)}).keyFormatter(function(a,b){return f.tickFormat()(a,b)});var t=a.utils.renderWatch(r,s);return e.dispatch.on(\"elementMouseover.tooltip\",function(a){a.series={key:b.x()(a.data),value:b.y()(a.data),color:a.color},h.data(a).hidden(!1)}),e.dispatch.on(\"elementMouseout.tooltip\",function(){h.hidden(!0)}),e.dispatch.on(\"elementMousemove.tooltip\",function(){h.position({top:d3.event.pageY,left:d3.event.pageX})()}),b.dispatch=r,b.discretebar=e,b.xAxis=f,b.yAxis=g,b.tooltip=h,b.options=a.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return j},set:function(a){j=a}},height:{get:function(){return k},set:function(a){k=a}},staggerLabels:{get:function(){return p},set:function(a){p=a}},showXAxis:{get:function(){return m},set:function(a){m=a}},showYAxis:{get:function(){return n},set:function(a){n=a}},noData:{get:function(){return q},set:function(a){q=a}},tooltips:{get:function(){return h.enabled()},set:function(b){a.deprecated(\"tooltips\",\"use chart.tooltip.enabled() instead\"),h.enabled(!!b)}},tooltipContent:{get:function(){return h.contentGenerator()},set:function(b){a.deprecated(\"tooltipContent\",\"use chart.tooltip.contentGenerator() instead\"),h.contentGenerator(b)}},margin:{get:function(){return i},set:function(a){i.top=void 0!==a.top?a.top:i.top,i.right=void 0!==a.right?a.right:i.right,i.bottom=void 0!==a.bottom?a.bottom:i.bottom,i.left=void 0!==a.left?a.left:i.left}},duration:{get:function(){return s},set:function(a){s=a,t.reset(s),e.duration(s),f.duration(s),g.duration(s)}},color:{get:function(){return l},set:function(b){l=a.utils.getColor(b),e.color(l)}},rightAlignYAxis:{get:function(){return o},set:function(a){o=a,g.orient(a?\"right\":\"left\")}}}),a.utils.inheritOptions(b,e),a.utils.initOptions(b),b},a.models.distribution=function(){\"use strict\";function b(k){return m.reset(),k.each(function(b){var k=(e-(\"x\"===g?d.left+d.right:d.top+d.bottom),\"x\"==g?\"y\":\"x\"),l=d3.select(this);a.utils.initSVG(l),c=c||j;var n=l.selectAll(\"g.nv-distribution\").data([b]),o=n.enter().append(\"g\").attr(\"class\",\"nvd3 nv-distribution\"),p=(o.append(\"g\"),n.select(\"g\"));n.attr(\"transform\",\"translate(\"+d.left+\",\"+d.top+\")\");var q=p.selectAll(\"g.nv-dist\").data(function(a){return a},function(a){return a.key});q.enter().append(\"g\"),q.attr(\"class\",function(a,b){return\"nv-dist nv-series-\"+b}).style(\"stroke\",function(a,b){return i(a,b)});var r=q.selectAll(\"line.nv-dist\"+g).data(function(a){return a.values});r.enter().append(\"line\").attr(g+\"1\",function(a,b){return c(h(a,b))}).attr(g+\"2\",function(a,b){return c(h(a,b))}),m.transition(q.exit().selectAll(\"line.nv-dist\"+g),\"dist exit\").attr(g+\"1\",function(a,b){return j(h(a,b))}).attr(g+\"2\",function(a,b){return j(h(a,b))}).style(\"stroke-opacity\",0).remove(),r.attr(\"class\",function(a,b){return\"nv-dist\"+g+\" nv-dist\"+g+\"-\"+b}).attr(k+\"1\",0).attr(k+\"2\",f),m.transition(r,\"dist\").attr(g+\"1\",function(a,b){return j(h(a,b))}).attr(g+\"2\",function(a,b){return j(h(a,b))}),c=j.copy()}),m.renderEnd(\"distribution immediate\"),b}var c,d={top:0,right:0,bottom:0,left:0},e=400,f=8,g=\"x\",h=function(a){return a[g]},i=a.utils.defaultColor(),j=d3.scale.linear(),k=250,l=d3.dispatch(\"renderEnd\"),m=a.utils.renderWatch(l,k);return b.options=a.utils.optionsFunc.bind(b),b.dispatch=l,b.margin=function(a){return arguments.length?(d.top=\"undefined\"!=typeof a.top?a.top:d.top,d.right=\"undefined\"!=typeof a.right?a.right:d.right,d.bottom=\"undefined\"!=typeof a.bottom?a.bottom:d.bottom,d.left=\"undefined\"!=typeof a.left?a.left:d.left,b):d},b.width=function(a){return arguments.length?(e=a,b):e},b.axis=function(a){return arguments.length?(g=a,b):g},b.size=function(a){return arguments.length?(f=a,b):f},b.getData=function(a){return arguments.length?(h=d3.functor(a),b):h},b.scale=function(a){return arguments.length?(j=a,b):j},b.color=function(c){return arguments.length?(i=a.utils.getColor(c),b):i},b.duration=function(a){return arguments.length?(k=a,m.reset(k),b):k},b},a.models.furiousLegend=function(){\"use strict\";function b(p){function q(a,b){return\"furious\"!=o?\"#000\":m?a.disengaged?g(a,b):\"#fff\":m?void 0:a.disabled?g(a,b):\"#fff\"}function r(a,b){return m&&\"furious\"==o?a.disengaged?\"#fff\":g(a,b):a.disabled?\"#fff\":g(a,b)}return p.each(function(b){var p=d-c.left-c.right,s=d3.select(this);a.utils.initSVG(s);var t=s.selectAll(\"g.nv-legend\").data([b]),u=(t.enter().append(\"g\").attr(\"class\",\"nvd3 nv-legend\").append(\"g\"),t.select(\"g\"));t.attr(\"transform\",\"translate(\"+c.left+\",\"+c.top+\")\");var v,w=u.selectAll(\".nv-series\").data(function(a){return\"furious\"!=o?a:a.filter(function(a){return m?!0:!a.disengaged})}),x=w.enter().append(\"g\").attr(\"class\",\"nv-series\");if(\"classic\"==o)x.append(\"circle\").style(\"stroke-width\",2).attr(\"class\",\"nv-legend-symbol\").attr(\"r\",5),v=w.select(\"circle\");else if(\"furious\"==o){x.append(\"rect\").style(\"stroke-width\",2).attr(\"class\",\"nv-legend-symbol\").attr(\"rx\",3).attr(\"ry\",3),v=w.select(\"rect\"),x.append(\"g\").attr(\"class\",\"nv-check-box\").property(\"innerHTML\",'