/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE * @version 3.0.2 */ !function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function e(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function n(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function r(t){return null===t?NaN:+t}function i(t){return!isNaN(t)}function o(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function a(t){return t.length}function u(t){for(var e=1;t*e%1;)e*=10;return e}function s(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function c(){this._=Object.create(null)}function f(t){return(t+="")===xa||t[0]===wa?wa+t:t}function l(t){return(t+="")[0]===wa?t.slice(1):t}function h(t){return f(t)in this._}function d(t){return(t=f(t))in this._&&delete this._[t]}function p(){var t=[];for(var e in this._)t.push(l(e));return t}function g(){var t=0;for(var e in this._)++t;return t}function m(){for(var t in this._)return!1;return!0}function y(){this._=Object.create(null)}function v(t){return t}function b(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function _(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=Ma.length;r>n;++n){var i=Ma[n]+e;if(i in t)return i}}function x(){}function w(){}function M(t){function e(){for(var e,r=n,i=-1,o=r.length;++in;n++)for(var i,o=t[n],a=0,u=o.length;u>a;a++)(i=o[a])&&e(i,a,n);return t}function H(t){return ka(t,Ta),t}function V(t){var e,n;return function(r,i,o){var a,u=t[o].update,s=u.length;for(o!=n&&(n=o,e=0),i>=e&&(e=i+1);!(a=u[e])&&++e0&&(t=t.slice(0,u));var c=La.get(t);return c&&(t=c,s=Z),u?e?i:r:e?x:o}function Y(t,e){return function(n){var r=sa.event;sa.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{sa.event=r}}}function Z(t,e){var n=Y(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function $(n){var r=".dragsuppress-"+ ++Wa,i="click"+r,o=sa.select(e(n)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Oa&&(Oa="onselectstart"in n?!1:_(n.style,"userSelect")),Oa){var a=t(n).style,u=a[Oa];a[Oa]="none"}return function(t){if(o.on(r,null),Oa&&(a[Oa]=u),t){var e=function(){o.on(i,null)};o.on(i,function(){S(),e()},!0),setTimeout(e,0)}}}function X(t,n){n.changedTouches&&(n=n.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Da){var o=e(t);if(o.scrollX||o.scrollY){r=sa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=r[0][0].getScreenCTM();Da=!(a.f||a.e),r.remove()}}return Da?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function J(){return sa.event.changedTouches[0].identifier}function K(t){return t>0?1:0>t?-1:0}function Q(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function tt(t){return t>1?0:-1>t?Fa:Math.acos(t)}function et(t){return t>1?qa:-1>t?-qa:Math.asin(t)}function nt(t){return((t=Math.exp(t))-1/t)/2}function rt(t){return((t=Math.exp(t))+1/t)/2}function it(t){return((t=Math.exp(2*t))-1)/(t+1)}function ot(t){return(t=Math.sin(t/2))*t}function at(){}function ut(t,e,n){return this instanceof ut?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ut?new ut(t.h,t.s,t.l):xt(""+t,wt,ut):new ut(t,e,n)}function st(t,e,n){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(a-o)*t/60:180>t?a:240>t?o+(a-o)*(240-t)/60:o}function i(t){return Math.round(255*r(t))}var o,a;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,a=.5>=n?n*(1+e):n+e-n*e,o=2*n-a,new yt(i(t+120),i(t),i(t-120))}function ct(t,e,n){return this instanceof ct?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ct?new ct(t.h,t.c,t.l):t instanceof lt?dt(t.l,t.a,t.b):dt((t=Mt((t=sa.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ct(t,e,n)}function ft(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new lt(n,Math.cos(t*=Ua)*e,Math.sin(t)*e)}function lt(t,e,n){return this instanceof lt?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof lt?new lt(t.l,t.a,t.b):t instanceof ct?ft(t.h,t.c,t.l):Mt((t=yt(t)).r,t.g,t.b):new lt(t,e,n)}function ht(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return i=pt(i)*tu,r=pt(r)*eu,o=pt(o)*nu,new yt(mt(3.2404542*i-1.5371385*r-.4985314*o),mt(-.969266*i+1.8760108*r+.041556*o),mt(.0556434*i-.2040259*r+1.0572252*o))}function dt(t,e,n){return t>0?new ct(Math.atan2(n,e)*Ha,Math.sqrt(e*e+n*n),t):new ct(NaN,NaN,t)}function pt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function gt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function mt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function yt(t,e,n){return this instanceof yt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof yt?new yt(t.r,t.g,t.b):xt(""+t,yt,st):new yt(t,e,n)}function vt(t){return new yt(t>>16,t>>8&255,255&t)}function bt(t){return vt(t)+""}function _t(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xt(t,e,n){var r,i,o,a=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(kt(i[0]),kt(i[1]),kt(i[2]))}return(o=ou.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a=a>>4|a,u=240&o,u=u>>4|u,s=15&o,s=s<<4|s):7===t.length&&(a=(16711680&o)>>16,u=(65280&o)>>8,s=255&o)),e(a,u,s))}function wt(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),u=a-o,s=(a+o)/2;return u?(i=.5>s?u/(a+o):u/(2-a-o),r=t==a?(e-n)/u+(n>e?6:0):e==a?(n-t)/u+2:(t-e)/u+4,r*=60):(r=NaN,i=s>0&&1>s?0:r),new ut(r,i,s)}function Mt(t,e,n){t=St(t),e=St(e),n=St(n);var r=gt((.4124564*t+.3575761*e+.1804375*n)/tu),i=gt((.2126729*t+.7151522*e+.072175*n)/eu),o=gt((.0193339*t+.119192*e+.9503041*n)/nu);return lt(116*i-16,500*(r-i),200*(i-o))}function St(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function kt(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Et(t){return"function"==typeof t?t:function(){return t}}function Nt(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),At(e,n,t,r)}}function At(t,e,n,r){function i(){var t,e=s.status;if(!e&&Ct(s)||e>=200&&300>e||304===e){try{t=n.call(o,s)}catch(r){return void a.error.call(o,r)}a.load.call(o,t)}else a.error.call(o,s)}var o={},a=sa.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var e=sa.event;sa.event=t;try{a.progress.call(o,s)}finally{sa.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(c=t,o):c},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(fa(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),s.setRequestHeader)for(var f in u)s.setRequestHeader(f,u[f]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),a.beforesend.call(o,s),s.send(null==r?null:r),o},o.abort=function(){return s.abort(),o},sa.rebind(o,a,"on"),null==r?o:o.get(zt(r))}function zt(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Ct(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Pt(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i=n+e,o={c:t,t:i,n:null};return uu?uu.n=o:au=o,uu=o,su||(cu=clearTimeout(cu),su=1,fu(Tt)),o}function Tt(){var t=Lt(),e=Ot()-t;e>24?(isFinite(e)&&(clearTimeout(cu),cu=setTimeout(Tt,e)),su=0):(su=1,fu(Tt))}function Lt(){for(var t=Date.now(),e=au;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Ot(){for(var t,e=au,n=1/0;e;)e.c?(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Bt(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,o=r&&n?function(t,e){for(var i=t.length,o=[],a=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>e&&(u=Math.max(1,e-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=r[a=(a+1)%r.length];return o.reverse().join(n)}:v;return function(t){var n=hu.exec(t),r=n[1]||" ",a=n[2]||">",u=n[3]||"-",s=n[4]||"",c=n[5],f=+n[6],l=n[7],h=n[8],d=n[9],p=1,g="",m="",y=!1,v=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===a)&&(c=r="0",a="="),d){case"n":l=!0,d="g";break;case"%":p=100,m="%",d="f";break;case"p":p=100,m="%",d="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+d.toLowerCase());case"c":v=!1;case"d":y=!0,h=0;break;case"s":p=-1,d="r"}"$"===s&&(g=i[0],m=i[1]),"r"!=d||h||(d="g"),null!=h&&("g"==d?h=Math.max(1,Math.min(21,h)):("e"==d||"f"==d)&&(h=Math.max(0,Math.min(20,h)))),d=du.get(d)||Rt;var b=c&&l;return function(t){var n=m;if(y&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>p){var s=sa.formatPrefix(t,h);t=s.scale(t),n=s.symbol+m}else t*=p;t=d(t,h);var _,x,w=t.lastIndexOf(".");if(0>w){var M=v?t.lastIndexOf("e"):-1;0>M?(_=t,x=""):(_=t.substring(0,M),x=t.substring(M))}else _=t.substring(0,w),x=e+t.substring(w+1);!c&&l&&(_=o(_,1/0));var S=g.length+_.length+x.length+(b?0:i.length),k=f>S?new Array(S=f-S+1).join(r):"";return b&&(_=o(k+_,k.length?f-x.length:1/0)),i+=g,t=_+x,("<"===a?i+t+k:">"===a?k+i+t:"^"===a?k.substring(0,S>>=1)+i+t+k.substring(S):i+(b?t:k+t))+n}}}function Rt(t){return t+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function It(t,e,n){function r(e){var n=t(e),r=o(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new gu(n-1)),1),n}function o(t,n){return e(t=new gu(+t),n),t}function a(t,r,o){var a=i(t),u=[];if(o>1)for(;r>a;)n(a)%o||u.push(new Date(+a)),e(a,1);else for(;r>a;)u.push(new Date(+a)),e(a,1);return u}function u(t,e,n){try{gu=Ft;var r=new Ft;return r._=t,a(r,e,n)}finally{gu=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=jt(t);return s.floor=s,s.round=jt(r),s.ceil=jt(i),s.offset=jt(o),s.range=u,t}function jt(t){return function(e,n){try{gu=Ft;var r=new Ft;return r._=e,t(r,n)._}finally{gu=Date}}}function qt(t){function e(t){function e(e){for(var n,i,o,a=[],u=-1,s=0;++uu;){if(r>=c)return-1;if(i=e.charCodeAt(u++),37===i){if(a=e.charAt(u++),o=z[a in yu?e.charAt(u++):a],!o||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=M.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){E.lastIndex=0;var r=E.exec(e.slice(n));return r?(t.m=N.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){S.lastIndex=0;var r=S.exec(e.slice(n));return r?(t.m=k.get(r[0].toLowerCase()),n+r[0].length):-1}function u(t,e,r){return n(t,A.c.toString(),e,r)}function s(t,e,r){return n(t,A.x.toString(),e,r)}function c(t,e,r){return n(t,A.X.toString(),e,r)}function f(t,e,n){var r=b.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var l=t.dateTime,h=t.date,d=t.time,p=t.periods,g=t.days,m=t.shortDays,y=t.months,v=t.shortMonths;e.utc=function(t){function n(t){try{gu=Ft;var e=new gu;return e._=t,r(e)}finally{gu=Date}}var r=e(t);return n.parse=function(t){try{gu=Ft;var e=r.parse(t);return e&&e._}finally{gu=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=se;var b=sa.map(),_=Ht(g),x=Vt(g),w=Ht(m),M=Vt(m),S=Ht(y),k=Vt(y),E=Ht(v),N=Vt(v);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var A={a:function(t){return m[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return y[t.getMonth()]},c:e(l),d:function(t,e){return Ut(t.getDate(),e,2)},e:function(t,e){return Ut(t.getDate(),e,2)},H:function(t,e){return Ut(t.getHours(),e,2)},I:function(t,e){return Ut(t.getHours()%12||12,e,2)},j:function(t,e){return Ut(1+pu.dayOfYear(t),e,3)},L:function(t,e){return Ut(t.getMilliseconds(),e,3)},m:function(t,e){return Ut(t.getMonth()+1,e,2)},M:function(t,e){return Ut(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return Ut(t.getSeconds(),e,2)},U:function(t,e){return Ut(pu.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ut(pu.mondayOfYear(t),e,2)},x:e(h),X:e(d),y:function(t,e){return Ut(t.getFullYear()%100,e,2)},Y:function(t,e){return Ut(t.getFullYear()%1e4,e,4)},Z:ae,"%":function(){return"%"}},z={a:r,A:i,b:o,B:a,c:u,d:te,e:te,H:ne,I:ne,j:ee,L:oe,m:Qt,M:re,p:f,S:ie,U:Yt,w:Gt,W:Zt,x:s,X:c,y:Xt,Y:$t,Z:Jt,"%":ue};return e}function Ut(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(e)+i:i)}function Ht(t){return new RegExp("^(?:"+t.map(sa.requote).join("|")+")","i")}function Vt(t){for(var e=new c,n=-1,r=t.length;++n68?1900:2e3)}function Qt(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function te(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ee(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function ne(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function re(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ie(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function oe(t,e,n){vu.lastIndex=0;var r=vu.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ae(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=_a(e)/60|0,i=_a(e)%60;return n+Ut(r,"0",2)+Ut(i,"0",2)}function ue(t,e,n){bu.lastIndex=0;var r=bu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function se(t){for(var e=t.length,n=-1;++n=0?1:-1,u=a*n,s=Math.cos(e),c=Math.sin(e),f=o*c,l=i*s+f*Math.cos(u),h=f*a*Math.sin(u);ku.add(Math.atan2(h,l)),r=t,i=s,o=c}var e,n,r,i,o;Eu.point=function(a,u){Eu.point=t,r=(e=a)*Ua,i=Math.cos(u=(n=u)*Ua/2+Fa/4),o=Math.sin(u)},Eu.lineEnd=function(){t(e,n)}}function ge(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function me(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ye(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ve(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function be(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function _e(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function xe(t){return[Math.atan2(t[1],t[0]),et(t[2])]}function we(t,e){return _a(t[0]-e[0])u;++u)i.point((n=t[u])[0],n[1]);return void i.lineEnd()}var s=new Te(n,t,null,!0),c=new Te(n,null,s,!1);s.o=c,o.push(s),a.push(c),s=new Te(r,t,null,!1),c=new Te(r,null,s,!0),s.o=c,o.push(s),a.push(c)}}),a.sort(e),Pe(o),Pe(a),o.length){for(var u=0,s=n,c=a.length;c>u;++u)a[u].e=s=!s;for(var f,l,h=o[0];;){for(var d=h,p=!0;d.v;)if((d=d.n)===h)return;f=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var u=0,c=f.length;c>u;++u)i.point((l=f[u])[0],l[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){f=d.p.z;for(var u=f.length-1;u>=0;--u)i.point((l=f[u])[0],l[1])}else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,f=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Pe(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Oe))}var d,p,g,m=e(o),y=i.invert(r[0],r[1]),v={point:a,lineStart:s,lineEnd:c,polygonStart:function(){v.point=f,v.lineStart=l,v.lineEnd=h,d=[],p=[]},polygonEnd:function(){v.point=a,v.lineStart=s,v.lineEnd=c,d=sa.merge(d);var t=Ie(y,p);d.length?(x||(o.polygonStart(),x=!0),Ce(d,De,t,n,o)):t&&(x||(o.polygonStart(),x=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),d=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=We(),_=e(b),x=!1;return v}}function Oe(t){return t.length>1}function We(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:x,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function De(t,e){return((t=t.x)[0]<0?t[1]-qa-Ba:qa-t[1])-((e=e.x)[0]<0?e[1]-qa-Ba:qa-e[1])}function Be(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var u=o>0?Fa:-Fa,s=_a(o-n);_a(s-Fa)0?qa:-qa),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),e=0):i!==u&&s>=Fa&&(_a(n-i)Ba?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}function Fe(t,e,n,r){var i;if(null==t)i=n*qa,r.point(-Fa,i),r.point(0,i),r.point(Fa,i),r.point(Fa,0),r.point(Fa,-i),r.point(0,-i),r.point(-Fa,-i),r.point(-Fa,0),r.point(-Fa,i);else if(_a(t[0]-e[0])>Ba){var o=t[0]u;++u){var c=e[u],f=c.length;if(f)for(var l=c[0],h=l[0],d=l[1]/2+Fa/4,p=Math.sin(d),g=Math.cos(d),m=1;;){m===f&&(m=0),t=c[m];var y=t[0],v=t[1]/2+Fa/4,b=Math.sin(v),_=Math.cos(v),x=y-h,w=x>=0?1:-1,M=w*x,S=M>Fa,k=p*b;if(ku.add(Math.atan2(k*w*Math.sin(M),g*_+k*Math.cos(M))),o+=S?x+w*Ia:x,S^h>=n^y>=n){var E=ye(ge(l),ge(t));_e(E);var N=ye(i,E);_e(N);var A=(S^x>=0?-1:1)*et(N[2]);(r>A||r===A&&(E[0]||E[1]))&&(a+=S^x>=0?1:-1)}if(!m++)break;h=y,p=b,g=_,l=t}}return(-Ba>o||Ba>o&&0>ku)^1&a}function je(t){function e(t,e){return Math.cos(t)*Math.cos(e)>o}function n(t){var n,o,s,c,f;return{lineStart:function(){c=s=!1,f=1},point:function(l,h){var d,p=[l,h],g=e(l,h),m=a?g?0:i(l,h):g?i(l+(0>l?Fa:-Fa),h):0;if(!n&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(n,p),(we(n,d)||we(p,d))&&(p[0]+=Ba,p[1]+=Ba,g=e(p[0],p[1]))),g!==s)f=0,g?(t.lineStart(),d=r(p,n),t.point(d[0],d[1])):(d=r(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(u&&n&&a^g){var y;m&o||!(y=r(p,n,!0))||(f=0,a?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!g||n&&we(n,p)||t.point(p[0],p[1]),n=p,s=g,o=m},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return f|(c&&s)<<1}}}function r(t,e,n){var r=ge(t),i=ge(e),a=[1,0,0],u=ye(r,i),s=me(u,u),c=u[0],f=s-c*c;if(!f)return!n&&t;var l=o*s/f,h=-o*c/f,d=ye(a,u),p=be(a,l),g=be(u,h);ve(p,g);var m=d,y=me(p,m),v=me(m,m),b=y*y-v*(me(p,p)-1);if(!(0>b)){var _=Math.sqrt(b),x=be(m,(-y-_)/v);if(ve(x,p),x=xe(x),!n)return x;var w,M=t[0],S=e[0],k=t[1],E=e[1];M>S&&(w=M,M=S,S=w);var N=S-M,A=_a(N-Fa)N;if(!A&&k>E&&(w=k,k=E,E=w),z?A?k+E>0^x[1]<(_a(x[0]-M)Fa^(M<=x[0]&&x[0]<=S)){var C=be(m,(-y+_)/v);return ve(C,p),[x,xe(C)]}}}function i(e,n){var r=a?t:Fa-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var o=Math.cos(t),a=o>0,u=_a(o)>Ba,s=gn(t,6*Ua);return Le(e,n,s,a?[0,-t]:[-Fa,t-Fa])}function qe(t,e,n,r){return function(i){var o,a=i.a,u=i.b,s=a.x,c=a.y,f=u.x,l=u.y,h=0,d=1,p=f-s,g=l-c;if(o=t-s,p||!(o>0)){if(o/=p,0>p){if(h>o)return;d>o&&(d=o)}else if(p>0){if(o>d)return;o>h&&(h=o)}if(o=n-s,p||!(0>o)){if(o/=p,0>p){if(o>d)return;o>h&&(h=o)}else if(p>0){if(h>o)return;d>o&&(d=o)}if(o=e-c,g||!(o>0)){if(o/=g,0>g){if(h>o)return;d>o&&(d=o)}else if(g>0){if(o>d)return;o>h&&(h=o)}if(o=r-c,g||!(0>o)){if(o/=g,0>g){if(o>d)return;o>h&&(h=o)}else if(g>0){if(h>o)return;d>o&&(d=o)}return h>0&&(i.a={x:s+h*p,y:c+h*g}),1>d&&(i.b={x:s+d*p,y:c+d*g}),i}}}}}}function Ue(t,e,n,r){function i(r,i){return _a(r[0]-t)0?0:3:_a(r[0]-n)0?2:1:_a(r[1]-e)0?1:0:i>0?3:2}function o(t,e){return a(t.x,e.x)}function a(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(u){function s(t){for(var e=0,n=m.length,r=t[1],i=0;n>i;++i)for(var o,a=1,u=m[i],s=u.length,c=u[0];s>a;++a)o=u[a],c[1]<=r?o[1]>r&&Q(c,o,t)>0&&++e:o[1]<=r&&Q(c,o,t)<0&&--e,c=o;return 0!==e}function c(o,u,s,c){var f=0,l=0;if(null==o||(f=i(o,s))!==(l=i(u,s))||a(o,u)<0^s>0){do c.point(0===f||3===f?t:n,f>1?r:e);while((f=(f+s+4)%4)!==l)}else c.point(u[0],u[1])}function f(i,o){return i>=t&&n>=i&&o>=e&&r>=o}function l(t,e){f(t,e)&&u.point(t,e)}function h(){z.point=p,m&&m.push(y=[]),S=!0,M=!1,x=w=NaN}function d(){g&&(p(v,b),_&&M&&N.rejoin(),g.push(N.buffer())),z.point=l,M&&u.lineEnd()}function p(t,e){t=Math.max(-Iu,Math.min(Iu,t)),e=Math.max(-Iu,Math.min(Iu,e));var n=f(t,e);if(m&&y.push([t,e]),S)v=t,b=e,_=n,S=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&M)u.point(t,e);else{var r={a:{x:x,y:w},b:{x:t,y:e}};A(r)?(M||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),k=!1):n&&(u.lineStart(),u.point(t,e),k=!1)}x=t,w=e,M=n}var g,m,y,v,b,_,x,w,M,S,k,E=u,N=We(),A=qe(t,e,n,r),z={point:l,lineStart:h,lineEnd:d,polygonStart:function(){u=N,g=[],m=[],k=!0},polygonEnd:function(){u=E,g=sa.merge(g);var e=s([t,r]),n=k&&e,i=g.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),c(null,null,1,u),u.lineEnd()),i&&Ce(g,o,e,c,u),u.polygonEnd()),g=m=y=null}};return z}}function He(t){var e=0,n=Fa/3,r=un(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Fa/180,n=t[1]*Fa/180):[e/Fa*180,n/Fa*180]},i}function Ve(t,e){function n(t,e){var n=Math.sqrt(o-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),a-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(t,e){var n=a-e;return[Math.atan2(t,n)/i,et((o-(t*t+n*n)*i*i)/(2*i))]},n}function Ge(){function t(t,e){qu+=i*t-r*e,r=t,i=e}var e,n,r,i;Yu.point=function(o,a){Yu.point=t,e=r=o,n=i=a},Yu.lineEnd=function(){t(e,n)}}function Ye(t,e){Uu>t&&(Uu=t),t>Vu&&(Vu=t),Hu>e&&(Hu=e),e>Gu&&(Gu=e)}function Ze(){function t(t,e){a.push("M",t,",",e,o)}function e(t,e){a.push("M",t,",",e),u.point=n}function n(t,e){a.push("L",t,",",e)}function r(){u.point=t}function i(){a.push("Z")}var o=$e(4.5),a=[],u={point:t,lineStart:function(){u.point=e},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return o=$e(t),u},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return u}function $e(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Xe(t,e){zu+=t,Cu+=e,++Pu}function Je(){function t(t,r){var i=t-e,o=r-n,a=Math.sqrt(i*i+o*o);Tu+=a*(e+t)/2,Lu+=a*(n+r)/2,Ou+=a,Xe(e=t,n=r)}var e,n;$u.point=function(r,i){$u.point=t,Xe(e=r,n=i)}}function Ke(){$u.point=Xe}function Qe(){function t(t,e){var n=t-r,o=e-i,a=Math.sqrt(n*n+o*o);Tu+=a*(r+t)/2,Lu+=a*(i+e)/2,Ou+=a,a=i*t-r*e,Wu+=a*(r+t),Du+=a*(i+e),Bu+=3*a,Xe(r=t,i=e)}var e,n,r,i;$u.point=function(o,a){$u.point=t,Xe(e=r=o,n=i=a)},$u.lineEnd=function(){t(e,n)}}function tn(t){function e(e,n){t.moveTo(e+a,n),t.arc(e,n,a,0,Ia)}function n(e,n){t.moveTo(e,n),u.point=r}function r(e,n){t.lineTo(e,n)}function i(){u.point=e}function o(){t.closePath()}var a=4.5,u={point:e,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=o},polygonEnd:function(){u.lineEnd=i,u.point=e},pointRadius:function(t){return a=t,u},result:x};return u}function en(t){function e(t){return(u?r:n)(t)}function n(e){return on(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){b=NaN,S.point=o,e.lineStart()}function o(n,r){var o=ge([n,r]),a=t(n,r);i(b,_,v,x,w,M,b=a[0],_=a[1],v=n,x=o[0],w=o[1],M=o[2],u,e),e.point(b,_)}function a(){S.point=n,e.lineEnd()}function s(){ r(),S.point=c,S.lineEnd=f}function c(t,e){o(l=t,h=e),d=b,p=_,g=x,m=w,y=M,S.point=o}function f(){i(b,_,v,x,w,M,d,p,l,g,m,y,u,e),S.lineEnd=a,a()}var l,h,d,p,g,m,y,v,b,_,x,w,M,S={point:n,lineStart:r,lineEnd:a,polygonStart:function(){e.polygonStart(),S.lineStart=s},polygonEnd:function(){e.polygonEnd(),S.lineStart=r}};return S}function i(e,n,r,u,s,c,f,l,h,d,p,g,m,y){var v=f-e,b=l-n,_=v*v+b*b;if(_>4*o&&m--){var x=u+d,w=s+p,M=c+g,S=Math.sqrt(x*x+w*w+M*M),k=Math.asin(M/=S),E=_a(_a(M)-1)o||_a((v*C+b*P)/_-.5)>.3||a>u*d+s*p+c*g)&&(i(e,n,r,u,s,c,A,z,E,x/=S,w/=S,M,m,y),y.point(A,z),i(A,z,E,x,w,M,f,l,h,d,p,g,m,y))}}var o=.5,a=Math.cos(30*Ua),u=16;return e.precision=function(t){return arguments.length?(u=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function nn(t){var e=en(function(e,n){return t([e*Ha,n*Ha])});return function(t){return sn(e(t))}}function rn(t){this.stream=t}function on(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function an(t){return un(function(){return t})()}function un(t){function e(t){return t=u(t[0]*Ua,t[1]*Ua),[t[0]*h+s,c-t[1]*h]}function n(t){return t=u.invert((t[0]-s)/h,(c-t[1])/h),t&&[t[0]*Ha,t[1]*Ha]}function r(){u=Ae(a=ln(y,b,_),o);var t=o(g,m);return s=d-t[0]*h,c=p+t[1]*h,i()}function i(){return f&&(f.valid=!1,f=null),e}var o,a,u,s,c,f,l=en(function(t,e){return t=o(t,e),[t[0]*h+s,c-t[1]*h]}),h=150,d=480,p=250,g=0,m=0,y=0,b=0,_=0,x=Fu,w=v,M=null,S=null;return e.stream=function(t){return f&&(f.valid=!1),f=sn(x(a,l(w(t)))),f.valid=!0,f},e.clipAngle=function(t){return arguments.length?(x=null==t?(M=t,Fu):je((M=+t)*Ua),i()):M},e.clipExtent=function(t){return arguments.length?(S=t,w=t?Ue(t[0][0],t[0][1],t[1][0],t[1][1]):v,i()):S},e.scale=function(t){return arguments.length?(h=+t,r()):h},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Ua,m=t[1]%360*Ua,r()):[g*Ha,m*Ha]},e.rotate=function(t){return arguments.length?(y=t[0]%360*Ua,b=t[1]%360*Ua,_=t.length>2?t[2]%360*Ua:0,r()):[y*Ha,b*Ha,_*Ha]},sa.rebind(e,l,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,r()}}function sn(t){return on(t,function(e,n){t.point(e*Ua,n*Ua)})}function cn(t,e){return[t,e]}function fn(t,e){return[t>Fa?t-Ia:-Fa>t?t+Ia:t,e]}function ln(t,e,n){return t?e||n?Ae(dn(t),pn(e,n)):dn(t):e||n?pn(e,n):fn}function hn(t){return function(e,n){return e+=t,[e>Fa?e-Ia:-Fa>e?e+Ia:e,n]}}function dn(t){var e=hn(t);return e.invert=hn(-t),e}function pn(t,e){function n(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),f=c*r+u*i;return[Math.atan2(s*o-f*a,u*r-c*i),et(f*o+s*a)]}var r=Math.cos(t),i=Math.sin(t),o=Math.cos(e),a=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),f=c*o-s*a;return[Math.atan2(s*o+c*a,u*r+f*i),et(f*r-u*i)]},n}function gn(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,u){var s=a*e;null!=i?(i=mn(n,i),o=mn(n,o),(a>0?o>i:i>o)&&(i+=a*Ia)):(i=t+a*Ia,o=t-.5*s);for(var c,f=i;a>0?f>o:o>f;f-=s)u.point((c=xe([n,-r*Math.cos(f),-r*Math.sin(f)]))[0],c[1])}}function mn(t,e){var n=ge(e);n[0]-=t,_e(n);var r=tt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Ba)%(2*Math.PI)}function yn(t,e,n){var r=sa.range(t,e-Ba,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function vn(t,e,n){var r=sa.range(t,e-Ba,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function bn(t){return t.source}function _n(t){return t.target}function xn(t,e,n,r){var i=Math.cos(e),o=Math.sin(e),a=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),f=a*Math.cos(n),l=a*Math.sin(n),h=2*Math.asin(Math.sqrt(ot(r-e)+i*a*ot(n-t))),d=1/Math.sin(h),p=h?function(t){var e=Math.sin(t*=h)*d,n=Math.sin(h-t)*d,r=n*s+e*f,i=n*c+e*l,a=n*o+e*u;return[Math.atan2(i,r)*Ha,Math.atan2(a,Math.sqrt(r*r+i*i))*Ha]}:function(){return[t*Ha,e*Ha]};return p.distance=h,p}function wn(){function t(t,i){var o=Math.sin(i*=Ua),a=Math.cos(i),u=_a((t*=Ua)-e),s=Math.cos(u);Xu+=Math.atan2(Math.sqrt((u=a*Math.sin(u))*u+(u=r*o-n*a*s)*u),n*o+r*a*s),e=t,n=o,r=a}var e,n,r;Ju.point=function(i,o){e=i*Ua,n=Math.sin(o*=Ua),r=Math.cos(o),Ju.point=t},Ju.lineEnd=function(){Ju.point=Ju.lineEnd=x}}function Mn(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}function Sn(t,e){function n(t,e){a>0?-qa+Ba>e&&(e=-qa+Ba):e>qa-Ba&&(e=qa-Ba);var n=a/Math.pow(i(e),o);return[n*Math.sin(o*t),a-n*Math.cos(o*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Fa/4+t/2)},o=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),a=r*Math.pow(i(t),o)/o;return o?(n.invert=function(t,e){var n=a-e,r=K(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(a/r,1/o))-qa]},n):En}function kn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),o=r/i+t;return _a(i)i;i++){for(;r>1&&Q(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Tn(t,e){return t[0]-e[0]||t[1]-e[1]}function Ln(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function On(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,u=r[0]-o,s=t[1],c=n[1],f=e[1]-s,l=r[1]-c,h=(u*(s-c)-l*(i-o))/(l*a-u*f);return[i+h*a,s+h*f]}function Wn(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Dn(){rr(this),this.edge=this.site=this.circle=null}function Bn(t){var e=cs.pop()||new Dn;return e.site=t,e}function Rn(t){Zn(t),as.remove(t),cs.push(t),rr(t)}function Fn(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,u=[t];Rn(t);for(var s=o;s.circle&&_a(n-s.circle.x)f;++f)c=u[f],s=u[f-1],tr(c.edge,s.site,c.site,i);s=u[0],c=u[l-1],c.edge=Kn(s.site,c.site,null,i),Yn(s),Yn(c)}function In(t){for(var e,n,r,i,o=t.x,a=t.y,u=as._;u;)if(r=jn(u,a)-o,r>Ba)u=u.L;else{if(i=o-qn(u,a),!(i>Ba)){r>-Ba?(e=u.P,n=u):i>-Ba?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}var s=Bn(t);if(as.insert(e,s),e||n){if(e===n)return Zn(e),n=Bn(e.site),as.insert(s,n),s.edge=n.edge=Kn(e.site,s.site),Yn(e),void Yn(n);if(!n)return void(s.edge=Kn(e.site,s.site));Zn(e),Zn(n);var c=e.site,f=c.x,l=c.y,h=t.x-f,d=t.y-l,p=n.site,g=p.x-f,m=p.y-l,y=2*(h*m-d*g),v=h*h+d*d,b=g*g+m*m,_={x:(m*v-d*b)/y+f,y:(h*b-g*v)/y+l};tr(n.edge,c,p,_),s.edge=Kn(c,t,null,_),n.edge=Kn(t,p,null,_),Yn(e),Yn(n)}}function jn(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-(1/0);n=a.site;var u=n.x,s=n.y,c=s-e;if(!c)return u;var f=u-r,l=1/o-1/c,h=f/c;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*c)-s+c/2+i-o/2)))/l+r:(r+u)/2}function qn(t,e){var n=t.N;if(n)return jn(n,e);var r=t.site;return r.y===e?r.x:1/0}function Un(t){this.site=t,this.edges=[]}function Hn(t){for(var e,n,r,i,o,a,u,s,c,f,l=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],g=os,m=g.length;m--;)if(o=g[m],o&&o.prepare())for(u=o.edges,s=u.length,a=0;s>a;)f=u[a].end(),r=f.x,i=f.y,c=u[++a%s].start(),e=c.x,n=c.y,(_a(r-e)>Ba||_a(i-n)>Ba)&&(u.splice(a,0,new er(Qn(o.site,f,_a(r-l)Ba?{x:l,y:_a(e-l)Ba?{x:_a(n-p)Ba?{x:h,y:_a(e-h)Ba?{x:_a(n-d)=-Ra)){var d=s*s+c*c,p=f*f+l*l,g=(l*d-c*p)/h,m=(s*p-f*d)/h,l=m+u,y=fs.pop()||new Gn;y.arc=t,y.site=i,y.x=g+a,y.y=l+Math.sqrt(g*g+m*m),y.cy=l,t.circle=y;for(var v=null,b=ss._;b;)if(y.ym||m>=u)return;if(h>p){if(o){if(o.y>=c)return}else o={x:m,y:s};n={x:m,y:c}}else{if(o){if(o.yr||r>1)if(h>p){if(o){if(o.y>=c)return}else o={x:(s-i)/r,y:s};n={x:(c-i)/r,y:c}}else{if(o){if(o.yd){if(o){if(o.x>=u)return}else o={x:a,y:r*a+i};n={x:u,y:r*u+i}}else{if(o){if(o.xo||l>a||r>h||i>d)){if(p=t.point){var p,g=e-t.x,m=n-t.y,y=g*g+m*m;if(s>y){var v=Math.sqrt(s=y);r=e-v,i=n-v,o=e+v,a=n+v,u=p}}for(var b=t.nodes,_=.5*(f+h),x=.5*(l+d),w=e>=_,M=n>=x,S=M<<1|w,k=S+4;k>S;++S)if(t=b[3&S])switch(3&S){case 0:c(t,f,l,_,x);break;case 1:c(t,_,l,h,x);break;case 2:c(t,f,x,_,d);break;case 3:c(t,_,x,h,d)}}}(t,r,i,o,a),u}function gr(t,e){t=sa.rgb(t),e=sa.rgb(e);var n=t.r,r=t.g,i=t.b,o=e.r-n,a=e.g-r,u=e.b-i;return function(t){return"#"+_t(Math.round(n+o*t))+_t(Math.round(r+a*t))+_t(Math.round(i+u*t))}}function mr(t,e){var n,r={},i={};for(n in t)n in e?r[n]=br(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function yr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function vr(t,e){var n,r,i,o=hs.lastIndex=ds.lastIndex=0,a=-1,u=[],s=[];for(t+="",e+="";(n=hs.exec(t))&&(r=ds.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:yr(n,r)})),o=ds.lastIndex;return or;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})}function br(t,e){for(var n,r=sa.interpolators.length;--r>=0&&!(n=sa.interpolators[r](t,e)););return n}function _r(t,e){var n,r=[],i=[],o=t.length,a=e.length,u=Math.min(t.length,e.length);for(n=0;u>n;++n)r.push(br(t[n],e[n]));for(;o>n;++n)i[n]=t[n];for(;a>n;++n)i[n]=e[n];return function(t){for(n=0;u>n;++n)i[n]=r[n](t);return i}}function xr(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function wr(t){return function(e){return 1-t(1-e)}}function Mr(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function Sr(t){return t*t}function kr(t){return t*t*t}function Er(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Nr(t){return function(e){return Math.pow(e,t)}}function Ar(t){return 1-Math.cos(t*qa)}function zr(t){return Math.pow(2,10*(t-1))}function Cr(t){return 1-Math.sqrt(1-t*t)}function Pr(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Ia*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Ia/e)}}function Tr(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Lr(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Or(t,e){t=sa.hcl(t),e=sa.hcl(e);var n=t.h,r=t.c,i=t.l,o=e.h-n,a=e.c-r,u=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return ft(n+o*t,r+a*t,i+u*t)+""}}function Wr(t,e){t=sa.hsl(t),e=sa.hsl(e);var n=t.h,r=t.s,i=t.l,o=e.h-n,a=e.s-r,u=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return st(n+o*t,r+a*t,i+u*t)+""}}function Dr(t,e){t=sa.lab(t),e=sa.lab(e);var n=t.l,r=t.a,i=t.b,o=e.l-n,a=e.a-r,u=e.b-i;return function(t){return ht(n+o*t,r+a*t,i+u*t)+""}}function Br(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Rr(t){var e=[t.a,t.b],n=[t.c,t.d],r=Ir(e),i=Fr(e,n),o=Ir(jr(n,e,-i))||0;e[0]*n[1]180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(qr(n)+"rotate(",null,")")-2,x:yr(t,e)})):e&&n.push(qr(n)+"rotate("+e+")")}function Vr(t,e,n,r){t!==e?r.push({i:n.push(qr(n)+"skewX(",null,")")-2,x:yr(t,e)}):e&&n.push(qr(n)+"skewX("+e+")")}function Gr(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(qr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:yr(t[0],e[0])},{i:i-2,x:yr(t[1],e[1])})}else(1!==e[0]||1!==e[1])&&n.push(qr(n)+"scale("+e+")")}function Yr(t,e){var n=[],r=[];return t=sa.transform(t),e=sa.transform(e),Ur(t.translate,e.translate,n,r),Hr(t.rotate,e.rotate,n,r),Vr(t.skew,e.skew,n,r),Gr(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i=0;)n.push(i[r])}function ai(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++an;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function yi(t){return t.reduce(vi,0)}function vi(t,e){return t+e[1]}function bi(t,e){return _i(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function _i(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function xi(t){return[sa.min(t),sa.max(t)]}function wi(t,e){return t.value-e.value}function Mi(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Si(t,e){t._pack_next=e,e._pack_prev=t}function ki(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function Ei(t){function e(t){f=Math.min(t.x-t.r,f),l=Math.max(t.x+t.r,l),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(c=n.length)){var n,r,i,o,a,u,s,c,f=1/0,l=-(1/0),h=1/0,d=-(1/0);if(n.forEach(Ni),r=n[0],r.x=-r.r,r.y=0,e(r),c>1&&(i=n[1],i.x=i.r,i.y=0,e(i),c>2))for(o=n[2],Ci(r,i,o),e(o),Mi(r,o),r._pack_prev=o,Mi(o,i),i=r._pack_next,a=3;c>a;a++){Ci(r,i,o=n[a]);var p=0,g=1,m=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(ki(u,o)){p=1;break}if(1==p)for(s=r._pack_prev;s!==u._pack_prev&&!ki(s,o);s=s._pack_prev,m++);p?(m>g||g==m&&i.ra;a++)o=n[a],o.x-=y,o.y-=v,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=b,n.forEach(Ai)}}function Ni(t){t._pack_next=t._pack_prev=t}function Ai(t){delete t._pack_next,delete t._pack_prev}function zi(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o=0;)e=i[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function Di(t,e,n){return t.a.parent===e.parent?t.a:n}function Bi(t){return 1+sa.max(t,function(t){return t.y})}function Ri(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Fi(t){var e=t.children;return e&&e.length?Fi(e[0]):t}function Ii(t){var e,n=t.children;return n&&(e=n.length)?Ii(n[e-1]):t}function ji(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function qi(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Ui(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Hi(t){return t.rangeExtent?t.rangeExtent():Ui(t.range())}function Vi(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}}function Gi(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Yi(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Ss}function Zi(t,e,n,r){var i=[],o=[],a=0,u=Math.min(t.length,e.length)-1;for(t[u]2?Zi:Vi,s=r?$r:Zr;return a=i(t,e,s,n),u=i(e,t,s,br),o}function o(t){return a(t)}var a,u;return o.invert=function(t){return u(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},o.range=function(t){return arguments.length?(e=t,i()):e},o.rangeRound=function(t){return o.range(t).interpolate(Br)},o.clamp=function(t){return arguments.length?(r=t,i()):r},o.interpolate=function(t){return arguments.length?(n=t,i()):n},o.ticks=function(e){return Qi(t,e)},o.tickFormat=function(e,n){return to(t,e,n)},o.nice=function(e){return Ji(t,e),i()},o.copy=function(){return $i(t,e,n,r)},i()}function Xi(t,e){return sa.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ji(t,e){return Gi(t,Yi(Ki(t,e)[2])),Gi(t,Yi(Ki(t,e)[2])),t}function Ki(t,e){null==e&&(e=10);var n=Ui(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function Qi(t,e){return sa.range.apply(sa,Ki(t,e))}function to(t,e,n){var r=Ki(t,e);if(n){var i=hu.exec(n);if(i.shift(),"s"===i[8]){var o=sa.formatPrefix(Math.max(_a(r[0]),_a(r[1])));return i[7]||(i[7]="."+eo(o.scale(r[2]))),i[8]="f",n=sa.format(i.join("")),function(t){return n(o.scale(t))+o.symbol}}i[7]||(i[7]="."+no(i[8],r)),n=i.join("")}else n=",."+eo(r[2])+"f";return sa.format(n)}function eo(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function no(t,e){var n=eo(e[2]);return t in ks?Math.abs(n-eo(Math.max(_a(e[0]),_a(e[1]))))+ +("e"!==t):n-2*("%"===t)}function ro(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),a):e},a.nice=function(){var e=Gi(r.map(i),n?Math:Ns);return t.domain(e),r=e.map(o),a},a.ticks=function(){var t=Ui(r),a=[],u=t[0],s=t[1],c=Math.floor(i(u)),f=Math.ceil(i(s)),l=e%1?2:e;if(isFinite(f-c)){if(n){for(;f>c;c++)for(var h=1;l>h;h++)a.push(o(c)*h);a.push(o(c))}else for(a.push(o(c));c++0;h--)a.push(o(c)*h);for(c=0;a[c]s;f--);a=a.slice(c,f)}return a},a.tickFormat=function(t,n){if(!arguments.length)return Es;arguments.length<2?n=Es:"function"!=typeof n&&(n=sa.format(n));var r=Math.max(1,e*t/a.ticks().length);return function(t){var a=t/o(Math.round(i(t)));return e-.5>a*e&&(a*=e),r>=a?n(t):""}},a.copy=function(){return ro(t.copy(),e,n,r)},Xi(a,t)}function io(t,e,n){function r(e){return t(i(e))}var i=oo(e),o=oo(1/e);return r.invert=function(e){return o(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return Qi(n,t)},r.tickFormat=function(t,e){return to(n,t,e)},r.nice=function(t){return r.domain(Ji(n,t))},r.exponent=function(a){return arguments.length?(i=oo(e=a),o=oo(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return io(t.copy(),e,n)},Xi(r,t)}function oo(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function ao(t,e){function n(n){return o[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):NaN))-1)%o.length]}function r(e,n){return sa.range(t.length).map(function(t){return e+n*t})}var i,o,a;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new c;for(var o,a=-1,u=r.length;++an?[NaN,NaN]:[n>0?u[n-1]:t[0],ne?NaN:e/o+t,[e,e+1/o]},r.copy=function(){return so(t,e,n)},i()}function co(t,e){function n(n){return n>=n?e[sa.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return co(t,e)},n}function fo(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return Qi(t,e)},e.tickFormat=function(e,n){return to(t,e,n)},e.copy=function(){return fo(t)},e}function lo(){return 0}function ho(t){return t.innerRadius}function po(t){return t.outerRadius}function go(t){return t.startAngle}function mo(t){return t.endAngle}function yo(t){return t&&t.padAngle}function vo(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function bo(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],u=(i?r:-r)/Math.sqrt(o*o+a*a),s=u*a,c=-u*o,f=t[0]+s,l=t[1]+c,h=e[0]+s,d=e[1]+c,p=(f+h)/2,g=(l+d)/2,m=h-f,y=d-l,v=m*m+y*y,b=n-r,_=f*d-h*l,x=(0>y?-1:1)*Math.sqrt(Math.max(0,b*b*v-_*_)),w=(_*y-m*x)/v,M=(-_*m-y*x)/v,S=(_*y+m*x)/v,k=(-_*m+y*x)/v,E=w-p,N=M-g,A=S-p,z=k-g;return E*E+N*N>A*A+z*z&&(w=S,M=k),[[w-s,M-c],[w*n/b,M*n/b]]}function _o(t){function e(e){function a(){c.push("M",o(t(f),u))}for(var s,c=[],f=[],l=-1,h=e.length,d=Et(n),p=Et(r);++l1?t.join("L"):t+"Z"}function wo(t){return t.join("L")+"Z"}function Mo(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e1&&i.push("H",r[0]),i.join("")}function So(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e1){u=e[1],o=t[s],s++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1];for(var c=2;c9&&(i=3*e/Math.sqrt(i),a[u]=i*n,a[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+a[u]*a[u])),o.push([i||0,a[u]*i||0]);return o}function Io(t){return t.length<3?xo(t):t[0]+zo(t,Fo(t))}function jo(t){for(var e,n,r,i=-1,o=t.length;++i=e?a(t-e):void(f.c=a)}function a(n){var i=p.active,o=p[i];o&&(o.timer.c=null,o.timer.t=NaN,--p.count,delete p[i],o.event&&o.event.interrupt.call(t,t.__data__,o.index));for(var a in p)if(r>+a){var c=p[a];c.timer.c=null,c.timer.t=NaN,--p.count,delete p[a]}f.c=u,Pt(function(){return f.c&&u(n||1)&&(f.c=null,f.t=NaN),1},0,s),p.active=r,g.event&&g.event.start.call(t,t.__data__,e),d=[],g.tween.forEach(function(n,r){(r=r.call(t,t.__data__,e))&&d.push(r)}),h=g.ease,l=g.duration}function u(i){for(var o=i/l,a=h(o),u=d.length;u>0;)d[--u].call(t,a);return o>=1?(g.event&&g.event.end.call(t,t.__data__,e),--p.count?delete p[r]:delete t[n],1):void 0}var s,f,l,h,d,p=t[n]||(t[n]={active:0,count:0}),g=p[r];g||(s=i.time,f=Pt(o,0,s),g=p[r]={tween:new c,time:s,timer:f,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++p.count)}function ea(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function na(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function ra(t){return t.toISOString()}function ia(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,o=sa.bisect(Ks,i);return o==Ks.length?[e.year,Ki(t.map(function(t){return t/31536e6}),n)[2]]:o?e[i/Ks[o-1]1?{floor:function(e){for(;n(e=t.floor(e));)e=oa(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=oa(+e+1);return e}}:t))},r.ticks=function(t,e){var n=Ui(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],oa(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return ia(t.copy(),e,n)},Xi(r,t)}function oa(t){return new Date(t)}function aa(t){return JSON.parse(t.responseText)}function ua(t){var e=la.createRange();return e.selectNode(la.body),e.createContextualFragment(t.responseText)}var sa={version:"3.5.16"},ca=[].slice,fa=function(t){return ca.call(t)},la=this.document;if(la)try{fa(la.documentElement.childNodes)[0].nodeType}catch(ha){fa=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),la)try{la.createElement("DIV").style.setProperty("opacity",0,"")}catch(da){var pa=this.Element.prototype,ga=pa.setAttribute,ma=pa.setAttributeNS,ya=this.CSSStyleDeclaration.prototype,va=ya.setProperty;pa.setAttribute=function(t,e){ga.call(this,t,e+"")},pa.setAttributeNS=function(t,e,n){ma.call(this,t,e,n+"")},ya.setProperty=function(t,e,n){va.call(this,t,e+"",n)}}sa.ascending=n,sa.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:NaN},sa.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},sa.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},sa.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o=r){n=i=r;break}for(;++or&&(n=r),r>i&&(i=r))}else{for(;++o=r){n=i=r;break}for(;++or&&(n=r),r>i&&(i=r))}return[n,i]},sa.sum=function(t,e){var n,r=0,o=t.length,a=-1;if(1===arguments.length)for(;++a1?s/(f-1):void 0},sa.deviation=function(){var t=sa.variance.apply(this,arguments);return t?Math.sqrt(t):t};var ba=o(n);sa.bisectLeft=ba.left,sa.bisect=sa.bisectRight=ba.right,sa.bisector=function(t){return o(1===t.length?function(e,r){return n(t(e),r)}:t)},sa.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,2>o&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},sa.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},sa.pairs=function(t){for(var e,n=0,r=t.length-1,i=t[0],o=new Array(0>r?0:r);r>n;)o[n]=[e=i,i=t[++n]];return o},sa.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=sa.min(t,a),r=new Array(n);++e=0;)for(r=t[i],e=r.length;--e>=0;)n[--a]=r[e];return n};var _a=Math.abs;sa.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r,i=[],o=u(_a(n)),a=-1;if(t*=o,e*=o,n*=o,0>n)for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var s,f,l,h,d=-1,p=a.length,g=o[u++],m=new c;++d=o.length)return t;var r=[],i=a[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(sa.map,n,0),0)},i.key=function(t){return o.push(t),i},i.sortKeys=function(t){return a[o.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},sa.set=function(t){var e=new y;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},s(y,{has:h,add:function(t){return this._[f(t+="")]=!0,t},remove:d,values:p,size:g,empty:m,forEach:function(t){for(var e in this._)t.call(this,l(e))}}),sa.behavior={},sa.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},sa.event=null,sa.requote=function(t){return t.replace(Sa,"\\$&")};var Sa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ka={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Ea=function(t,e){return e.querySelector(t)},Na=function(t,e){return e.querySelectorAll(t)},Aa=function(t,e){var n=t.matches||t[_(t,"matchesSelector")];return(Aa=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Ea=function(t,e){return Sizzle(t,e)[0]||null},Na=Sizzle,Aa=Sizzle.matchesSelector),sa.selection=function(){return sa.select(la.documentElement)};var za=sa.selection.prototype=[];za.select=function(t){var e,n,r,i,o=[];t=A(t);for(var a=-1,u=this.length;++a=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Pa.hasOwnProperty(n)?{space:Pa[n],local:t}:t}},za.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=sa.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(C(e,t[e]));return this}return this.each(C(t,e))},za.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=L(t)).length,i=-1;if(e=n.classList){for(;++ii){if("string"!=typeof t){2>i&&(n="");for(r in t)this.each(D(r,t[r],n));return this}if(2>i){var o=this.node();return e(o).getComputedStyle(o,null).getPropertyValue(t)}r=""}return this.each(D(t,n,r))},za.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(B(e,t[e]));return this}return this.each(B(t,e))},za.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},za.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},za.append=function(t){return t=R(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},za.insert=function(t,e){return t=R(t),e=A(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},za.remove=function(){return this.each(F)},za.data=function(t,e){function n(t,n){var r,i,o,a=t.length,l=n.length,h=Math.min(a,l),d=new Array(l),p=new Array(l),g=new Array(a);if(e){var m,y=new c,v=new Array(a);for(r=-1;++rr;++r)p[r]=I(n[r]);for(;a>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,u.push(p),s.push(d),f.push(g)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++oo;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,o)&&e.push(r)}return N(i)},za.order=function(){for(var t=-1,e=this.length;++t=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},za.sort=function(t){t=q.apply(this,arguments);for(var e=-1,n=this.length;++et;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null},za.size=function(){var t=0;return U(this,function(){++t}),t};var Ta=[];sa.selection.enter=H,sa.selection.enter.prototype=Ta,Ta.append=za.append,Ta.empty=za.empty,Ta.node=za.node,Ta.call=za.call,Ta.size=za.size,Ta.select=function(t){for(var e,n,r,i,o,a=[],u=-1,s=this.length;++ur){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(G(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(G(t,e,n))};var La=sa.map({mouseenter:"mouseover",mouseleave:"mouseout"});la&&La.forEach(function(t){"on"+t in la&&La.remove(t)});var Oa,Wa=0;sa.mouse=function(t){return X(t,k())};var Da=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;sa.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=k().changedTouches),e)for(var r,i=0,o=e.length;o>i;++i)if((r=e[i]).identifier===n)return X(t,r)},sa.behavior.drag=function(){function t(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function n(t,e,n,o,a){return function(){function u(){var t,n,r=e(h,g);r&&(t=r[0]-b[0],n=r[1]-b[1],p|=t|n,b=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:n}))}function s(){e(h,g)&&(y.on(o+m,null).on(a+m,null),v(p),d({type:"dragend"}))}var c,f=this,l=sa.event.target.correspondingElement||sa.event.target,h=f.parentNode,d=r.of(f,arguments),p=0,g=t(),m=".drag"+(null==g?"":"-"+g),y=sa.select(n(l)).on(o+m,u).on(a+m,s),v=$(l),b=e(h,g);i?(c=i.apply(f,arguments),c=[c.x-b[0],c.y-b[1]]):c=[0,0],d({type:"dragstart"})}}var r=E(t,"drag","dragstart","dragend"),i=null,o=n(x,sa.mouse,e,"mousemove","mouseup"),a=n(J,sa.touch,v,"touchmove","touchend");return t.origin=function(e){return arguments.length?(i=e,t):i},sa.rebind(t,r,"on")},sa.touches=function(t,e){return arguments.length<2&&(e=k().touches),e?fa(e).map(function(e){var n=X(t,e);return n.identifier=e.identifier,n}):[]};var Ba=1e-6,Ra=Ba*Ba,Fa=Math.PI,Ia=2*Fa,ja=Ia-Ba,qa=Fa/2,Ua=Fa/180,Ha=180/Fa,Va=Math.SQRT2,Ga=2,Ya=4;sa.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],u=e[0],s=e[1],c=e[2],f=u-i,l=s-o,h=f*f+l*l;if(Ra>h)r=Math.log(c/a)/Va,n=function(t){return[i+t*f,o+t*l,a*Math.exp(Va*t*r)]};else{var d=Math.sqrt(h),p=(c*c-a*a+Ya*h)/(2*a*Ga*d),g=(c*c-a*a-Ya*h)/(2*c*Ga*d),m=Math.log(Math.sqrt(p*p+1)-p),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-m)/Va,n=function(t){var e=t*r,n=rt(m),u=a/(Ga*d)*(n*it(Va*e+m)-nt(m));return[i+u*f,o+u*l,a*n/rt(Va*e+m)]}}return n.duration=1e3*r,n},sa.behavior.zoom=function(){function t(t){t.on(P,l).on($a+".zoom",d).on("dblclick.zoom",p).on(O,h)}function n(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function r(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}function i(t){k.k=Math.max(A[0],Math.min(A[1],t))}function o(t,e){e=r(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function a(e,n,r,a){e.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,a)),o(m=n,r),e=sa.select(e),z>0&&(e=e.transition().duration(z)),e.call(t.event)}function u(){x&&x.domain(_.range().map(function(t){return(t-k.x)/k.k}).map(_.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function s(t){C++||t({type:"zoomstart"})}function c(t){u(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function f(t){--C||(t({type:"zoomend"}),m=null)}function l(){function t(){u=1,o(sa.mouse(i),h),c(a)}function r(){l.on(T,null).on(L,null),d(u),f(a)}var i=this,a=W.of(i,arguments),u=0,l=sa.select(e(i)).on(T,t).on(L,r),h=n(sa.mouse(i)),d=$(i);qs.call(i),s(a)}function h(){function t(){var t=sa.touches(p);return d=k.k,t.forEach(function(t){t.identifier in m&&(m[t.identifier]=n(t))}),t}function e(){var e=sa.event.target;sa.select(e).on(_,r).on(x,u),w.push(e);for(var n=sa.event.changedTouches,i=0,o=n.length;o>i;++i)m[n[i].identifier]=null;var s=t(),c=Date.now();if(1===s.length){if(500>c-b){var f=s[0];a(p,f,m[f.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}b=c}else if(s.length>1){var f=s[0],l=s[1],h=f[0]-l[0],d=f[1]-l[1];y=h*h+d*d}}function r(){var t,e,n,r,a=sa.touches(p);qs.call(p);for(var u=0,s=a.length;s>u;++u,r=null)if(n=a[u],r=m[n.identifier]){if(e)break;t=n,e=r}if(r){var f=(f=n[0]-t[0])*f+(f=n[1]-t[1])*f,l=y&&Math.sqrt(f/y);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+r[0])/2,(e[1]+r[1])/2],i(l*d)}b=null,o(t,e),c(g)}function u(){if(sa.event.touches.length){for(var e=sa.event.changedTouches,n=0,r=e.length;r>n;++n)delete m[e[n].identifier];for(var i in m)return void t()}sa.selectAll(w).on(v,null),M.on(P,l).on(O,h),E(),f(g)}var d,p=this,g=W.of(p,arguments),m={},y=0,v=".zoom-"+sa.event.changedTouches[0].identifier,_="touchmove"+v,x="touchend"+v,w=[],M=sa.select(p),E=$(p);e(),s(g),M.on(P,null).on(O,e)}function d(){var t=W.of(this,arguments);v?clearTimeout(v):(qs.call(this),g=n(m=y||sa.mouse(this)),s(t)),v=setTimeout(function(){v=null,f(t)},50),S(),i(Math.pow(2,.002*Za())*k.k),o(m,g),c(t)}function p(){var t=sa.mouse(this),e=Math.log(k.k)/Math.LN2;a(this,t,n(t),sa.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var g,m,y,v,b,_,x,w,M,k={x:0,y:0,k:1},N=[960,500],A=Xa,z=250,C=0,P="mousedown.zoom",T="mousemove.zoom",L="mouseup.zoom",O="touchstart.zoom",W=E(t,"zoomstart","zoom","zoomend");return $a||($a="onwheel"in la?(Za=function(){return-sa.event.deltaY*(sa.event.deltaMode?120:1)},"wheel"):"onmousewheel"in la?(Za=function(){return sa.event.wheelDelta},"mousewheel"):(Za=function(){return-sa.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=W.of(this,arguments),e=k;Is?sa.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var n=N[0],r=N[1],i=m?m[0]:n/2,o=m?m[1]:r/2,a=sa.interpolateZoom([(i-k.x)/k.k,(o-k.y)/k.k,n/k.k],[(i-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var r=a(e),u=n/r[2];this.__chart__=k={x:i-r[0]*u,y:o-r[1]*u,k:u},c(t)}}).each("interrupt.zoom",function(){f(t)}).each("end.zoom",function(){f(t)}):(this.__chart__=k,s(t),c(t),f(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},u(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+e),u(),t):k.k},t.scaleExtent=function(e){return arguments.length?(A=null==e?Xa:[+e[0],+e[1]],t):A},t.center=function(e){return arguments.length?(y=e&&[+e[0],+e[1]],t):y},t.size=function(e){return arguments.length?(N=e&&[+e[0],+e[1]],t):N},t.duration=function(e){return arguments.length?(z=+e,t):z},t.x=function(e){return arguments.length?(x=e,_=e.copy(),k={x:0,y:0,k:1},t):x},t.y=function(e){return arguments.length?(M=e,w=e.copy(),k={x:0,y:0,k:1},t):M},sa.rebind(t,W,"on")};var Za,$a,Xa=[0,1/0];sa.color=at,at.prototype.toString=function(){return this.rgb()+""},sa.hsl=ut;var Ja=ut.prototype=new at;Ja.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,this.l/t)},Ja.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ut(this.h,this.s,t*this.l)},Ja.rgb=function(){return st(this.h,this.s,this.l)},sa.hcl=ct;var Ka=ct.prototype=new at;Ka.brighter=function(t){return new ct(this.h,this.c,Math.min(100,this.l+Qa*(arguments.length?t:1)))},Ka.darker=function(t){return new ct(this.h,this.c,Math.max(0,this.l-Qa*(arguments.length?t:1)))},Ka.rgb=function(){return ft(this.h,this.c,this.l).rgb()},sa.lab=lt;var Qa=18,tu=.95047,eu=1,nu=1.08883,ru=lt.prototype=new at;ru.brighter=function(t){return new lt(Math.min(100,this.l+Qa*(arguments.length?t:1)),this.a,this.b)},ru.darker=function(t){return new lt(Math.max(0,this.l-Qa*(arguments.length?t:1)),this.a,this.b)},ru.rgb=function(){return ht(this.l,this.a,this.b)},sa.rgb=yt;var iu=yt.prototype=new at;iu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new yt(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new yt(i,i,i)},iu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new yt(t*this.r,t*this.g,t*this.b)},iu.hsl=function(){return wt(this.r,this.g,this.b)},iu.toString=function(){return"#"+_t(this.r)+_t(this.g)+_t(this.b)};var ou=sa.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ou.forEach(function(t,e){ou.set(t,vt(e))}),sa.functor=Et,sa.xhr=Nt(v),sa.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var a=At(t,e,null==n?r:i(n),o);return a.row=function(t){return arguments.length?a.response(null==(n=t)?r:i(t)):n},a}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(a).join(t)}function a(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(f>=c)return a;if(i)return i=!1,o;var e=f;if(34===t.charCodeAt(e)){for(var n=e;n++f;){var r=t.charCodeAt(f++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(f)&&(++f,++u);else if(r!==s)continue;return t.slice(e,f-u)}return t.slice(e)}for(var r,i,o={},a={},u=[],c=t.length,f=0,l=0;(r=n())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=n();e&&null==(h=e(h,l++))||u.push(h)}return u},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new y,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(a).join(t)].concat(e.map(function(e){return i.map(function(t){return a(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},sa.csv=sa.dsv(",","text/csv"),sa.tsv=sa.dsv(" ","text/tab-separated-values");var au,uu,su,cu,fu=this[_(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};sa.timer=function(){Pt.apply(this,arguments)},sa.timer.flush=function(){Lt(),Ot()},sa.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var lu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Dt);sa.formatPrefix=function(t,e){var n=0;return(t=+t)&&(0>t&&(t*=-1),e&&(t=sa.round(t,Wt(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),lu[8+n/3]};var hu=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,du=sa.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=sa.round(t,Wt(t,e))).toFixed(Math.max(0,Math.min(20,Wt(t*(1+1e-15),e))))}}),pu=sa.time={},gu=Date;Ft.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(){mu.setUTCDate.apply(this._,arguments)},setDay:function(){mu.setUTCDay.apply(this._,arguments)},setFullYear:function(){mu.setUTCFullYear.apply(this._,arguments)},setHours:function(){mu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){mu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){mu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){mu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){mu.setUTCSeconds.apply(this._,arguments)},setTime:function(){mu.setTime.apply(this._,arguments)}};var mu=Date.prototype;pu.year=It(function(t){return t=pu.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),pu.years=pu.year.range,pu.years.utc=pu.year.utc.range,pu.day=It(function(t){var e=new gu(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),pu.days=pu.day.range,pu.days.utc=pu.day.utc.range,pu.dayOfYear=function(t){var e=pu.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=pu[t]=It(function(t){return(t=pu.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=pu.year(t).getDay();return Math.floor((pu.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});pu[t+"s"]=n.range,pu[t+"s"].utc=n.utc.range,pu[t+"OfYear"]=function(t){var n=pu.year(t).getDay();return Math.floor((pu.dayOfYear(t)+(n+e)%7)/7)}}),pu.week=pu.sunday,pu.weeks=pu.sunday.range,pu.weeks.utc=pu.sunday.utc.range,pu.weekOfYear=pu.sundayOfYear;var yu={"-":"",_:" ",0:"0"},vu=/^\s*\d+/,bu=/^%/;sa.locale=function(t){return{numberFormat:Bt(t),timeFormat:qt(t)}};var _u=sa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]});sa.format=_u.numberFormat,sa.geo={},ce.prototype={s:0,t:0,add:function(t){fe(t,this.t,xu),fe(xu.s,this.s,this),this.s?this.t+=xu.t:this.s=xu.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var xu=new ce;sa.geo.stream=function(t,e){t&&wu.hasOwnProperty(t.type)?wu[t.type](t,e):le(t,e)};var wu={Feature:function(t,e){le(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rt?4*Fa+t:t,Eu.lineStart=Eu.lineEnd=Eu.point=x}};sa.geo.bounds=function(){function t(t,e){b.push(_=[f=t,h=t]),l>e&&(l=e),e>d&&(d=e)}function e(e,n){var r=ge([e*Ua,n*Ua]);if(y){var i=ye(y,r),o=[i[1],-i[0],0],a=ye(o,i);_e(a),a=xe(a);var s=e-p,c=s>0?1:-1,g=a[0]*Ha*c,m=_a(s)>180;if(m^(g>c*p&&c*e>g)){var v=a[1]*Ha;v>d&&(d=v)}else if(g=(g+360)%360-180,m^(g>c*p&&c*e>g)){var v=-a[1]*Ha;l>v&&(l=v)}else l>n&&(l=n),n>d&&(d=n);m?p>e?u(f,e)>u(f,h)&&(h=e):u(e,h)>u(f,h)&&(f=e):h>=f?(f>e&&(f=e),e>h&&(h=e)):e>p?u(f,e)>u(f,h)&&(h=e):u(e,h)>u(f,h)&&(f=e)}else t(e,n);y=r,p=e}function n(){x.point=e}function r(){_[0]=f,_[1]=h,x.point=t,y=null}function i(t,n){if(y){var r=t-p;v+=_a(r)>180?r+(r>0?360:-360):r}else g=t,m=n;Eu.point(t,n),e(t,n)}function o(){Eu.lineStart()}function a(){i(g,m),Eu.lineEnd(),_a(v)>Ba&&(f=-(h=180)),_[0]=f,_[1]=h,y=null}function u(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tku?(f=-(h=180),l=-(d=90)):v>Ba?d=90:-Ba>v&&(l=-90),_[0]=f,_[1]=h}};return function(t){d=h=-(f=l=1/0),b=[],sa.geo.stream(t,x);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],o=[i];e>r;++r)n=b[r],c(n[0],i)||c(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,p=-(1/0),e=o.length-1,r=0,i=o[e];e>=r;i=n,++r)n=o[r],(a=u(i[1],n[0]))>p&&(p=a,f=n[0],h=i[1])}return b=_=null,f===1/0||l===1/0?[[NaN,NaN],[NaN,NaN]]:[[f,l],[h,d]]}}(),sa.geo.centroid=function(t){Nu=Au=zu=Cu=Pu=Tu=Lu=Ou=Wu=Du=Bu=0,sa.geo.stream(t,Ru);var e=Wu,n=Du,r=Bu,i=e*e+n*n+r*r;return Ra>i&&(e=Tu,n=Lu,r=Ou,Ba>Au&&(e=zu,n=Cu,r=Pu),i=e*e+n*n+r*r,Ra>i)?[NaN,NaN]:[Math.atan2(n,e)*Ha,et(r/Math.sqrt(i))*Ha]};var Nu,Au,zu,Cu,Pu,Tu,Lu,Ou,Wu,Du,Bu,Ru={sphere:x,point:Me,lineStart:ke,lineEnd:Ee,polygonStart:function(){Ru.lineStart=Ne},polygonEnd:function(){Ru.lineStart=ke}},Fu=Le(ze,Be,Fe,[-Fa,-Fa/2]),Iu=1e9;sa.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),i=o(t),i.valid=!0,i},extent:function(u){return arguments.length?(o=Ue(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(sa.geo.conicEqualArea=function(){return He(Ve)}).raw=Ve,sa.geo.albers=function(){return sa.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},sa.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return e=null,n(o,a),e||(r(o,a),e)||i(o,a),e}var e,n,r,i,o=sa.geo.albers(),a=sa.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=sa.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=a.stream(t),r=u.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),a.precision(e),u.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),a.scale(.35*e),u.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var c=o.scale(),f=+e[0],l=+e[1];return n=o.translate(e).clipExtent([[f-.455*c,l-.238*c],[f+.455*c,l+.238*c]]).stream(s).point,r=a.translate([f-.307*c,l+.201*c]).clipExtent([[f-.425*c+Ba,l+.12*c+Ba],[f-.214*c-Ba,l+.234*c-Ba]]).stream(s).point,i=u.translate([f-.205*c,l+.212*c]).clipExtent([[f-.214*c+Ba,l+.166*c+Ba],[f-.115*c-Ba,l+.234*c-Ba]]).stream(s).point,t},t.scale(1070)};var ju,qu,Uu,Hu,Vu,Gu,Yu={point:x,lineStart:x,lineEnd:x,polygonStart:function(){qu=0,Yu.lineStart=Ge},polygonEnd:function(){Yu.lineStart=Yu.lineEnd=Yu.point=x,ju+=_a(qu/2)}},Zu={point:Ye,lineStart:x,lineEnd:x,polygonStart:x,polygonEnd:x},$u={point:Xe,lineStart:Je,lineEnd:Ke,polygonStart:function(){$u.lineStart=Qe},polygonEnd:function(){$u.point=Xe,$u.lineStart=Je,$u.lineEnd=Ke}};sa.geo.path=function(){function t(t){return t&&("function"==typeof u&&o.pointRadius(+u.apply(this,arguments)),a&&a.valid||(a=i(o)),sa.geo.stream(t,a)),o.result()}function e(){return a=null,t}var n,r,i,o,a,u=4.5;return t.area=function(t){return ju=0,sa.geo.stream(t,i(Yu)),ju},t.centroid=function(t){return zu=Cu=Pu=Tu=Lu=Ou=Wu=Du=Bu=0,sa.geo.stream(t,i($u)),Bu?[Wu/Bu,Du/Bu]:Ou?[Tu/Ou,Lu/Ou]:Pu?[zu/Pu,Cu/Pu]:[NaN,NaN]},t.bounds=function(t){return Vu=Gu=-(Uu=Hu=1/0),sa.geo.stream(t,i(Zu)),[[Uu,Hu],[Vu,Gu]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||nn(t):v,e()):n},t.context=function(t){return arguments.length?(o=null==(r=t)?new Ze:new tn(t),"function"!=typeof u&&o.pointRadius(u),e()):r},t.pointRadius=function(e){return arguments.length?(u="function"==typeof e?e:(o.pointRadius(+e),+e),t):u},t.projection(sa.geo.albersUsa()).context(null)},sa.geo.transform=function(t){return{stream:function(e){var n=new rn(e);for(var r in t)n[r]=t[r];return n}}},rn.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},sa.geo.projection=an,sa.geo.projectionMutator=un,(sa.geo.equirectangular=function(){return an(cn)}).raw=cn.invert=cn,sa.geo.rotation=function(t){function e(e){return e=t(e[0]*Ua,e[1]*Ua),e[0]*=Ha,e[1]*=Ha,e}return t=ln(t[0]%360*Ua,t[1]*Ua,t.length>2?t[2]*Ua:0),e.invert=function(e){return e=t.invert(e[0]*Ua,e[1]*Ua),e[0]*=Ha,e[1]*=Ha,e},e},fn.invert=cn,sa.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=ln(-t[0]*Ua,-t[1]*Ua,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Ha,t[1]*=Ha}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=gn((e=+r)*Ua,i*Ua),t):e},t.precision=function(r){return arguments.length?(n=gn(e*Ua,(i=+r)*Ua),t):i},t.angle(90)},sa.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Ua,i=t[1]*Ua,o=e[1]*Ua,a=Math.sin(r),u=Math.cos(r),s=Math.sin(i),c=Math.cos(i),f=Math.sin(o),l=Math.cos(o);return Math.atan2(Math.sqrt((n=l*a)*n+(n=c*f-s*l*u)*n),s*f+c*l*u)},sa.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return sa.range(Math.ceil(o/m)*m,i,m).map(h).concat(sa.range(Math.ceil(c/y)*y,s,y).map(d)).concat(sa.range(Math.ceil(r/p)*p,n,p).filter(function(t){return _a(t%m)>Ba}).map(f)).concat(sa.range(Math.ceil(u/g)*g,a,g).filter(function(t){return _a(t%y)>Ba}).map(l))}var n,r,i,o,a,u,s,c,f,l,h,d,p=10,g=p,m=90,y=360,v=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(d(s).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],i=+e[1][0],c=+e[0][1],s=+e[1][1],o>i&&(e=o,o=i,i=e),c>s&&(e=c,c=s,s=e),t.precision(v)):[[o,c],[i,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),u>a&&(e=u,u=a,a=e),t.precision(v)):[[r,u],[n,a]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(m=+e[0],y=+e[1],t):[m,y]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(v=+e,f=yn(u,a,90),l=vn(r,n,v),h=yn(c,s,90),d=vn(o,i,v),t):v},t.majorExtent([[-180,-90+Ba],[180,90-Ba]]).minorExtent([[-180,-80-Ba],[180,80+Ba]])},sa.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=bn,i=_n;return t.distance=function(){return sa.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},sa.geo.interpolate=function(t,e){return xn(t[0]*Ua,t[1]*Ua,e[0]*Ua,e[1]*Ua)},sa.geo.length=function(t){return Xu=0,sa.geo.stream(t,Ju),Xu};var Xu,Ju={sphere:x,point:x,lineStart:wn,lineEnd:x,polygonStart:x,polygonEnd:x},Ku=Mn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(sa.geo.azimuthalEqualArea=function(){return an(Ku)}).raw=Ku;var Qu=Mn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},v);(sa.geo.azimuthalEquidistant=function(){return an(Qu)}).raw=Qu,(sa.geo.conicConformal=function(){return He(Sn)}).raw=Sn,(sa.geo.conicEquidistant=function(){return He(kn)}).raw=kn;var ts=Mn(function(t){return 1/t},Math.atan);(sa.geo.gnomonic=function(){return an(ts)}).raw=ts,En.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-qa]},(sa.geo.mercator=function(){return Nn(En)}).raw=En;var es=Mn(function(){return 1},Math.asin);(sa.geo.orthographic=function(){return an(es)}).raw=es;var ns=Mn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(sa.geo.stereographic=function(){return an(ns)}).raw=ns,An.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-qa]},(sa.geo.transverseMercator=function(){var t=Nn(An),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=An,sa.geom={},sa.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Et(n),o=Et(r),a=t.length,u=[],s=[];for(e=0;a>e;e++)u.push([+i.call(this,t[e],e),+o.call(this,t[e],e),e]);for(u.sort(Tn),e=0;a>e;e++)s.push([u[e][0],-u[e][1]]);var c=Pn(u),f=Pn(s),l=f[0]===c[0],h=f[f.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[u[c[e]][2]]);for(e=+l;e=r&&c.x<=o&&c.y>=i&&c.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];f.point=t[u]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Ba)*Ba,y:Math.round(a(t,e)/Ba)*Ba,i:e}})}var r=zn,i=Cn,o=r,a=i,u=ls;return t?e(t):(e.links=function(t){return ur(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ur(n(t)).cells.forEach(function(n,r){for(var i,o,a=n.site,u=n.edges.sort(Vn),s=-1,c=u.length,f=u[c-1].edge,l=f.l===a?f.r:f.l;++s=c,h=r>=f,d=h<<1|l;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=hr()),l?i=c:u=c,h?a=f:s=f,o(t,e,n,r,i,a,u,s)}var f,l,h,d,p,g,m,y,v,b=Et(u),_=Et(s);if(null!=e)g=e,m=n,y=r,v=i;else if(y=v=-(g=m=1/0),l=[],h=[],p=t.length,a)for(d=0;p>d;++d)f=t[d],f.xy&&(y=f.x),f.y>v&&(v=f.y),l.push(f.x),h.push(f.y);else for(d=0;p>d;++d){var x=+b(f=t[d],d),w=+_(f,d);g>x&&(g=x),m>w&&(m=w),x>y&&(y=x),w>v&&(v=w),l.push(x),h.push(w)}var M=y-g,S=v-m;M>S?v=m+M:y=g+S;var k=hr();if(k.add=function(t){o(k,t,+b(t,++d),+_(t,d),g,m,y,v)},k.visit=function(t){dr(t,k,g,m,y,v)},k.find=function(t){return pr(k,t[0],t[1],g,m,y,v)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=gs.get(n)||ps,r=ms.get(r)||v,xr(r(n.apply(null,ca.call(arguments,1))))},sa.interpolateHcl=Or,sa.interpolateHsl=Wr,sa.interpolateLab=Dr,sa.interpolateRound=Br,sa.transform=function(t){var e=la.createElementNS(sa.ns.prefix.svg,"g");return(sa.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Rr(n?n.matrix:ys)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ys={a:1,b:0,c:0,d:1,e:0,f:0};sa.interpolateTransform=Yr,sa.layout={},sa.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++nu*u/y){if(g>s){var c=e.charge/s;t.px-=o*c,t.py-=a*c}return!0}if(e.point&&s&&g>s){var c=e.pointCharge/s;t.px-=o*c,t.py-=a*c}}return!e.charge}}function e(t){t.px=sa.event.x,t.py=sa.event.y,s.resume()}var n,r,i,o,a,u,s={},c=sa.dispatch("start","tick","end"),f=[1,1],l=.9,h=vs,d=bs,p=-30,g=_s,m=.1,y=.64,b=[],_=[];return s.tick=function(){if((i*=.99)<.005)return n=null,c.end({type:"end",alpha:i=0}),!0;var e,r,s,h,d,g,y,v,x,w=b.length,M=_.length;for(r=0;M>r;++r)s=_[r],h=s.source,d=s.target,v=d.x-h.x,x=d.y-h.y,(g=v*v+x*x)&&(g=i*a[r]*((g=Math.sqrt(g))-o[r])/g,v*=g,x*=g,d.x-=v*(y=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=x*y,h.x+=v*(y=1-y),h.y+=x*y);if((y=i*m)&&(v=f[0]/2,x=f[1]/2,r=-1,y))for(;++r0?i=t:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:i=0})):t>0&&(c.start({type:"start",alpha:i=t}),n=Pt(s.tick)),s):i},s.start=function(){function t(t,r){if(!n){for(n=new Array(i),s=0;i>s;++s)n[s]=[];for(s=0;c>s;++s){var o=_[s];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var a,u=n[e],s=-1,f=u.length;++se;++e)(r=b[e]).index=e,r.weight=0;for(e=0;c>e;++e)r=_[e],"number"==typeof r.source&&(r.source=b[r.source]),"number"==typeof r.target&&(r.target=b[r.target]),++r.source.weight,++r.target.weight;for(e=0;i>e;++e)r=b[e],isNaN(r.x)&&(r.x=t("x",l)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(e=0;c>e;++e)o[e]=+h.call(this,_[e],e);else for(e=0;c>e;++e)o[e]=h;if(a=[],"function"==typeof d)for(e=0;c>e;++e)a[e]=+d.call(this,_[e],e);else for(e=0;c>e;++e)a[e]=d;if(u=[],"function"==typeof p)for(e=0;i>e;++e)u[e]=+p.call(this,b[e],e);else for(e=0;i>e;++e)u[e]=p;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return r||(r=sa.behavior.drag().origin(v).on("dragstart.force",Qr).on("drag.force",e).on("dragend.force",ti)),arguments.length?void this.on("mouseover.force",ei).on("mouseout.force",ni).call(r):r},sa.rebind(s,c,"on")};var vs=20,bs=1,_s=1/0;sa.layout.hierarchy=function(){function t(i){var o,a=[i],u=[];for(i.depth=0;null!=(o=a.pop());)if(u.push(o),(c=n.call(t,o,o.depth))&&(s=c.length)){for(var s,c,f;--s>=0;)a.push(f=c[s]),f.parent=o,f.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return ai(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}var e=ci,n=ui,r=si;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(oi(e,function(t){t.children&&(t.value=0)}),ai(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},sa.layout.partition=function(){function t(e,n,r,i){var o=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,u,s,c=-1;for(r=e.value?r/e.value:0;++cl?-1:1),p=sa.sum(c),g=p?(l-s*d)/p:0,m=sa.range(s),y=[];return null!=n&&m.sort(n===xs?function(t,e){return c[e]-c[t]}:function(t,e){return n(a[t],a[e])}),m.forEach(function(t){y[t]={data:a[t],value:u=c[t],startAngle:f,endAngle:f+=u*g+d,padAngle:h}}),y}var e=Number,n=xs,r=0,i=Ia,o=0;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(r=e,t):r},t.endAngle=function(e){return arguments.length?(i=e,t):i},t.padAngle=function(e){return arguments.length?(o=e,t):o},t};var xs={};sa.layout.stack=function(){function t(u,s){if(!(h=u.length))return u;var c=u.map(function(n,r){return e.call(t,n,r)}),f=c.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),a.call(t,e,n)]})}),l=n.call(t,f,s);c=sa.permute(c,l),f=sa.permute(f,l);var h,d,p,g,m=r.call(t,f,s),y=c[0].length;for(p=0;y>p;++p)for(i.call(t,c[0][p],g=m[p],f[0][p][1]),d=1;h>d;++d)i.call(t,c[d][p],g+=f[d-1][p][1],f[d][p][1]);return u}var e=v,n=pi,r=gi,i=di,o=li,a=hi;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:ws.get(e)||pi,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:Ms.get(e)||gi,t):r},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(a=e,t):a},t.out=function(e){return arguments.length?(i=e,t):i},t};var ws=sa.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(mi),o=t.map(yi),a=sa.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,s=0,c=[],f=[];for(e=0;r>e;++e)n=a[e],s>u?(u+=o[n],c.push(n)):(s+=o[n],f.push(n));return f.reverse().concat(c)},reverse:function(t){return sa.range(t.length).reverse()},"default":pi}),Ms=sa.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],u=0,s=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>u&&(u=r),a.push(r)}for(n=0;o>n;++n)s[n]=(u-a[n])/2;return s},wiggle:function(t){var e,n,r,i,o,a,u,s,c,f=t.length,l=t[0],h=l.length,d=[];for(d[0]=s=c=0,n=1;h>n;++n){for(e=0,i=0;f>e;++e)i+=t[e][n][1];for(e=0,o=0,u=l[n][0]-l[n-1][0];f>e;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*u);e>r;++r)a+=(t[r][n][1]-t[r][n-1][1])/u;o+=a*t[e][n][1]}d[n]=s-=i?o/i*u:0,c>s&&(c=s)}for(n=0;h>n;++n)d[n]-=c;return d},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,u=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=a}for(n=0;o>n;++n)u[n]=0;return u},zero:gi});sa.layout.histogram=function(){function t(t,o){for(var a,u,s=[],c=t.map(n,this),f=r.call(this,c,o),l=i.call(this,f,c,o),o=-1,h=c.length,d=l.length-1,p=e?1:1/h;++o0)for(o=-1;++o=f[0]&&u<=f[1]&&(a=s[sa.bisect(l,u,1,d)-1],a.y+=p,a.push(t[o]));return s}var e=!0,n=Number,r=xi,i=bi;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=Et(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return _i(t,e)}:Et(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},sa.layout.pack=function(){function t(t,o){var a=n.call(this,t,o),u=a[0],s=i[0],c=i[1],f=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(u.x=u.y=0,ai(u,function(t){t.r=+f(t.value)}),ai(u,Ei),r){var l=r*(e?1:Math.max(2*u.r/s,2*u.r/c))/2;ai(u,function(t){t.r+=l}),ai(u,Ei),ai(u,function(t){t.r-=l})}return zi(u,s/2,c/2,e?1:1/Math.max(2*u.r/s,2*u.r/c)),a}var e,n=sa.layout.hierarchy().sort(wi),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},ii(t,n)},sa.layout.tree=function(){function t(t,i){var f=a.call(this,t,i),l=f[0],h=e(l);if(ai(h,n),h.parent.m=-h.z,oi(h,r),c)oi(l,o);else{var d=l,p=l,g=l;oi(l,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var m=u(d,p)/2-d.x,y=s[0]/(p.x+u(p,d)/2+m),v=s[1]/(g.depth||1);oi(l,function(t){t.x=(t.x+m)*y,t.y=t.depth*v})}return f}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,o=e.children,a=0,u=o.length;u>a;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Wi(t);var o=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-o):t.z=o}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,o=t,a=e,s=i.parent.children[0],c=i.m,f=o.m,l=a.m,h=s.m;a=Li(a),i=Ti(i),a&&i;)s=Ti(s),o=Li(o),o.a=t,r=a.z+l-i.z-c+u(a._,i._),r>0&&(Oi(Di(a,t,n),t,r),c+=r,f+=r),l+=a.m,c+=i.m,h+=s.m,f+=o.m;a&&!Li(o)&&(o.t=a,o.m+=l-f),i&&!Ti(s)&&(s.t=i,s.m+=c-h,n=t)}return n}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var a=sa.layout.hierarchy().sort(null).value(null),u=Pi,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(c=null==(s=e)?o:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:o,t):c?s:null},ii(t,a)},sa.layout.cluster=function(){function t(t,o){var a,u=e.call(this,t,o),s=u[0],c=0;ai(s,function(t){var e=t.children;e&&e.length?(t.x=Ri(e),t.y=Bi(e)):(t.x=a?c+=n(t,a):0,t.y=0,a=t)});var f=Fi(s),l=Ii(s),h=f.x-n(f,l)/2,d=l.x+n(l,f)/2;return ai(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-h)/(d-h)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var e=sa.layout.hierarchy().sort(null).value(null),n=Pi,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},ii(t,e)},sa.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,o=t.length;++ie?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var o=n.children;if(o&&o.length){var a,u,s,c=l(n),f=[],h=o.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(h,c.dx*c.dy/n.value),f.area=0;(s=h.length)>0;)f.push(a=h[s-1]),f.area+=a.area,"squarify"!==d||(u=r(f,g))<=p?(h.pop(),p=u):(f.area-=f.pop().area,i(f,g,c,!1),g=Math.min(c.dx,c.dy),f.length=f.area=0,p=1/0);f.length&&(i(f,g,c,!0),f.length=f.area=0),o.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var o,a=l(e),u=r.slice(),s=[];for(t(u,a.dx*a.dy/e.value),s.area=0;o=u.pop();)s.push(o),s.area+=o.area,null!=o.z&&(i(s,o.z?a.dx:a.dy,a,!u.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,u=t.length;++an&&(o=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*p/r,r/(e*o*p)):1/0}function i(t,e,n,r){var i,o=-1,a=t.length,u=n.x,c=n.y,f=e?s(t.area/e):0; if(e==n.dx){for((r||f>n.dy)&&(f=n.dy);++on.dx)&&(f=n.dx);++on&&(e=1),1>n&&(t=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=sa.random.normal.apply(sa,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=sa.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},sa.scale={};var Ss={floor:v,ceil:v};sa.scale.linear=function(){return $i([0,1],[0,1],br,!1)};var ks={s:1,g:1,p:1,r:1,e:1};sa.scale.log=function(){return ro(sa.scale.linear().domain([0,1]),10,!0,[1,10])};var Es=sa.format(".0e"),Ns={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};sa.scale.pow=function(){return io(sa.scale.linear(),1,[0,1])},sa.scale.sqrt=function(){return sa.scale.pow().exponent(.5)},sa.scale.ordinal=function(){return ao([],{t:"range",a:[[]]})},sa.scale.category10=function(){return sa.scale.ordinal().range(As)},sa.scale.category20=function(){return sa.scale.ordinal().range(zs)},sa.scale.category20b=function(){return sa.scale.ordinal().range(Cs)},sa.scale.category20c=function(){return sa.scale.ordinal().range(Ps)};var As=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(bt),zs=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(bt),Cs=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(bt),Ps=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(bt);sa.scale.quantile=function(){return uo([],[])},sa.scale.quantize=function(){return so(0,1,[0,1])},sa.scale.threshold=function(){return co([.5],[0,1])},sa.scale.identity=function(){return fo([0,1])},sa.svg={},sa.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),f=a.apply(this,arguments)-qa,l=u.apply(this,arguments)-qa,h=Math.abs(l-f),d=f>l?0:1;if(t>c&&(p=c,c=t,t=p),h>=ja)return e(c,d)+(t?e(t,1-d):"")+"Z";var p,g,m,y,v,b,_,x,w,M,S,k,E=0,N=0,A=[];if((y=(+s.apply(this,arguments)||0)/2)&&(m=o===Ts?Math.sqrt(t*t+c*c):+o.apply(this,arguments),d||(N*=-1),c&&(N=et(m/c*Math.sin(y))),t&&(E=et(m/t*Math.sin(y)))),c){v=c*Math.cos(f+N),b=c*Math.sin(f+N),_=c*Math.cos(l-N),x=c*Math.sin(l-N);var z=Math.abs(l-f-2*N)<=Fa?0:1;if(N&&vo(v,b,_,x)===d^z){var C=(f+l)/2;v=c*Math.cos(C),b=c*Math.sin(C),_=x=null}}else v=b=0;if(t){w=t*Math.cos(l-E),M=t*Math.sin(l-E),S=t*Math.cos(f+E),k=t*Math.sin(f+E);var P=Math.abs(f-l+2*E)<=Fa?0:1;if(E&&vo(w,M,S,k)===1-d^P){var T=(f+l)/2;w=t*Math.cos(T),M=t*Math.sin(T),S=k=null}}else w=M=0;if(h>Ba&&(p=Math.min(Math.abs(c-t)/2,+i.apply(this,arguments)))>.001){g=c>t^d?0:1;var L=p,O=p;if(Fa>h){var W=null==S?[w,M]:null==_?[v,b]:On([v,b],[S,k],[_,x],[w,M]),D=v-W[0],B=b-W[1],R=_-W[0],F=x-W[1],I=1/Math.sin(Math.acos((D*R+B*F)/(Math.sqrt(D*D+B*B)*Math.sqrt(R*R+F*F)))/2),j=Math.sqrt(W[0]*W[0]+W[1]*W[1]);O=Math.min(p,(t-j)/(I-1)),L=Math.min(p,(c-j)/(I+1))}if(null!=_){var q=bo(null==S?[w,M]:[S,k],[v,b],c,L,d),U=bo([_,x],[w,M],c,L,d);p===L?A.push("M",q[0],"A",L,",",L," 0 0,",g," ",q[1],"A",c,",",c," 0 ",1-d^vo(q[1][0],q[1][1],U[1][0],U[1][1]),",",d," ",U[1],"A",L,",",L," 0 0,",g," ",U[0]):A.push("M",q[0],"A",L,",",L," 0 1,",g," ",U[0])}else A.push("M",v,",",b);if(null!=S){var H=bo([v,b],[S,k],t,-O,d),V=bo([w,M],null==_?[v,b]:[_,x],t,-O,d);p===O?A.push("L",V[0],"A",O,",",O," 0 0,",g," ",V[1],"A",t,",",t," 0 ",d^vo(V[1][0],V[1][1],H[1][0],H[1][1]),",",1-d," ",H[1],"A",O,",",O," 0 0,",g," ",H[0]):A.push("L",V[0],"A",O,",",O," 0 0,",g," ",H[0])}else A.push("L",w,",",M)}else A.push("M",v,",",b),null!=_&&A.push("A",c,",",c," 0 ",z,",",d," ",_,",",x),A.push("L",w,",",M),null!=S&&A.push("A",t,",",t," 0 ",P,",",1-d," ",S,",",k);return A.push("Z"),A.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=ho,r=po,i=lo,o=Ts,a=go,u=mo,s=yo;return t.innerRadius=function(e){return arguments.length?(n=Et(e),t):n},t.outerRadius=function(e){return arguments.length?(r=Et(e),t):r},t.cornerRadius=function(e){return arguments.length?(i=Et(e),t):i},t.padRadius=function(e){return arguments.length?(o=e==Ts?Ts:Et(e),t):o},t.startAngle=function(e){return arguments.length?(a=Et(e),t):a},t.endAngle=function(e){return arguments.length?(u=Et(e),t):u},t.padAngle=function(e){return arguments.length?(s=Et(e),t):s},t.centroid=function(){var t=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,e=(+a.apply(this,arguments)+ +u.apply(this,arguments))/2-qa;return[Math.cos(e)*t,Math.sin(e)*t]},t};var Ts="auto";sa.svg.line=function(){return _o(v)};var Ls=sa.map({linear:xo,"linear-closed":wo,step:Mo,"step-before":So,"step-after":ko,basis:Po,"basis-open":To,"basis-closed":Lo,bundle:Oo,cardinal:Ao,"cardinal-open":Eo,"cardinal-closed":No,monotone:Io});Ls.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Os=[0,2/3,1/3,0],Ws=[0,1/3,2/3,0],Ds=[0,1/6,2/3,1/6];sa.svg.line.radial=function(){var t=_o(jo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},So.reverse=ko,ko.reverse=So,sa.svg.area=function(){return qo(v)},sa.svg.area.radial=function(){var t=qo(jo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},sa.svg.chord=function(){function t(t,u){var s=e(this,o,t,u),c=e(this,a,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),o=u.call(t,i,r),a=s.call(t,i,r)-qa,f=c.call(t,i,r)-qa;return{r:o,a0:a,a1:f,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(f),o*Math.sin(f)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Fa)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var o=bn,a=_n,u=Uo,s=go,c=mo;return t.radius=function(e){return arguments.length?(u=Et(e),t):u},t.source=function(e){return arguments.length?(o=Et(e),t):o},t.target=function(e){return arguments.length?(a=Et(e),t):a},t.startAngle=function(e){return arguments.length?(s=Et(e),t):s},t.endAngle=function(e){return arguments.length?(c=Et(e),t):c},t},sa.svg.diagonal=function(){function t(t,i){var o=e.call(this,t,i),a=n.call(this,t,i),u=(o.y+a.y)/2,s=[o,{x:o.x,y:u},{x:a.x,y:u},a];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=bn,n=_n,r=Ho;return t.source=function(n){return arguments.length?(e=Et(n),t):e},t.target=function(e){return arguments.length?(n=Et(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},sa.svg.diagonal.radial=function(){var t=sa.svg.diagonal(),e=Ho,n=t.projection;return t.projection=function(t){return arguments.length?n(Vo(e=t)):e},t},sa.svg.symbol=function(){function t(t,r){return(Bs.get(e.call(this,t,r))||Zo)(n.call(this,t,r))}var e=Yo,n=Go;return t.type=function(n){return arguments.length?(e=Et(n),t):e},t.size=function(e){return arguments.length?(n=Et(e),t):n},t};var Bs=sa.map({circle:Zo,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Fs)),n=e*Fs;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Rs),n=e*Rs/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Rs),n=e*Rs/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});sa.svg.symbolTypes=Bs.keys();var Rs=Math.sqrt(3),Fs=Math.tan(30*Ua);za.transition=function(t){for(var e,n,r=Is||++Hs,i=Qo(t),o=[],a=js||{time:Date.now(),ease:Er,delay:0,duration:250},u=-1,s=this.length;++uo;o++){i.push(e=[]);for(var n=this[o],u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,o)&&e.push(r)}return Xo(i,this.namespace,this.id)},Us.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):U(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},Us.attr=function(t,e){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(u);return n!==t&&(e=a(n,t),function(t){this.setAttribute(u,e(t))})})}function o(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(u.space,u.local);return n!==t&&(e=a(n,t),function(t){this.setAttributeNS(u.space,u.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var a="transform"==t?Yr:br,u=sa.ns.qualify(t);return Jo(this,"attr."+t,e,u.local?o:i)},Us.attrTween=function(t,e){function n(t,n){var r=e.call(this,t,n,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,n){var r=e.call(this,t,n,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=sa.ns.qualify(t);return this.tween("attr."+t,i.local?r:n)},Us.style=function(t,n,r){function i(){this.style.removeProperty(t)}function o(n){return null==n?i:(n+="",function(){var i,o=e(this).getComputedStyle(this,null).getPropertyValue(t);return o!==n&&(i=br(o,n),function(e){this.style.setProperty(t,i(e),r)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(n="");for(r in t)this.style(r,t[r],n);return this}r=""}return Jo(this,"style."+t,n,o)},Us.styleTween=function(t,n,r){function i(i,o){var a=n.call(this,i,o,e(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),r)}}return arguments.length<3&&(r=""),this.tween("style."+t,i)},Us.text=function(t){return Jo(this,"text",t,Ko)},Us.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Us.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=sa.ease.apply(sa,arguments)),U(this,function(r){r[n][e].ease=t}))},Us.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:U(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},Us.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:U(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},Us.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=js,o=Is;try{Is=n,U(this,function(e,i,o){js=e[r][n],t.call(e,e.__data__,i,o)})}finally{js=i,Is=o}}else U(this,function(i){var o=i[r][n];(o.event||(o.event=sa.dispatch("start","end","interrupt"))).on(t,e)});return this},Us.transition=function(){for(var t,e,n,r,i=this.id,o=++Hs,a=this.namespace,u=[],s=0,c=this.length;c>s;s++){u.push(t=[]);for(var e=this[s],f=0,l=e.length;l>f;f++)(n=e[f])&&(r=n[a][i],ta(n,f,a,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),t.push(n)}return Xo(u,a,o)},sa.svg.axis=function(){function t(t){t.each(function(){var t,c=sa.select(this),f=this.__chart__||n,l=this.__chart__=n.copy(),h=null==s?l.ticks?l.ticks.apply(l,u):l.domain():s,d=null==e?l.tickFormat?l.tickFormat.apply(l,u):v:e,p=c.selectAll(".tick").data(h,l),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ba),m=sa.transition(p.exit()).style("opacity",Ba).remove(),y=sa.transition(p.order()).style("opacity",1),b=Math.max(i,0)+a,_=Hi(l),x=c.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),sa.transition(x));g.append("line"),g.append("text");var M,S,k,E,N=g.select("line"),A=y.select("line"),z=p.select("text").text(d),C=g.select("text"),P=y.select("text"),T="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=ea,M="x",k="y",S="x2",E="y2",z.attr("dy",0>T?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+_[0]+","+T*o+"V0H"+_[1]+"V"+T*o)):(t=na,M="y",k="x",S="y2",E="x2",z.attr("dy",".32em").style("text-anchor",0>T?"end":"start"),w.attr("d","M"+T*o+","+_[0]+"H0V"+_[1]+"H"+T*o)),N.attr(E,T*i),C.attr(k,T*b),A.attr(S,0).attr(E,T*i),P.attr(M,0).attr(k,T*b),l.rangeBand){var L=l,O=L.rangeBand()/2;f=l=function(t){return L(t)+O}}else f.rangeBand?f=l:m.call(t,l,f);g.call(t,f,l),y.call(t,l,l)})}var e,n=sa.scale.linear(),r=Vs,i=6,o=6,a=3,u=[10],s=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in Gs?e+"":Vs,t):r},t.ticks=function(){return arguments.length?(u=fa(arguments),t):u},t.tickValues=function(e){return arguments.length?(s=e,t):s},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,o=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(a=+e,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var Vs="bottom",Gs={top:1,right:1,bottom:1,left:1};sa.svg.brush=function(){function t(e){e.each(function(){var e=sa.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),a=e.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=e.selectAll(".resize").data(g,v);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Ys[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var s,l=sa.transition(e),h=sa.transition(a);c&&(s=Hi(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),r(l)),f&&(s=Hi(f),h.attr("y",s[0]).attr("height",s[1]-s[0]),i(l)),n(l)})}function n(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+l[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function r(t){t.select(".extent").attr("x",l[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function i(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==sa.event.keyCode&&(z||(b=null,P[0]-=l[1],P[1]-=h[1],z=2),S())}function g(){32==sa.event.keyCode&&2==z&&(P[0]+=l[1],P[1]+=h[1],z=0,S())}function m(){var t=sa.mouse(x),e=!1;_&&(t[0]+=_[0],t[1]+=_[1]),z||(sa.event.altKey?(b||(b=[(l[0]+l[1])/2,(h[0]+h[1])/2]),P[0]=l[+(t[0]f?(i=r,r=f):i=f),g[0]!=r||g[1]!=i?(n?u=null:a=null,g[0]=r,g[1]=i,!0):void 0}function v(){m(),k.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),sa.select("body").style("cursor",null),T.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(),M({type:"brushend"})}var b,_,x=this,w=sa.select(sa.event.target),M=s.of(x,arguments),k=sa.select(x),E=w.datum(),N=!/^(n|s)$/.test(E)&&c,A=!/^(e|w)$/.test(E)&&f,z=w.classed("extent"),C=$(x),P=sa.mouse(x),T=sa.select(e(x)).on("keydown.brush",o).on("keyup.brush",g);if(sa.event.changedTouches?T.on("touchmove.brush",m).on("touchend.brush",v):T.on("mousemove.brush",m).on("mouseup.brush",v),k.interrupt().selectAll("*").interrupt(),z)P[0]=l[0]-P[0],P[1]=h[0]-P[1];else if(E){var L=+/w$/.test(E),O=+/^n/.test(E);_=[l[1-L]-P[0],h[1-O]-P[1]],P[0]=l[L],P[1]=h[O]}else sa.event.altKey&&(b=P.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),sa.select("body").style("cursor",w.style("cursor")),M({type:"brushstart"}),m()}var a,u,s=E(t,"brushstart","brush","brushend"),c=null,f=null,l=[0,0],h=[0,0],d=!0,p=!0,g=Zs[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),e={x:l,y:h,i:a,j:u},n=this.__chart__||e;this.__chart__=e,Is?sa.select(this).transition().each("start.brush",function(){a=n.i,u=n.j,l=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=_r(l,e.x),r=_r(h,e.y);return a=u=null,function(i){l=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=e.i,u=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(c=e,g=Zs[!c<<1|!f],t):c},t.y=function(e){return arguments.length?(f=e,g=Zs[!c<<1|!f],t):f},t.clamp=function(e){return arguments.length?(c&&f?(d=!!e[0],p=!!e[1]):c?d=!!e:f&&(p=!!e),t):c&&f?[d,p]:c?d:f?p:null},t.extent=function(e){var n,r,i,o,s;return arguments.length?(c&&(n=e[0],r=e[1],f&&(n=n[0],r=r[0]),a=[n,r],c.invert&&(n=c(n),r=c(r)),n>r&&(s=n,n=r,r=s),(n!=l[0]||r!=l[1])&&(l=[n,r])),f&&(i=e[0],o=e[1],c&&(i=i[1],o=o[1]),u=[i,o],f.invert&&(i=f(i),o=f(o)),i>o&&(s=i,i=o,o=s),(i!=h[0]||o!=h[1])&&(h=[i,o])),t):(c&&(a?(n=a[0],r=a[1]):(n=l[0],r=l[1],c.invert&&(n=c.invert(n),r=c.invert(r)),n>r&&(s=n,n=r,r=s))),f&&(u?(i=u[0],o=u[1]):(i=h[0],o=h[1],f.invert&&(i=f.invert(i),o=f.invert(o)),i>o&&(s=i,i=o,o=s))),c&&f?[[n,i],[r,o]]:c?[n,r]:f&&[i,o])},t.clear=function(){return t.empty()||(l=[0,0],h=[0,0],a=u=null),t},t.empty=function(){return!!c&&l[0]==l[1]||!!f&&h[0]==h[1]},sa.rebind(t,s,"on")};var Ys={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],$s=pu.format=_u.timeFormat,Xs=$s.utc,Js=Xs("%Y-%m-%dT%H:%M:%S.%LZ");$s.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?ra:Js,ra.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},ra.toString=Js.toString,pu.second=It(function(t){return new gu(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),pu.seconds=pu.second.range,pu.seconds.utc=pu.second.utc.range,pu.minute=It(function(t){return new gu(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),pu.minutes=pu.minute.range,pu.minutes.utc=pu.minute.utc.range,pu.hour=It(function(t){var e=t.getTimezoneOffset()/60;return new gu(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),pu.hours=pu.hour.range,pu.hours.utc=pu.hour.utc.range,pu.month=It(function(t){return t=pu.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),pu.months=pu.month.range,pu.months.utc=pu.month.utc.range;var Ks=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Qs=[[pu.second,1],[pu.second,5],[pu.second,15],[pu.second,30],[pu.minute,1],[pu.minute,5],[pu.minute,15],[pu.minute,30],[pu.hour,1],[pu.hour,3],[pu.hour,6],[pu.hour,12],[pu.day,1],[pu.day,2],[pu.week,1],[pu.month,1],[pu.month,3],[pu.year,1]],tc=$s.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",ze]]),ec={range:function(t,e,n){return sa.range(Math.ceil(t/n)*n,+e,n).map(oa)},floor:v,ceil:v};Qs.year=pu.year,pu.scale=function(){return ia(sa.scale.linear(),Qs,tc)};var nc=Qs.map(function(t){return[t[0].utc,t[1]]}),rc=Xs.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",ze]]);nc.year=pu.year.utc,pu.scale.utc=function(){return ia(sa.scale.linear(),nc,rc)},sa.text=Nt(function(t){return t.responseText}),sa.json=function(t,e){return At(t,"application/json",aa,e)},sa.html=function(t,e){return At(t,"text/html",ua,e)},sa.xml=Nt(function(t){return t.responseXML}),"function"==typeof define&&define.amd?(this.d3=sa,define("d3",sa)):"object"==typeof module&&module.exports?module.exports=sa:this.d3=sa}(),function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function e(t){return"function"==typeof t}function n(t){return"object"==typeof t&&null!==t}function r(t){j=t}function i(t){V=t}function o(){return function(){process.nextTick(f)}}function a(){return function(){I(f)}}function u(){var t=0,e=new Z(f),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function s(){var t=new MessageChannel;return t.port1.onmessage=f,function(){t.port2.postMessage(0)}}function c(){return function(){setTimeout(f,1)}}function f(){for(var t=0;H>t;t+=2){var e=J[t],n=J[t+1];e(n),J[t]=void 0,J[t+1]=void 0}H=0}function l(){try{var t=require,e=t("vertx");return I=e.runOnLoop||e.runOnContext,a()}catch(n){return c()}}function h(){}function d(){return new TypeError("You cannot resolve a promise with itself")}function p(){return new TypeError("A promises callback cannot return that same promise.")}function g(t){try{return t.then}catch(e){return et.error=e,et}}function m(t,e,n,r){try{t.call(e,n,r)}catch(i){return i}}function y(t,e,n){V(function(t){var r=!1,i=m(n,e,function(n){r||(r=!0,e!==n?_(t,n):w(t,n))},function(e){r||(r=!0,M(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,M(t,i))},t)}function v(t,e){e._state===Q?w(t,e._result):e._state===tt?M(t,e._result):S(e,void 0,function(e){_(t,e)},function(e){M(t,e)})}function b(t,n){if(n.constructor===t.constructor)v(t,n);else{var r=g(n);r===et?M(t,et.error):void 0===r?w(t,n):e(r)?y(t,n,r):w(t,n)}}function _(e,n){e===n?M(e,d()):t(n)?b(e,n):w(e,n)}function x(t){t._onerror&&t._onerror(t._result),k(t)}function w(t,e){t._state===K&&(t._result=e,t._state=Q,0!==t._subscribers.length&&V(k,t))}function M(t,e){t._state===K&&(t._state=tt,t._result=e,V(x,t))}function S(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+Q]=n,i[o+tt]=r,0===o&&t._state&&V(k,t)}function k(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,i,o=t._result,a=0;aa;a++)S(r.resolve(t[a]),void 0,e,n);return i}function L(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(h);return _(n,t),n}function O(t){var e=this,n=new e(h);return M(n,t),n}function W(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function D(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(t){this._id=st++,this._state=void 0,this._result=void 0,this._subscribers=[],h!==t&&(e(t)||W(),this instanceof B||D(),z(this,t))}function R(){var t;if("undefined"!=typeof global)t=global;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=ct)}var F;F=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var I,j,q,U=F,H=0,V=({}.toString,function(t,e){J[H]=t,J[H+1]=e,H+=2,2===H&&(j?j(f):q())}),G="undefined"!=typeof window?window:void 0,Y=G||{},Z=Y.MutationObserver||Y.WebKitMutationObserver,$="undefined"!=typeof process&&"[object process]"==={}.toString.call(process),X="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,J=new Array(1e3);q=$?o():Z?u():X?s():void 0===G&&"function"==typeof require?l():c();var K=void 0,Q=1,tt=2,et=new E,nt=new E;C.prototype._validateInput=function(t){return U(t)},C.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},C.prototype._init=function(){this._result=new Array(this.length)};var rt=C;C.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,i=0;n._state===K&&e>i;i++)t._eachEntry(r[i],i)},C.prototype._eachEntry=function(t,e){var r=this,i=r._instanceConstructor;n(t)?t.constructor===i&&t._state!==K?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(i.resolve(t),e):(r._remaining--,r._result[e]=t)},C.prototype._settledAt=function(t,e,n){var r=this,i=r.promise;i._state===K&&(r._remaining--,t===tt?M(i,n):r._result[e]=n),0===r._remaining&&w(i,r._result)},C.prototype._willSettleAt=function(t,e){var n=this;S(t,void 0,function(t){n._settledAt(Q,e,t)},function(t){n._settledAt(tt,e,t)})};var it=P,ot=T,at=L,ut=O,st=0,ct=B;B.all=it,B.race=ot,B.resolve=at,B.reject=ut,B._setScheduler=r,B._setAsap=i,B._asap=V,B.prototype={constructor:B,then:function(t,e){var n=this,r=n._state;if(r===Q&&!t||r===tt&&!e)return this;var i=new this.constructor(h),o=n._result;if(r){var a=arguments[r-1];V(function(){A(r,i,a,o)})}else S(n,i,t,e);return i},"catch":function(t){return this.then(null,t)}};var ft=R,lt={Promise:ct,polyfill:ft};"function"==typeof define&&define.amd?define("es6-promise",[],function(){return lt}):"undefined"!=typeof module&&module.exports?module.exports=lt:"undefined"!=typeof this&&(this.ES6Promise=lt),ft()}.call(this),function(t,e){"function"==typeof define&&define.amd?define("src/common/Class",[],e):t.common_Class=e()}(this,function(){function t(){}return t.prototype.constructor=t,t.prototype._class="common_Class",t.prototype["class"]=function(t){return arguments.length?(this._class=t,this):this._class},t.prototype.classID=function(){return this._class.split(" ").pop()},t.prototype["implements"]=function(t){for(var e in t)void 0===this[e]&&t.hasOwnProperty(e)&&(this[e]=t[e])},t.prototype.mixin=function(t){this["implements"](t.prototype);for(var e in t.prototype)"_class"===e&&t.prototype.hasOwnProperty(e)&&(this[e]+=" "+t.prototype[e])},t}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Platform",["d3","es6-promise"],e):(t.require=t.require||function(e,n){"function"==typeof e&&(n=e,e=[]);var r=e.map(function(e){var n=0===e.indexOf("src/")?"src/".length:0===e.indexOf("hpcc-viz/")?"hpcc-viz/".length:0===e.indexOf("../")?"../".length:0,r=e.substring(n).split("/").join("_");return t[r]});n.apply(null,r)},t.common_Platform=e(t.d3))}(this,function(t){function e(){}var n="1.14.0-rc5";return e.prototype.version=function(){return n},e.prototype.ieVersion=function(){var t,e=navigator.userAgent,n=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],parseFloat(t[1])):/msie/i.test(n[1])?parseFloat(n[2]):null}(),e.prototype.isIE=null!==e.prototype.ieVersion,e.prototype.svgMarkerGlitch=e.prototype.isIE&&e.prototype.ieVersion<=12,e.prototype.MutationObserver=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver||function(t){this.callback=t,this.listeners=[];var e=function(t,e,n){this.callback=t,this.domNode=e,this.type=n};e.prototype={handleEvent:function(t){var e={type:this.type,target:this.domNode,addedNodes:[],removedNodes:[],previousSibling:t.target.previousSibling,nextSibling:t.target.nextSibling,attributeName:null,attributeNamespace:null,oldValue:null};this.callback([e])}},this.observe=function(t,n){var r=null;n.attributes&&(r=new e(this.callback,t,"attributes"),this.listeners.push(r),t.addEventListener("DOMAttrModified",r,!0)),n.characterData&&(r=new e(this.callback,t,"characterData"),this.listeners.push(r),t.addEventListener("DOMCharacterDataModified",r,!0)),n.childList&&(r=new e(this.callback,t,"childList"),this.listeners.push(r), t.addEventListener("DOMNodeInserted",r,!0),t.addEventListener("DOMNodeRemoved",r,!0))},this.disconnect=function(){this.listeners.forEach(function(t){switch(t.type){case"attributes":t.domNode.removeEventListener("DOMAttrModified",t,!0);break;case"characterData":t.domNode.removeEventListener("DOMCharacterDataModified",t,!0);break;case"childList":t.domNode.removeEventListener("DOMNodeRemoved",t,!0),t.domNode.removeEventListener("DOMNodeInserted",t,!0)}}),this.listeners=[]}},window.MutationObserver||(window.MutationObserver=e.prototype.MutationObserver),e.prototype._scrollBarWidth=null,e.prototype.getScrollbarWidth=function(){if(null===e.prototype._scrollBarWidth){var t=document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var n=t.offsetWidth;t.style.overflow="scroll";var r=document.createElement("div");r.style.width="100%",t.appendChild(r);var i=r.offsetWidth;t.parentNode.removeChild(t),e.prototype._scrollBarWidth=n-i}return e.prototype._scrollBarWidth},e.prototype.debounce=function(t,e,n){return function(){function r(){n||t.apply(i,o),i.timeout=null}var i=this||{},o=arguments;i.timeout?clearTimeout(i.timeout):n&&t.apply(i,o),i.timeout=setTimeout(r,e||100)}},e}),function(t,e){"function"==typeof define&&define.amd?define("src/common/PropertyExt",["d3"],e):t.common_PropertyExt=e(t.d3)}(this,function(t){function e(t){return 0===t.indexOf(a)}function n(t,e){return t[u+e]}function r(t,e,n,r,i,o){switch(o=o||{},this.id=t,this.type=n,this.origDefaultValue=e,this.defaultValue=o.optional&&null===e?void 0:e,this.description=r,this.set=i,this.ext=o,n){case"set":this.checkedAssign=function(e){return(!i||i.indexOf(e)<0)&&console.error("Invalid value for '"+t+"': "+e+" expected "+n),e};break;case"html-color":this.checkedAssign=function(e){if(window.__hpcc_debug&&e&&"red"!==e){var r="red",i=document.createElement("div");i.style.color=r,i.style.color=e,(i.style.color===r||""===i.style.color)&&console.error("Invalid value for '"+t+"': "+e+" expected "+n)}return e};break;case"boolean":this.checkedAssign=function(t){return"string"==typeof t&&["false","off","0"].indexOf(t.toLowerCase())>=0?!1:Boolean(t)};break;case"number":this.checkedAssign=function(t){return Number(t)};break;case"string":this.checkedAssign=function(t){return String(t)};break;case"array":this.checkedAssign=function(e){return e instanceof Array||console.error("Invalid value for '"+t+"': "+e+" expected "+n),e};break;case"object":this.checkedAssign=function(e){return e instanceof Object||console.error("Invalid value for '"+t+"': "+e+" expected "+n),e};break;case"widget":this.checkedAssign=function(e){return(!e._class||e._class.indexOf("common_PropertyExt")<0)&&console.error("Invalid value for '"+t+"': "+e+" expected "+n),e};break;case"widgetArray":this.checkedAssign=function(e){return e.some(function(t){return!t._class||t._class.indexOf("common_Widget")<0})&&console.error("Invalid value for '"+t+"': "+e+" expected "+n),e};break;case"propertyArray":this.checkedAssign=function(e){return e.some(function(t){return!t.publishedProperties})&&console.log("Invalid value for '"+t+"': "+e+" expected "+n),e};break;case"propertyArray":this.checkedAssign=function(e){return e.some(function(t){return!t.publishedProperties})&&console.log("Invalid value for '"+t+"': "+e+" expected "+n),e};break;default:this.checkedAssign=function(e){return window.__hpcc_debug&&console.error("Unchecked property type for '"+t+"': "+e+" expected "+n),e}}}function i(t,e,n,r,i){this.id=t,this.type="proxy",this.proxy=e,this.method=n,this.defaultValue=r,this.ext=i||{}}function o(){this._id="_pe"+ ++f,this._watchArr=[],this.publishedProperties(!0).forEach(function(t){switch(t.type){case"array":case"widgetArray":case"propertyArray":this[s+t.id]=[]}},this)}var a="__meta_",u="__private_",s="__prop_",c="__default_",f=0;return o.prototype._class="common_PropertyExt",o.prototype.publishedProperties=function(t){var r=[];for(var i in this)!e(i)||!t&&n(this,i)||r.push(this[i]);return r},o.prototype.publishedProperty=function(t){return this[a+t]},o.prototype.publishedProperty=function(t){return this[a+t]},o.prototype.publishReset=function(t,n){t=(t||[]).map(function(t){return a+t}),n=(n||[]).map(function(t){return a+t});for(var r in this)if(e(r)){var i=!t.length||t.length&&t.indexOf(r)>=0,o=n.indexOf(r)>=0;i&&!o&&(this[u+r]=!0)}},o.prototype.publish=function(t,e,n,i,o,u){if(void 0!==this[a+t]&&!u.override)throw t+" is already published.";var f=this[a+t]=new r(t,e,n,i,o,u);this[t]=function(e){return arguments.length?(""===e&&f.ext.optional?e=null:null!==e&&(e=f.checkedAssign(e)),this.broadcast(t,e,this[s+t]),null===e?delete this[s+t]:this[s+t]=e,this):this[t+"_disabled"]()?this[t+"_default"]():void 0!==this[s+t]?this[s+t]:this[t+"_default"]()},this[t+"_disabled"]=function(){return u&&u.disable?u.disable(this):!1},this[t+"_modified"]=function(){return void 0!==this[s+t]&&this[s+t]!==this[t+"_default"]()},this[t+"_exists"]=function(){return void 0!==this[s+t]||void 0!==this[t+"_default"]()},this[t+"_default"]=function(e){return arguments.length?(""===e&&(e=null),null===e?delete this[c+t]:this[c+t]=e,this):void 0!==this[c+t]?this[c+t]:f.defaultValue},this[t+"_reset"]=function(){switch(n){case"widget":this[s+t]&&this[s+t].target(null);break;case"widgetArray":this[s+t]&&this[s+t].forEach(function(t){t.target(null)})}switch(n){case"array":case"widgetArray":case"propertyArray":this[s+f.id]=[];break;default:delete this[s+t]}}},o.prototype.publishWidget=function(t,e,n){for(var r in e.prototype)if(0===r.indexOf("__meta")){var i=e.prototype[r];this.publishProxy(t+s+i.id,n,i.method||i.id)}},o.prototype.publishProxy=function(t,e,n,r){if(n=n||t,void 0!==this[a+t])throw t+" is already published.";this[a+t]=new i(t,e,n,r),this[t]=function(i){return arguments.length?(r&&i===r?this[e][n+"_reset"]():this[e][n](i),this):!r||this[t+"_modified"]()?this[e][n]():r},this[t+"_disabled"]=function(){return this[e][n+"_disabled"]()},this[t+"_modified"]=function(){return this[e][n+"_modified"]()&&(!r||this[e][n]()!==r)},this[t+"_exists"]=function(){return this[e][n+"_exists"]()},this[t+"_default"]=function(t){return arguments.length?(this[e][n+"_default"](t),this):this[e][n+"_default"]()},this[t+"_reset"]=function(){this[e][n+"_reset"]()}},o.prototype._monitorProperty=function(t,e){var n=this,r=this._watchArr.push({propertyID:t,callback:e})-1;return{remove:function(){delete n._watchArr[r]}}},o.prototype.monitor=function(t){var e=this;return 0===this._watchArr.length&&this.publishedProperties().forEach(function(t){switch(t.type){case"proxy":this[t.proxy]&&this[t.proxy]._monitorProperty(t.id,function(t,n,r){e.broadcast(t,n,r)})}},this),this._monitorProperty(void 0,t)},o.prototype.broadcast=function(t,e,n,r){r=r||this,this._watchArr.length&&e!==n&&this._watchArr.forEach(function(i){void 0!==i.propertyID&&i.propertyID!==t||!i.callback||setTimeout(function(){i.callback(t,e,n,r)},0)})},o.prototype.applyTheme=function(t){if(t){var e=this._class.split(" ");for(var n in e)if(t[e[n]])for(var r in t[e[n]])if("overrideTags"===r&&t[e[n]][r]instanceof Object)for(var i in t[e[n]][r])this.publishedProperty(r).ext&&(this.publishedProperty(r).ext.tags=t[e[n]][r][i]);else this.publishedProperty(r)&&(this.publishedProperty(r).defaultValue=t[e[n]][r])}},o.prototype.copyPropsTo=function(t){this.publishedProperties(!1).forEach(function(e){this[e.id+"_exists"]()?t[e.id](this[e.id]()):t[e.id+"_reset"]()},this)},o}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Database",["d3","./Class","./PropertyExt"],e):t.common_Database=e(t.d3,t.common_Class,t.common_PropertyExt)}(this,function(t,e,n){function r(t,r){e.call(this),n.call(this),this._id=t||this._id,r=r||{},this.label(r.label||""),this.type(r.type||""),this.mask(r.mask||null),this.format(r.format||null)}function i(){e.call(this),n.call(this),this.clear()}function o(t,e){return t instanceof Array||(t=[t]),t.filter(function(t){return""!==t}).every(e)}function a(t){return"boolean"==typeof t}function u(t){return"number"==typeof t||!isNaN(t)}function s(t){return"string"==typeof t}function c(e,n){for(var r=0;r=0}r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.mixin(n),r.prototype._class+=" common_Database.Field",r.prototype.id=function(){return this._id},r.prototype.publish("label","","string","Label"),r.prototype.publish("type","","set","Type",["","string","number","boolean","time"]);var p=r.prototype.type;r.prototype.type=function(t){var e=p.apply(this,arguments);if(arguments.length)switch(this.type()){case"number":this._typeTransformer=function(t){return Number(t)};break;case"string":this._typeTransformer=function(t){return String(t)};break;case"boolean":this._typeTransformer=function(t){return"string"==typeof t&&["false","off","0"].indexOf(t.toLowerCase())>=0?!1:Boolean(t)};break;case"time":case"date":this._typeTransformer=function(t){return this._maskTransformer.parse(t)};break;default:this._typeTransformer=function(t){return t}}return e},r.prototype.publish("mask","","string","Time Mask");var g=r.prototype.mask;r.prototype.mask=function(t){var e=g.apply(this,arguments);return arguments.length&&(this._maskTransformer=this.formatter(t)),e},r.prototype.publish("format","","string","Format");var m=r.prototype.format;r.prototype.format=function(t){var e=m.apply(this,arguments);return arguments.length&&(this._formatTransformer=this.formatter(t)),e},r.prototype.parse=function(t){if(!t)return t;try{return this._typeTransformer(t)}catch(e){return console.log("Unable to parse: "+t),null}},r.prototype.transform=function(t){if(!t)return t;try{return this._formatTransformer(this._typeTransformer(t))}catch(e){return console.log("Unable to transform: "+t),null}},r.prototype.clone=function(){return new r(this._id,{label:this.label(),type:this.type(),mask:this.mask(),format:this.format()})},r.prototype.formatter=function(e){var n;if(!e)return n=function(t){return t},n.parse=function(t){return t},n;switch(this.type()){case"time":case"date":return t.time.format(e)}return n=t.format(e),n.parse=function(t){return t},n},i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.prototype.mixin(n),i.prototype._class+=" common_Database.Grid",i.prototype.publish("fields",[],"propertyArray","Fields"),i.prototype.clear=function(){return this.fields([]),this._data=[],this},i.prototype.legacyColumns=function(t){return arguments.length?(this.row(0,t),this):this.row(0)},i.prototype.legacyData=function(t,e){return i.prototype.data.apply(this,arguments)},i.prototype.field=function(t){return this.fields()[t]};var y=i.prototype.fields;i.prototype.fields=function(t,e){return arguments.length?y.call(this,e?t.map(function(t){return t.clone()}):t):y.apply(this,arguments)},i.prototype.fieldByLabel=function(t,e){return this.fields().filter(function(n,r){return n.idx=r,e?n.label().toLowerCase()===t.toLowerCase():n.label()===t})[0]},i.prototype.data=function(t,e){return arguments.length?(this._data=e?t.map(function(t){return t.map(function(t){return t})}):t,this):this._data},i.prototype.parsedData=function(){var t=this;return this._data.map(function(e){return e.map(function(e,n){return t.fields()[n].parse(e)})})},i.prototype.formattedData=function(){var t=this;return this._data.map(function(e){return e.map(function(e,n){return t.fields()[n].transform(e)})})},i.prototype.row=function(t,e){return arguments.length<2?0===t?this.fields().map(function(t){return t.label()}):this._data[t-1]:(0===t?this.fields(e.map(function(t){return(new r).label(t)})):this._data[t-1]=e,this)},i.prototype.rows=function(t){return arguments.length?(this.row(0,t[0]),this._data=t.filter(function(t,e){return e>0}),this):[this.row(0)].concat(this._data)},i.prototype.column=function(t,e){return arguments.length<2?[this.fields()[t].label()].concat(this._data.map(function(e,n){return e[t]})):(e.forEach(function(n,i){0===i?this.fields()[t]=(new r).label(e[0]):this._data[i-1][t]=n},this),this)},i.prototype.columnData=function(t,e){return arguments.length<2?this._data.map(function(e,n){return e[t]}):(e.forEach(function(e,n){this._data[n][t]=e},this),this)},i.prototype.columns=function(t){return arguments.length?(t.forEach(function(e,n){this.column(n,t[n])},this),this):this.fields().map(function(t,e){return this.column(e)},this)},i.prototype.cell=function(t,e,n){return arguments.length<3?this.row(t)[e]:(0===t?this.fields()[e]=(new r).label(n):this._data[t][e]=n,this)},i.prototype.grid=function(t){return i.prototype.rows.apply(this,arguments)},i.prototype.hipieMapSortArray=function(t){return t.map(function(t){var e=!1;0===t.indexOf("-")&&(t=t.substring(1),e=!0);var n=this.fieldByLabel(t,!0);return n||console.log("Grid.prototype.hipieMapSortArray: Invalid sort array - "+t),{idx:n?n.idx:-1,reverse:e}},this).filter(function(t){return t.idx>=0})},i.prototype.hipieMappings=function(e){function n(t,e,r,i){var o=r.map(function(t){return t});o[e]=t.key,t.values instanceof Array?t.values.forEach(function(t){n(t,e+1,o,i)}):(o[e+1]=t.values,i.push(o))}var r=-1,i=[],o=[],a=-1,u=[];if(e.forEach(function(t,e){if(t instanceof Object)switch(t["function"]){case"SUM":case"AVE":case"MIN":case"MAX":r>=0&&console.log("Rollup field already exists - there should only be one?"),r=e,t.params.forEach(function(t){var e=this.fieldByLabel(t.param1,!0);e?i.push(e.idx):console.log("Grid.prototype.hipieMappings: Invalid rollup field - "+t.param1)},this);break;case"SCALE":a>=0&&console.log("Scale field already exists - there should only be one?"),a=e,t.params.forEach(function(t){var e=this.fieldByLabel(t.param1,!0);if(e){var n=e.idx,r=t.param2;u.push(function(t){return t[n]/r})}else console.log("Grid.prototype.hipieMappings: Invalid scale field - "+t.param1)},this);break;default:console.log("Unknown field function - "+t["function"])}else if(t.indexOf("_AVE")===t.length-4&&this.fieldByLabel(t.substring(0,t.length-4)+"_SUM",!0)&&this.fieldByLabel("base_count",!0)){console.log("Deprecated - Symposium AVE Hack");var n=this.fieldByLabel(t.substring(0,t.length-4)+"_SUM",!0),s=this.fieldByLabel("base_count",!0);o.push(n.idx),u.push(function(t){return t[n.idx]/t[s.idx]})}else{var c=this.fieldByLabel(t,!0);c&&(o.push(c.idx),u.push(function(t){return t[c.idx]}))}},this),r>=0){var s=e[r],c=[];for(var f in s.params)c.push(s.params[f]);var l=this.rollup(o,function(e){switch(s["function"]){case"SUM":return t.sum(e,function(t){return t[i[0]]});case"AVE":return t.mean(e,function(t){return t[i[0]]});case"MIN":return t.min(e,function(t){return t[i[0]]});case"MAX":return t.max(e,function(t){return t[i[0]]})}return console.log("Unsupported Mapping Function: "+s["function"]),0}),h=[];return l instanceof Array?l.forEach(function(t){n(t,0,[],h)}):h.push([l]),h}return this._data.map(function(t){var e=[];return u.forEach(function(n){e.push(n(t))}),e})},i.prototype._nest=function(e,n){e instanceof Array||(e=[e]);var r=t.nest();return e.forEach(function(t){r.key(function(e){return e[t]})}),r},i.prototype.nest=function(t){return this._nest(t).entries(this._data)},i.prototype.rollup=function(t,e){return this._nest(t).rollup(e).entries(this._data)},i.prototype.length=function(){return this._data.length+1},i.prototype.width=function(){return this.fields().length},i.prototype.pivot=function(){return this.rows(this.columns()),this},i.prototype.clone=function(t){return(new i).fields(this.fields(),t).data(this.data(),t)},i.prototype.filter=function(t){var e={};return this.row(0).forEach(function(t,n){e[t]=n}),(new i).fields(this.fields(),!0).data(this.data().filter(function(n){for(var r in t)if(t[r]!==n[e[r]])return!1;return!0}))};var v=null;i.prototype.analyse=function(t){t instanceof Array||(t=[t]);var e=[];return t.forEach(function(t){var n=this.rollup(t,function(t){return t.length});e.push(n);var r=n.map(function(t){return t.key});this.fields()[t].isBoolean=o(r,a),this.fields()[t].isNumber=o(r,u),this.fields()[t].isString=!this.fields()[t].isNumber&&o(r,s),this.fields()[t].isUSState=this.fields()[t].isString&&o(r,d),this.fields()[t].isDateTime=this.fields()[t].isString&&o(r,f),this.fields()[t].isDateTimeFormat=v,this.fields()[t].isDate=!this.fields()[t].isDateTime&&o(r,l),this.fields()[t].isDateFormat=v,this.fields()[t].isTime=this.fields()[t].isString&&!this.fields()[t].isDateTime&&!this.fields()[t].isDate&&o(r,h),this.fields()[t].isTimeFormat=v},this),e},i.prototype.jsonObj=function(t){return arguments.length?(this.clear(),this.data(t.map(function(t,e){var n=[];for(var i in t){var o=this.row(0).indexOf(i);0>o&&(o=this.fields().length,this.fields().push((new r).label(i))),n[o]=t[i]}return n},this)),this):this._data.map(function(t){var e={};return this.row(0).forEach(function(n,r){e[n]=t[r]}),e},this)},i.prototype.json=function(t){return arguments.length?(this.jsonObj(JSON.parse(t)),this):JSON.stringify(this.jsonObj(),null," ")},i.prototype.csv=function(e){return arguments.length?(this.jsonObj(t.csv.parse(e)),this):t.csv.formatRows(this.grid())},i.prototype.tsv=function(e){return arguments.length?(this.jsonObj(t.tsv.parse(e)),this):t.tsv.formatRows(this.grid())};var b=[],_=["%Y-%m-%d","%Y%m%d"],x=["%H:%M:%S.%LZ","%H:%M:%SZ","%H:%M:%S"];return _.forEach(function(t){x.forEach(function(e){b.push(t+"T"+e)})}),{Field:r,Grid:i}}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Widget",["d3","./Class","./Platform","./PropertyExt","./Database"],e):t.common_Widget=e(t.d3,t.common_Class,t.common_Platform,t.common_PropertyExt,t.common_Database)}(this,function(t,e,n,r,i){function o(){e.call(this),n.call(this),r.call(this),this._class=Object.getPrototypeOf(this)._class,this._id=this._idSeed+a++,this._db=new i.Grid,this._pos={x:0,y:0},this._size={width:0,height:0},this._scale=1,this._visible=!0,this._target=null,this._parentElement=null,this._parentWidget=null,this._element=t.select(),this._renderCount=0,window.__hpcc_debug&&(void 0===window.g_all&&(window.g_all={}),window.g_all[this._id]=this),window.__hpcc_theme&&this.applyTheme(window.__hpcc_theme)}var a=0;return o.prototype=Object.create(e.prototype),o.prototype.constructor=o,o.prototype.mixin(n),o.prototype.mixin(r),o.prototype._class+=" common_Widget",o.prototype._idSeed="_w",o.prototype.publishProxy("fields","_db","fields"),o.prototype.publish("classed",{},"object","HTML Classes",null,{tags:["Private"]}),o.prototype["export"]=function(t){switch(t){case"TSV":return this._db.tsv();case"JSON":return this._db.json()}return this._db.csv()},o.prototype.leakCheck=function(t){for(var e=this,n=[t],r=new this.MutationObserver(function(t){var i=!1;t.forEach(function(t){for(var o=0;o=0&&e._target&&(i=!0,r.disconnect())}}),i&&console.log("leak: "+e.id()+" - "+e.classID()+" widget.target(null); was not called for this widget before it was removed from the page.")}),i=t.parentNode;i;)r.observe(i,{childList:!0}),n.push(i),i=i.parentNode},o.prototype.on=function(e,n,r){if(void 0===this[e])throw"Method: "+e+" does not exist.";var i=this[e];return this[e]=function(){r?t.event&&t.event.stopPropagation():i.apply(this,arguments),n.apply(this,arguments)},this},o.prototype.id=function(t){return arguments.length?(this._id=t,this):this._id},o.prototype.columns=function(t){return arguments.length?(this._db.legacyColumns(t),this):this._db.legacyColumns()},o.prototype.parsedData=function(){return this._db.parsedData()},o.prototype.formattedData=function(){return this._db.formattedData()},o.prototype.data=function(t){return arguments.length?(this._db.legacyData(t),this):this._db.legacyData()},o.prototype.cloneData=function(){return this.data().map(function(t){return t.slice(0)})},o.prototype.flattenData=function(){var t=[];return this.data().forEach(function(e,n){this.columns().filter(function(t,e){return e>0}).forEach(function(r,i){var o=e[i+1];if(o){var a={rowIdx:n,colIdx:i+1,label:e[0],value:o};t.push(a)}},this)},this),t},o.prototype.rowToObj=function(t){var e={};return this.columns().forEach(function(n,r){e[n]=t[r]}),t.length===this.columns().length+1&&(e.__lparam=t[this.columns().length]),e},o.prototype.pos=function(t){return arguments.length?(this._pos=t,this._overlayElement&&this._overlayElement.attr("transform","translate("+t.x+","+t.y+")scale("+this._scale+")"),this):this._pos},o.prototype.x=function(t){return arguments.length?(this.pos({x:t,y:this._pos.y}),this):this._pos.x},o.prototype.y=function(t){return arguments.length?(this.pos({x:this._pos.x,y:t}),this):this._pos.y},o.prototype.size=function(t){return arguments.length?(this._size=t,this._overlayElement&&this._overlayElement.attr("width",t.width).attr("height",t.height),this):this._size},o.prototype.width=function(t){return arguments.length?(this.size({width:t,height:this._size.height}),this):this._size.width},o.prototype.height=function(t){return arguments.length?(this.size({width:this._size.width,height:t}),this):this._size.height},o.prototype.resize=function(t,e){e=e||{width:0,height:0};var n,r;if(t&&t.width&&t.height)n=t.width,r=t.height;else{var i=window.getComputedStyle(this._target,null);n=parseFloat(i.getPropertyValue("width"))-e.width,r=parseFloat(i.getPropertyValue("height"))-e.height}return this.size({width:n,height:r}),this},o.prototype.scale=function(t){return arguments.length?(this._scale=t,this._overlayElement&&this._overlayElement.attr("transform","translate("+t.x+","+t.y+")scale("+this._scale+")"),this):this._scale},o.prototype.visible=function(t){return arguments.length?(this._visible=t,this._parentElement&&this._parentElement.style({visibility:this._visible?null:"hidden",opacity:this._visible?null:0}),this):this._visible},o.prototype.display=function(t){return arguments.length?(this._display=t,this._element&&this._element.style("display",this._display?null:"none"),this):this._display},o.prototype.calcSnap=function(t){function e(t,e){function n(t,e){var n=t%e;return Math.abs(n)>e-Math.abs(n)&&(n=(e-Math.abs(n))*(0>n?1:-1)),n}return t-n(t,e)}var n=e(this._pos.x-this._size.width/2,t),r=e(this._pos.y-this._size.height/2,t),i=e(this._pos.x+this._size.width/2,t),o=e(this._pos.y+this._size.height/2,t),a=i-n,u=o-r;return[{x:n+a/2,y:r+u/2},{width:a,height:u}]},o.prototype.toWidget=function(e){if(!e)return null;var n=t.select(e);if(n){var r=n.datum();if(r&&r instanceof o)return r}return null},o.prototype.locateParentWidget=function(t){t=t||this._target.parentNode;var e=this.toWidget(t);return e?e:this.locateParentWidget(t.parentNode)},o.prototype.locateSVGNode=function(t){return t?"svg"===t.tagName?t:this.locateSVGNode(t.parentNode):null},o.prototype.locateOverlayNode=function(){for(var t=this.locateParentWidget(this._target);t;){if(t._parentOverlay)return t._parentOverlay;t=this.locateParentWidget(t._target.parentNode)}return null},o.prototype.getAbsolutePos=function(t,e,n){var r=this.locateSVGNode(t);if(!r)return null;var i=r.createSVGPoint(),o=t.getCTM();i=i.matrixTransform(o);var a={x:i.x,y:i.y};if(void 0!==e&&void 0!==n){var u=r.createSVGPoint();u.x=e,u.y=n,u=u.matrixTransform(o),a.width=u.x-i.x,a.height=u.y-i.y}return a},o.prototype.hasOverlay=function(){return this._overlayElement},o.prototype.syncOverlay=function(){if(this._size.width&&this._size.height){var t=this.getAbsolutePos(this._overlayElement.node(),this._size.width,this._size.height);if(t&&(null===this.oldPos||void 0===this.oldPos||t.x!==this.oldPos.x||t.y!==this.oldPos.y||t.width!==this.oldPos.width||t.height!==this.oldPos.height)){var e=t.width/this._size.width,n=t.height/this._size.height;this._parentElement.style({left:t.x-t.width/e/2+"px",top:t.y-t.height/n/2+"px",width:t.width/e+"px",height:t.height/n+"px"});var r="scale("+e+","+n+")";this._parentElement.style("transform",r).style("-moz-transform",r).style("-ms-transform",r).style("-webkit-transform",r).style("-o-transform",r)}this.oldPos=t}},o.prototype.element=function(){return this._element},o.prototype.node=function(){return this._element.node()},o.prototype.render=function(e){if(window.__hpcc_debug){var n=Date.now();n-this._prevNow<500&&console.log("Double Render: "+(n-this._prevNow)+" - "+this.id()+" - "+this.classID()),this._prevNow=n}if(e=e||function(){},!this.visible())return e(this),this;if(this._parentElement){if(!this._tag)throw"No DOM tag specified";var r=this._parentElement.selectAll("#"+this._id).data([this],function(t){return t._id});r.enter().append(this._tag).classed(this._class,!0).attr("id",this._id).each(function(e){e._element=t.select(this),e.enter(this,e._element),window.__hpcc_debug&&e.leakCheck(this)}),r.classed(this.classed()).each(function(t){t.preUpdate(this,t._element),t.update(this,t._element),t.postUpdate(this,t._element)}),r.exit().each(function(e){t.select(this).datum(null),e.exit(this,e._element)}).remove(),this._renderCount++}var i=[];this.publishedProperties(!0).forEach(function(t){if(!t.ext||t.ext.render!==!1)switch(t.type){case"widget":var e=this[t.id]();e&&i.push(this[t.id]());break;case"widgetArray":i=i.concat(this[t.id]())}},this);var o=this;switch(i.length){case 0:e(this);break;case 1:i[0].render(function(){e(o)});break;default:var a=i.length;i.forEach(function(t,n){setTimeout(function(){t.render(function(){0===--a&&e(o)})},0)})}return this},o.prototype.lazyRender=o.prototype.debounce(function(){this.render()},100),o.prototype.enter=function(t,e){},o.prototype.preUpdate=function(t,e){},o.prototype.update=function(t,e){},o.prototype.postUpdate=function(t,e){},o.prototype.exit=function(t,e){},o}),function(t,e){"function"==typeof define&&define.amd?define("src/common/CanvasWidget",["d3","./Widget"],e):t.common_CanvasWidget=e(t.d3,t.common_Widget)}(this,function(t,e){function n(){e.call(this),this._tag="canvas"}return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype._class+=" common_CanvasWidget",n.prototype.resize=function(t){var n=e.prototype.resize.apply(this,arguments);return this._parentElement.style("width",this._size.width+"px").style("height",this._size.height+"px"),this._element.attr("width",this._size.width),this._element.attr("height",this._size.height),n},n.prototype.target=function(e){if(!arguments.length)return this._target;if(this._target&&e)throw"Target can only be assigned once.";if(this._target=e,("string"==typeof this._target||this._target instanceof String)&&(this._target=document.getElementById(this._target)),this._target){if(this._parentElement=t.select(this._target),!this._size.width&&!this._size.height){var n=parseFloat(this._parentElement.style("width")),r=parseFloat(this._parentElement.style("height"));this.size({width:n,height:r}),this.resize(this._size)}}else this.exit();return this},n.prototype.exit=function(){this._parentElement&&this._parentElement.remove(),e.prototype.exit.apply(this,arguments)},n}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Transition",[],e):t.common_Transition=e()}(this,function(){function t(t){this._widget=t,this._duration=250,this._delay=0,this._ease="cubic-in-out"}return t.prototype.duration=function(t){return arguments.length?(this._duration=t,this._widget):this._duration},t.prototype.delay=function(t){return arguments.length?(this._delay=t,this._widget):this._delay},t.prototype.ease=function(t){return arguments.length?(this._ease=t,this._widget):this._ease},t.prototype.apply=function(t){return this._duration||this._delay?t.transition().duration(this._duration).delay(this._delay).ease(this._ease):t},t}),function(t,e){"function"==typeof define&&define.amd?define("src/common/SVGWidget",["d3","./Widget","./Transition"],e):t.common_SVGWidget=e(t.d3,t.common_Widget,t.common_Transition)}(this,function(t,e,n){function r(){e.call(this),this._tag="g",this._boundingBox=null,this.transition=new n(this),this._drawStartPos="center"}r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype._class+=" common_SVGWidget",r.prototype.move=function(t,e){var n=this.pos.apply(this,arguments);return arguments.length&&(e?this._element.transition().duration(e):this._element).attr("transform","translate("+t.x+" "+t.y+")"),n},r.prototype.size=function(t){var n=e.prototype.size.apply(this,arguments);return arguments.length&&(this._boundingBox=null),n},r.prototype.resize=function(t){var n=e.prototype.resize.apply(this,arguments);if(this._parentRelativeDiv)switch(this._parentRelativeDiv.style({width:this._size.width+"px",height:this._size.height+"px"}),this._drawStartPos){case"origin":this.pos({x:0,y:0});break;case"center":default:this.pos({x:this._size.width/2,y:this._size.height/2})}return this._parentElement.attr("width",this._size.width).attr("height",this._size.height),n},r.prototype.target=function(e){if(!arguments.length)return this._target;if(this._target&&e&&this._target.__data__.id!==e.__data__.id)throw"Target can only be assigned once.";return this._target=e,("string"==typeof this._target||this._target instanceof String)&&(this._target=document.getElementById(this._target)),this._target instanceof SVGElement?(this._parentElement=t.select(this._target),this._parentWidget=this._parentElement.datum(),this._parentWidget&&this._parentWidget._id!==this._id||(this._parentWidget=this.locateParentWidget(this._target.parentNode)),this._parentOverlay=this.locateOverlayNode()):this._target?(this._parentRelativeDiv=t.select(this._target).append("div").style({position:"relative"}),this._parentElement=this._parentRelativeDiv.append("svg").style({position:"absolute",top:0,left:0}),this._parentOverlay=this._parentRelativeDiv.append("div").style({position:"absolute",top:0,left:0}),this.resize(this._size)):this.exit(),this},r.prototype.enter=function(t,n){e.prototype.enter.apply(this,arguments)},r.prototype.update=function(t,n){e.prototype.update.apply(this,arguments)},r.prototype.postUpdate=function(t,n){e.prototype.postUpdate.apply(this,arguments),"origin"===this._drawStartPos&&this._target instanceof SVGElement?this._element.attr("transform","translate("+(this._pos.x-this._size.width/2)+","+(this._pos.y-this._size.height/2)+")scale("+this._scale+")"):this._element.attr("transform","translate("+this._pos.x+","+this._pos.y+")scale("+this._scale+")")},r.prototype.exit=function(t,n){this._parentRelativeDiv&&(this._parentOverlay.remove(),this._parentElement.remove(),this._parentRelativeDiv.remove()),e.prototype.exit.apply(this,arguments)},r.prototype.getOffsetPos=function(){var t={x:0,y:0};return this._parentWidget?(t=this._parentWidget.getOffsetPos(),t.x+=this._pos.x,t.y+=this._pos.y,t):t},r.prototype.getBBox=function(t,e){if(t||null===this._boundingBox){var n=this._element.node();n instanceof SVGElement&&(this._boundingBox=n.getBBox())}return null===this._boundingBox?{x:0,y:0,width:0,height:0}:{x:(e?Math.round(this._boundingBox.x):this._boundingBox.x)*this._scale,y:(e?Math.round(this._boundingBox.y):this._boundingBox.y)*this._scale,width:(e?Math.round(this._boundingBox.width):this._boundingBox.width)*this._scale,height:(e?Math.round(this._boundingBox.height):this._boundingBox.height)*this._scale}},r.prototype.intersection=function(t,e){return this.intersectRect(t,e)};var i=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}},o=function(t,e,n,r){var i={type:"",points:[]},o=(r.x-n.x)*(t.y-n.y)-(r.y-n.y)*(t.x-n.x),a=(e.x-t.x)*(t.y-n.y)-(e.y-t.y)*(t.x-n.x),u=(r.y-n.y)*(e.x-t.x)-(r.x-n.x)*(e.y-t.y);if(0!==u){var s=o/u,c=a/u;s>=0&&1>=s&&c>=0&&1>=c?(i.type="Intersection",i.points.push({x:t.x+s*(e.x-t.x),y:t.y+s*(e.y-t.y)})):i.type="No Intersection"}else 0===o||0===a?i.type="Coincident":i.type="Parallel";return i};r.prototype.intersectRect=function(t,e){ var n=this.getOffsetPos(),r=this.getBBox();if(t.x===e.x&&t.y===e.y)return t;var i={x:n.x-r.width/2,y:n.y-r.height/2},a={x:n.x+r.width/2,y:n.y-r.height/2},u={x:n.x+r.width/2,y:n.y+r.height/2},s={x:n.x-r.width/2,y:n.y+r.height/2},c=o(i,a,t,e);return c.points.length?{x:c.points[0].x,y:c.points[0].y}:(c=o(a,u,t,e),c.points.length?{x:c.points[0].x,y:c.points[0].y}:(c=o(u,s,t,e),c.points.length?{x:c.points[0].x,y:c.points[0].y}:(c=o(s,i,t,e),c.points.length?{x:c.points[0].x,y:c.points[0].y}:null)))};var a=function(t,e,n,r){var o={type:"",points:[]},a=(r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y),u=2*((r.x-n.x)*(n.x-t.x)+(r.y-n.y)*(n.y-t.y)),s=t.x*t.x+t.y*t.y+n.x*n.x+n.y*n.y-2*(t.x*n.x+t.y*n.y)-e*e,c=u*u-4*a*s;if(0>c)o.type="Outside";else if(0===c)o.type="Tangent";else{var f=Math.sqrt(c),l=(-u+f)/(2*a),h=(-u-f)/(2*a);(0>l||l>1)&&(0>h||h>1)?0>l&&0>h||l>1&&h>1?o.type="Outside":o.type="Inside":(o.type="Intersection",l>=0&&1>=l&&o.points.push(i(n,r,l)),h>=0&&1>=h&&o.points.push(i(n,r,h)))}return o};return r.prototype.intersectCircle=function(t,e){var n=this.getOffsetPos(),r=this.radius(),i=a(n,r,t,e);return i.points.length?{x:i.points[0].x,y:i.points[0].y}:null},r.prototype.distance=function(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))},r.prototype._pushMarkers=function(t,e){this.svgMarkerGlitch&&(t=t||this._element,t.selectAll("path[marker-start],path[marker-end]").attr("fixme-start",function(t){return this.getAttribute("marker-start")}).attr("fixme-end",function(t){return this.getAttribute("marker-end")}).attr("marker-start",null).attr("marker-end",null))},r.prototype._popMarkers=function(t,e){this.svgMarkerGlitch&&(t=t||this._element,t.selectAll("path[fixme-start],path[fixme-end]").attr("marker-start",function(t){return this.getAttribute("fixme-start")}).attr("marker-end",function(t){return this.getAttribute("fixme-end")}).attr("fixme-start",null).attr("fixme-end",null))},r.prototype._popMarkersDebounced=e.prototype.debounce(function(t,e){this.svgMarkerGlitch&&this._popMarkers(t,e)},250),r.prototype._fixIEMarkers=function(t,e){this.svgMarkerGlitch&&(this._pushMarkers(t,e),this._popMarkersDebounced(t,e))},r}),define("css!src/common/Text",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Text",["./SVGWidget","css!./Text"],e):t.common_Text=e(t.common_SVGWidget)}(this,function(t){function e(){t.call(this)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype._class+=" common_Text",e.prototype.publish("text","","string","Display Text",null,{tags:["Basic"]}),e.prototype.publish("fontFamily",null,"string","Font Family",null,{tags:["Intermediate"],optional:!0}),e.prototype.publish("fontSize",null,"number","Font Size (px)",null,{tags:["Intermediate"]}),e.prototype.publish("anchor","middle","set","Anchor Position",["start","middle","end"],{tags:["Intermediate"]}),e.prototype.publish("colorFill",null,"html-color","Fill Color",null,{tags:["Basic"]}),e.prototype.publish("rotation",0,"number","Degrees of rotation",null,{tags:["Basic"]}),e.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this._textElement=n.append("text")},e.prototype.update=function(e,n){t.prototype.update.apply(this,arguments);var r=this;this._textElement.attr("font-family",this.fontFamily()).attr("font-size",this.fontSize());var i=this.text().split("\n"),o=this._textElement.selectAll("tspan").data(i);o.enter().append("tspan").attr("class",function(t,e){return"tspan_"+e}).attr("dy","1em").attr("x","0"),o.style("fill",this.colorFill()).text(function(t){return t}),o.exit().remove();var a={width:0,height:0};try{a=this._textElement.node().getBBox()}catch(u){}var s=-(a.x+a.width/2),c=-(a.y+a.height/2);switch(this.anchor()){case"start":s=-a.x+a.width/2;break;case"end":s=a.x+a.width/2}var f=-this.rotation()*Math.PI/180;s=-1*Math.abs(s*Math.cos(f)+c*Math.sin(f)),c=-1*Math.abs(s*Math.sin(f)+c*Math.cos(f)),this._textElement.style("text-anchor",this.anchor()).attr("transform",function(t){return"translate("+s+","+c+")rotate("+r.rotation()+")"})},e}),define("css!src/common/FAChar",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/FAChar",["./SVGWidget","./Text","css!font-awesome","css!./FAChar"],e):t.common_FAChar=e(t.common_SVGWidget,t.common_Text)}(this,function(t,e){function n(){t.call(this),this._text=(new e).fontFamily("FontAwesome")}return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype._class+=" common_FAChar",n.prototype.publish("char","","string","Font Awesome Item",null,{tags:["Private"]}),n.prototype.publish("fontSize",null,"number","Font Size",null,{tags:["Private"]}),n.prototype.publishProxy("text_colorFill","_text","colorFill"),n.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this._text.target(e)},n.prototype.update=function(e,n){t.prototype.update.apply(this,arguments),this._text.text(this["char"]()).scale((this.fontSize()||14)/14).render()},n.prototype.exit=function(e,n){this._text.target(null),t.prototype.exit.apply(this,arguments)},n}),function(t,e){"function"==typeof define&&define.amd?define("src/common/HTMLWidget",["d3","./Widget","./Transition"],e):t.common_HTMLWidget=e(t.d3,t.common_Widget,t.common_Transition)}(this,function(t,e,n){function r(){e.call(this),this._drawStartPos="origin",this._boundingBox=null}return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype._class+=" common_HTMLWidget",r.prototype.calcFrameWidth=function(t){var e=parseFloat(t.style("padding-left"))+parseFloat(t.style("padding-right"))+parseFloat(t.style("margin-left"))+parseFloat(t.style("margin-right"))+parseFloat(t.style("border-left-width"))+parseFloat(t.style("border-right-width"));return e},r.prototype.calcWidth=function(t){return parseFloat(t.style("width"))-this.calcFrameWidth(t)},r.prototype.calcFrameHeight=function(t){var e=parseFloat(t.style("padding-top"))+parseFloat(t.style("padding-bottom"))+parseFloat(t.style("margin-top"))+parseFloat(t.style("margin-bottom"))+parseFloat(t.style("border-top-width"))+parseFloat(t.style("border-bottom-width"));return e},r.prototype.calcHeight=function(t){return parseFloat(t.style("height"))+this.calcFrameHeight(t)},r.prototype.hasHScroll=function(t){return t=t||this._element,t.property("scrollWidth")>t.property("clientWidth")},r.prototype.hasVScroll=function(t){return t=t||this._element,t.property("scrollHeight")>t.property("clientHeight")},r.prototype.clientWidth=function(){return this._size.width-this.calcFrameWidth(this._element)},r.prototype.clientHeight=function(){return this._size.height-this.calcFrameHeight(this._element)},r.prototype.getBBox=function(t,e){if(t||null===this._boundingBox){var n=this._element.node()?this._element.node().firstElementChild:null;if(n instanceof Element){var r=n.getBoundingClientRect();this._boundingBox={x:r.left,y:r.top,width:r.width,height:r.height}}}return null===this._boundingBox?{x:0,y:0,width:0,height:0}:{x:(e?Math.round(this._boundingBox.x):this._boundingBox.x)*this._scale,y:(e?Math.round(this._boundingBox.y):this._boundingBox.y)*this._scale,width:(e?Math.round(this._boundingBox.width):this._boundingBox.width)*this._scale,height:(e?Math.round(this._boundingBox.height):this._boundingBox.height)*this._scale}},r.prototype.resize=function(t){var n=e.prototype.resize.apply(this,arguments);return this._parentElement.style("width",this._size.width+"px").style("height",this._size.height+"px"),n},r.prototype.target=function(e){if(!arguments.length)return this._target;if(this._target&&e)throw"Target can only be assigned once.";if(this._target=e,("string"==typeof this._target||this._target instanceof String)&&(this._target=document.getElementById(this._target)),this._target instanceof SVGElement){var n=this.locateOverlayNode();this._parentElement=n.append("div").style({position:"absolute",top:0,left:0,overflow:"hidden"}),this._overlayElement=t.select(this._target);var r=this;this.oldPos=null,this.observer=new this.MutationObserver(function(t){r.syncOverlay()});for(var i=this._overlayElement.node();i;)this.observer.observe(i,{attributes:!0}),i=i.parentNode}else if(this._target){if(this._parentElement=t.select(this._target),!this._size.width&&!this._size.height){var o=parseFloat(this._parentElement.style("width")),a=parseFloat(this._parentElement.style("height"));this.size({width:o,height:a})}this._parentElement=t.select(this._target).append("div")}else this.exit();return this},r.prototype.postUpdate=function(t,n){if(e.prototype.postUpdate.apply(this,arguments),"origin"===this._drawStartPos)this._element.style({position:"relative",left:this._pos.x+"px",top:this._pos.y+"px"});else{var r=this.getBBox(!0);this._element.style({position:"relative","float":"left",left:this._pos.x+(this._size.width-r.width)/2+"px",top:this._pos.y+(this._size.height-r.height)/2+"px"})}},r.prototype.exit=function(t,n){this.observer&&this.observer.disconnect(),this.oldPos=null,this._parentElement&&this._parentElement.remove(),e.prototype.exit.apply(this,arguments)},r}),define("css!src/common/Shape",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Shape",["d3","./SVGWidget","css!./Shape"],e):t.common_Shape=e(t.d3,t.common_SVGWidget)}(this,function(t,e){function n(){e.call(this)}return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype._class+=" common_Shape",n.prototype.publish("shape","circle","set","Shape Type",["circle","square","rect","ellipse"],{tags:["Private"]}),n.prototype.publish("width",24,"number","Width",null,{tags:["Private"]}),n.prototype.publish("height",24,"number","Height",null,{tags:["Private"]}),n.prototype.publish("colorStroke",null,"html-color","Stroke Color",null,{tags:["Private"]}),n.prototype.publish("colorFill",null,"html-color","Fill Color",null,{tags:["Private"]}),n.prototype.publish("radius",null,"number","Radius",null,{tags:["Private"]}),n.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),n.prototype._origRadius=n.prototype.radius,n.prototype.radius=function(t){var e=n.prototype._origRadius.apply(this,arguments);return arguments.length?(this.width(t),this.height(t),e):Math.max(this.width(),this.height())/2},n.prototype.intersection=function(t,n){switch(this.shape()){case"circle":return this.intersectCircle(t,n)}return e.prototype.intersection.apply(this,arguments)},n.prototype.update=function(e,n){var r=n.selectAll("rect,circle,ellipse").data([this.shape()],function(t){return t}),i=this;r.enter().append("square"===this.shape()?"rect":this.shape()).attr("class","common_Shape").each(function(e){var n=t.select(this);i._tooltipElement=n.append("title")}),r.style("fill",this.colorFill()).style("stroke",this.colorStroke()).each(function(e){var n=t.select(this);switch(i._tooltipElement.text(i.tooltip()),i.shape()){case"circle":var r=i.radius();n.attr("r",r);break;case"square":var o=Math.max(i.width(),i.height());n.attr("x",-o/2).attr("y",-o/2).attr("width",o).attr("height",o);break;case"rect":n.attr("x",-i.width()/2).attr("y",-i.height()/2).attr("width",i.width()).attr("height",i.height());break;case"ellipse":n.attr("rx",i.width()/2).attr("ry",i.height()/2)}}),r.exit().remove()},n}),define("css!src/common/Icon",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Icon",["./SVGWidget","./Shape","./FAChar","css!./Icon"],e):t.common_Icon=e(t.common_SVGWidget,t.common_Shape,t.common_FAChar)}(this,function(t,e,n){function r(){t.call(this),this._shapeWidget=new e,this._faChar=new n}return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype._class+=" common_Icon",r.prototype.publish("shape","circle","set","Shape Type",["circle","square"],{tags:["Private"]}),r.prototype.publishProxy("faChar","_faChar","char"),r.prototype.publishProxy("image_colorFill","_faChar","text_colorFill"),r.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),r.prototype.publish("diameter",24,"number","Diameter",null,{tags:["Private"]}),r.prototype.publish("paddingPercent",45,"number","Padding Percent",null,{tags:["Private"]}),r.prototype.publishProxy("shape_colorFill","_shapeWidget","colorFill"),r.prototype.publishProxy("shape_colorStroke","_shapeWidget","colorStroke"),r.prototype.intersection=function(t,e){return this._shapeWidget.intersection(t,e)},r.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this._shapeWidget.target(e).render(),this._faChar.target(e).render(),this._tooltipElement=n.append("title");var r=this;n.on("click",function(t){r.click(t)})},r.prototype.click=function(t){console.log("Clicked the icon")},r.prototype.update=function(e,n){t.prototype.update.apply(this,arguments),this._faChar.fontSize(this.diameter()*(100-this.paddingPercent())/100).render(),this._shapeWidget.shape(this.shape()).width(this.diameter()).height(this.diameter()).render(),this._tooltipElement.text(this.tooltip())},r.prototype.exit=function(e,n){t.prototype.exit.apply(this,arguments),this._shapeWidget.target(null),this._faChar.target(null)},r}),function(t,e){"function"==typeof define&&define.amd?define("src/common/IList",[],e):t.common_IList=e()}(this,function(){function t(){}return t.prototype.click=function(t){console.log("Click: "+t)},t}),function(t,e){"function"==typeof define&&define.amd?define("src/common/IMenu",[],e):t.common_IMenu=e()}(this,function(){function t(){}return t.prototype.click=function(t){console.log("Click: "+t)},t.prototype.preShowMenu=function(){console.log("preShowMenu")},t.prototype.postHideMenu=function(t){console.log("postHideMenu")},t}),define("css!src/common/TextBox",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/TextBox",["./SVGWidget","./Shape","./Text","css!./TextBox"],e):t.common_TextBox=e(t.common_SVGWidget,t.common_Shape,t.common_Text)}(this,function(t,e,n){function r(){t.call(this),this._shape=(new e).shape("rect"),this._text=new n}return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype._class+=" common_TextBox",r.prototype.publishProxy("text","_text"),r.prototype.publishProxy("shape_colorStroke","_shape","colorStroke"),r.prototype.publishProxy("shape_colorFill","_shape","colorFill"),r.prototype.publishProxy("text_colorFill","_text","colorFill"),r.prototype.publish("paddingLeft",4,"number","Padding: Left",null,{tags:["Private"]}),r.prototype.publish("paddingRight",4,"number","Padding: Right",null,{tags:["Private"]}),r.prototype.publish("paddingTop",4,"number","Padding: Top",null,{tags:["Private"]}),r.prototype.publish("paddingBottom",4,"number","Padding: Bottom",null,{tags:["Private"]}),r.prototype.publishProxy("anchor","_text"),r.prototype.publish("fixedSize",null),r.prototype.publish("tooltip","","string","Tooltip",null,{tags:["Private"]}),r.prototype.padding=function(t){return this.paddingLeft(t),this.paddingRight(t),this.paddingTop(t),this.paddingBottom(t),this},r.prototype.enter=function(e,n){t.prototype.enter.apply(this,arguments),this._tooltipElement=n.append("title"),this._shape.target(e).render(),this._text.target(e).render()},r.prototype.update=function(e,n){t.prototype.update.apply(this,arguments),this._tooltipElement.text(this.tooltip()),this._text.render();var r=this._text.getBBox(!0),i={width:this.fixedSize()?this.fixedSize().width:r.width+this.paddingLeft()+this.paddingRight(),height:this.fixedSize()?this.fixedSize().height:r.height+this.paddingTop()+this.paddingBottom()};if(this._shape.width(i.width).height(i.height).render(),this.fixedSize())switch(this.anchor()){case"start":this._text.x(-this.fixedSize().width/2+r.width/2+(this.paddingLeft()+this.paddingRight())/2).render();break;case"end":this._text.x(this.fixedSize().width/2-r.width/2-(this.paddingLeft()+this.paddingRight())/2).render()}},r.prototype.exit=function(e,n){this._shape.target(null),this._text.target(null),t.prototype.exit.apply(this,arguments)},r}),define("css!src/common/List",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/List",["d3","../common/SVGWidget","./IList","../common/TextBox","css!./List"],e):t.common_List=e(t.d3,t.common_SVGWidget,t.common_IList,t.common_TextBox)}(this,function(t,e,n,r){function i(t){e.call(this),n.call(this),this._listWidgets={}}return i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.prototype._class+=" common_List",i.prototype["implements"](n.prototype),i.prototype.publish("anchor","start","set","Anchor Position",["","start","middle","end"],{tags:["Private"]}),i.prototype.update=function(t,n){e.prototype.update.apply(this,arguments);var i=this,o=n.selectAll(".line").data(this.data(),function(t){return t});o.enter().append("g").attr("class","line").each(function(t){var e=(new r).target(this).paddingTop(0).paddingBottom(0).paddingLeft(8).paddingRight(8).text(t).render();e.element().on("click",function(t){i.click(t.text())}),i._listWidgets[t]=e});var a=0,u=0,s=0;for(var c in this._listWidgets)if(this._listWidgets.hasOwnProperty(c)){var f=this._listWidgets[c].getBBox();a+=f.height,u=0)f=new t.scale[r];else if(u.indexOf(r)>=0){var l=[];switch(r){case"hpcc10":var h=n("default").colors();l=h.filter(function(t,e){return e%2?!0:!1});break;case"hpcc20":l=n("category10").colors().concat(n("hpcc10").colors())}f=t.scale.ordinal().range(l)}else if(a.indexOf(r)>0)for(var d=12;d>0;){if(colorbrewer[r][d]){f=t.scale.ordinal().range(colorbrewer[r][d]);break}--d}f||(f=t.scale.category20()),i=f.range()}return c.type=function(){return"ordinal"},c.id=function(t){return arguments.length?(r=t,c):r},c.colors=function(t){return arguments.length?(i=t,c):i},c.clone=function(t){return s[t]=n(t,this.colors()),s[t]},c.cloneNotExists=function(t){return s[t]?s[t]:this.clone(t)},c["switch"]=function(t,n){return r===t?this:arguments.length?e(t,n):e()},c}function r(t,e,n){if(!t)return i();var r=c[t];return r||(r=i(t,e),c[t]=r),r}function i(e,n,o){function u(t,e,n){return l.domain([e,n])(t)}if(!arguments.length){var s=["default"];for(var f in colorbrewer)-1===a.indexOf(f)&&s.push(f);return s}var l=null,h=n,d=function(e,n){n=n||32;var r=Math.ceil(n/(e.length-1)),i=[],o=null;return e.forEach(function(e){if(o)for(var n=t.scale.linear().domain([0,r]).range([o,e]).interpolate(t.interpolateLab),a=0;r>a;++a)i.push(n(a));o=e}),l=t.scale.quantize().domain([0,100]).range(i)};if(n)l=d(n,o);else{if(colorbrewer[e])for(var p=12;p>0;){if(colorbrewer[e][p]){l=d(colorbrewer[e][p]);break}--p}l||(l=d(colorbrewer.RdYlGn[11])),h=l.range()}return u.type=function(){return"rainbow"},u.id=function(t){return arguments.length?(e=t,u):e},u.colors=function(t){return arguments.length?(h=t,u):h},u.clone=function(t){return c[t]=i(t,this.color()),c[t]},u.cloneNotExists=function(t){return c[t]?c[t]:this.clone(t)},u["switch"]=function(t,n){return e===t?this:arguments.length?r(t,n):r()},u}var o=["category10","category20","category20b","category20c"],a=["Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3"],u=["hpcc10","hpcc20"],s={},c={},f=function(e,r,o,a,u){t.select(e).selectAll(".palette").data(n(),function(t){return t}).enter().append("span").attr("class","palette").attr("title",function(t){return t}).on("click",function(e){console.log(t.values(e.value).map(JSON.stringify).join("\n"))}).selectAll(".swatch").data(function(t){return n(t).colors()}).enter().append("span").attr("class","swatch").style("background-color",function(t){return t}),t.select(r).selectAll(".palette").data(i(),function(t){return t}).enter().append("span").attr("class","palette").attr("title",function(t){return t}).on("click",function(e){console.log(t.values(e.value).map(JSON.stringify).join("\n"))}).selectAll(".swatch2").data(function(t){return i(t).colors()}).enter().append("span").attr("class","swatch2").style("height","8px").style("background-color",function(t){return t});var s={id:a.join("_")+u,scale:i("custom",a,u)};t.select(o).selectAll(".palette").data([s],function(t){return t.id}).enter().append("span").attr("class","palette").attr("title",function(t){return"aaa"}).on("click",function(e){console.log(t.values(e.value).map(JSON.stringify).join("\n"))}).selectAll(".swatch2").data(function(t){for(var e=[],n=0;255>=n;++n)e.push(s.scale(n,0,255));return e}).enter().append("span").attr("class","swatch2").style("background-color",function(t){return t})};return{ordinal:e,rainbow:r,test:f}}),define("css!src/common/Surface",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/Surface",["d3","./SVGWidget","./Icon","./Shape","./Text","./FAChar","./Menu","css!./Surface"],e):t.common_Surface=e(t.d3,t.common_SVGWidget,t.common_Icon,t.common_Shape,t.common_Text,t.common_FAChar,t.common_Menu)}(this,function(t,e,n,r,i,o,a){function u(){e.call(this),this._icon=(new n).faChar("").paddingPercent(50),this._container=(new r)["class"]("container").shape("rect"),this._titleRect=(new r)["class"]("title").shape("rect"),this._text=(new i)["class"]("title"),this._menu=(new a).paddingPercent(0);var t=this;this._menu.preShowMenu=function(){t.content()&&t.content().hasOverlay()&&t.content().visible(!1)},this._menu.postHideMenu=function(){t.content()&&t.content().hasOverlay()&&t.content().visible(!0)},this._surfaceButtons=[]}return u.prototype=Object.create(e.prototype),u.prototype.constructor=u,u.prototype._class+=" common_Surface",u.prototype.publish("showTitle",!0,"boolean","Show Title",null,{tags:["Basic"]}),u.prototype.publish("title","","string","Title",null,{tags:["Basic"]}),u.prototype.publishProxy("titleFontSize","_text","fontSize"),u.prototype.publish("showIcon",!0,"boolean","Show Title",null,{tags:["Advanced"]}),u.prototype.publishProxy("icon_faChar","_icon","faChar"),u.prototype.publishProxy("icon_shape","_icon","shape"),u.prototype.publish("content",null,"widget","Content",null,{tags:["Private"]}),u.prototype.publish("buttonAnnotations",[],"array","Button Array",null,{tags:["Intermediate"]}),u.prototype.publish("buttonGutter",25,"number","Space Between Menu and Buttons",null,{tags:["Intermediate"]}),u.prototype.publish("showContent",!0,"boolean","Show Content",null,{tags:["Intermediate"]}),u.prototype.publish("menu",[],"array","Menu List Data",null,{tags:["Intermediate"]}),u.prototype.publish("menuPadding",2,"number","Menu Padding",null,{tags:["Advanced"]}),u.prototype._origMenuParam=u.prototype.menu,u.prototype.menu=function(t){return u.prototype._origMenuParam.apply(this,arguments),arguments.length?(this._menu.data(t),this):this._menu.data()},u.prototype._origShowContent=u.prototype.showContent,u.prototype.showContent=function(t){var e=u.prototype._origShowContent.apply(this,arguments);return arguments.length&&this.content()&&this.content().visible(this.showContent()),e},u.prototype.enter=function(n,r){e.prototype.enter.apply(this,arguments);var i=r.append("g").attr("class","frame"),o=i.node();this._clipRect=i.append("defs").append("clipPath").attr("id",this.id()+"_clip").append("rect").attr("x",0).attr("y",0).attr("width",this._size.width).attr("height",this._size.height),this._titleRect.target(o).render().display(this.showTitle()&&this.showIcon()),this._icon.target(o).render(),this._menu.target(n),this._text.target(o),this._container.target(o),this.buttonContainer=t.select(this._target).append("div").attr("class","svg-button-container")},u.prototype.update=function(n,r){e.prototype.update.apply(this,arguments);var i=this,o=this.width()-1,a=this.height()-1;this._icon.display(this.showTitle()&&this.showIcon()).shape(this.icon_shape()).render(),this._menu.render(),this._text.text(this.title()).display(this.showTitle()).render();var u=this.buttonContainer.selectAll(".surface-button").data(this.buttonAnnotations());u.enter().append("button").attr("class","surface-button").each(function(e,n){var r=i._surfaceButtons[n]=t.select(this).attr("class","surface-button "+(e["class"]?e["class"]:"")).attr("id",e.id).style("padding",e.padding).style("width",e.width).style("height",e.height).style("cursor","pointer").on("click",function(t){i.click(t)});"FontAwesome"===e.font?r.append("i").attr("class","fa").text(function(t){return e.label}):r.text(function(t){return e.label})}),u.exit().each(function(e,n){var r=t.select(this);delete i._surfaceButtons[n],r.remove()});var s=this.showTitle()?Math.max.apply(null,this._surfaceButtons.map(function(t){return t.node().offsetHeight})):0,c=this.showTitle()&&this.showIcon()?this._icon.getBBox(!0):{width:0,height:0},f=this._text.getBBox(!0),l=this._menu.getBBox(!0),h=Math.max(c.height,f.height,l.height,s),d=this.showTitle()?h:0,p=(-a+h)/2,g=this.showTitle()?Math.max(f.height,l.height,s):0,m=g>=d?0:(d-g)/2,y=m;this._titleRect.pos({x:y,y:p}).width(o-2*y).height(g).display(this.showTitle()).render(),this._icon.move({x:-o/2+c.width/2,y:p}),this._menu.move({x:o/2-l.width/2-this.menuPadding(),y:p}),this._text.move({x:(c.width/2-l.width/2)/2,y:p});var v=i._titleRect.node().getBoundingClientRect().left+(i._size.width-2*y)-i.buttonGutter()-this.buttonContainer.node().offsetWidth,b=i._titleRect.node().getBoundingClientRect().top+(g-this.buttonContainer.node().offsetHeight)/2;if(isNaN(v)||this.buttonContainer.style("left",v+"px"),isNaN(b)||this.buttonContainer.style("top",b+"px"),this.showTitle()?this._container.pos({x:y/2,y:d/2-m/2}).width(o-y).height(a-d+m).render():this._container.pos({x:0,y:0}).width(o).height(a).render(),this.showContent()){var _=y,x=d-m,w=r.selectAll(".content").data(this.content()?[this.content()]:[],function(t){return t._id});w.enter().append("g").attr("class","content").attr("clip-path","url(#"+this.id()+"_clip)").each(function(t){t.target(this)}),w.attr("transform","translate("+y/2+", "+(d/2-m/2)+")").each(function(t){var e={left:0,top:0,right:1,bottom:1};t.resize({width:o-_-(e.left+e.right),height:a-x-(e.top+e.bottom)})}),this.content()&&this._clipRect.attr("x",-(o-_)/2).attr("y",-(a-x)/2).attr("width",o-_).attr("height",a-x),w.exit().transition().each(function(t){t.target(null)}).remove()}this._menu.element()&&this._menu.element().node()&&this._menu.element().node().parentNode&&this._menu.element().node().parentNode.appendChild(this._menu.element().node())},u.prototype.exit=function(t,n){this._titleRect.target(null),this._icon.target(null),this._menu.target(null),this._text.target(null),this._container.target(null),this.content()&&this.content().target(null),e.prototype.exit.apply(this,arguments)},u.prototype.intersection=function(t,e){var n=[],r=this._icon.intersection(t,e,this._pos);r&&n.push({i:r,d:this.distance(r,e)});var i=this._titleRect.intersection(t,e);i&&n.push({i:i,d:this.distance(i,e)});var o=this._container.intersection(t,e);o&&n.push({i:o,d:this.distance(o,e)});var a=null;return n.forEach(function(t){(null===a||a.d>t.d)&&(a=t)}),a&&a.i?a.i:null},u.prototype.click=function(t,e){console.log("Clicked: "+t.id)},u}),define("css!src/common/ResizeSurface",[],function(){}),function(t,e){"function"==typeof define&&define.amd?define("src/common/ResizeSurface",["d3","./Surface","css!./ResizeSurface"],e):t.common_ResizeSurface=e(t.d3,t.common_Surface)}(this,function(t,e){function n(){e.call(this),this.handleWidth=8,this.handles=[{loc:"NW"},{loc:"N"},{loc:"NE"},{loc:"E"},{loc:"SE"},{loc:"S"},{loc:"SW"},{loc:"W"}];var n=this;this.dispatch=t.dispatch("sizestart","size","sizeend"),this.drag=t.behavior.drag().origin(function(t){return t}).on("dragstart",function(e){n.dispatch.sizestart(n,e.loc),n.allowResize()&&(t.event.sourceEvent.stopPropagation(),n._dragHandlePos={x:e.x,y:e.y},n._dragStartPos=n.pos(),n._dragStartSize=n.size(),n._prevPosSize={x:n._dragStartPos.x,y:n._dragStartPos.y,width:n._dragStartSize.width,height:n._dragStartSize.height},n._textPosSize=n._text.getBBox(!0),n._iconPosSize=n._icon.getBBox(!0),n.showContent(!1))}).on("drag",function(e){if(n.allowResize()){t.event.sourceEvent.stopPropagation();var r=t.event.x-n._dragHandlePos.x,i=t.event.y-n._dragHandlePos.y,o={x:0,y:0,w:0,h:0};switch(e.loc){case"NW":o.x=r/2,o.w=-r;case"N":o.y=i/2,o.h=-i;break;case"NE":o.y=i/2,o.h=-i;case"E":o.x=r/2,o.w=r;break;case"SE":o.x=r/2,o.w=r;case"S":o.y=i/2,o.h=i;break;case"SW":o.y=i/2,o.h=i;case"W":o.x=r/2,o.w=-r}var a={x:n._dragStartPos.x+o.x,y:n._dragStartPos.y+o.y,width:n._dragStartSize.width+o.w,height:n._dragStartSize.height+o.h};a.width<2*n._iconPosSize.width+n._textPosSize.width&&(a.x=n._prevPosSize.x,a.width=n._prevPosSize.width),a.heighty)return"ascending"===n?-1:1;if(y>v)return"ascending"===n?1:-1}for(var b=0,_=Math.max(g.length,m.length);_>b;b++){if(o=!(g[b]||"").match(l)&&parseFloat(g[b])||g[b]||0,a=!(m[b]||"").match(l)&&parseFloat(m[b])||m[b]||0,isNaN(o)!==isNaN(a))return isNaN(o)?1:-1;if(typeof o!=typeof a&&(o+="",a+=""),a>o)return"ascending"===n?-1:1;if(o>a)return"ascending"===n?1:-1}return 0}function r(){this.items={}}function i(t){this._widgetElement=t}return r.prototype.clear=function(){for(var t in this.items)this.items[t].element().classed("selected",!1);this.items={}},r.prototype.isEmpty=function(){for(var t in this.items)return!1;return!0},r.prototype.append=function(t){this.items[t._id]=t,t.element().classed("selected",!0)},r.prototype.remove=function(t){this.items[t._id].element().classed("selected",!1),delete this.items[t._id]},r.prototype.isSelected=function(t){return void 0!==this.items[t._id]},r.prototype.get=function(){var t=[];for(var e in this.items)t.push(this.items[e]);return t},r.prototype.set=function(t){this.clear(),t.forEach(function(t,e){this.append(t)},this)},r.prototype.click=function(t,e){e.ctrlKey?this.items[t._id]?this.remove(t):this.append(t):(this.clear(),this.append(t))},i.prototype.enter=function(e,n){var r=this;e.on("click.SimpleSelection",function(e,n){var i=t.select(this),o=i.classed("selected");r._widgetElement.selectAll(".selected").classed("selected",null),o||i.classed("selected",!0)}).on("mouseover.SimpleSelection",function(e,n){t.select(this).classed("over",!0)}).on("mouseout.SimpleSelection",function(e,n){t.select(this).classed("over",null)})},i.prototype.selected=function(e){return t.select(e).classed("selected")},{naturalSort:function(t,e,r,i){return t.slice(0).sort(function(t,o){return n(t,o,e,r,i)})},multiSort:function(e,n){return e.sort(function(e,r){for(var i=0;ir.length)&&(n=r.length),n-=e.length;var i=r.indexOf(e,n);return-1!==i&&i===n},d3ArrayAdapter:function(t){return{ownerDocument:{createElement:function(e){return{get __data__(){return this.row},set __data__(e){this.row=t[this.index]=e}}},createElementNS:function(t,e){return this.createElement(e)}},querySelectorAll:function(e){if(e)throw"unsupported";var n=this;return t.map(function(e,r){return{ownerDocument:n.ownerDocument,parentNode:n,get __data__(){return e},set __data__(e){t[r]=e}}})},appendChild:function(e){return e.parentNode=this,e.index=t.length,t.push(null),e},insertBefore:function(e,n){var r=t.indexOf(e.__data__),i=t.indexOf(n.__data__);return r>i?t.splice(i,0,t.splice(r,1)[0]):i-1>r&&t.splice(i-1,0,t.splice(r,1)[0]),e},removeChild:function(e){return t.splice(t.indexOf(e.__data__),1),e}}},downloadBlob:function(e,n,r){r=r||"data";var i=new Date,o=t.time.format("%Y-%m-%dT%H_%M_%S"),a=o(i),u=r+"_"+a+"."+e.toLowerCase(),s="";switch(e){case"TSV":s="text/tab-seperated-values";break;case"JSON":s="application/json";break;default:s="text/csv"}var c=document.createElement("a");if(navigator.msSaveBlob)return c=null,navigator.msSaveBlob(new Blob([n],{type:s}),u);if("download"in c)return c.href="data:"+s+","+encodeURIComponent(n),c.setAttribute("download",u),document.body.appendChild(c),setTimeout(function(){c.click(),document.body.removeChild(c)},10),!0;c=null;var f=document.createElement("iframe");return document.body.appendChild(f),f.src="data:"+s+","+encodeURIComponent(n),setTimeout(function(){document.body.removeChild(f)},100),!0},requireWidget:function(t){return new Promise(function(n,r){var i=t.split("."),o="../"+i[0].split("_").join("/");e([o],function(t){n(i.length>1?t[i[1]]:t)})})}}}),function(t,e){"function"==typeof define&&define.amd?define("src/common/WidgetArray",["./Widget"],e):t.common_WidgetArray=e(t.common_Widget)}(this,function(t){function e(){t.call(this)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype._class+=" common_WidgetArray",e.prototype.publish("content",[],"widgetArray","Widget Array"),e.prototype.target=function(t){t||(this.content_reset(),this.exit())},e}),function(t){var e=document,n="appendChild",r="styleSheet",i=e.createElement("style");i.type="text/css",e.getElementsByTagName("head")[0][n](i),i[r]?i[r].cssText=t:i[n](e.createTextNode(t))}(".common_Text{fill:#000;font-size:12px}.common_FAChar .common_Text{font-size:14px}.common_Shape{fill:#1f77b4;stroke:#1f77b4}.common_Icon .common_FAChar .common_Text{fill:#fff}.common_TextBox .common_Shape{fill:#dcf1ff;stroke:#1f77b4}.common_List .common_TextBox .common_Shape{fill:#dcf1ff;stroke:#dcf1ff}.common_List .common_TextBox .common_Text{pointer-events:none}.common_List .common_TextBox .common_Shape:hover{fill:#fff;stroke:#fff}.common_Menu .common_FAChar{fill:#fff;cursor:pointer}.common_Menu.disabled .common_FAChar{visibility:hidden;cursor:inherit}.common_Menu .common_List .common_TextBox .common_Shape{fill:#1f77b4;stroke:#1f77b4}.common_Menu .common_List .common_TextBox .common_Text{fill:#fff}.common_Menu .common_List .common_TextBox .common_Shape:hover{fill:#ff7f0e;stroke:#ff7f0e}.common_Surface .container .common_Shape{fill:#f9fcff;stroke:#1f77b4;stroke-width:1px}.common_Surface .title{cursor:move}.common_Surface .title .common_Shape{fill:#1f77b4;stroke:#1f77b4;stroke-width:1px}.common_Surface .title text{fill:#fff;stroke:none}.svg-button-container{position:fixed}.svg-button-container .surface-button{position:relative;background:0 0;border:none;opacity:.8;color:#fff}.svg-button-container .surface-button:hover{opacity:1}.svg-button-container .surface-button:active{opacity:.5}.resizeN{cursor:ns-resize;opacity:0}.resizeE,.resizeNE{cursor:ne-resize;opacity:0}.resizeE{cursor:ew-resize}.resizeS,.resizeSE{cursor:se-resize;opacity:0}.resizeS{cursor:ns-resize}.resizeSW,.resizeW{cursor:sw-resize;opacity:0}.resizeW{cursor:ew-resize}.resizeNW{cursor:nw-resize;opacity:0}"),define("hpcc-viz-common",function(){});