UNPKG

plotly.js

Version:

The open source javascript graphing library that powers plotly

18 lines 1.03 MB
/** * plotly.js (basic - minified) v3.0.1 * Copyright 2012-2025, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ ( function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else { root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { "use strict";var Plotly=(()=>{var nb=Object.defineProperty;var jF=Object.getOwnPropertyDescriptor;var eI=Object.getOwnPropertyNames;var rI=Object.prototype.hasOwnProperty;var ib=(e,r)=>()=>(e&&(r=e(e=0)),r);var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var tI=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of eI(r))!rI.call(e,n)&&n!==t&&nb(e,n,{get:()=>r[n],enumerable:!(a=jF(r,n))||a.enumerable});return e};var aI=e=>tI(nb({},"__esModule",{value:!0}),e);var tv=Z(lb=>{"use strict";lb.version="3.0.1"});var sb=Z((ob,av)=>{(function(r,t,a){t[r]=t[r]||a(),typeof av!="undefined"&&av.exports&&(av.exports=t[r])})("Promise",typeof window!="undefined"?window:ob,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(w,T,b,A){return Object.defineProperty(w,T,{value:b,writable:!0,configurable:A!==!1})}}catch(_){r=function(T,b,A){return T[b]=A,T}}a=function(){var w,T,b;function A(S,k){this.fn=S,this.self=k,this.next=void 0}return{add:function(k,q){b=new A(k,q),T?T.next=b:w=b,T=b,b=void 0},drain:function(){var k=w;for(w=T=t=void 0;k;)k.fn.call(k.self),k=k.next}}}();function l(_,w){a.add(_,w),t||(t=i(a.drain))}function o(_){var w,T=typeof _;return _!=null&&(T=="object"||T=="function")&&(w=_.then),typeof w=="function"?w:!1}function s(){for(var _=0;_<this.chain.length;_++)u(this,this.state===1?this.chain[_].success:this.chain[_].failure,this.chain[_]);this.chain.length=0}function u(_,w,T){var b,A;try{w===!1?T.reject(_.msg):(w===!0?b=_.msg:b=w.call(void 0,_.msg),b===T.promise?T.reject(TypeError("Promise-chain cycle")):(A=o(b))?A.call(b,T.resolve,T.reject):T.resolve(b))}catch(S){T.reject(S)}}function f(_){var w,T=this;if(!T.triggered){T.triggered=!0,T.def&&(T=T.def);try{(w=o(_))?l(function(){var b=new d(T);try{w.call(_,function(){f.apply(b,arguments)},function(){v.apply(b,arguments)})}catch(A){v.call(b,A)}}):(T.msg=_,T.state=1,T.chain.length>0&&l(s,T))}catch(b){v.call(new d(T),b)}}}function v(_){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=_,w.state=2,w.chain.length>0&&l(s,w))}function h(_,w,T,b){for(var A=0;A<w.length;A++)(function(k){_.resolve(w[k]).then(function(D){T(k,D)},b)})(A)}function d(_){this.def=_,this.triggered=!1}function y(_){this.promise=_,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(_){if(typeof _!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var w=new y(this);this.then=function(b,A){var S={success:typeof b=="function"?b:!0,failure:typeof A=="function"?A:!1};return S.promise=new this.constructor(function(q,D){if(typeof q!="function"||typeof D!="function")throw TypeError("Not a function");S.resolve=q,S.reject=D}),w.chain.push(S),w.state!==0&&l(s,w),S.promise},this.catch=function(b){return this.then(void 0,b)};try{_.call(void 0,function(b){f.call(w,b)},function(b){v.call(w,b)})}catch(T){v.call(w,T)}}var m=r({},"constructor",g,!1);return g.prototype=m,r(m,"__NPO__",0,!1),r(g,"resolve",function(w){var T=this;return w&&typeof w=="object"&&w.__NPO__===1?w:new T(function(A,S){if(typeof A!="function"||typeof S!="function")throw TypeError("Not a function");A(w)})}),r(g,"reject",function(w){return new this(function(b,A){if(typeof b!="function"||typeof A!="function")throw TypeError("Not a function");A(w)})}),r(g,"all",function(w){var T=this;return n.call(w)!="[object Array]"?T.reject(TypeError("Not an array")):w.length===0?T.resolve([]):new T(function(A,S){if(typeof A!="function"||typeof S!="function")throw TypeError("Not a function");var k=w.length,q=Array(k),D=0;h(T,w,function(z,N){q[z]=N,++D===k&&A(q)},S)})}),r(g,"race",function(w){var T=this;return n.call(w)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(A,S){if(typeof A!="function"||typeof S!="function")throw TypeError("Not a function");h(T,w,function(q,D){A(D)},S)})}),g})});var Ir=Z((oie,nv)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},a=self.document;function n(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var x=p.length,M=new Array(x);x--;)M[x]=p[x];return M}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var l=this.Element.prototype,o=l.setAttribute,s=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;l.setAttribute=function(p,x){o.call(this,p,x+"")},l.setAttributeNS=function(p,x,M){s.call(this,p,x,M+"")},u.setProperty=function(p,x,M){f.call(this,p,x+"",M)}}e.ascending=v;function v(c,p){return c<p?-1:c>p?1:c>=p?0:NaN}e.descending=function(c,p){return p<c?-1:p>c?1:p>=c?0:NaN},e.min=function(c,p){var x=-1,M=c.length,C,L;if(arguments.length===1){for(;++x<M;)if((L=c[x])!=null&&L>=L){C=L;break}for(;++x<M;)(L=c[x])!=null&&C>L&&(C=L)}else{for(;++x<M;)if((L=p.call(c,c[x],x))!=null&&L>=L){C=L;break}for(;++x<M;)(L=p.call(c,c[x],x))!=null&&C>L&&(C=L)}return C},e.max=function(c,p){var x=-1,M=c.length,C,L;if(arguments.length===1){for(;++x<M;)if((L=c[x])!=null&&L>=L){C=L;break}for(;++x<M;)(L=c[x])!=null&&L>C&&(C=L)}else{for(;++x<M;)if((L=p.call(c,c[x],x))!=null&&L>=L){C=L;break}for(;++x<M;)(L=p.call(c,c[x],x))!=null&&L>C&&(C=L)}return C},e.extent=function(c,p){var x=-1,M=c.length,C,L,P;if(arguments.length===1){for(;++x<M;)if((L=c[x])!=null&&L>=L){C=P=L;break}for(;++x<M;)(L=c[x])!=null&&(C>L&&(C=L),P<L&&(P=L))}else{for(;++x<M;)if((L=p.call(c,c[x],x))!=null&&L>=L){C=P=L;break}for(;++x<M;)(L=p.call(c,c[x],x))!=null&&(C>L&&(C=L),P<L&&(P=L))}return[C,P]};function h(c){return c===null?NaN:+c}function d(c){return!isNaN(c)}e.sum=function(c,p){var x=0,M=c.length,C,L=-1;if(arguments.length===1)for(;++L<M;)d(C=+c[L])&&(x+=C);else for(;++L<M;)d(C=+p.call(c,c[L],L))&&(x+=C);return x},e.mean=function(c,p){var x=0,M=c.length,C,L=-1,P=M;if(arguments.length===1)for(;++L<M;)d(C=h(c[L]))?x+=C:--P;else for(;++L<M;)d(C=h(p.call(c,c[L],L)))?x+=C:--P;if(P)return x/P},e.quantile=function(c,p){var x=(c.length-1)*p+1,M=Math.floor(x),C=+c[M-1],L=x-M;return L?C+L*(c[M]-C):C},e.median=function(c,p){var x=[],M=c.length,C,L=-1;if(arguments.length===1)for(;++L<M;)d(C=h(c[L]))&&x.push(C);else for(;++L<M;)d(C=h(p.call(c,c[L],L)))&&x.push(C);if(x.length)return e.quantile(x.sort(v),.5)},e.variance=function(c,p){var x=c.length,M=0,C,L,P=0,E=-1,F=0;if(arguments.length===1)for(;++E<x;)d(C=h(c[E]))&&(L=C-M,M+=L/++F,P+=L*(C-M));else for(;++E<x;)d(C=h(p.call(c,c[E],E)))&&(L=C-M,M+=L/++F,P+=L*(C-M));if(F>1)return P/(F-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function y(c){return{left:function(p,x,M,C){for(arguments.length<3&&(M=0),arguments.length<4&&(C=p.length);M<C;){var L=M+C>>>1;c(p[L],x)<0?M=L+1:C=L}return M},right:function(p,x,M,C){for(arguments.length<3&&(M=0),arguments.length<4&&(C=p.length);M<C;){var L=M+C>>>1;c(p[L],x)>0?C=L:M=L+1}return M}}}var g=y(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return y(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(M=arguments.length)<3&&(x=c.length,M<2&&(p=0));for(var M=x-p,C,L;M;)L=Math.random()*M--|0,C=c[M+p],c[M+p]=c[L+p],c[L+p]=C;return c},e.permute=function(c,p){for(var x=p.length,M=new Array(x);x--;)M[x]=c[p[x]];return M},e.pairs=function(c){for(var p=0,x=c.length-1,M,C=c[0],L=new Array(x<0?0:x);p<x;)L[p]=[M=C,C=c[++p]];return L},e.transpose=function(c){if(!(L=c.length))return[];for(var p=-1,x=e.min(c,m),M=new Array(x);++p<x;)for(var C=-1,L,P=M[p]=new Array(L);++C<L;)P[C]=c[C][p];return M};function m(c){return c.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(c){var p=[];for(var x in c)p.push(x);return p},e.values=function(c){var p=[];for(var x in c)p.push(c[x]);return p},e.entries=function(c){var p=[];for(var x in c)p.push({key:x,value:c[x]});return p},e.merge=function(c){for(var p=c.length,x,M=-1,C=0,L,P;++M<p;)C+=c[M].length;for(L=new Array(C);--p>=0;)for(P=c[p],x=P.length;--x>=0;)L[--C]=P[x];return L};var _=Math.abs;e.range=function(c,p,x){if(arguments.length<3&&(x=1,arguments.length<2&&(p=c,c=0)),(p-c)/x===1/0)throw new Error("infinite range");var M=[],C=w(_(x)),L=-1,P;if(c*=C,p*=C,x*=C,x<0)for(;(P=c+x*++L)>p;)M.push(P/C);else for(;(P=c+x*++L)<p;)M.push(P/C);return M};function w(c){for(var p=1;c*p%1;)p*=10;return p}function T(c,p){for(var x in p)Object.defineProperty(c.prototype,x,{value:p[x],enumerable:!1})}e.map=function(c,p){var x=new b;if(c instanceof b)c.forEach(function(E,F){x.set(E,F)});else if(Array.isArray(c)){var M=-1,C=c.length,L;if(arguments.length===1)for(;++M<C;)x.set(M,c[M]);else for(;++M<C;)x.set(p.call(c,L=c[M],M),L)}else for(var P in c)x.set(P,c[P]);return x};function b(){this._=Object.create(null)}var A="__proto__",S="\0";T(b,{has:D,get:function(c){return this._[k(c)]},set:function(c,p){return this._[k(c)]=p},remove:R,keys:z,values:function(){var c=[];for(var p in this._)c.push(this._[p]);return c},entries:function(){var c=[];for(var p in this._)c.push({key:q(p),value:this._[p]});return c},size:N,empty:H,forEach:function(c){for(var p in this._)c.call(this,q(p),this._[p])}});function k(c){return(c+="")===A||c[0]===S?S+c:c}function q(c){return(c+="")[0]===S?c.slice(1):c}function D(c){return k(c)in this._}function R(c){return(c=k(c))in this._&&delete this._[c]}function z(){var c=[];for(var p in this._)c.push(q(p));return c}function N(){var c=0;for(var p in this._)++c;return c}function H(){for(var c in this._)return!1;return!0}e.nest=function(){var c={},p=[],x=[],M,C;function L(E,F,G){if(G>=p.length)return C?C.call(c,F):M?F.sort(M):F;for(var W=-1,$=F.length,ee=p[G++],he,we,te,le=new b,ue;++W<$;)(ue=le.get(he=ee(we=F[W])))?ue.push(we):le.set(he,[we]);return E?(we=E(),te=function(xe,Te){we.set(xe,L(E,Te,G))}):(we={},te=function(xe,Te){we[xe]=L(E,Te,G)}),le.forEach(te),we}function P(E,F){if(F>=p.length)return E;var G=[],W=x[F++];return E.forEach(function($,ee){G.push({key:$,values:P(ee,F)})}),W?G.sort(function($,ee){return W($.key,ee.key)}):G}return c.map=function(E,F){return L(F,E,0)},c.entries=function(E){return P(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return M=E,c},c.rollup=function(E){return C=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,M=c.length;x<M;++x)p.add(c[x]);return p};function O(){this._=Object.create(null)}T(O,{has:D,add:function(c){return this._[k(c+="")]=!0,c},remove:R,values:z,size:N,empty:H,forEach:function(c){for(var p in this._)c.call(this,q(p))}}),e.behavior={};function J(c){return c}e.rebind=function(c,p){for(var x=1,M=arguments.length,C;++x<M;)c[C=arguments[x]]=X(c,p,p[C]);return c};function X(c,p,x){return function(){var M=x.apply(p,arguments);return M===p?c:M}}function B(c,p){if(p in c)return p;p=p.charAt(0).toUpperCase()+p.slice(1);for(var x=0,M=I.length;x<M;++x){var C=I[x]+p;if(C in c)return C}}var I=["webkit","ms","moz","Moz","o","O"];function V(){}e.dispatch=function(){for(var c=new K,p=-1,x=arguments.length;++p<x;)c[arguments[p]]=Q(c);return c};function K(){}K.prototype.on=function(c,p){var x=c.indexOf("."),M="";if(x>=0&&(M=c.slice(x+1),c=c.slice(0,x)),c)return arguments.length<2?this[c].on(M):this[c].on(M,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(M,null);return this}};function Q(c){var p=[],x=new b;function M(){for(var C=p,L=-1,P=C.length,E;++L<P;)(E=C[L].on)&&E.apply(this,arguments);return c}return M.on=function(C,L){var P=x.get(C),E;return arguments.length<2?P&&P.on:(P&&(P.on=null,p=p.slice(0,E=p.indexOf(P)).concat(p.slice(E+1)),x.remove(C)),L&&p.push(x.set(C,{on:L})),c)},M}e.event=null;function ie(){e.event.preventDefault()}function me(){for(var c=e.event,p;p=c.sourceEvent;)c=p;return c}function pe(c){for(var p=new K,x=0,M=arguments.length;++x<M;)p[arguments[x]]=Q(p);return p.of=function(C,L){return function(P){try{var E=P.sourceEvent=e.event;P.target=c,e.event=P,p[P.type].apply(C,L)}finally{e.event=E}}},p}e.requote=function(c){return c.replace(ge,"\\$&")};var ge=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,j={}.__proto__?function(c,p){c.__proto__=p}:function(c,p){for(var x in p)c[x]=p[x]};function _e(c){return j(c,Ae),c}var se=function(c,p){return p.querySelector(c)},Se=function(c,p){return p.querySelectorAll(c)},ve=function(c,p){var x=c.matches||c[B(c,"matchesSelector")];return ve=function(M,C){return x.call(M,C)},ve(c,p)};typeof Sizzle=="function"&&(se=function(c,p){return Sizzle(c,p)[0]||null},Se=Sizzle,ve=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var Ae=e.selection.prototype=[];Ae.select=function(c){var p=[],x,M,C,L;c=Y(c);for(var P=-1,E=this.length;++P<E;){p.push(x=[]),x.parentNode=(C=this[P]).parentNode;for(var F=-1,G=C.length;++F<G;)(L=C[F])?(x.push(M=c.call(L,L.__data__,F,P)),M&&"__data__"in L&&(M.__data__=L.__data__)):x.push(null)}return _e(p)};function Y(c){return typeof c=="function"?c:function(){return se(c,this)}}Ae.selectAll=function(c){var p=[],x,M;c=re(c);for(var C=-1,L=this.length;++C<L;)for(var P=this[C],E=-1,F=P.length;++E<F;)(M=P[E])&&(p.push(x=t(c.call(M,M.__data__,E,C))),x.parentNode=M);return _e(p)};function re(c){return typeof c=="function"?c:function(){return Se(c,this)}}var U="http://www.w3.org/1999/xhtml",de={svg:"http://www.w3.org/2000/svg",xhtml:U,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:de,qualify:function(c){var p=c.indexOf(":"),x=c;return p>=0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),de.hasOwnProperty(x)?{space:de[x],local:c}:c}},Ae.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(be(p,c[p]));return this}return this.each(be(c,p))};function be(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function M(){this.removeAttributeNS(c.space,c.local)}function C(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var F=p.apply(this,arguments);F==null?this.removeAttribute(c):this.setAttribute(c,F)}function E(){var F=p.apply(this,arguments);F==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,F)}return p==null?c.local?M:x:typeof p=="function"?c.local?E:P:c.local?L:C}function ye(c){return c.trim().replace(/\s+/g," ")}Ae.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),M=(c=Re(c)).length,C=-1;if(p=x.classList){for(;++C<M;)if(!p.contains(c[C]))return!1}else for(p=x.getAttribute("class");++C<M;)if(!Fe(c[C]).test(p))return!1;return!0}for(p in c)this.each(Pe(p,c[p]));return this}return this.each(Pe(c,p))};function Fe(c){return new RegExp("(?:^|\\s+)"+e.requote(c)+"(?:\\s+|$)","g")}function Re(c){return(c+"").trim().split(/^|\s+/)}function Pe(c,p){c=Re(c).map(Ie);var x=c.length;function M(){for(var L=-1;++L<x;)c[L](this,p)}function C(){for(var L=-1,P=p.apply(this,arguments);++L<x;)c[L](this,P)}return typeof p=="function"?C:M}function Ie(c){var p=Fe(c);return function(x,M){if(C=x.classList)return M?C.add(c):C.remove(c);var C=x.getAttribute("class")||"";M?(p.lastIndex=0,p.test(C)||x.setAttribute("class",ye(C+" "+c))):x.setAttribute("class",ye(C.replace(p," ")))}}Ae.style=function(c,p,x){var M=arguments.length;if(M<3){if(typeof c!="string"){M<2&&(p="");for(x in c)this.each(Be(x,c[x],p));return this}if(M<2){var C=this.node();return i(C).getComputedStyle(C,null).getPropertyValue(c)}x=""}return this.each(Be(c,p,x))};function Be(c,p,x){function M(){this.style.removeProperty(c)}function C(){this.style.setProperty(c,p,x)}function L(){var P=p.apply(this,arguments);P==null?this.style.removeProperty(c):this.style.setProperty(c,P,x)}return p==null?M:typeof p=="function"?L:C}Ae.property=function(c,p){if(arguments.length<2){if(typeof c=="string")return this.node()[c];for(p in c)this.each(Ne(p,c[p]));return this}return this.each(Ne(c,p))};function Ne(c,p){function x(){delete this[c]}function M(){this[c]=p}function C(){var L=p.apply(this,arguments);L==null?delete this[c]:this[c]=L}return p==null?x:typeof p=="function"?C:M}Ae.text=function(c){return arguments.length?this.each(typeof c=="function"?function(){var p=c.apply(this,arguments);this.textContent=p==null?"":p}:c==null?function(){this.textContent=""}:function(){this.textContent=c}):this.node().textContent},Ae.html=function(c){return arguments.length?this.each(typeof c=="function"?function(){var p=c.apply(this,arguments);this.innerHTML=p==null?"":p}:c==null?function(){this.innerHTML=""}:function(){this.innerHTML=c}):this.node().innerHTML},Ae.append=function(c){return c=Ee(c),this.select(function(){return this.appendChild(c.apply(this,arguments))})};function Ee(c){function p(){var M=this.ownerDocument,C=this.namespaceURI;return C===U&&M.documentElement.namespaceURI===U?M.createElement(c):M.createElementNS(C,c)}function x(){return this.ownerDocument.createElementNS(c.space,c.local)}return typeof c=="function"?c:(c=e.ns.qualify(c)).local?x:p}Ae.insert=function(c,p){return c=Ee(c),p=Y(p),this.select(function(){return this.insertBefore(c.apply(this,arguments),p.apply(this,arguments)||null)})},Ae.remove=function(){return this.each(Je)};function Je(){var c=this.parentNode;c&&c.removeChild(this)}Ae.data=function(c,p){var x=-1,M=this.length,C,L;if(!arguments.length){for(c=new Array(M=(C=this[0]).length);++x<M;)(L=C[x])&&(c[x]=L.__data__);return c}function P(W,$){var ee,he=W.length,we=$.length,te=Math.min(he,we),le=new Array(we),ue=new Array(we),xe=new Array(he),Te,ce;if(p){var Ge=new b,rr=new Array(he),or;for(ee=-1;++ee<he;)(Te=W[ee])&&(Ge.has(or=p.call(Te,Te.__data__,ee))?xe[ee]=Te:Ge.set(or,Te),rr[ee]=or);for(ee=-1;++ee<we;)(Te=Ge.get(or=p.call($,ce=$[ee],ee)))?Te!==!0&&(le[ee]=Te,Te.__data__=ce):ue[ee]=We(ce),Ge.set(or,!0);for(ee=-1;++ee<he;)ee in rr&&Ge.get(rr[ee])!==!0&&(xe[ee]=W[ee])}else{for(ee=-1;++ee<te;)Te=W[ee],ce=$[ee],Te?(Te.__data__=ce,le[ee]=Te):ue[ee]=We(ce);for(;ee<we;++ee)ue[ee]=We($[ee]);for(;ee<he;++ee)xe[ee]=W[ee]}ue.update=le,ue.parentNode=le.parentNode=xe.parentNode=W.parentNode,E.push(ue),F.push(le),G.push(xe)}var E=cr([]),F=_e([]),G=_e([]);if(typeof c=="function")for(;++x<M;)P(C=this[x],c.call(C,C.parentNode.__data__,x));else for(;++x<M;)P(C=this[x],c);return F.enter=function(){return E},F.exit=function(){return G},F};function We(c){return{__data__:c}}Ae.datum=function(c){return arguments.length?this.property("__data__",c):this.property("__data__")},Ae.filter=function(c){var p=[],x,M,C;typeof c!="function"&&(c=ne(c));for(var L=0,P=this.length;L<P;L++){p.push(x=[]),x.parentNode=(M=this[L]).parentNode;for(var E=0,F=M.length;E<F;E++)(C=M[E])&&c.call(C,C.__data__,E,L)&&x.push(C)}return _e(p)};function ne(c){return function(){return ve(this,c)}}Ae.order=function(){for(var c=-1,p=this.length;++c<p;)for(var x=this[c],M=x.length-1,C=x[M],L;--M>=0;)(L=x[M])&&(C&&C!==L.nextSibling&&C.parentNode.insertBefore(L,C),C=L);return this},Ae.sort=function(c){c=Me.apply(this,arguments);for(var p=-1,x=this.length;++p<x;)this[p].sort(c);return this.order()};function Me(c){return arguments.length||(c=v),function(p,x){return p&&x?c(p.__data__,x.__data__):!p-!x}}Ae.each=function(c){return Ce(this,function(p,x,M){c.call(p,p.__data__,x,M)})};function Ce(c,p){for(var x=0,M=c.length;x<M;x++)for(var C=c[x],L=0,P=C.length,E;L<P;L++)(E=C[L])&&p(E,L,x);return c}Ae.call=function(c){var p=t(arguments);return c.apply(p[0]=this,p),this},Ae.empty=function(){return!this.node()},Ae.node=function(){for(var c=0,p=this.length;c<p;c++)for(var x=this[c],M=0,C=x.length;M<C;M++){var L=x[M];if(L)return L}return null},Ae.size=function(){var c=0;return Ce(this,function(){++c}),c};function cr(c){return j(c,tr),c}var tr=[];e.selection.enter=cr,e.selection.enter.prototype=tr,tr.append=Ae.append,tr.empty=Ae.empty,tr.node=Ae.node,tr.call=Ae.call,tr.size=Ae.size,tr.select=function(c){for(var p=[],x,M,C,L,P,E=-1,F=this.length;++E<F;){C=(L=this[E]).update,p.push(x=[]),x.parentNode=L.parentNode;for(var G=-1,W=L.length;++G<W;)(P=L[G])?(x.push(C[G]=M=c.call(L.parentNode,P.__data__,G,E)),M.__data__=P.__data__):x.push(null)}return _e(p)},tr.insert=function(c,p){return arguments.length<2&&(p=De(this)),Ae.insert.call(this,c,p)};function De(c){var p,x;return function(M,C,L){var P=c[L].update,E=P.length,F;for(L!=x&&(x=L,p=0),C>=p&&(p=C+1);!(F=P[p])&&++p<E;);return F}}e.select=function(c){var p;return typeof c=="string"?(p=[se(c,a)],p.parentNode=a.documentElement):(p=[c],p.parentNode=n(c)),_e([p])},e.selectAll=function(c){var p;return typeof c=="string"?(p=t(Se(c,a)),p.parentNode=a.documentElement):(p=t(c),p.parentNode=null),_e([p])},Ae.on=function(c,p,x){var M=arguments.length;if(M<3){if(typeof c!="string"){M<2&&(p=!1);for(x in c)this.each(Le(x,c[x],p));return this}if(M<2)return(M=this.node()["__on"+c])&&M._;x=!1}return this.each(Le(c,p,x))};function Le(c,p,x){var M="__on"+c,C=c.indexOf("."),L=Ze;C>0&&(c=c.slice(0,C));var P=Ye.get(c);P&&(c=P,L=Ue);function E(){var W=this[M];W&&(this.removeEventListener(c,W,W.$),delete this[M])}function F(){var W=L(p,t(arguments));E.call(this),this.addEventListener(c,this[M]=W,W.$=x),W._=p}function G(){var W=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),$;for(var ee in this)if($=ee.match(W)){var he=this[ee];this.removeEventListener($[1],he,he.$),delete this[ee]}}return C?p?F:E:p?V:G}var Ye=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Ye.forEach(function(c){"on"+c in a&&Ye.remove(c)});function Ze(c,p){return function(x){var M=e.event;e.event=x,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=M}}}function Ue(c,p){var x=Ze(c,p);return function(M){var C=this,L=M.relatedTarget;(!L||L!==C&&!(L.compareDocumentPosition(C)&8))&&x.call(C,M)}}var Oe,Ke=0;function fr(c){var p=".dragsuppress-"+ ++Ke,x="click"+p,M=e.select(i(c)).on("touchmove"+p,ie).on("dragstart"+p,ie).on("selectstart"+p,ie);if(Oe==null&&(Oe="onselectstart"in c?!1:B(c.style,"userSelect")),Oe){var C=n(c).style,L=C[Oe];C[Oe]="none"}return function(P){if(M.on(p,null),Oe&&(C[Oe]=L),P){var E=function(){M.on(x,null)};M.on(x,function(){ie(),E()},!0),setTimeout(E,0)}}}e.mouse=function(c){return ze(c,me())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ze(c,p){p.changedTouches&&(p=p.changedTouches[0]);var x=c.ownerSVGElement||c;if(x.createSVGPoint){var M=x.createSVGPoint();if(lr<0){var C=i(c);if(C.scrollX||C.scrollY){x=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=x[0][0].getScreenCTM();lr=!(L.f||L.e),x.remove()}}return lr?(M.x=p.pageX,M.y=p.pageY):(M.x=p.clientX,M.y=p.clientY),M=M.matrixTransform(c.getScreenCTM().inverse()),[M.x,M.y]}var P=c.getBoundingClientRect();return[p.clientX-P.left-c.clientLeft,p.clientY-P.top-c.clientTop]}e.touch=function(c,p,x){if(arguments.length<3&&(x=p,p=me().changedTouches),p){for(var M=0,C=p.length,L;M<C;++M)if((L=p[M]).identifier===x)return ze(c,L)}},e.behavior.drag=function(){var c=pe(C,"drag","dragstart","dragend"),p=null,x=L(V,e.mouse,i,"mousemove","mouseup"),M=L(ae,e.touch,J,"touchmove","touchend");function C(){this.on("mousedown.drag",x).on("touchstart.drag",M)}function L(P,E,F,G,W){return function(){var $=this,ee=e.event.target.correspondingElement||e.event.target,he=$.parentNode,we=c.of($,arguments),te=0,le=P(),ue=".drag"+(le==null?"":"-"+le),xe,Te=e.select(F(ee)).on(G+ue,rr).on(W+ue,or),ce=fr(ee),Ge=E(he,le);p?(xe=p.apply($,arguments),xe=[xe.x-Ge[0],xe.y-Ge[1]]):xe=[0,0],we({type:"dragstart"});function rr(){var ar=E(he,le),hr,dr;ar&&(hr=ar[0]-Ge[0],dr=ar[1]-Ge[1],te|=hr|dr,Ge=ar,we({type:"drag",x:ar[0]+xe[0],y:ar[1]+xe[1],dx:hr,dy:dr}))}function or(){E(he,le)&&(Te.on(G+ue,null).on(W+ue,null),ce(te),we({type:"dragend"}))}}}return C.origin=function(P){return arguments.length?(p=P,C):p},e.rebind(C,c,"on")};function ae(){return e.event.changedTouches[0].identifier}e.touches=function(c,p){return arguments.length<2&&(p=me().touches),p?t(p).map(function(x){var M=ze(c,x);return M.identifier=x.identifier,M}):[]};var oe=1e-6,qe=oe*oe,ke=Math.PI,ir=2*ke,vr=ir-oe,sr=ke/2,Mr=ke/180,Ur=180/ke;function $r(c){return c>0?1:c<0?-1:0}function Vr(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function St(c){return c>1?0:c<-1?ke:Math.acos(c)}function ea(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function ka(c){return((c=Math.exp(c))-1/c)/2}function ra(c){return((c=Math.exp(c))+1/c)/2}function pn(c){return((c=Math.exp(2*c))-1)/(c+1)}function Ia(c){return(c=Math.sin(c/2))*c}var ta=Math.SQRT2,Ha=2,yr=4;e.interpolateZoom=function(c,p){var x=c[0],M=c[1],C=c[2],L=p[0],P=p[1],E=p[2],F=L-x,G=P-M,W=F*F+G*G,$,ee;if(W<qe)ee=Math.log(E/C)/ta,$=function(xe){return[x+xe*F,M+xe*G,C*Math.exp(ta*xe*ee)]};else{var he=Math.sqrt(W),we=(E*E-C*C+yr*W)/(2*C*Ha*he),te=(E*E-C*C-yr*W)/(2*E*Ha*he),le=Math.log(Math.sqrt(we*we+1)-we),ue=Math.log(Math.sqrt(te*te+1)-te);ee=(ue-le)/ta,$=function(xe){var Te=xe*ee,ce=ra(le),Ge=C/(Ha*he)*(ce*pn(ta*Te+le)-ka(le));return[x+Ge*F,M+Ge*G,C*ce/ra(ta*Te+le)]}}return $.duration=ee*1e3,$},e.behavior.zoom=function(){var c={x:0,y:0,k:1},p,x,M,C=[960,500],L=lt,P=250,E=0,F="mousedown.zoom",G="mousemove.zoom",W="mouseup.zoom",$,ee="touchstart.zoom",he,we=pe(Te,"zoomstart","zoom","zoomend"),te,le,ue,xe;mt||(mt="onwheel"in a?(Wr=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(Wr=function(){return e.event.wheelDelta},"mousewheel"):(Wr=function(){return-e.event.detail},"MozMousePixelScroll"));function Te(er){er.on(F,Tr).on(mt+".zoom",Lt).on("dblclick.zoom",rt).on(ee,Jr)}Te.event=function(er){er.each(function(){var Lr=we.of(this,arguments),qr=c;Xl?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},dr(Lr)}).tween("zoom:zoom",function(){var Kr=C[0],_t=C[1],Ot=x?x[0]:Kr/2,ca=x?x[1]:_t/2,La=e.interpolateZoom([(Ot-c.x)/c.k,(ca-c.y)/c.k,Kr/c.k],[(Ot-qr.x)/qr.k,(ca-qr.y)/qr.k,Kr/qr.k]);return function(Oa){var qa=La(Oa),Ga=Kr/qa[2];this.__chart__=c={x:Ot-qa[0]*Ga,y:ca-qa[1]*Ga,k:Ga},Sr(Lr)}}).each("interrupt.zoom",function(){pr(Lr)}).each("end.zoom",function(){pr(Lr)}):(this.__chart__=c,dr(Lr),Sr(Lr),pr(Lr))})},Te.translate=function(er){return arguments.length?(c={x:+er[0],y:+er[1],k:c.k},hr(),Te):[c.x,c.y]},Te.scale=function(er){return arguments.length?(c={x:c.x,y:c.y,k:null},rr(+er),hr(),Te):c.k},Te.scaleExtent=function(er){return arguments.length?(L=er==null?lt:[+er[0],+er[1]],Te):L},Te.center=function(er){return arguments.length?(M=er&&[+er[0],+er[1]],Te):M},Te.size=function(er){return arguments.length?(C=er&&[+er[0],+er[1]],Te):C},Te.duration=function(er){return arguments.length?(P=+er,Te):P},Te.x=function(er){return arguments.length?(le=er,te=er.copy(),c={x:0,y:0,k:1},Te):le},Te.y=function(er){return arguments.length?(xe=er,ue=er.copy(),c={x:0,y:0,k:1},Te):xe};function ce(er){return[(er[0]-c.x)/c.k,(er[1]-c.y)/c.k]}function Ge(er){return[er[0]*c.k+c.x,er[1]*c.k+c.y]}function rr(er){c.k=Math.max(L[0],Math.min(L[1],er))}function or(er,Lr){Lr=Ge(Lr),c.x+=er[0]-Lr[0],c.y+=er[1]-Lr[1]}function ar(er,Lr,qr,Kr){er.__chart__={x:c.x,y:c.y,k:c.k},rr(Math.pow(2,Kr)),or(x=Lr,qr),er=e.select(er),P>0&&(er=er.transition().duration(P)),er.call(Te.event)}function hr(){le&&le.domain(te.range().map(function(er){return(er-c.x)/c.k}).map(te.invert)),xe&&xe.domain(ue.range().map(function(er){return(er-c.y)/c.k}).map(ue.invert))}function dr(er){E++||er({type:"zoomstart"})}function Sr(er){hr(),er({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function pr(er){--E||(er({type:"zoomend"}),x=null)}function Tr(){var er=this,Lr=we.of(er,arguments),qr=0,Kr=e.select(i(er)).on(G,ca).on(W,La),_t=ce(e.mouse(er)),Ot=fr(er);$c.call(er),dr(Lr);function ca(){qr=1,or(e.mouse(er),_t),Sr(Lr)}function La(){Kr.on(G,null).on(W,null),Ot(qr),pr(Lr)}}function Jr(){var er=this,Lr=we.of(er,arguments),qr={},Kr=0,_t,Ot=".zoom-"+e.event.changedTouches[0].identifier,ca="touchmove"+Ot,La="touchend"+Ot,Oa=[],qa=e.select(er),Ga=fr(er);Va(),dr(Lr),qa.on(F,null).on(ee,Va);function ba(){var Yn=e.touches(er);return _t=c.k,Yn.forEach(function(va){va.identifier in qr&&(qr[va.identifier]=ce(va))}),Yn}function Va(){var Yn=e.event.target;e.select(Yn).on(ca,Jl).on(La,$F),Oa.push(Yn);for(var va=e.event.changedTouches,yn=0,vi=va.length;yn<vi;++yn)qr[va[yn].identifier]=null;var gn=ba(),ls=Date.now();if(gn.length===1){if(ls-he<500){var Kl=gn[0];ar(er,Kl,qr[Kl.identifier],Math.floor(Math.log(c.k)/Math.LN2)+1),ie()}he=ls}else if(gn.length>1){var Kl=gn[0],al=gn[1],rv=Kl[0]-al[0],ab=Kl[1]-al[1];Kr=rv*rv+ab*ab}}function Jl(){var Yn=e.touches(er),va,yn,vi,gn;$c.call(er);for(var ls=0,Kl=Yn.length;ls<Kl;++ls,gn=null)if(vi=Yn[ls],gn=qr[vi.identifier]){if(yn)break;va=vi,yn=gn}if(gn){var al=(al=vi[0]-va[0])*al+(al=vi[1]-va[1])*al,rv=Kr&&Math.sqrt(al/Kr);va=[(va[0]+vi[0])/2,(va[1]+vi[1])/2],yn=[(yn[0]+gn[0])/2,(yn[1]+gn[1])/2],rr(rv*_t)}he=null,or(va,yn),Sr(Lr)}function $F(){if(e.event.touches.length){for(var Yn=e.event.changedTouches,va=0,yn=Yn.length;va<yn;++va)delete qr[Yn[va].identifier];for(var vi in qr)return void ba()}e.selectAll(Oa).on(Ot,null),qa.on(F,Tr).on(ee,Jr),Ga(),pr(Lr)}}function Lt(){var er=we.of(this,arguments);$?clearTimeout($):($c.call(this),p=ce(x=M||e.mouse(this)),dr(er)),$=setTimeout(function(){$=null,pr(er)},50),ie(),rr(Math.pow(2,Wr()*.002)*c.k),or(x,p),Sr(er)}function rt(){var er=e.mouse(this),Lr=Math.log(c.k)/Math.LN2;ar(this,er,ce(er),e.event.shiftKey?Math.ceil(Lr)-1:Math.floor(Lr)+1)}return e.rebind(Te,we,"on")};var lt=[0,1/0],Wr,mt;e.color=Tt;function Tt(){}Tt.prototype.toString=function(){return this.rgb()+""},e.hsl=ot;function ot(c,p,x){return this instanceof ot?(this.h=+c,this.s=+p,void(this.l=+x)):arguments.length<2?c instanceof ot?new ot(c.h,c.s,c.l):Zr(""+c,jr,ot):new ot(c,p,x)}var yt=ot.prototype=new Tt;yt.brighter=function(c){return c=Math.pow(.7,arguments.length?c:1),new ot(this.h,this.s,this.l/c)},yt.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new ot(this.h,this.s,c*this.l)},yt.rgb=function(){return Ca(this.h,this.s,this.l)};function Ca(c,p,x){var M,C;c=isNaN(c)?0:(c%=360)<0?c+360:c,p=isNaN(p)||p<0?0:p>1?1:p,x=x<0?0:x>1?1:x,C=x<=.5?x*(1+p):x+p-x*p,M=2*x-C;function L(E){return E>360?E-=360:E<0&&(E+=360),E<60?M+(C-M)*E/60:E<180?C:E<240?M+(C-M)*(240-E)/60:M}function P(E){return Math.round(L(E)*255)}return new Sa(P(c+120),P(c),P(c-120))}e.hcl=aa;function aa(c,p,x){return this instanceof aa?(this.h=+c,this.c=+p,void(this.l=+x)):arguments.length<2?c instanceof aa?new aa(c.h,c.c,c.l):c instanceof Wt?Dc(c.l,c.a,c.b):Dc((c=nr((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new aa(c,p,x)}var In=aa.prototype=new Tt;In.brighter=function(c){return new aa(this.h,this.c,Math.min(100,this.l+at*(arguments.length?c:1)))},In.darker=function(c){return new aa(this.h,this.c,Math.max(0,this.l-at*(arguments.length?c:1)))},In.rgb=function(){return Hn(this.h,this.c,this.l).rgb()};function Hn(c,p,x){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new Wt(x,Math.cos(c*=Mr)*p,Math.sin(c)*p)}e.lab=Wt;function Wt(c,p,x){return this instanceof Wt?(this.l=+c,this.a=+p,void(this.b=+x)):arguments.length<2?c instanceof Wt?new Wt(c.l,c.a,c.b):c instanceof aa?Hn(c.h,c.c,c.l):nr((c=Sa(c)).r,c.g,c.b):new Wt(c,p,x)}var at=18,sa=.95047,Ul=1,Gl=1.08883,rl=Wt.prototype=new Tt;rl.brighter=function(c){return new Wt(Math.min(100,this.l+at*(arguments.length?c:1)),this.a,this.b)},rl.darker=function(c){return new Wt(Math.max(0,this.l-at*(arguments.length?c:1)),this.a,this.b)},rl.rgb=function(){return qc(this.l,this.a,this.b)};function qc(c,p,x){var M=(c+16)/116,C=M+p/500,L=M-x/200;return C=ku(C)*sa,M=ku(M)*Ul,L=ku(L)*Gl,new Sa(Su(3.2404542*C-1.5371385*M-.4985314*L),Su(-.969266*C+1.8760108*M+.041556*L),Su(.0556434*C-.2040259*M+1.0572252*L))}function Dc(c,p,x){return c>0?new aa(Math.atan2(x,p)*Ur,Math.sqrt(p*p+x*x),c):new aa(NaN,NaN,c)}function ku(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function Cu(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Su(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Sa;function Sa(c,p,x){return this instanceof Sa?(this.r=~~c,this.g=~~p,void(this.b=~~x)):arguments.length<2?c instanceof Sa?new Sa(c.r,c.g,c.b):Zr(""+c,Sa,Ca):new Sa(c,p,x)}function Ec(c){return new Sa(c>>16,c>>8&255,c&255)}function $o(c){return Ec(c)+""}var jo=Sa.prototype=new Tt;jo.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,x=this.g,M=this.b,C=30;return!p&&!x&&!M?new Sa(C,C,C):(p&&p<C&&(p=C),x&&x<C&&(x=C),M&&M<C&&(M=C),new Sa(Math.min(255,p/c),Math.min(255,x/c),Math.min(255,M/c)))},jo.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new Sa(c*this.r,c*this.g,c*this.b)},jo.hsl=function(){return jr(this.r,this.g,this.b)},jo.toString=function(){return"#"+mr(this.r)+mr(this.g)+mr(this.b)};function mr(c){return c<16?"0"+Math.max(0,c).toString(16):Math.min(255,c).toString(16)}function Zr(c,p,x){var M=0,C=0,L=0,P,E,F;if(P=/([a-z]+)\((.*)\)/.exec(c=c.toLowerCase()),P)switch(E=P[2].split(","),P[1]){case"hsl":return x(parseFloat(E[0]),parseFloat(E[1])/100,parseFloat(E[2])/100);case"rgb":return p(st(E[0]),st(E[1]),st(E[2]))}return(F=fa.get(c))?p(F.r,F.g,F.b):(c!=null&&c.charAt(0)==="#"&&!isNaN(F=parseInt(c.slice(1),16))&&(c.length===4?(M=(F&3840)>>4,M=M>>4|M,C=F&240,C=C>>4|C,L=F&15,L=L<<4|L):c.length===7&&(M=(F&16711680)>>16,C=(F&65280)>>8,L=F&255)),p(M,C,L))}function jr(c,p,x){var M=Math.min(c/=255,p/=255,x/=255),C=Math.max(c,p,x),L=C-M,P,E,F=(C+M)/2;return L?(E=F<.5?L/(C+M):L/(2-C-M),c==C?P=(p-x)/L+(p<x?6:0):p==C?P=(x-c)/L+2:P=(c-p)/L+4,P*=60):(P=NaN,E=F>0&&F<1?0:P),new ot(P,E,F)}function nr(c,p,x){c=ua(c),p=ua(p),x=ua(x);var M=Cu((.4124564*c+.3575761*p+.1804375*x)/sa),C=Cu((.2126729*c+.7151522*p+.072175*x)/Ul),L=Cu((.0193339*c+.119192*p+.9503041*x)/Gl);return Wt(116*C-16,500*(M-C),200*(C-L))}function ua(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function st(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var fa=e.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});fa.forEach(function(c,p){fa.set(c,Ec(p))});function Rr(c){return typeof c=="function"?c:function(){return c}}e.functor=Rr,e.xhr=On(J);function On(c){return function(p,x,M){return arguments.length===2&&typeof x=="function"&&(M=x,x=null),Vl(p,x,c,M)}}function Vl(c,p,x,M){var C={},L=e.dispatch("beforesend","progress","load","error"),P={},E=new XMLHttpRequest,F=null;self.XDomainRequest&&!("withCredentials"in E)&&/^(http(s)?:)?\/\//.test(c)&&(E=new XDomainRequest),"onload"in E?E.onload=E.onerror=G:E.onreadystatechange=function(){E.readyState>3&&G()};function G(){var W=E.status,$;if(!W&&eN(E)||W>=200&&W<300||W===304){try{$=x.call(C,E)}catch(ee){L.error.call(C,ee);return}L.load.call(C,$)}else L.error.call(C,E)}return E.onprogress=function(W){var $=e.event;e.event=W;try{L.progress.call(C,E)}finally{e.event=$}},C.header=function(W,$){return W=(W+"").toLowerCase(),arguments.length<2?P[W]:($==null?delete P[W]:P[W]=$+"",C)},C.mimeType=function(W){return arguments.length?(p=W==null?null:W+"",C):p},C.responseType=function(W){return arguments.length?(F=W,C):F},C.response=function(W){return x=W,C},["get","post"].forEach(function(W){C[W]=function(){return C.send.apply(C,[W].concat(t(arguments)))}}),C.send=function(W,$,ee){if(arguments.length===2&&typeof $=="function"&&(ee=$,$=null),E.open(W,c,!0),p!=null&&!("accept"in P)&&(P.accept=p+",*/*"),E.setRequestHeader)for(var he in P)E.setRequestHeader(he,P[he]);return p!=null&&E.overrideMimeType&&E.overrideMimeType(p),F!=null&&(E.responseType=F),ee!=null&&C.on("error",ee).on("load",function(we){ee(null,we)}),L.beforesend.call(C,E),E.send($==null?null:$),C},C.abort=function(){return E.abort(),C},e.rebind(C,L,"on"),M==null?C:C.get(jz(M))}function jz(c){return c.length===1?function(p,x){c(p==null?x:null)}:c}function eN(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var x=new RegExp('["'+c+` ]`),M=c.charCodeAt(0);function C(G,W,$){arguments.length<3&&($=W,W=null);var ee=Vl(G,p,W==null?L:P(W),$);return ee.row=function(he){return arguments.length?ee.response((W=he)==null?L:P(he)):W},ee}function L(G){return C.parse(G.responseText)}function P(G){return function(W){return C.parse(W.responseText,G)}}C.parse=function(G,W){var $;return C.parseRows(G,function(ee,he){if($)return $(ee,he-1);var we=function(te){for(var le={},ue=ee.length,xe=0;xe<ue;++xe)le[ee[xe]]=te[xe];return le};$=W?function(te,le){return W(we(te),le)}:we})},C.parseRows=function(G,W){var $={},ee={},he=[],we=G.length,te=0,le=0,ue,xe;function Te(){if(te>=we)return ee;if(xe)return xe=!1,$;var Ge=te;if(G.charCodeAt(Ge)===34){for(var rr=Ge;rr++<we;)if(G.charCodeAt(rr)===34){if(G.charCodeAt(rr+1)!==34)break;++rr}te=rr+2;var or=G.charCodeAt(rr+1);return or===13?(xe=!0,G.charCodeAt(rr+2)===10&&++te):or===10&&(xe=!0),G.slice(Ge+1,rr).replace(/""/g,'"')}for(;te<we;){var or=G.charCodeAt(te++),ar=1;if(or===10)xe=!0;else if(or===13)xe=!0,G.charCodeAt(te)===10&&(++te,++ar);else if(or!==M)continue;return G.slice(Ge,te-ar)}return G.slice(Ge)}for(;(ue=Te())!==ee;){for(var ce=[];ue!==$&&ue!==ee;)ce.push(ue),ue=Te();W&&(ce=W(ce,le++))==null||he.push(ce)}return he},C.format=function(G){if(Array.isArray(G[0]))return C.formatRows(G);var W=new O,$=[];return G.forEach(function(ee){for(var he in ee)W.has(he)||$.push(W.add(he))}),[$.map(F).join(c)].concat(G.map(function(ee){return $.map(function(he){return F(ee[he])}).join(c)})).join(` `)},C.formatRows=function(G){return G.map(E).join(` `)};function E(G){return G.map(F).join(c)}function F(G){return x.test(G)?'"'+G.replace(/\"/g,'""')+'"':G}return C},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Pc,Rc,zc,Nc,U3=this[B(this,"requestAnimationFrame")]||function(c){setTimeout(c,17)};e.timer=function(){Fc.apply(this,arguments)};function Fc(c,p,x){var M=arguments.length;M<2&&(p=0),M<3&&(x=Date.now());var C=x+p,L={c,t:C,n:null};return Rc?Rc.n=L:Pc=L,Rc=L,zc||(Nc=clearTimeout(Nc),zc=1,U3(c1)),L}function c1(){var c=G3(),p=V3()-c;p>24?(isFinite(p)&&(clearTimeout(Nc),Nc=setTimeout(c1,p)),zc=0):(zc=1,U3(c1))}e.timer.flush=function(){G3(),V3()};function G3(){for(var c=Date.now(),p=Pc;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function V3(){for(var c,p=Pc,x=1/0;p;)p.c?(p.t<x&&(x=p.t),p=(c=p).n):p=c?c.n=p.n:Pc=p.n;return Rc=c,x}e.round=function(c,p){return p?Math.round(c*(p=Math.pow(10,p)))/p:Math.round(c)},e.geom={};function es(c){return c[0]}function Lu(c){return c[1]}e.geom.hull=function(c){var p=es,x=Lu;if(arguments.length)return M(c);function M(C){if(C.length<3)return[];var L=Rr(p),P=Rr(x),E,F=C.length,G=[],W=[];for(E=0;E<F;E++)G.push([+L.call(this,C[E],E),+P.call(this,C[E],E),E]);for(G.sort(rN),E=0;E<F;E++)W.push([G[E][0],-G[E][1]]);var $=W3(G),ee=W3(W),he=ee[0]===$[0],we=ee[ee.length-1]===$[$.length-1],te=[];for(E=$.length-1;E>=0;--E)te.push(C[G[$[E]][2]]);for(E=+he;E<ee.length-we;++E)te.push(C[G[ee[E]][2]]);return te}return M.x=function(C){return arguments.length?(p=C,M):p},M.y=function(C){return arguments.length?(x=C,M):x},M};function W3(c){for(var p=c.length,x=[0,1],M=2,C=2;C<p;C++){for(;M>1&&Vr(c[x[M-2]],c[x[M-1]],c[C])<=0;)--M;x[M++]=C}return x.slice(0,M)}function rN(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return j(c,Ic),c};var Ic=e.geom.polygon.prototype=[];Ic.area=function(){for(var c=-1,p=this.length,x,M=this[p-1],C=0;++c<p;)x=M,M=this[c],C+=x[1]*M[0]-x[0]*M[1];return C*.5},Ic.centroid=function(c){var p=-1,x=this.length,M=0,C=0,L,P=this[x-1],E;for(arguments.length||(c=-1/(6*this.area()));++p<x;)L=P,P=this[p],E=L[0]*P[1]-P[0]*L[1],M+=(L[0]+P[0])*E,C+=(L[1]+P[1])*E;return[M*c,C*c]},Ic.clip=function(c){for(var p,x=Z3(c),M=-1,C=this.length-Z3(this),L,P,E=this[C-1],F,G,W;++M<C;){for(p=c.slice(),c.length=0,F=this[M],G=p[(P=p.length-x)-1],L=-1;++L<P;)W=p[L],v1(W,E,F)?(v1(G,E,F)||c.push(h1(G,W,E,F)),c.push(W)):v1(G,E,F)&&c.push(h1(G,W,E,F)),G=W;x&&c.push(c[0]),E=F}return c};function v1(c,p,x){return(x[0]-p[0])*(c[1]-p[1])<(x[1]-p[1])*(c[0]-p[0])}function h1(c,p,x,M){var C=c[0],L=x[0],P=p[0]-C,E=M[0]-L,F=c[1],G=x[1],W=p[1]-F,$=M[1]-G,ee=(E*(F-G)-$*(C-L))/($*P-E*W);return[C+ee*P,F+ee*W]}function Z3(c){var p=c[0],x=c[c.length-1];return!(p[0]-x[0]||p[1]-x[1])}var rs,Wl,ts,X3=[],d1,qu,J3=[];function tN(){Bc(this),this.edge=this.site=this.circle=null}function K3(c){var p=X3.pop()||new tN;return p.site=c,p}function p1(c){ns(c),ts.remove(c),X3.push(c),Bc(c)}function aN(c){var p=c.circle,x=p.x,M=p.cy,C={x,y:M},L=c.P,P=c.N,E=[c];p1(c);for(var F=L;F.circle&&_(x-F.circle.x)<oe&&_(M-F.circle.cy)<oe;)L=F.P,E.unshift(F),p1(F),F=L;E.unshift(F),ns(F);for(var G=P;G.circle&&_(x-G.circle.x)<oe&&_(M-G.circle.cy)<oe;)P=G.N,E.push(G),p1(G),G=P;E.push(G),ns(G);var W=E.length,$;for($=1;$<W;++$)G=E[$],F=E[$-1],Hc(G.edge,F.site,G.site,C);F=E[0],G=E[W-1],G.edge=Du(F.site,G.site,null,C),as(F),as(G)}function nN(c){for(var p=c.x,x=c.y,M,C,L,P,E=ts._;E;)if(L=Q3(E,x)-p,L>oe)E=E.L;else if(P=p-iN(E,x),P>oe){if(!E.R){M=E;break}E=E.R}else{L>-oe?(M=E.P,C=E):P>-oe?(M=E,C=E.N):M=C=E;break}var F=K3(c);if(ts.insert(M,F),!(!M&&!C)){if(M===C){ns(M),C=K3(M.site),ts.insert(F,C),F.edge=C.edge=Du(M.site,F.site),as(M),as(C);return}if(!C){F.edge=Du(M.site,F.site);return}ns(M),ns(C);var G=M.site,W=G.x,$=G.y,ee=c.x-W,he=c.y-$,we=C.site,te=we.x-W,le=we.y-$,ue=2*(ee*le-he*te),xe=ee*ee+he*he,Te=te*te+le*le,ce={x:(le*xe-he*Te)/ue+W,y:(ee*Te-te*xe)/ue+$};Hc(C.edge,G,we,ce),F.edge=Du(G,c,null,ce),C.edge=Du(c,we,null,ce),as(M),as(C)}}function Q3(c,p){var x=c.site,M=x.x,C=x.y,L=C-p;if(!L)return M;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,F=x.y,G=F-p;if(!G)return E;var W=E-M,$=1/L-1/G,ee=W/G;return $?(-ee+Math.sqrt(ee*ee-2*$*(W*W/(-2*G)-F+G/2+C-L/2)))/$+M:(M+E)/2}function iN(c,p){var x=c.N;if(x)return Q3(x,p);var M=c.site;return M.y===p?M.x:1/0}function $3(c){this.site=c,this.edges=[]}$3.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(j3),c.length};function lN(c){for(var p=c[0][0],x=c[1][0],M=c[0][1],C=c[1][1],L,P,E,F,G=Wl,W=G.length,$,ee,he,we,te,le;W--;)if($=G[W],!(!$||!$.prepare()))for(he=$.edges,we=he.length,ee=0;ee<we;)le=he[ee].end(),E=le.x,F=le.y,te=he[++ee%we].start(),L=te.x,P=te.y,(_(E-L)>oe||_(F-P)>oe)&&(he.splice(ee,0,new Oc(cN($.site,le,_(E-p)<oe&&C-F>oe?{x:p,y:_(L-p)<oe?P:C}:_(F-C)<oe&&x-E>oe?{x:_(P-C)<oe?L:x,y:C}:_(E-x)<oe&&F-M>oe?{x,y:_(L-x)<oe?P:M}:_(F-M)<oe&&E-p>oe?{x:_(P-M)<oe?L:p,y:M}:null),$.site,null)),++we)}function j3(c,p){return p.angle-c.angle}function oN(){Bc(this),this.x=this.y=this.arc=this.site=this.cy=null}function as(c){var p=c.P,x=c.N;if(!(!p||!x)){var M=p.site,C=c.site,L=x.site;if(M!==L){var P=C.x,E=C.y,F=M.x-P,G=M.y-E,W=L.x-P,le=L.y-E,$=2*(F*le-G*W);if(!($>=-qe)){var ee=F*F+G*G,he=W*W+le*le,we=(le*ee-G*he)/$,te=(F*he-W*ee)/$,le=te+E,ue=J3.pop()||new oN;ue.arc=c,ue.site=C,ue.x=we+P,ue.y=le+Math.sqrt(we*we+te*te),ue.cy=le,c.circle=ue;for(var xe=null,Te=qu._;Te;)if(ue.y<Te.y||ue.y===Te.y&&ue.x<=Te.x)if(Te.L)Te=Te.L;else{xe=Te.P;break}else if(Te.R)Te=Te.R;else{xe=Te;break}qu.insert(xe,ue),xe||(d1=ue)}}}}function ns(c){var p=c.circle;p&&(p.P||(d1=p.N),qu.remove(p),J3.push(p),Bc(p),c.circle=null)}function sN(c,p,x,M){return function(C){var L=C.a,P=C.b,E=L.x,F=L.y,G=P.x,W=P.y,$=0,ee=1,he=G-E,we=W-F,te;if(te=c-E,!(!he&&te>0)){if(te/=he,he<0){if(te<$)return;te<ee&&(ee=te)}else if(he>0){if(te>ee)return;te>$&&($=te)}if(te=x-E,!(!he&&te<0)){if(te/=he,he<0){if(te>ee)return;te>$&&($=te)}else if(he>0){if(te<$)return;te<ee&&(ee=te)}if(te=p-F,!(!we&&te>0)){if(te/=we,we<0){if(te<$)return;te<ee&&(ee=te)}else if(we>0){if(te>ee)return;te>$&&($=te)}if(te=M-F,!(!we&&te<0)){if(te/=we,we<0){if(te>ee)return;te>$&&($=te)}else if(we>0){if(te<$)return;te<ee&&(ee=te)}return $>0&&(C.a={x:E+$*he,y:F+$*we}),ee<1&&(C.b={x:E+ee*he,y:F+ee*we}),C}}}}}}function uN(c){for(var p=rs,x=sN(c[0][0],c[0][1],c[1][0],c[1][1]),M=p.length,C;M--;)C=p[M],(!fN(C,c)||!x(C)||_(C.a.x-C.b.x)<oe&&_(C.a.y-C.b.y)<oe)&&(C.a=C.b=null,p.splice(M,1))}function fN(c,p){var x=c.b;if(x)return!0;var M=c.a,C=p[0][0],L=p[1][0],P=p[0][1],E=p[1][1],F=c.l,G=c.r,W=F.x,$=F.y,ee=G.x,he=G.y,we=(W+ee)/2,te=($+he)/2,le,ue;if(he===$){if(we<C||we>=L)return;if(W>ee){if(!M)M={x:we,y:P};else if(M.y>=E)return;x={x:we,y:E}}else{if(!M)M={x:we,y:E};else if(M.y<P)return;x={x:we,y:P}}}else if(le=(W-ee)/(he-$),ue=te-le*we,le<-1||le>1)if(W>ee){if(!M)M={x:(P-ue)/le,y:P};else if(M.y>=E)return;x={x:(E-ue)/le,y:E}}else{if(!M)M={x:(E-ue)/le,y:E};else if(M.y<P)return;x={x:(P-ue)/le,y:P}}else if($<he){if(!M)M={x:C,y:le*C+ue};else if(M.x>=L)return;x={x:L,y:le*L+ue}}else{if(!M)M={x:L,y:le*L+ue};else if(M.x<C)return;x={x:C,y:le*C+ue}}return c.a=M,c.b=x,!0}function e5(c,p){this.l=c,this.r=p,this.a=this.b=null}function Du(c,p,x,M){var C=new e5(c,p);return rs.push(C),x&&Hc(C,c,p,x),M&&Hc(C,p,c,M),Wl[c.i].edges.push(new Oc(C,c,p)),Wl[p.i].edges.push(new Oc(C,p,c)),C}function cN(c,p,x){var M=new e5(c,null);return M.a=p,M.b=x,rs.push(M),M}function Hc(c,p,x,M){!c.a&&!c.b?(c.a=M,c.l=p,c.r=x):c.l===x?c.b=M:c.a=M}function Oc(c,p,x){var M=c.a,C=c.b;this.edge=c,this.site=p,this.angle=x?Math.atan2(x.y-p.y,x.x-p.x):c.l===p?Math.atan2(C.x-M.x,M.y-C.y):Math.atan2(M.x-C.x,C.y-M.y)}Oc.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function m1(){this._=null}function Bc(c){c.U=c.C=c.L=c.R=c.P=c.N=null}m1.prototype={insert:function(c,p){var x,M,C;if(c){if(p.P=c,p.N=c.N,c.N&&(c.N.P=p),c.N=p,c.R){for(c=c.R;c.L;)c=c.L;c.L=p}else c.R=p;x=c}else this._?(c=r5(this._),p.P=null,p.N=c,c.P=c.L=p,x=c):(p.P=p.N=null,this._=p,x=null);for(p.L=p.R=null,p.U=x,p.C=!0,c=p;x&&x.C;)M=x.U,x===M.L?(C=M.R,C&&C.C?(x.C=C.C=!1,M.C=!0,c=M):(c===x.R&&(Eu(this,x),c=x,x=c.U),x.C=!1,M.C=!0,Pu(this,M))):(C=M.L,C&&C.C?(x.C=C.C=!1,M.C=!0,c=M):(c===x.L&&(Pu(this,x),c=x,x=c.U),x.C=!1,M.C=!0,Eu(this,M))),x=c.U;this._.C=!1},remove:function(c){c.N&&(c.N.P=c.P),c.P&&(c.P.N=c.N),c.N=c.P=null;var p=c.U,x,M=c.L,C=c.R,L,P;if(M?C?L=r5(C):L=M:L=C,p?p.L===c?p.L=L:p.R=L:this._=L,M&&C?(P=L.C,L.C=c.C,L.L=M,M.U=L,L!==C?(p=L.U,L.U=c.U,c=L.R,p.L=c,L.R=C,C.U=L):(L.U=p,p=L,c=L.R)):(P=c.C,c=L),c&&(c.U=p),!P){if(c&&c.C){c.C=!1;return}do{if(c===this._)break;if(c===p.L){if(x=p.R,x.C&&(x.C=!1,p.C=!0,Eu(this,p),x=p.R),x.L&&x.L.C||x.R&&x.R.C){(!x.R||!x.R.C)&&(x.L.C=!1,x.C=!0,Pu(this,x),x=p.R),x.C=p.C,p.C=x.R.C=!1,Eu(this,p),c=this._;break}}else if(x=p.L,x.C&&(x.C=!1,p.C=!0,Pu(this,p),x=p.L),x.L&&x.L.C||x.R&&x.R.C){(!x.L||!x.L.C)&&(x.R.C=!1,x.C=!0,Eu(this,x),x=p.L),x.C=p.C,p.C=x.L.C=!1,Pu(this,p),c=this._;break}x.C=!0,c=p,p=p.U}while(!c.C);c&&(c.C=!1)}}};function Eu(c,p){var x=p,M=p.R,C=x.U;C?C.L===x?C.L=M:C.R=M:c._=M,M.U=C,x.U=M,x.R=M.L,x.R&&(x.R.U=x),M.L=x}function Pu(c,p){var x=p,M=p.L,C=x.U;C?C.L===x?C.L=M:C.R=M:c._=M,M.U=C,x.U=M,x.L=M.R,x.L&&(x.L.U=x),M.R=x