forked from mhemesath/r2d3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathr2d3.v2.min.js
21 lines (21 loc) · 205 KB
/
r2d3.v2.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
// └────────────────────────────────────────────────────────────────────┘ \\
// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\
// │ Eve 0.3.4 - JavaScript Events Library │ \\
// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\
// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\
// └──────────────────────────────────────────────────────────────────────────────────────┘ \\
(function(e){var t="0.3.4",n="hasOwnProperty",r=/[\.\/]/,i="*",s=function(){},o=function(e,t){return e-t},u,a,f={n:{}},l=function(e,t){var n=f,r=a,i=Array.prototype.slice.call(arguments,2),s=l.listeners(e),c=0,h=!1,p,d=[],v={},m=[],g=u,y=[];u=e,a=0;for(var b=0,w=s.length;b<w;b++)"zIndex"in s[b]&&(d.push(s[b].zIndex),s[b].zIndex<0&&(v[s[b].zIndex]=s[b]));d.sort(o);while(d[c]<0){p=v[d[c++]],m.push(p.apply(t,i));if(a)return a=r,m}for(b=0;b<w;b++){p=s[b];if("zIndex"in p)if(p.zIndex==d[c]){m.push(p.apply(t,i));if(a)break;do{c++,p=v[d[c]],p&&m.push(p.apply(t,i));if(a)break}while(p)}else v[p.zIndex]=p;else{m.push(p.apply(t,i));if(a)break}}return a=r,u=g,m.length?m:null};l.listeners=function(e){var t=e.split(r),n=f,s,o,u,a,l,c,h,p,d=[n],v=[];for(a=0,l=t.length;a<l;a++){p=[];for(c=0,h=d.length;c<h;c++){n=d[c].n,o=[n[t[a]],n[i]],u=2;while(u--)s=o[u],s&&(p.push(s),v=v.concat(s.f||[]))}d=p}return v},l.on=function(e,t){var n=e.split(r),i=f;for(var o=0,u=n.length;o<u;o++)i=i.n,!i[n[o]]&&(i[n[o]]={n:{}}),i=i[n[o]];i.f=i.f||[];for(o=0,u=i.f.length;o<u;o++)if(i.f[o]==t)return s;return i.f.push(t),function(e){+e==+e&&(t.zIndex=+e)}},l.stop=function(){a=1},l.nt=function(e){return e?(new RegExp("(?:\\.|\\/|^)"+e+"(?:\\.|\\/|$)")).test(u):u},l.off=l.unbind=function(e,t){var s=e.split(r),o,u,a,l,c,h,p,d=[f];for(l=0,c=s.length;l<c;l++)for(h=0;h<d.length;h+=a.length-2){a=[h,1],o=d[h].n;if(s[l]!=i)o[s[l]]&&a.push(o[s[l]]);else for(u in o)o[n](u)&&a.push(o[u]);d.splice.apply(d,a)}for(l=0,c=d.length;l<c;l++){o=d[l];while(o.n){if(t){if(o.f){for(h=0,p=o.f.length;h<p;h++)if(o.f[h]==t){o.f.splice(h,1);break}!o.f.length&&delete o.f}for(u in o.n)if(o.n[n](u)&&o.n[u].f){var v=o.n[u].f;for(h=0,p=v.length;h<p;h++)if(v[h]==t){v.splice(h,1);break}!v.length&&delete o.n[u].f}}else{delete o.f;for(u in o.n)o.n[n](u)&&o.n[u].f&&delete o.n[u].f}o=o.n}}},l.once=function(e,t){var n=function(){var r=t.apply(this,arguments);return l.unbind(e,n),r};return l.on(e,n)},l.version=t,l.toString=function(){return"You are running Eve "+t},typeof module!="undefined"&&module.exports?module.exports=l:typeof define!="undefined"?define("eve",[],function(){return l}):e.eve=l})(this),function(){function e(n){if(e.is(n,"function"))return t?n():eve.on("raphael.DOMload",n);if(e.is(n,O))return e._engine.create[h](e,n.splice(0,3+e.is(n[0],L))).add(n);var r=Array.prototype.slice.call(arguments,0);if(e.is(r[r.length-1],"function")){var i=r.pop();return t?i.call(e._engine.create[h](e,r)):eve.on("raphael.DOMload",function(){i.call(e._engine.create[h](e,r))})}return e._engine.create[h](e,arguments)}function ht(e){if(Object(e)!==e)return e;var t=new e.constructor;for(var n in e)e[o](n)&&(t[n]=ht(e[n]));return t}function wt(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Et(e,t,n){function r(){var i=Array.prototype.slice.call(arguments,0),s=i.join("␀"),u=r.cache=r.cache||{},a=r.count=r.count||[];return u[o](s)?(wt(a,s),n?n(u[s]):u[s]):(a.length>=1e3&&delete u[a.shift()],a.push(s),u[s]=e[h](t,i),n?n(u[s]):u[s])}return r}function xt(){return this.hex}function Tt(e,t){var n=[];for(var r=0,i=e.length;i-2*!t>r;r+=2){var s=[{x:+e[r-2],y:+e[r-1]},{x:+e[r],y:+e[r+1]},{x:+e[r+2],y:+e[r+3]},{x:+e[r+4],y:+e[r+5]}];t?r?i-4==r?s[3]={x:+e[0],y:+e[1]}:i-2==r&&(s[2]={x:+e[0],y:+e[1]},s[3]={x:+e[2],y:+e[3]}):s[0]={x:+e[i-2],y:+e[i-1]}:i-4==r?s[3]=s[2]:r||(s[0]={x:+e[r],y:+e[r+1]}),n.push(["C",(-s[0].x+6*s[1].x+s[2].x)/6,(-s[0].y+6*s[1].y+s[2].y)/6,(s[1].x+6*s[2].x-s[3].x)/6,(s[1].y+6*s[2].y-s[3].y)/6,s[2].x,s[2].y])}return n}function Ct(e,t,n,r,i){var s=-3*t+9*n-9*r+3*i,o=e*s+6*t-12*n+6*r;return e*o-3*t+3*n}function kt(e,t,n,r,i,s,o,u,a){a==null&&(a=1),a=a>1?1:a<0?0:a;var f=a/2,l=12,c=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0;for(var d=0;d<l;d++){var v=f*c[d]+f,m=Ct(v,e,n,i,o),g=Ct(v,t,r,s,u),y=m*m+g*g;p+=h[d]*S.sqrt(y)}return f*p}function Lt(e,t,n,r,i,s,o,u,a){if(a<0||kt(e,t,n,r,i,s,o,u)<a)return;var f=1,l=f/2,c=f-l,h,p=.01;h=kt(e,t,n,r,i,s,o,u,c);while(N(h-a)>p)l/=2,c+=(h<a?1:-1)*l,h=kt(e,t,n,r,i,s,o,u,c);return c}function At(e,t,n,r,i,s,o,u){if(x(e,n)<T(i,o)||T(e,n)>x(i,o)||x(t,r)<T(s,u)||T(t,r)>x(s,u))return;var a=(e*r-t*n)*(i-o)-(e-n)*(i*u-s*o),f=(e*r-t*n)*(s-u)-(t-r)*(i*u-s*o),l=(e-n)*(s-u)-(t-r)*(i-o);if(!l)return;var c=a/l,h=f/l,p=+c.toFixed(2),d=+h.toFixed(2);if(p<+T(e,n).toFixed(2)||p>+x(e,n).toFixed(2)||p<+T(i,o).toFixed(2)||p>+x(i,o).toFixed(2)||d<+T(t,r).toFixed(2)||d>+x(t,r).toFixed(2)||d<+T(s,u).toFixed(2)||d>+x(s,u).toFixed(2))return;return{x:c,y:h}}function Ot(e,t){return _t(e,t)}function Mt(e,t){return _t(e,t,1)}function _t(t,n,r){var i=e.bezierBBox(t),s=e.bezierBBox(n);if(!e.isBBoxIntersect(i,s))return r?0:[];var o=kt.apply(0,t),u=kt.apply(0,n),a=~~(o/5),f=~~(u/5),l=[],c=[],h={},p=r?0:[];for(var d=0;d<a+1;d++){var v=e.findDotsAtSegment.apply(e,t.concat(d/a));l.push({x:v.x,y:v.y,t:d/a})}for(d=0;d<f+1;d++)v=e.findDotsAtSegment.apply(e,n.concat(d/f)),c.push({x:v.x,y:v.y,t:d/f});for(d=0;d<a;d++)for(var m=0;m<f;m++){var g=l[d],y=l[d+1],b=c[m],w=c[m+1],E=N(y.x-g.x)<.001?"y":"x",S=N(w.x-b.x)<.001?"y":"x",x=At(g.x,g.y,y.x,y.y,b.x,b.y,w.x,w.y);if(x){if(h[x.x.toFixed(4)]==x.y.toFixed(4))continue;h[x.x.toFixed(4)]=x.y.toFixed(4);var T=g.t+N((x[E]-g[E])/(y[E]-g[E]))*(y.t-g.t),C=b.t+N((x[S]-b[S])/(w[S]-b[S]))*(w.t-b.t);T>=0&&T<=1&&C>=0&&C<=1&&(r?p++:p.push({x:x.x,y:x.y,t1:T,t2:C}))}}return p}function Dt(t,n,r){t=e._path2curve(t),n=e._path2curve(n);var i,s,o,u,a,f,l,c,h,p,d=r?0:[];for(var v=0,m=t.length;v<m;v++){var g=t[v];if(g[0]=="M")i=a=g[1],s=f=g[2];else{g[0]=="C"?(h=[i,s].concat(g.slice(1)),i=h[6],s=h[7]):(h=[i,s,i,s,a,f,a,f],i=a,s=f);for(var y=0,b=n.length;y<b;y++){var w=n[y];if(w[0]=="M")o=l=w[1],u=c=w[2];else{w[0]=="C"?(p=[o,u].concat(w.slice(1)),o=p[6],u=p[7]):(p=[o,u,o,u,l,c,l,c],o=l,u=c);var E=_t(h,p,r);if(r)d+=E;else{for(var S=0,x=E.length;S<x;S++)E[S].segment1=v,E[S].segment2=y,E[S].bez1=h,E[S].bez2=p;d=d.concat(E)}}}}}return d}function tn(e,t,n,r,i,s){e!=null?(this.a=+e,this.b=+t,this.c=+n,this.d=+r,this.e=+i,this.f=+s):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function mn(){return this.x+m+this.y}function gn(){return this.x+m+this.y+m+this.width+" × "+this.height}function An(e,t,n,r,i,s){function h(e){return((a*e+u)*e+o)*e}function p(e,t){var n=d(e,t);return((c*n+l)*n+f)*n}function d(e,t){var n,r,i,s,f,l;for(i=e,l=0;l<8;l++){s=h(i)-e;if(N(s)<t)return i;f=(3*a*i+2*u)*i+o;if(N(f)<1e-6)break;i-=s/f}n=0,r=1,i=e;if(i<n)return n;if(i>r)return r;while(n<r){s=h(i);if(N(s-e)<t)return i;e>s?n=i:r=i,i=(r-n)/2+n}return i}var o=3*t,u=3*(r-t)-o,a=1-o-u,f=3*n,l=3*(i-n)-f,c=1-f-l;return p(e,1/(200*s))}function On(e,t){var n=[],r={};this.ms=t,this.times=1;if(e){for(var i in e)e[o](i)&&(r[U(i)]=e[i],n.push(U(i)));n.sort(rt)}this.anim=r,this.top=n[n.length-1],this.percents=n}function Mn(t,r,i,s,u,a){i=U(i);var f,l,c,h=[],d,v,m,b=t.ms,w={},E={},S={};if(s)for(T=0,N=Nn.length;T<N;T++){var x=Nn[T];if(x.el.id==r.id&&x.anim==t){x.percent!=i?(Nn.splice(T,1),c=1):l=x,r.attr(x.totalOrigin);break}}else s=+E;for(var T=0,N=t.percents.length;T<N;T++){if(t.percents[T]==i||t.percents[T]>s*t.top){i=t.percents[T],v=t.percents[T-1]||0,b=b/t.top*(i-v),d=t.percents[T+1],f=t.anim[i];break}s&&r.attr(t.anim[t.percents[T]])}if(!f)return;if(!l){for(var C in f)if(f[o](C))if(V[o](C)||r.paper.customAttributes[o](C)){w[C]=r.attr(C),w[C]==null&&(w[C]=X[C]),E[C]=f[C];switch(V[C]){case L:S[C]=(E[C]-w[C])/b;break;case"colour":w[C]=e.getRGB(w[C]);var k=e.getRGB(E[C]);S[C]={r:(k.r-w[C].r)/b,g:(k.g-w[C].g)/b,b:(k.b-w[C].b)/b};break;case"path":var A=zt(w[C],E[C]),O=A[1];w[C]=A[0],S[C]=[];for(T=0,N=w[C].length;T<N;T++){S[C][T]=[0];for(var M=1,_=w[C][T].length;M<_;M++)S[C][T][M]=(O[T][M]-w[C][T][M])/b}break;case"transform":var D=r._,P=en(D[C],E[C]);if(P){w[C]=P.from,E[C]=P.to,S[C]=[],S[C].real=!0;for(T=0,N=w[C].length;T<N;T++){S[C][T]=[w[C][T][0]];for(M=1,_=w[C][T].length;M<_;M++)S[C][T][M]=(E[C][T][M]-w[C][T][M])/b}}else{var H=r.matrix||new tn,B={_:{transform:D.transform},getBBox:function(){return r.getBBox(1)}};w[C]=[H.a,H.b,H.c,H.d,H.e,H.f],Yt(B,E[C]),E[C]=B._.transform,S[C]=[(B.matrix.a-H.a)/b,(B.matrix.b-H.b)/b,(B.matrix.c-H.c)/b,(B.matrix.d-H.d)/b,(B.matrix.e-H.e)/b,(B.matrix.f-H.f)/b]}break;case"csv":var j=g(f[C])[y](n),F=g(w[C])[y](n);if(C=="clip-rect"){w[C]=F,S[C]=[],T=F.length;while(T--)S[C][T]=(j[T]-w[C][T])/b}E[C]=j;break;default:j=[][p](f[C]),F=[][p](w[C]),S[C]=[],T=r.paper.customAttributes[C].length;while(T--)S[C][T]=((j[T]||0)-(F[T]||0))/b}}var q=f.easing,R=e.easing_formulas[q];if(!R){R=g(q).match(I);if(R&&R.length==5){var z=R;R=function(e){return An(e,+z[1],+z[2],+z[3],+z[4],b)}}else R=st}m=f.start||t.start||+(new Date),x={anim:t,percent:i,timestamp:m,start:m+(t.del||0),status:0,initstatus:s||0,stop:!1,ms:b,easing:R,from:w,diff:S,to:E,el:r,callback:f.callback,prev:v,next:d,repeat:a||t.times,origin:r.attr(),totalOrigin:u},Nn.push(x);if(s&&!l&&!c){x.stop=!0,x.start=new Date-b*s;if(Nn.length==1)return kn()}c&&(x.start=new Date-x.ms*s),Nn.length==1&&Cn(kn)}else l.initstatus=s,l.start=new Date-l.ms*s;eve("raphael.anim.start."+r.id,r,t)}function _n(e){for(var t=0;t<Nn.length;t++)Nn[t].el.paper==e&&Nn.splice(t--,1)}e.version="2.1.0",e.eve=eve;var t,n=/[, ]+/,r={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},i=/\{(\d+)\}/g,s="prototype",o="hasOwnProperty",u={doc:document,win:window},a={was:Object.prototype[o].call(u.win,"Raphael"),is:u.win.Raphael},f=function(){this.ca=this.customAttributes={}},l,c="appendChild",h="apply",p="concat",d="createTouch"in u.doc,v="",m=" ",g=String,y="split",b="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[y](m),w={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},E=g.prototype.toLowerCase,S=Math,x=S.max,T=S.min,N=S.abs,C=S.pow,k=S.PI,L="number",A="string",O="array",M="toString",_="fill",D=Object.prototype.toString,P={},H="push",B=e._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,j=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,F={NaN:1,Infinity:1,"-Infinity":1},I=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,q=S.round,R="setAttribute",U=parseFloat,z=parseInt,W=g.prototype.toUpperCase,X=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},V=e._availableAnimAttrs={blur:L,"clip-rect":"csv",cx:L,cy:L,fill:"colour","fill-opacity":L,"font-size":L,height:L,opacity:L,path:"path",r:L,rx:L,ry:L,stroke:"colour","stroke-opacity":L,"stroke-width":L,transform:"transform",width:L,x:L,y:L},$=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,J=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,K={hs:1,rg:1},Q=/,?([achlmqrstvxz]),?/gi,G=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,Y=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,Z=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,et=e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,tt={},nt=function(e,t){return e.key-t.key},rt=function(e,t){return U(e)-U(t)},it=function(){},st=function(e){return e},ot=e._rectPath=function(e,t,n,r,i){return i?[["M",e+i,t],["l",n-i*2,0],["a",i,i,0,0,1,i,i],["l",0,r-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-n,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",e,t],["l",n,0],["l",0,r],["l",-n,0],["z"]]},ut=function(e,t,n,r){return r==null&&(r=n),[["M",e,t],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]]},at=e._getPath={path:function(e){return e.attr("path")},circle:function(e){var t=e.attrs;return ut(t.cx,t.cy,t.r)},ellipse:function(e){var t=e.attrs;return ut(t.cx,t.cy,t.rx,t.ry)},rect:function(e){var t=e.attrs;return ot(t.x,t.y,t.width,t.height,t.r)},image:function(e){var t=e.attrs;return ot(t.x,t.y,t.width,t.height)},text:function(e){var t=e._getBBox();return ot(t.x,t.y,t.width,t.height)}},ft=e.mapPath=function(e,t){if(!t)return e;var n,r,i,s,o,u,a;e=zt(e);for(i=0,o=e.length;i<o;i++){a=e[i];for(s=1,u=a.length;s<u;s+=2)n=t.x(a[s],a[s+1]),r=t.y(a[s],a[s+1]),a[s]=n,a[s+1]=r}return e};e._g=u,e.type=u.win.SVGAngle||u.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(e.type=="VML"){var lt=u.doc.createElement("div"),ct;lt.innerHTML='<v:shape adj="1"/>',ct=lt.firstChild,ct.style.behavior="url(#default#VML)";if(!ct||typeof ct.adj!="object")return e.type=v;lt=null}e.svg=!(e.vml=e.type=="VML"),e._Paper=f,e.fn=l=f.prototype=e.prototype,e._id=0,e._oid=0,e.is=function(e,t){return t=E.call(t),t=="finite"?!F[o](+e):t=="array"?e instanceof Array:t=="null"&&e===null||t==typeof e&&e!==null||t=="object"&&e===Object(e)||t=="array"&&Array.isArray&&Array.isArray(e)||D.call(e).slice(8,-1).toLowerCase()==t},e.angle=function(t,n,r,i,s,o){if(s==null){var u=t-r,a=n-i;return!u&&!a?0:(180+S.atan2(-a,-u)*180/k+360)%360}return e.angle(t,n,s,o)-e.angle(r,i,s,o)},e.rad=function(e){return e%360*k/180},e.deg=function(e){return e*180/k%360},e.snapTo=function(t,n,r){r=e.is(r,"finite")?r:10;if(e.is(t,O)){var i=t.length;while(i--)if(N(t[i]-n)<=r)return t[i]}else{t=+t;var s=n%t;if(s<r)return n-s;if(s>t-r)return n-s+t}return n};var pt=e.createUUID=function(e,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(e,t).toUpperCase()}}(/[xy]/g,function(e){var t=S.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)});e.setWindow=function(t){eve("raphael.setWindow",e,u.win,t),u.win=t,u.doc=u.win.document,e._engine.initWin&&e._engine.initWin(u.win)};var dt=function(t){if(e.vml){var n=/^\s+|\s+$/g,r;try{var i=new ActiveXObject("htmlfile");i.write("<body>"),i.close(),r=i.body}catch(s){r=createPopup().document.body}var o=r.createTextRange();dt=Et(function(e){try{r.style.color=g(e).replace(n,v);var t=o.queryCommandValue("ForeColor");return t=(t&255)<<16|t&65280|(t&16711680)>>>16,"#"+("000000"+t.toString(16)).slice(-6)}catch(i){return"none"}})}else{var a=u.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",u.doc.body.appendChild(a),dt=Et(function(e){return a.style.color=e,u.doc.defaultView.getComputedStyle(a,v).getPropertyValue("color")})}return dt(t)},vt=function(){return"hsb("+[this.h,this.s,this.b]+")"},mt=function(){return"hsl("+[this.h,this.s,this.l]+")"},gt=function(){return this.hex},yt=function(t,n,r){n==null&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,n=t.g,t=t.r);if(n==null&&e.is(t,A)){var i=e.getRGB(t);t=i.r,n=i.g,r=i.b}if(t>1||n>1||r>1)t/=255,n/=255,r/=255;return[t,n,r]},bt=function(t,n,r,i){t*=255,n*=255,r*=255;var s={r:t,g:n,b:r,hex:e.rgb(t,n,r),toString:gt};return e.is(i,"finite")&&(s.opacity=i),s};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=gt,t},e.hsb2rgb=function(e,t,n,r){this.is(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(n=e.b,t=e.s,e=e.h,r=e.o),e*=360;var i,s,o,u,a;return e=e%360/60,a=n*t,u=a*(1-N(e%2-1)),i=s=o=n-a,e=~~e,i+=[a,u,0,0,u,a][e],s+=[u,a,a,u,0,0][e],o+=[0,0,u,a,a,u][e],bt(i,s,o,r)},e.hsl2rgb=function(e,t,n,r){this.is(e,"object")&&"h"in e&&"s"in e&&"l"in e&&(n=e.l,t=e.s,e=e.h);if(e>1||t>1||n>1)e/=360,t/=100,n/=100;e*=360;var i,s,o,u,a;return e=e%360/60,a=2*t*(n<.5?n:1-n),u=a*(1-N(e%2-1)),i=s=o=n-a/2,e=~~e,i+=[a,u,0,0,u,a][e],s+=[u,a,a,u,0,0][e],o+=[0,0,u,a,a,u][e],bt(i,s,o,r)},e.rgb2hsb=function(e,t,n){n=yt(e,t,n),e=n[0],t=n[1],n=n[2];var r,i,s,o;return s=x(e,t,n),o=s-T(e,t,n),r=o==0?null:s==e?(t-n)/o:s==t?(n-e)/o+2:(e-t)/o+4,r=(r+360)%6*60/360,i=o==0?0:o/s,{h:r,s:i,b:s,toString:vt}},e.rgb2hsl=function(e,t,n){n=yt(e,t,n),e=n[0],t=n[1],n=n[2];var r,i,s,o,u,a;return o=x(e,t,n),u=T(e,t,n),a=o-u,r=a==0?null:o==e?(t-n)/a:o==t?(n-e)/a+2:(e-t)/a+4,r=(r+360)%6*60/360,s=(o+u)/2,i=a==0?0:s<.5?a/(2*s):a/(2-2*s),{h:r,s:i,l:s,toString:mt}},e._path2string=function(){return this.join(",").replace(Q,"$1")};var St=e._preload=function(e,t){var n=u.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){t.call(this),this.onload=null,u.doc.body.removeChild(this)},n.onerror=function(){u.doc.body.removeChild(this)},u.doc.body.appendChild(n),n.src=e};e.getRGB=Et(function(t){if(!t||!!((t=g(t)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:xt};if(t=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:xt};!K[o](t.toLowerCase().substring(0,2))&&t.charAt()!="#"&&(t=dt(t));var n,r,i,s,u,a,f,l=t.match(j);return l?(l[2]&&(s=z(l[2].substring(5),16),i=z(l[2].substring(3,5),16),r=z(l[2].substring(1,3),16)),l[3]&&(s=z((a=l[3].charAt(3))+a,16),i=z((a=l[3].charAt(2))+a,16),r=z((a=l[3].charAt(1))+a,16)),l[4]&&(f=l[4][y](J),r=U(f[0]),f[0].slice(-1)=="%"&&(r*=2.55),i=U(f[1]),f[1].slice(-1)=="%"&&(i*=2.55),s=U(f[2]),f[2].slice(-1)=="%"&&(s*=2.55),l[1].toLowerCase().slice(0,4)=="rgba"&&(u=U(f[3])),f[3]&&f[3].slice(-1)=="%"&&(u/=100)),l[5]?(f=l[5][y](J),r=U(f[0]),f[0].slice(-1)=="%"&&(r*=2.55),i=U(f[1]),f[1].slice(-1)=="%"&&(i*=2.55),s=U(f[2]),f[2].slice(-1)=="%"&&(s*=2.55),(f[0].slice(-3)=="deg"||f[0].slice(-1)=="°")&&(r/=360),l[1].toLowerCase().slice(0,4)=="hsba"&&(u=U(f[3])),f[3]&&f[3].slice(-1)=="%"&&(u/=100),e.hsb2rgb(r,i,s,u)):l[6]?(f=l[6][y](J),r=U(f[0]),f[0].slice(-1)=="%"&&(r*=2.55),i=U(f[1]),f[1].slice(-1)=="%"&&(i*=2.55),s=U(f[2]),f[2].slice(-1)=="%"&&(s*=2.55),(f[0].slice(-3)=="deg"||f[0].slice(-1)=="°")&&(r/=360),l[1].toLowerCase().slice(0,4)=="hsla"&&(u=U(f[3])),f[3]&&f[3].slice(-1)=="%"&&(u/=100),e.hsl2rgb(r,i,s,u)):(l={r:r,g:i,b:s,toString:xt},l.hex="#"+(16777216|s|i<<8|r<<16).toString(16).slice(1),e.is(u,"finite")&&(l.opacity=u),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:xt}},e),e.hsb=Et(function(t,n,r){return e.hsb2rgb(t,n,r).hex}),e.hsl=Et(function(t,n,r){return e.hsl2rgb(t,n,r).hex}),e.rgb=Et(function(e,t,n){return"#"+(16777216|n|t<<8|e<<16).toString(16).slice(1)}),e.getColor=function(e){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||.75},n=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=Nt(t);if(n.arr)return Ht(n.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return e.is(t,O)&&e.is(t[0],O)&&(i=Ht(t)),i.length||g(t).replace(G,function(e,t,n){var s=[],o=t.toLowerCase();n.replace(Z,function(e,t){t&&s.push(+t)}),o=="m"&&s.length>2&&(i.push([t][p](s.splice(0,2))),o="l",t=t=="m"?"l":"L");if(o=="r")i.push([t][p](s));else while(s.length>=r[o]){i.push([t][p](s.splice(0,r[o])));if(!r[o])break}}),i.toString=e._path2string,n.arr=Ht(i),i},e.parseTransformString=Et(function(t){if(!t)return null;var n={r:3,s:4,t:2,m:6},r=[];return e.is(t,O)&&e.is(t[0],O)&&(r=Ht(t)),r.length||g(t).replace(Y,function(e,t,n){var i=[],s=E.call(t);n.replace(Z,function(e,t){t&&i.push(+t)}),r.push([t][p](i))}),r.toString=e._path2string,r});var Nt=function(e){var t=Nt.ps=Nt.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)t[o](n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]};e.findDotsAtSegment=function(e,t,n,r,i,s,o,u,a){var f=1-a,l=C(f,3),c=C(f,2),h=a*a,p=h*a,d=l*e+c*3*a*n+f*3*a*a*i+p*o,v=l*t+c*3*a*r+f*3*a*a*s+p*u,m=e+2*a*(n-e)+h*(i-2*n+e),g=t+2*a*(r-t)+h*(s-2*r+t),y=n+2*a*(i-n)+h*(o-2*i+n),b=r+2*a*(s-r)+h*(u-2*s+r),w=f*e+a*n,E=f*t+a*r,x=f*i+a*o,T=f*s+a*u,N=90-S.atan2(m-y,g-b)*180/k;return(m>y||g<b)&&(N+=180),{x:d,y:v,m:{x:m,y:g},n:{x:y,y:b},start:{x:w,y:E},end:{x:x,y:T},alpha:N}},e.bezierBBox=function(t,n,r,i,s,o,u,a){e.is(t,"array")||(t=[t,n,r,i,s,o,u,a]);var f=Ut.apply(null,t);return{x:f.min.x,y:f.min.y,x2:f.max.x,y2:f.max.y,width:f.max.x-f.min.x,height:f.max.y-f.min.y}},e.isPointInsideBBox=function(e,t,n){return t>=e.x&&t<=e.x2&&n>=e.y&&n<=e.y2},e.isBBoxIntersect=function(t,n){var r=e.isPointInsideBBox;return r(n,t.x,t.y)||r(n,t.x2,t.y)||r(n,t.x,t.y2)||r(n,t.x2,t.y2)||r(t,n.x,n.y)||r(t,n.x2,n.y)||r(t,n.x,n.y2)||r(t,n.x2,n.y2)||(t.x<n.x2&&t.x>n.x||n.x<t.x2&&n.x>t.x)&&(t.y<n.y2&&t.y>n.y||n.y<t.y2&&n.y>t.y)},e.pathIntersection=function(e,t){return Dt(e,t)},e.pathIntersectionNumber=function(e,t){return Dt(e,t,1)},e.isPointInsidePath=function(t,n,r){var i=e.pathBBox(t);return e.isPointInsideBBox(i,n,r)&&Dt(t,[["M",n,r],["H",i.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Pt=e.pathBBox=function(e){var t=Nt(e);if(t.bbox)return t.bbox;if(!e)return{x:0,y:0,width:0,height:0,x2:0,y2:0};e=zt(e);var n=0,r=0,i=[],s=[],o;for(var u=0,a=e.length;u<a;u++){o=e[u];if(o[0]=="M")n=o[1],r=o[2],i.push(n),s.push(r);else{var f=Ut(n,r,o[1],o[2],o[3],o[4],o[5],o[6]);i=i[p](f.min.x,f.max.x),s=s[p](f.min.y,f.max.y),n=o[5],r=o[6]}}var l=T[h](0,i),c=T[h](0,s),d=x[h](0,i),v=x[h](0,s),m={x:l,y:c,x2:d,y2:v,width:d-l,height:v-c};return t.bbox=ht(m),m},Ht=function(t){var n=ht(t);return n.toString=e._path2string,n},Bt=e._pathToRelative=function(t){var n=Nt(t);if(n.rel)return Ht(n.rel);if(!e.is(t,O)||!e.is(t&&t[0],O))t=e.parsePathString(t);var r=[],i=0,s=0,o=0,u=0,a=0;t[0][0]=="M"&&(i=t[0][1],s=t[0][2],o=i,u=s,a++,r.push(["M",i,s]));for(var f=a,l=t.length;f<l;f++){var c=r[f]=[],h=t[f];if(h[0]!=E.call(h[0])){c[0]=E.call(h[0]);switch(c[0]){case"a":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+(h[6]-i).toFixed(3),c[7]=+(h[7]-s).toFixed(3);break;case"v":c[1]=+(h[1]-s).toFixed(3);break;case"m":o=h[1],u=h[2];default:for(var p=1,d=h.length;p<d;p++)c[p]=+(h[p]-(p%2?i:s)).toFixed(3)}}else{c=r[f]=[],h[0]=="m"&&(o=h[1]+i,u=h[2]+s);for(var v=0,m=h.length;v<m;v++)r[f][v]=h[v]}var g=r[f].length;switch(r[f][0]){case"z":i=o,s=u;break;case"h":i+=+r[f][g-1];break;case"v":s+=+r[f][g-1];break;default:i+=+r[f][g-2],s+=+r[f][g-1]}}return r.toString=e._path2string,n.rel=Ht(r),r},jt=e._pathToAbsolute=function(t){var n=Nt(t);if(n.abs)return Ht(n.abs);if(!e.is(t,O)||!e.is(t&&t[0],O))t=e.parsePathString(t);if(!t||!t.length)return[["M",0,0]];var r=[],i=0,s=0,o=0,u=0,a=0;t[0][0]=="M"&&(i=+t[0][1],s=+t[0][2],o=i,u=s,a++,r[0]=["M",i,s]);var f=t.length==3&&t[0][0]=="M"&&t[1][0].toUpperCase()=="R"&&t[2][0].toUpperCase()=="Z";for(var l,c,h=a,d=t.length;h<d;h++){r.push(l=[]),c=t[h];if(c[0]!=W.call(c[0])){l[0]=W.call(c[0]);switch(l[0]){case"A":l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=+(c[6]+i),l[7]=+(c[7]+s);break;case"V":l[1]=+c[1]+s;break;case"H":l[1]=+c[1]+i;break;case"R":var v=[i,s][p](c.slice(1));for(var m=2,g=v.length;m<g;m++)v[m]=+v[m]+i,v[++m]=+v[m]+s;r.pop(),r=r[p](Tt(v,f));break;case"M":o=+c[1]+i,u=+c[2]+s;default:for(m=1,g=c.length;m<g;m++)l[m]=+c[m]+(m%2?i:s)}}else if(c[0]=="R")v=[i,s][p](c.slice(1)),r.pop(),r=r[p](Tt(v,f)),l=["R"][p](c.slice(-2));else for(var y=0,b=c.length;y<b;y++)l[y]=c[y];switch(l[0]){case"Z":i=o,s=u;break;case"H":i=l[1];break;case"V":s=l[1];break;case"M":o=l[l.length-2],u=l[l.length-1];default:i=l[l.length-2],s=l[l.length-1]}}return r.toString=e._path2string,n.abs=Ht(r),r},Ft=function(e,t,n,r){return[e,t,n,r,n,r]},It=function(e,t,n,r,i,s){var o=1/3,u=2/3;return[o*e+u*n,o*t+u*r,o*i+u*n,o*s+u*r,i,s]},qt=function(e,t,n,r,i,s,o,u,a,f){var l=k*120/180,c=k/180*(+i||0),h=[],d,v=Et(function(e,t,n){var r=e*S.cos(n)-t*S.sin(n),i=e*S.sin(n)+t*S.cos(n);return{x:r,y:i}});if(!f){d=v(e,t,-c),e=d.x,t=d.y,d=v(u,a,-c),u=d.x,a=d.y;var m=S.cos(k/180*i),g=S.sin(k/180*i),b=(e-u)/2,w=(t-a)/2,E=b*b/(n*n)+w*w/(r*r);E>1&&(E=S.sqrt(E),n=E*n,r=E*r);var x=n*n,T=r*r,C=(s==o?-1:1)*S.sqrt(N((x*T-x*w*w-T*b*b)/(x*w*w+T*b*b))),L=C*n*w/r+(e+u)/2,A=C*-r*b/n+(t+a)/2,O=S.asin(((t-A)/r).toFixed(9)),M=S.asin(((a-A)/r).toFixed(9));O=e<L?k-O:O,M=u<L?k-M:M,O<0&&(O=k*2+O),M<0&&(M=k*2+M),o&&O>M&&(O-=k*2),!o&&M>O&&(M-=k*2)}else O=f[0],M=f[1],L=f[2],A=f[3];var _=M-O;if(N(_)>l){var D=M,P=u,H=a;M=O+l*(o&&M>O?1:-1),u=L+n*S.cos(M),a=A+r*S.sin(M),h=qt(u,a,n,r,i,0,o,P,H,[M,D,L,A])}_=M-O;var B=S.cos(O),j=S.sin(O),F=S.cos(M),I=S.sin(M),q=S.tan(_/4),R=4/3*n*q,U=4/3*r*q,z=[e,t],W=[e+R*j,t-U*B],X=[u+R*I,a-U*F],V=[u,a];W[0]=2*z[0]-W[0],W[1]=2*z[1]-W[1];if(f)return[W,X,V][p](h);h=[W,X,V][p](h).join()[y](",");var $=[];for(var J=0,K=h.length;J<K;J++)$[J]=J%2?v(h[J-1],h[J],c).y:v(h[J],h[J+1],c).x;return $},Rt=function(e,t,n,r,i,s,o,u,a){var f=1-a;return{x:C(f,3)*e+C(f,2)*3*a*n+f*3*a*a*i+C(a,3)*o,y:C(f,3)*t+C(f,2)*3*a*r+f*3*a*a*s+C(a,3)*u}},Ut=Et(function(e,t,n,r,i,s,o,u){var a=i-2*n+e-(o-2*i+n),f=2*(n-e)-2*(i-n),l=e-n,c=(-f+S.sqrt(f*f-4*a*l))/2/a,p=(-f-S.sqrt(f*f-4*a*l))/2/a,d=[t,u],v=[e,o],m;return N(c)>"1e12"&&(c=.5),N(p)>"1e12"&&(p=.5),c>0&&c<1&&(m=Rt(e,t,n,r,i,s,o,u,c),v.push(m.x),d.push(m.y)),p>0&&p<1&&(m=Rt(e,t,n,r,i,s,o,u,p),v.push(m.x),d.push(m.y)),a=s-2*r+t-(u-2*s+r),f=2*(r-t)-2*(s-r),l=t-r,c=(-f+S.sqrt(f*f-4*a*l))/2/a,p=(-f-S.sqrt(f*f-4*a*l))/2/a,N(c)>"1e12"&&(c=.5),N(p)>"1e12"&&(p=.5),c>0&&c<1&&(m=Rt(e,t,n,r,i,s,o,u,c),v.push(m.x),d.push(m.y)),p>0&&p<1&&(m=Rt(e,t,n,r,i,s,o,u,p),v.push(m.x),d.push(m.y)),{min:{x:T[h](0,v),y:T[h](0,d)},max:{x:x[h](0,v),y:x[h](0,d)}}}),zt=e._path2curve=Et(function(e,t){var n=!t&&Nt(e);if(!t&&n.curve)return Ht(n.curve);var r=jt(e),i=t&&jt(t),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=function(e,t){var n,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null);switch(e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"][p](qt[h](0,[t.x,t.y][p](e.slice(1))));break;case"S":n=t.x+(t.x-(t.bx||t.x)),r=t.y+(t.y-(t.by||t.y)),e=["C",n,r][p](e.slice(1));break;case"T":t.qx=t.x+(t.x-(t.qx||t.x)),t.qy=t.y+(t.y-(t.qy||t.y)),e=["C"][p](It(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"][p](It(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"][p](Ft(t.x,t.y,e[1],e[2]));break;case"H":e=["C"][p](Ft(t.x,t.y,e[1],t.y));break;case"V":e=["C"][p](Ft(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"][p](Ft(t.x,t.y,t.X,t.Y))}return e},a=function(e,t){if(e[t].length>7){e[t].shift();var n=e[t];while(n.length)e.splice(t++,0,["C"][p](n.splice(0,6)));e.splice(t,1),c=x(r.length,i&&i.length||0)}},f=function(e,t,n,s,o){e&&t&&e[o][0]=="M"&&t[o][0]!="M"&&(t.splice(o,0,["M",s.x,s.y]),n.bx=0,n.by=0,n.x=e[o][1],n.y=e[o][2],c=x(r.length,i&&i.length||0))};for(var l=0,c=x(r.length,i&&i.length||0);l<c;l++){r[l]=u(r[l],s),a(r,l),i&&(i[l]=u(i[l],o)),i&&a(i,l),f(r,i,s,o,l),f(i,r,o,s,l);var d=r[l],v=i&&i[l],m=d.length,g=i&&v.length;s.x=d[m-2],s.y=d[m-1],s.bx=U(d[m-4])||s.x,s.by=U(d[m-3])||s.y,o.bx=i&&(U(v[g-4])||o.x),o.by=i&&(U(v[g-3])||o.y),o.x=i&&v[g-2],o.y=i&&v[g-1]}return i||(n.curve=Ht(r)),i?[r,i]:r},null,Ht),Wt=e._parseDots=Et(function(t){var n=[];for(var r=0,i=t.length;r<i;r++){var s={},o=t[r].match(/^([^:]*):?([\d\.]*)/);s.color=e.getRGB(o[1]);if(s.color.error)return null;s.color=s.color.hex,o[2]&&(s.offset=o[2]+"%"),n.push(s)}for(r=1,i=n.length-1;r<i;r++)if(!n[r].offset){var u=U(n[r-1].offset||0),a=0;for(var f=r+1;f<i;f++)if(n[f].offset){a=n[f].offset;break}a||(a=100,f=i),a=U(a);var l=(a-u)/(f-r+1);for(;r<f;r++)u+=l,n[r].offset=u+"%"}return n}),Xt=e._tear=function(e,t){e==t.top&&(t.top=e.prev),e==t.bottom&&(t.bottom=e.next),e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next)},Vt=e._tofront=function(e,t){if(t.top===e)return;Xt(e,t),e.next=null,e.prev=t.top,t.top.next=e,t.top=e},$t=e._toback=function(e,t){if(t.bottom===e)return;Xt(e,t),e.next=t.bottom,e.prev=null,t.bottom.prev=e,t.bottom=e},Jt=e._insertafter=function(e,t,n){Xt(e,n),t==n.top&&(n.top=e),t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e},Kt=e._insertbefore=function(e,t,n){Xt(e,n),t==n.bottom&&(n.bottom=e),t.prev&&(t.prev.next=e),e.prev=t.prev,t.prev=e,e.next=t},Qt=e.toMatrix=function(e,t){var n=Pt(e),r={_:{transform:v},getBBox:function(){return n}};return Yt(r,t),r.matrix},Gt=e.transformPath=function(e,t){return ft(e,Qt(e,t))},Yt=e._extractTransform=function(t,n){if(n==null)return t._.transform;n=g(n).replace(/\.{3}|\u2026/g,t._.transform||v);var r=e.parseTransformString(n),i=0,s=0,o=0,u=1,a=1,f=t._,l=new tn;f.transform=r||[];if(r)for(var c=0,h=r.length;c<h;c++){var p=r[c],d=p.length,m=g(p[0]).toLowerCase(),y=p[0]!=m,b=y?l.invert():0,w,E,S,x,T;m=="t"&&d==3?y?(w=b.x(0,0),E=b.y(0,0),S=b.x(p[1],p[2]),x=b.y(p[1],p[2]),l.translate(S-w,x-E)):l.translate(p[1],p[2]):m=="r"?d==2?(T=T||t.getBBox(1),l.rotate(p[1],T.x+T.width/2,T.y+T.height/2),i+=p[1]):d==4&&(y?(S=b.x(p[2],p[3]),x=b.y(p[2],p[3]),l.rotate(p[1],S,x)):l.rotate(p[1],p[2],p[3]),i+=p[1]):m=="s"?d==2||d==3?(T=T||t.getBBox(1),l.scale(p[1],p[d-1],T.x+T.width/2,T.y+T.height/2),u*=p[1],a*=p[d-1]):d==5&&(y?(S=b.x(p[3],p[4]),x=b.y(p[3],p[4]),l.scale(p[1],p[2],S,x)):l.scale(p[1],p[2],p[3],p[4]),u*=p[1],a*=p[2]):m=="m"&&d==7&&l.add(p[1],p[2],p[3],p[4],p[5],p[6]),f.dirtyT=1,t.matrix=l}t.matrix=l,f.sx=u,f.sy=a,f.deg=i,f.dx=s=l.e,f.dy=o=l.f,u==1&&a==1&&!i&&f.bbox?(f.bbox.x+=+s,f.bbox.y+=+o):f.dirtyT=1},Zt=function(e){var t=e[0];switch(t.toLowerCase()){case"t":return[t,0,0];case"m":return[t,1,0,0,1,0,0];case"r":return e.length==4?[t,0,e[2],e[3]]:[t,0];case"s":return e.length==5?[t,1,1,e[3],e[4]]:e.length==3?
[t,1,1]:[t,1]}},en=e._equaliseTransform=function(t,n){n=g(n).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],n=e.parseTransformString(n)||[];var r=x(t.length,n.length),i=[],s=[],o=0,u,a,f,l;for(;o<r;o++){f=t[o]||Zt(n[o]),l=n[o]||Zt(f);if(f[0]!=l[0]||f[0].toLowerCase()=="r"&&(f[2]!=l[2]||f[3]!=l[3])||f[0].toLowerCase()=="s"&&(f[3]!=l[3]||f[4]!=l[4]))return;i[o]=[],s[o]=[];for(u=0,a=x(f.length,l.length);u<a;u++)u in f&&(i[o][u]=f[u]),u in l&&(s[o][u]=l[u])}return{from:i,to:s}};e._getContainer=function(t,n,r,i){var s;s=i==null&&!e.is(t,"object")?u.doc.getElementById(t):t;if(s==null)return;return s.tagName?n==null?{container:s,width:s.style.pixelWidth||s.offsetWidth,height:s.style.pixelHeight||s.offsetHeight}:{container:s,width:n,height:r}:{container:1,x:t,y:n,width:r,height:i}},e.pathToRelative=Bt,e._engine={},e.path2curve=zt,e.matrix=function(e,t,n,r,i,s){return new tn(e,t,n,r,i,s)},function(t){function n(e){return e[0]*e[0]+e[1]*e[1]}function r(e){var t=S.sqrt(n(e));e[0]&&(e[0]/=t),e[1]&&(e[1]/=t)}t.add=function(e,t,n,r,i,s){var o=[[],[],[]],u=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],a=[[e,n,i],[t,r,s],[0,0,1]],f,l,c,h;e&&e instanceof tn&&(a=[[e.a,e.c,e.e],[e.b,e.d,e.f],[0,0,1]]);for(f=0;f<3;f++)for(l=0;l<3;l++){h=0;for(c=0;c<3;c++)h+=u[f][c]*a[c][l];o[f][l]=h}this.a=o[0][0],this.b=o[1][0],this.c=o[0][1],this.d=o[1][1],this.e=o[0][2],this.f=o[1][2]},t.invert=function(){var e=this,t=e.a*e.d-e.b*e.c;return new tn(e.d/t,-e.b/t,-e.c/t,e.a/t,(e.c*e.f-e.d*e.e)/t,(e.b*e.e-e.a*e.f)/t)},t.clone=function(){return new tn(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(e,t){this.add(1,0,0,1,e,t)},t.scale=function(e,t,n,r){t==null&&(t=e),(n||r)&&this.add(1,0,0,1,n,r),this.add(e,0,0,t,0,0),(n||r)&&this.add(1,0,0,1,-n,-r)},t.rotate=function(t,n,r){t=e.rad(t),n=n||0,r=r||0;var i=+S.cos(t).toFixed(9),s=+S.sin(t).toFixed(9);this.add(i,s,-s,i,n,r),this.add(1,0,0,1,-n,-r)},t.x=function(e,t){return e*this.a+t*this.c+this.e},t.y=function(e,t){return e*this.b+t*this.d+this.f},t.get=function(e){return+this[g.fromCharCode(97+e)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];t.scalex=S.sqrt(n(i[0])),r(i[0]),t.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*t.shear,i[1][1]-i[0][1]*t.shear],t.scaley=S.sqrt(n(i[1])),r(i[1]),t.shear/=t.scaley;var s=-i[0][1],o=i[1][1];return o<0?(t.rotate=e.deg(S.acos(o)),s<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(S.asin(s)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(e){var t=e||this[y]();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx||t.dy?"t"+[t.dx,t.dy]:v)+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:v)+(t.rotate?"r"+[t.rotate,0,0]:v)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(tn.prototype);var nn=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(nn&&nn[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&nn&&nn[1]<8?l.safari=function(){var e=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){e.remove()})}:l.safari=it;var rn=function(){this.returnValue=!1},sn=function(){return this.originalEvent.preventDefault()},on=function(){this.cancelBubble=!0},un=function(){return this.originalEvent.stopPropagation()},an=function(){if(u.doc.addEventListener)return function(e,t,n,r){var i=d&&w[t]?w[t]:t,s=function(i){var s=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,a=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,f=i.clientX+a,l=i.clientY+s;if(d&&w[o](t))for(var c=0,h=i.targetTouches&&i.targetTouches.length;c<h;c++)if(i.targetTouches[c].target==e){var p=i;i=i.targetTouches[c],i.originalEvent=p,i.preventDefault=sn,i.stopPropagation=un;break}return n.call(r,i,f,l)};return e.addEventListener(i,s,!1),function(){return e.removeEventListener(i,s,!1),!0}};if(u.doc.attachEvent)return function(e,t,n,r){var i=function(e){e=e||u.win.event;var t=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,i=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,s=e.clientX+i,o=e.clientY+t;return e.preventDefault=e.preventDefault||rn,e.stopPropagation=e.stopPropagation||on,n.call(r,e,s,o)};e.attachEvent("on"+t,i);var s=function(){return e.detachEvent("on"+t,i),!0};return s}}(),fn=[],ln=function(e){var t=e.clientX,n=e.clientY,r=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,i=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,s,o=fn.length;while(o--){s=fn[o];if(d){var a=e.touches.length,f;while(a--){f=e.touches[a];if(f.identifier==s.el._drag.id){t=f.clientX,n=f.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}}else e.preventDefault();var l=s.el.node,c,h=l.nextSibling,p=l.parentNode,v=l.style.display;u.win.opera&&p.removeChild(l),l.style.display="none",c=s.el.paper.getElementByPoint(t,n),l.style.display=v,u.win.opera&&(h?p.insertBefore(l,h):p.appendChild(l)),c&&eve("raphael.drag.over."+s.el.id,s.el,c),t+=i,n+=r,eve("raphael.drag.move."+s.el.id,s.move_scope||s.el,t-s.el._drag.x,n-s.el._drag.y,t,n,e)}},cn=function(t){e.unmousemove(ln).unmouseup(cn);var n=fn.length,r;while(n--)r=fn[n],r.el._drag={},eve("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,t);fn=[]},hn=e.el={};for(var pn=b.length;pn--;)(function(t){e[t]=hn[t]=function(n,r){return e.is(n,"function")&&(this.events=this.events||[],this.events.push({name:t,f:n,unbind:an(this.shape||this.node||u.doc,t,n,r||this)})),this},e["un"+t]=hn["un"+t]=function(e){var n=this.events||[],r=n.length;while(r--)if(n[r].name==t&&n[r].f==e)return n[r].unbind(),n.splice(r,1),!n.length&&delete this.events,this;return this}})(b[pn]);hn.data=function(t,n){var r=tt[this.id]=tt[this.id]||{};if(arguments.length==1){if(e.is(t,"object")){for(var i in t)t[o](i)&&this.data(i,t[i]);return this}return eve("raphael.data.get."+this.id,this,r[t],t),r[t]}return r[t]=n,eve("raphael.data.set."+this.id,this,n,t),this},hn.removeData=function(e){return e==null?tt[this.id]={}:tt[this.id]&&delete tt[this.id][e],this},hn.hover=function(e,t,n,r){return this.mouseover(e,n).mouseout(t,r||n)},hn.unhover=function(e,t){return this.unmouseover(e).unmouseout(t)};var dn=[];hn.drag=function(t,n,r,i,s,o){function a(a){(a.originalEvent||a).preventDefault();var f=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,l=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft;this._drag.x=a.clientX+l,this._drag.y=a.clientY+f,this._drag.id=a.identifier,!fn.length&&e.mousemove(ln).mouseup(cn),fn.push({el:this,move_scope:i,start_scope:s,end_scope:o}),n&&eve.on("raphael.drag.start."+this.id,n),t&&eve.on("raphael.drag.move."+this.id,t),r&&eve.on("raphael.drag.end."+this.id,r),eve("raphael.drag.start."+this.id,s||i||this,a.clientX+l,a.clientY+f,a)}return this._drag={},dn.push({el:this,start:a}),this.mousedown(a),this},hn.onDragOver=function(e){e?eve.on("raphael.drag.over."+this.id,e):eve.unbind("raphael.drag.over."+this.id)},hn.undrag=function(){var t=dn.length;while(t--)dn[t].el==this&&(this.unmousedown(dn[t].start),dn.splice(t,1),eve.unbind("raphael.drag.*."+this.id));!dn.length&&e.unmousemove(ln).unmouseup(cn)},l.circle=function(t,n,r){var i=e._engine.circle(this,t||0,n||0,r||0);return this.__set__&&this.__set__.push(i),i},l.rect=function(t,n,r,i,s){var o=e._engine.rect(this,t||0,n||0,r||0,i||0,s||0);return this.__set__&&this.__set__.push(o),o},l.ellipse=function(t,n,r,i){var s=e._engine.ellipse(this,t||0,n||0,r||0,i||0);return this.__set__&&this.__set__.push(s),s},l.path=function(t){t&&!e.is(t,A)&&!e.is(t[0],O)&&(t+=v);var n=e._engine.path(e.format[h](e,arguments),this);return this.__set__&&this.__set__.push(n),n},l.image=function(t,n,r,i,s){var o=e._engine.image(this,t||"about:blank",n||0,r||0,i||0,s||0);return this.__set__&&this.__set__.push(o),o},l.text=function(t,n,r){var i=e._engine.text(this,t||0,n||0,g(r));return this.__set__&&this.__set__.push(i),i},l.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var n=new Dn(t);return this.__set__&&this.__set__.push(n),n},l.setStart=function(e){this.__set__=e||this.set()},l.setFinish=function(e){var t=this.__set__;return delete this.__set__,t},l.setSize=function(t,n){return e._engine.setSize.call(this,t,n)},l.setViewBox=function(t,n,r,i,s){return e._engine.setViewBox.call(this,t,n,r,i,s)},l.top=l.bottom=null,l.raphael=e;var vn=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.body,i=n.documentElement,s=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,a=t.top+(u.win.pageYOffset||i.scrollTop||r.scrollTop)-s,f=t.left+(u.win.pageXOffset||i.scrollLeft||r.scrollLeft)-o;return{y:a,x:f}};l.getElementByPoint=function(e,t){var n=this,r=n.canvas,i=u.doc.elementFromPoint(e,t);if(u.win.opera&&i.tagName=="svg"){var s=vn(r),o=r.createSVGRect();o.x=e-s.x,o.y=t-s.y,o.width=o.height=1;var a=r.getIntersectionList(o,null);a.length&&(i=a[a.length-1])}if(!i)return null;while(i.parentNode&&i!=r.parentNode&&!i.raphael)i=i.parentNode;return i==n.canvas.parentNode&&(i=r),i=i&&i.raphael?n.getById(i.raphaelid):null,i},l.getById=function(e){var t=this.bottom;while(t){if(t.id==e)return t;t=t.next}return null},l.forEach=function(e,t){var n=this.bottom;while(n){if(e.call(t,n)===!1)return this;n=n.next}return this},l.getElementsByPoint=function(e,t){var n=this.set();return this.forEach(function(r){r.isPointInside(e,t)&&n.push(r)}),n},hn.isPointInside=function(t,n){var r=this.realPath=this.realPath||at[this.type](this);return e.isPointInsidePath(r,t,n)},hn.getBBox=function(e){if(this.removed)return{};var t=this._;if(e){if(t.dirty||!t.bboxwt)this.realPath=at[this.type](this),t.bboxwt=Pt(this.realPath),t.bboxwt.toString=gn,t.dirty=0;return t.bboxwt}if(t.dirty||t.dirtyT||!t.bbox){if(t.dirty||!this.realPath)t.bboxwt=0,this.realPath=at[this.type](this);t.bbox=Pt(ft(this.realPath,this.matrix)),t.bbox.toString=gn,t.dirty=t.dirtyT=0}return t.bbox},hn.clone=function(){if(this.removed)return null;var e=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(e),e},hn.glow=function(e){if(this.type=="text")return null;e=e||{};var t={width:(e.width||10)+(+this.attr("stroke-width")||1),fill:e.fill||!1,opacity:e.opacity||.5,offsetx:e.offsetx||0,offsety:e.offsety||0,color:e.color||"#000"},n=t.width/2,r=this.paper,i=r.set(),s=this.realPath||at[this.type](this);s=this.matrix?ft(s,this.matrix):s;for(var o=1;o<n+1;o++)i.push(r.path(s).attr({stroke:t.color,fill:t.fill?t.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/n*o).toFixed(3),opacity:+(t.opacity/n).toFixed(3)}));return i.insertBefore(this).translate(t.offsetx,t.offsety)};var yn={},bn=function(t,n,r,i,s,o,u,a,f){return f==null?kt(t,n,r,i,s,o,u,a):e.findDotsAtSegment(t,n,r,i,s,o,u,a,Lt(t,n,r,i,s,o,u,a,f))},wn=function(t,n){return function(r,i,s){r=zt(r);var o,u,a,f,l="",c={},h,p=0;for(var d=0,v=r.length;d<v;d++){a=r[d];if(a[0]=="M")o=+a[1],u=+a[2];else{f=bn(o,u,a[1],a[2],a[3],a[4],a[5],a[6]);if(p+f>i){if(n&&!c.start){h=bn(o,u,a[1],a[2],a[3],a[4],a[5],a[6],i-p),l+=["C"+h.start.x,h.start.y,h.m.x,h.m.y,h.x,h.y];if(s)return l;c.start=l,l=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,a[5],a[6]].join(),p+=f,o=+a[5],u=+a[6];continue}if(!t&&!n)return h=bn(o,u,a[1],a[2],a[3],a[4],a[5],a[6],i-p),{x:h.x,y:h.y,alpha:h.alpha}}p+=f,o=+a[5],u=+a[6]}l+=a.shift()+a}return c.end=l,h=t?p:n?c:e.findDotsAtSegment(o,u,a[0],a[1],a[2],a[3],a[4],a[5],1),h.alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},En=wn(1),Sn=wn(),xn=wn(0,1);e.getTotalLength=En,e.getPointAtLength=Sn,e.getSubpath=function(e,t,n){if(this.getTotalLength(e)-n<1e-6)return xn(e,t).end;var r=xn(e,n,1);return t?xn(r,t).end:r},hn.getTotalLength=function(){if(this.type!="path")return;return this.node.getTotalLength?this.node.getTotalLength():En(this.attrs.path)},hn.getPointAtLength=function(e){if(this.type!="path")return;return Sn(this.attrs.path,e)},hn.getSubpath=function(t,n){if(this.type!="path")return;return e.getSubpath(this.attrs.path,t,n)};var Tn=e.easing_formulas={linear:function(e){return e},"<":function(e){return C(e,1.7)},">":function(e){return C(e,.48)},"<>":function(e){var t=.48-e/1.04,n=S.sqrt(.1734+t*t),r=n-t,i=C(N(r),1/3)*(r<0?-1:1),s=-n-t,o=C(N(s),1/3)*(s<0?-1:1),u=i+o+.5;return(1-u)*3*u*u+u*u*u},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){e-=1;var t=1.70158;return e*e*((t+1)*e+t)+1},elastic:function(e){return e==!!e?e:C(2,-10*e)*S.sin((e-.075)*2*k/.3)+1},bounce:function(e){var t=7.5625,n=2.75,r;return e<1/n?r=t*e*e:e<2/n?(e-=1.5/n,r=t*e*e+.75):e<2.5/n?(e-=2.25/n,r=t*e*e+.9375):(e-=2.625/n,r=t*e*e+.984375),r}};Tn.easeIn=Tn["ease-in"]=Tn["<"],Tn.easeOut=Tn["ease-out"]=Tn[">"],Tn.easeInOut=Tn["ease-in-out"]=Tn["<>"],Tn["back-in"]=Tn.backIn,Tn["back-out"]=Tn.backOut;var Nn=[],Cn=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,16)},kn=function(){var t=+(new Date),n=0;for(;n<Nn.length;n++){var r=Nn[n];if(r.el.removed||r.paused)continue;var i=t-r.start,s=r.ms,u=r.easing,a=r.from,f=r.diff,l=r.to,c=r.t,h=r.el,d={},v,g={},y;r.initstatus?(i=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*s,r.status=r.initstatus,delete r.initstatus,r.stop&&Nn.splice(n--,1)):r.status=(r.prev+(r.percent-r.prev)*(i/s))/r.anim.top;if(i<0)continue;if(i<s){var b=u(i/s);for(var w in a)if(a[o](w)){switch(V[w]){case L:v=+a[w]+b*s*f[w];break;case"colour":v="rgb("+[Ln(q(a[w].r+b*s*f[w].r)),Ln(q(a[w].g+b*s*f[w].g)),Ln(q(a[w].b+b*s*f[w].b))].join(",")+")";break;case"path":v=[];for(var E=0,S=a[w].length;E<S;E++){v[E]=[a[w][E][0]];for(var x=1,T=a[w][E].length;x<T;x++)v[E][x]=+a[w][E][x]+b*s*f[w][E][x];v[E]=v[E].join(m)}v=v.join(m);break;case"transform":if(f[w].real){v=[];for(E=0,S=a[w].length;E<S;E++){v[E]=[a[w][E][0]];for(x=1,T=a[w][E].length;x<T;x++)v[E][x]=a[w][E][x]+b*s*f[w][E][x]}}else{var N=function(e){return+a[w][e]+b*s*f[w][e]};v=[["m",N(0),N(1),N(2),N(3),N(4),N(5)]]}break;case"csv":if(w=="clip-rect"){v=[],E=4;while(E--)v[E]=+a[w][E]+b*s*f[w][E]}break;default:var C=[][p](a[w]);v=[],E=h.paper.customAttributes[w].length;while(E--)v[E]=+C[E]+b*s*f[w][E]}d[w]=v}h.attr(d),function(e,t,n){setTimeout(function(){eve("raphael.anim.frame."+e,t,n)})}(h.id,h,r.anim)}else{(function(t,n,r){setTimeout(function(){eve("raphael.anim.frame."+n.id,n,r),eve("raphael.anim.finish."+n.id,n,r),e.is(t,"function")&&t.call(n)})})(r.callback,h,r.anim),h.attr(l),Nn.splice(n--,1);if(r.repeat>1&&!r.next){for(y in l)l[o](y)&&(g[y]=r.totalOrigin[y]);r.el.attr(g),Mn(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&Mn(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}e.svg&&h&&h.paper&&h.paper.safari(),Nn.length&&Cn(kn)},Ln=function(e){return e>255?255:e<0?0:e};hn.animateWith=function(t,n,r,i,s,o){var u=this;if(u.removed)return o&&o.call(u),u;var a=r instanceof On?r:e.animation(r,i,s,o),f,l;Mn(a,u,a.percents[0],null,u.attr());for(var c=0,h=Nn.length;c<h;c++)if(Nn[c].anim==n&&Nn[c].el==t){Nn[h-1].start=Nn[c].start;break}return u},hn.onAnimation=function(e){return e?eve.on("raphael.anim.frame."+this.id,e):eve.unbind("raphael.anim.frame."+this.id),this},On.prototype.delay=function(e){var t=new On(this.anim,this.ms);return t.times=this.times,t.del=+e||0,t},On.prototype.repeat=function(e){var t=new On(this.anim,this.ms);return t.del=this.del,t.times=S.floor(x(e,0))||1,t},e.animation=function(t,n,r,i){if(t instanceof On)return t;if(e.is(r,"function")||!r)i=i||r||null,r=null;t=Object(t),n=+n||0;var s={},u,a;for(a in t)t[o](a)&&U(a)!=a&&U(a)+"%"!=a&&(u=!0,s[a]=t[a]);return u?(r&&(s.easing=r),i&&(s.callback=i),new On({100:s},n)):new On(t,n)},hn.animate=function(t,n,r,i){var s=this;if(s.removed)return i&&i.call(s),s;var o=t instanceof On?t:e.animation(t,n,r,i);return Mn(o,s,o.percents[0],null,s.attr()),s},hn.setTime=function(e,t){return e&&t!=null&&this.status(e,T(t,e.ms)/e.ms),this},hn.status=function(e,t){var n=[],r=0,i,s;if(t!=null)return Mn(e,this,-1,T(t,1)),this;i=Nn.length;for(;r<i;r++){s=Nn[r];if(s.el.id==this.id&&(!e||s.anim==e)){if(e)return s.status;n.push({anim:s.anim,status:s.status})}}return e?0:n},hn.pause=function(e){for(var t=0;t<Nn.length;t++)Nn[t].el.id==this.id&&(!e||Nn[t].anim==e)&&eve("raphael.anim.pause."+this.id,this,Nn[t].anim)!==!1&&(Nn[t].paused=!0);return this},hn.resume=function(e){for(var t=0;t<Nn.length;t++)if(Nn[t].el.id==this.id&&(!e||Nn[t].anim==e)){var n=Nn[t];eve("raphael.anim.resume."+this.id,this,n.anim)!==!1&&(delete n.paused,this.status(n.anim,n.status))}return this},hn.stop=function(e){for(var t=0;t<Nn.length;t++)Nn[t].el.id==this.id&&(!e||Nn[t].anim==e)&&eve("raphael.anim.stop."+this.id,this,Nn[t].anim)!==!1&&Nn.splice(t--,1);return this},eve.on("raphael.remove",_n),eve.on("raphael.clear",_n),hn.toString=function(){return"Raphaël’s object"};var Dn=function(e){this.items=[],this.length=0,this.type="set";if(e)for(var t=0,n=e.length;t<n;t++)e[t]&&(e[t].constructor==hn.constructor||e[t].constructor==Dn)&&(this[this.items.length]=this.items[this.items.length]=e[t],this.length++)},Pn=Dn.prototype;Pn.push=function(){var e,t;for(var n=0,r=arguments.length;n<r;n++)e=arguments[n],e&&(e.constructor==hn.constructor||e.constructor==Dn)&&(t=this.items.length,this[t]=this.items[t]=e,this.length++);return this},Pn.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Pn.forEach=function(e,t){for(var n=0,r=this.items.length;n<r;n++)if(e.call(t,this.items[n],n)===!1)return this;return this};for(var Hn in hn)hn[o](Hn)&&(Pn[Hn]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e][h](n,t)})}}(Hn));Pn.attr=function(t,n){if(t&&e.is(t,O)&&e.is(t[0],"object"))for(var r=0,i=t.length;r<i;r++)this.items[r].attr(t[r]);else for(var s=0,o=this.items.length;s<o;s++)this.items[s].attr(t,n);return this},Pn.clear=function(){while(this.length)this.pop()},Pn.splice=function(e,t,n){e=e<0?x(this.length+e,0):e,t=x(0,T(this.length-e,t));var r=[],i=[],s=[],o;for(o=2;o<arguments.length;o++)s.push(arguments[o]);for(o=0;o<t;o++)i.push(this[e+o]);for(;o<this.length-e;o++)r.push(this[e+o]);var u=s.length;for(o=0;o<u+r.length;o++)this.items[e+o]=this[e+o]=o<u?s[o]:r[o-u];o=this.items.length=this.length-=t-u;while(this[o])delete this[o++];return new Dn(i)},Pn.exclude=function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]==e)return this.splice(t,1),!0},Pn.animate=function(t,n,r,i){(e.is(r,"function")||!r)&&(i=r||null);var s=this.items.length,o=s,u,a=this,f;if(!s)return this;i&&(f=function(){!--s&&i.call(a)}),r=e.is(r,A)?r:f;var l=e.animation(t,n,r,f);u=this.items[--o].animate(l);while(o--)this.items[o]&&!this.items[o].removed&&this.items[o].animateWith(u,l,l);return this},Pn.insertAfter=function(e){var t=this.items.length;while(t--)this.items[t].insertAfter(e);return this},Pn.getBBox=function(){var e=[],t=[],n=[],r=[];for(var i=this.items.length;i--;)if(!this.items[i].removed){var s=this.items[i].getBBox();e.push(s.x),t.push(s.y),n.push(s.x+s.width),r.push(s.y+s.height)}return e=T[h](0,e),t=T[h](0,t),n=x[h](0,n),r=x[h](0,r),{x:e,y:t,x2:n,y2:r,width:n-e,height:r-t}},Pn.clone=function(e){e=new Dn;for(var t=0,n=this.items.length;t<n;t++)e.push(this.items[t].clone());return e},Pn.toString=function(){return"Raphaël‘s set"},e.registerFont=function(e){if(!e.face)return e;this.fonts=this.fonts||{};var t={w:e.w,face:{},glyphs:{}},n=e.face["font-family"];for(var r in e.face)e.face[o](r)&&(t.face[r]=e.face[r]);this.fonts[n]?this.fonts[n].push(t):this.fonts[n]=[t];if(!e.svg){t.face["units-per-em"]=z(e.face["units-per-em"],10);for(var i in e.glyphs)if(e.glyphs[o](i)){var s=e.glyphs[i];t.glyphs[i]={w:s.w,k:{},d:s.d&&"M"+s.d.replace(/[mlcxtrv]/g,function(e){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[e]||"M"})+"z"};if(s.k)for(var u in s.k)s[o](u)&&(t.glyphs[i].k[u]=s.k[u])}}return e},l.getFont=function(t,n,r,i){i=i||"normal",r=r||"normal",n=+n||{normal:400,bold:700,lighter:300,bolder:800}[n]||400;if(!e.fonts)return;var s=e.fonts[t];if(!s){var u=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,v)+"(\\s|$)","i");for(var a in e.fonts)if(e.fonts[o](a)&&u.test(a)){s=e.fonts[a];break}}var f;if(s)for(var l=0,c=s.length;l<c;l++){f=s[l];if(f.face["font-weight"]==n&&(f.face["font-style"]==r||!f.face["font-style"])&&f.face["font-stretch"]==i)break}return f},l.print=function(t,r,i,s,o,u,a){u=u||"middle",a=x(T(a||0,1),-1);var f=g(i)[y](v),l=0,c=0,h=v,p;e.is(s,i)&&(s=this.getFont(s));if(s){p=(o||16)/s.face["units-per-em"];var d=s.face.bbox[y](n),m=+d[0],b=d[3]-d[1],w=0,E=+d[1]+(u=="baseline"?b+ +s.face.descent:b/2);for(var S=0,N=f.length;S<N;S++){if(f[S]=="\n")l=0,k=0,c=0,w+=b;else{var C=c&&s.glyphs[f[S-1]]||{},k=s.glyphs[f[S]];l+=c?(C.w||s.w)+(C.k&&C.k[f[S]]||0)+s.w*a:0,c=1}k&&k.d&&(h+=e.transformPath(k.d,["t",l*p,w*p,"s",p,p,m,E,"t",(t-m)/p,(r-E)/p]))}}return this.path(h).attr({fill:"#000",stroke:"none"})},l.add=function(t){if(e.is(t,"array")){var n=this.set(),i=0,s=t.length,u;for(;i<s;i++)u=t[i]||{},r[o](u.type)&&n.push(this[u.type]().attr(u))}return n},e.format=function(t,n){var r=e.is(n,O)?[0][p](n):arguments;return t&&e.is(t,A)&&r.length-1&&(t=t.replace(i,function(e,t){return r[++t]==null?v:r[t]})),t||v},e.fullfill=function(){var e=/\{([^\}]+)\}/g,t=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(e,n,r){var i=r;return n.replace(t,function(e,t,n,r,s){t=t||r,i&&(t in i&&(i=i[t]),typeof i=="function"&&s&&(i=i()))}),i=(i==null||i==r?e:i)+"",i};return function(t,r){return String(t).replace(e,function(e,t){return n(e,t,r)})}}(),e.ninja=function(){return a.was?u.win.Raphael=a.is:delete Raphael,e},e.st=Pn,function(t,n,r){function i(){/in/.test(t.readyState)?setTimeout(i,9):e.eve("raphael.DOMload")}t.readyState==null&&t.addEventListener&&(t.addEventListener(n,r=function(){t.removeEventListener(n,r,!1),t.readyState="complete"},!1),t.readyState="loading"),i()}(document,"DOMContentLoaded"),a.was?u.win.Raphael=e:Raphael=e,eve.on("raphael.DOMload",function(){t=!0})}(),window.Raphael.svg&&function(e){var t="hasOwnProperty",n=String,r=parseFloat,i=parseInt,s=Math,o=s.max,u=s.abs,a=s.pow,f=/[, ]+/,l=e.eve,c="",h=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},v={};e.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var m=function(r,i){if(i){typeof r=="string"&&(r=m(r));for(var s in i)i[t](s)&&(s.substring(0,6)=="xlink:"?r.setAttributeNS(p,s.substring(6),n(i[s])):r.setAttribute(s,n(i[s])))}else r=e._g.doc.createElementNS("http://www.w3.org/2000/svg",r),r.style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},g=function(t,i){var f="linear",l=t.id+i,h=.5,p=.5,d=t.node,v=t.paper,g=d.style,y=e._g.doc.getElementById(l);if(!y){i=n(i).replace(e._radial_gradient,function(e,t,n){f="radial";if(t&&n){h=r(t),p=r(n);var i=(p>.5)*2-1;a(h-.5,2)+a(p-.5,2)>.25&&(p=s.sqrt(.25-a(h-.5,2))*i+.5)&&p!=.5&&(p=p.toFixed(5)-1e-5*i)}return c}),i=i.split(/\s*\-\s*/);if(f=="linear"){var b=i.shift();b=-r(b);if(isNaN(b))return null;var w=[0,0,s.cos(e.rad(b)),s.sin(e.rad(b))],E=1/(o(u(w[2]),u(w[3]))||1);w[2]*=E,w[3]*=E,w[2]<0&&(w[0]=-w[2],w[2]=0),w[3]<0&&(w[1]=-w[3],w[3]=0)}var S=e._parseDots(i);if(!S)return null;l=l.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&l!=t.gradient.id&&(v.defs.removeChild(t.gradient),delete t.gradient);if(!t.gradient){y=m(f+"Gradient",{id:l}),t.gradient=y,m(y,f=="radial"?{fx:h,fy:p}:{x1:w[0],y1:w[1],x2:w[2],y2:w[3],gradientTransform:t.matrix.invert()}),v.defs.appendChild(y);for(var x=0,T=S.length;x<T;x++)y.appendChild(m("stop",{offset:S[x].offset?S[x].offset:x?"100%":"0%","stop-color":S[x].color||"#fff"}))}}return m(d,{fill:"url(#"+l+")",opacity:1,"fill-opacity":1}),g.fill=c,g.opacity=1,g.fillOpacity=1,1},y=function(e){var t=e.getBBox(1);m(e.pattern,{patternTransform:e.matrix.invert()+" translate("+t.x+","+t.y+")"})},b=function(r,i,s){if(r.type=="path"){var o=n(i).toLowerCase().split("-"),u=r.paper,a=s?"end":"start",f=r.node,l=r.attrs,h=l["stroke-width"],p=o.length,g="classic",y,b,w,E,S,x=3,T=3,N=5;while(p--)switch(o[p]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":g=o[p];break;case"wide":T=5;break;case"narrow":T=2;break;case"long":x=5;break;case"short":x=2}g=="open"?(x+=2,T+=2,N+=2,w=1,E=s?4:1,S={fill:"none",stroke:l.stroke}):(E=w=x/2,S={fill:l.stroke,stroke:"none"}),r._.arrows?s?(r._.arrows.endPath&&v[r._.arrows.endPath]--,r._.arrows.endMarker&&v[r._.arrows.endMarker]--):(r._.arrows.startPath&&v[r._.arrows.startPath]--,r._.arrows.startMarker&&v[r._.arrows.startMarker]--):r._.arrows={};if(g!="none"){var C="raphael-marker-"+g,k="raphael-marker-"+a+g+x+T;e._g.doc.getElementById(C)?v[C]++:(u.defs.appendChild(m(m("path"),{"stroke-linecap":"round",d:d[g],id:C})),v[C]=1);var L=e._g.doc.getElementById(k),A;L?(v[k]++,A=L.getElementsByTagName("use")[0]):(L=m(m("marker"),{id:k,markerHeight:T,markerWidth:x,orient:"auto",refX:E,refY:T/2}),A=m(m("use"),{"xlink:href":"#"+C,transform:(s?"rotate(180 "+x/2+" "+T/2+") ":c)+"scale("+x/N+","+T/N+")","stroke-width":(1/((x/N+T/N)/2)).toFixed(4)}),L.appendChild(A),u.defs.appendChild(L),v[k]=1),m(A,S);var O=w*(g!="diamond"&&g!="oval");s?(y=r._.arrows.startdx*h||0,b=e.getTotalLength(l.path)-O*h):(y=O*h,b=e.getTotalLength(l.path)-(r._.arrows.enddx*h||0)),S={},S["marker-"+a]="url(#"+k+")";if(b||y)S.d=Raphael.getSubpath(l.path,y,b);m(f,S),r._.arrows[a+"Path"]=C,r._.arrows[a+"Marker"]=k,r._.arrows[a+"dx"]=O,r._.arrows[a+"Type"]=g,r._.arrows[a+"String"]=i}else s?(y=r._.arrows.startdx*h||0,b=e.getTotalLength(l.path)-y):(y=0,b=e.getTotalLength(l.path)-(r._.arrows.enddx*h||0)),r._.arrows[a+"Path"]&&m(f,{d:Raphael.getSubpath(l.path,y,b)}),delete r._.arrows[a+"Path"],delete r._.arrows[a+"Marker"],delete r._.arrows[a+"dx"],delete r._.arrows[a+"Type"],delete r._.arrows[a+"String"];for(S in v)if(v[t](S)&&!v[S]){var M=e._g.doc.getElementById(S);M&&M.parentNode.removeChild(M)}}},w={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},E=function(e,t,r){t=w[n(t).toLowerCase()];if(t){var i=e.attrs["stroke-width"]||"1",s={round:i,square:i,butt:0}[e.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,o=[],u=t.length;while(u--)o[u]=t[u]*i+(u%2?1:-1)*s;m(e.node,{"stroke-dasharray":o.join(",")})}},S=function(r,s){var a=r.node,l=r.attrs,h=a.style.visibility;a.style.visibility="hidden";for(var d in s)if(s[t](d)){if(!e._availableAttrs[t](d))continue;var v=s[d];l[d]=v;switch(d){case"blur":r.blur(v);break;case"href":case"title":case"target":var w=a.parentNode;if(w.tagName.toLowerCase()!="a"){var S=m("a");w.insertBefore(S,a),S.appendChild(a),w=S}d=="target"?w.setAttributeNS(p,"show",v=="blank"?"new":v):w.setAttributeNS(p,d,v);break;case"cursor":a.style.cursor=v;break;case"transform":r.transform(v);break;case"arrow-start":b(r,v);break;case"arrow-end":b(r,v,1);break;case"clip-rect":var x=n(v).split(f);if(x.length==4){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var N=m("clipPath"),C=m("rect");N.id=e.createUUID(),m(C,{x:x[0],y:x[1],width:x[2],height:x[3]}),N.appendChild(C),r.paper.defs.appendChild(N),m(a,{"clip-path":"url(#"+N.id+")"}),r.clip=C}if(!v){var k=a.getAttribute("clip-path");if(k){var L=e._g.doc.getElementById(k.replace(/(^url\(#|\)$)/g,c));L&&L.parentNode.removeChild(L),m(a,{"clip-path":c}),delete r.clip}}break;case"path":r.type=="path"&&(m(a,{d:v?l.path=e._pathToAbsolute(v):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1)));break;case"width":a.setAttribute(d,v),r._.dirty=1;if(!l.fx)break;d="x",v=l.x;case"x":l.fx&&(v=-l.x-(l.width||0));case"rx":if(d=="rx"&&r.type=="rect")break;case"cx":a.setAttribute(d,v),r.pattern&&y(r),r._.dirty=1;break;case"height":a.setAttribute(d,v),r._.dirty=1;if(!l.fy)break;d="y",v=l.y;case"y":l.fy&&(v=-l.y-(l.height||0));case"ry":if(d=="ry"&&r.type=="rect")break;case"cy":a.setAttribute(d,v),r.pattern&&y(r),r._.dirty=1;break;case"r":r.type=="rect"?m(a,{rx:v,ry:v}):a.setAttribute(d,v),r._.dirty=1;break;case"src":r.type=="image"&&a.setAttributeNS(p,"href",v);break;case"stroke-width":if(r._.sx!=1||r._.sy!=1)v/=o(u(r._.sx),u(r._.sy))||1;r.paper._vbSize&&(v*=r.paper._vbSize),a.setAttribute(d,v),l["stroke-dasharray"]&&E(r,l["stroke-dasharray"],s),r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1));break;case"stroke-dasharray":E(r,v,s);break;case"fill":var A=n(v).match(e._ISURL);if(A){N=m("pattern");var O=m("image");N.id=e.createUUID(),m(N,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),m(O,{x:0,y:0,"xlink:href":A[1]}),N.appendChild(O),function(t){e._preload(A[1],function(){var e=this.offsetWidth,n=this.offsetHeight;m(t,{width:e,height:n}),m(O,{width:e,height:n}),r.paper.safari()})}(N),r.paper.defs.appendChild(N),m(a,{fill:"url(#"+N.id+")"}),r.pattern=N,r.pattern&&y(r);break}var M=e.getRGB(v);if(!M.error)delete s.gradient,delete l.gradient,!e.is(l.opacity,"undefined")&&e.is(s.opacity,"undefined")&&m(a,{opacity:l.opacity}),!e.is(l["fill-opacity"],"undefined")&&e.is(s["fill-opacity"],"undefined")&&m(a,{"fill-opacity":l["fill-opacity"]});else if((r.type=="circle"||r.type=="ellipse"||n(v).charAt()!="r")&&g(r,v)){if("opacity"in l||"fill-opacity"in l){var _=e._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(_){var D=_.getElementsByTagName("stop");m(D[D.length-1],{"stop-opacity":("opacity"in l?l.opacity:1)*("fill-opacity"in l?l["fill-opacity"]:1)})}}l.gradient=v,l.fill="none";break}M[t]("opacity")&&m(a,{"fill-opacity":M.opacity>1?M.opacity/100:M.opacity});case"stroke":M=e.getRGB(v),a.setAttribute(d,M.hex),d=="stroke"&&M[t]("opacity")&&m(a,{"stroke-opacity":M.opacity>1?M.opacity/100:M.opacity}),d=="stroke"&&r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1));break;case"gradient":(r.type=="circle"||r.type=="ellipse"||n(v).charAt()!="r")&&g(r,v);break;case"opacity":l.gradient&&!l[t]("stroke-opacity")&&m(a,{"stroke-opacity":v>1?v/100:v});case"fill-opacity":if(l.gradient){_=e._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,c)),_&&(D=_.getElementsByTagName("stop"),m(D[D.length-1],{"stop-opacity":v}));break};default:d=="font-size"&&(v=i(v,10)+"px");var P=d.replace(/(\-.)/g,function(e){return e.substring(1).toUpperCase()});a.style[P]=v,r._.dirty=1,a.setAttribute(d,v)}}T(r,s),a.style.visibility=h},x=1.2,T=function(r,s){if(r.type!="text"||!(s[t]("text")||s[t]("font")||s[t]("font-size")||s[t]("x")||s[t]("y")))return;var o=r.attrs,u=r.node,a=u.firstChild?i(e._g.doc.defaultView.getComputedStyle(u.firstChild,c).getPropertyValue("font-size"),10):10;if(s[t]("text")){o.text=s.text;while(u.firstChild)u.removeChild(u.firstChild);var f=n(s.text).split("\n"),l=[],h;for(var p=0,d=f.length;p<d;p++)h=m("tspan"),p&&m(h,{dy:a*x,x:o.x}),h.appendChild(e._g.doc.createTextNode(f[p])),u.appendChild(h),l[p]=h}else{l=u.getElementsByTagName("tspan");for(p=0,d=l.length;p<d;p++)p?m(l[p],{dy:a*x,x:o.x}):m(l[0],{dy:0})}m(u,{x:o.x,y:o.y}),r._.dirty=1;var v=r._getBBox(),g=o.y-(v.y+v.height/2);g&&e.is(g,"finite")&&m(l[0],{dy:g})},N=function(t,n){var r=0,i=0;this[0]=this.node=t,t.raphael=!0,this.id=e._oid++,t.raphaelid=this.id,this.matrix=e.matrix(),this.realPath=null,this.paper=n,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!n.bottom&&(n.bottom=this),this.prev=n.top,n.top&&(n.top.next=this),n.top=this,this.next=null},C=e.el;N.prototype=C,C.constructor=N,e._engine.path=function(e,t){var n=m("path");t.canvas&&t.canvas.appendChild(n);var r=new N(n,t);return r.type="path",S(r,{fill:"none",stroke:"#000",path:e}),r},C.rotate=function(e,t,i){if(this.removed)return this;e=n(e).split(f),e.length-1&&(t=r(
e[1]),i=r(e[2])),e=r(e[0]),i==null&&(t=i);if(t==null||i==null){var s=this.getBBox(1);t=s.x+s.width/2,i=s.y+s.height/2}return this.transform(this._.transform.concat([["r",e,t,i]])),this},C.scale=function(e,t,i,s){if(this.removed)return this;e=n(e).split(f),e.length-1&&(t=r(e[1]),i=r(e[2]),s=r(e[3])),e=r(e[0]),t==null&&(t=e),s==null&&(i=s);if(i==null||s==null)var o=this.getBBox(1);return i=i==null?o.x+o.width/2:i,s=s==null?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",e,t,i,s]])),this},C.translate=function(e,t){return this.removed?this:(e=n(e).split(f),e.length-1&&(t=r(e[1])),e=r(e[0])||0,t=+t||0,this.transform(this._.transform.concat([["t",e,t]])),this)},C.transform=function(n){var r=this._;if(n==null)return r.transform;e._extractTransform(this,n),this.clip&&m(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&m(this.node,{transform:this.matrix});if(r.sx!=1||r.sy!=1){var i=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},C.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},C.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},C.remove=function(){if(this.removed||!this.node.parentNode)return;var t=this.paper;t.__set__&&t.__set__.exclude(this),l.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),e._tear(this,t),this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var n in this)this[n]=typeof this[n]=="function"?e._removedFactory(n):null;this.removed=!0},C._getBBox=function(){if(this.node.style.display=="none"){this.show();var e=!0}var t={};try{t=this.node.getBBox()}catch(n){}finally{t=t||{}}return e&&this.hide(),t},C.attr=function(n,r){if(this.removed)return this;if(n==null){var i={};for(var s in this.attrs)this.attrs[t](s)&&(i[s]=this.attrs[s]);return i.gradient&&i.fill=="none"&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(r==null&&e.is(n,"string")){if(n=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(n=="transform")return this._.transform;var o=n.split(f),u={};for(var a=0,c=o.length;a<c;a++)n=o[a],n in this.attrs?u[n]=this.attrs[n]:e.is(this.paper.customAttributes[n],"function")?u[n]=this.paper.customAttributes[n].def:u[n]=e._availableAttrs[n];return c-1?u:u[o[0]]}if(r==null&&e.is(n,"array")){u={};for(a=0,c=n.length;a<c;a++)u[n[a]]=this.attr(n[a]);return u}if(r!=null){var h={};h[n]=r}else n!=null&&e.is(n,"object")&&(h=n);for(var p in h)l("raphael.attr."+p+"."+this.id,this,h[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&h[t](p)&&e.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(h[p]));this.attrs[p]=h[p];for(var v in d)d[t](v)&&(h[v]=d[v])}return S(this,h),this},C.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&e._tofront(this,t),this},C.toBack=function(){if(this.removed)return this;var t=this.node.parentNode;t.tagName.toLowerCase()=="a"?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),e._toback(this,this.paper);var n=this.paper;return this},C.insertAfter=function(t){if(this.removed)return this;var n=t.node||t[t.length-1].node;return n.nextSibling?n.parentNode.insertBefore(this.node,n.nextSibling):n.parentNode.appendChild(this.node),e._insertafter(this,t,this.paper),this},C.insertBefore=function(t){if(this.removed)return this;var n=t.node||t[0].node;return n.parentNode.insertBefore(this.node,n),e._insertbefore(this,t,this.paper),this},C.blur=function(t){var n=this;if(+t!==0){var r=m("filter"),i=m("feGaussianBlur");n.attrs.blur=t,r.id=e.createUUID(),m(i,{stdDeviation:+t||1.5}),r.appendChild(i),n.paper.defs.appendChild(r),n._blur=r,m(n.node,{filter:"url(#"+r.id+")"})}else n._blur&&(n._blur.parentNode.removeChild(n._blur),delete n._blur,delete n.attrs.blur),n.node.removeAttribute("filter")},e._engine.circle=function(e,t,n,r){var i=m("circle");e.canvas&&e.canvas.appendChild(i);var s=new N(i,e);return s.attrs={cx:t,cy:n,r:r,fill:"none",stroke:"#000"},s.type="circle",m(i,s.attrs),s},e._engine.rect=function(e,t,n,r,i,s){var o=m("rect");e.canvas&&e.canvas.appendChild(o);var u=new N(o,e);return u.attrs={x:t,y:n,width:r,height:i,r:s||0,rx:s||0,ry:s||0,fill:"none",stroke:"#000"},u.type="rect",m(o,u.attrs),u},e._engine.ellipse=function(e,t,n,r,i){var s=m("ellipse");e.canvas&&e.canvas.appendChild(s);var o=new N(s,e);return o.attrs={cx:t,cy:n,rx:r,ry:i,fill:"none",stroke:"#000"},o.type="ellipse",m(s,o.attrs),o},e._engine.image=function(e,t,n,r,i,s){var o=m("image");m(o,{x:n,y:r,width:i,height:s,preserveAspectRatio:"none"}),o.setAttributeNS(p,"href",t),e.canvas&&e.canvas.appendChild(o);var u=new N(o,e);return u.attrs={x:n,y:r,width:i,height:s,src:t},u.type="image",u},e._engine.text=function(t,n,r,i){var s=m("text");t.canvas&&t.canvas.appendChild(s);var o=new N(s,t);return o.attrs={x:n,y:r,"text-anchor":"middle",text:i,font:e._availableAttrs.font,stroke:"none",fill:"#000"},o.type="text",S(o,o.attrs),o},e._engine.setSize=function(e,t){return this.width=e||this.width,this.height=t||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},e._engine.create=function(){var t=e._getContainer.apply(0,arguments),n=t&&t.container,r=t.x,i=t.y,s=t.width,o=t.height;if(!n)throw new Error("SVG container not found.");var u=m("svg"),a="overflow:hidden;",f;return r=r||0,i=i||0,s=s||512,o=o||342,m(u,{height:o,version:1.1,width:s,xmlns:"http://www.w3.org/2000/svg"}),n==1?(u.style.cssText=a+"position:absolute;left:"+r+"px;top:"+i+"px",e._g.doc.body.appendChild(u),f=1):(u.style.cssText=a+"position:relative",n.firstChild?n.insertBefore(u,n.firstChild):n.appendChild(u)),n=new e._Paper,n.width=s,n.height=o,n.canvas=u,n.clear(),n._left=n._top=0,f&&(n.renderfix=function(){}),n.renderfix(),n},e._engine.setViewBox=function(e,t,n,r,i){l("raphael.setViewBox",this,this._viewBox,[e,t,n,r,i]);var s=o(n/this.width,r/this.height),u=this.top,a=i?"meet":"xMinYMin",f,c;e==null?(this._vbSize&&(s=1),delete this._vbSize,f="0 0 "+this.width+h+this.height):(this._vbSize=s,f=e+h+t+h+n+h+r),m(this.canvas,{viewBox:f,preserveAspectRatio:a});while(s&&u)c="stroke-width"in u.attrs?u.attrs["stroke-width"]:1,u.attr({"stroke-width":c}),u._.dirty=1,u._.dirtyT=1,u=u.prev;return this._viewBox=[e,t,n,r,!!i],this},e.prototype.renderfix=function(){var e=this.canvas,t=e.style,n;try{n=e.getScreenCTM()||e.createSVGMatrix()}catch(r){n=e.createSVGMatrix()}var i=-n.e%1,s=-n.f%1;if(i||s)i&&(this._left=(this._left+i)%1,t.left=this._left+"px"),s&&(this._top=(this._top+s)%1,t.top=this._top+"px")},e.prototype.clear=function(){e.eve("raphael.clear",this);var t=this.canvas;while(t.firstChild)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=m("desc")).appendChild(e._g.doc.createTextNode("Created with Raphaël "+e.version)),t.appendChild(this.desc),t.appendChild(this.defs=m("defs"))},e.prototype.remove=function(){l("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?e._removedFactory(t):null};var k=e.st;for(var L in C)C[t](L)&&!k[t](L)&&(k[L]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e].apply(n,t)})}}(L))}(window.Raphael),window.Raphael.vml&&function(e){var t="hasOwnProperty",n=String,r=parseFloat,i=Math,s=i.round,o=i.max,u=i.min,a=i.abs,f="fill",l=/[, ]+/,c=e.eve,h=" progid:DXImageTransform.Microsoft",p=" ",d="",v={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},m=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,b="position:absolute;left:0;top:0;width:1px;height:1px",w=21600,E={path:1,rect:1,image:1},S={circle:1,ellipse:1},x=function(t){var r=/[ahqstv]/ig,i=e._pathToAbsolute;n(t).match(r)&&(i=e._path2curve),r=/[clmz]/g;if(i==e._pathToAbsolute&&!n(t).match(r)){var o=n(t).replace(m,function(e,t,n){var r=[],i=t.toLowerCase()=="m",o=v[t];return n.replace(y,function(e){i&&r.length==2&&(o+=r+v[t=="m"?"l":"L"],r=[]),r.push(s(e*w))}),o+r});return o}var u=i(t),a,f;o=[];for(var l=0,c=u.length;l<c;l++){a=u[l],f=u[l][0].toLowerCase(),f=="z"&&(f="x");for(var h=1,g=a.length;h<g;h++)f+=s(a[h]*w)+(h!=g-1?",":d);o.push(f)}return o.join(p)},T=function(t,n,r){var i=e.matrix();return i.rotate(-t,.5,.5),{dx:i.x(n,r),dy:i.y(n,r)}},N=function(e,t,n,r,i,s){var o=e._,u=e.matrix,l=o.fillpos,c=e.node,h=c.style,d=1,v="",m,g=w/t,y=w/n;h.visibility="hidden";if(!t||!n)return;c.coordsize=a(g)+p+a(y),h.rotation=s*(t*n<0?-1:1);if(s){var b=T(s,r,i);r=b.dx,i=b.dy}t<0&&(v+="x"),n<0&&(v+=" y")&&(d=-1),h.flip=v,c.coordorigin=r*-g+p+i*-y;if(l||o.fillsize){var E=c.getElementsByTagName(f);E=E&&E[0],c.removeChild(E),l&&(b=T(s,u.x(l[0],l[1]),u.y(l[0],l[1])),E.position=b.dx*d+p+b.dy*d),o.fillsize&&(E.size=o.fillsize[0]*a(t)+p+o.fillsize[1]*a(n)),c.appendChild(E)}h.visibility="visible"};e.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var C=function(e,t,r){var i=n(t).toLowerCase().split("-"),s=r?"end":"start",o=i.length,u="classic",a="medium",f="medium";while(o--)switch(i[o]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":u=i[o];break;case"wide":case"narrow":f=i[o];break;case"long":case"short":a=i[o]}var l=e.node.getElementsByTagName("stroke")[0];l[s+"arrow"]=u,l[s+"arrowlength"]=a,l[s+"arrowwidth"]=f},k=function(i,a){i.attrs=i.attrs||{};var c=i.node,h=i.attrs,v=c.style,m,g=E[i.type]&&(a.x!=h.x||a.y!=h.y||a.width!=h.width||a.height!=h.height||a.cx!=h.cx||a.cy!=h.cy||a.rx!=h.rx||a.ry!=h.ry||a.r!=h.r),y=S[i.type]&&(h.cx!=a.cx||h.cy!=a.cy||h.r!=a.r||h.rx!=a.rx||h.ry!=a.ry),b=i;for(var T in a)a[t](T)&&(h[T]=a[T]);g&&(h.path=e._getPath[i.type](i),i._.dirty=1),a.href&&(c.href=a.href),a.title&&(c.title=a.title),a.target&&(c.target=a.target),a.cursor&&(v.cursor=a.cursor),"blur"in a&&i.blur(a.blur);if(a.path&&i.type=="path"||g)c.path=x(~n(h.path).toLowerCase().indexOf("r")?e._pathToAbsolute(h.path):h.path),i.type=="image"&&(i._.fillpos=[h.x,h.y],i._.fillsize=[h.width,h.height],N(i,1,1,0,0,0));"transform"in a&&i.transform(a.transform);if(y){var k=+h.cx,A=+h.cy,O=+h.rx||+h.r||0,_=+h.ry||+h.r||0;c.path=e.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",s((k-O)*w),s((A-_)*w),s((k+O)*w),s((A+_)*w),s(k*w))}if("clip-rect"in a){var D=n(a["clip-rect"]).split(l);if(D.length==4){D[2]=+D[2]+ +D[0],D[3]=+D[3]+ +D[1];var P=c.clipRect||e._g.doc.createElement("div"),H=P.style;H.clip=e.format("rect({1}px {2}px {3}px {0}px)",D),c.clipRect||(H.position="absolute",H.top=0,H.left=0,H.width=i.paper.width+"px",H.height=i.paper.height+"px",c.parentNode.insertBefore(P,c),P.appendChild(c),c.clipRect=P)}a["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(i.textpath){var B=i.textpath.style;a.font&&(B.font=a.font),a["font-family"]&&(B.fontFamily='"'+a["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),a["font-size"]&&(B.fontSize=a["font-size"]),a["font-weight"]&&(B.fontWeight=a["font-weight"]),a["font-style"]&&(B.fontStyle=a["font-style"])}"arrow-start"in a&&C(b,a["arrow-start"]),"arrow-end"in a&&C(b,a["arrow-end"],1);if(a.opacity!=null||a["stroke-width"]!=null||a.fill!=null||a.src!=null||a.stroke!=null||a["stroke-width"]!=null||a["stroke-opacity"]!=null||a["fill-opacity"]!=null||a["stroke-dasharray"]!=null||a["stroke-miterlimit"]!=null||a["stroke-linejoin"]!=null||a["stroke-linecap"]!=null){var j=c.getElementsByTagName(f),F=!1;j=j&&j[0],!j&&(F=j=M(f)),i.type=="image"&&a.src&&(j.src=a.src),a.fill&&(j.on=!0);if(j.on==null||a.fill=="none"||a.fill===null)j.on=!1;if(j.on&&a.fill){var I=n(a.fill).match(e._ISURL);if(I){j.parentNode==c&&c.removeChild(j),j.rotate=!0,j.src=I[1],j.type="tile";var q=i.getBBox(1);j.position=q.x+p+q.y,i._.fillpos=[q.x,q.y],e._preload(I[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})}else j.color=e.getRGB(a.fill).hex,j.src=d,j.type="solid",e.getRGB(a.fill).error&&(b.type in{circle:1,ellipse:1}||n(a.fill).charAt()!="r")&&L(b,a.fill,j)&&(h.fill="none",h.gradient=a.fill,j.rotate=!1)}if("fill-opacity"in a||"opacity"in a){var U=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+e.getRGB(a.fill).o+1||2)-1);U=u(o(U,0),1),j.opacity=U,j.src&&(j.color="none")}c.appendChild(j);var z=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],W=!1;!z&&(W=z=M("stroke"));if(a.stroke&&a.stroke!="none"||a["stroke-width"]||a["stroke-opacity"]!=null||a["stroke-dasharray"]||a["stroke-miterlimit"]||a["stroke-linejoin"]||a["stroke-linecap"])z.on=!0;(a.stroke=="none"||a.stroke===null||z.on==null||a.stroke==0||a["stroke-width"]==0)&&(z.on=!1);var X=e.getRGB(a.stroke);z.on&&a.stroke&&(z.color=X.hex),U=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+X.o+1||2)-1);var V=(r(a["stroke-width"])||1)*.75;U=u(o(U,0),1),a["stroke-width"]==null&&(V=h["stroke-width"]),a["stroke-width"]&&(z.weight=V),V&&V<1&&(U*=V)&&(z.weight=1),z.opacity=U,a["stroke-linejoin"]&&(z.joinstyle=a["stroke-linejoin"]||"miter"),z.miterlimit=a["stroke-miterlimit"]||8,a["stroke-linecap"]&&(z.endcap=a["stroke-linecap"]=="butt"?"flat":a["stroke-linecap"]=="square"?"square":"round");if(a["stroke-dasharray"]){var $={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};z.dashstyle=$[t](a["stroke-dasharray"])?$[a["stroke-dasharray"]]:d}W&&c.appendChild(z)}if(b.type=="text"){b.paper.canvas.style.display=d;var J=b.paper.span,K=100,Q=h.font&&h.font.match(/\d+(?:\.\d*)?(?=px)/);v=J.style,h.font&&(v.font=h.font),h["font-family"]&&(v.fontFamily=h["font-family"]),h["font-weight"]&&(v.fontWeight=h["font-weight"]),h["font-style"]&&(v.fontStyle=h["font-style"]),Q=r(h["font-size"]||Q&&Q[0])||10,v.fontSize=Q*K+"px",b.textpath.string&&(J.innerHTML=n(b.textpath.string).replace(/</g,"<").replace(/&/g,"&").replace(/\n/g,"<br>"));var G=J.getBoundingClientRect();b.W=h.w=(G.right-G.left)/K,b.H=h.h=(G.bottom-G.top)/K,b.X=h.x,b.Y=h.y+b.H/2,("x"in a||"y"in a)&&(b.path.v=e.format("m{0},{1}l{2},{1}",s(h.x*w),s(h.y*w),s(h.x*w)+1));var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var Z=0,et=Y.length;Z<et;Z++)if(Y[Z]in a){b._.dirty=1;break}switch(h["text-anchor"]){case"start":b.textpath.style["v-text-align"]="left",b.bbx=b.W/2;break;case"end":b.textpath.style["v-text-align"]="right",b.bbx=-b.W/2;break;default:b.textpath.style["v-text-align"]="center",b.bbx=0}b.textpath.style["v-text-kern"]=!0}},L=function(t,s,o){t.attrs=t.attrs||{};var u=t.attrs,a=Math.pow,f,l,c="linear",h=".5 .5";t.attrs.gradient=s,s=n(s).replace(e._radial_gradient,function(e,t,n){return c="radial",t&&n&&(t=r(t),n=r(n),a(t-.5,2)+a(n-.5,2)>.25&&(n=i.sqrt(.25-a(t-.5,2))*((n>.5)*2-1)+.5),h=t+p+n),d}),s=s.split(/\s*\-\s*/);if(c=="linear"){var v=s.shift();v=-r(v);if(isNaN(v))return null}var m=e._parseDots(s);if(!m)return null;t=t.shape||t.node;if(m.length){t.removeChild(o),o.on=!0,o.method="none",o.color=m[0].color,o.color2=m[m.length-1].color;var g=[];for(var y=0,b=m.length;y<b;y++)m[y].offset&&g.push(m[y].offset+p+m[y].color);o.colors=g.length?g.join():"0% "+o.color,c=="radial"?(o.type="gradientTitle",o.focus="100%",o.focussize="0 0",o.focusposition=h,o.angle=0):(o.type="gradient",o.angle=(270-v)%360),t.appendChild(o)}return 1},A=function(t,n){this[0]=this.node=t,t.raphael=!0,this.id=e._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=n,this.matrix=e.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!n.bottom&&(n.bottom=this),this.prev=n.top,n.top&&(n.top.next=this),n.top=this,this.next=null},O=e.el;A.prototype=O,O.constructor=A,O.transform=function(t){if(t==null)return this._.transform;var r=this.paper._viewBoxShift,i=r?"s"+[r.scale,r.scale]+"-1-1t"+[r.dx,r.dy]:d,s;r&&(s=t=n(t).replace(/\.{3}|\u2026/g,this._.transform||d)),e._extractTransform(this,i+t);var o=this.matrix.clone(),u=this.skew,a=this.node,f,l=~n(this.attrs.fill).indexOf("-"),c=!n(this.attrs.fill).indexOf("url(");o.translate(-0.5,-0.5);if(c||l||this.type=="image"){u.matrix="1 0 0 1",u.offset="0 0",f=o.split();if(l&&f.noRotation||!f.isSimple){a.style.filter=o.toFilter();var h=this.getBBox(),v=this.getBBox(1),m=h.x-v.x,g=h.y-v.y;a.coordorigin=m*-w+p+g*-w,N(this,1,1,m,g,0)}else a.style.filter=d,N(this,f.scalex,f.scaley,f.dx,f.dy,f.rotate)}else a.style.filter=d,u.matrix=n(o),u.offset=o.offset();return s&&(this._.transform=s),this},O.rotate=function(e,t,i){if(this.removed)return this;if(e==null)return;e=n(e).split(l),e.length-1&&(t=r(e[1]),i=r(e[2])),e=r(e[0]),i==null&&(t=i);if(t==null||i==null){var s=this.getBBox(1);t=s.x+s.width/2,i=s.y+s.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",e,t,i]])),this},O.translate=function(e,t){return this.removed?this:(e=n(e).split(l),e.length-1&&(t=r(e[1])),e=r(e[0])||0,t=+t||0,this._.bbox&&(this._.bbox.x+=e,this._.bbox.y+=t),this.transform(this._.transform.concat([["t",e,t]])),this)},O.scale=function(e,t,i,s){if(this.removed)return this;e=n(e).split(l),e.length-1&&(t=r(e[1]),i=r(e[2]),s=r(e[3]),isNaN(i)&&(i=null),isNaN(s)&&(s=null)),e=r(e[0]),t==null&&(t=e),s==null&&(i=s);if(i==null||s==null)var o=this.getBBox(1);return i=i==null?o.x+o.width/2:i,s=s==null?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",e,t,i,s]])),this._.dirtyT=1,this},O.hide=function(){return!this.removed&&(this.node.style.display="none"),this},O.show=function(){return!this.removed&&(this.node.style.display=d),this},O._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},O.remove=function(){if(this.removed||!this.node.parentNode)return;this.paper.__set__&&this.paper.__set__.exclude(this),e.eve.unbind("raphael.*.*."+this.id),e._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]=typeof this[t]=="function"?e._removedFactory(t):null;this.removed=!0},O.attr=function(n,r){if(this.removed)return this;if(n==null){var i={};for(var s in this.attrs)this.attrs[t](s)&&(i[s]=this.attrs[s]);return i.gradient&&i.fill=="none"&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(r==null&&e.is(n,"string")){if(n==f&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;var o=n.split(l),u={};for(var a=0,h=o.length;a<h;a++)n=o[a],n in this.attrs?u[n]=this.attrs[n]:e.is(this.paper.customAttributes[n],"function")?u[n]=this.paper.customAttributes[n].def:u[n]=e._availableAttrs[n];return h-1?u:u[o[0]]}if(this.attrs&&r==null&&e.is(n,"array")){u={};for(a=0,h=n.length;a<h;a++)u[n[a]]=this.attr(n[a]);return u}var p;r!=null&&(p={},p[n]=r),r==null&&e.is(n,"object")&&(p=n);for(var d in p)c("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[t](d)&&p[t](d)&&e.is(this.paper.customAttributes[d],"function")){var v=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var m in v)v[t](m)&&(p[m]=v[m])}p.text&&this.type=="text"&&(this.textpath.string=p.text),k(this,p)}return this},O.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&e._tofront(this,this.paper),this},O.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),e._toback(this,this.paper)),this)},O.insertAfter=function(t){return this.removed?this:(t.constructor==e.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),e._insertafter(this,t,this.paper),this)},O.insertBefore=function(t){return this.removed?this:(t.constructor==e.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),e._insertbefore(this,t,this.paper),this)},O.blur=function(t){var n=this.node.runtimeStyle,r=n.filter;r=r.replace(g,d),+t!==0?(this.attrs.blur=t,n.filter=r+p+h+".Blur(pixelradius="+(+t||1.5)+")",n.margin=e.format("-{0}px 0 0 -{0}px",s(+t||1.5))):(n.filter=r,n.margin=0,delete this.attrs.blur)},e._engine.path=function(e,t){var n=M("shape");n.style.cssText=b,n.coordsize=w+p+w,n.coordorigin=t.coordorigin;var r=new A(n,t),i={fill:"none",stroke:"#000"};e&&(i.path=e),r.type="path",r.path=[],r.Path=d,k(r,i),t.canvas.appendChild(n);var s=M("skew");return s.on=!0,n.appendChild(s),r.skew=s,r.transform(d),r},e._engine.rect=function(t,n,r,i,s,o){var u=e._rectPath(n,r,i,s,o),a=t.path(u),f=a.attrs;return a.X=f.x=n,a.Y=f.y=r,a.W=f.width=i,a.H=f.height=s,f.r=o,f.path=u,a.type="rect",a},e._engine.ellipse=function(e,t,n,r,i){var s=e.path(),o=s.attrs;return s.X=t-r,s.Y=n-i,s.W=r*2,s.H=i*2,s.type="ellipse",k(s,{cx:t,cy:n,rx:r,ry:i}),s},e._engine.circle=function(e,t,n,r){var i=e.path(),s=i.attrs;return i.X=t-r,i.Y=n-r,i.W=i.H=r*2,i.type="circle",k(i,{cx:t,cy:n,r:r}),i},e._engine.image=function(t,n,r,i,s,o){var u=e._rectPath(r,i,s,o),a=t.path(u).attr({stroke:"none"}),l=a.attrs,c=a.node,h=c.getElementsByTagName(f)[0];return l.src=n,a.X=l.x=r,a.Y=l.y=i,a.W=l.width=s,a.H=l.height=o,l.path=u,a.type="image",h.parentNode==c&&c.removeChild(h),h.rotate=!0,h.src=n,h.type="tile",a._.fillpos=[r,i],a._.fillsize=[s,o],c.appendChild(h),N(a,1,1,0,0,0),a},e._engine.text=function(t,r,i,o){var u=M("shape"),a=M("path"),f=M("textpath");r=r||0,i=i||0,o=o||"",a.v=e.format("m{0},{1}l{2},{1}",s(r*w),s(i*w),s(r*w)+1),a.textpathok=!0,f.string=n(o),f.on=!0,u.style.cssText=b,u.coordsize=w+p+w,u.coordorigin="0 0";var l=new A(u,t),c={fill:"#000",stroke:"none",font:e._availableAttrs.font,text:o};l.shape=u,l.path=a,l.textpath=f,l.type="text",l.attrs.text=n(o),l.attrs.x=r,l.attrs.y=i,l.attrs.w=1,l.attrs.h=1,k(l,c),u.appendChild(f),u.appendChild(a),t.canvas.appendChild(u);var h=M("skew");return h.on=!0,u.appendChild(h),l.skew=h,l.transform(d),l},e._engine.setSize=function(t,n){var r=this.canvas.style;return this.width=t,this.height=n,t==+t&&(t+="px"),n==+n&&(n+="px"),r.width=t,r.height=n,r.clip="rect(0 "+t+" "+n+" 0)",this._viewBox&&e._engine.setViewBox.apply(this,this._viewBox),this},e._engine.setViewBox=function(t,n,r,i,s){e.eve("raphael.setViewBox",this,this._viewBox,[t,n,r,i,s]);var u=this.width,a=this.height,f=1/o(r/u,i/a),l,c;return s&&(l=a/i,c=u/r,r*l<u&&(t-=(u-r*l)/2/l),i*c<a&&(n-=(a-i*c)/2/c)),this._viewBox=[t,n,r,i,!!s],this._viewBoxShift={dx:-t,dy:-n,scale:f},this.forEach(function(e){e.transform("...")}),this};var M;e._engine.initWin=function(e){var t=e.document;t.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!t.namespaces.rvml&&t.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),M=function(e){return t.createElement("<rvml:"+e+' class="rvml">')}}catch(n){M=function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},e._engine.initWin(e._g.win),e._engine.create=function(){var t=e._getContainer.apply(0,arguments),n=t.container,r=t.height,i,s=t.width,o=t.x,u=t.y;if(!n)throw new Error("VML container not found.");var a=new e._Paper,f=a.canvas=e._g.doc.createElement("div"),l=f.style;return o=o||0,u=u||0,s=s||512,r=r||342,a.width=s,a.height=r,s==+s&&(s+="px"),r==+r&&(r+="px"),a.coordsize=w*1e3+p+w*1e3,a.coordorigin="0 0",a.span=e._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",f.appendChild(a.span),l.cssText=e.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",s,r),n==1?(e._g.doc.body.appendChild(f),l.left=o+"px",l.top=u+"px",l.position="absolute"):n.firstChild?n.insertBefore(f,n.firstChild):n.appendChild(f),a.renderfix=function(){},a},e.prototype.clear=function(){e.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=e._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},e.prototype.remove=function(){e.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?e._removedFactory(t):null;return!0};var _=e.st;for(var D in O)O[t](D)&&!_[t](D)&&(_[D]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e].apply(n,t)})}}(D))}(window.Raphael),function(){function r(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function s(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function o(e){return Array.prototype.slice.call(e)}function f(){}function h(e){return e}function p(){return this}function d(){return!0}function v(e){return typeof e=="function"?e:function(){return e}}function m(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function g(e){return e!=null&&!isNaN(e)}function y(e){return e.length}function w(e){return e==null}function E(e){return e.trim().replace(/\s+/g," ")}function S(e){var t=1;while(e*t%1)t*=10;return t}function N(){}function C(e){function r(){var n=t,r=-1,i=n.length,s;while(++r<i)(s=n[r].on)&&s.apply(this,arguments);return e}var t=[],n=new f;return r.on=function(r,i){var s=n.get(r),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function A(e,t){return t-(e?1+Math.floor(Math.log(e+Math.pow(10,1+Math.floor(Math.log(e)/Math.LN10)-t))/Math.LN10):1)}function O(e){return e+""}function M(e){var t=e.lastIndexOf("."),n=t>=0?e.substring(t):(t=e.length,""),r=[];while(t>0)r.push(e.substring(t-=3,t+3));return r.reverse().join(",")+n}function D(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function I(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function q(e){return function(t){return 1-e(1-t)}}function R(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function U(e){return e}function z(e){return function(t){return Math.pow(t,e)}}function W(e){return 1-Math.cos(e*Math.PI/2)}function X(e){return Math.pow(2,10*(e-1))}function V(e){return 1-Math.sqrt(1-e*e)}function $(e,t){var n;return arguments.length<2&&(t=.45),arguments.length<1?(e=1,n=t/4):n=t/(2*Math.PI)*Math.asin(1/e),function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*Math.PI/t)}}function J(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function K(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Q(){d3.event.stopPropagation(),d3.event.preventDefault()}function G(){var e=d3.event,t;while(t=e.sourceEvent)e=t;return e}function Y(e){var t=new N,n=0,r=arguments.length;while(++n<r)t[arguments[n]]=C(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=d3.event;i.target=e,d3.event=i,t[i.type].apply(n,r)}finally{d3.event=s}}},t}function et(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function tt(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function nt(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function rt(e,t,n){return new it(e,t,n)}function it(e,t,n){this.r=e,this.g=t,this.b=n}function st(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ot(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(lt(u[0]),lt(u[1]),lt(u[2]))}}return(a=ct.get(e))?t(a.r,a.g,a.b):(e!=null&&e.charAt(0)==="#"&&(e.length===4?(r=e.charAt(1),r+=r,i=e.charAt(2),i+=i,s=e.charAt(3),s+=s):e.length===7&&(r=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7)),r=parseInt(r,16),i=parseInt(i,16),s=parseInt(s,16)),t(r,i,s))}function ut(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;return s?(u=a<.5?s/(i+r):s/(2-i-r),e==i?o=(t-n)/s+(t<n?6:0):t==i?o=(n-e)/s+2:o=(e-t)/s+4,o*=60):u=o=0,ht(o,u,a)}function at(e,t,n){e=ft(e),t=ft(t),n=ft(n);var r=kt((.4124564*e+.3575761*t+.1804375*n)/Et),i=kt((.2126729*e+.7151522*t+.072175*n)/St),s=kt((.0193339*e+.119192*t+.9503041*n)/xt);return yt(116*i-16,500*(r-i),200*(i-s))}function ft(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function ht(e,t,n){return new pt(e,t,n)}function pt(e,t,n){this.h=e,this.s=t,this.l=n}function dt(e,t,n){function s(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}function o(e){return Math.round(s(e)*255)}var r,i;return e%=360,e<0&&(e+=360),t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i,rt(o(e+120),o(e),o(e-120))}function vt(e,t,n){return new mt(e,t,n)}function mt(e,t,n){this.h=e,this.c=t,this.l=n}function gt(e,t,n){return yt(n,Math.cos(e*=Math.PI/180)*t,Math.sin(e)*t)}function yt(e,t,n){return new bt(e,t,n)}function bt(e,t,n){this.l=e,this.a=t,this.b=n}function Tt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=Ct(i)*Et,r=Ct(r)*St,s=Ct(s)*xt,rt(Lt(3.2404542*i-1.5371385*r-.4985314*s),Lt(-0.969266*i+1.8760108*r+.041556*s),Lt(.0556434*i-.2040259*r+1.0572252*s))}function Nt(e,t,n){return vt(Math.atan2(n,t)/Math.PI*180,Math.sqrt(t*t+n*n),e)}function Ct(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function kt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Lt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function At(e){return a(e,Ht),e}function Bt(e){return function(){return Ot(e,this)}}function jt(e){return function(){return Mt(e,this)}}function Ft(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=d3.ns.qualify(e),t==null?e.local?r:n:typeof t=="function"?e.local?u:o:e.local?s:i}function It(e){return new RegExp("(?:^|\\s+)"+d3.requote(e)+"(?:\\s+|$)","g")}function qt(e,t){function r(){var r=-1;while(++r<n)e[r](this,t)}function i(){var r=-1,i=t.apply(this,arguments);while(++r<n)e[r](this,i)}e=e.trim().split(/\s+/).map(Rt);var n=e.length;return typeof t=="function"?i:r}function Rt(e){var t=It(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.className,s=i.baseVal!=null,o=s?i.baseVal:i;r?(t.lastIndex=0,t.test(o)||(o=E(o+" "+e),s?i.baseVal=o:n.className=o)):o&&(o=E(o.replace(t," ")),s?i.baseVal=o:n.className=o)}}function Ut(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return t==null?r:typeof t=="function"?s:i}function zt(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}return t==null?n:typeof t=="function"?i:r}function Wt(e){return{__data__:e}}function Xt(e){return function(){return Pt(this,e)}}function Vt(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function $t(e,t,n){function s(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}function o(){function u(e){var n=d3.event;d3.event=e,o[0]=i.__data__;try{t.apply(i,o)}finally{d3.event=n}}var i=this,o=arguments;s.call(this),this.addEventListener(e,this[r]=u,u.$=n),u._=t}var r="__on"+e,i=e.indexOf(".");return i>0&&(e=e.substring(0,i)),t?o:s}function Jt(e,t){for(var n=0,r=e.length;n<r;n++)for(var i=e[n],s=0,o=i.length,u;s<o;s++)(u=i[s])&&t(u,s,n);return e}function Qt(e){return a(e,Gt),e}function Yt(e,t,n){a(e,Zt);var r=new f,i=d3.dispatch("start","end"),s=an;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?r.get(t):(n==null?r.remove(t):r.set(t,n),e)},e.ease=function(t){return arguments
.length?(s=typeof t=="function"?t:d3.ease.apply(d3,arguments),e):s},e.each=function(t,n){return arguments.length<2?fn.call(e,t):(i.on(t,n),e)},d3.timer(function(o){return Jt(e,function(e,u,a){function d(s){return h.active>t?m():(h.active=t,r.forEach(function(t,n){(n=n.call(e,p,u))&&f.push(n)}),i.start.call(e,p,u),v(s)||d3.timer(v,0,n),1)}function v(n){if(h.active!==t)return m();var r=(n-l)/c,o=s(r),a=f.length;while(a>0)f[--a].call(e,o);if(r>=1)return m(),tn=t,i.end.call(e,p,u),tn=0,1}function m(){return--h.count||delete e.__transition__,1}var f=[],l=e.delay,c=e.duration,h=(e=e.node).__transition__||(e.__transition__={active:0,count:0}),p=e.__data__;++h.count,l<=o?d(o):d3.timer(d,l,n)})},0,n),e}function fn(e){var t=tn,n=an,r=on,i=un;return tn=this.id,an=this.ease(),Jt(this,function(t,n,r){on=t.delay,un=t.duration,e.call(t=t.node,t.__data__,n,r)}),tn=t,an=n,on=r,un=i,this}function cn(e,t,n){return n!=""&&ln}function hn(e,t){return d3.tween(e,et(t))}function mn(){var e,t=Date.now(),n=pn;while(n)e=t-n.then,e>=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=gn()-t;r>24?(isFinite(r)&&(clearTimeout(vn),vn=setTimeout(mn,r)),dn=0):(dn=1,yn(mn))}function gn(){var e=null,t=pn,n=Infinity;while(t)t.flush?t=e?e.next=t.next:pn=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function bn(e){var t=[e.a,e.b],n=[e.c,e.d],r=En(t),i=wn(t,n),s=En(Sn(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*xn,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*xn:0}function wn(e,t){return e[0]*t[0]+e[1]*t[1]}function En(e){var t=Math.sqrt(wn(e,e));return t&&(e[0]/=t,e[1]/=t),t}function Sn(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Cn(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Nn<0&&(window.scrollX||window.scrollY)){n=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=n[0][0].getScreenCTM();Nn=!i.f&&!i.e,n.remove()}return Nn?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function kn(){}function Ln(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function An(e){return e.rangeExtent?e.rangeExtent():Ln(e.range())}function On(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;s<i&&(o=n,n=r,r=o,o=i,i=s,s=o);if(t=t(s-i))e[n]=t.floor(i),e[r]=t.ceil(s);return e}function Mn(){return Math}function _n(e,t,n,r){function o(){var o=Math.min(e.length,t.length)>2?In:Fn,a=r?nt:tt;return i=o(e,t,a,n),s=o(t,e,a,d3.interpolate),u}function u(e){return i(e)}var i,s;return u.invert=function(e){return s(e)},u.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},u.range=function(e){return arguments.length?(t=e,o()):t},u.rangeRound=function(e){return u.range(e).interpolate(d3.interpolateRound)},u.clamp=function(e){return arguments.length?(r=e,o()):r},u.interpolate=function(e){return arguments.length?(n=e,o()):n},u.ticks=function(t){return Bn(e,t)},u.tickFormat=function(t){return jn(e,t)},u.nice=function(){return On(e,Pn),o()},u.copy=function(){return _n(e,t,n,r)},o()}function Dn(e,t){return d3.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Pn(e){return e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1),e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Hn(e,t){var n=Ln(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function Bn(e,t){return d3.range.apply(d3,Hn(e,t))}function jn(e,t){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Hn(e,t)[2])/Math.LN10+.01))+"f")}function Fn(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function In(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());while(++o<=u)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=d3.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function qn(e,t){function r(n){return e(t(n))}var n=t.pow;return r.invert=function(t){return n(e.invert(t))},r.domain=function(i){return arguments.length?(t=i[0]<0?zn:Un,n=t.pow,e.domain(i.map(t)),r):e.domain().map(n)},r.nice=function(){return e.domain(On(e.domain(),Mn)),r},r.ticks=function(){var r=Ln(e.domain()),i=[];if(r.every(isFinite)){var s=Math.floor(r[0]),o=Math.ceil(r[1]),u=n(r[0]),a=n(r[1]);if(t===zn){i.push(n(s));for(;s++<o;)for(var f=9;f>0;f--)i.push(n(s)*f)}else{for(;s<o;s++)for(var f=1;f<10;f++)i.push(n(s)*f);i.push(n(s))}for(s=0;i[s]<u;s++);for(o=i.length;i[o-1]>a;o--);i=i.slice(s,o)}return i},r.tickFormat=function(e,i){arguments.length<2&&(i=Rn);if(arguments.length<1)return i;var s=Math.max(.1,e/r.ticks().length),o=t===zn?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil),u;return function(e){return e/n(o(t(e)+u))<=s?i(e):""}},r.copy=function(){return qn(e.copy(),t)},Dn(r,e)}function Un(e){return Math.log(e<0?0:e)/Math.LN10}function zn(e){return-Math.log(e>0?0:-e)/Math.LN10}function Wn(e,t){function i(t){return e(n(t))}var n=Xn(t),r=Xn(1/t);return i.invert=function(t){return r(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t.map(n)),i):e.domain().map(r)},i.ticks=function(e){return Bn(i.domain(),e)},i.tickFormat=function(e){return jn(i.domain(),e)},i.nice=function(){return i.domain(On(i.domain(),Pn))},i.exponent=function(e){if(!arguments.length)return t;var s=i.domain();return n=Xn(t=e),r=Xn(1/t),i.domain(s)},i.copy=function(){return Wn(e.copy(),t)},Dn(i,e)}function Xn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Vn(e,t){function s(t){return r[((n.get(t)||n.set(t,e.push(t)))-1)%r.length]}function o(t,n){return d3.range(e.length).map(function(e){return t+n*e})}var n,r,i;return s.domain=function(r){if(!arguments.length)return e;e=[],n=new f;var i=-1,o=r.length,u;while(++i<o)n.has(u=r[i])||n.set(u,e.push(u));return s[t.t].apply(s,t.a)},s.range=function(e){return arguments.length?(r=e,i=0,t={t:"range",a:arguments},s):r},s.rangePoints=function(n,u){arguments.length<2&&(u=0);var a=n[0],f=n[1],l=(f-a)/(e.length-1+u);return r=o(e.length<2?(a+f)/2:a+l*u/2,l),i=0,t={t:"rangePoints",a:arguments},s},s.rangeBands=function(n,u,a){arguments.length<2&&(u=0),arguments.length<3&&(a=u);var f=n[1]<n[0],l=n[f-0],c=n[1-f],h=(c-l)/(e.length-u+2*a);return r=o(l+h*a,h),f&&r.reverse(),i=h*(1-u),t={t:"rangeBands",a:arguments},s},s.rangeRoundBands=function(n,u,a){arguments.length<2&&(u=0),arguments.length<3&&(a=u);var f=n[1]<n[0],l=n[f-0],c=n[1-f],h=Math.floor((c-l)/(e.length-u+2*a)),p=c-l-(e.length-u)*h;return r=o(l+Math.round(p/2),h),f&&r.reverse(),i=Math.round(h*(1-u)),t={t:"rangeRoundBands",a:arguments},s},s.rangeBand=function(){return i},s.rangeExtent=function(){return Ln(t.a[0])},s.copy=function(){return Vn(e,t)},s.domain(e)}function Gn(e,t){function r(){var r=0,s=e.length,o=t.length;n=[];while(++r<o)n[r-1]=d3.quantile(e,r/o);return i}function i(e){return isNaN(e=+e)?NaN:t[d3.bisect(n,e)]}var n;return i.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(d3.ascending),r()):e},i.range=function(e){return arguments.length?(t=e,r()):t},i.quantiles=function(){return n},i.copy=function(){return Gn(e,t)},r()}function Yn(e,t,n){function s(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function o(){return r=n.length/(t-e),i=n.length-1,s}var r,i;return s.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],o()):[e,t]},s.range=function(e){return arguments.length?(n=e,o()):n},s.copy=function(){return Yn(e,t,n)},o()}function Zn(e,t){function n(n){return t[d3.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Zn(e,t)},n}function er(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return Bn(e,t)},t.tickFormat=function(t){return jn(e,t)},t.copy=function(){return er(e)},t}function rr(e){return e.innerRadius}function ir(e){return e.outerRadius}function sr(e){return e.startAngle}function or(e){return e.endAngle}function ur(e){function u(s){function d(){u.push("M",i(e(a),o))}var u=[],a=[],f=-1,l=s.length,c,h=v(t),p=v(n);while(++f<l)r.call(this,c=s[f],f)?a.push([+h.call(this,c,f),+p.call(this,c,f)]):a.length&&(d(),a=[]);return a.length&&d(),u.length?u.join(""):null}var t=ar,n=fr,r=d,i=cr,s=i.key,o=.7;return u.x=function(e){return arguments.length?(t=e,u):t},u.y=function(e){return arguments.length?(n=e,u):n},u.defined=function(e){return arguments.length?(r=e,u):r},u.interpolate=function(e){return arguments.length?(typeof e=="function"?s=i=e:s=(i=lr.get(e)||cr).key,u):s},u.tension=function(e){return arguments.length?(o=e,u):o},u}function ar(e){return e[0]}function fr(e){return e[1]}function cr(e){return e.join("L")}function hr(e){return cr(e)+"Z"}function pr(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function dr(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function vr(e,t){return e.length<4?cr(e):e[1]+yr(e.slice(1,e.length-1),br(e,t))}function mr(e,t){return e.length<3?cr(e):e[0]+yr((e.push(e[0]),e),br([e[e.length-2]].concat(e,[e[1]]),t))}function gr(e,t,n){return e.length<3?cr(e):e[0]+yr(e,br(e,t))}function yr(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return cr(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;n&&(r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1],i=e[1],a=2);if(t.length>1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function br(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a)i=s,s=o,o=e[u],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function wr(e){if(e.length<3)return cr(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];Lr(a,o,u);while(++t<n)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),Lr(a,o,u);t=-1;while(++t<2)o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),Lr(a,o,u);return a.join("")}function Er(e){if(e.length<4)return cr(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3)i=e[n],s.push(i[0]),o.push(i[1]);t.push(Tr(kr,s)+","+Tr(kr,o)),--n;while(++n<r)i=e[n],s.shift(),s.push(i[0]),o.shift(),o.push(i[1]),Lr(t,s,o);return t.join("")}function Sr(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4)s=e[n%r],o.push(s[0]),u.push(s[1]);t=[Tr(kr,o),",",Tr(kr,u)],--n;while(++n<i)s=e[n%r],o.shift(),o.push(s[0]),u.shift(),u.push(s[1]),Lr(t,o,u);return t.join("")}function xr(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n)a=e[u],f=u/n,a[0]=t*a[0]+(1-t)*(r+f*s),a[1]=t*a[1]+(1-t)*(i+f*o)}return wr(e)}function Tr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Lr(e,t,n){e.push("C",Tr(Nr,t),",",Tr(Nr,n),",",Tr(Cr,t),",",Tr(Cr,n),",",Tr(kr,t),",",Tr(kr,n))}function Ar(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Or(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Ar(i,s);while(++t<n)r[t]=(o+(o=Ar(i=s,s=e[t+1])))/2;return r[t]=o,r}function Mr(e){var t=[],n,r,i,s,o=Or(e),u=-1,a=e.length-1;while(++u<a)n=Ar(e[u],e[u+1]),Math.abs(n)<1e-6?o[u]=o[u+1]=0:(r=o[u]/n,i=o[u+1]/n,s=r*r+i*i,s>9&&(s=n*3/Math.sqrt(s),o[u]=s*r,o[u+1]=s*i));u=-1;while(++u<=a)s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),t.push([s||0,o[u]*s||0]);return t}function _r(e){return e.length<3?cr(e):e[0]+yr(e,Mr(e))}function Dr(e){var t,n=-1,r=e.length,i,s;while(++n<r)t=e[n],i=t[0],s=t[1]+tr,t[0]=i*Math.cos(s),t[1]=i*Math.sin(s);return e}function Pr(e){function c(u){function T(){c.push("M",o(e(p),l),f,a(e(h.reverse()),l),"Z")}var c=[],h=[],p=[],d=-1,m=u.length,g,y=v(t),b=v(r),w=t===n?function(){return S}:v(n),E=r===i?function(){return x}:v(i),S,x;while(++d<m)s.call(this,g=u[d],d)?(h.push([S=+y.call(this,g,d),x=+b.call(this,g,d)]),p.push([+w.call(this,g,d),+E.call(this,g,d)])):h.length&&(T(),h=[],p=[]);return h.length&&T(),c.length?c.join(""):null}var t=ar,n=ar,r=0,i=fr,s=d,o=cr,u=o.key,a=o,f="L",l=.7;return c.x=function(e){return arguments.length?(t=n=e,c):n},c.x0=function(e){return arguments.length?(t=e,c):t},c.x1=function(e){return arguments.length?(n=e,c):n},c.y=function(e){return arguments.length?(r=i=e,c):i},c.y0=function(e){return arguments.length?(r=e,c):r},c.y1=function(e){return arguments.length?(i=e,c):i},c.defined=function(e){return arguments.length?(s=e,c):s},c.interpolate=function(e){return arguments.length?(typeof e=="function"?u=o=e:u=(o=lr.get(e)||cr).key,a=o.reverse||o,f=o.closed?"M":"L",c):u},c.tension=function(e){return arguments.length?(l=e,c):l},c}function Hr(e){return e.source}function Br(e){return e.target}function jr(e){return e.radius}function Fr(e){return e.startAngle}function Ir(e){return e.endAngle}function qr(e){return[e.x,e.y]}function Rr(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+tr;return[n*Math.cos(r),n*Math.sin(r)]}}function Ur(){return 64}function zr(){return"circle"}function Wr(e){var t=Math.sqrt(e/Math.PI);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Jr(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function Kr(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Qr(e,t,n){i=[];if(n&&t.length>1){var r=Ln(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o)for(a=n;--a>0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];)i.push(f)}return i}function Zr(e,t){var n=new RegExp("(^|\\s+)"+d3.requote(t)+"(\\s+|$)","g");if(e.classList)return e.classList.add(t);var r=e.className||"",i=r.baseVal!==null,s=i?r.baseVal:r;n.lastIndex=0,n.test(s)||(s=E(s+" "+t),i?r.baseVal=s:e.setAttribute("class",s))}function ei(e){return function(t){var n=this.data("lineAttrs");if(!n)return;if(arguments.length<1)return n[e];n[e]=parseInt(t,10),!isNaN(n.x1)&&!isNaN(n.y1)&&!isNaN(n.x2)&&!isNaN(n.y2)?this.attr("path","M"+n.x1+" "+n.y1+"L"+n.x2+" "+n.y2+"Z"):this.attr("path",null)}}function ti(e){var t=Raphael(e,0,0);return t.__attrs={width:0,height:0},t.ca.d=function(e){return{path:e}},t.ca.x1=ei("x1"),t.ca.x2=ei("x2"),t.ca.y1=ei("y1"),t.ca.y2=ei("y2"),t.nodeType=1,t.nodeName="object",t}function ii(){ni||(ni=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var e=d3.event,t;try{ni.scrollTop=1e3,ni.dispatchEvent(e),t=1e3-ni.scrollTop}catch(n){t=e.wheelDelta||-e.detail*5}return t}function si(e){var t=e.source,n=e.target,r=ui(t,n),i=[t];while(t!==r)t=t.parent,i.push(t);var s=i.length;while(n!==r)i.splice(s,0,n),n=n.parent;return i}function oi(e){var t=[],n=e.parent;while(n!=null)t.push(e),e=n,n=n.parent;return t.push(e),t}function ui(e,t){if(e===t)return e;var n=oi(e),r=oi(t),i=n.pop(),s=r.pop(),o=null;while(i===s)o=i,i=n.pop(),s=r.pop();return o}function li(e){e.fixed|=2}function ci(e){e!==fi&&(e.fixed&=1)}function hi(){fi.fixed&=1,ai=fi=null}function pi(){fi.px=d3.event.x,fi.py=d3.event.y,ai.resume()}function di(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;di(a,t,n),e.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy}}if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function vi(e){return 20}function mi(e){return 1}function yi(e){return e.x}function bi(e){return e.y}function wi(e,t,n){e.y0=t,e.y=n}function xi(e){return d3.range(e.length)}function Ti(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function Ni(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t)(i=e[t][1])>r&&(n=t,r=i);return n}function Ci(e){return e.reduce(ki,0)}function ki(e,t){return e+t[1]}function Li(e,t){return Ai(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Ai(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function Oi(e){return[d3.min(e),d3.max(e)]}function Mi(e,t){return d3.rebind(e,t,"sort","children","value"),e.links=Hi,e.nodes=function(t){return Bi=!0,(e.nodes=e)(t)},e}function _i(e){return e.children}function Di(e){return e.value}function Pi(e,t){return t.value-e.value}function Hi(e){return d3.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function ji(e,t){return e.value-t.value}function Fi(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Ii(e,t){e._pack_next=t,t._pack_prev=e}function qi(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function Ri(e){function p(e){n=Math.min(e.x-e.r,n),r=Math.max(e.x+e.r,r),i=Math.min(e.y-e.r,i),s=Math.max(e.y+e.r,s)}if(!(t=e.children)||!(h=t.length))return;var t,n=Infinity,r=-Infinity,i=Infinity,s=-Infinity,o,u,a,f,l,c,h;t.forEach(Ui),o=t[0],o.x=-o.r,o.y=0,p(o);if(h>1){u=t[1],u.x=u.r,u.y=0,p(u);if(h>2){a=t[2],Xi(o,u,a),p(a),Fi(o,a),o._pack_prev=a,Fi(a,u),u=o._pack_next;for(f=3;f<h;f++){Xi(o,u,a=t[f]);var d=0,v=1,m=1;for(l=u._pack_next;l!==u;l=l._pack_next,v++)if(qi(l,a)){d=1;break}if(d==1)for(c=o._pack_prev;c!==l._pack_prev;c=c._pack_prev,m++)if(qi(c,a))break;d?(v<m||v==m&&u.r<o.r?Ii(o,u=l):Ii(o=c,u),f--):(Fi(o,a),u=a,p(a))}}}var g=(n+r)/2,y=(i+s)/2,b=0;for(f=0;f<h;f++)a=t[f],a.x-=g,a.y-=y,b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=b,t.forEach(zi)}function Ui(e){e._pack_next=e._pack_prev=e}function zi(e){delete e._pack_next,delete e._pack_prev}function Wi(e,t,n,r){var i=e.children;e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)Wi(i[s],t,n,r)}}function Xi(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function Vi(e){return 1+d3.max(e,function(e){return e.y})}function $i(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Ji(e){var t=e.children;return t&&t.length?Ji(t[0]):e}function Ki(e){var t=e.children,n;return t&&(n=t.length)?Ki(t[n-1]):e}function Qi(e,t){return e.parent==t.parent?1:2}function Gi(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Yi(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Zi(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i)t(r=Zi(n[s],t),e)>0&&(e=r)}return e}function es(e,t){return e.x-t.x}function ts(e,t){return t.x-e.x}function ns(e,t){return e.depth-t.depth}function rs(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a)s=i[u],n(s,o),o=s}t(e,r)}n(e,null)}function is(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0)s=r[i]._tree,s.prelim+=t,s.mod+=t,t+=s.shift+(n+=s.change)}function ss(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function os(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function us(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function as(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function fs(e,t){function s(e,n){d3.text(e,t,function(e){n(e&&s.parse(e))})}function o(t){return t.map(u).join(e)}function u(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var n=new RegExp("\r\n|["+e+"\r\n]","g"),r=new RegExp('["'+e+"\n]"),i=e.charCodeAt(0);return s.parse=function(e){var t;return s.parseRows(e,function(e,n){if(n){var r={},i=-1,s=t.length;while(++i<s)r[t[i]]=e[i];return r}return t=e,null})},s.parseRows=function(e,t){function l(){if(n.lastIndex>=e.length)return s;if(f)return f=!1,r;var t=n.lastIndex;if(e.charCodeAt(t)===34){var o=t;while(o++<e.length)if(e.charCodeAt(o)===34){if(e.charCodeAt(o+1)!==34)break;o++}n.lastIndex=o+2;var u=e.charCodeAt(o+1);return u===13?(f=!0,e.charCodeAt(o+2)===10&&n.lastIndex++):u===10&&(f=!0),e.substring(t+1,o).replace(/""/g,'"')}var a=n.exec(e);return a?(f=a[0].charCodeAt(0)!==i,e.substring(t,a.index)):(n.lastIndex=e.length,e.substring(t))}var r={},s={},o=[],u=0,a,f;n.lastIndex=0;while((a=l())!==s){var c=[];while(a!==r&&a!==s)c.push(a),a=l();if(t&&!(c=t(c,u++)))continue;o.push(c)}return o},s.format=function(e){return e.map(o).join("\n")},s}function cs(e,t){return function(n){return n&&e.hasOwnProperty(n.type)?e[n.type](n):t}}function hs(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ps(e,t){ds.hasOwnProperty(e.type)&&ds[e.type](e,t)}function vs(e,t){ps(e.geometry,t)}function ms(e,t){for(var n=e.features,r=0,i=n.length;r<i;r++)ps(n[r].geometry,t)}function gs(e,t){for(var n=e.geometries,r=0,i=n.length;r<i;r++)ps(n[r],t)}function ys(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function bs(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function ws(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r][0],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Es(e,t){t.apply(null,e.coordinates)}function Ss(e,t){for(var n=e.coordinates[0],r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function xs(e){return e.source}function Ts(e){return e.target}function Ns(){function d(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,o=n*i+t*l,u=n*s+t*c,a=n*r+t*f;return[Math.atan2(u,o)/ls,Math.atan2(a,Math.sqrt(o*o+u*u))/ls]}var e,t,n,r,i,s,o,u,a,f,l,c,h,p;return d.distance=function(){return h==null&&(p=1/Math.sin(h=Math.acos(Math.max(-1,Math.min(1,r*f+n*a*Math.cos(o-e)))))),h},d.source=function(o){var u=Math.cos(e=o[0]*ls),a=Math.sin(e);return n=Math.cos(t=o[1]*ls),r=Math.sin(t),i=n*u,s=n*a,h=null,d},d.target=function(e){var t=Math.cos(o=e[0]*ls),n=Math.sin(o);return a=Math.cos(u=e[1]*ls),f=Math.sin(u),l=a*t,c=a*n,h=null,d},d}function Cs(e,t){var n=Ns().source(e).target(t);return n.distance(),n}function As(e){var t=0,n=0;for(;;){if(e(t,n))return[t,n];t===0?(t=n+1,n=0):(t-=1,n+=1)}}function Os(e,t,n,r){var i,s,o,u,a,f,l;return i=r[e],s=i[0],o=i[1],i=r[t],u=i[0],a=i[1],i=r[n],f=i[0],l=i[1],(l-o)*(u-s)-(a-o)*(f-s)>0}function Ms(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function _s(e,t,n,r){var i=e[0],s=t[0],o=n[0],u=r[0],a=e[1],f=t[1],l=n[1],c=r[1],h=i-o,p=s-i,d=u-o,v=a-l,m=f-a,g=c-l,y=(d*v-g*h)/(g*p-d*m);return[i+y*p,a+y*m]}function Ps(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=r.leftEnd;do t=t.r;while(t!=r.rightEnd&&i.rightOf(t,e));return t=t.l,t},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[Ds[e.side]]}},i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;return n.c=e.x*r+e.y*i+(r*r+i*i)*.5,s>o?(n.a=1,n.b=i/r,n.c/=r):(n.b=1,n.a=r/i,n.c/=i),n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r)return null;var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10)return null;var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;u.y<a.y||u.y==a.y&&u.x<a.x?(f=e,l=n):(f=t,l=r);var c=s>=l.region.r.x;return c&&f.side==="l"||!c&&f.side==="r"?null:{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l")return 1;if(!i&&e.side==="r")return 0;if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;!i&&n.b<0||i&&n.b>=0?a=u=s>=n.b*o:(a=t.x+t.y*n.b>n.c,n.b<0&&(a=!a),a||(u=1));if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b),n.b<0&&(a=!a)}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[Ds[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}},s={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x)continue;break}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init(),n.bottomSite=n.list.shift();var o=n.list.shift(),u,a,f,l,c,h,p,d,v,m,g,y,b;for(;;){s.empty()||(u=s.min());if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x))a=r.leftBound(o),f=r.right(a),p=r.rightRegion(a),y=i.bisect(p,o),h=r.createHalfEdge(y,"l"),r.insert(a,h),m=i.intersect(a,h),m&&(s.del(a),s.insert(a,m,i.distance(m,o))),a=h,h=r.createHalfEdge(y,"r"),r.insert(a,h),m=i.intersect(h,f),m&&s.insert(h,m,i.distance(m,o)),o=n.list.shift();else{if(!!s.empty())break;a=s.extractMin(),l=r.left(a),f=r.right(a),c=r.right(f),p=r.leftRegion(a),d=r.rightRegion(f),g=a.vertex,i.endPoint(a.edge,a.side,g),i.endPoint(f.edge,f.side,g),r.del(a),s.del(f),r.del(f),b="l",p.y>d.y&&(v=p,p=d,d=v,b="r"),y=i.bisect(p,d),h=r.createHalfEdge(y,b),r.insert(l,h),i.endPoint(y,Ds[b],g),m=i.intersect(l,h),m&&(s.del(l),s.insert(l,m,i.distance(m,p))),m=i.intersect(h,c),m&&s.insert(h,m,i.distance(m,p))}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a))t(a.edge)}function Hs(){return{leaf:!0,nodes:[],point:null}}function Bs(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;a[0]&&Bs(e,a[0],n,r,o,u),a[1]&&Bs(e,a[1],o,r,i,u),a[2]&&Bs(e,a[2],n,u,o,s),a[3]&&Bs(e,a[3],o,u,i,s)}}function js(e){return{x:e[0],y:e[1]}}function qs(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ks(e){return e.substring(0,3)}function Qs(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i==37){s=lo[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function Gs(e){return new RegExp("^(?:"+e.map(d3.requote).join("|")+")","i")}function Ys(e){var t=new f,n=-1,r=e.length;while(++n<r)t.set(e[n].toLowerCase(),n);return t}function co(e,t,n){io.lastIndex=0;var r=io.exec(t.substring(n));return r?n+=r[0].length:-1}function ho(e,t,n){ro.lastIndex=0;var r=ro.exec(t.substring(n));return r?n+=r[0].length:-1}function po(e,t,n){uo.lastIndex=0;var r=uo.exec(t.substring(n));return r?(e.m=ao.get(r[0].toLowerCase()),n+=r[0].length):-1}function vo(e,t,n){so.lastIndex=0;var r=so.exec(t.substring(n));return r?(e.m=oo.get(r[0].toLowerCase()),n+=r[0].length):-1}function mo(e,t,n){return Qs(e,fo.c.toString(),t,n)}function go(e,t,n){return Qs(e,fo.x.toString(),t,n)}function yo(e,t,n){return Qs(e,fo.X.toString(),t,n)}function bo(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function wo(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+2));return r?(e.y=Eo(+r[0]),n+=r[0].length):-1}function Eo(e){return e+(e>68?1900:2e3)}function So(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function xo(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function To(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function No(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function Co(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function ko(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function Ao(e,t,n){var r=Oo.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function Mo(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+Zs(r)+Zs(i)}function Do(e){return e.toISOString()}function Po(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new Fs(n-1)),1),n}function s(e,n){return t(e=new Fs(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)while(o<r)n(o)%s||u.push(new Date(+o)),t(o,1);else while(o<r)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{Fs=qs;var r=new qs;return r._=e,o(r,t,n)}finally{Fs=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Ho(e);return a.floor=a,a.round=Ho(r),a.ceil=Ho(i),a.offset=Ho(s),a.range=u,e}function Ho(e){return function(t,n){try{Fs=qs;var r=new qs;return r._=t,e(r,n)._}finally{Fs=Date}}}function Bo(e,t,n){function r(t){return e(t)}return r.invert=function(t){return Fo(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Fo)},r.nice=function(e){return r.domain(On(r.domain(),function(){return e}))},r.ticks=function(n,i){var s=jo(r.domain());if(typeof n!="function"){var o=s[1]-s[0],u=o/n,a=d3.bisect(Uo,u);if(a==Uo.length)return t.year(s,n);if(!a)return e.ticks(n).map(Fo);Math.log(u/Uo[a-1])<Math.log(Uo[a]/u)&&--a,n=t[a],i=n[1],n=n[0].range}return n(s[0],new Date(+s[1]+1),i)},r.tickFormat=function(){return n},r.copy=function(){return Bo(e.copy(),t,n)},d3.rebind(r,e,"range","rangeRound","interpolate","clamp")}function jo(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Fo(e){return new Date(e)}function Io(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function qo(e){var t=new Date(e,0,1);return t.setFullYear(e),t}function Ro(e){var t=e.getFullYear(),n=qo(t),r=qo(t+1);return t+(e-n)/(r-n)}function Qo(e){var t=new Date(Date.UTC(e,0,1));return t.setUTCFullYear(e),t}function Go(e){var t=e.getUTCFullYear(),n=Qo(t),r=Qo(t+1);return t+(e-n)/(r-n)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(e){var t=CSSStyleDeclaration.prototype,n=t.setProperty;t.setProperty=function(e,t,r){n.call(this,e,t+"",r)}}d3={version:"2.10.0"};var i=o;try{i(document.documentElement.childNodes)[0].nodeType}catch(u){i=s}var a=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};d3.map=function(e){var t=new f;for(var n in e)t.set(n,e[n]);return t},r(f,{has:function(e){return l+e in this},get:function(e){return this[l+e]},set:function(e,t){return this[l+e]=t},remove:function(e){return e=l+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===c&&e.call(this,t.substring(1),this[t])}});var l="\0",c=l.charCodeAt(0);d3.functor=v,d3.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=m(e,t,t[i]);return e},d3.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},d3.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},d3.mean=function(e,t){var n=e.length,r,i=0,s=-1,o=0;if(arguments.length===1)while(++s<n)g(r=e[s])&&(i+=(r-i)/++o);else while(++s<n)g(r=t.call(e,e[s],s))&&(i+=(r-i)/++o);return o?i:undefined},d3.median=function(e,t){return arguments.length>1&&(e=e.map(t)),e=e.filter(g),e.length?d3.quantile(e.sort(d3.ascending),.5):undefined},d3.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&i>s&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&i>s&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&s>i&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&s>i&&
(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)(s=e[n])!=null&&(i>s&&(i=s),o<s&&(o=s))}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&(i>s&&(i=s),o<s&&(o=s))}return[i,o]},d3.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=Math.random()*2-1,r=Math.random()*2-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(e,t){var n=arguments.length;n<2&&(t=1),n<1&&(e=0);var r=d3.random.normal();return function(){return Math.exp(e+t*r())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s<r)isNaN(i=+e[s])||(n+=i);else while(++s<r)isNaN(i=+t.call(e,e[s],s))||(n+=i);return n},d3.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=e[r-1],s=n-r;return s?i+s*(e[r]-i):i},d3.transpose=function(e){return d3.zip.apply(d3,e)},d3.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=d3.min(arguments,y),n=new Array(t);++e<t;)for(var r=-1,i,s=n[e]=new Array(i);++r<i;)s[r]=arguments[r][e];return n},d3.bisector=function(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var b=d3.bisector(function(e){return e});d3.bisectLeft=b.left,d3.bisect=d3.bisectRight=b.right,d3.first=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])>0&&(i=s);return i},d3.last=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])<=0&&(i=s);return i},d3.nest=function(){function s(n,o){if(o>=t.length)return i?i.call(e,n):r?n.sort(r):n;var u=-1,a=n.length,l=t[o++],c,h,p=new f,d,v={};while(++u<a)(d=p.get(c=l(h=n[u])))?d.push(h):p.set(c,[h]);return p.forEach(function(e){v[e]=s(p.get(e),o)}),v}function o(e,r){if(r>=t.length)return e;var i=[],s=n[r++],u;for(u in e)i.push({key:u,values:o(e[u],r)});return s&&i.sort(function(e,t){return s(e.key,t.key)}),i}var e={},t=[],n=[],r,i;return e.map=function(e){return s(e,0)},e.entries=function(e){return o(s(e,0),0)},e.key=function(n){return t.push(n),e},e.sortKeys=function(r){return n[t.length-1]=r,e},e.sortValues=function(t){return r=t,e},e.rollup=function(t){return i=t,e},e},d3.keys=function(e){var t=[];for(var n in e)t.push(n);return t},d3.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d3.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},d3.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n},d3.merge=function(e){return Array.prototype.concat.apply([],e)},d3.split=function(e,t){var n=[],r=[],i,s=-1,o=e.length;arguments.length<2&&(t=w);while(++s<o)t.call(r,i=e[s],s)?r=[]:(r.length||n.push(r),r.push(i));return n},d3.range=function(e,t,n){arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0));if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=S(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r},d3.requote=function(e){return e.replace(x,"\\$&")};var x=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},d3.xhr=function(e,t,n){var r=new XMLHttpRequest;arguments.length<3?(n=t,t=null):t&&r.overrideMimeType&&r.overrideMimeType(t),r.open("GET",e,!0),t&&r.setRequestHeader("Accept",t),r.onreadystatechange=function(){if(r.readyState===4){var e=r.status;n(!e&&r.response||e>=200&&e<300||e===304?r:null)}},r.send(null)},d3.text=function(e,t,n){function r(e){n(e&&e.responseText)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)},d3.json=function(e,t){d3.text(e,"application/json",function(e){t(e?JSON.parse(e):null)})},d3.html=function(e,t){d3.text(e,"text/html",function(e){if(e!=null){var n=document.createRange();n.selectNode(document.body),e=n.createContextualFragment(e)}t(e)})},d3.xml=function(e,t,n){function r(e){n(e&&e.responseXML)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)};var T={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:T,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),T.hasOwnProperty(n)?{space:T[n],local:e}:e}},d3.dispatch=function(){var e=new N,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=C(e);return e},N.prototype.on=function(e,t){var n=e.indexOf("."),r="";return n>0&&(r=e.substring(n+1),e=e.substring(0,n)),arguments.length<2?this[e].on(r):this[e].on(r,t)},d3.format=function(e){var t=k.exec(e),n=t[1]||" ",r=t[3]||"",i=t[5],s=+t[6],o=t[7],u=t[8],a=t[9],f=1,l="",c=!1;u&&(u=+u.substring(1)),i&&(n="0",o&&(s-=Math.floor((s-1)/4)));switch(a){case"n":o=!0,a="g";break;case"%":f=100,l="%",a="f";break;case"p":f=100,l="%",a="r";break;case"d":c=!0,u=0;break;case"s":f=-1,a="r"}return a=="r"&&!u&&(a="g"),a=L.get(a)||O,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"-":r;if(f<0){var h=d3.formatPrefix(e,u);e=h.scale(e),l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p<s&&(e=(new Array(s-p+1)).join(n)+e),o&&(e=M(e)),e=t+e}else{o&&(e=M(e)),e=t+e;var p=e.length;p<s&&(e=(new Array(s-p+1)).join(n)+e)}return e+l}};var k=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,L=d3.map({g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return d3.round(e,t=A(e,t)).toFixed(Math.max(0,Math.min(20,t)))}}),_=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(D);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,A(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n<=0?n+1:n-1)/3)*3))),_[8+n/3]};var P=z(2),H=z(3),B=function(){return U},j=d3.map({linear:B,poly:z,quad:function(){return P},cubic:function(){return H},sin:function(){return W},exp:function(){return X},circle:function(){return V},elastic:$,back:J,bounce:function(){return K}}),F=d3.map({"in":U,out:q,"in-out":R,"out-in":function(e){return R(q(e))}});d3.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=j.get(n)||B,r=F.get(r)||U,I(r(n.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.interpolate=function(e,t){var n=d3.interpolators.length,r;while(--n>=0&&!(r=d3.interpolators[n](e,t)));return r},d3.interpolateNumber=function(e,t){return t-=e,function(n){return e+t*n}},d3.interpolateRound=function(e,t){return t-=e,function(n){return Math.round(e+t*n)}},d3.interpolateString=function(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;Z.lastIndex=0;for(r=0;n=Z.exec(t);++r)n.index&&u.push(t.substring(s,o=n.index)),a.push({i:u.length,x:n[0]}),u.push(null),s=Z.lastIndex;s<t.length&&u.push(t.substring(s));for(r=0,f=a.length;(n=Z.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i)if(u[l.i+1]==null){u[l.i-1]+=l.x,u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1],u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}else if(u[l.i+1]==null)u[l.i]=l.x;else{u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}a.splice(r,1),f--,r--}else l.x=d3.interpolateNumber(parseFloat(n[0]),parseFloat(l.x))}while(r<f)l=a.pop(),u[l.i+1]==null?u[l.i]=l.x:(u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1)),f--;return u.length===1?u[0]==null?a[0].x:function(){return t}:function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}},d3.interpolateTransform=function(e,t){var n=[],r=[],i,s=d3.transform(e),o=d3.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:d3.interpolateNumber(u[0],a[0])},{i:3,x:d3.interpolateNumber(u[1],a[1])})):a[0]||a[1]?n.push("translate("+a+")"):n.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(f,l)})):l&&n.push(n.pop()+"rotate("+l+")"),c!=h?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(c,h)}):h&&n.push(n.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:d3.interpolateNumber(p[0],d[0])},{i:i-2,x:d3.interpolateNumber(p[1],d[1])})):(d[0]!=1||d[1]!=1)&&n.push(n.pop()+"scale("+d+")"),i=r.length,function(e){var t=-1,s;while(++t<i)n[(s=r[t]).i]=s.x(e);return n.join("")}},d3.interpolateRgb=function(e,t){e=d3.rgb(e),t=d3.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+st(Math.round(n+s*e))+st(Math.round(r+o*e))+st(Math.round(i+u*e))}},d3.interpolateHsl=function(e,t){e=d3.hsl(e),t=d3.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return dt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateLab=function(e,t){e=d3.lab(e),t=d3.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return Tt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateHcl=function(e,t){e=d3.hcl(e),t=d3.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return gt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateArray=function(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(d3.interpolate(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}},d3.interpolateObject=function(e,t){var n={},r={},i;for(i in e)i in t?n[i]=et(i)(e[i],t[i]):r[i]=e[i];for(i in t)i in e||(r[i]=t[i]);return function(e){for(i in n)r[i]=n[i](e);return r}};var Z=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(e,t){return t instanceof Array&&d3.interpolateArray(e,t)},function(e,t){return(typeof e=="string"||typeof t=="string")&&d3.interpolateString(e+"",t+"")},function(e,t){return(typeof t=="string"?ct.has(t)||/^(#|rgb\(|hsl\()/.test(t):t instanceof it||t instanceof pt)&&d3.interpolateRgb(e,t)},function(e,t){return!isNaN(e=+e)&&!isNaN(t=+t)&&d3.interpolateNumber(e,t)}],d3.rgb=function(e,t,n){return arguments.length===1?e instanceof it?rt(e.r,e.g,e.b):ot(""+e,rt,dt):rt(~~e,~~t,~~n)},it.prototype.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?rt(i,i,i):(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),rt(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e))))},it.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),rt(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))},it.prototype.hsl=function(){return ut(this.r,this.g,this.b)},it.prototype.toString=function(){return"#"+st(this.r)+st(this.g)+st(this.b)};var ct=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});ct.forEach(function(e,t){ct.set(e,ot(t,rt,dt))}),d3.hsl=function(e,t,n){return arguments.length===1?e instanceof pt?ht(e.h,e.s,e.l):ot(""+e,ut,ht):ht(+e,+t,+n)},pt.prototype.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),ht(this.h,this.s,this.l/e)},pt.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),ht(this.h,this.s,e*this.l)},pt.prototype.rgb=function(){return dt(this.h,this.s,this.l)},pt.prototype.toString=function(){return this.rgb().toString()},d3.hcl=function(e,t,n){return arguments.length===1?e instanceof mt?vt(e.h,e.c,e.l):e instanceof bt?Nt(e.l,e.a,e.b):Nt((e=at((e=d3.rgb(e)).r,e.g,e.b)).l,e.a,e.b):vt(+e,+t,+n)},mt.prototype.brighter=function(e){return vt(this.h,this.c,Math.min(100,this.l+wt*(arguments.length?e:1)))},mt.prototype.darker=function(e){return vt(this.h,this.c,Math.max(0,this.l-wt*(arguments.length?e:1)))},mt.prototype.rgb=function(){return gt(this.h,this.c,this.l).rgb()},mt.prototype.toString=function(){return this.rgb()+""},d3.lab=function(e,t,n){return arguments.length===1?e instanceof bt?yt(e.l,e.a,e.b):e instanceof mt?gt(e.l,e.c,e.h):at((e=d3.rgb(e)).r,e.g,e.b):yt(+e,+t,+n)};var wt=18,Et=.95047,St=1,xt=1.08883;bt.prototype.brighter=function(e){return yt(Math.min(100,this.l+wt*(arguments.length?e:1)),this.a,this.b)},bt.prototype.darker=function(e){return yt(Math.max(0,this.l-wt*(arguments.length?e:1)),this.a,this.b)},bt.prototype.rgb=function(){return Tt(this.l,this.a,this.b)},bt.prototype.toString=function(){return this.rgb()+""};var Ot=function(e,t){return t.querySelector(e)},Mt=function(e,t){return t.querySelectorAll(e)},_t=document.documentElement,Dt=_t.matchesSelector||_t.webkitMatchesSelector||_t.mozMatchesSelector||_t.msMatchesSelector||_t.oMatchesSelector,Pt=function(e,t){return Dt.call(e,t)};typeof Sizzle=="function"&&(Ot=function(e,t){return Sizzle(e,t)[0]||null},Mt=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},Pt=Sizzle.matchesSelector);var Ht=[];d3.selection=function(){return Kt},d3.selection.prototype=Ht,Ht.select=function(e){var t=[],n,r,i,s;typeof e!="function"&&(e=Bt(e));for(var o=-1,u=this.length;++o<u;){t.push(n=[]),n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;)(s=i[a])?(n.push(r=e.call(s,s.__data__,a)),r&&"__data__"in s&&(r.__data__=s.__data__)):n.push(null)}return At(t)},Ht.selectAll=function(e){var t=[],n,r;typeof e!="function"&&(e=jt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(r=u[a])t.push(n=i(e.call(r,r.__data__,a))),n.parentNode=r;return At(t)},Ht.attr=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node();return e=d3.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(Ft(t,e[t]));return this}return this.each(Ft(e,t))},Ht.classed=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return!1}else{t=n.className,t.baseVal!=null&&(t=t.baseVal);while(++i<r)if(!It(e[i]).test(t))return!1}return!0}for(t in e)this.each(qt(t,e[t]));return this}return this.each(qt(e,t))},Ht.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.each(Ut(n,e[n],t));return this}if(r<2)return window.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(Ut(e,t,n))},Ht.property=function(e,t){if(arguments.length<2){if(typeof e=="string")return this.node()[e];for(t in e)this.each(zt(t,e[t]));return this}return this.each(zt(e,t))},Ht.text=function(e){var t=this.node();return t&&t.paper?arguments.length<1?t.attr("text"):this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.attr("text",t==null?"":t)}:e==null?function(){this.attr("text","")}:function(){this.attr("text",e)}):arguments.length<1?this.node().textContent:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e})},Ht.html=function(e){return arguments.length<1?this.node().innerHTML:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e})},Ht.append=function(e){function t(){return e.local==="svg"?ti(this):this.appendChild(document.createElementNS(this.namespaceURI,e))}function n(){return e.local==="svg"?ti(this):this.appendChild(document.createElementNS(e.space,e.local))}return e=d3.ns.qualify(e),this.select(e.local?n:t)},Ht.insert=function(e,t){function n(){return this.insertBefore(document.createElementNS(this.namespaceURI,e),Ot(t,this))}function r(){return this.insertBefore(document.createElementNS(e.space,e.local),Ot(t,this))}return e=d3.ns.qualify(e),this.select(e.local?r:n)},Ht.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},Ht.data=function(e,t){function o(e,n){var r,i=e.length,s=n.length,o=Math.min(i,s),c=Math.max(i,s),h=[],p=[],d=[],v,m;if(t){var g=new f,y=[],b,w=n.length;for(r=-1;++r<i;)b=t.call(v=e[r],v.__data__,r),g.has(b)?d[w++]=v:g.set(b,v),y.push(b);for(r=-1;++r<s;)b=t.call(n,m=n[r],r),g.has(b)?(h[r]=v=g.get(b),v.__data__=m,p[r]=d[r]=null):(p[r]=Wt(m),h[r]=d[r]=null),g.remove(b);for(r=-1;++r<i;)g.has(y[r])&&(d[r]=e[r])}else{for(r=-1;++r<o;)v=e[r],m=n[r],v?(v.__data__=m,h[r]=v,p[r]=d[r]=null):(p[r]=Wt(m),h[r]=d[r]=null);for(;r<s;++r)p[r]=Wt(n[r]),h[r]=d[r]=null;for(;r<c;++r)d[r]=e[r],p[r]=h[r]=null}p.update=h,p.parentNode=h.parentNode=d.parentNode=e.parentNode,u.push(p),a.push(h),l.push(d)}var n=-1,r=this.length,i,s;if(!arguments.length){e=new Array(r=(i=this[0]).length);while(++n<r)if(s=i[n])e[n]=s.__data__;return e}var u=Qt([]),a=At([]),l=At([]);if(typeof e=="function")while(++n<r)o(i=this[n],e.call(i,i.parentNode.__data__,n));else while(++n<r)o(i=this[n],e);return a.enter=function(){return u},a.exit=function(){return l},a},Ht.datum=Ht.map=function(e){return arguments.length<1?this.property("__data__"):this.property("__data__",e)},Ht.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=Xt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]),n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i,i.__data__,u)&&n.push(i)}return At(t)},Ht.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;)if(s=n[r])i&&i!==s.nextSibling&&i.parentNode.insertBefore(s,i),i=s;return this},Ht.sort=function(e){e=Vt.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ht.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t=!1);for(n in e)this.each($t(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each($t(e,t,n))},Ht.each=function(e){return Jt(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Ht.call=function(e){return e.apply(this,(arguments[0]=this,arguments)),this},Ht.empty=function(){return!this.node()},Ht.node=function(e){for(var t=0,n=this.length;t<n;t++)for(var r=this[t],i=0,s=r.length;i<s;i++){var o=r[i];if(o)return o}return null},Ht.transition=function(){var e=[],t,n;for(var r=-1,i=this.length;++r<i;){e.push(t=[]);for(var s=this[r],o=-1,u=s.length;++o<u;)t.push((n=s[o])?{node:n,delay:on,duration:un}:null)}return Yt(e,tn||++en,Date.now())};var Kt=At([[document]]);Kt[0].parentNode=_t,d3.select=function(e){return typeof e=="string"?Kt.select(e):At([[e]])},d3.selectAll=function(e){return typeof e=="string"?Kt.selectAll(e):At([i(e)])};var Gt=[];d3.selection.enter=Qt,d3.selection.enter.prototype=Gt,Gt.append=Ht.append,Gt.insert=Ht.insert,Gt.empty=Ht.empty,Gt.node=Ht.node,Gt.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update,t.push(n=[]),n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;)(o=s[f])?(n.push(i[f]=r=e.call(s.parentNode,o.__data__,f)),r.__data__=o.__data__):n.push(null)}return At(t)};var Zt=[],en=0,tn=0,nn=0,rn=250,sn=d3.ease("cubic-in-out"),on=nn,un=rn,an=sn;Zt.call=Ht.call,d3.transition=function(e){return arguments.length?tn?e.transition():e:Kt.transition()},d3.transition.prototype=Zt,Zt.select=function(e){var t=[],n,r,i;typeof e!="function"&&(e=Bt(e));for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(i=u[a])&&(r=e.call(i.node,i.node.__data__,a))?("__data__"in i.node&&(r.__data__=i.node.__data__),n.push({node:r,delay:i.delay,duration:i.duration})):n.push(null)}return Yt(t,this.id,this.time).ease(this.ease())},Zt.selectAll=function(e){var t=[],n,r,i;typeof e!="function"&&(e=jt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(i=u[a]){r=e.call(i.node,i.node.__data__,a),t.push(n=[]);for(var l=-1,c=r.length;++l<c;)n.push({node:r[l],delay:i.delay,duration:i.duration})}return Yt(t,this.id,this.time).ease(this.ease())},Zt.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=Xt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i.node,i.node.__data__,u)&&n.push(i)}return Yt(t,this.id,this.time).ease(this.ease())},Zt.attr=function(e,t){if(arguments.length<2){for(t in e)this.attrTween(t,hn(e[t],t));return this}return this.attrTween(e,hn(t,e))},Zt.attrTween=function(e,t){function r(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i===ln?(this.removeAttribute(n),null):i&&function(e){this.setAttribute(n,i(e))}}function i(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i===ln?(this.removeAttributeNS(n.space,n.local),null):i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}var n=d3.ns.qualify(e);return this.tween("attr."+e,n.local?i:r)},Zt.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.styleTween(n,hn(e[n],n),t);return this}n=""}return this.styleTween(e,hn(t,e),n)},Zt.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,i){var s=t.call(this,r,i,window.getComputedStyle(this,null).getPropertyValue(e));return s===ln?(this.style.removeProperty(e),null):s&&function(t){this.style.setProperty(e,s(t),n)}})},Zt.text=function(e){return this.tween("text",function(t,n){this.textContent=typeof e=="function"?e.call(this,t,n):e})},Zt.remove=function(){return this.each("end.transition",function(){var e;!this.__transition__&&(e=this.parentNode)&&e.removeChild(this)})},Zt.delay=function(e){return Jt(this,typeof e=="function"?function(t,n,r){t.delay=e.call(t=t.node,t.__data__,n,r)|0}:(e|=0,function(t){t.delay=e}))},Zt.duration=function(e){return Jt(this,typeof e=="function"?function(t,n,r){t.duration=Math.max(1,e.call(t=t.node,t.__data__,n,r)|0)}:(e=Math.max(1,e|0),function(t){t.duration=e}))},Zt.transition=function(){return this.select(p)},d3.tween=function(e,t){function n(n,r,i){var s=e.call(this,n,r);return s==null?i!=""&&ln:i!=s&&t(i,s)}function r(n,r,i){return i!=e&&t(i,e)}return typeof e=="function"?n:e==null?cn:(e+="",r)};var ln={},pn=null,dn,vn;d3.timer=function(e,t,n){var r=!1,i,s=pn;if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}while(s){if(s.callback===e){s.then=n,s.delay=t,r=!0;break}i=s,s=s.next}r||(pn={callback:e,then:n,delay:t,next:pn}),dn||(vn=clearTimeout(vn),dn=1,yn(mn))},d3.timer.flush=function(){var e,t=Date.now(),n=pn;while(n)e=t-n.then,n.delay||(n.flush=n.callback(e)),n=n.next;gn()};var yn=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,17)};d3.transform=function(e){var t=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate();return new bn(n?n.matrix:Tn)})(e)},bn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var xn=180/Math.PI,Tn={a:1,b:0,c:0,d:1,e:0,f:0};d3.mouse=function(e){return Cn(e,G())};var Nn=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(e,t){return arguments.length<2&&(t=G().touches),t?i(t).map(function(t){var n=Cn(e,t);return n.identifier=t.identifier,n}):[]},d3.scale={},d3.scale.linear=function(){return _n([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return qn(d3.scale.linear(),Un)};var Rn=d3.format(".0e");Un.pow=function(e){return Math.pow(10,e)},zn.pow=function(e){return-Math.pow(10,-e)},d3.scale.pow=function(){return Wn(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Vn([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range($n)},d3.scale.category20=function(){return d3.scale.ordinal().range(Jn)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Kn)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Qn)};var $n=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Jn=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Kn=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Qn=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Gn([],[])},d3.scale.quantize=function(){return Yn(0,1,[0,1])},d3.scale.threshold=function(){return Zn([.5],[0,1])},d3.scale.identity=function(){return er([0,1])},d3.svg={},d3.svg.arc=function(){function i(){var i=e.apply(this,arguments),s=t.apply(this,arguments),o=n.apply(this,arguments)+tr,u=r.apply(this,arguments)+tr,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<Math.PI?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=nr?i?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+i+"A"+i+","+i+" 0 1,0 0,"+ -i+"A"+i+","+i+" 0 1,0 0,"+i+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":i?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+i*h+","+i*p+"A"+i+","+i+" 0 "+f+",0 "+i*l+","+i*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var e=rr,t=ir,n=sr,r=or;return i.innerRadius=function(t){return arguments.length?(e=v(t),i):e},i.outerRadius=function(e){return arguments.length?(t=v(e),i):t},i.startAngle=function(e){return arguments.length?(n=v(e),i):n},i.endAngle=function(e){return arguments.length?(r=v(e),i):r},i.centroid=function(){var i=(e.apply(this,arguments)+t.apply(this,arguments))/2,s=(n.apply(this,arguments)+r.apply(this,arguments))/2+tr;return[Math.cos(s)*i,Math.sin(s)*i]},i};var tr=-Math.PI/2,nr=2*Math.PI-1e-6;d3.svg.line=function(){return ur(h)};var lr=d3.map({linear:cr,"linear-closed":hr,"step-before":pr,"step-after":dr,basis:wr,"basis-open":Er,"basis-closed":Sr,bundle:xr,cardinal:gr,"cardinal-open":vr,"cardinal-closed":mr,monotone:_r});lr.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Nr=[0,2/3,1/3,0],Cr=[0,1/3,2/3,0],kr=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=ur(Dr);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},pr.reverse=dr,dr.reverse=pr,d3.svg.area=function(){return Pr(h)},d3.svg.area.radial=function(){var e=Pr(Dr);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},d3.svg.chord=function(){function s(n,r){var i=o(this,e,n,r),s=o(this,t,n,r);return"M"+i.p0+a(i.r,i.p1,i.a1-i.a0)+(u(i,s)?f(i.r,i.p1,i.r,i.p0):f(i.r,i.p1,s.r,s.p0)+a(s.r,s.p1,s.a1-s.a0)+f(s.r,s.p1,i.r,i.p0))+"Z"}function o(e,t,s,o){var u=t.call(e,s,o),a=n.call(e,u,o),f=r.call(e,u,o)+tr,l=i.call(e,u,o)+tr;return{r:a,a0:f,a1:l,p0:[a*Math.cos(f),a*Math.sin(f)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function u(e,t){return e.a0==t.a0&&e.a1==t.a1}function a(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Math.PI)+",1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Hr,t=Br,n=jr,r=sr,i=or;return s.radius=function(e){return arguments.length?(n=v(e),s):n},s.source=function(t){return arguments.length?(e=v(t),s):e},s.target=function(e){return arguments.length?(t=v(e),s):t},s.startAngle=function(e){return arguments.length?(r=v(e),s):r},s.endAngle=function(e){return arguments.length?(i=v(e),s):i},s},d3.svg.diagonal=function(){function r(r,i){var s=e.call(this,r,i),o=t.call(this,r,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(n),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var e=Hr,t=Br,n=qr;return r.source=function(t){return arguments.length?(e=v(t),r):e},r.target=function(e){return arguments.length?(t=v(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},d3.svg.diagonal.radial=function(){var e=d3.svg.diagonal(),t=qr,n=e.projection;return e.projection=function(e){return arguments.length?n(Rr(t=e)):t},e},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function n(n,r){return(Xr.get(e.call(this,n,r))||Wr)(t.call(this,n,r))}var e=zr,t=Ur;return n.type=function(t){return arguments.length?(e=v(t),n):e},n.size=function(e){return arguments.length?(t=v(e),n):t},n};var Xr=d3.map({circle:Wr,cross:function(e){var t=Math.sqrt(e/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(e){var t=Math.sqrt(e/(2*$r)),n=t*$r;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Vr),n=t*Vr/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Vr),n=t*Vr/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});d3.svg.symbolTypes=Xr.keys();var Vr=Math.sqrt(3),$r=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function l(l){l.each(function(){var l=d3.select(this),c=u==null?e.ticks?e.ticks.apply(e,o):e.domain():u,h=a==null?e.tickFormat?e.tickFormat.apply(e,o):String:a,p=Qr(e,c,f),d=l.selectAll(".minor").data(p,String),v=d.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),m=d3.transition(d.exit()).style("opacity",1e-6).remove(),g=d3.transition(d).style("opacity",1),y=l.selectAll("g").data(c,String),b=y.enter().insert("g"
,"path").style("opacity",1e-6),w=d3.transition(y.exit()).style("opacity",1e-6).remove(),E=d3.transition(y).style("opacity",1),S,x=An(e),T=l.selectAll(".domain").data([0]),N=T.enter().append("path").attr("class","domain"),C=d3.transition(T),k=e.copy(),L=this.__chart__||k;this.__chart__=k,b.append("line").attr("class","tick"),b.append("text");var A=b.select("line"),O=E.select("line"),M=y.select("text").text(h),_=b.select("text"),D=E.select("text");switch(t){case"bottom":S=Jr,v.attr("y2",r),g.attr("x2",0).attr("y2",r),A.attr("y2",n),_.attr("y",Math.max(n,0)+s),O.attr("x2",0).attr("y2",n),D.attr("x",0).attr("y",Math.max(n,0)+s),M.attr("dy",".71em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+i+"V0H"+x[1]+"V"+i);break;case"top":S=Jr,v.attr("y2",-r),g.attr("x2",0).attr("y2",-r),A.attr("y2",-n),_.attr("y",-(Math.max(n,0)+s)),O.attr("x2",0).attr("y2",-n),D.attr("x",0).attr("y",-(Math.max(n,0)+s)),M.attr("dy","0em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+ -i+"V0H"+x[1]+"V"+ -i);break;case"left":S=Kr,v.attr("x2",-r),g.attr("x2",-r).attr("y2",0),A.attr("x2",-n),_.attr("x",-(Math.max(n,0)+s)),O.attr("x2",-n).attr("y2",0),D.attr("x",-(Math.max(n,0)+s)).attr("y",0),M.attr("dy",".32em").attr("text-anchor","end"),C.attr("d","M"+ -i+","+x[0]+"H0V"+x[1]+"H"+ -i);break;case"right":S=Kr,v.attr("x2",r),g.attr("x2",r).attr("y2",0),A.attr("x2",n),_.attr("x",Math.max(n,0)+s),O.attr("x2",n).attr("y2",0),D.attr("x",Math.max(n,0)+s).attr("y",0),M.attr("dy",".32em").attr("text-anchor","start"),C.attr("d","M"+i+","+x[0]+"H0V"+x[1]+"H"+i)}if(e.ticks)b.call(S,L),E.call(S,k),w.call(S,k),v.call(S,L),g.call(S,k),m.call(S,k);else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};b.call(S,H),E.call(S,H)}})}var e=d3.scale.linear(),t="bottom",n=6,r=6,i=6,s=3,o=[10],u=null,a,f=0;return l.scale=function(t){return arguments.length?(e=t,l):e},l.orient=function(e){return arguments.length?(t=e,l):t},l.ticks=function(){return arguments.length?(o=arguments,l):o},l.tickValues=function(e){return arguments.length?(u=e,l):u},l.tickFormat=function(e){return arguments.length?(a=e,l):a},l.tickSize=function(e,t,s){if(!arguments.length)return n;var o=arguments.length-1;return n=+e,r=o>1?+t:n,i=o>0?+arguments[o]:n,l},l.tickPadding=function(e){return arguments.length?(s=+e,l):s},l.tickSubdivide=function(e){return arguments.length?(f=+e,l):f},l},d3.svg.brush=function(){function o(e){e.each(function(){var e=d3.select(this),i=e.selectAll(".background").data([0]),s=e.selectAll(".extent").data([0]),c=e.selectAll(".resize").data(r,String),h;e.style("pointer-events","all").on("mousedown.brush",l).on("touchstart.brush",l),i.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),s.enter().append("rect").attr("class","extent").style("cursor","move"),c.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Gr[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),c.style("display",o.empty()?"none":null),c.exit().remove(),t&&(h=An(t),i.attr("x",h[0]).attr("width",h[1]-h[0]),a(e)),n&&(h=An(n),i.attr("y",h[0]).attr("height",h[1]-h[0]),f(e)),u(e)})}function u(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+i[+/e$/.test(e)][0]+","+i[+/^s/.test(e)][1]+")"})}function a(e){e.select(".extent").attr("x",i[0][0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",i[1][0]-i[0][0])}function f(e){e.select(".extent").attr("y",i[0][1]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",i[1][1]-i[0][1])}function l(){function x(){var e=d3.event.changedTouches;return e?d3.touches(r,e)[0]:d3.mouse(r)}function T(){d3.event.keyCode==32&&(m||(g=null,y[0]-=i[1][0],y[1]-=i[1][1],m=2),Q())}function N(){d3.event.keyCode==32&&m==2&&(y[0]+=i[1][0],y[1]+=i[1][1],m=0,Q())}function C(){var e=x(),r=!1;b&&(e[0]+=b[0],e[1]+=b[1]),m||(d3.event.altKey?(g||(g=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]),y[0]=i[+(e[0]<g[0])][0],y[1]=i[+(e[1]<g[1])][1]):g=null),d&&k(e,t,0)&&(a(h),r=!0),v&&k(e,n,1)&&(f(h),r=!0),r&&(u(h),c({type:"brush",mode:m?"move":"resize"}))}function k(e,t,n){var r=An(t),o=r[0],u=r[1],a=y[n],f=i[1][n]-i[0][n],l,c;m&&(o-=a,u-=f+a),l=Math.max(o,Math.min(u,e[n])),m?c=(l+=a)+f:(g&&(a=Math.max(o,Math.min(u,2*g[n]-l))),a<l?(c=l,l=a):c=a);if(i[0][n]!==l||i[1][n]!==c)return s=null,i[0][n]=l,i[1][n]=c,!0}function L(){C(),h.style("pointer-events","all").selectAll(".resize").style("display",o.empty()?"none":null),d3.select("body").style("cursor",null),w.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),c({type:"brushend"}),Q()}var r=this,l=d3.select(d3.event.target),c=e.of(r,arguments),h=d3.select(r),p=l.datum(),d=!/^(n|s)$/.test(p)&&t,v=!/^(e|w)$/.test(p)&&n,m=l.classed("extent"),g,y=x(),b,w=d3.select(window).on("mousemove.brush",C).on("mouseup.brush",L).on("touchmove.brush",C).on("touchend.brush",L).on("keydown.brush",T).on("keyup.brush",N);if(m)y[0]=i[0][0]-y[0],y[1]=i[0][1]-y[1];else if(p){var E=+/w$/.test(p),S=+/^n/.test(p);b=[i[1-E][0]-y[0],i[1-S][1]-y[1]],y[0]=i[E][0],y[1]=i[S][1]}else d3.event.altKey&&(g=y.slice());h.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",l.style("cursor")),c({type:"brushstart"}),C(),Q()}var e=Y(o,"brushstart","brush","brushend"),t=null,n=null,r=Yr[0],i=[[0,0],[0,0]],s;return o.x=function(e){return arguments.length?(t=e,r=Yr[!t<<1|!n],o):t},o.y=function(e){return arguments.length?(n=e,r=Yr[!t<<1|!n],o):n},o.extent=function(e){var r,u,a,f,l;return arguments.length?(s=[[0,0],[0,0]],t&&(r=e[0],u=e[1],n&&(r=r[0],u=u[0]),s[0][0]=r,s[1][0]=u,t.invert&&(r=t(r),u=t(u)),u<r&&(l=r,r=u,u=l),i[0][0]=r|0,i[1][0]=u|0),n&&(a=e[0],f=e[1],t&&(a=a[1],f=f[1]),s[0][1]=a,s[1][1]=f,n.invert&&(a=n(a),f=n(f)),f<a&&(l=a,a=f,f=l),i[0][1]=a|0,i[1][1]=f|0),o):(e=s||i,t&&(r=e[0][0],u=e[1][0],s||(r=i[0][0],u=i[1][0],t.invert&&(r=t.invert(r),u=t.invert(u)),u<r&&(l=r,r=u,u=l))),n&&(a=e[0][1],f=e[1][1],s||(a=i[0][1],f=i[1][1],n.invert&&(a=n.invert(a),f=n.invert(f)),f<a&&(l=a,a=f,f=l))),t&&n?[[r,a],[u,f]]:t?[r,u]:n&&[a,f])},o.clear=function(){return s=null,i[0][0]=i[0][1]=i[1][0]=i[1][1]=0,o},o.empty=function(){return t&&i[0][0]===i[1][0]||n&&i[0][1]===i[1][1]},d3.rebind(o,e,"on")};var Gr={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Yr=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];Raphael.fn.removeChild=function(e){e.remove()},Raphael.fn.line=function(){var e=this.path();return e.data("lineAttrs",{}),e},Raphael.fn.getAttribute=function(e){return this.__attrs[e]},Raphael.fn.setAttribute=function(e,t){this.__attrs[e]=t,(e==="height"||e==="width")&&this.setSize(this.__attrs.width,this.__attrs.height)},Raphael.fn.getElementsByClassName=function(e){var t=[];return e="."+e,this.forEach(function(n){Sizzle.matchesSelector(n.node,e)&&t.push(n)}),t},Raphael.fn.getElementsByTagName=function(e){var t=[];return this.forEach(function(n){var r=n.data("lineAttrs")?"line":n.type;r===e&&t.push(n)}),t},Raphael.fn.appendChild=function(e){var t=e&&e.nodeName,n=t?this[t.toLowerCase()]():null;return n&&(n.paper=this),n},Raphael.el.addEventListener=function(e,t){this[e](t)},Raphael.el.removeEventListener=function(e,t){this["un"+e](t)},Raphael.el.setAttribute=function(e,t){return(e=="class"||e=="className")&&Zr(this.node,t),this.attr(e,t),this},Raphael.el.removeAttribute=function(e){return this.attr(e,""),this},Raphael.el.getAttribute=function(e){return this.attr(e)},Raphael.st.getElementsByClassName=Raphael.fn.getElementsByClassName,Raphael.st.getElementsByTagName=Raphael.fn.getElementsByTagName,Raphael.st.appendChild=function(e){var t=this.paper.appendChild(e);return this.push(t),t},Raphael.st.addEventListener=function(e,t){this.forEach(function(n){n.addEventListener(e,t)})},Raphael.st.removeEventListener=function(e,t){this.forEach(function(n){n.removeEventListener(e,t)})},Raphael.st.setAttribute=function(e,t){this.forEach(function(n){n.setAttribute(e,t)})},Raphael.st.removeAttribute=function(e){this.forEach(function(t){t.removeAttribute(e)})},d3.behavior={},d3.behavior.drag=function(){function n(){this.on("mousedown.drag",r).on("touchstart.drag",r)}function r(){function f(){var e=n.parentNode,t=d3.event.changedTouches;return t?d3.touches(e,t)[0]:d3.mouse(e)}function l(){if(!n.parentNode)return c();var e=f(),t=e[0]-o[0],i=e[1]-o[1];u|=t|i,o=e,Q(),r({type:"drag",x:e[0]+s[0],y:e[1]+s[1],dx:t,dy:i})}function c(){r({type:"dragend"}),u&&(Q(),d3.event.target===i&&a.on("click.drag",h,!0)),a.on("mousemove.drag",null).on("touchmove.drag",null).on("mouseup.drag",null).on("touchend.drag",null)}function h(){Q(),a.on("click.drag",null)}var n=this,r=e.of(n,arguments),i=d3.event.target,s,o=f(),u=0,a=d3.select(window).on("mousemove.drag",l).on("touchmove.drag",l).on("mouseup.drag",c,!0).on("touchend.drag",c,!0);t?(s=t.apply(n,arguments),s=[s.x-o[0],s.y-o[1]]):s=[0,0],Q(),r({type:"dragstart"})}var e=Y(n,"drag","dragstart","dragend"),t=null;return n.origin=function(e){return arguments.length?(t=e,n):t},d3.rebind(n,e,"on")},d3.behavior.zoom=function(){function c(){this.on("mousedown.zoom",g).on("mousewheel.zoom",y).on("mousemove.zoom",b).on("DOMMouseScroll.zoom",y).on("dblclick.zoom",w).on("touchstart.zoom",E).on("touchmove.zoom",S).on("touchend.zoom",E)}function h(t){return[(t[0]-e[0])/n,(t[1]-e[1])/n]}function p(t){return[t[0]*n+e[0],t[1]*n+e[1]]}function d(e){n=Math.max(i[0],Math.min(i[1],e))}function v(t,n){n=p(n),e[0]+=t[0]-n[0],e[1]+=t[1]-n[1]}function m(t){u&&u.domain(o.range().map(function(t){return(t-e[0])/n}).map(o.invert)),f&&f.domain(a.range().map(function(t){return(t-e[1])/n}).map(a.invert)),d3.event.preventDefault(),t({type:"zoom",scale:n,translate:e})}function g(){function u(){r=1,v(d3.mouse(e),o),m(t)}function a(){r&&Q(),i.on("mousemove.zoom",null).on("mouseup.zoom",null),r&&d3.event.target===n&&i.on("click.zoom",f,!0)}function f(){Q(),i.on("click.zoom",null)}var e=this,t=s.of(e,arguments),n=d3.event.target,r=0,i=d3.select(window).on("mousemove.zoom",u).on("mouseup.zoom",a),o=h(d3.mouse(e));window.focus(),Q()}function y(){t||(t=h(d3.mouse(this))),d(Math.pow(2,ii()*.002)*n),v(d3.mouse(this),t),m(s.of(this,arguments))}function b(){t=null}function w(){var e=d3.mouse(this),t=h(e);d(d3.event.shiftKey?n/2:n*2),v(e,t),m(s.of(this,arguments))}function E(){var e=d3.touches(this),i=Date.now();r=n,t={},e.forEach(function(e){t[e.identifier]=h(e)}),Q();if(e.length===1){if(i-l<500){var o=e[0],u=h(e[0]);d(n*2),v(o,u),m(s.of(this,arguments))}l=i}}function S(){var e=d3.touches(this),n=e[0],i=t[n.identifier];if(o=e[1]){var o,u=t[o.identifier];n=[(n[0]+o[0])/2,(n[1]+o[1])/2],i=[(i[0]+u[0])/2,(i[1]+u[1])/2],d(d3.event.scale*r)}v(n,i),l=null,m(s.of(this,arguments))}var e=[0,0],t,n=1,r,i=ri,s=Y(c,"zoom"),o,u,a,f,l;return c.translate=function(t){return arguments.length?(e=t.map(Number),c):e},c.scale=function(e){return arguments.length?(n=+e,c):n},c.scaleExtent=function(e){return arguments.length?(i=e==null?ri:e.map(Number),c):i},c.x=function(e){return arguments.length?(u=e,o=e.copy(),c):u},c.y=function(e){return arguments.length?(f=e,a=e.copy(),c):f},d3.rebind(c,s,"on")};var ni,ri=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(si(e[n]));return t}},d3.layout.chord=function(){function f(){var e={},f=[],c=d3.range(i),h=[],p,d,v,m,g;t=[],n=[],p=0,m=-1;while(++m<i){d=0,g=-1;while(++g<i)d+=r[m][g];f.push(d),h.push(d3.range(i)),p+=d}o&&c.sort(function(e,t){return o(f[e],f[t])}),u&&h.forEach(function(e,t){e.sort(function(e,n){return u(r[t][e],r[t][n])})}),p=(2*Math.PI-s*i)/p,d=0,m=-1;while(++m<i){v=d,g=-1;while(++g<i){var y=c[m],b=h[y][g],w=r[y][b],E=d,S=d+=w*p;e[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}n[y]={index:y,startAngle:v,endAngle:d,value:(d-v)/p},d+=s}m=-1;while(++m<i){g=m-1;while(++g<i){var x=e[m+"-"+g],T=e[g+"-"+m];(x.value||T.value)&&t.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}}a&&l()}function l(){t.sort(function(e,t){return a((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var e={},t,n,r,i,s=0,o,u,a;return e.matrix=function(s){return arguments.length?(i=(r=s)&&r.length,t=n=null,e):r},e.padding=function(r){return arguments.length?(s=r,t=n=null,e):s},e.sortGroups=function(r){return arguments.length?(o=r,t=n=null,e):o},e.sortSubgroups=function(n){return arguments.length?(u=n,t=null,e):u},e.sortChords=function(n){return arguments.length?(a=n,t&&l(),e):a},e.chords=function(){return t||f(),t},e.groups=function(){return n||f(),n},e},d3.layout.force=function(){function b(e){return function(t,n,r,i,s){if(t.point!==e){var o=t.cx-e.x,u=t.cy-e.y,a=1/Math.sqrt(o*o+u*u);if((i-n)*a<l){var f=t.charge*a*a;return e.px-=o*f,e.py-=u*f,!0}if(t.point&&isFinite(a)){var f=t.pointCharge*a*a;e.px-=o*f,e.py-=u*f}}return!t.charge}}function w(t){li(fi=t),ai=e}var e={},t=d3.dispatch("start","tick","end"),n=[1,1],r,i,s=.9,o=vi,u=mi,a=-30,f=.1,l=.8,c,p=[],d=[],m,g,y;return e.tick=function(){if((i*=.99)<.005)return t.end({type:"end",alpha:i=0}),!0;var e=p.length,r=d.length,o,u,l,c,h,v,w,E,S;for(u=0;u<r;++u){l=d[u],c=l.source,h=l.target,E=h.x-c.x,S=h.y-c.y;if(v=E*E+S*S)v=i*g[u]*((v=Math.sqrt(v))-m[u])/v,E*=v,S*=v,h.x-=E*(w=c.weight/(h.weight+c.weight)),h.y-=S*w,c.x+=E*(w=1-w),c.y+=S*w}if(w=i*f){E=n[0]/2,S=n[1]/2,u=-1;if(w)while(++u<e)l=p[u],l.x+=(E-l.x)*w,l.y+=(S-l.y)*w}if(a){di(o=d3.geom.quadtree(p),i,y),u=-1;while(++u<e)(l=p[u]).fixed||o.visit(b(l))}u=-1;while(++u<e)l=p[u],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);t.tick({type:"tick",alpha:i})},e.nodes=function(t){return arguments.length?(p=t,e):p},e.links=function(t){return arguments.length?(d=t,e):d},e.size=function(t){return arguments.length?(n=t,e):n},e.linkDistance=function(t){return arguments.length?(o=v(t),e):o},e.distance=e.linkDistance,e.linkStrength=function(t){return arguments.length?(u=v(t),e):u},e.friction=function(t){return arguments.length?(s=t,e):s},e.charge=function(t){return arguments.length?(a=typeof t=="function"?t:+t,e):a},e.gravity=function(t){return arguments.length?(f=t,e):f},e.theta=function(t){return arguments.length?(l=t,e):l},e.alpha=function(n){return arguments.length?(i?n>0?i=n:i=0:n>0&&(t.start({type:"start",alpha:i=n}),d3.timer(e.tick)),e):i},e.start=function(){function v(e,n){var r=b(t),i=-1,s=r.length,o;while(++i<s)if(!isNaN(o=r[i][e]))return o;return Math.random()*n}function b(){if(!c){c=[];for(r=0;r<i;++r)c[r]=[];for(r=0;r<s;++r){var e=d[r];c[e.source.index].push(e.target),c[e.target.index].push(e.source)}}return c[t]}var t,r,i=p.length,s=d.length,f=n[0],l=n[1],c,h;for(t=0;t<i;++t)(h=p[t]).index=t,h.weight=0;m=[],g=[];for(t=0;t<s;++t)h=d[t],typeof h.source=="number"&&(h.source=p[h.source]),typeof h.target=="number"&&(h.target=p[h.target]),m[t]=o.call(this,h,t),g[t]=u.call(this,h,t),++h.source.weight,++h.target.weight;for(t=0;t<i;++t)h=p[t],isNaN(h.x)&&(h.x=v("x",f)),isNaN(h.y)&&(h.y=v("y",l)),isNaN(h.px)&&(h.px=h.x),isNaN(h.py)&&(h.py=h.y);y=[];if(typeof a=="function")for(t=0;t<i;++t)y[t]=+a.call(this,p[t],t);else for(t=0;t<i;++t)y[t]=a;return e.resume()},e.resume=function(){return e.alpha(.1)},e.stop=function(){return e.alpha(0)},e.drag=function(){r||(r=d3.behavior.drag().origin(h).on("dragstart",w).on("drag",pi).on("dragend",hi)),this.on("mouseover.force",li).on("mouseout.force",ci).call(r)},d3.rebind(e,t,"on")};var ai,fi;d3.layout.partition=function(){function n(e,t,r,i){var s=e.children;e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;r=e.value?r/e.value:0;while(++o<u)n(a=s[o],t,f=a.value*r,i),t+=f}}function r(e){var t=e.children,n=0;if(t&&(s=t.length)){var i=-1,s;while(++i<s)n=Math.max(n,r(t[i]))}return 1+n}function i(i,s){var o=e.call(this,i,s);return n(o[0],0,t[0],t[1]/r(o[0])),o}var e=d3.layout.hierarchy(),t=[1,1];return i.size=function(e){return arguments.length?(t=e,i):t},Mi(i,e)},d3.layout.pie=function(){function i(s,o){var u=s.map(function(t,n){return+e.call(i,t,n)}),a=+(typeof n=="function"?n.apply(this,arguments):n),f=((typeof r=="function"?r.apply(this,arguments):r)-n)/d3.sum(u),l=d3.range(s.length);t!=null&&l.sort(t===gi?function(e,t){return u[t]-u[e]}:function(e,n){return t(s[e],s[n])});var c=[];return l.forEach(function(e){var t;c[e]={data:s[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}}),c}var e=Number,t=gi,n=0,r=2*Math.PI;return i.value=function(t){return arguments.length?(e=t,i):e},i.sort=function(e){return arguments.length?(t=e,i):t},i.startAngle=function(e){return arguments.length?(n=e,i):n},i.endAngle=function(e){return arguments.length?(r=e,i):r},i};var gi={};d3.layout.stack=function(){function o(u,a){var f=u.map(function(t,n){return e.call(o,t,n)}),l=f.map(function(e,t){return e.map(function(e,t){return[i.call(o,e,t),s.call(o,e,t)]})}),c=t.call(o,l,a);f=d3.permute(f,c),l=d3.permute(l,c);var h=n.call(o,l,a),p=f.length,d=f[0].length,v,m,g;for(m=0;m<d;++m){r.call(o,f[0][m],g=h[m],l[0][m][1]);for(v=1;v<p;++v)r.call(o,f[v][m],g+=l[v-1][m][1],l[v][m][1])}return u}var e=h,t=xi,n=Ti,r=wi,i=yi,s=bi;return o.values=function(t){return arguments.length?(e=t,o):e},o.order=function(e){return arguments.length?(t=typeof e=="function"?e:Ei.get(e)||xi,o):t},o.offset=function(e){return arguments.length?(n=typeof e=="function"?e:Si.get(e)||Ti,o):n},o.x=function(e){return arguments.length?(i=e,o):i},o.y=function(e){return arguments.length?(s=e,o):s},o.out=function(e){return arguments.length?(r=e,o):r},o};var Ei=d3.map({"inside-out":function(e){var t=e.length,n,r,i=e.map(Ni),s=e.map(Ci),o=d3.range(t).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(n=0;n<t;++n)r=o[n],u<a?(u+=s[r],f.push(r)):(a+=s[r],l.push(r));return l.reverse().concat(f)},reverse:function(e){return d3.range(e.length).reverse()},"default":xi}),Si=d3.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];u>i&&(i=u),r.push(u)}for(o=0;o<n;++o)a[o]=(i-r[o])/2;return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i=0,s,o,u,a,f,l,c,h,p,d=[];d[0]=h=p=0;for(o=1;o<r;++o){for(s=0,a=0;s<t;++s)a+=e[s][o][1];for(s=0,f=0,c=n[o][0]-n[o-1][0];s<t;++s){for(u=0,l=(e[s][o][1]-e[s][o-1][1])/(2*c);u<s;++u)l+=(e[u][o][1]-e[u][o-1][1])/c;f+=l*e[s][o][1]}d[o]=h-=a?f/a*c:0,h<p&&(p=h)}for(o=0;o<r;++o)d[o]-=p;return d},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:Ti});d3.layout.histogram=function(){function i(i,s){var o=[],u=i.map(t,this),a=n.call(this,u,s),f=r.call(this,a,u,s),l,s=-1,c=u.length,h=f.length-1,p=e?1:1/c,d;while(++s<h)l=o[s]=[],l.dx=f[s+1]-(l.x=f[s]),l.y=0;if(h>0){s=-1;while(++s<c)d=u[s],d>=a[0]&&d<=a[1]&&(l=o[d3.bisect(f,d,1,h)-1],l.y+=p,l.push(i[s]))}return o}var e=!0,t=Number,n=Oi,r=Li;return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=v(e),i):n},i.bins=function(e){return arguments.length?(r=typeof e=="number"?function(t){return Ai(t,e)}:v(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},d3.layout.hierarchy=function(){function r(i,o,u){var a=t.call(s,i,o),f=Bi?i:{data:i};f.depth=o,u.push(f);if(a&&(c=a.length)){var l=-1,c,h=f.children=[],p=0,d=o+1,v;while(++l<c)v=r(a[l],d,u),v.parent=f,h.push(v),p+=v.value;e&&h.sort(e),n&&(f.value=p)}else n&&(f.value=+n.call(s,i,o)||0);return f}function i(e,t){var r=e.children,o=0;if(r&&(a=r.length)){var u=-1,a,f=t+1;while(++u<a)o+=i(r[u],f)}else n&&(o=+n.call(s,Bi?e:e.data,t)||0);return n&&(e.value=o),o}function s(e){var t=[];return r(e,0,t),t}var e=Pi,t=_i,n=Di;return s.sort=function(t){return arguments.length?(e=t,s):e},s.children=function(e){return arguments.length?(t=e,s):t},s.value=function(e){return arguments.length?(n=e,s):n},s.revalue=function(e){return i(e,0),e},s};var Bi=!1;d3.layout.pack=function(){function r(r,i){var s=e.call(this,r,i),o=s[0];o.x=0,o.y=0,rs(o,function(e){e.r=Math.sqrt(e.value)}),rs(o,Ri);var u=n[0],a=n[1],f=Math.max(2*o.r/u,2*o.r/a);if(t>0){var l=t*f/2;rs(o,function(e){e.r+=l}),rs(o,Ri),rs(o,function(e){e.r-=l}),f=Math.max(2*o.r/u,2*o.r/a)}return Wi(o,u/2,a/2,1/f),s}var e=d3.layout.hierarchy().sort(ji),t=0,n=[1,1];return r.size=function(e){return arguments.length?(n=e,r):n},r.padding=function(e){return arguments.length?(t=+e,r):t},Mi(r,e)},d3.layout.cluster=function(){function r(r,i){var s=e.call(this,r,i),o=s[0],u,a=0,f,l;rs(o,function(e){var n=e.children;n&&n.length?(e.x=$i(n),e.y=Vi(n)):(e.x=u?a+=t(e,u):0,e.y=0,u=e)});var c=Ji(o),h=Ki(o),p=c.x-t(c,h)/2,d=h.x+t(h,c)/2;return rs(o,function(e){e.x=(e.x-p)/(d-p)*n[0],e.y=(1-(o.y?e.y/o.y:1))*n[1]}),s}var e=d3.layout.hierarchy().sort(null).value(null),t=Qi,n=[1,1];return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(e){return arguments.length?(n=e,r):n},Mi(r,e)},d3.layout.tree=function(){function r(r,i){function u(e,n){var r=e.children,i=e._tree;if(r&&(s=r.length)){var s,o=r[0],a,l=o,c,h=-1;while(++h<s)c=r[h],u(c,a),l=f(c,a,l),a=c;is(e);var p=.5*(o._tree.prelim+c._tree.prelim);n?(i.prelim=n._tree.prelim+t(e,n),i.mod=i.prelim-p):i.prelim=p}else n&&(i.prelim=n._tree.prelim+t(e,n))}function a(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i)a(n[r],t)}}function f(e,n,r){if(n){var i=e,s=e,o=n,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Yi(o),i=Gi(i),o&&i)u=Gi(u),s=Yi(s),s._tree.ancestor=e,h=o._tree.prelim+l-i._tree.prelim-a+t(o,i),h>0&&(ss(os(o,e,r),e,h),a+=h,f+=h),l+=o._tree.mod,a+=i._tree.mod,c+=u._tree.mod,f+=s._tree.mod;o&&!Yi(s)&&(s._tree.thread=o,s._tree.mod+=l-f),i&&!Gi(u)&&(u._tree.thread=i,u._tree.mod+=a-c,r=e)}return r}var s=e.call(this,r,i),o=s[0];rs(o,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),u(o),a(o,-o._tree.prelim);var l=Zi(o,ts),c=Zi(o,es),h=Zi(o,ns),p=l.x-t(l,c)/2,d=c.x+t(c,l)/2,v=h.depth||1;return rs(o,function(e){e.x=(e.x-p)/(d-p)*n[0],e.y=e.depth/v*n[1],delete e._tree}),s}var e=d3.layout.hierarchy().sort(null).value(null),t=Qi,n=[1,1];return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(e){return arguments.length?(n=e,r):n},Mi(r,e)},d3.layout.treemap=function(){function a(e,t){var n=-1,r=e.length,i,s;while(++n<r)s=(i=e[n]).value*(t<0?0:t),i.area=isNaN(s)||s<=0?0:s}function f(e){var t=e.children;if(t&&t.length){var n=i(e),r=[],s=t.slice(),o,u=Infinity,l,p=Math.min(n.dx,n.dy),d;a(s,n.dx*n.dy/e.value),r.area=0;while((d=s.length)>0)r.push(o=s[d-1]),r.area+=o.area,(l=c(r,p))<=u?(s.pop(),u=l):(r.area-=r.pop().area,h(r,p,n,!1),p=Math.min(n.dx,n.dy),r.length=r.area=0,u=Infinity);r.length&&(h(r,p,n,!0),r.length=r.area=0),t.forEach(f)}}function l(e){var t=e.children;if(t&&t.length){var n=i(e),r=t.slice(),s,o=[];a(r,n.dx*n.dy/e.value),o.area=0;while(s=r.pop())o.push(s),o.area+=s.area,s.z!=null&&(h(o,s.z?n.dx:n.dy,n,!r.length),o.length=o.area=0);t.forEach(l)}}function c(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,a=e.length;while(++o<a){if(!(r=e[o].area))continue;r<s&&(s=r),r>i&&(i=r)}return n*=n,t*=t,n?Math.max(t*i*u/n,n/(t*s*u)):Infinity}function h(e,n,r,i){var s=-1,o=e.length,u=r.x,a=r.y,f=n?t(e.area/n):0,l;if(n==r.dx){if(i||f>r.dy)f=r.dy;while(++s<o)l=e[s],l.x=u,l.y=a,l.dy=f,u+=l.dx=Math.min(r.x+r.dx-u,f?t(l.area/f):0);l.z=!0,l.dx+=r.x+r.dx-u,r.y+=f,r.dy-=f}else{if(i||f>r.dx)f=r.dx;while(++s<o)l=e[s],l.x=u,l.y=a,l.dx=f,a+=l.dy=Math.min(r.y+r.dy-a,f?t(l.area/f):0);l.z=!1,l.dy+=r.y+r.dy-a,r.x+=f,r.dx-=f}}function p(t){var r=o||e(t),i=r[0];return i.x=0,i.y=0,i.dx=n[0],i.dy=n[1],o&&e.revalue(i),a([i],i.dx*i.dy/i.value),(o?l:f)(i),s&&(o=r),r}var e=d3.layout.hierarchy(),t=Math.round,n=[1,1],r=null,i=us,s=!1,o,u=.5*(1+Math.sqrt(5));return p.size=function(e){return arguments.length?(n=e,p):n},p.padding=function(e){function t(t){var n=e.call(p,t,t.depth);return n==null?us(t):as(t,typeof n=="number"?[n,n,n,n]:n)}function n(t){return as(t,e)}if(!arguments.length)return r;var s;return i=(r=e)==null?us:(s=typeof e)==="function"?t:s==="number"?(e=[e,e,e,e],n):n,p},p.round=function(e){return arguments.length?(t=e?Math.round:Number,p):t!=Number},p.sticky=function(e){return arguments.length?(s=e,o=null,p):s},p.ratio=function(e){return arguments.length?(u=e,p):u},Mi(p,e)},d3.csv=fs(",","text/csv"),d3.tsv=fs(" ","text/tab-separated-values"),d3.geo={};var ls=Math.PI/180;d3.geo.azimuthal=function(){function a(t){var s=t[0]*ls-i,a=t[1]*ls,f=Math.cos(s),l=Math.sin(s),c=Math.cos(a),h=Math.sin(a),p=e!=="orthographic"?u*h+o*c*f:null,d,v=e==="stereographic"?1/(1+p):e==="gnomonic"?1/p:e==="equidistant"?(d=Math.acos(p),d?d/Math.sin(d):0):e==="equalarea"?Math.sqrt(2/(1+p)):1,m=v*c*l,g=v*(u*c*f-o*h);return[n*m+r[0],n*g+r[1]]}var e="orthographic",t,n=200,r=[480,250],i,s,o,u;return a.invert=function(t){var s=(t[0]-r[0])/n,a=(t[1]-r[1])/n,f=Math.sqrt(s*s+a*a),l=e==="stereographic"?2*Math.atan(f):e==="gnomonic"?Math.atan(f):e==="equidistant"?f:e==="equalarea"?2*Math.asin(.5*f):Math.asin(f),c=Math.sin(l),h=Math.cos(l);return[(i+Math.atan2(s*c,f*o*h+a*u*c))/ls,Math.asin(h*u-(f?a*c*o/f:0))/ls]},a.mode=function(t){return arguments.length?(e=t+"",a):e},a.origin=function(e){return arguments.length?(t=e,i=t[0]*ls,s=t[1]*ls,o=Math.cos(s),u=Math.sin(s),a):t},a.scale=function(e){return arguments.length?(n=+e,a):n},a.translate=function(e){return arguments.length?(r=[+e[0],+e[1]],a):r},a.origin([0,0])},d3.geo.albers=function(){function a(e){var t=s*(ls*e[0]-i),a=Math.sqrt(o-2*s*Math.sin(ls*e[1]))/s;return[n*a*Math.sin(t)+r[0],n*(a*Math.cos(t)-u)+r[1]]}function f(){var n=ls*t[0],r=ls*t[1],f=ls*e[1],l=Math.sin(n),c=Math.cos(n);return i=ls*e[0],s=.5*(l+Math.sin(r)),o=c*c+2*s*l,u=Math.sqrt(o-2*s*Math.sin(f))/s,a}var e=[-98,38],t=[29.5,45.5],n=1e3,r=[480,250],i,s,o,u;return a.invert=function(e){var t=(e[0]-r[0])/n,a=(e[1]-r[1])/n,f=u+a,l=Math.atan2(t,f),c=Math.sqrt(t*t+f*f);return[(i+l/s)/ls,Math.asin((o-c*c*s*s)/(2*s))/ls]},a.origin=function(t){return arguments.length?(e=[+t[0],+t[1]],f()):e},a.parallels=function(e){return arguments.length?(t=[+e[0],+e[1]],f()):t},a.scale=function(e){return arguments.length?(n=+e,a):n},a.translate=function(e){return arguments.length?(r=[+e[0],+e[1]],a):r},f()},d3.geo.albersUsa=function(){function i(i){var s=i[0],o=i[1];return(o>50?t:s<-140?n:o<21?r:e)(i)}var e=d3.geo.albers(),t=d3.geo.albers().origin([-160,60]).parallels([55,65]),n=d3.geo.albers().origin([-160,20]).parallels([8,18]),r=d3.geo.albers().origin([-60,10]).parallels([8,18]);return i.scale=function(s){return arguments.length?(e.scale(s),t.scale(s*.6),n.scale(s),r.scale(s*1.5),i.translate(e.translate())):e.scale()},i.translate=function(s){if(!arguments.length)return e.translate();var o=e.scale()/1e3,u=s[0],a=s[1];return e.translate(s),t.translate([u-400*o,a+170*o]),n.translate([u-190*o,a+200*o]),r.translate([u+580*o,a+430*o]),i},i.scale(e.scale())},d3.geo.bonne=function(){function o(o){var u=o[0]*ls-n,a=o[1]*ls-r;if(i){var f=s+i-a,l=u*Math.cos(a)/f;u=f*Math.sin(l),a=f*Math.cos(l)-s}else u*=Math.cos(a),a*=-1;return[e*u+t[0],e*a+t[1]]}var e=200,t=[480,250],n,r,i,s;return o.invert=function(r){var o=(r[0]-t[0])/e,u=(r[1]-t[1])/e;if(i){var a=s+u,f=Math.sqrt(o*o+a*a);u=s+i-f,o=n+f*Math.atan2(o,a)/Math.cos(u)}else u*=-1,o/=Math.cos(u);return[o/ls,u/ls]},o.parallel=function(e){return arguments.length?(s=1/Math.tan(i=e*ls),o):i/ls},o.origin=function(e){return arguments.length?(n=e[0]*ls,r=e[1]*ls,o):[n/ls,r/ls]},o.scale=function(t){return arguments.length?(e=+t,o):e},o.translate=function(e){return arguments.length?(t=[+e[0],+e[1]],o):t},o.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function n(n){var r=n[0]/360,i=-n[1]/360;return[e*r+t[0],e*i+t[1]]}var e=500,t=[480,250];return n.invert=function(n){var r=(n[0]-t[0])/e,i=(n[1]-t[1])/e;return[360*r,-360*i]},n.scale=function(t){return arguments.length?(e=+t,n):e},n.translate=function(e){return arguments.length?(t=[+e[0],+e[1]],n):t},n},d3.geo.mercator=function(){function n(n){var r=n[0]/360,i=-(Math.log(Math.tan(Math.PI/4+n[1]*ls/2))/ls)/360;return[e*r+t[0],e*Math.max(-0.5,Math.min(.5,i))+t[1]]}var e=500,t=[480,250];return n.invert=function(n){var r=(n[0]-t[0])/e,i=(n[1]-t[1])/e;return[360*r,2*Math.atan(Math.exp(-360*i*ls))/ls-90]},n.scale=function(t){return arguments.length?(e=+t,n):e},n.translate=function(e){return arguments.length?(t=[+e[0],+e[1]],n):t},n},d3.geo.path=function(){function i(n,i){typeof e=="function"&&(t=hs(e.apply(this,arguments))),o(n);var s=r.length?r.join(""):null;return r=[],s}function s(e){return n(e).join(",")}function a(e){var t=c(e[0]),n=0,r=e.length;while(++n<r)t-=c(e[n]);return t}function f(e){var t=d3.geom.polygon(e[0].map(n)),r=t.area(),i=t.centroid(r<0?(r*=-1,1):-1),s=i[0],o=i[1],u=r,a=0,f=e.length;while(++a<f)t=d3.geom.polygon(e[a].map(n)),r=t.area(),i=t.centroid(r<0?(r*=-1,1):-1),s-=i[0],o-=i[1],u-=r;return[s,o,6*u]}function c(e){return Math.abs(d3.geom.polygon(e.map(n)).area())}var e=4.5,t=hs(e),n=d3.geo.albersUsa(),r=[],o=cs({FeatureCollection:function(e){var t=e.features,n=-1,i=t.length;while(++n<i)r.push(o(t[n].geometry))},Feature:function(e){o(e.geometry)},Point:function(e){r.push("M",s(e.coordinates),t)},MultiPoint:function(e){var n=e.coordinates,i=-1,o=n.length;while(++i<o)r.push("M",s(n[i]),t)},LineString:function(e){var t=e.coordinates,n=-1,i=t.length;r.push("M");while(++n<i)r.push(s(t[n]),"L");r.pop()},MultiLineString:function(e){var t=e.coordinates,n=-1,i=t.length,o,u,a;while(++n<i){o=t[n],u=-1,a=o.length,r.push("M");while(++u<a)r.push(s(o[u]),"L");r.pop()}},Polygon:function(e){var t=e.coordinates,n=-1,i=t.length,o,u,a;while(++n<i){o=t[n],u=-1;if((a=o.length-1)>0){r.push("M");while(++u<a)r.push(s(o[u]),"L");r[r.length-1]="Z"}}},MultiPolygon:function(e){var t=e.coordinates,n=-1,i=t.length,o,u,a,f,l,c;while(++n<i){o=t[n],u=-1,a=o.length;while(++u<a){f=o[u],l=-1;if((c=f.length-1)>0){r.push("M");while(++l<c)r.push(s(f[l]),"L");r[r.length-1]="Z"}}}},GeometryCollection:function(e){var t=e.geometries,n=-1,i=t.length;while(++n<i)r.push(o(t[n]))}}),u=i.area=cs({FeatureCollection:function(e){var t=0,n=e.features,r=-1,i=n.length;while(++r<i)t+=u(n[r]);return t},Feature:function(e){return u(e.geometry)},Polygon:function(e){return a(e.coordinates)},MultiPolygon:function(e){var t=0,n=e.coordinates,r=-1,i=n.length;while(++r<i)t+=a(n[r]);return t},GeometryCollection:function(e){var t=0,n=e.geometries,r=-1,i=n.length;while(++r<i)t+=u(n[r]);return t}},0),l=i.centroid=cs({Feature:function(e){return l(e.geometry)},Polygon:function(e){var t=f(e.coordinates);return[t[0]/t[2],t[1]/t[2]]},MultiPolygon:function(e){var t=0,n=e.coordinates,r,i=0,s=0,o=0,u=-1,a=n.length;while(++u<a)r=f(n[u]),i+=r[0],s+=r[1],o+=r[2];return[i/o,s/o]}});return i.projection=function(e){return n=e,i},i.pointRadius=function(n){return typeof n=="function"?e=n:(e=+n,t=hs(e)),i},i},d3.geo.bounds=function(e){var t=Infinity,n=Infinity,r=-Infinity,i=-Infinity;return ps(e,function(e,s){e<t&&(t=e),e>r&&(r=e),s<n&&(n=s),s>i&&(i=s)}),[[t,n],[r,i]]};var ds={Feature:vs,FeatureCollection:ms,GeometryCollection:gs,LineString:ys,MultiLineString:bs,MultiPoint:ys,MultiPolygon:ws,Point:Es,Polygon:Ss};d3.geo.circle=function(){function i(){}function s(e){return r.distance(e)<n}function u(e){var t=-1,i=e.length,s=[],o,u,f,l,c;while(++t<i)c=r.distance(f=e[t]),c<n?(u&&s.push(Cs(u,f)((l-n)/(l-c))),s.push(f),o=u=null):(u=f,!o&&s.length&&(s.push(Cs(s[s.length-1],u)((n-l)/(c-l))),o=u)),l=c;return o=e[0],u=s[0],u&&f[0]===o[0]&&f[1]===o[1]&&(f[0]!==u[0]||f[1]!==u[1])&&s.push(u),a(s)}function a(e){var t=0,n=e.length,i,s,o=n?[e[0]]:e,u,a=r.source();while(++t<n){u=r.source(e[t-1])(e[t]).coordinates;for(i=0,s=u.length;++i<s;)o.push(u[i])}return r.source(a),o}var e=[0,0],t=89.99,n=t*ls,r=d3.geo.greatArc().source(e).target(h);i.clip=function(t){return typeof e=="function"&&r.source(e.apply(this,arguments)),o(t)||null};var o=cs({FeatureCollection:function(e){var t=e.features.map(o).filter(h);return t&&(e=Object.create(e),e.features=t,e)},Feature:function(e){var t=o(e.geometry);return t&&(e=Object.create(e),e.geometry=t,e)},Point:function(e){return s(e.coordinates)&&e},MultiPoint:function(e){var t=e.coordinates.filter(s);return t.length&&{type:e.type,coordinates:t}},LineString:function(e){var t=u(e.coordinates);return t.length&&(e=Object.create(e),e.coordinates=t,e)},MultiLineString:function(e){var t=e.coordinates.map(u).filter(function(e){return e.length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},Polygon:function(
e){var t=e.coordinates.map(u);return t[0].length&&(e=Object.create(e),e.coordinates=t,e)},MultiPolygon:function(e){var t=e.coordinates.map(function(e){return e.map(u)}).filter(function(e){return e[0].length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},GeometryCollection:function(e){var t=e.geometries.map(o).filter(h);return t.length&&(e=Object.create(e),e.geometries=t,e)}});return i.origin=function(t){return arguments.length?(e=t,typeof e!="function"&&r.source(e),i):e},i.angle=function(e){return arguments.length?(n=(t=+e)*ls,i):t},d3.rebind(i,r,"precision")},d3.geo.greatArc=function(){function o(){var e=o.distance.apply(this,arguments),n=0,u=i/e,a=[t];while((n+=u)<1)a.push(s(n));return a.push(r),{type:"LineString",coordinates:a}}var e=xs,t,n=Ts,r,i=6*ls,s=Ns();return o.distance=function(){return typeof e=="function"&&s.source(t=e.apply(this,arguments)),typeof n=="function"&&s.target(r=n.apply(this,arguments)),s.distance()},o.source=function(n){return arguments.length?(e=n,typeof e!="function"&&s.source(t=e),o):e},o.target=function(e){return arguments.length?(n=e,typeof n!="function"&&s.target(r=n),o):n},o.precision=function(e){return arguments.length?(i=e*ls,o):i/ls},o},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(e,t){var n=t||As(e),r=[],i=n[0],s=n[1],o=0,u=0,a=NaN,f=NaN,l=0;do l=0,e(i-1,s-1)&&(l+=1),e(i,s-1)&&(l+=2),e(i-1,s)&&(l+=4),e(i,s)&&(l+=8),l===6?(o=f===-1?-1:1,u=0):l===9?(o=0,u=a===1?-1:1):(o=ks[l],u=Ls[l]),o!=a&&u!=f&&(r.push([i,s]),a=o,f=u),i+=o,s+=u;while(n[0]!=i||n[1]!=s);return r};var ks=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],Ls=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(e){if(e.length<3)return[];var t=e.length,n=t-1,r=[],i=[],s,o,u=0,a,f,l,c,h,p,d,v;for(s=1;s<t;++s)e[s][1]<e[u][1]?u=s:e[s][1]==e[u][1]&&(u=e[s][0]<e[u][0]?s:u);for(s=0;s<t;++s){if(s===u)continue;f=e[s][1]-e[u][1],a=e[s][0]-e[u][0],r.push({angle:Math.atan2(f,a),index:s})}r.sort(function(e,t){return e.angle-t.angle}),d=r[0].angle,p=r[0].index,h=0;for(s=1;s<n;++s)o=r[s].index,d==r[s].angle?(a=e[p][0]-e[u][0],f=e[p][1]-e[u][1],l=e[o][0]-e[u][0],c=e[o][1]-e[u][1],a*a+f*f>=l*l+c*c?r[s].index=-1:(r[h].index=-1,d=r[s].angle,h=s,p=o)):(d=r[s].angle,h=s,p=o);i.push(u);for(s=0,o=0;s<2;++o)r[o].index!==-1&&(i.push(r[o].index),s++);v=i.length;for(;o<n;++o){if(r[o].index===-1)continue;while(!Os(i[v-2],i[v-1],r[o].index,e))--v;i[v++]=r[o].index}var m=[];for(s=0;s<v;++s)m.push(e[i[s]]);return m},d3.geom.polygon=function(e){return e.area=function(){var t=0,n=e.length,r=e[n-1][0]*e[0][1],i=e[n-1][1]*e[0][0];while(++t<n)r+=e[t-1][0]*e[t][1],i+=e[t-1][1]*e[t][0];return(i-r)*.5},e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;arguments.length||(t=-1/(6*e.area()));while(++n<r)o=u,u=e[n],a=o[0]*u[1]-u[0]*o[1],i+=(o[0]+u[0])*a,s+=(o[1]+u[1])*a;return[i*t,s*t]},e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice(),t.length=0,a=e[r],f=n[(o=n.length)-1],s=-1;while(++s<o)l=n[s],Ms(l,u,a)?(Ms(f,u,a)||t.push(_s(f,l,u,a)),t.push(l)):Ms(f,u,a)&&t.push(_s(f,l,u,a)),f=l;u=a}return t},e},d3.geom.voronoi=function(e){var t=e.map(function(){return[]});return Ps(e,function(e){var n,r,i,s,o,u;e.a===1&&e.b>=0?(n=e.ep.r,r=e.ep.l):(n=e.ep.l,r=e.ep.r),e.a===1?(o=n?n.y:-1e6,i=e.c-e.b*o,u=r?r.y:1e6,s=e.c-e.b*u):(i=n?n.x:-1e6,o=e.c-e.a*i,s=r?r.x:1e6,u=e.c-e.a*s);var a=[i,o],f=[s,u];t[e.region.l.index].push(a,f),t[e.region.r.index].push(a,f)}),t.map(function(t,n){var r=e[n][0],i=e[n][1];return t.forEach(function(e){e.angle=Math.atan2(e[0]-r,e[1]-i)}),t.sort(function(e,t){return e.angle-t.angle}).filter(function(e,n){return!n||e.angle-t[n-1].angle>1e-10})})};var Ds={l:"r",r:"l"};d3.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return Ps(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++)n.push([i,t[u],t[u+1]])}),n},d3.geom.quadtree=function(e,t,n,r,i){function l(e,t,n,r,i,s){if(isNaN(t.x)||isNaN(t.y))return;if(e.leaf){var o=e.point;o?Math.abs(o.x-t.x)+Math.abs(o.y-t.y)<.01?c(e,t,n,r,i,s):(e.point=null,c(e,o,n,r,i,s),c(e,t,n,r,i,s)):e.point=t}else c(e,t,n,r,i,s)}function c(e,t,n,r,i,s){var o=(n+i)*.5,u=(r+s)*.5,a=t.x>=o,f=t.y>=u,c=(f<<1)+a;e.leaf=!1,e=e.nodes[c]||(e.nodes[c]=Hs()),a?n=o:i=o,f?r=u:s=u,l(e,t,n,r,i,s)}var s,o=-1,u=e.length;u&&isNaN(e[0].x)&&(e=e.map(js));if(arguments.length<5)if(arguments.length===3)i=r=n,n=t;else{t=n=Infinity,r=i=-Infinity;while(++o<u)s=e[o],s.x<t&&(t=s.x),s.y<n&&(n=s.y),s.x>r&&(r=s.x),s.y>i&&(i=s.y);var a=r-t,f=i-n;a>f?i=n+a:r=t+f}var h=Hs();return h.add=function(e){l(h,e,t,n,r,i)},h.visit=function(e){Bs(e,h,t,n,r,i)},e.forEach(h.add),h},d3.time={};var Fs=Date,Is=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];qs.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Rs.setUTCDate.apply(this._,arguments)},setDay:function(){Rs.setUTCDay.apply(this._,arguments)},setFullYear:function(){Rs.setUTCFullYear.apply(this._,arguments)},setHours:function(){Rs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Rs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Rs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Rs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Rs.setUTCSeconds.apply(this._,arguments)},setTime:function(){Rs.setTime.apply(this._,arguments)}};var Rs=Date.prototype,Us="%a %b %e %H:%M:%S %Y",zs="%m/%d/%y",Ws="%H:%M:%S",Xs=Is,Vs=Xs.map(Ks),$s=["January","February","March","April","May","June","July","August","September","October","November","December"],Js=$s.map(Ks);d3.time.format=function(e){function n(n){var r=[],i=-1,s=0,o,u;while(++i<t)e.charCodeAt(i)==37&&(r.push(e.substring(s,i),(u=fo[o=e.charAt(++i)])?u(n):o),s=i+1);return r.push(e.substring(s,i)),r.join("")}var t=e.length;return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Qs(n,e,t,0);if(r!=t.length)return null;"p"in n&&(n.H=n.H%12+n.p*12);var i=new Fs;return i.setFullYear(n.y,n.m,n.d),i.setHours(n.H,n.M,n.S,n.L),i},n.toString=function(){return e},n};var Zs=d3.format("02d"),eo=d3.format("03d"),to=d3.format("04d"),no=d3.format("2d"),ro=Gs(Xs),io=Gs(Vs),so=Gs($s),oo=Ys($s),uo=Gs(Js),ao=Ys(Js),fo={a:function(e){return Vs[e.getDay()]},A:function(e){return Xs[e.getDay()]},b:function(e){return Js[e.getMonth()]},B:function(e){return $s[e.getMonth()]},c:d3.time.format(Us),d:function(e){return Zs(e.getDate())},e:function(e){return no(e.getDate())},H:function(e){return Zs(e.getHours())},I:function(e){return Zs(e.getHours()%12||12)},j:function(e){return eo(1+d3.time.dayOfYear(e))},L:function(e){return eo(e.getMilliseconds())},m:function(e){return Zs(e.getMonth()+1)},M:function(e){return Zs(e.getMinutes())},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e){return Zs(e.getSeconds())},U:function(e){return Zs(d3.time.sundayOfYear(e))},w:function(e){return e.getDay()},W:function(e){return Zs(d3.time.mondayOfYear(e))},x:d3.time.format(zs),X:d3.time.format(Ws),y:function(e){return Zs(e.getFullYear()%100)},Y:function(e){return to(e.getFullYear()%1e4)},Z:Mo,"%":function(e){return"%"}},lo={a:co,A:ho,b:po,B:vo,c:mo,d:xo,e:xo,H:To,I:To,L:ko,m:So,M:No,p:Ao,S:Co,x:go,X:yo,y:wo,Y:bo},Lo=/^\s*\d+/,Oo=d3.map({am:0,pm:1});d3.time.format.utc=function(e){function n(e){try{Fs=qs;var n=new Fs;return n._=e,t(n)}finally{Fs=Date}}var t=d3.time.format(e);return n.parse=function(e){try{Fs=qs;var n=t.parse(e);return n&&n._}finally{Fs=Date}},n.toString=t.toString,n};var _o=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Do:_o,Do.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Do.toString=_o.toString,d3.time.second=Po(function(e){return new Fs(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Po(function(e){return new Fs(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Po(function(e){var t=e.getTimezoneOffset()/60;return new Fs((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Po(function(e){var t=new Fs(0,e.getMonth(),e.getDate());return t.setFullYear(e.getFullYear()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(e){var t=d3.time.year(e);return Math.floor((e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5)},Is.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=d3.time[e]=Po(function(e){return(e=d3.time.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});d3.time[e+"s"]=n.range,d3.time[e+"s"].utc=n.utc.range,d3.time[e+"OfYear"]=function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Po(function(e){return e=d3.time.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Po(function(e){return e=d3.time.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Uo=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],zo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Wo=[[d3.time.format("%Y"),function(e){return!0}],[d3.time.format("%B"),function(e){return e.getMonth()}],[d3.time.format("%b %d"),function(e){return e.getDate()!=1}],[d3.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[d3.time.format("%I %p"),function(e){return e.getHours()}],[d3.time.format("%I:%M"),function(e){return e.getMinutes()}],[d3.time.format(":%S"),function(e){return e.getSeconds()}],[d3.time.format(".%L"),function(e){return e.getMilliseconds()}]],Xo=d3.scale.linear(),Vo=Io(Wo);zo.year=function(e,t){return Xo.domain(e.map(Ro)).ticks(t).map(qo)},d3.time.scale=function(){return Bo(d3.scale.linear(),zo,Vo)};var $o=zo.map(function(e){return[e[0].utc,e[1]]}),Jo=[[d3.time.format.utc("%Y"),function(e){return!0}],[d3.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]],Ko=Io(Jo);$o.year=function(e,t){return Xo.domain(e.map(Go)).ticks(t).map(Qo)},d3.time.scale.utc=function(){return Bo(d3.scale.linear(),$o,Ko)}}();