plotly.js
Version:
The open source javascript graphing library that powers plotly
18 lines • 1.1 MB
JavaScript
/**
* plotly.js (basic - minified) v3.3.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 iI=Object.defineProperty,lI=Object.defineProperties;var oI=Object.getOwnPropertyDescriptors;var sb=Object.getOwnPropertySymbols;var sI=Object.prototype.hasOwnProperty,uI=Object.prototype.propertyIsEnumerable;var ub=(e,r,t)=>r in e?iI(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Kl=(e,r)=>{for(var t in r||(r={}))sI.call(r,t)&&ub(e,t,r[t]);if(sb)for(var t of sb(r))uI.call(r,t)&&ub(e,t,r[t]);return e},ov=(e,r)=>lI(e,oI(r));var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var sv=Z(fb=>{"use strict";fb.version="3.3.1"});var vb=Z((cb,uv)=>{(function(r,t,a){t[r]=t[r]||a(),typeof uv!="undefined"&&uv.exports&&(uv.exports=t[r])})("Promise",typeof window!="undefined"?window:cb,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,M){return Object.defineProperty(w,T,{value:b,writable:!0,configurable:M!==!1})}}catch(_){r=function(T,b,M){return T[b]=M,T}}a=function(){var w,T,b;function M(C,k){this.fn=C,this.self=k,this.next=void 0}return{add:function(k,q){b=new M(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,M;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")):(M=o(b))?M.call(b,T.resolve,T.reject):T.resolve(b))}catch(C){T.reject(C)}}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(M){v.call(b,M)}}):(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 M=0;M<w.length;M++)(function(k){_.resolve(w[k]).then(function(D){T(k,D)},b)})(M)}function d(_){this.def=_,this.triggered=!1}function m(_){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 m(this);this.then=function(b,M){var C={success:typeof b=="function"?b:!0,failure:typeof M=="function"?M:!1};return C.promise=new this.constructor(function(q,D){if(typeof q!="function"||typeof D!="function")throw TypeError("Not a function");C.resolve=q,C.reject=D}),w.chain.push(C),w.state!==0&&l(s,w),C.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 y=r({},"constructor",g,!1);return g.prototype=y,r(y,"__NPO__",0,!1),r(g,"resolve",function(w){var T=this;return w&&typeof w=="object"&&w.__NPO__===1?w:new T(function(M,C){if(typeof M!="function"||typeof C!="function")throw TypeError("Not a function");M(w)})}),r(g,"reject",function(w){return new this(function(b,M){if(typeof b!="function"||typeof M!="function")throw TypeError("Not a function");M(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(M,C){if(typeof M!="function"||typeof C!="function")throw TypeError("Not a function");var k=w.length,q=Array(k),D=0;h(T,w,function(z,F){q[z]=F,++D===k&&M(q)},C)})}),r(g,"race",function(w){var T=this;return n.call(w)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(M,C){if(typeof M!="function"||typeof C!="function")throw TypeError("Not a function");h(T,w,function(q,D){M(D)},C)})}),g})});var Ir=Z((bie,fv)=>{(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,A=new Array(x);x--;)A[x]=p[x];return A}}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,A){s.call(this,p,x,A+"")},u.setProperty=function(p,x,A){f.call(this,p,x+"",A)}}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,A=c.length,S,L;if(arguments.length===1){for(;++x<A;)if((L=c[x])!=null&&L>=L){S=L;break}for(;++x<A;)(L=c[x])!=null&&S>L&&(S=L)}else{for(;++x<A;)if((L=p.call(c,c[x],x))!=null&&L>=L){S=L;break}for(;++x<A;)(L=p.call(c,c[x],x))!=null&&S>L&&(S=L)}return S},e.max=function(c,p){var x=-1,A=c.length,S,L;if(arguments.length===1){for(;++x<A;)if((L=c[x])!=null&&L>=L){S=L;break}for(;++x<A;)(L=c[x])!=null&&L>S&&(S=L)}else{for(;++x<A;)if((L=p.call(c,c[x],x))!=null&&L>=L){S=L;break}for(;++x<A;)(L=p.call(c,c[x],x))!=null&&L>S&&(S=L)}return S},e.extent=function(c,p){var x=-1,A=c.length,S,L,P;if(arguments.length===1){for(;++x<A;)if((L=c[x])!=null&&L>=L){S=P=L;break}for(;++x<A;)(L=c[x])!=null&&(S>L&&(S=L),P<L&&(P=L))}else{for(;++x<A;)if((L=p.call(c,c[x],x))!=null&&L>=L){S=P=L;break}for(;++x<A;)(L=p.call(c,c[x],x))!=null&&(S>L&&(S=L),P<L&&(P=L))}return[S,P]};function h(c){return c===null?NaN:+c}function d(c){return!isNaN(c)}e.sum=function(c,p){var x=0,A=c.length,S,L=-1;if(arguments.length===1)for(;++L<A;)d(S=+c[L])&&(x+=S);else for(;++L<A;)d(S=+p.call(c,c[L],L))&&(x+=S);return x},e.mean=function(c,p){var x=0,A=c.length,S,L=-1,P=A;if(arguments.length===1)for(;++L<A;)d(S=h(c[L]))?x+=S:--P;else for(;++L<A;)d(S=h(p.call(c,c[L],L)))?x+=S:--P;if(P)return x/P},e.quantile=function(c,p){var x=(c.length-1)*p+1,A=Math.floor(x),S=+c[A-1],L=x-A;return L?S+L*(c[A]-S):S},e.median=function(c,p){var x=[],A=c.length,S,L=-1;if(arguments.length===1)for(;++L<A;)d(S=h(c[L]))&&x.push(S);else for(;++L<A;)d(S=h(p.call(c,c[L],L)))&&x.push(S);if(x.length)return e.quantile(x.sort(v),.5)},e.variance=function(c,p){var x=c.length,A=0,S,L,P=0,E=-1,N=0;if(arguments.length===1)for(;++E<x;)d(S=h(c[E]))&&(L=S-A,A+=L/++N,P+=L*(S-A));else for(;++E<x;)d(S=h(p.call(c,c[E],E)))&&(L=S-A,A+=L/++N,P+=L*(S-A));if(N>1)return P/(N-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A<S;){var L=A+S>>>1;c(p[L],x)<0?A=L+1:S=L}return A},right:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A<S;){var L=A+S>>>1;c(p[L],x)>0?S=L:A=L+1}return A}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,S,L;A;)L=Math.random()*A--|0,S=c[A+p],c[A+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,S=c[0],L=new Array(x<0?0:x);p<x;)L[p]=[A=S,S=c[++p]];return L},e.transpose=function(c){if(!(L=c.length))return[];for(var p=-1,x=e.min(c,y),A=new Array(x);++p<x;)for(var S=-1,L,P=A[p]=new Array(L);++S<L;)P[S]=c[S][p];return A};function y(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,A=-1,S=0,L,P;++A<p;)S+=c[A].length;for(L=new Array(S);--p>=0;)for(P=c[p],x=P.length;--x>=0;)L[--S]=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 A=[],S=w(_(x)),L=-1,P;if(c*=S,p*=S,x*=S,x<0)for(;(P=c+x*++L)>p;)A.push(P/S);else for(;(P=c+x*++L)<p;)A.push(P/S);return A};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,N){x.set(E,N)});else if(Array.isArray(c)){var A=-1,S=c.length,L;if(arguments.length===1)for(;++A<S;)x.set(A,c[A]);else for(;++A<S;)x.set(p.call(c,L=c[A],A),L)}else for(var P in c)x.set(P,c[P]);return x};function b(){this._=Object.create(null)}var M="__proto__",C="\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:F,empty:H,forEach:function(c){for(var p in this._)c.call(this,q(p),this._[p])}});function k(c){return(c+="")===M||c[0]===C?C+c:c}function q(c){return(c+="")[0]===C?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 F(){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=[],A,S;function L(E,N,V){if(V>=p.length)return S?S.call(c,N):A?N.sort(A):N;for(var W=-1,j=N.length,ee=p[V++],he,Te,te,oe=new b,ue;++W<j;)(ue=oe.get(he=ee(Te=N[W])))?ue.push(Te):oe.set(he,[Te]);return E?(Te=E(),te=function(xe,Ae){Te.set(xe,L(E,Ae,V))}):(Te={},te=function(xe,Ae){Te[xe]=L(E,Ae,V)}),oe.forEach(te),Te}function P(E,N){if(N>=p.length)return E;var V=[],W=x[N++];return E.forEach(function(j,ee){V.push({key:j,values:P(ee,N)})}),W?V.sort(function(j,ee){return W(j.key,ee.key)}):V}return c.map=function(E,N){return L(N,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 A=E,c},c.rollup=function(E){return S=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,A=c.length;x<A;++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:F,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,A=arguments.length,S;++x<A;)c[S=arguments[x]]=X(c,p,p[S]);return c};function X(c,p,x){return function(){var A=x.apply(p,arguments);return A===p?c:A}}function G(c,p){if(p in c)return p;p=p.charAt(0).toUpperCase()+p.slice(1);for(var x=0,A=I.length;x<A;++x){var S=I[x]+p;if(S in c)return S}}var I=["webkit","ms","moz","Moz","o","O"];function Y(){}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("."),A="";if(x>=0&&(A=c.slice(x+1),c=c.slice(0,x)),c)return arguments.length<2?this[c].on(A):this[c].on(A,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(A,null);return this}};function Q(c){var p=[],x=new b;function A(){for(var S=p,L=-1,P=S.length,E;++L<P;)(E=S[L].on)&&E.apply(this,arguments);return c}return A.on=function(S,L){var P=x.get(S),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(S)),L&&p.push(x.set(S,{on:L})),c)},A}e.event=null;function ne(){e.event.preventDefault()}function me(){for(var c=e.event,p;p=c.sourceEvent;)c=p;return c}function de(c){for(var p=new K,x=0,A=arguments.length;++x<A;)p[arguments[x]]=Q(p);return p.of=function(S,L){return function(P){try{var E=P.sourceEvent=e.event;P.target=c,e.event=P,p[P.type].apply(S,L)}finally{e.event=E}}},p}e.requote=function(c){return c.replace(ke,"\\$&")};var ke=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,re={}.__proto__?function(c,p){c.__proto__=p}:function(c,p){for(var x in p)c[x]=p[x]};function Ce(c){return re(c,ge),c}var ce=function(c,p){return p.querySelector(c)},_e=function(c,p){return p.querySelectorAll(c)},se=function(c,p){var x=c.matches||c[G(c,"matchesSelector")];return se=function(A,S){return x.call(A,S)},se(c,p)};typeof Sizzle=="function"&&(ce=function(c,p){return Sizzle(c,p)[0]||null},_e=Sizzle,se=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var ge=e.selection.prototype=[];ge.select=function(c){var p=[],x,A,S,L;c=B(c);for(var P=-1,E=this.length;++P<E;){p.push(x=[]),x.parentNode=(S=this[P]).parentNode;for(var N=-1,V=S.length;++N<V;)(L=S[N])?(x.push(A=c.call(L,L.__data__,N,P)),A&&"__data__"in L&&(A.__data__=L.__data__)):x.push(null)}return Ce(p)};function B(c){return typeof c=="function"?c:function(){return ce(c,this)}}ge.selectAll=function(c){var p=[],x,A;c=$(c);for(var S=-1,L=this.length;++S<L;)for(var P=this[S],E=-1,N=P.length;++E<N;)(A=P[E])&&(p.push(x=t(c.call(A,A.__data__,E,S))),x.parentNode=A);return Ce(p)};function $(c){return typeof c=="function"?c:function(){return _e(c,this)}}var U="http://www.w3.org/1999/xhtml",ye={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:ye,qualify:function(c){var p=c.indexOf(":"),x=c;return p>=0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),ye.hasOwnProperty(x)?{space:ye[x],local:c}:c}},ge.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(we(p,c[p]));return this}return this.each(we(c,p))};function we(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function A(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?A:x:typeof p=="function"?c.local?E:P:c.local?L:S}function pe(c){return c.trim().replace(/\s+/g," ")}ge.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),A=(c=Fe(c)).length,S=-1;if(p=x.classList){for(;++S<A;)if(!p.contains(c[S]))return!1}else for(p=x.getAttribute("class");++S<A;)if(!Re(c[S]).test(p))return!1;return!0}for(p in c)this.each(Ee(p,c[p]));return this}return this.each(Ee(c,p))};function Re(c){return new RegExp("(?:^|\\s+)"+e.requote(c)+"(?:\\s+|$)","g")}function Fe(c){return(c+"").trim().split(/^|\s+/)}function Ee(c,p){c=Fe(c).map(Ne);var x=c.length;function A(){for(var L=-1;++L<x;)c[L](this,p)}function S(){for(var L=-1,P=p.apply(this,arguments);++L<x;)c[L](this,P)}return typeof p=="function"?S:A}function Ne(c){var p=Re(c);return function(x,A){if(S=x.classList)return A?S.add(c):S.remove(c);var S=x.getAttribute("class")||"";A?(p.lastIndex=0,p.test(S)||x.setAttribute("class",pe(S+" "+c))):x.setAttribute("class",pe(S.replace(p," ")))}}ge.style=function(c,p,x){var A=arguments.length;if(A<3){if(typeof c!="string"){A<2&&(p="");for(x in c)this.each(Be(x,c[x],p));return this}if(A<2){var S=this.node();return i(S).getComputedStyle(S,null).getPropertyValue(c)}x=""}return this.each(Be(c,p,x))};function Be(c,p,x){function A(){this.style.removeProperty(c)}function S(){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?A:typeof p=="function"?L:S}ge.property=function(c,p){if(arguments.length<2){if(typeof c=="string")return this.node()[c];for(p in c)this.each(Ge(p,c[p]));return this}return this.each(Ge(c,p))};function Ge(c,p){function x(){delete this[c]}function A(){this[c]=p}function S(){var L=p.apply(this,arguments);L==null?delete this[c]:this[c]=L}return p==null?x:typeof p=="function"?S:A}ge.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},ge.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},ge.append=function(c){return c=qe(c),this.select(function(){return this.appendChild(c.apply(this,arguments))})};function qe(c){function p(){var A=this.ownerDocument,S=this.namespaceURI;return S===U&&A.documentElement.namespaceURI===U?A.createElement(c):A.createElementNS(S,c)}function x(){return this.ownerDocument.createElementNS(c.space,c.local)}return typeof c=="function"?c:(c=e.ns.qualify(c)).local?x:p}ge.insert=function(c,p){return c=qe(c),p=B(p),this.select(function(){return this.insertBefore(c.apply(this,arguments),p.apply(this,arguments)||null)})},ge.remove=function(){return this.each(He)};function He(){var c=this.parentNode;c&&c.removeChild(this)}ge.data=function(c,p){var x=-1,A=this.length,S,L;if(!arguments.length){for(c=new Array(A=(S=this[0]).length);++x<A;)(L=S[x])&&(c[x]=L.__data__);return c}function P(W,j){var ee,he=W.length,Te=j.length,te=Math.min(he,Te),oe=new Array(Te),ue=new Array(Te),xe=new Array(he),Ae,ve;if(p){var Ue=new b,nr=new Array(he),ur;for(ee=-1;++ee<he;)(Ae=W[ee])&&(Ue.has(ur=p.call(Ae,Ae.__data__,ee))?xe[ee]=Ae:Ue.set(ur,Ae),nr[ee]=ur);for(ee=-1;++ee<Te;)(Ae=Ue.get(ur=p.call(j,ve=j[ee],ee)))?Ae!==!0&&(oe[ee]=Ae,Ae.__data__=ve):ue[ee]=Ye(ve),Ue.set(ur,!0);for(ee=-1;++ee<he;)ee in nr&&Ue.get(nr[ee])!==!0&&(xe[ee]=W[ee])}else{for(ee=-1;++ee<te;)Ae=W[ee],ve=j[ee],Ae?(Ae.__data__=ve,oe[ee]=Ae):ue[ee]=Ye(ve);for(;ee<Te;++ee)ue[ee]=Ye(j[ee]);for(;ee<he;++ee)xe[ee]=W[ee]}ue.update=oe,ue.parentNode=oe.parentNode=xe.parentNode=W.parentNode,E.push(ue),N.push(oe),V.push(xe)}var E=hr([]),N=Ce([]),V=Ce([]);if(typeof c=="function")for(;++x<A;)P(S=this[x],c.call(S,S.parentNode.__data__,x));else for(;++x<A;)P(S=this[x],c);return N.enter=function(){return E},N.exit=function(){return V},N};function Ye(c){return{__data__:c}}ge.datum=function(c){return arguments.length?this.property("__data__",c):this.property("__data__")},ge.filter=function(c){var p=[],x,A,S;typeof c!="function"&&(c=ie(c));for(var L=0,P=this.length;L<P;L++){p.push(x=[]),x.parentNode=(A=this[L]).parentNode;for(var E=0,N=A.length;E<N;E++)(S=A[E])&&c.call(S,S.__data__,E,L)&&x.push(S)}return Ce(p)};function ie(c){return function(){return se(this,c)}}ge.order=function(){for(var c=-1,p=this.length;++c<p;)for(var x=this[c],A=x.length-1,S=x[A],L;--A>=0;)(L=x[A])&&(S&&S!==L.nextSibling&&S.parentNode.insertBefore(L,S),S=L);return this},ge.sort=function(c){c=be.apply(this,arguments);for(var p=-1,x=this.length;++p<x;)this[p].sort(c);return this.order()};function be(c){return arguments.length||(c=v),function(p,x){return p&&x?c(p.__data__,x.__data__):!p-!x}}ge.each=function(c){return Ke(this,function(p,x,A){c.call(p,p.__data__,x,A)})};function Ke(c,p){for(var x=0,A=c.length;x<A;x++)for(var S=c[x],L=0,P=S.length,E;L<P;L++)(E=S[L])&&p(E,L,x);return c}ge.call=function(c){var p=t(arguments);return c.apply(p[0]=this,p),this},ge.empty=function(){return!this.node()},ge.node=function(){for(var c=0,p=this.length;c<p;c++)for(var x=this[c],A=0,S=x.length;A<S;A++){var L=x[A];if(L)return L}return null},ge.size=function(){var c=0;return Ke(this,function(){++c}),c};function hr(c){return re(c,Pe),c}var Pe=[];e.selection.enter=hr,e.selection.enter.prototype=Pe,Pe.append=ge.append,Pe.empty=ge.empty,Pe.node=ge.node,Pe.call=ge.call,Pe.size=ge.size,Pe.select=function(c){for(var p=[],x,A,S,L,P,E=-1,N=this.length;++E<N;){S=(L=this[E]).update,p.push(x=[]),x.parentNode=L.parentNode;for(var V=-1,W=L.length;++V<W;)(P=L[V])?(x.push(S[V]=A=c.call(L.parentNode,P.__data__,V,E)),A.__data__=P.__data__):x.push(null)}return Ce(p)},Pe.insert=function(c,p){return arguments.length<2&&(p=Me(this)),ge.insert.call(this,c,p)};function Me(c){var p,x;return function(A,S,L){var P=c[L].update,E=P.length,N;for(L!=x&&(x=L,p=0),S>=p&&(p=S+1);!(N=P[p])&&++p<E;);return N}}e.select=function(c){var p;return typeof c=="string"?(p=[ce(c,a)],p.parentNode=a.documentElement):(p=[c],p.parentNode=n(c)),Ce([p])},e.selectAll=function(c){var p;return typeof c=="string"?(p=t(_e(c,a)),p.parentNode=a.documentElement):(p=t(c),p.parentNode=null),Ce([p])},ge.on=function(c,p,x){var A=arguments.length;if(A<3){if(typeof c!="string"){A<2&&(p=!1);for(x in c)this.each(Se(x,c[x],p));return this}if(A<2)return(A=this.node()["__on"+c])&&A._;x=!1}return this.each(Se(c,p,x))};function Se(c,p,x){var A="__on"+c,S=c.indexOf("."),L=Je;S>0&&(c=c.slice(0,S));var P=Oe.get(c);P&&(c=P,L=We);function E(){var W=this[A];W&&(this.removeEventListener(c,W,W.$),delete this[A])}function N(){var W=L(p,t(arguments));E.call(this),this.addEventListener(c,this[A]=W,W.$=x),W._=p}function V(){var W=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),j;for(var ee in this)if(j=ee.match(W)){var he=this[ee];this.removeEventListener(j[1],he,he.$),delete this[ee]}}return S?p?N:E:p?Y:V}var Oe=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Oe.forEach(function(c){"on"+c in a&&Oe.remove(c)});function Je(c,p){return function(x){var A=e.event;e.event=x,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=A}}}function We(c,p){var x=Je(c,p);return function(A){var S=this,L=A.relatedTarget;(!L||L!==S&&!(L.compareDocumentPosition(S)&8))&&x.call(S,A)}}var Ze,lr=0;function tr(c){var p=".dragsuppress-"+ ++lr,x="click"+p,A=e.select(i(c)).on("touchmove"+p,ne).on("dragstart"+p,ne).on("selectstart"+p,ne);if(Ze==null&&(Ze="onselectstart"in c?!1:G(c.style,"userSelect")),Ze){var S=n(c).style,L=S[Ze];S[Ze]="none"}return function(P){if(A.on(p,null),Ze&&(S[Ze]=L),P){var E=function(){A.on(x,null)};A.on(x,function(){ne(),E()},!0),setTimeout(E,0)}}}e.mouse=function(c){return ze(c,me())};var Qe=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 A=x.createSVGPoint();if(Qe<0){var S=i(c);if(S.scrollX||S.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();Qe=!(L.f||L.e),x.remove()}}return Qe?(A.x=p.pageX,A.y=p.pageY):(A.x=p.clientX,A.y=p.clientY),A=A.matrixTransform(c.getScreenCTM().inverse()),[A.x,A.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 A=0,S=p.length,L;A<S;++A)if((L=p[A]).identifier===x)return ze(c,L)}},e.behavior.drag=function(){var c=de(S,"drag","dragstart","dragend"),p=null,x=L(Y,e.mouse,i,"mousemove","mouseup"),A=L(ae,e.touch,J,"touchmove","touchend");function S(){this.on("mousedown.drag",x).on("touchstart.drag",A)}function L(P,E,N,V,W){return function(){var j=this,ee=e.event.target.correspondingElement||e.event.target,he=j.parentNode,Te=c.of(j,arguments),te=0,oe=P(),ue=".drag"+(oe==null?"":"-"+oe),xe,Ae=e.select(N(ee)).on(V+ue,nr).on(W+ue,ur),ve=tr(ee),Ue=E(he,oe);p?(xe=p.apply(j,arguments),xe=[xe.x-Ue[0],xe.y-Ue[1]]):xe=[0,0],Te({type:"dragstart"});function nr(){var ir=E(he,oe),dr,pr;ir&&(dr=ir[0]-Ue[0],pr=ir[1]-Ue[1],te|=dr|pr,Ue=ir,Te({type:"drag",x:ir[0]+xe[0],y:ir[1]+xe[1],dx:dr,dy:pr}))}function ur(){E(he,oe)&&(Ae.on(V+ue,null).on(W+ue,null),ve(te),Te({type:"dragend"}))}}}return S.origin=function(P){return arguments.length?(p=P,S):p},e.rebind(S,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 A=ze(c,x);return A.identifier=x.identifier,A}):[]};var le=1e-6,Le=le*le,De=Math.PI,ar=2*De,cr=ar-le,sr=De/2,Mr=De/180,Br=180/De;function $r(c){return c>0?1:c<0?-1:0}function it(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function _t(c){return c>1?0:c<-1?De:Math.acos(c)}function yt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Dt(c){return((c=Math.exp(c))-1/c)/2}function Kt(c){return((c=Math.exp(c))+1/c)/2}function La(c){return((c=Math.exp(2*c))-1)/(c+1)}function sa(c){return(c=Math.sin(c/2))*c}var ua=Math.SQRT2,vr=2,lt=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,V=P-A,W=N*N+V*V,j,ee;if(W<Le)ee=Math.log(E/S)/ua,j=function(xe){return[x+xe*N,A+xe*V,S*Math.exp(ua*xe*ee)]};else{var he=Math.sqrt(W),Te=(E*E-S*S+lt*W)/(2*S*vr*he),te=(E*E-S*S-lt*W)/(2*E*vr*he),oe=Math.log(Math.sqrt(Te*Te+1)-Te),ue=Math.log(Math.sqrt(te*te+1)-te);ee=(ue-oe)/ua,j=function(xe){var Ae=xe*ee,ve=Kt(oe),Ue=S/(vr*he)*(ve*La(ua*Ae+oe)-Dt(oe));return[x+Ue*N,A+Ue*V,S*ve/Kt(ua*Ae+oe)]}}return j.duration=ee*1e3,j},e.behavior.zoom=function(){var c={x:0,y:0,k:1},p,x,A,S=[960,500],L=Xr,P=250,E=0,N="mousedown.zoom",V="mousemove.zoom",W="mouseup.zoom",j,ee="touchstart.zoom",he,Te=de(Ae,"zoomstart","zoom","zoomend"),te,oe,ue,xe;kt||(kt="onwheel"in a?(ft=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(ft=function(){return e.event.wheelDelta},"mousewheel"):(ft=function(){return-e.event.detail},"MozMousePixelScroll"));function Ae(je){je.on(N,Tr).on(kt+".zoom",Et).on("dblclick.zoom",rt).on(ee,Jr)}Ae.event=function(je){je.each(function(){var Lr=Te.of(this,arguments),qr=c;Zl?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},pr(Lr)}).tween("zoom:zoom",function(){var Kr=S[0],Tt=S[1],Ut=x?x[0]:Kr/2,da=x?x[1]:Tt/2,Da=e.interpolateZoom([(Ut-c.x)/c.k,(da-c.y)/c.k,Kr/c.k],[(Ut-qr.x)/qr.k,(da-qr.y)/qr.k,Kr/qr.k]);return function(Ba){var Ea=Da(Ba),Va=Kr/Ea[2];this.__chart__=c={x:Ut-Ea[0]*Va,y:da-Ea[1]*Va,k:Va},Cr(Lr)}}).each("interrupt.zoom",function(){mr(Lr)}).each("end.zoom",function(){mr(Lr)}):(this.__chart__=c,pr(Lr),Cr(Lr),mr(Lr))})},Ae.translate=function(je){return arguments.length?(c={x:+je[0],y:+je[1],k:c.k},dr(),Ae):[c.x,c.y]},Ae.scale=function(je){return arguments.length?(c={x:c.x,y:c.y,k:null},nr(+je),dr(),Ae):c.k},Ae.scaleExtent=function(je){return arguments.length?(L=je==null?Xr:[+je[0],+je[1]],Ae):L},Ae.center=function(je){return arguments.length?(A=je&&[+je[0],+je[1]],Ae):A},Ae.size=function(je){return arguments.length?(S=je&&[+je[0],+je[1]],Ae):S},Ae.duration=function(je){return arguments.length?(P=+je,Ae):P},Ae.x=function(je){return arguments.length?(oe=je,te=je.copy(),c={x:0,y:0,k:1},Ae):oe},Ae.y=function(je){return arguments.length?(xe=je,ue=je.copy(),c={x:0,y:0,k:1},Ae):xe};function ve(je){return[(je[0]-c.x)/c.k,(je[1]-c.y)/c.k]}function Ue(je){return[je[0]*c.k+c.x,je[1]*c.k+c.y]}function nr(je){c.k=Math.max(L[0],Math.min(L[1],je))}function ur(je,Lr){Lr=Ue(Lr),c.x+=je[0]-Lr[0],c.y+=je[1]-Lr[1]}function ir(je,Lr,qr,Kr){je.__chart__={x:c.x,y:c.y,k:c.k},nr(Math.pow(2,Kr)),ur(x=Lr,qr),je=e.select(je),P>0&&(je=je.transition().duration(P)),je.call(Ae.event)}function dr(){oe&&oe.domain(te.range().map(function(je){return(je-c.x)/c.k}).map(te.invert)),xe&&xe.domain(ue.range().map(function(je){return(je-c.y)/c.k}).map(ue.invert))}function pr(je){E++||je({type:"zoomstart"})}function Cr(je){dr(),je({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function mr(je){--E||(je({type:"zoomend"}),x=null)}function Tr(){var je=this,Lr=Te.of(je,arguments),qr=0,Kr=e.select(i(je)).on(V,da).on(W,Da),Tt=ve(e.mouse(je)),Ut=tr(je);av.call(je),pr(Lr);function da(){qr=1,ur(e.mouse(je),Tt),Cr(Lr)}function Da(){Kr.on(V,null).on(W,null),Ut(qr),mr(Lr)}}function Jr(){var je=this,Lr=Te.of(je,arguments),qr={},Kr=0,Tt,Ut=".zoom-"+e.event.changedTouches[0].identifier,da="touchmove"+Ut,Da="touchend"+Ut,Ba=[],Ea=e.select(je),Va=tr(je);Ga(),pr(Lr),Ea.on(N,null).on(ee,Ga);function wa(){var Yn=e.touches(je);return Tt=c.k,Yn.forEach(function(pa){pa.identifier in qr&&(qr[pa.identifier]=ve(pa))}),Yn}function Ga(){var Yn=e.event.target;e.select(Yn).on(da,Xl).on(Da,nI),Ba.push(Yn);for(var pa=e.event.changedTouches,gn=0,hi=pa.length;gn<hi;++gn)qr[pa[gn].identifier]=null;var bn=wa(),ss=Date.now();if(bn.length===1){if(ss-he<500){var Jl=bn[0];ir(je,Jl,qr[Jl.identifier],Math.floor(Math.log(c.k)/Math.LN2)+1),ne()}he=ss}else if(bn.length>1){var Jl=bn[0],tl=bn[1],lv=Jl[0]-tl[0],ob=Jl[1]-tl[1];Kr=lv*lv+ob*ob}}function Xl(){var Yn=e.touches(je),pa,gn,hi,bn;av.call(je);for(var ss=0,Jl=Yn.length;ss<Jl;++ss,bn=null)if(hi=Yn[ss],bn=qr[hi.identifier]){if(gn)break;pa=hi,gn=bn}if(bn){var tl=(tl=hi[0]-pa[0])*tl+(tl=hi[1]-pa[1])*tl,lv=Kr&&Math.sqrt(tl/Kr);pa=[(pa[0]+hi[0])/2,(pa[1]+hi[1])/2],gn=[(gn[0]+bn[0])/2,(gn[1]+bn[1])/2],nr(lv*Tt)}he=null,ur(pa,gn),Cr(Lr)}function nI(){if(e.event.touches.length){for(var Yn=e.event.changedTouches,pa=0,gn=Yn.length;pa<gn;++pa)delete qr[Yn[pa].identifier];for(var hi in qr)return void wa()}e.selectAll(Ba).on(Ut,null),Ea.on(N,Tr).on(ee,Jr),Va(),mr(Lr)}}function Et(){var je=Te.of(this,arguments);j?clearTimeout(j):(av.call(this),p=ve(x=A||e.mouse(this)),pr(je)),j=setTimeout(function(){j=null,mr(je)},50),ne(),nr(Math.pow(2,ft()*.002)*c.k),ur(x,p),Cr(je)}function rt(){var je=e.mouse(this),Lr=Math.log(c.k)/Math.LN2;ir(this,je,ve(je),e.event.shiftKey?Math.ceil(Lr)-1:Math.floor(Lr)+1)}return e.rebind(Ae,Te,"on")};var Xr=[0,1/0],ft,kt;e.color=bt;function bt(){}bt.prototype.toString=function(){return this.rgb()+""},e.hsl=Qr;function Qr(c,p,x){return this instanceof Qr?(this.h=+c,this.s=+p,void(this.l=+x)):arguments.length<2?c instanceof Qr?new Qr(c.h,c.s,c.l):Gr(""+c,jr,Qr):new Qr(c,p,x)}var fa=Qr.prototype=new bt;fa.brighter=function(c){return c=Math.pow(.7,arguments.length?c:1),new Qr(this.h,this.s,this.l/c)},fa.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new Qr(this.h,this.s,c*this.l)},fa.rgb=function(){return pn(this.h,this.s,this.l)};function pn(c,p,x){var A,S;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,S=x<=.5?x*(1+p):x+p-x*p,A=2*x-S;function L(E){return E>360?E-=360:E<0&&(E+=360),E<60?A+(S-A)*E/60:E<180?S:E<240?A+(S-A)*(240-E)/60:A}function P(E){return Math.round(L(E)*255)}return new qa(P(c+120),P(c),P(c-120))}e.hcl=Qt;function Qt(c,p,x){return this instanceof Qt?(this.h=+c,this.c=+p,void(this.l=+x)):arguments.length<2?c instanceof Qt?new Qt(c.h,c.c,c.l):c instanceof St?Nc(c.l,c.a,c.b):Nc((c=or((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new Qt(c,p,x)}var ci=Qt.prototype=new bt;ci.brighter=function(c){return new Qt(this.h,this.c,Math.min(100,this.l+wt*(arguments.length?c:1)))},ci.darker=function(c){return new Qt(this.h,this.c,Math.max(0,this.l-wt*(arguments.length?c:1)))},ci.rgb=function(){return mn(this.h,this.c,this.l).rgb()};function mn(c,p,x){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new St(x,Math.cos(c*=Mr)*p,Math.sin(c)*p)}e.lab=St;function St(c,p,x){return this instanceof St?(this.l=+c,this.a=+p,void(this.b=+x)):arguments.length<2?c instanceof St?new St(c.l,c.a,c.b):c instanceof Qt?mn(c.h,c.c,c.l):or((c=qa(c)).r,c.g,c.b):new St(c,p,x)}var wt=18,ca=.95047,Yl=1,Ul=1.08883,el=St.prototype=new bt;el.brighter=function(c){return new St(Math.min(100,this.l+wt*(arguments.length?c:1)),this.a,this.b)},el.darker=function(c){return new St(Math.max(0,this.l-wt*(arguments.length?c:1)),this.a,this.b)},el.rgb=function(){return zc(this.l,this.a,this.b)};function zc(c,p,x){var A=(c+16)/116,S=A+p/500,L=A-x/200;return S=qu(S)*ca,A=qu(A)*Yl,L=qu(L)*Ul,new qa(Eu(3.2404542*S-1.5371385*A-.4985314*L),Eu(-.969266*S+1.8760108*A+.041556*L),Eu(.0556434*S-.2040259*A+1.0572252*L))}function Nc(c,p,x){return c>0?new Qt(Math.atan2(x,p)*Br,Math.sqrt(p*p+x*x),c):new Qt(NaN,NaN,c)}function qu(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function Du(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Eu(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=qa;function qa(c,p,x){return this instanceof qa?(this.r=~~c,this.g=~~p,void(this.b=~~x)):arguments.length<2?c instanceof qa?new qa(c.r,c.g,c.b):Gr(""+c,qa,pn):new qa(c,p,x)}function Fc(c){return new qa(c>>16,c>>8&255,c&255)}function es(c){return Fc(c)+""}var rs=qa.prototype=new bt;rs.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,x=this.g,A=this.b,S=30;return!p&&!x&&!A?new qa(S,S,S):(p&&p<S&&(p=S),x&&x<S&&(x=S),A&&A<S&&(A=S),new qa(Math.min(255,p/c),Math.min(255,x/c),Math.min(255,A/c)))},rs.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new qa(c*this.r,c*this.g,c*this.b)},rs.hsl=function(){return jr(this.r,this.g,this.b)},rs.toString=function(){return"#"+yr(this.r)+yr(this.g)+yr(this.b)};function yr(c){return c<16?"0"+Math.max(0,c).toString(16):Math.min(255,c).toString(16)}function Gr(c,p,x){var A=0,S=0,L=0,P,E,N;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(ot(E[0]),ot(E[1]),ot(E[2]))}return(N=ha.get(c))?p(N.r,N.g,N.b):(c!=null&&c.charAt(0)==="#"&&!isNaN(N=parseInt(c.slice(1),16))&&(c.length===4?(A=(N&3840)>>4,A=A>>4|A,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(A,S,L))}function jr(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-A,P,E,N=(S+A)/2;return L?(E=N<.5?L/(S+A):L/(2-S-A),c==S?P=(p-x)/L+(p<x?6:0):p==S?P=(x-c)/L+2:P=(c-p)/L+4,P*=60):(P=NaN,E=N>0&&N<1?0:P),new Qr(P,E,N)}function or(c,p,x){c=va(c),p=va(p),x=va(x);var A=Du((.4124564*c+.3575761*p+.1804375*x)/ca),S=Du((.2126729*c+.7151522*p+.072175*x)/Yl),L=Du((.0193339*c+.119192*p+.9503041*x)/Ul);return St(116*S-16,500*(A-S),200*(S-L))}function va(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function ot(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var ha=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});ha.forEach(function(c,p){ha.set(c,Fc(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,A){return arguments.length===2&&typeof x=="function"&&(A=x,x=null),Vl(p,x,c,A)}}function Vl(c,p,x,A){var S={},L=e.dispatch("beforesend","progress","load","error"),P={},E=new XMLHttpRequest,N=null;self.XDomainRequest&&!("withCredentials"in E)&&/^(http(s)?:)?\/\//.test(c)&&(E=new XDomainRequest),"onload"in E?E.onload=E.onerror=V:E.onreadystatechange=function(){E.readyState>3&&V()};function V(){var W=E.status,j;if(!W&&lN(E)||W>=200&&W<300||W===304){try{j=x.call(S,E)}catch(ee){L.error.call(S,ee);return}L.load.call(S,j)}else L.error.call(S,E)}return E.onprogress=function(W){var j=e.event;e.event=W;try{L.progress.call(S,E)}finally{e.event=j}},S.header=function(W,j){return W=(W+"").toLowerCase(),arguments.length<2?P[W]:(j==null?delete P[W]:P[W]=j+"",S)},S.mimeType=function(W){return arguments.length?(p=W==null?null:W+"",S):p},S.responseType=function(W){return arguments.length?(N=W,S):N},S.response=function(W){return x=W,S},["get","post"].forEach(function(W){S[W]=function(){return S.send.apply(S,[W].concat(t(arguments)))}}),S.send=function(W,j,ee){if(arguments.length===2&&typeof j=="function"&&(ee=j,j=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),N!=null&&(E.responseType=N),ee!=null&&S.on("error",ee).on("load",function(Te){ee(null,Te)}),L.beforesend.call(S,E),E.send(j==null?null:j),S},S.abort=function(){return E.abort(),S},e.rebind(S,L,"on"),A==null?S:S.get(iN(A))}function iN(c){return c.length===1?function(p,x){c(p==null?x:null)}:c}function lN(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var x=new RegExp('["'+c+`
]`),A=c.charCodeAt(0);function S(V,W,j){arguments.length<3&&(j=W,W=null);var ee=Vl(V,p,W==null?L:P(W),j);return ee.row=function(he){return arguments.length?ee.response((W=he)==null?L:P(he)):W},ee}function L(V){return S.parse(V.responseText)}function P(V){return function(W){return S.parse(W.responseText,V)}}S.parse=function(V,W){var j;return S.parseRows(V,function(ee,he){if(j)return j(ee,he-1);var Te=function(te){for(var oe={},ue=ee.length,xe=0;xe<ue;++xe)oe[ee[xe]]=te[xe];return oe};j=W?function(te,oe){return W(Te(te),oe)}:Te})},S.parseRows=function(V,W){var j={},ee={},he=[],Te=V.length,te=0,oe=0,ue,xe;function Ae(){if(te>=Te)return ee;if(xe)return xe=!1,j;var Ue=te;if(V.charCodeAt(Ue)===34){for(var nr=Ue;nr++<Te;)if(V.charCodeAt(nr)===34){if(V.charCodeAt(nr+1)!==34)break;++nr}te=nr+2;var ur=V.charCodeAt(nr+1);return ur===13?(xe=!0,V.charCodeAt(nr+2)===10&&++te):ur===10&&(xe=!0),V.slice(Ue+1,nr).replace(/""/g,'"')}for(;te<Te;){var ur=V.charCodeAt(te++),ir=1;if(ur===10)xe=!0;else if(ur===13)xe=!0,V.charCodeAt(te)===10&&(++te,++ir);else if(ur!==A)continue;return V.slice(Ue,te-ir)}return V.slice(Ue)}for(;(ue=Ae())!==ee;){for(var ve=[];ue!==j&&ue!==ee;)ve.push(ue),ue=Ae();W&&(ve=W(ve,oe++))==null||he.push(ve)}return he},S.format=function(V){if(Array.isArray(V[0]))return S.formatRows(V);var W=new O,j=[];return V.forEach(function(ee){for(var he in ee)W.has(he)||j.push(W.add(he))}),[j.map(N).join(c)].concat(V.map(function(ee){return j.map(function(he){return N(ee[he])}).join(c)})).join(`
`)},S.formatRows=function(V){return V.map(E).join(`
`)};function E(V){return V.map(N).join(c)}function N(V){return x.test(V)?'"'+V.replace(/\"/g,'""')+'"':V}return S},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Ic,Hc,Oc,Bc,Z3=this[G(this,"requestAnimationFrame")]||function(c){setTimeout(c,17)};e.timer=function(){Yc.apply(this,arguments)};function Yc(c,p,x){var A=arguments.length;A<2&&(p=0),A<3&&(x=Date.now());var S=x+p,L={c,t:S,n:null};return Hc?Hc.n=L:Ic=L,Hc=L,Oc||(Bc=clearTimeout(Bc),Oc=1,Z3(m1)),L}function m1(){var c=X3(),p=J3()-c;p>24?(isFinite(p)&&(clearTimeout(Bc),Bc=setTimeout(m1,p)),Oc=0):(Oc=1,Z3(m1))}e.timer.flush=function(){X3(),J3()};function X3(){for(var c=Date.now(),p=Ic;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function J3(){for(var c,p=Ic,x=1/0;p;)p.c?(p.t<x&&(x=p.t),p=(c=p).n):p=c?c.n=p.n:Ic=p.n;return Hc=c,x}e.round=function(c,p){return p?Math.round(c*(p=Math.pow(10,p)))/p:Math.round(c)},e.geom={};function ts(c){return c[0]}function Pu(c){return c[1]}e.geom.hull=function(c){var p=ts,x=Pu;if(arguments.length)return A(c);function A(S){if(S.length<3)return[];var L=Rr(p),P=Rr(x),E,N=S.length,V=[],W=[];for(E=0;E<N;E++)V.push([+L.call(this,S[E],E),+P.call(this,S[E],E),E]);for(V.sort(oN),E=0;E<N;E++)W.push([V[E][0],-V[E][1]]);var j=K3(V),ee=K3(W),he=ee[0]===j[0],Te=ee[ee.length-1]===j[j.length-1],te=[];for(E=j.length-1;E>=0;--E)te.push(S[V[j[E]][2]]);for(E=+he;E<ee.length-Te;++E)te.push(S[V[ee[E]][2]]);return te}return A.x=function(S){return arguments.length?(p=S,A):p},A.y=function(S){return arguments.length?(x=S,A):x},A};function K3(c){for(var p=c.length,x=[0,1],A=2,S=2;S<p;S++){for(;A>1&&it(c[x[A-2]],c[x[A-1]],c[S])<=0;)--A;x[A++]=S}return x.slice(0,A)}function oN(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return re(c,Uc),c};var Uc=e.geom.polygon.prototype=[];Uc.area=function(){for(var c=-1,p=this.length,x,A=this[p-1],S=0;++c<p;)x=A,A=this[c],S+=x[1]*A[0]-x[0]*A[1];return S*.5},Uc.centroid=function(c){var p=-1,x=this.length,A=0,S=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],A+=(L[0]+P[0])*E,S+=(L[1]+P[1])*E;return[A*c,S*c]},Uc.clip=function(c){for(var p,x=Q3(c),A=-1,S=this.length-Q3(this),L,P,E=this[S-1],N,V,W;++A<S;){for(p=c.slice(),c.length=0,N=this[A],V=p[(P=p.length-x)-1],L=-1;++L<P;)W=p[L],y1(W,E,N)?(y1(V,E,N)||c.push(g1(V,W,E,N)),c.push(W)):y1(V,E,N)&&c.push(g1(V,W,E,N)),V=W;x&&c.push(c[0]),E=N}return c};function y1(c,p,x){return(x[0]-p[0])*(c[1]-p[1])<(x[1]-p[1])*(c[0]-p[0])}function g1(c,p,x,A){var S=c[0],L=x[0],P=p[0]-S,E=A[0]-L,N=c[1],V=x[1],W=p[1]-N,j=A[1]-V,ee=(E*(N-V)-j*(S-L))/(j*P-E*W);return[S+ee*P,N+ee*W]}function Q3(c){var p=c[0],x=c[c.length-1];return!(p[0]-x[0]||p[1]-x[1])}var as,Gl,ns,$3=[],b1,Ru,j3=[];function sN(){Wc(this),this.edge=this.site=this.circle=null}function e5(c){var p=$3.pop()||new sN;return p.site=c,p}function x1(c){ls(c),ns.remove(c),$3.push(c),Wc(c)}function uN(c){var p=c.circle,x=p.x,A=p.cy,S={x,y:A},L=c.P,P=c.N,E=[c];x1(c);for(var N=L;N.circle&&_(x-N.circle.x)<le&&_(A-N.circle.cy)<le;)L=N.P,E.unshift(N),x1(N),N=L;E.unshift(N),ls(N);for(var V=P;V.circle&&_(x-V.circle.x)<le&&_(A-V.circle.cy)<le;)P=V.N,E.push(V),x1(V),V=P;E.push(V),ls(V);var W=E.length,j;for(j=1;j<W;++j)V=E[j],N=E[j-1],Vc(V.edge,N.site,V.site,S);N=E[0],V=E[W-1],V.edge=zu(N.site,V.site,null,S),is(N),is(V)}function fN(c){for(var p=c.x,x=c.y,A,S,L,P,E=ns._;E;)if(L=r5(E,x)-p,L>le)E=E.L;else if(P=p-cN(E,x),P>le){if(!E.R){A=E;break}E=E.R}else{L>-le?(A=E.P,S=E):P>-le?(A=E,S=E.N):A=S=E;break}var N=e5(c);if(ns.insert(A,N),!(!A&&!S)){if(A===S){ls(A),S=e5(A.site),ns.insert(N,S),N.edge=S.edge=zu(A.site,N.site),is(A),is(S);return}if(!S){N.edge=zu(A.site,N.site);return}ls(A),ls(S);var V=A.site,W=V.x,j=V.y,ee=c.x-W,he=c.y-j,Te=S.site,te=Te.x-W,oe=Te.y-j,ue=2*(ee*oe-he*te),xe=ee*ee+he*he,Ae=te*te+oe*oe,ve={x:(oe*xe-he*Ae)/ue+W,y:(ee*Ae-te*xe)/ue+j};Vc(S.edge,V,Te,ve),N.edge=zu(V,c,null,ve),S.edge=zu(c,Te,null,ve),is(A),is(S)}}function r5(c,p){var x=c.site,A=x.x,S=x.y,L=S-p;if(!L)return A;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,N=x.y,V=N-p;if(!V)return E;var W=E-A,j=1/L-1/V,ee=W/V;return j?(-ee+Math.sqrt(ee*ee-2*j*(W*W/(-2*V)-N+V/2+S-L/2)))/j+A:(A+E)/2}function cN(c,p){var x=c.N;if(x)return r5(x,p);var A=c.site;return A.y===p?A.x:1/0}function t5(c){this.site=c,this.edges=[]}t5.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(a5),c.length};function vN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,P,E,N,V=Gl,W=V.length,j,ee,he,Te,te,oe;W--;)if(j=V[W],!(!j||!j.prepare()))for(he=j.edges,Te=he.length,ee=0;ee<Te;)oe=he[ee].end(),E=oe.x,N=oe.y,te=he[++ee%Te].start(),L=te.x,P=te.y,(_(E-L)>le||_(N-P)>le)&&(he.splice(ee,0,new Gc(yN(j.site,oe,_(E-p)<le&&S-N>le?{x:p,y:_(L-p)<le?P:S}:_(N-S)<le&&x-E>le?{x:_(P-S)<le?L:x,y:S}:_(E-x)<le&&N-A>le?{x,y:_(L-x)<le?P:A}:_(N-A)<le&&E-p>le?{x:_(P-A)<le?L:p,y:A}:null),j.site,null)),++Te)}function a5(c,p){return p.angle-c.angle}function hN(){Wc(this),this.x=this.y=this.arc=this.site=this.cy=null}function is(c){var p=c.P,x=c.N;if(!(!p||!x)){var A=p.site,S=c.site,L=x.site;if(A!==L){var P=S.x,E=S.y,N=A.x-P,V=A.y-E,W=L.x-P,oe=L.y-E,j=2*(N*oe-V*W);if(!(j>=-Le)){var ee=N*N+V*V,he=W*W+oe*oe,Te=(oe*ee-V*he)/j,te=(N*he-W*ee)/j,oe=te+E,ue=j3.pop()||new hN;ue.arc=c,ue.site=S,ue.x=Te+P,ue.y=oe+Math.sqrt(Te*Te+te*te),ue.cy=oe,c.circle=ue;for(var xe=null,Ae=Ru._;Ae;)if(ue.y<Ae.y||ue.y===Ae.y&&ue.x<=Ae.x)if(Ae.L)Ae=Ae.L;else{xe=Ae.P;break}else if(Ae.R)Ae=Ae.R;else{xe=Ae;break}Ru.insert(xe,ue),xe||(b1=ue)}}}}function ls(c){var p=c.circle;p&&(p.P||(b1=p.N),Ru.remove(p),j3.push(p),Wc(p),c.circle=null)}function dN(c,p,x,A){return function(S){var L=S.a,P=S.b,E=L.x,N=L.y,V=P.x,W=P.y,j=0,ee=1,he=V-E,Te=W-N,te;if(te=c-E,!(!he&&te>0)){if(te/=he,he<0){if(te<j)return;te<ee&&(ee=te)}else if(he>0){if(te>ee)return;te>j&&(j=te)}if(te=x-E,!(!he&&te<0)){if(te/=he,he<0){if(te>ee)return;te>j&&(j=te)}else if(he>0){if(te<j)return;te<ee&&(ee=te)}if(te=p-N,!(!Te&&te>0)){if(te/=Te,Te<0){if(te<j)return;te<ee&&(ee=te)}else if(Te>0){if(te>ee)return;te>j&&(j=te)}if(te=A-N,!(!Te&&te<0)){if(te/=Te,Te<0){if(te>ee)return;te>j&&(j=te)}else if(Te>0){if(te<j)return;te<ee&&(ee=te)}return j>0&&(S.a={x:E+j*he,y:N+j*Te}),ee<1&&(S.b={x:E+ee*he,y:N+ee*Te}),S}}}}}}function pN(c){for(var p=as,x=dN(c[0][0],c[0][1],c[1][0],c[1][1]),A=p.length,S;A--;)S=p[A],(!mN(S,c)||!x(S)||_(S.a.x-S.b.x)<le&&_(S.a.y-S.b.y)<le)&&(S.a=S.b=null,p.splice(A,1))}function mN(c,p){var x=c.b;if(x)return!0;var A=c.a,S=p[0][0],L=p[1][0],P=p[0][1],E=p[1][1],N=c.l,V=c.r,W=N.x,j=N.y,ee=V.x,he=V.y,Te=(W+ee)/2,te=(j+he)/2,oe,ue;if(he===j){if(Te<S||Te>=L)return;if(W>ee){if(!A)A={x:Te,y:P};else if(A.y>=E)return;x={x:Te,y:E}}else{if(!A)A={x:Te,y:E};else if(A.y<P)return;x={x:Te,y:P}}}else if(oe=(W-ee)/(he-j),ue=te-oe*Te,oe<-1||oe>1)if(W>ee){if(!A)A={x:(P-ue)/oe,y:P};else if(A.y>=E)return;x={x:(E-ue)/oe,y:E}}else{if(!A)A={x:(E-ue)/oe,y:E};else if(A.y<P)return;x={x:(P-ue)/oe,y:P}}else if(j<he){if(!A)A={x:S,y:oe*S+ue};else if(A.x>=L)return;x={x:L,y:oe*L+ue}}else{if(!A)A={x:L,y:oe*L+ue};else if(A.x<S)return;x={x:S,y:oe*S+ue}}return c.a=A,c.b=x,!0}function n5(c,p){this.l=c,this.r=p,this.a=this.b=null}function zu(c,p,x,A){var S=new n5(c,p);return as.push(S),x&&Vc(S,c,p,x),A&&Vc(S,p,c,A),Gl[c.i].edges.push(new Gc(S,c,p)),Gl[p.i].edges.push(new Gc(S,p,c)),S}function yN(c,p,x){var A=new n5(c,null);return A.a=p,A.b=x,as.push(A),A}function Vc(c,p,x,A){!c.a&&!c.b?(c.a=A,c.l=p,c.r=x):c.l===x?c.b=A:c.a=A}function Gc(c,p,x){var A=c.a,S=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(S.x-A.x,A.y-S.y):Math.atan2(A.x-S.x,S.y-A.y)}Gc.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 _1(){this._=null}function Wc(c){c.U=c.C=c.L=c.R=c.P=c.N=null}_1.prototype={insert:function(c,p){var x,A,S;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=i5(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;)A=x.U,x===A.L?(S=A.R,S&&S.C?(x.C=S.C=!1,A.C=!0,c=A):(c===x.R&&(Nu(this,x),c=x,x=c.U),x.C=!1,A.C=!0,Fu(this,A))):(S=A.L,S&&S.C?(x.C=S.C=!1,A.C=!0,c=A):(c===x.L&&(Fu(this,x),c=x,x=c.U),x.C=!1,A.C=!0,Nu(this,A))),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,A=c.L,S=c.R,L,P;if(A?S?L=i5(S):L=A:L=S,p?p.L===c?p.L=L:p.R=L:this._=L,A&&S?(P=L.C,L.C=c.C,L.L=A,A.U=L,L!==S?(p=L.U,L.U=c.U,c=L.R,p.L=c,L.R=S,S.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,Nu(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,Fu(this,x),x=p.R),x.C=p.C,p.C=x.R.C=!1,Nu(this,p),c=this._;break}}else if(x=p.L,x.C&&(x.C=!1,p.C=!0,Fu(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,Nu(this,x),x=p.L),x.C=p.C,p.C=x.L.C=!1,Fu(this,p),c=this._;break}x.C=!0,c=p,p=p.U}while(!c.C);c&&(c.C=!1)}}};function Nu(c,p){var x=p,A=p.R,S=x.U;S?S.L===x?S.L=A:S.R=A:c._=A,A.U=S,x.U=A,x.R=A.L,x.R&&(x.R.U=x),A.L=x}function Fu(c,p){var x=p,A=p.L,S=x.U;S?S.L===x?S.L=A:S.R=A