/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.apm_bundle_jsonpfunction=window.apm_bundle_jsonpfunction||[]).push([[1],{114:function(n,t,e){"use strict";e.d(t,"a",(function(){return u}));var r=e(1),i=e(129);function u(){return Object(r.useContext)(i.a)}},122:function(n,t,e){"use strict";e.d(t,"a",(function(){return i})),e(981);var r=e(46);function i(n){const t=null==n?void 0:n.get(r.UI_SETTINGS.DATEFORMAT_TZ);return t&&"Browser"!==t?t:"local"}e(18)},129:function(n,t,e){"use strict";e.d(t,"a",(function(){return u})),e.d(t,"b",(function(){return o}));var r=e(1),i=e.n(r);const u=Object(r.createContext)({incrementTimeRangeId:()=>{},timeRangeId:0});function o({children:n}){const[t,e]=Object(r.useState)(0),o=Object(r.useMemo)((()=>({incrementTimeRangeId:()=>e((n=>n+1)),timeRangeId:t})),[t,e]);return i.a.createElement(u.Provider,{value:o},n)}},73:function(n,t,e){"use strict";e.d(t,"a",(function(){return f})),e.d(t,"b",(function(){return s})),e.d(t,"c",(function(){return p}));var r=e(0),i=e(1),u=e.n(i),o=e(21),a=e(22),c=e(114),l=e(82);let f;!function(n){n.LOADING="loading",n.SUCCESS="success",n.FAILURE="failure",n.NOT_INITIATED="not_initiated"}(f||(f={}));const s=n=>n===f.LOADING||n===f.NOT_INITIATED,h=(n,t)=>(e,r)=>Object(l.callApmApi)(e,{...r,signal:n}).catch((n=>{var e;throw t({status:f.FAILURE,data:null===(e=n.body)||void 0===e?void 0:e.attributes}),n})).then((n=>(t({data:n,status:f.SUCCESS}),n)));function p(n,t,e={}){const{notifications:l}=Object(o.useKibana)(),{preservePreviousData:s=!0,showToastOnError:p=!0}=e,[g,v]=Object(i.useState)({data:void 0,status:f.NOT_INITIATED}),[d,y]=Object(i.useState)(0),{timeRangeId:m}=Object(c.a)(),{addInspectorRequest:M}=Object(a.useInspectorContext)();return Object(i.useEffect)((()=>{let t=new AbortController;return async function(){t.abort(),t=new AbortController;const e=t.signal,i=n(h(e,M));if(i){v((n=>({data:s?n.data:void 0,status:f.LOADING,error:void 0})));try{const n=await i;e.aborted||v({data:n,status:f.SUCCESS,error:void 0})}catch(n){const t=n;if(!e.aborted){const e="response"in t?function(n){var t,e,i,o,a;const c=null!==(t=null===(e=n.body)||void 0===e?void 0:e.message)&&void 0!==t?t:null===(i=n.response)||void 0===i?void 0:i.statusText;return u.a.createElement(u.a.Fragment,null,c," (",null===(o=n.response)||void 0===o?void 0:o.status,")",u.a.createElement("h5",null,r.i18n.translate("xpack.apm.fetcher.error.url",{defaultMessage:"URL"})),null===(a=n.response)||void 0===a?void 0:a.url)}(t):t.message;p&&l.toasts.danger({title:r.i18n.translate("xpack.apm.fetcher.error.title",{defaultMessage:"Error while fetching resource"}),body:u.a.createElement("div",null,u.a.createElement("h5",null,r.i18n.translate("xpack.apm.fetcher.error.status",{defaultMessage:"Error"})),e)}),v({data:void 0,status:f.FAILURE,error:n})}}}}(),()=>{t.abort()}}),[d,s,m,p,...t]),Object(i.useMemo)((()=>({...g,refetch:()=>{y((n=>n+1))}})),[g])}},80:function(n,t,e){"use strict";e.d(t,"a",(function(){return u}));var r=e(1),i=e(40);function u(){return Object(r.useContext)(i.ThemeContext)}},981:function(n,t,e){var r,i;!function(){var u={version:"3.5.17"},o=[].slice,a=function(n){return o.call(n)},c=this.document;function l(n){return n&&(n.ownerDocument||n.document||n).documentElement}function f(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}if(c)try{a(c.documentElement.childNodes)[0].nodeType}catch(n){a=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),c)try{c.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var s=this.Element.prototype,h=s.setAttribute,p=s.setAttributeNS,g=this.CSSStyleDeclaration.prototype,v=g.setProperty;s.setAttribute=function(n,t){h.call(this,n,t+"")},s.setAttributeNS=function(n,t,e){p.call(this,n,t,e+"")},g.setProperty=function(n,t,e){v.call(this,n,t+"",e)}}function d(n,t){return nt?1:n>=t?0:NaN}function y(n){return null===n?NaN:+n}function m(n){return!isNaN(n)}function M(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)<0?r=u+1:i=u}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;n(t[u],e)>0?i=u:r=u+1}return r}}}u.ascending=d,u.descending=function(n,t){return tn?1:t>=n?0:NaN},u.min=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},u.max=function(n,t){var e,r,i=-1,u=n.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},u.extent=function(n,t){var e,r,i,u=-1,o=n.length;if(1===arguments.length){for(;++u=r){e=i=r;break}for(;++ur&&(e=r),i=r){e=i=r;break}for(;++ur&&(e=r),i1)return o/(c-1)},u.deviation=function(){var n=u.variance.apply(this,arguments);return n?Math.sqrt(n):n};var x=M(d);function b(n){return n.length}u.bisectLeft=x.left,u.bisect=u.bisectRight=x.right,u.bisector=function(n){return M(1===n.length?function(t,e){return d(n(t),e)}:n)},u.shuffle=function(n,t,e){(u=arguments.length)<3&&(e=n.length,u<2&&(t=0));for(var r,i,u=e-t;u;)i=Math.random()*u--|0,r=n[u+t],n[u+t]=n[i+t],n[i+t]=r;return n},u.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},u.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t=0;)for(t=(r=n[i]).length;--t>=0;)e[--o]=r[t];return e};var _=Math.abs;function w(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function S(){this._=Object.create(null)}u.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],u=function(n){for(var t=1;n*t%1;)t*=10;return t}(_(e)),o=-1;if(n*=u,t*=u,(e*=u)<0)for(;(r=n+e*++o)>t;)i.push(r/u);else for(;(r=n+e*++o)=r.length)return t?t.call(e,u):n?u.sort(n):u;for(var c,l,f,s,h=-1,p=u.length,g=r[a++],v=new S;++h=r.length)return n;var e=[],u=i[t++];return n.forEach((function(n,r){e.push({key:n,values:a(r,t)})})),u?e.sort((function(n,t){return u(n.key,t.key)})):e}return e.map=function(n,t){return o(t,n,0)},e.entries=function(n){return a(o(u.map,n,0),0)},e.key=function(n){return r.push(n),e},e.sortKeys=function(n){return i[r.length-1]=n,e},e.sortValues=function(t){return n=t,e},e.rollup=function(n){return t=n,e},e},u.set=function(n){var t=new R;if(n)for(var e=0,r=n.length;e=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},u.event=null,u.requote=function(n){return n.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,X={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]};function $(n){return X(n,J),n}var B=function(n,t){return t.querySelector(n)},G=function(n,t){return t.querySelectorAll(n)},W=function(n,t){var e=n.matches||n[U(n,"matchesSelector")];return W=function(n,t){return e.call(n,t)},W(n,t)};"function"==typeof Sizzle&&(B=function(n,t){return Sizzle(n,t)[0]||null},G=Sizzle,W=Sizzle.matchesSelector),u.selection=function(){return u.select(c.documentElement)};var J=u.selection.prototype=[];function K(n){return"function"==typeof n?n:function(){return B(n,this)}}function Q(n){return"function"==typeof n?n:function(){return G(n,this)}}J.select=function(n){var t,e,r,i,u=[];n=K(n);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),tn.hasOwnProperty(e)?{space:tn[e],local:n}:n}},J.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return(n=u.ns.qualify(n)).local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(en(t,n[t]));return this}return this.each(en(n,t))},J.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=on(n)).length,i=-1;if(t=e.classList){for(;++i=0;)(e=r[i])&&(u&&u!==e.nextSibling&&u.parentNode.insertBefore(e,u),u=e);return this},J.sort=function(n){n=vn.apply(this,arguments);for(var t=-1,e=this.length;++t0&&(n=n.slice(0,i));var c=xn.get(n);function l(){var t=this[r];t&&(this.removeEventListener(n,t,t.$),delete this[r])}return c&&(n=c,o=_n),i?t?function(){var i=o(t,a(arguments));l.call(this),this.addEventListener(n,this[r]=i,i.$=e),i._=t}:l:t?P:function(){var t,e=new RegExp("^__on([^.]+)"+u.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}u.selection.enter=yn,u.selection.enter.prototype=mn,mn.append=J.append,mn.empty=J.empty,mn.node=J.node,mn.call=J.call,mn.size=J.size,mn.select=function(n){for(var t,e,r,i,u,o=[],a=-1,c=this.length;++a=r&&(r=t+1);!(o=a[r])&&++r0?1:n<0?-1:0}function On(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function Pn(n){return n>1?0:n<-1?Ln:Math.acos(n)}function In(n){return n>1?Rn:n<-1?-Rn:Math.asin(n)}function Fn(n){return((n=Math.exp(n))+1/n)/2}function Hn(n){return(n=Math.sin(n/2))*n}var Yn=Math.SQRT2;u.interpolateZoom=function(n,t){var e,r,i=n[0],u=n[1],o=n[2],a=t[0],c=t[1],l=t[2],f=a-i,s=c-u,h=f*f+s*s;if(h0&&(n=n.transition().duration(v)),n.call(_.event)}function E(){a&&a.domain(o.range().map((function(n){return(n-h.x)/h.k})).map(o.invert)),s&&s.domain(l.range().map((function(n){return(n-h.y)/h.k})).map(l.invert))}function A(n){d++||n({type:"zoomstart"})}function C(n){E(),n({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function T(n){--d||(n({type:"zoomend"}),t=null)}function L(){var n=this,t=b.of(n,arguments),e=0,r=u.select(f(n)).on(m,(function(){e=1,N(u.mouse(n),i),C(t)})).on(M,(function(){r.on(m,null).on(M,null),o(e),T(t)})),i=w(u.mouse(n)),o=Nn(n);Ta.call(n),A(t)}function z(){var n,t=this,e=b.of(t,arguments),r={},o=0,a=".zoom-"+u.event.changedTouches[0].identifier,c="touchmove"+a,l="touchend"+a,f=[],s=u.select(t),p=Nn(t);function g(){var e=u.touches(t);return n=h.k,e.forEach((function(n){n.identifier in r&&(r[n.identifier]=w(n))})),e}function v(){var n=u.event.target;u.select(n).on(c,d).on(l,m),f.push(n);for(var e=u.event.changedTouches,a=0,s=e.length;a1){y=p[0];var M=p[1],x=y[0]-M[0],b=y[1]-M[1];o=x*x+b*b}}function d(){var a,c,l,f,s=u.touches(t);Ta.call(t);for(var h=0,p=s.length;h360?n-=360:n<0&&(n+=360),n<60?r+(i-r)*n/60:n<180?i:n<240?r+(i-r)*(240-n)/60:r}(n))}return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(e=e<0?0:e>1?1:e)-(i=e<=.5?e*(1+t):e+t-e*t),new ft(u(n+120),u(n),u(n-120))}function Jn(n,t,e){return this instanceof Jn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof Jn?new Jn(n.h,n.c,n.l):function(n,t,e){return n>0?new Jn(Math.atan2(e,t)*jn,Math.sqrt(t*t+e*e),n):new Jn(NaN,NaN,n)}(n instanceof nt?n.l:(n=yt((n=u.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new Jn(n,t,e)}Gn.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new Bn(this.h,this.s,this.l/n)},Gn.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new Bn(this.h,this.s,n*this.l)},Gn.rgb=function(){return Wn(this.h,this.s,this.l)},u.hcl=Jn;var Kn=Jn.prototype=new $n;function Qn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new nt(e,Math.cos(n*=Dn)*t,Math.sin(n)*t)}function nt(n,t,e){return this instanceof nt?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof nt?new nt(n.l,n.a,n.b):n instanceof Jn?Qn(n.h,n.c,n.l):yt((n=ft(n)).r,n.g,n.b):new nt(n,t,e)}Kn.brighter=function(n){return new Jn(this.h,this.c,Math.min(100,this.l+tt*(arguments.length?n:1)))},Kn.darker=function(n){return new Jn(this.h,this.c,Math.max(0,this.l-tt*(arguments.length?n:1)))},Kn.rgb=function(){return Qn(this.h,this.c,this.l).rgb()},u.lab=nt;var tt=18,et=.95047,rt=1,it=1.08883,ut=nt.prototype=new $n;function ot(n,t,e){var r=(n+16)/116,i=r+t/500,u=r-e/200;return new ft(lt(3.2404542*(i=at(i)*et)-1.5371385*(r=at(r)*rt)-.4985314*(u=at(u)*it)),lt(-.969266*i+1.8760108*r+.041556*u),lt(.0556434*i-.2040259*r+1.0572252*u))}function at(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function ct(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function lt(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ft(n,t,e){return this instanceof ft?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof ft?new ft(n.r,n.g,n.b):vt(""+n,ft,Wn):new ft(n,t,e)}function st(n){return new ft(n>>16,n>>8&255,255&n)}function ht(n){return st(n)+""}ut.brighter=function(n){return new nt(Math.min(100,this.l+tt*(arguments.length?n:1)),this.a,this.b)},ut.darker=function(n){return new nt(Math.max(0,this.l-tt*(arguments.length?n:1)),this.a,this.b)},ut.rgb=function(){return ot(this.l,this.a,this.b)},u.rgb=ft;var pt=ft.prototype=new $n;function gt(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function vt(n,t,e){var r,i,u,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Mt(i[0]),Mt(i[1]),Mt(i[2]))}return(u=xt.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,c=15&u,c|=c<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,c=255&u)),t(o,a,c))}function dt(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,c=(o+u)/2;return a?(i=c<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t0&&c<1?0:r),new Bn(r,i,c)}function yt(n,t,e){var r=ct((.4124564*(n=mt(n))+.3575761*(t=mt(t))+.1804375*(e=mt(e)))/et),i=ct((.2126729*n+.7151522*t+.072175*e)/rt);return nt(116*i-16,500*(r-i),200*(i-ct((.0193339*n+.119192*t+.9503041*e)/it)))}function mt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Mt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}pt.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&t=200&&t<300||304===t){try{n=e.call(i,l)}catch(n){return void o.error.call(i,n)}o.load.call(i,n)}else o.error.call(i,l)}return this.XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(n)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=s:l.onreadystatechange=function(){l.readyState>3&&s()},l.onprogress=function(n){var t=u.event;u.event=n;try{o.progress.call(i,l)}finally{u.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?c[n]:(null==t?delete c[n]:c[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(f=n,i):f},i.response=function(n){return e=n,i},["get","post"].forEach((function(n){i[n]=function(){return i.send.apply(i,[n].concat(a(arguments)))}})),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),l.open(e,n,!0),null==t||"accept"in c||(c.accept=t+",*/*"),l.setRequestHeader)for(var a in c)l.setRequestHeader(a,c[a]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=f&&(l.responseType=f),null!=u&&i.on("error",u).on("load",(function(n){u(null,n)})),o.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},u.rebind(i,o,"on"),null==r?i:i.get(function(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}(r))}xt.forEach((function(n,t){xt.set(n,st(t))})),u.functor=bt,u.xhr=_t(D),u.dsv=function(n,t){var e=new RegExp('["'+n+"\n]"),r=n.charCodeAt(0);function i(n,e,r){arguments.length<3&&(r=e,e=null);var i=wt(n,t,null==e?u:o(e),r);return i.row=function(n){return arguments.length?i.response(null==(e=n)?u:o(n)):e},i}function u(n){return i.parse(n.responseText)}function o(n){return function(t){return i.parse(t.responseText,n)}}function a(t){return t.map(c).join(n)}function c(n){return e.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}return i.parse=function(n,t){var e;return i.parseRows(n,(function(n,r){if(e)return e(n,r-1);var i=new Function("d","return {"+n.map((function(n,t){return JSON.stringify(n)+": d["+t+"]"})).join(",")+"}");e=t?function(n,e){return t(i(n),e)}:i}))},i.parseRows=function(n,t){var e,i,u={},o={},a=[],c=n.length,l=0,f=0;function s(){if(l>=c)return o;if(i)return i=!1,u;var t=l;if(34===n.charCodeAt(t)){for(var e=t;e++24?(isFinite(t)&&(clearTimeout(Et),Et=setTimeout(Tt,t)),kt=0):(kt=1,At(Tt))}function Lt(){for(var n=Date.now(),t=St;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function zt(){for(var n,t=St,e=1/0;t;)t.c?(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}));function Dt(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,o=r&&e?function(n,t){for(var i=n.length,u=[],o=0,a=r[0],c=0;i>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),u.push(n.substring(i-=a,i+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return u.reverse().join(e)}:D;return function(n){var e=jt.exec(n),r=e[1]||" ",a=e[2]||">",c=e[3]||"-",l=e[4]||"",f=e[5],s=+e[6],h=e[7],p=e[8],g=e[9],v=1,d="",y="",m=!1,M=!0;switch(p&&(p=+p.substring(1)),(f||"0"===r&&"="===a)&&(f=r="0",a="="),g){case"n":h=!0,g="g";break;case"%":v=100,y="%",g="f";break;case"p":v=100,y="%",g="r";break;case"b":case"o":case"x":case"X":"#"===l&&(d="0"+g.toLowerCase());case"c":M=!1;case"d":m=!0,p=0;break;case"s":v=-1,g="r"}"$"===l&&(d=i[0],y=i[1]),"r"!=g||p||(g="g"),null!=p&&("g"==g?p=Math.max(1,Math.min(21,p)):"e"!=g&&"f"!=g||(p=Math.max(0,Math.min(20,p)))),g=Ut.get(g)||Ot;var x=f&&h;return function(n){var e=y;if(m&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===c?"":c;if(v<0){var l=u.formatPrefix(n,p);n=l.scale(n),e=l.symbol+y}else n*=v;var b,_,w=(n=g(n,p)).lastIndexOf(".");if(w<0){var S=M?n.lastIndexOf("e"):-1;S<0?(b=n,_=""):(b=n.substring(0,S),_=n.substring(S))}else b=n.substring(0,w),_=t+n.substring(w+1);!f&&h&&(b=o(b,1/0));var N=d.length+b.length+_.length+(x?0:i.length),k=N"===a?k+i+n:"^"===a?k.substring(0,N>>=1)+i+n+k.substring(N):i+(x?n:k+n))+e}}}u.formatPrefix=function(n,t){var e=0;return(n=+n)&&(n<0&&(n*=-1),t&&(n=u.round(n,qt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),Rt[8+e/3]};var jt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ut=u.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=u.round(n,qt(n,t))).toFixed(Math.max(0,Math.min(20,qt(n*(1+1e-15),t))))}});function Ot(n){return n+""}var Pt=u.time={},It=Date;function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}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(){Ht.setUTCDate.apply(this._,arguments)},setDay:function(){Ht.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ht.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ht.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ht.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ht.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ht.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ht.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ht.setTime.apply(this._,arguments)}};var Ht=Date.prototype;function Yt(n,t,e){function r(t){var e=n(t),r=u(e,1);return t-e1)for(;o=l)return-1;if(37===(i=t.charCodeAt(a++))){if(o=t.charAt(a++),!(u=_[o in Xt?t.charAt(a++):o])||(r=u(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}f.utc=function(n){var t=f(n);function e(n){try{var e=new(It=Ft);return e._=n,t(e)}finally{It=Date}}return e.parse=function(n){try{It=Ft;var e=t.parse(n);return e&&e._}finally{It=Date}},e.toString=t.toString,e},f.multi=f.utc.multi=pe;var h=u.map(),p=Wt(o),g=Jt(o),v=Wt(a),d=Jt(a),y=Wt(c),m=Jt(c),M=Wt(l),x=Jt(l);i.forEach((function(n,t){h.set(n.toLowerCase(),t)}));var b={a:function(n){return a[n.getDay()]},A:function(n){return o[n.getDay()]},b:function(n){return l[n.getMonth()]},B:function(n){return c[n.getMonth()]},c:f(t),d:function(n,t){return Gt(n.getDate(),t,2)},e:function(n,t){return Gt(n.getDate(),t,2)},H:function(n,t){return Gt(n.getHours(),t,2)},I:function(n,t){return Gt(n.getHours()%12||12,t,2)},j:function(n,t){return Gt(1+Pt.dayOfYear(n),t,3)},L:function(n,t){return Gt(n.getMilliseconds(),t,3)},m:function(n,t){return Gt(n.getMonth()+1,t,2)},M:function(n,t){return Gt(n.getMinutes(),t,2)},p:function(n){return i[+(n.getHours()>=12)]},S:function(n,t){return Gt(n.getSeconds(),t,2)},U:function(n,t){return Gt(Pt.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Gt(Pt.mondayOfYear(n),t,2)},x:f(e),X:f(r),y:function(n,t){return Gt(n.getFullYear()%100,t,2)},Y:function(n,t){return Gt(n.getFullYear()%1e4,t,4)},Z:se,"%":function(){return"%"}},_={a:function(n,t,e){v.lastIndex=0;var r=v.exec(t.slice(e));return r?(n.w=d.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(n,t,e){p.lastIndex=0;var r=p.exec(t.slice(e));return r?(n.w=g.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(n,t,e){M.lastIndex=0;var r=M.exec(t.slice(e));return r?(n.m=x.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(n,t,e){y.lastIndex=0;var r=y.exec(t.slice(e));return r?(n.m=m.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(n,t,e){return s(n,b.c.toString(),t,e)},d:ue,e:ue,H:ae,I:ae,j:oe,L:fe,m:ie,M:ce,p:function(n,t,e){var r=h.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)},S:le,U:Qt,w:Kt,W:ne,x:function(n,t,e){return s(n,b.x.toString(),t,e)},X:function(n,t,e){return s(n,b.X.toString(),t,e)},y:ee,Y:te,Z:re,"%":he};return f}Pt.year=Yt((function(n){return(n=Pt.day(n)).setMonth(0,1),n}),(function(n,t){n.setFullYear(n.getFullYear()+t)}),(function(n){return n.getFullYear()})),Pt.years=Pt.year.range,Pt.years.utc=Pt.year.utc.range,Pt.day=Yt((function(n){var t=new It(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t}),(function(n,t){n.setDate(n.getDate()+t)}),(function(n){return n.getDate()-1})),Pt.days=Pt.day.range,Pt.days.utc=Pt.day.utc.range,Pt.dayOfYear=function(n){var t=Pt.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(n,t){t=7-t;var e=Pt[n]=Yt((function(n){return(n=Pt.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n}),(function(n,t){n.setDate(n.getDate()+7*Math.floor(t))}),(function(n){var e=Pt.year(n).getDay();return Math.floor((Pt.dayOfYear(n)+(e+t)%7)/7)-(e!==t)}));Pt[n+"s"]=e.range,Pt[n+"s"].utc=e.utc.range,Pt[n+"OfYear"]=function(n){var e=Pt.year(n).getDay();return Math.floor((Pt.dayOfYear(n)+(e+t)%7)/7)}})),Pt.week=Pt.sunday,Pt.weeks=Pt.sunday.range,Pt.weeks.utc=Pt.sunday.utc.range,Pt.weekOfYear=Pt.sundayOfYear;var Xt={"-":"",_:" ",0:"0"},$t=/^\s*\d+/,Bt=/^%/;function Gt(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",u=i.length;return r+(u68?1900:2e3),e+i[0].length):-1}function re(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function ie(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ue(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function oe(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ae(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ce(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function le(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function fe(n,t,e){$t.lastIndex=0;var r=$t.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function se(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=_(t)/60|0,i=_(t)%60;return e+Gt(r,"0",2)+Gt(i,"0",2)}function he(n,t,e){Bt.lastIndex=0;var r=Bt.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function pe(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*u,c=Math.cos(t),l=Math.sin(t),f=i*l,s=r*c+f*Math.cos(a),h=f*o*Math.sin(a);De.add(Math.atan2(h,s)),e=n,r=c,i=l}je.point=function(o,a){je.point=u,e=(n=o)*Dn,r=Math.cos(a=(t=a)*Dn/2+Ln/4),i=Math.sin(a)},je.lineEnd=function(){u(n,t)}}function Oe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function Pe(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Ie(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Fe(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function He(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Ye(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function Ze(n){return[Math.atan2(n[1],n[0]),In(n[2])]}function Ve(n,t){return _(n[0]-t[0])Cn?r=90:l<-Cn&&(t=-90),s[0]=n,s[1]=e}};function p(i,u){f.push(s=[n=i,e=i]),ur&&(r=u)}function g(u,o){var a=Oe([u*Dn,o*Dn]);if(c){var l=Ie(c,a),f=Ie([l[1],-l[0],0],l);Ye(f),f=Ze(f);var s=u-i,h=s>0?1:-1,g=f[0]*jn*h,v=_(s)>180;if(v^(h*ir&&(r=d);else if(v^(h*i<(g=(g+360)%360-180)&&gr&&(r=o);v?ux(n,e)&&(e=u):x(u,e)>x(n,e)&&(n=u):e>=n?(ue&&(e=u)):u>i?x(n,u)>x(n,e)&&(e=u):x(u,e)>x(n,e)&&(n=u)}else p(u,o);c=a,i=u}function v(){h.point=g}function d(){s[0]=n,s[1]=e,h.point=p,c=null}function y(n,t){if(c){var e=n-i;l+=_(e)>180?e+(e>0?360:-360):e}else o=n,a=t;je.point(n,t),g(n,t)}function m(){je.lineStart()}function M(){y(o,a),je.lineEnd(),_(l)>Cn&&(n=-(e=180)),s[0]=n,s[1]=e,c=null}function x(n,t){return(t-=n)<0?t+360:t}function b(n,t){return n[0]-t[0]}function w(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nx(v[0],v[1])&&(v[1]=p[1]),x(p[0],v[1])>x(v[0],v[1])&&(v[0]=p[0])):a.push(v=p);for(var c,l,p,g=-1/0,v=(o=0,a[l=a.length-1]);o<=l;v=p,++o)p=a[o],(c=x(v[1],p[0]))>g&&(g=c,n=p[0],e=v[1])}return f=s=null,n===1/0||t===1/0?[[NaN,NaN],[NaN,NaN]]:[[n,t],[e,r]]}}(),u.geo.centroid=function(n){Se=Ne=ke=Ee=Ae=Ce=Te=Le=ze=qe=Re=0,u.geo.stream(n,Xe);var t=ze,e=qe,r=Re,i=t*t+e*e+r*r;return i=0;--a)i.point((s=f[a])[0],s[1]);else r(p.x,p.p.x,-1,i);p=p.p}f=(p=p.o).z,g=!g}while(!p.v);i.lineEnd()}}}function tr(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r=0?1:-1,w=_*b,S=w>Ln,N=g*M;if(De.add(Math.atan2(N*_*Math.sin(w),v*x+N*Math.cos(w))),u+=S?b+_*zn:b,S^h>=e^y>=e){var k=Ie(Oe(s),Oe(n));Ye(k);var E=Ie(i,k);Ye(E);var A=(S^b>=0?-1:1)*In(E[2]);(r>A||r===A&&(k[0]||k[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=y,g=M,v=x,s=n}}return(u<-Cn||u0){for(M||(o.polygonStart(),M=!0),o.lineStart();++u1&&2&t&&e.push(e.pop().concat(e.shift())),a.push(e.filter(ir))}return f}}function ir(n){return n.length>1}function ur(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:P,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function or(n,t){return((n=n.x)[0]<0?n[1]-Rn-Cn:Rn-n[1])-((t=t.x)[0]<0?t[1]-Rn-Cn:Rn-t[1])}var ar=rr(Qe,(function(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(u,o){var a=u>0?Ln:-Ln,c=_(u-e);_(c-Ln)0?Rn:-Rn),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(u,r),t=0):i!==a&&c>=Ln&&(_(e-i)Cn?Math.atan((Math.sin(t)*(u=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*u*o)):(t+r)/2}(e,r,u,o),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=u,r=o),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}),(function(n,t,e,r){var i;if(null==n)i=e*Rn,r.point(-Ln,i),r.point(0,i),r.point(Ln,i),r.point(Ln,0),r.point(Ln,-i),r.point(0,-i),r.point(-Ln,-i),r.point(-Ln,0),r.point(-Ln,i);else if(_(n[0]-t[0])>Cn){var u=n[0]0)){if(u/=h,h<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=e-c,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>f&&(f=u)}else if(h>0){if(u0)){if(u/=p,p<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=r-l,p||!(u<0)){if(u/=p,p<0){if(u>s)return;u>f&&(f=u)}else if(p>0){if(u0&&(i.a={x:c+f*h,y:l+f*p}),s<1&&(i.b={x:c+s*h,y:l+s*p}),i}}}}}}var lr=1e9;function fr(n,t,e,r){return function(c){var l,f,s,h,p,g,v,d,y,m,M,x=c,b=ur(),_=cr(n,t,e,r),w={point:k,lineStart:function(){w.point=E,f&&f.push(s=[]),m=!0,y=!1,v=d=NaN},lineEnd:function(){l&&(E(h,p),g&&y&&b.rejoin(),l.push(b.buffer())),w.point=k,y&&c.lineEnd()},polygonStart:function(){c=b,l=[],f=[],M=!0},polygonEnd:function(){c=x,l=u.merge(l);var t=function(n){for(var t=0,e=f.length,r=n[1],i=0;ir&&On(l,u,n)>0&&++t:u[1]<=r&&On(l,u,n)<0&&--t,l=u;return 0!==t}([n,r]),e=M&&t,i=l.length;(e||i)&&(c.polygonStart(),e&&(c.lineStart(),S(null,null,1,c),c.lineEnd()),i&&nr(l,o,t,S,c),c.polygonEnd()),l=f=s=null}};function S(u,o,c,l){var f=0,s=0;if(null==u||(f=i(u,c))!==(s=i(o,c))||a(u,o)<0^c>0)do{l.point(0===f||3===f?n:e,f>1?r:t)}while((f=(f+c+4)%4)!==s);else l.point(o[0],o[1])}function N(i,u){return n<=i&&i<=e&&t<=u&&u<=r}function k(n,t){N(n,t)&&c.point(n,t)}function E(n,t){var e=N(n=Math.max(-lr,Math.min(lr,n)),t=Math.max(-lr,Math.min(lr,t)));if(f&&s.push([n,t]),m)h=n,p=t,g=e,m=!1,e&&(c.lineStart(),c.point(n,t));else if(e&&y)c.point(n,t);else{var r={a:{x:v,y:d},b:{x:n,y:t}};_(r)?(y||(c.lineStart(),c.point(r.a.x,r.a.y)),c.point(r.b.x,r.b.y),e||c.lineEnd(),M=!1):e&&(c.lineStart(),c.point(n,t),M=!1)}v=n,d=t,y=e}return w};function i(r,i){return _(r[0]-n)0?0:3:_(r[0]-e)0?2:1:_(r[1]-t)0?1:0:i>0?3:2}function o(n,t){return a(n.x,t.x)}function a(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}}function sr(n){var t=0,e=Ln/3,r=Dr(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Ln/180,e=n[1]*Ln/180):[t/Ln*180,e/Ln*180]},i}function hr(n,t){var e=Math.sin(n),r=(e+Math.sin(t))/2,i=1+e*(2*r-e),u=Math.sqrt(i)/r;function o(n,t){var e=Math.sqrt(i-2*r*Math.sin(t))/r;return[e*Math.sin(n*=r),u-e*Math.cos(n)]}return o.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/r,In((i-(n*n+e*e)*r*r)/(2*r))]},o}u.geo.clipExtent=function(){var n,t,e,r,i,u,o={stream:function(n){return i&&(i.valid=!1),(i=u(n)).valid=!0,i},extent:function(a){return arguments.length?(u=fr(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(u.geo.conicEqualArea=function(){return sr(hr)}).raw=hr,u.geo.albers=function(){return u.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},u.geo.albersUsa=function(){var n,t,e,r,i=u.geo.albers(),o=u.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=u.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){n=[t,e]}};function l(i){var u=i[0],o=i[1];return n=null,t(u,o),n||(e(u,o),n)||r(u,o),n}return l.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&u<.234&&r>=-.425&&r<-.214?o:u>=.166&&u<.234&&r>=-.214&&r<-.115?a:i).invert(n)},l.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},l.precision=function(n){return arguments.length?(i.precision(n),o.precision(n),a.precision(n),l):i.precision()},l.scale=function(n){return arguments.length?(i.scale(n),o.scale(.35*n),a.scale(n),l.translate(i.translate())):i.scale()},l.translate=function(n){if(!arguments.length)return i.translate();var u=i.scale(),f=+n[0],s=+n[1];return t=i.translate(n).clipExtent([[f-.455*u,s-.238*u],[f+.455*u,s+.238*u]]).stream(c).point,e=o.translate([f-.307*u,s+.201*u]).clipExtent([[f-.425*u+Cn,s+.12*u+Cn],[f-.214*u-Cn,s+.234*u-Cn]]).stream(c).point,r=a.translate([f-.205*u,s+.212*u]).clipExtent([[f-.214*u+Cn,s+.166*u+Cn],[f-.115*u-Cn,s+.234*u-Cn]]).stream(c).point,l},l.scale(1070)};var pr,gr,vr,dr,yr,mr,Mr={point:P,lineStart:P,lineEnd:P,polygonStart:function(){gr=0,Mr.lineStart=xr},polygonEnd:function(){Mr.lineStart=Mr.lineEnd=Mr.point=P,pr+=_(gr/2)}};function xr(){var n,t,e,r;function i(n,t){gr+=r*n-e*t,e=n,r=t}Mr.point=function(u,o){Mr.point=i,n=e=u,t=r=o},Mr.lineEnd=function(){i(n,t)}}var br={point:function(n,t){nyr&&(yr=n),tmr&&(mr=t)},lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P};function _r(){var n=wr(4.5),t=[],e={point:r,lineStart:function(){e.point=i},lineEnd:o,polygonStart:function(){e.lineEnd=a},polygonEnd:function(){e.lineEnd=o,e.point=r},pointRadius:function(t){return n=wr(t),e},result:function(){if(t.length){var n=t.join("");return t=[],n}}};function r(e,r){t.push("M",e,",",r,n)}function i(n,r){t.push("M",n,",",r),e.point=u}function u(n,e){t.push("L",n,",",e)}function o(){e.point=r}function a(){t.push("Z")}return e}function wr(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}var Sr,Nr={point:kr,lineStart:Er,lineEnd:Ar,polygonStart:function(){Nr.lineStart=Cr},polygonEnd:function(){Nr.point=kr,Nr.lineStart=Er,Nr.lineEnd=Ar}};function kr(n,t){ke+=n,Ee+=t,++Ae}function Er(){var n,t;function e(e,r){var i=e-n,u=r-t,o=Math.sqrt(i*i+u*u);Ce+=o*(n+e)/2,Te+=o*(t+r)/2,Le+=o,kr(n=e,t=r)}Nr.point=function(r,i){Nr.point=e,kr(n=r,t=i)}}function Ar(){Nr.point=kr}function Cr(){var n,t,e,r;function i(n,t){var i=n-e,u=t-r,o=Math.sqrt(i*i+u*u);Ce+=o*(e+n)/2,Te+=o*(r+t)/2,Le+=o,ze+=(o=r*n-e*t)*(e+n),qe+=o*(r+t),Re+=3*o,kr(e=n,r=t)}Nr.point=function(u,o){Nr.point=i,kr(n=e=u,t=r=o)},Nr.lineEnd=function(){i(n,t)}}function Tr(n){var t=4.5,e={point:r,lineStart:function(){e.point=i},lineEnd:o,polygonStart:function(){e.lineEnd=a},polygonEnd:function(){e.lineEnd=o,e.point=r},pointRadius:function(n){return t=n,e},result:P};function r(e,r){n.moveTo(e+t,r),n.arc(e,r,t,0,zn)}function i(t,r){n.moveTo(t,r),e.point=u}function u(t,e){n.lineTo(t,e)}function o(){e.point=r}function a(){n.closePath()}return e}function Lr(n){var t=.5,e=Math.cos(30*Dn),r=16;function i(n){return(r?o:u)(n)}function u(t){return qr(t,(function(e,r){e=n(e,r),t.point(e[0],e[1])}))}function o(t){var e,i,u,o,c,l,f,s,h,p,g,v,d={point:y,lineStart:m,lineEnd:x,polygonStart:function(){t.polygonStart(),d.lineStart=b},polygonEnd:function(){t.polygonEnd(),d.lineStart=m}};function y(e,r){e=n(e,r),t.point(e[0],e[1])}function m(){s=NaN,d.point=M,t.lineStart()}function M(e,i){var u=Oe([e,i]),o=n(e,i);a(s,h,f,p,g,v,s=o[0],h=o[1],f=e,p=u[0],g=u[1],v=u[2],r,t),t.point(s,h)}function x(){d.point=y,t.lineEnd()}function b(){m(),d.point=_,d.lineEnd=w}function _(n,t){M(e=n,t),i=s,u=h,o=p,c=g,l=v,d.point=M}function w(){a(s,h,f,p,g,v,i,u,e,o,c,l,r,t),d.lineEnd=x,x()}return d}function a(r,i,u,o,c,l,f,s,h,p,g,v,d,y){var m=f-r,M=s-i,x=m*m+M*M;if(x>4*t&&d--){var b=o+p,w=c+g,S=l+v,N=Math.sqrt(b*b+w*w+S*S),k=Math.asin(S/=N),E=_(_(S)-1)t||_((m*L+M*z)/x-.5)>.3||o*p+c*g+l*v0&&16,i):Math.sqrt(t)},i}function zr(n){this.stream=n}function qr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Rr(n){return Dr((function(){return n}))()}function Dr(n){var t,e,r,i,o,a,c=Lr((function(n,e){return[(n=t(n,e))[0]*l+i,o-n[1]*l]})),l=150,f=480,s=250,h=0,p=0,g=0,v=0,d=0,y=ar,m=D,M=null,x=null;function b(n){return[(n=r(n[0]*Dn,n[1]*Dn))[0]*l+i,o-n[1]*l]}function w(n){return(n=r.invert((n[0]-i)/l,(o-n[1])/l))&&[n[0]*jn,n[1]*jn]}function S(){r=Ke(e=Pr(g,v,d),t);var n=t(h,p);return i=f-n[0]*l,o=s+n[1]*l,N()}function N(){return a&&(a.valid=!1,a=null),b}return b.stream=function(n){return a&&(a.valid=!1),(a=jr(y(e,c(m(n))))).valid=!0,a},b.clipAngle=function(n){return arguments.length?(y=null==n?(M=n,ar):function(n){var t=Math.cos(n),e=t>0,r=_(t)>Cn;return rr(i,(function(n){var t,a,c,l,f;return{lineStart:function(){l=c=!1,f=1},point:function(s,h){var p,g=[s,h],v=i(s,h),d=e?v?0:o(s,h):v?o(s+(s<0?Ln:-Ln),h):0;if(!t&&(l=c=v)&&n.lineStart(),v!==c&&(p=u(t,g),(Ve(t,p)||Ve(g,p))&&(g[0]+=Cn,g[1]+=Cn,v=i(g[0],g[1]))),v!==c)f=0,v?(n.lineStart(),p=u(g,t),n.point(p[0],p[1])):(p=u(t,g),n.point(p[0],p[1]),n.lineEnd()),t=p;else if(r&&t&&e^v){var y;d&a||!(y=u(g,t,!0))||(f=0,e?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!v||t&&Ve(t,g)||n.point(g[0],g[1]),t=g,c=v,a=d},lineEnd:function(){c&&n.lineEnd(),t=null},clean:function(){return f|(l&&c)<<1}}}),Yr(n,6*Dn),e?[0,-n]:[-Ln,n-Ln]);function i(n,e){return Math.cos(n)*Math.cos(e)>t}function u(n,e,r){var i=[1,0,0],u=Ie(Oe(n),Oe(e)),o=Pe(u,u),a=u[0],c=o-a*a;if(!c)return!r&&n;var l=t*o/c,f=-t*a/c,s=Ie(i,u),h=He(i,l);Fe(h,He(u,f));var p=s,g=Pe(h,p),v=Pe(p,p),d=g*g-v*(Pe(h,h)-1);if(!(d<0)){var y=Math.sqrt(d),m=He(p,(-g-y)/v);if(Fe(m,h),m=Ze(m),!r)return m;var M,x=n[0],b=e[0],w=n[1],S=e[1];b0^m[1]<(_(m[0]-x)Ln^(x<=m[0]&&m[0]<=b)){var E=He(p,(-g+y)/v);return Fe(E,h),[m,Ze(E)]}}}function o(t,r){var i=e?n:Ln-n,u=0;return t<-i?u|=1:t>i&&(u|=2),r<-i?u|=4:r>i&&(u|=8),u}}((M=+n)*Dn),N()):M},b.clipExtent=function(n){return arguments.length?(x=n,m=n?fr(n[0][0],n[0][1],n[1][0],n[1][1]):D,N()):x},b.scale=function(n){return arguments.length?(l=+n,S()):l},b.translate=function(n){return arguments.length?(f=+n[0],s=+n[1],S()):[f,s]},b.center=function(n){return arguments.length?(h=n[0]%360*Dn,p=n[1]%360*Dn,S()):[h*jn,p*jn]},b.rotate=function(n){return arguments.length?(g=n[0]%360*Dn,v=n[1]%360*Dn,d=n.length>2?n[2]%360*Dn:0,S()):[g*jn,v*jn,d*jn]},u.rebind(b,c,"precision"),function(){return t=n.apply(this,arguments),b.invert=t.invert&&w,S()}}function jr(n){return qr(n,(function(t,e){n.point(t*Dn,e*Dn)}))}function Ur(n,t){return[n,t]}function Or(n,t){return[n>Ln?n-zn:n<-Ln?n+zn:n,t]}function Pr(n,t,e){return n?t||e?Ke(Fr(n),Hr(t,e)):Fr(n):t||e?Hr(t,e):Or}function Ir(n){return function(t,e){return[(t+=n)>Ln?t-zn:t<-Ln?t+zn:t,e]}}function Fr(n){var t=Ir(n);return t.invert=Ir(-n),t}function Hr(n,t){var e=Math.cos(n),r=Math.sin(n),i=Math.cos(t),u=Math.sin(t);function o(n,t){var o=Math.cos(t),a=Math.cos(n)*o,c=Math.sin(n)*o,l=Math.sin(t),f=l*e+a*r;return[Math.atan2(c*i-f*u,a*e-l*r),In(f*i+c*u)]}return o.invert=function(n,t){var o=Math.cos(t),a=Math.cos(n)*o,c=Math.sin(n)*o,l=Math.sin(t),f=l*i-c*u;return[Math.atan2(c*i+l*u,a*e+f*r),In(f*e-a*r)]},o}function Yr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,u,o,a){var c=o*t;null!=i?(i=Zr(e,i),u=Zr(e,u),(o>0?iu)&&(i+=o*zn)):(i=n+o*zn,u=n-.5*c);for(var l,f=i;o>0?f>u:f2?n[2]*Dn:0),t.invert=function(t){return(t=n.invert(t[0]*Dn,t[1]*Dn))[0]*=jn,t[1]*=jn,t},t},Or.invert=Ur,u.geo.circle=function(){var n,t,e=[0,0],r=6;function i(){var n="function"==typeof e?e.apply(this,arguments):e,r=Pr(-n[0]*Dn,-n[1]*Dn,0).invert,i=[];return t(null,null,1,{point:function(n,t){i.push(n=r(n,t)),n[0]*=jn,n[1]*=jn}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(n){return arguments.length?(e=n,i):e},i.angle=function(e){return arguments.length?(t=Yr((n=+e)*Dn,r*Dn),i):n},i.precision=function(e){return arguments.length?(t=Yr(n*Dn,(r=+e)*Dn),i):r},i.angle(90)},u.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Dn,i=n[1]*Dn,u=t[1]*Dn,o=Math.sin(r),a=Math.cos(r),c=Math.sin(i),l=Math.cos(i),f=Math.sin(u),s=Math.cos(u);return Math.atan2(Math.sqrt((e=s*o)*e+(e=l*f-c*s*a)*e),c*f+l*s*a)},u.geo.graticule=function(){var n,t,e,r,i,o,a,c,l,f,s,h,p=10,g=p,v=90,d=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:M()}}function M(){return u.range(Math.ceil(r/v)*v,e,v).map(s).concat(u.range(Math.ceil(c/d)*d,a,d).map(h)).concat(u.range(Math.ceil(t/p)*p,n,p).filter((function(n){return _(n%v)>Cn})).map(l)).concat(u.range(Math.ceil(o/g)*g,i,g).filter((function(n){return _(n%d)>Cn})).map(f))}return m.lines=function(){return M().map((function(n){return{type:"LineString",coordinates:n}}))},m.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(h(a).slice(1),s(e).reverse().slice(1),h(c).reverse().slice(1))]}},m.extent=function(n){return arguments.length?m.majorExtent(n).minorExtent(n):m.minorExtent()},m.majorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],c=+n[0][1],a=+n[1][1],r>e&&(n=r,r=e,e=n),c>a&&(n=c,c=a,a=n),m.precision(y)):[[r,c],[e,a]]},m.minorExtent=function(e){return arguments.length?(t=+e[0][0],n=+e[1][0],o=+e[0][1],i=+e[1][1],t>n&&(e=t,t=n,n=e),o>i&&(e=o,o=i,i=e),m.precision(y)):[[t,o],[n,i]]},m.step=function(n){return arguments.length?m.majorStep(n).minorStep(n):m.minorStep()},m.majorStep=function(n){return arguments.length?(v=+n[0],d=+n[1],m):[v,d]},m.minorStep=function(n){return arguments.length?(p=+n[0],g=+n[1],m):[p,g]},m.precision=function(u){return arguments.length?(y=+u,l=Vr(o,i,90),f=Xr(t,n,y),s=Vr(c,a,90),h=Xr(r,e,y),m):y},m.majorExtent([[-180,-90+Cn],[180,90-Cn]]).minorExtent([[-180,-80-Cn],[180,80+Cn]])},u.geo.greatArc=function(){var n,t,e=$r,r=Br;function i(){return{type:"LineString",coordinates:[n||e.apply(this,arguments),t||r.apply(this,arguments)]}}return i.distance=function(){return u.geo.distance(n||e.apply(this,arguments),t||r.apply(this,arguments))},i.source=function(t){return arguments.length?(e=t,n="function"==typeof t?null:t,i):e},i.target=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,i):r},i.precision=function(){return arguments.length?i:0},i},u.geo.interpolate=function(n,t){return e=n[0]*Dn,r=n[1]*Dn,i=t[0]*Dn,u=t[1]*Dn,o=Math.cos(r),a=Math.sin(r),c=Math.cos(u),l=Math.sin(u),f=o*Math.cos(e),s=o*Math.sin(e),h=c*Math.cos(i),p=c*Math.sin(i),g=2*Math.asin(Math.sqrt(Hn(u-r)+o*c*Hn(i-e))),v=1/Math.sin(g),(d=g?function(n){var t=Math.sin(n*=g)*v,e=Math.sin(g-n)*v,r=e*f+t*h,i=e*s+t*p,u=e*a+t*l;return[Math.atan2(i,r)*jn,Math.atan2(u,Math.sqrt(r*r+i*i))*jn]}:function(){return[e*jn,r*jn]}).distance=g,d;var e,r,i,u,o,a,c,l,f,s,h,p,g,v,d},u.geo.length=function(n){return Sr=0,u.geo.stream(n,Gr),Sr};var Gr={sphere:P,point:P,lineStart:function(){var n,t,e;function r(r,i){var u=Math.sin(i*=Dn),o=Math.cos(i),a=_((r*=Dn)-n),c=Math.cos(a);Sr+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=e*u-t*o*c)*a),t*u+e*o*c),n=r,t=u,e=o}Gr.point=function(i,u){n=i*Dn,t=Math.sin(u*=Dn),e=Math.cos(u),Gr.point=r},Gr.lineEnd=function(){Gr.point=Gr.lineEnd=P}},lineEnd:P,polygonStart:P,polygonEnd:P};function Wr(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),u=n(r*i);return[u*i*Math.sin(t),u*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),u=Math.sin(i),o=Math.cos(i);return[Math.atan2(n*u,r*o),Math.asin(r&&e*u/r)]},e}var Jr=Wr((function(n){return Math.sqrt(2/(1+n))}),(function(n){return 2*Math.asin(n/2)}));(u.geo.azimuthalEqualArea=function(){return Rr(Jr)}).raw=Jr;var Kr=Wr((function(n){var t=Math.acos(n);return t&&t/Math.sin(t)}),D);function Qr(n,t){var e=Math.cos(n),r=function(n){return Math.tan(Ln/4+n/2)},i=n===t?Math.sin(n):Math.log(e/Math.cos(t))/Math.log(r(t)/r(n)),u=e*Math.pow(r(n),i)/i;if(!i)return ei;function o(n,t){u>0?t<-Rn+Cn&&(t=-Rn+Cn):t>Rn-Cn&&(t=Rn-Cn);var e=u/Math.pow(r(t),i);return[e*Math.sin(i*n),u-e*Math.cos(i*n)]}return o.invert=function(n,t){var e=u-t,r=Un(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(u/r,1/i))-Rn]},o}function ni(n,t){var e=Math.cos(n),r=n===t?Math.sin(n):(e-Math.cos(t))/(t-n),i=e/r+n;if(_(r)1&&On(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function fi(n,t){return n[0]-t[0]||n[1]-t[1]}(u.geo.stereographic=function(){return Rr(ui)}).raw=ui,oi.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Rn]},(u.geo.transverseMercator=function(){var n=ri(oi),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):[(n=t())[1],-n[0]]},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):[(n=e())[0],n[1],n[2]-90]},e([0,0,90])}).raw=oi,u.geom={},u.geom.hull=function(n){var t=ai,e=ci;if(arguments.length)return r(n);function r(n){if(n.length<3)return[];var r,i=bt(t),u=bt(e),o=n.length,a=[],c=[];for(r=0;r=0;--r)p.push(n[a[l[r]][2]]);for(r=+s;rCn)a=a.L;else{if(!((i=u-Ai(a,o))>Cn)){r>-Cn?(t=a.P,e=a):i>-Cn?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=wi(n);if(yi.insert(t,c),t||e){if(t===e)return qi(t),e=wi(t.site),yi.insert(c,e),c.edge=e.edge=ji(t.site,c.site),zi(t),void zi(e);if(e){qi(t),qi(e);var l=t.site,f=l.x,s=l.y,h=n.x-f,p=n.y-s,g=e.site,v=g.x-f,d=g.y-s,y=2*(h*d-p*v),m=h*h+p*p,M=v*v+d*d,x={x:(d*m-p*M)/y+f,y:(h*M-v*m)/y+s};Ui(e.edge,l,g,x),c.edge=ji(l,n,null,x),e.edge=ji(n,g,null,x),zi(t),zi(e)}else c.edge=ji(t.site,c.site)}}function Ei(n,t){var e=n.site,r=e.x,i=e.y,u=i-t;if(!u)return r;var o=n.P;if(!o)return-1/0;var a=(e=o.site).x,c=e.y,l=c-t;if(!l)return a;var f=a-r,s=1/u-1/l,h=f/l;return s?(-h+Math.sqrt(h*h-2*s*(f*f/(-2*l)-c+l/2+i-u/2)))/s+r:(r+a)/2}function Ai(n,t){var e=n.N;if(e)return Ei(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ci(n){this.site=n,this.edges=[]}function Ti(n,t){return t.angle-n.angle}function Li(){Ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function zi(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,u=e.site;if(r!==u){var o=i.x,a=i.y,c=r.x-o,l=r.y-a,f=u.x-o,s=2*(c*(d=u.y-a)-l*f);if(!(s>=-Tn)){var h=c*c+l*l,p=f*f+d*d,g=(d*h-l*p)/s,v=(c*p-f*h)/s,d=v+a,y=bi.pop()||new Li;y.arc=n,y.site=i,y.x=g+o,y.y=d+Math.sqrt(g*g+v*v),y.cy=d,n.circle=y;for(var m=null,M=Mi._;M;)if(y.y=a)return;if(h>g){if(u){if(u.y>=l)return}else u={x:d,y:c};e={x:d,y:l}}else{if(u){if(u.y1)if(h>g){if(u){if(u.y>=l)return}else u={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else{if(u){if(u.y=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xCn||_(i-e)>Cn)&&(a.splice(o,0,new Oi((y=u.site,m=f,M=_(r-s)Cn?{x:s,y:_(t-s)Cn?{x:_(e-g)Cn?{x:h,y:_(t-h)Cn?{x:_(e-p)=e&&l.x<=i&&l.y>=r&&l.y<=o?[[e,o],[i,o],[i,r],[e,r]]:[]).point=n[a]})),t}function a(n){return n.map((function(n,t){return{x:Math.round(r(n,t)/Cn)*Cn,y:Math.round(i(n,t)/Cn)*Cn,i:t}}))}return o.links=function(n){return Zi(a(n)).edges.filter((function(n){return n.l&&n.r})).map((function(t){return{source:n[t.l.i],target:n[t.r.i]}}))},o.triangles=function(n){var t=[];return Zi(a(n)).cells.forEach((function(e,r){for(var i,u,o,a,c=e.site,l=e.edges.sort(Ti),f=-1,s=l.length,h=l[s-1].edge,p=h.l===c?h.r:h.l;++fu&&(i=t.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Ki(e,r)})),u=tu.lastIndex;return uv&&(v=c.x),c.y>d&&(d=c.y),l.push(c.x),f.push(c.y);else for(s=0;sv&&(v=M),x>d&&(d=x),l.push(M),f.push(x)}var b=v-p,w=d-g;function S(n,t,e,r,i,u,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,l=n.y;if(null!=c)if(_(c-e)+_(l-r)<.01)N(n,t,e,r,i,u,o,a);else{var f=n.point;n.x=n.y=n.point=null,N(n,f,c,l,i,u,o,a),N(n,t,e,r,i,u,o,a)}else n.x=e,n.y=r,n.point=t}else N(n,t,e,r,i,u,o,a)}function N(n,t,e,r,i,u,o,a){var c=.5*(i+o),l=.5*(u+a),f=e>=c,s=r>=l,h=s<<1|f;n.leaf=!1,f?i=c:o=c,s?u=l:a=l,S(n=n.nodes[h]||(n.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,e,r,i,u,o,a)}b>w?d=g+b:v=p+w;var k={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(n){S(k,n,+y(n,++s),+m(n,s),p,g,v,d)}};if(k.visit=function(n){Gi(n,k,p,g,v,d)},k.find=function(n){return function(n,t,e,r,i,u,o){var a,c=1/0;return function n(l,f,s,h,p){if(!(f>u||s>o||h=b)<<1|t>=x,w=_+4;_=0&&!(e=u.interpolators[r](n,t)););return e}function ru(n,t){var e,r=[],i=[],u=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;e=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function hu(n){return 1-Math.cos(n*Rn)}function pu(n){return Math.pow(2,10*(n-1))}function gu(n){return 1-Math.sqrt(1-n*n)}function vu(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function du(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function yu(n){var t,e,r,i=[n.a,n.b],u=[n.c,n.d],o=Mu(i),a=mu(i,u),c=Mu(((t=u)[0]+=(r=-a)*(e=i)[0],t[1]+=r*e[1],t))||0;i[0]*u[1]=0?n.slice(0,e):n,i=e>=0?n.slice(e+1):"in";return r=uu.get(r)||iu,i=ou.get(i)||D,t=i(r.apply(null,o.call(arguments,1))),function(n){return n<=0?0:n>=1?1:t(n)}},u.interpolateHcl=function(n,t){n=u.hcl(n),t=u.hcl(t);var e=n.h,r=n.c,i=n.l,o=t.h-e,a=t.c-r,c=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,e=isNaN(e)?t.h:e):o>180?o-=360:o<-180&&(o+=360),function(n){return Qn(e+o*n,r+a*n,i+c*n)+""}},u.interpolateHsl=function(n,t){n=u.hsl(n),t=u.hsl(t);var e=n.h,r=n.s,i=n.l,o=t.h-e,a=t.s-r,c=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,e=isNaN(e)?t.h:e):o>180?o-=360:o<-180&&(o+=360),function(n){return Wn(e+o*n,r+a*n,i+c*n)+""}},u.interpolateLab=function(n,t){n=u.lab(n),t=u.lab(t);var e=n.l,r=n.a,i=n.b,o=t.l-e,a=t.a-r,c=t.b-i;return function(n){return ot(e+o*n,r+a*n,i+c*n)+""}},u.interpolateRound=du,u.transform=function(n){var t=c.createElementNS(u.ns.prefix.svg,"g");return(u.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new yu(e?e.matrix:xu)})(n)},yu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var xu={a:1,b:0,c:0,d:1,e:0,f:0};function bu(n){return n.length?n.pop()+",":""}function _u(n,t){var e=[],r=[];return n=u.transform(n),t=u.transform(t),function(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:Ki(n[0],t[0])},{i:i-2,x:Ki(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}(n.translate,t.translate,e,r),function(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(bu(e)+"rotate(",null,")")-2,x:Ki(n,t)})):t&&e.push(bu(e)+"rotate("+t+")")}(n.rotate,t.rotate,e,r),function(n,t,e,r){n!==t?r.push({i:e.push(bu(e)+"skewX(",null,")")-2,x:Ki(n,t)}):t&&e.push(bu(e)+"skewX("+t+")")}(n.skew,t.skew,e,r),function(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(bu(e)+"scale(",null,",",null,")");r.push({i:i-4,x:Ki(n[0],t[0])},{i:i-2,x:Ki(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(bu(e)+"scale("+t+")")}(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,u=r.length;++i0?e=t:(n.c=null,n.t=NaN,n=null,c.end({type:"end",alpha:e=0})):t>0&&(c.start({type:"start",alpha:e=t}),n=Ct(a.tick)),a):e},a.start=function(){var n,t,e,u=y.length,c=m.length,f=l[0],g=l[1];for(n=0;n=0;)e.push(i[r])}function Uu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(u=n.children)&&(i=u.length))for(var i,u,o=-1;++o=0;)o.push(f=l[c]),f.parent=u,f.depth=u.depth+1;e&&(u.value=0),u.children=l}else e&&(u.value=+e.call(r,u,u.depth)||0),delete u.children;return Uu(i,(function(t){var r,i;n&&(r=t.children)&&r.sort(n),e&&(i=t.parent)&&(i.value+=t.value)})),a}return r.sort=function(t){return arguments.length?(n=t,r):n},r.children=function(n){return arguments.length?(t=n,r):t},r.value=function(n){return arguments.length?(e=n,r):e},r.revalue=function(n){return e&&(ju(n,(function(n){n.children&&(n.value=0)})),Uu(n,(function(n){var t;n.children||(n.value=+e.call(r,n,n.depth)||0),(t=n.parent)&&(t.value+=n.value)}))),n},r},u.layout.partition=function(){var n=u.layout.hierarchy(),t=[1,1];function e(n,t,r,i){var u=n.children;if(n.x=t,n.y=n.depth*i,n.dx=r,n.dy=i,u&&(o=u.length)){var o,a,c,l=-1;for(r=n.value?r/n.value:0;++la&&(a=r),o.push(r)}for(e=0;ei&&(r=e,i=t);return r}function Ju(n){return n.reduce(Ku,0)}function Ku(n,t){return n+t[1]}function Qu(n,t){return no(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function no(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function to(n){return[u.min(n),u.max(n)]}function eo(n,t){return n.value-t.value}function ro(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function io(n,t){n._pack_next=t,t._pack_prev=n}function uo(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function oo(n){if((t=n.children)&&(c=t.length)){var t,e,r,i,u,o,a,c,l=1/0,f=-1/0,s=1/0,h=-1/0;if(t.forEach(ao),(e=t[0]).x=-e.r,e.y=0,M(e),c>1&&((r=t[1]).x=r.r,r.y=0,M(r),c>2))for(fo(e,r,i=t[2]),M(i),ro(e,i),e._pack_prev=i,ro(i,r),r=e._pack_next,u=3;u0)for(o=-1;++o=s[0]&&c<=s[1]&&((a=l[u.bisect(h,c,1,g)-1]).y+=v,a.push(i[o]));return l}return i.value=function(n){return arguments.length?(t=n,i):t},i.range=function(n){return arguments.length?(e=bt(n),i):e},i.bins=function(n){return arguments.length?(r="number"==typeof n?function(t){return no(t,n)}:bt(n),i):r},i.frequency=function(t){return arguments.length?(n=!!t,i):n},i},u.layout.pack=function(){var n,t=u.layout.hierarchy().sort(eo),e=0,r=[1,1];function i(i,u){var o=t.call(this,i,u),a=o[0],c=r[0],l=r[1],f=null==n?Math.sqrt:"function"==typeof n?n:function(){return n};if(a.x=a.y=0,Uu(a,(function(n){n.r=+f(n.value)})),Uu(a,oo),e){var s=e*(n?1:Math.max(2*a.r/c,2*a.r/l))/2;Uu(a,(function(n){n.r+=s})),Uu(a,oo),Uu(a,(function(n){n.r-=s}))}return lo(a,c/2,l/2,n?1:1/Math.max(2*a.r/c,2*a.r/l)),o}return i.size=function(n){return arguments.length?(r=n,i):r},i.radius=function(t){return arguments.length?(n=null==t||"function"==typeof t?t:+t,i):n},i.padding=function(n){return arguments.length?(e=+n,i):e},Du(i,t)},u.layout.tree=function(){var n=u.layout.hierarchy().sort(null).value(null),t=so,e=[1,1],r=null;function i(i,u){var l=n.call(this,i,u),f=l[0],s=function(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,u=t.children,o=0,a=u.length;op.x&&(p=n),n.depth>g.depth&&(g=n)}));var v=t(h,p)/2-h.x,d=e[0]/(p.x+t(p,h)/2+v),y=e[1]/(g.depth||1);ju(f,(function(n){n.x=(n.x+v)*d,n.y=n.depth*y}))}return l}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e.length){!function(n){for(var t,e=0,r=0,i=n.children,u=i.length;--u>=0;)(t=i[u]).z+=e,t.m+=e,e+=t.s+(r+=t.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],l=u.m,f=o.m,s=a.m,h=c.m;a=po(a),u=ho(u),a&&u;)c=ho(c),(o=po(o)).a=n,(i=a.z+s-u.z-l+t(a._,u._))>0&&(go(vo(a,n,r),n,i),l+=i,f+=i),s+=a.m,l+=u.m,h+=c.m,f+=o.m;a&&!po(o)&&(o.t=a,o.m+=s-f),u&&!ho(c)&&(c.t=u,c.m+=l-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function c(n){n.x*=e[0],n.y=n.depth*e[1]}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(n){return arguments.length?(r=null==(e=n)?c:null,i):r?null:e},i.nodeSize=function(n){return arguments.length?(r=null==(e=n)?null:c,i):r?e:null},Du(i,n)},u.layout.cluster=function(){var n=u.layout.hierarchy().sort(null).value(null),t=so,e=[1,1],r=!1;function i(i,o){var a,c=n.call(this,i,o),l=c[0],f=0;Uu(l,(function(n){var e=n.children;e&&e.length?(n.x=function(n){return n.reduce((function(n,t){return n+t.x}),0)/n.length}(e),n.y=function(n){return 1+u.max(n,(function(n){return n.y}))}(e)):(n.x=a?f+=t(n,a):0,n.y=0,a=n)}));var s=yo(l),h=mo(l),p=s.x-t(s,h)/2,g=h.x+t(h,s)/2;return Uu(l,r?function(n){n.x=(n.x-l.x)*e[0],n.y=(l.y-n.y)*e[1]}:function(n){n.x=(n.x-p)/(g-p)*e[0],n.y=(1-(l.y?n.y/l.y:1))*e[1]}),c}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(n){return arguments.length?(r=null==(e=n),i):r?null:e},i.nodeSize=function(n){return arguments.length?(r=null!=(e=n),i):r?e:null},Du(i,n)},u.layout.treemap=function(){var n,t=u.layout.hierarchy(),e=Math.round,r=[1,1],i=null,o=Mo,a=!1,c="squarify",l=.5*(1+Math.sqrt(5));function f(n,t){for(var e,r,i=-1,u=n.length;++i0;)a.push(e=l[i-1]),a.area+=e.area,"squarify"!==c||(r=p(a,v))<=h?(l.pop(),h=r):(a.area-=a.pop().area,g(a,v,u,!1),v=Math.min(u.dx,u.dy),a.length=a.area=0,h=1/0);a.length&&(g(a,v,u,!0),a.length=a.area=0),t.forEach(s)}}function h(n){var t=n.children;if(t&&t.length){var e,r=o(n),i=t.slice(),u=[];for(f(i,r.dx*r.dy/n.value),u.area=0;e=i.pop();)u.push(e),u.area+=e.area,null!=e.z&&(g(u,e.z?r.dx:r.dy,r,!i.length),u.length=u.area=0);t.forEach(h)}}function p(n,t){for(var e,r=n.area,i=0,u=1/0,o=-1,a=n.length;++oi&&(i=e));return t*=t,(r*=r)?Math.max(t*i*l/r,r/(t*u*l)):1/0}function g(n,t,r,i){var u,o=-1,a=n.length,c=r.x,l=r.y,f=t?e(n.area/t):0;if(t==r.dx){for((i||f>r.dy)&&(f=r.dy);++or.dx)&&(f=r.dx);++o1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=u.random.normal.apply(u,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=u.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;e2?Eo:wo,c=r?Su:wu;return i=o(n,t,c,e),u=o(t,n,c,eu),a}function a(n){return i(n)}return a.invert=function(n){return u(n)},a.domain=function(t){return arguments.length?(n=t.map(Number),o()):n},a.range=function(n){return arguments.length?(t=n,o()):t},a.rangeRound=function(n){return a.range(n).interpolate(du)},a.clamp=function(n){return arguments.length?(r=n,o()):r},a.interpolate=function(n){return arguments.length?(e=n,o()):e},a.ticks=function(t){return zo(n,t)},a.tickFormat=function(t,e){return qo(n,t,e)},a.nice=function(t){return To(n,t),o()},a.copy=function(){return Ao(n,t,e,r)},o()}function Co(n,t){return u.rebind(n,t,"range","rangeRound","interpolate","clamp")}function To(n,t){return So(n,No(Lo(n,t)[2])),So(n,No(Lo(n,t)[2])),n}function Lo(n,t){null==t&&(t=10);var e=bo(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),u=t/r*i;return u<=.15?i*=10:u<=.35?i*=5:u<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function zo(n,t){return u.range.apply(u,Lo(n,t))}function qo(n,t,e){var r=Lo(n,t);if(e){var i=jt.exec(e);if(i.shift(),"s"===i[8]){var o=u.formatPrefix(Math.max(_(r[0]),_(r[1])));return i[7]||(i[7]="."+Do(o.scale(r[2]))),i[8]="f",e=u.format(i.join("")),function(n){return e(o.scale(n))+o.symbol}}i[7]||(i[7]="."+function(n,t){var e=Do(t[2]);return n in Ro?Math.abs(e-Do(Math.max(_(t[0]),_(t[1]))))+ +("e"!==n):e-2*("%"===n)}(i[8],r)),e=i.join("")}else e=",."+Do(r[2])+"f";return u.format(e)}u.scale.linear=function(){return Ao([0,1],[0,1],eu,!1)};var Ro={s:1,g:1,p:1,r:1,e:1};function Do(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function jo(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function o(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function a(t){return n(i(t))}return a.invert=function(t){return o(n.invert(t))},a.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),a):r},a.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),a):t},a.nice=function(){var t=So(r.map(i),e?Math:Oo);return n.domain(t),r=t.map(o),a},a.ticks=function(){var n=bo(r),u=[],a=n[0],c=n[1],l=Math.floor(i(a)),f=Math.ceil(i(c)),s=t%1?2:t;if(isFinite(f-l)){if(e){for(;l0;h--)u.push(o(l)*h);for(l=0;u[l]c;f--);u=u.slice(l,f)}return u},a.tickFormat=function(n,e){if(!arguments.length)return Uo;arguments.length<2?e=Uo:"function"!=typeof e&&(e=u.format(e));var r=Math.max(1,t*n/a.ticks().length);return function(n){var u=n/o(Math.round(i(n)));return u*t0?e[r-1]:n[0],rs?0:1;if(l=qn)return c(l,p)+(a?c(a,1-p):"")+"Z";var g,v,d,y,m,M,x,b,_,w,S,N,k=0,E=0,A=[];if((y=(+o.apply(this,arguments)||0)/2)&&(d=r===Jo?Math.sqrt(a*a+l*l):+r.apply(this,arguments),p||(E*=-1),l&&(E=In(d/l*Math.sin(y))),a&&(k=In(d/a*Math.sin(y)))),l){m=l*Math.cos(f+E),M=l*Math.sin(f+E),x=l*Math.cos(s-E),b=l*Math.sin(s-E);var C=Math.abs(s-f-2*E)<=Ln?0:1;if(E&&ra(m,M,x,b)===p^C){var T=(f+s)/2;m=l*Math.cos(T),M=l*Math.sin(T),x=b=null}}else m=M=0;if(a){_=a*Math.cos(s-k),w=a*Math.sin(s-k),S=a*Math.cos(f+k),N=a*Math.sin(f+k);var L=Math.abs(f-s+2*k)<=Ln?0:1;if(k&&ra(_,w,S,N)===1-p^L){var z=(f+s)/2;_=a*Math.cos(z),w=a*Math.sin(z),S=N=null}}else _=w=0;if(h>Cn&&(g=Math.min(Math.abs(l-a)/2,+e.apply(this,arguments)))>.001){v=a0?0:1}function ia(n,t,e,r,i){var u=n[0]-t[0],o=n[1]-t[1],a=(i?r:-r)/Math.sqrt(u*u+o*o),c=a*o,l=-a*u,f=n[0]+c,s=n[1]+l,h=t[0]+c,p=t[1]+l,g=(f+h)/2,v=(s+p)/2,d=h-f,y=p-s,m=d*d+y*y,M=e-r,x=f*p-h*s,b=(y<0?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),_=(x*y-d*b)/m,w=(-x*d-y*b)/m,S=(x*y+d*b)/m,N=(-x*d+y*b)/m,k=_-g,E=w-v,A=S-g,C=N-v;return k*k+E*E>A*A+C*C&&(_=S,w=N),[[_-c,w-l],[_*e/M,w*e/M]]}function ua(n){var t=ai,e=ci,r=Qe,i=aa,u=i.key,o=.7;function a(u){var a,c=[],l=[],f=-1,s=u.length,h=bt(t),p=bt(e);function g(){c.push("M",i(n(l),o))}for(;++f1&&i.push("H",r[0]),i.join("")},"step-before":la,"step-after":fa,basis:pa,"basis-open":function(n){if(n.length<4)return aa(n);for(var t,e=[],r=-1,i=n.length,u=[0],o=[0];++r<3;)t=n[r],u.push(t[0]),o.push(t[1]);for(e.push(ga(ya,u)+","+ga(ya,o)),--r;++r9&&(i=3*t/Math.sqrt(i),o[a]=i*e,o[a+1]=i*r);for(a=-1;++a<=c;)i=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),u.push([i||0,o[a]*i||0]);return u}(n))}});function aa(n){return n.length>1?n.join("L"):n+"Z"}function ca(n){return n.join("L")+"Z"}function la(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t1){a=t[1],u=n[c],c++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(u[0]-a[0])+","+(u[1]-a[1])+","+u[0]+","+u[1];for(var l=2;lLn)+",1 "+t}function c(n,t,e,r){return"Q 0,0 "+r}return u.radius=function(n){return arguments.length?(e=bt(n),u):e},u.source=function(t){return arguments.length?(n=bt(t),u):n},u.target=function(n){return arguments.length?(t=bt(n),u):t},u.startAngle=function(n){return arguments.length?(r=bt(n),u):r},u.endAngle=function(n){return arguments.length?(i=bt(n),u):i},u},u.svg.diagonal=function(){var n=$r,t=Br,e=wa;function r(r,i){var u=n.call(this,r,i),o=t.call(this,r,i),a=(u.y+o.y)/2,c=[u,{x:u.x,y:a},{x:o.x,y:a},o];return"M"+(c=c.map(e))[0]+"C"+c[1]+" "+c[2]+" "+c[3]}return r.source=function(t){return arguments.length?(n=bt(t),r):n},r.target=function(n){return arguments.length?(t=bt(n),r):t},r.projection=function(n){return arguments.length?(e=n,r):e},r},u.svg.diagonal.radial=function(){var n=u.svg.diagonal(),t=wa,e=n.projection;return n.projection=function(n){return arguments.length?e(function(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Rn;return[e*Math.cos(r),e*Math.sin(r)]}}(t=n)):t},n},u.svg.symbol=function(){var n=Na,t=Sa;function e(e,r){return(Ea.get(n.call(this,e,r))||ka)(t.call(this,e,r))}return e.type=function(t){return arguments.length?(n=bt(t),e):n},e.size=function(n){return arguments.length?(t=bt(n),e):t},e};var Ea=u.map({circle:ka,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Ca)),e=t*Ca;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Aa),e=t*Aa/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Aa),e=t*Aa/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});u.svg.symbolTypes=Ea.keys();var Aa=Math.sqrt(3),Ca=Math.tan(30*Dn);J.transition=function(n){for(var t,e,r=qa||++ja,i=Pa(n),u=[],o=Ra||{time:Date.now(),ease:su,delay:0,duration:250},a=-1,c=this.length;++a0;)l[--h].call(n,o);if(u>=1)return s.event&&s.event.end.call(n,n.__data__,t),--f.count?delete f[r]:delete n[e],1}s||(u=i.time,o=Ct((function(n){var t=s.delay;if(o.t=t+u,t<=n)return h(n-t);o.c=h}),0,u),s=f[r]={tween:new S,time:u,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++f.count)}Da.call=J.call,Da.empty=J.empty,Da.node=J.node,Da.size=J.size,u.transition=function(n,t){return n&&n.transition?qa?n.transition(t):n:u.selection().transition(n)},u.transition.prototype=Da,Da.select=function(n){var t,e,r,i=this.id,u=this.namespace,o=[];n=K(n);for(var a=-1,c=this.length;++arect,.s>rect").attr("width",o[1]-o[0])}function v(n){n.select(".extent").attr("y",a[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",a[1]-a[0])}function d(){var s,d,y=this,m=u.select(u.event.target),M=e.of(y,arguments),x=u.select(y),b=m.datum(),_=!/^(n|s)$/.test(b)&&r,w=!/^(e|w)$/.test(b)&&i,S=m.classed("extent"),N=Nn(y),k=u.mouse(y),E=u.select(f(y)).on("keydown.brush",(function(){32==u.event.keyCode&&(S||(s=null,k[0]-=o[1],k[1]-=a[1],S=2),H())})).on("keyup.brush",(function(){32==u.event.keyCode&&2==S&&(k[0]+=o[1],k[1]+=a[1],S=0,H())}));if(u.event.changedTouches?E.on("touchmove.brush",T).on("touchend.brush",z):E.on("mousemove.brush",T).on("mouseup.brush",z),x.interrupt().selectAll("*").interrupt(),S)k[0]=o[0]-k[0],k[1]=a[0]-k[1];else if(b){var A=+/w$/.test(b),C=+/^n/.test(b);d=[o[1-A]-k[0],a[1-C]-k[1]],k[0]=o[A],k[1]=a[C]}else u.event.altKey&&(s=k.slice());function T(){var n=u.mouse(y),t=!1;d&&(n[0]+=d[0],n[1]+=d[1]),S||(u.event.altKey?(s||(s=[(o[0]+o[1])/2,(a[0]+a[1])/2]),k[0]=o[+(n[0]1?{floor:function(t){for(;a(t=n.floor(t));)t=Ka(t-1);return t},ceil:function(t){for(;a(t=n.ceil(t));)t=Ka(+t+1);return t}}:n))},r.ticks=function(n,t){var e=bo(r.domain()),u=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return u&&(n=u[0],t=u[1]),n.range(e[0],Ka(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Ja(n.copy(),t,e)},Co(r,n)}function Ka(n){return new Date(n)}$a.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Wa:Ga,Wa.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Wa.toString=Ga.toString,Pt.second=Yt((function(n){return new It(1e3*Math.floor(n/1e3))}),(function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))}),(function(n){return n.getSeconds()})),Pt.seconds=Pt.second.range,Pt.seconds.utc=Pt.second.utc.range,Pt.minute=Yt((function(n){return new It(6e4*Math.floor(n/6e4))}),(function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))}),(function(n){return n.getMinutes()})),Pt.minutes=Pt.minute.range,Pt.minutes.utc=Pt.minute.utc.range,Pt.hour=Yt((function(n){var t=n.getTimezoneOffset()/60;return new It(36e5*(Math.floor(n/36e5-t)+t))}),(function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))}),(function(n){return n.getHours()})),Pt.hours=Pt.hour.range,Pt.hours.utc=Pt.hour.utc.range,Pt.month=Yt((function(n){return(n=Pt.day(n)).setDate(1),n}),(function(n,t){n.setMonth(n.getMonth()+t)}),(function(n){return n.getMonth()})),Pt.months=Pt.month.range,Pt.months.utc=Pt.month.utc.range;var Qa=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],nc=[[Pt.second,1],[Pt.second,5],[Pt.second,15],[Pt.second,30],[Pt.minute,1],[Pt.minute,5],[Pt.minute,15],[Pt.minute,30],[Pt.hour,1],[Pt.hour,3],[Pt.hour,6],[Pt.hour,12],[Pt.day,1],[Pt.day,2],[Pt.week,1],[Pt.month,1],[Pt.month,3],[Pt.year,1]],tc=$a.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Qe]]),ec={range:function(n,t,e){return u.range(Math.ceil(n/e)*e,+t,e).map(Ka)},floor:D,ceil:D};nc.year=Pt.year,Pt.scale=function(){return Ja(u.scale.linear(),nc,tc)};var rc=nc.map((function(n){return[n[0].utc,n[1]]})),ic=Ba.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Qe]]);function uc(n){return JSON.parse(n.responseText)}function oc(n){var t=c.createRange();return t.selectNode(c.body),t.createContextualFragment(n.responseText)}rc.year=Pt.year.utc,Pt.scale.utc=function(){return Ja(u.scale.linear(),rc,ic)},u.text=_t((function(n){return n.responseText})),u.json=function(n,t){return wt(n,"application/json",uc,t)},u.html=function(n,t){return wt(n,"text/html",oc,t)},u.xml=_t((function(n){return n.responseXML})),this.d3=u,void 0===(i="function"==typeof(r=u)?r.call(t,e,t,n):r)||(n.exports=i)}()}}]);