1?n:1)},e}(Lp),Fp=function(){var t=Dp,n=!1,e=1,r=1,i=[0],o=dp,u=dp,a=dp,c=dp,f=dp;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(mp),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=o,s.x1=u,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d>>1;f[v]c-o){var _=(i*y+u*g)/r;t(n,d,g,i,o,_,c),t(d,e,y,_,o,u,c)}else{var b=(o*y+c*g)/r;t(n,d,g,i,o,u,b),t(d,e,y,i,b,u,c)}}(0,c,t.value,n,e,r,i)},Up=function(t,n,e,r,i){(1&t.depth?zp:xp)(t,n,e,r,i)},Yp=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,f,s,l=-1,h=u.length,d=t.value;++l1?n:1)},e}(Lp),qp=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},Vp=function(t,n){var e=He(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},Hp=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}},$p=Math.SQRT2;function Xp(t){return((t=Math.exp(t))+1/t)/2}var Wp=function(t,n){var e,r,i=t[0],o=t[1],u=t[2],a=n[0],c=n[1],f=n[2],s=a-i,l=c-o,h=s*s+l*l;if(h<1e-12)r=Math.log(f/u)/$p,e=function(t){return[i+t*s,o+t*l,u*Math.exp($p*t*r)]};else{var d=Math.sqrt(h),p=(f*f-u*u+4*h)/(2*u*2*d),v=(f*f-u*u-4*h)/(2*f*2*d),g=Math.log(Math.sqrt(p*p+1)-p),y=Math.log(Math.sqrt(v*v+1)-v);r=(y-g)/$p,e=function(t){var n,e=t*r,a=Xp(g),c=u/(2*d)*(a*(n=$p*e+g,((n=Math.exp(2*n))-1)/(n+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+c*s,o+c*l,u*a/Xp($p*e+g)]}}return e.duration=1e3*r,e};function Gp(t){return function(n,e){var r=t((n=Ie(n)).h,(e=Ie(e)).h),i=Xe(n.s,e.s),o=Xe(n.l,e.l),u=Xe(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var Zp=Gp(He),Kp=Gp(Xe);function Qp(t,n){var e=Xe((t=Ko(t)).l,(n=Ko(n)).l),r=Xe(t.a,n.a),i=Xe(t.b,n.b),o=Xe(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function Jp(t){return function(n,e){var r=t((n=ou(n)).h,(e=ou(e)).h),i=Xe(n.c,e.c),o=Xe(n.l,e.l),u=Xe(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var tv=Jp(He),nv=Jp(Xe);function ev(t){return function n(e){function r(n,r){var i=t((n=du(n)).h,(r=du(r)).h),o=Xe(n.s,r.s),u=Xe(n.l,r.l),a=Xe(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}var rv=ev(He),iv=ev(Xe);function ov(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e1&&(n=t[o[u-2]],e=t[o[u-1]],r=t[a],(e[0]-n[0])*(r[1]-n[1])-(e[1]-n[1])*(r[0]-n[0])<=0);)--u;o[u++]=a}return o.slice(0,u)}var lv=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+a;na!=f>a&&u<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},dv=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(pv),yv=function t(n){function e(){var t=gv.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(pv),_v=function t(n){function e(t){return function(){for(var e=0,r=0;rr&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function Lv(t,n,e){var r=t[0],i=t[1],o=n[0],u=n[1];return i2?Iv:Lv,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(u.map(t),a,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(a,u.map(t),rr)))(e)))},l.domain=function(t){return arguments.length?(u=Av.call(t,Nv),f===Rv||(f=zv(u)),s()):u.slice()},l.range=function(t){return arguments.length?(a=Sv.call(t),s()):a.slice()},l.rangeRound=function(t){return a=Sv.call(t),c=Hp,s()},l.clamp=function(t){return arguments.length?(f=t?zv(u):Rv,l):f!==Rv},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function Bv(t,n){return Fv()(t,n)}var Uv=function(t,n,e,r){var i,o=st(t,n,e);switch((r=Cc(null==r?",f":r)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=Yc(o,u))||(r.precision=i),Rc(r,u);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=qc(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Uc(o))||(r.precision=i-2*("%"===r.type))}return jc(r)};function Yv(t){var n=t.domain;return t.ticks=function(t){var e=n();return ct(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Uv(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,u=i.length-1,a=i[o],c=i[u];return c0?r=ft(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=ft(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(c/r)*r,n(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(c*r)/r,n(i)),t},t}function qv(){var t=Bv(Rv,Rv);return t.copy=function(){return Dv(t,qv())},xv.apply(t,arguments),Yv(t)}function Vv(t){var n;function e(t){return isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=Av.call(n,Nv),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return Vv(t).unknown(n)},t=arguments.length?Av.call(t,Nv):[0,1],Yv(e)}var Hv=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;hc)break;v.push(l)}}else for(;h=1;--s)if(!((l=f*s)c)break;v.push(l)}}else v=ct(h,d,Math.min(d-h,p)).map(e);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=jc(i)),t===1/0)return i;null==t&&(t=10);var u=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/e(Math.round(n(t)));return r*o0?r[i-1]:n[0],i=r?[i[r-1],e]:[i[u-1],i[u]]},u.unknown=function(n){return arguments.length?(t=n,u):u},u.thresholds=function(){return i.slice()},u.copy=function(){return lg().domain([n,e]).range(o).unknown(t)},xv.apply(Yv(u),arguments)}function hg(){var t,n=[.5],e=[0,1],r=1;function i(i){return i<=i?e[V(n,i,0,r)]:t}return i.domain=function(t){return arguments.length?(n=Sv.call(t),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(t){return arguments.length?(e=Sv.call(t),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return hg().domain(n).range(e).unknown(t)},xv.apply(i,arguments)}var dg=new Date,pg=new Date;function vg(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return dg.setTime(+n),pg.setTime(+r),t(dg),t(pg),Math.floor(e(dg,pg))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var gg=vg((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));gg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?vg((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var yg=gg,_g=gg.range,bg=vg((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),mg=bg,xg=bg.range;function wg(t){return vg((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Mg=wg(0),Ag=wg(1),Sg=wg(2),kg=wg(3),Eg=wg(4),Cg=wg(5),Tg=wg(6),Og=Mg.range,Ng=Ag.range,jg=Sg.range,Rg=kg.range,Pg=Eg.range,zg=Cg.range,Lg=Tg.range,Ig=vg((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),Dg=Ig,Fg=Ig.range,Bg=vg((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Ug=Bg,Yg=Bg.range,qg=vg((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getMinutes()})),Vg=qg,Hg=qg.range,$g=vg((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),Xg=$g,Wg=$g.range,Gg=vg((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));Gg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?vg((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Gg:null};var Zg=Gg,Kg=Gg.range;function Qg(t){return vg((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}var Jg=Qg(0),ty=Qg(1),ny=Qg(2),ey=Qg(3),ry=Qg(4),iy=Qg(5),oy=Qg(6),uy=Jg.range,ay=ty.range,cy=ny.range,fy=ey.range,sy=ry.range,ly=iy.range,hy=oy.range,dy=vg((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),py=dy,vy=dy.range,gy=vg((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));gy.every=function(t){return isFinite(t=Math.floor(t))&&t>0?vg((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var yy=gy,_y=gy.range;function by(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function my(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function wy(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,c=t.shortMonths,f=Py(i),s=zy(i),l=Py(o),h=zy(o),d=Py(u),p=zy(u),v=Py(a),g=zy(a),y=Py(c),_=zy(c),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:e_,e:e_,f:a_,g:__,G:m_,H:r_,I:i_,j:o_,L:u_,m:c_,M:f_,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:q_,s:V_,S:s_,u:l_,U:h_,V:p_,w:v_,W:g_,x:null,X:null,y:y_,Y:b_,Z:x_,"%":Y_},m={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:w_,e:w_,f:E_,g:D_,G:B_,H:M_,I:A_,j:S_,L:k_,m:C_,M:T_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:q_,s:V_,S:O_,u:N_,U:j_,V:P_,w:z_,W:L_,x:null,X:null,y:I_,Y:F_,Z:U_,"%":Y_},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return A(t,n,e,r)},d:$y,e:$y,f:Qy,g:Yy,G:Uy,H:Wy,I:Wy,j:Xy,L:Ky,m:Hy,M:Gy,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:Vy,Q:t_,s:n_,S:Zy,u:Iy,U:Dy,V:Fy,w:Ly,W:By,x:function(t,n,r){return A(t,e,n,r)},X:function(t,n,e){return A(t,r,n,e)},y:Yy,Y:Uy,Z:qy,"%":Jy};function w(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=my(xy(o.y,0,1))).getUTCDay(),r=i>4||0===i?ty.ceil(r):ty(r),r=py.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=by(xy(o.y,0,1))).getDay(),r=i>4||0===i?Ag.ceil(r):Ag(r),r=Dg.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?my(xy(o.y,0,1)).getUTCDay():by(xy(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,my(o)):by(o)}}function A(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=x[i in Cy?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var My,Ay,Sy,ky,Ey,Cy={"-":"",_:" ",0:"0"},Ty=/^\s*\d+/,Oy=/^%/,Ny=/[\\^$*+?|[\]().{}]/g;function jy(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function qy(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Vy(t,n,e){var r=Ty.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function Hy(t,n,e){var r=Ty.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function $y(t,n,e){var r=Ty.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Xy(t,n,e){var r=Ty.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Wy(t,n,e){var r=Ty.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Gy(t,n,e){var r=Ty.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Zy(t,n,e){var r=Ty.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Ky(t,n,e){var r=Ty.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Qy(t,n,e){var r=Ty.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Jy(t,n,e){var r=Oy.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function t_(t,n,e){var r=Ty.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function n_(t,n,e){var r=Ty.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function e_(t,n){return jy(t.getDate(),n,2)}function r_(t,n){return jy(t.getHours(),n,2)}function i_(t,n){return jy(t.getHours()%12||12,n,2)}function o_(t,n){return jy(1+Dg.count(yg(t),t),n,3)}function u_(t,n){return jy(t.getMilliseconds(),n,3)}function a_(t,n){return u_(t,n)+"000"}function c_(t,n){return jy(t.getMonth()+1,n,2)}function f_(t,n){return jy(t.getMinutes(),n,2)}function s_(t,n){return jy(t.getSeconds(),n,2)}function l_(t){var n=t.getDay();return 0===n?7:n}function h_(t,n){return jy(Mg.count(yg(t)-1,t),n,2)}function d_(t){var n=t.getDay();return n>=4||0===n?Eg(t):Eg.ceil(t)}function p_(t,n){return t=d_(t),jy(Eg.count(yg(t),t)+(4===yg(t).getDay()),n,2)}function v_(t){return t.getDay()}function g_(t,n){return jy(Ag.count(yg(t)-1,t),n,2)}function y_(t,n){return jy(t.getFullYear()%100,n,2)}function __(t,n){return jy((t=d_(t)).getFullYear()%100,n,2)}function b_(t,n){return jy(t.getFullYear()%1e4,n,4)}function m_(t,n){var e=t.getDay();return jy((t=e>=4||0===e?Eg(t):Eg.ceil(t)).getFullYear()%1e4,n,4)}function x_(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+jy(n/60|0,"0",2)+jy(n%60,"0",2)}function w_(t,n){return jy(t.getUTCDate(),n,2)}function M_(t,n){return jy(t.getUTCHours(),n,2)}function A_(t,n){return jy(t.getUTCHours()%12||12,n,2)}function S_(t,n){return jy(1+py.count(yy(t),t),n,3)}function k_(t,n){return jy(t.getUTCMilliseconds(),n,3)}function E_(t,n){return k_(t,n)+"000"}function C_(t,n){return jy(t.getUTCMonth()+1,n,2)}function T_(t,n){return jy(t.getUTCMinutes(),n,2)}function O_(t,n){return jy(t.getUTCSeconds(),n,2)}function N_(t){var n=t.getUTCDay();return 0===n?7:n}function j_(t,n){return jy(Jg.count(yy(t)-1,t),n,2)}function R_(t){var n=t.getUTCDay();return n>=4||0===n?ry(t):ry.ceil(t)}function P_(t,n){return t=R_(t),jy(ry.count(yy(t),t)+(4===yy(t).getUTCDay()),n,2)}function z_(t){return t.getUTCDay()}function L_(t,n){return jy(ty.count(yy(t)-1,t),n,2)}function I_(t,n){return jy(t.getUTCFullYear()%100,n,2)}function D_(t,n){return jy((t=R_(t)).getUTCFullYear()%100,n,2)}function F_(t,n){return jy(t.getUTCFullYear()%1e4,n,4)}function B_(t,n){var e=t.getUTCDay();return jy((t=e>=4||0===e?ry(t):ry.ceil(t)).getUTCFullYear()%1e4,n,4)}function U_(){return"+0000"}function Y_(){return"%"}function q_(t){return+t}function V_(t){return Math.floor(+t/1e3)}function H_(t){return My=wy(t),Ay=My.format,Sy=My.parse,ky=My.utcFormat,Ey=My.utcParse,My}H_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function $_(t){return new Date(t)}function X_(t){return t instanceof Date?+t:+new Date(+t)}function W_(t,n,e,r,i,o,u,a,c){var f=Bv(Rv,Rv),s=f.invert,l=f.domain,h=c(".%L"),d=c(":%S"),p=c("%I:%M"),v=c("%I %p"),g=c("%a %d"),y=c("%b %d"),_=c("%B"),b=c("%Y"),m=[[u,1,1e3],[u,5,5e3],[u,15,15e3],[u,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[n,1,2592e6],[n,3,7776e6],[t,1,31536e6]];function x(a){return(u(a)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Lm.h=360*t-100,Lm.s=1.5-1.5*n,Lm.l=.8-.9*n,Lm+""},Dm=Oe(),Fm=Math.PI/3,Bm=2*Math.PI/3,Um=function(t){var n;return t=(.5-t)*Math.PI,Dm.r=255*(n=Math.sin(t))*n,Dm.g=255*(n=Math.sin(t+Fm))*n,Dm.b=255*(n=Math.sin(t+Bm))*n,Dm+""},Ym=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function qm(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var Vm=qm(mb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Hm=qm(mb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),$m=qm(mb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Xm=qm(mb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Wm=function(t){return oe(Fn(t).call(document.documentElement))},Gm=0;function Zm(){return new Km}function Km(){this._="@"+(++Gm).toString(36)}Km.prototype=Zm.prototype={constructor:Km,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Qm=function(t){return"string"==typeof t?new ee([document.querySelectorAll(t)],[document.documentElement]):new ee([null==t?[]:t],ne)},Jm=function(t,n){null==n&&(n=lr().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e1?0:t<-1?cx:Math.acos(t)}function hx(t){return t>=1?fx:t<=-1?-fx:Math.asin(t)}function dx(t){return t.innerRadius}function px(t){return t.outerRadius}function vx(t){return t.startAngle}function gx(t){return t.endAngle}function yx(t){return t&&t.padAngle}function _x(t,n,e,r,i,o,u,a){var c=e-t,f=r-n,s=u-i,l=a-o,h=l*c-s*f;if(!(h*h<1e-12))return[t+(h=(s*(n-o)-l*(t-i))/h)*c,n+h*f]}function bx(t,n,e,r,i,o,u){var a=t-e,c=n-r,f=(u?o:-o)/ax(a*a+c*c),s=f*c,l=-f*a,h=t+s,d=n+l,p=e+s,v=r+l,g=(h+p)/2,y=(d+v)/2,_=p-h,b=v-d,m=_*_+b*b,x=i-o,w=h*v-p*d,M=(b<0?-1:1)*ax(ix(0,x*x*m-w*w)),A=(w*b-_*M)/m,S=(-w*_-b*M)/m,k=(w*b+_*M)/m,E=(-w*_+b*M)/m,C=A-g,T=S-y,O=k-g,N=E-y;return C*C+T*T>O*O+N*N&&(A=k,S=E),{cx:A,cy:S,x01:-s,y01:-l,x11:A*(i/x-1),y11:S*(i/x-1)}}var mx=function(){var t=dx,n=px,e=tx(0),r=null,i=vx,o=gx,u=yx,a=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-fx,d=o.apply(this,arguments)-fx,p=nx(d-h),v=d>h;if(a||(a=c=So()),l1e-12)if(p>sx-1e-12)a.moveTo(l*rx(h),l*ux(h)),a.arc(0,0,l,h,d,!v),s>1e-12&&(a.moveTo(s*rx(d),s*ux(d)),a.arc(0,0,s,d,h,v));else{var g,y,_=h,b=d,m=h,x=d,w=p,M=p,A=u.apply(this,arguments)/2,S=A>1e-12&&(r?+r.apply(this,arguments):ax(s*s+l*l)),k=ox(nx(l-s)/2,+e.apply(this,arguments)),E=k,C=k;if(S>1e-12){var T=hx(S/s*ux(A)),O=hx(S/l*ux(A));(w-=2*T)>1e-12?(m+=T*=v?1:-1,x-=T):(w=0,m=x=(h+d)/2),(M-=2*O)>1e-12?(_+=O*=v?1:-1,b-=O):(M=0,_=b=(h+d)/2)}var N=l*rx(_),j=l*ux(_),R=s*rx(x),P=s*ux(x);if(k>1e-12){var z,L=l*rx(b),I=l*ux(b),D=s*rx(m),F=s*ux(m);if(p1e-12?C>1e-12?(g=bx(D,F,N,j,l,C,v),y=bx(L,I,R,P,l,C,v),a.moveTo(g.cx+g.x01,g.cy+g.y01),C1e-12&&w>1e-12?E>1e-12?(g=bx(R,P,L,I,s,-E,v),y=bx(N,j,D,F,s,-E,v),a.lineTo(g.cx+g.x01,g.cy+g.y01),E=s;--l)a.point(g[l],y[l]);a.lineEnd(),a.areaEnd()}v&&(g[f]=+t(h,f,c),y[f]=+e(h,f,c),a.point(n?+n(h,f,c):g[f],r?+r(h,f,c):y[f]))}if(d)return a=null,d+""||null}function f(){return Sx().defined(i).curve(u).context(o)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:tx(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:tx(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:tx(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:tx(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:tx(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tx(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:tx(!!t),c):i},c.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),c):u},c.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),c):o},c},Ex=function(t,n){return nt?1:n>=t?0:NaN},Cx=function(t){return t},Tx=function(){var t=Cx,n=Ex,e=null,r=tx(0),i=tx(sx),o=tx(0);function u(u){var a,c,f,s,l,h=u.length,d=0,p=new Array(h),v=new Array(h),g=+r.apply(this,arguments),y=Math.min(sx,Math.max(-sx,i.apply(this,arguments)-g)),_=Math.min(Math.abs(y)/h,o.apply(this,arguments)),b=_*(y<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(v[t],v[e])})):null!=e&&p.sort((function(t,n){return e(u[t],u[n])})),a=0,f=d?(y-h*b)/d:0;a0?l*f:0)+b,v[c]={data:u[c],index:a,value:l,startAngle:g,endAngle:s,padAngle:_};return v}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:tx(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n},u.sort=function(t){return arguments.length?(e=t,n=null,u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:tx(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:tx(+t),u):i},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:tx(+t),u):o},u},Ox=jx(wx);function Nx(t){this._curve=t}function jx(t){function n(n){return new Nx(t(n))}return n._curve=t,n}function Rx(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(jx(t)):n()._curve},t}Nx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var Px=function(){return Rx(Sx().curve(Ox))},zx=function(){var t=kx().curve(Ox),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Rx(e())},delete t.lineX0,t.lineEndAngle=function(){return Rx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Rx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Rx(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(jx(t)):n()._curve},t},Lx=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},Ix=Array.prototype.slice;function Dx(t){return t.source}function Fx(t){return t.target}function Bx(t){var n=Dx,e=Fx,r=Mx,i=Ax,o=null;function u(){var u,a=Ix.call(arguments),c=n.apply(this,a),f=e.apply(this,a);if(o||(o=u=So()),t(o,+r.apply(this,(a[0]=c,a)),+i.apply(this,a),+r.apply(this,(a[0]=f,a)),+i.apply(this,a)),u)return o=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:tx(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:tx(+t),u):i},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function Ux(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function Yx(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function qx(t,n,e,r,i){var o=Lx(n,e),u=Lx(n,e=(e+i)/2),a=Lx(r,e),c=Lx(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],c[0],c[1])}function Vx(){return Bx(Ux)}function Hx(){return Bx(Yx)}function $x(){var t=Bx(qx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var Xx={draw:function(t,n){var e=Math.sqrt(n/cx);t.moveTo(e,0),t.arc(0,0,e,0,sx)}},Wx={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},Gx=Math.sqrt(1/3),Zx=2*Gx,Kx={draw:function(t,n){var e=Math.sqrt(n/Zx),r=e*Gx;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Qx=Math.sin(cx/10)/Math.sin(7*cx/10),Jx=Math.sin(sx/10)*Qx,tw=-Math.cos(sx/10)*Qx,nw={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=Jx*e,i=tw*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=sx*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ew={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},rw=Math.sqrt(3),iw={draw:function(t,n){var e=-Math.sqrt(n/(3*rw));t.moveTo(0,2*e),t.lineTo(-rw*e,-e),t.lineTo(rw*e,-e),t.closePath()}},ow=Math.sqrt(3)/2,uw=1/Math.sqrt(12),aw=3*(uw/2+1),cw={draw:function(t,n){var e=Math.sqrt(n/aw),r=e/2,i=e*uw,o=r,u=e*uw+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(-.5*r-ow*i,ow*r+-.5*i),t.lineTo(-.5*o-ow*u,ow*o+-.5*u),t.lineTo(-.5*a-ow*c,ow*a+-.5*c),t.lineTo(-.5*r+ow*i,-.5*i-ow*r),t.lineTo(-.5*o+ow*u,-.5*u-ow*o),t.lineTo(-.5*a+ow*c,-.5*c-ow*a),t.closePath()}},fw=[Xx,Wx,Kx,ew,nw,iw,cw],sw=function(){var t=tx(Xx),n=tx(64),e=null;function r(){var r;if(e||(e=r=So()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(n){return arguments.length?(t="function"==typeof n?n:tx(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:tx(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},lw=function(){};function hw(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function dw(t){this._context=t}dw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hw(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var pw=function(t){return new dw(t)};function vw(t){this._context=t}vw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:hw(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var gw=function(t){return new vw(t)};function yw(t){this._context=t}yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:hw(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var _w=function(t){return new yw(t)};function bw(t,n){this._basis=new dw(t),this._beta=n}bw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var mw=function t(n){function e(t){return 1===n?new dw(t):new bw(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function xw(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function ww(t,n){this._context=t,this._k=(1-n)/6}ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:xw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:xw(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Mw=function t(n){function e(t){return new ww(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Aw(t,n){this._context=t,this._k=(1-n)/6}Aw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:xw(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Sw=function t(n){function e(t){return new Aw(t,n)}return e.tension=function(n){return t(+n)},e}(0);function kw(t,n){this._context=t,this._k=(1-n)/6}kw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xw(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ew=function t(n){function e(t){return new kw(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Cw(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,u=(u*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Tw(t,n){this._context=t,this._alpha=n}Tw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Cw(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ow=function t(n){function e(t){return n?new Tw(t,n):new ww(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Nw(t,n){this._context=t,this._alpha=n}Nw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Cw(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var jw=function t(n){function e(t){return n?new Nw(t,n):new Aw(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Rw(t,n){this._context=t,this._alpha=n}Rw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Cw(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Pw=function t(n){function e(t){return n?new Rw(t,n):new kw(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function zw(t){this._context=t}zw.prototype={areaStart:lw,areaEnd:lw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Lw=function(t){return new zw(t)};function Iw(t){return t<0?-1:1}function Dw(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(Iw(o)+Iw(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Fw(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bw(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function Uw(t){this._context=t}function Yw(t){this._context=new qw(t)}function qw(t){this._context=t}function Vw(t){return new Uw(t)}function Hw(t){return new Yw(t)}function $w(t){this._context=t}function Xw(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Zw=function(t){return new Gw(t,.5)};function Kw(t){return new Gw(t,0)}function Qw(t){return new Gw(t,1)}var Jw=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e};function nM(t,n){return t[n]}var eM=function(){var t=tx([]),n=tM,e=Jw,r=nM;function i(i){var o,u,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o0)for(var e,r,i,o,u,a,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):(r[0]=0,r[1]=i)},oM=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;uo&&(o=n,r=e);return r}var fM=function(t){var n=t.map(sM);return tM(t).sort((function(t,e){return n[t]-n[e]}))};function sM(t){for(var n,e=0,r=-1,i=t.length;++r0)){if(o/=h,h<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function OM(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]=-QM)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=zM.pop()||new LM;y.arc=t,y.site=i,y.x=v+u,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,b=GM._;b;)if(y.yKM)a=a.L;else{if(!((i=o-$M(a,u))>KM)){r>-KM?(n=a.P,e=a):i>-KM?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){WM[t.index]={site:t,halfedges:[]}}(t);var c=UM(t);if(XM.insert(n,c),n||e){if(n===e)return DM(n),e=UM(n.site),XM.insert(c,e),c.edge=e.edge=kM(n.site,c.site),IM(n),void IM(e);if(e){DM(n),DM(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,b=v*v+g*g,m=[(g*_-d*b)/y+s,(h*b-v*_)/y+l];CM(e.edge,f,p,m),c.edge=kM(f,t,null,m),e.edge=kM(t,p,null,m),IM(n),IM(e)}else c.edge=kM(n.site,c.site)}}function HM(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;var a=(e=u.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+a)/2}function $M(t,n){var e=t.N;if(e)return HM(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var XM,WM,GM,ZM,KM=1e-6,QM=1e-12;function JM(t,n){return n[1]-t[1]||n[0]-t[0]}function tA(t,n){var e,r,i,o=t.sort(JM).pop();for(ZM=[],WM=new Array(t.length),XM=new SM,GM=new SM;;)if(i=PM,o&&(!i||o[1]KM||Math.abs(i[0][1]-i[1][1])>KM)||delete ZM[o]}(u,a,c,f),function(t,n,e,r){var i,o,u,a,c,f,s,l,h,d,p,v,g=WM.length,y=!0;for(i=0;iKM||Math.abs(v-h)>KM)&&(c.splice(a,0,ZM.push(EM(u,d,Math.abs(p-t)KM?[t,Math.abs(l-t)KM?[Math.abs(h-r)KM?[e,Math.abs(l-e)KM?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=o.cells[r=u],u=null,i.halfedges.forEach((function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}var vA,gA=function(){var t,n,e=fA,r=sA,i=pA,o=hA,u=dA,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=Wp,l=$t("start","zoom","end"),h=0;function d(t){t.property("__zoom",lA).on("wheel.zoom",m).on("mousedown.zoom",x).on("dblclick.zoom",w).filter(u).on("touchstart.zoom",M).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new iA(n,t.x,t.y)}function v(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new iA(t.k,r,i)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function y(t,n,e){t.on("start.zoom",(function(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=_(t,i),u=r.apply(t,i),a=null==e?g(u):"function"==typeof e?e.apply(t,i):e,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,l="function"==typeof n?n.apply(t,i):n,h=s(f.invert(a).concat(c/f.k),l.invert(a).concat(c/l.k));return function(t){if(1===t)t=l;else{var n=h(t),e=c/n[2];t=new iA(e,a[0]-n[0]*e,a[1]-n[1]*e)}o.zoom(null,t)}}))}function _(t,n,e){return!e&&t.__zooming||new b(t,n)}function b(t,n){this.that=t,this.args=n,this.active=0,this.extent=r.apply(t,n),this.taps=0}function m(){if(e.apply(this,arguments)){var t=_(this,arguments),n=this.__zoom,r=Math.max(a[0],Math.min(a[1],n.k*Math.pow(2,o.apply(this,arguments)))),u=pr(this);if(t.wheel)t.mouse[0][0]===u[0]&&t.mouse[0][1]===u[1]||(t.mouse[1]=n.invert(t.mouse[0]=u)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[u,n.invert(u)],Yr(this),t.start()}cA(),t.wheel=setTimeout(f,150),t.zoom("mouse",i(v(p(n,r),t.mouse[0],t.mouse[1]),t.extent,c))}function f(){t.wheel=null,t.end()}}function x(){if(!n&&e.apply(this,arguments)){var t=_(this,arguments,!0),r=oe(Hn.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",s,!0),o=pr(this),u=Hn.clientX,a=Hn.clientY;ce(Hn.view),aA(),t.mouse=[o,this.__zoom.invert(o)],Yr(this),t.start()}function f(){if(cA(),!t.moved){var n=Hn.clientX-u,e=Hn.clientY-a;t.moved=n*n+e*e>h}t.zoom("mouse",i(v(t.that.__zoom,t.mouse[0]=pr(t.that),t.mouse[1]),t.extent,c))}function s(){r.on("mousemove.zoom mouseup.zoom",null),fe(Hn.view,t.moved),cA(),t.end()}}function w(){if(e.apply(this,arguments)){var t=this.__zoom,n=pr(this),o=t.invert(n),u=t.k*(Hn.shiftKey?.5:2),a=i(v(p(t,u),n,o),r.apply(this,arguments),c);cA(),f>0?oe(this).transition().duration(f).call(y,a,n):oe(this).call(d.transform,a)}}function M(){if(e.apply(this,arguments)){var n,r,i,o,u=Hn.touches,a=u.length,c=_(this,arguments,Hn.changedTouches.length===a);for(aA(),r=0;r