UNPKG

rolandbergergraph

Version:
1 lines 109 kB
import t from"@babel/runtime-corejs3/core-js-stable/object/keys";import e from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";import n from"@babel/runtime-corejs3/core-js-stable/instance/filter";import r from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";import i from"@babel/runtime-corejs3/core-js-stable/instance/for-each";import a from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";import f from"@babel/runtime-corejs3/core-js-stable/object/define-properties";import c from"@babel/runtime-corejs3/core-js-stable/object/define-property";import o from"@babel/runtime-corejs3/helpers/esm/classCallCheck";import s from"@babel/runtime-corejs3/helpers/esm/createClass";import u from"@babel/runtime-corejs3/helpers/esm/defineProperty";import h from"@babel/runtime-corejs3/core-js-stable/instance/map";import l from"@babel/runtime-corejs3/core-js-stable/instance/slice";function d(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function b(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _(t){let e,n,r;function i(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<0?i=e+1:a=e}while(i<a)}return i}return 2!==t.length?(e=d,n=(e,n)=>d(t(e),n),r=(e,n)=>t(e)-n):(e=t===d||t===b?t:p,n=t,r=t),{left:i,center:function(t,e,n=0,a=t.length){const f=i(t,e,n,a-1);return f>n&&r(t[f-1],e)>-r(t[f],e)?f-1:f},right:function(t,r,i=0,a=t.length){if(i<a){if(0!==e(r,r))return a;do{const e=i+a>>>1;n(t[e],r)<=0?i=e+1:a=e}while(i<a)}return i}}}function p(){return 0}_(d),_((function(t){return null===t?NaN:+t})).center;var y={value:()=>{}};function g(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new v(r)}function v(t){this._=t}function m(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function w(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=y,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}v.prototype=g.prototype={constructor:v,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),f=-1,c=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++f<c;)if(n=(t=a[f]).type)i[n]=w(i[n],t.name,e);else if(null==e)for(n in i)i[n]=w(i[n],t.name,null);return this}for(;++f<c;)if((n=(t=a[f]).type)&&(n=m(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new v(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var x="http://www.w3.org/1999/xhtml",M={svg:"http://www.w3.org/2000/svg",xhtml:x,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function A(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),M.hasOwnProperty(e)?{space:M[e],local:t}:t}function T(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===x&&e.documentElement.namespaceURI===x?e.createElement(t):e.createElementNS(n,t)}}function N(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function C(t){var e=A(t);return(e.local?N:T)(e)}function k(){}function S(t){return null==t?k:function(){return this.querySelector(t)}}function E(){return[]}function D(t){return null==t?E:function(){return this.querySelectorAll(t)}}function U(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function j(t){return function(){return this.matches(t)}}function $(t){return function(e){return e.matches(t)}}var Y=Array.prototype.find;function F(){return this.firstElementChild}var H=Array.prototype.filter;function P(){return Array.from(this.children)}function q(t){return new Array(t.length)}function O(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function L(t,e,n,r,i,a){for(var f,c=0,o=e.length,s=a.length;c<s;++c)(f=e[c])?(f.__data__=a[c],r[c]=f):n[c]=new O(t,a[c]);for(;c<o;++c)(f=e[c])&&(i[c]=f)}function R(t,e,n,r,i,a,f){var c,o,s,u=new Map,h=e.length,l=a.length,d=new Array(h);for(c=0;c<h;++c)(o=e[c])&&(d[c]=s=f.call(o,o.__data__,c,e)+"",u.has(s)?i[c]=o:u.set(s,o));for(c=0;c<l;++c)s=f.call(t,a[c],c,a)+"",(o=u.get(s))?(r[c]=o,o.__data__=a[c],u.delete(s)):n[c]=new O(t,a[c]);for(c=0;c<h;++c)(o=e[c])&&u.get(d[c])===o&&(i[c]=o)}function z(t){return t.__data__}function I(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function X(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function B(t){return function(){this.removeAttribute(t)}}function Z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function V(t,e){return function(){this.setAttribute(t,e)}}function W(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Q(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function J(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function G(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function K(t){return function(){this.style.removeProperty(t)}}function tt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function et(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function nt(t,e){return t.style.getPropertyValue(e)||G(t).getComputedStyle(t,null).getPropertyValue(e)}function rt(t){return function(){delete this[t]}}function it(t,e){return function(){this[t]=e}}function at(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ft(t){return t.trim().split(/^|\s+/)}function ct(t){return t.classList||new ot(t)}function ot(t){this._node=t,this._names=ft(t.getAttribute("class")||"")}function st(t,e){for(var n=ct(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ut(t,e){for(var n=ct(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ht(t){return function(){st(this,t)}}function lt(t){return function(){ut(this,t)}}function dt(t,e){return function(){(e.apply(this,arguments)?st:ut)(this,t)}}function bt(){this.textContent=""}function _t(t){return function(){this.textContent=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function yt(){this.innerHTML=""}function gt(t){return function(){this.innerHTML=t}}function vt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function mt(){this.nextSibling&&this.parentNode.appendChild(this)}function wt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xt(){return null}function Mt(){var t=this.parentNode;t&&t.removeChild(this)}function At(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Tt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Nt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ct(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var f=0,c=i.length;f<c;++f)if((r=i[f]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function kt(t,e,n){var r=G(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function St(t,e){return function(){return kt(this,t,e)}}function Et(t,e){return function(){return kt(this,t,e.apply(this,arguments))}}O.prototype={constructor:O,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},ot.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Dt=[null];function Ut(t,e){this._groups=t,this._parents=e}function jt(){return new Ut([[document.documentElement]],Dt)}function $t(t){return"string"==typeof t?new Ut([[document.querySelector(t)]],[document.documentElement]):new Ut([[t]],Dt)}Ut.prototype=jt.prototype={constructor:Ut,select:function(t){"function"!=typeof t&&(t=S(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,f,c=e[i],o=c.length,s=r[i]=new Array(o),u=0;u<o;++u)(a=c[u])&&(f=t.call(a,a.__data__,u,c))&&("__data__"in a&&(f.__data__=a.__data__),s[u]=f);return new Ut(r,this._parents)},selectAll:function(t){t="function"==typeof t?U(t):D(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var f,c=e[a],o=c.length,s=0;s<o;++s)(f=c[s])&&(r.push(t.call(f,f.__data__,s,c)),i.push(f));return new Ut(r,i)},selectChild:function(t){return this.select(null==t?F:function(t){return function(){return Y.call(this.children,t)}}("function"==typeof t?t:$(t)))},selectChildren:function(t){return this.selectAll(null==t?P:function(t){return function(){return H.call(this.children,t)}}("function"==typeof t?t:$(t)))},filter:function(t){"function"!=typeof t&&(t=j(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,f=e[i],c=f.length,o=r[i]=[],s=0;s<c;++s)(a=f[s])&&t.call(a,a.__data__,s,f)&&o.push(a);return new Ut(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,z);var n,r=e?R:L,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var f=a.length,c=new Array(f),o=new Array(f),s=new Array(f),u=0;u<f;++u){var h=i[u],l=a[u],d=l.length,b=I(t.call(h,h&&h.__data__,u,i)),_=b.length,p=o[u]=new Array(_),y=c[u]=new Array(_);r(h,l,p,y,s[u]=new Array(d),b,e);for(var g,v,m=0,w=0;m<_;++m)if(g=p[m]){for(m>=w&&(w=m+1);!(v=y[w])&&++w<_;);g._next=v||null}}return(c=new Ut(c,i))._enter=o,c._exit=s,c},enter:function(){return new Ut(this._enter||this._groups.map(q),this._parents)},exit:function(){return new Ut(this._exit||this._groups.map(q),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,f=Math.min(i,a),c=new Array(i),o=0;o<f;++o)for(var s,u=n[o],h=r[o],l=u.length,d=c[o]=new Array(l),b=0;b<l;++b)(s=u[b]||h[b])&&(d[b]=s);for(;o<i;++o)c[o]=n[o];return new Ut(c,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,f=i[a];--a>=0;)(r=i[a])&&(f&&4^r.compareDocumentPosition(f)&&f.parentNode.insertBefore(r,f),f=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=X);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var f,c=n[a],o=c.length,s=i[a]=new Array(o),u=0;u<o;++u)(f=c[u])&&(s[u]=f);s.sort(e)}return new Ut(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var f=r[i];if(f)return f}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],f=0,c=a.length;f<c;++f)(i=a[f])&&t.call(i,i.__data__,f,a);return this},attr:function(t,e){var n=A(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Z:B:"function"==typeof e?n.local?J:Q:n.local?W:V)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?K:"function"==typeof e?et:tt)(t,e,null==n?"":n)):nt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?rt:"function"==typeof e?at:it)(t,e)):this.node()[t]},classed:function(t,e){var n=ft(t+"");if(arguments.length<2){for(var r=ct(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?dt:e?ht:lt)(n,e))},text:function(t){return arguments.length?this.each(null==t?bt:("function"==typeof t?pt:_t)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?yt:("function"==typeof t?vt:gt)(t)):this.node().innerHTML},raise:function(){return this.each(mt)},lower:function(){return this.each(wt)},append:function(t){var e="function"==typeof t?t:C(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:C(t),r=null==e?xt:"function"==typeof e?e:S(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Mt)},clone:function(t){return this.select(t?Tt:At)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),f=a.length;if(!(arguments.length<2)){for(c=e?Ct:Nt,r=0;r<f;++r)this.each(c(a[r],e,n));return this}var c=this.node().__on;if(c)for(var o,s=0,u=c.length;s<u;++s)for(r=0,o=c[s];r<f;++r)if((i=a[r]).type===o.type&&i.name===o.name)return o.value},dispatch:function(t,e){return this.each(("function"==typeof e?Et:St)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,f=i.length;a<f;++a)(r=i[a])&&(yield r)}};var Yt=0;function Ft(){this._="@"+(++Yt).toString(36)}function Ht(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function qt(){}Ft.prototype={constructor:Ft,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Ot=.7,Lt=1/Ot,Rt="\\s*([+-]?\\d+)\\s*",zt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xt=/^#([0-9a-f]{3,8})$/,Bt=new RegExp(`^rgb\\(${Rt},${Rt},${Rt}\\)$`),Zt=new RegExp(`^rgb\\(${It},${It},${It}\\)$`),Vt=new RegExp(`^rgba\\(${Rt},${Rt},${Rt},${zt}\\)$`),Wt=new RegExp(`^rgba\\(${It},${It},${It},${zt}\\)$`),Qt=new RegExp(`^hsl\\(${zt},${It},${It}\\)$`),Jt=new RegExp(`^hsla\\(${zt},${It},${It},${zt}\\)$`),Gt={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};function Kt(){return this.rgb().formatHex()}function te(){return this.rgb().formatRgb()}function ee(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Xt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ne(e):3===n?new fe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?re(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?re(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Bt.exec(t))?new fe(e[1],e[2],e[3],1):(e=Zt.exec(t))?new fe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Vt.exec(t))?re(e[1],e[2],e[3],e[4]):(e=Wt.exec(t))?re(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Qt.exec(t))?le(e[1],e[2]/100,e[3]/100,1):(e=Jt.exec(t))?le(e[1],e[2]/100,e[3]/100,e[4]):Gt.hasOwnProperty(t)?ne(Gt[t]):"transparent"===t?new fe(NaN,NaN,NaN,0):null}function ne(t){return new fe(t>>16&255,t>>8&255,255&t,1)}function re(t,e,n,r){return r<=0&&(t=e=n=NaN),new fe(t,e,n,r)}function ie(t){return t instanceof qt||(t=ee(t)),t?new fe((t=t.rgb()).r,t.g,t.b,t.opacity):new fe}function ae(t,e,n,r){return 1===arguments.length?ie(t):new fe(t,e,n,null==r?1:r)}function fe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ce(){return`#${he(this.r)}${he(this.g)}${he(this.b)}`}function oe(){const t=se(this.opacity);return`${1===t?"rgb(":"rgba("}${ue(this.r)}, ${ue(this.g)}, ${ue(this.b)}${1===t?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ue(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function he(t){return((t=ue(t))<16?"0":"")+t.toString(16)}function le(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,n,r)}function de(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof qt||(t=ee(t)),!t)return new be;if(t instanceof be)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),f=NaN,c=a-i,o=(a+i)/2;return c?(f=e===a?(n-r)/c+6*(n<r):n===a?(r-e)/c+2:(e-n)/c+4,c/=o<.5?a+i:2-a-i,f*=60):c=o>0&&o<1?0:f,new be(f,c,o,t.opacity)}function be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function _e(t){return(t=(t||0)%360)<0?t+360:t}function pe(t){return Math.max(0,Math.min(1,t||0))}function ye(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Ht(qt,ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Kt,formatHex:Kt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return de(this).formatHsl()},formatRgb:te,toString:te}),Ht(fe,ae,Pt(qt,{brighter(t){return t=null==t?Lt:Math.pow(Lt,t),new fe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ot:Math.pow(Ot,t),new fe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new fe(ue(this.r),ue(this.g),ue(this.b),se(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ce,formatHex:ce,formatHex8:function(){return`#${he(this.r)}${he(this.g)}${he(this.b)}${he(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:oe,toString:oe})),Ht(be,(function(t,e,n,r){return 1===arguments.length?de(t):new be(t,e,n,null==r?1:r)}),Pt(qt,{brighter(t){return t=null==t?Lt:Math.pow(Lt,t),new be(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ot:Math.pow(Ot,t),new be(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new fe(ye(t>=240?t-240:t+120,i,r),ye(t,i,r),ye(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new be(_e(this.h),pe(this.s),pe(this.l),se(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=se(this.opacity);return`${1===t?"hsl(":"hsla("}${_e(this.h)}, ${100*pe(this.s)}%, ${100*pe(this.l)}%${1===t?")":`, ${t})`}`}}));const ge=Math.PI/180,ve=180/Math.PI,me=.96422,we=1,xe=.82521,Me=4/29,Ae=6/29,Te=3*Ae*Ae,Ne=Ae*Ae*Ae;function Ce(t){if(t instanceof ke)return new ke(t.l,t.a,t.b,t.opacity);if(t instanceof je)return $e(t);t instanceof fe||(t=ie(t));var e,n,r=Ue(t.r),i=Ue(t.g),a=Ue(t.b),f=Se((.2225045*r+.7168786*i+.0606169*a)/we);return r===i&&i===a?e=n=f:(e=Se((.4360747*r+.3850649*i+.1430804*a)/me),n=Se((.0139322*r+.0971045*i+.7141733*a)/xe)),new ke(116*f-16,500*(e-f),200*(f-n),t.opacity)}function ke(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Se(t){return t>Ne?Math.pow(t,1/3):t/Te+Me}function Ee(t){return t>Ae?t*t*t:Te*(t-Me)}function De(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ue(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function je(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function $e(t){if(isNaN(t.h))return new ke(t.l,0,0,t.opacity);var e=t.h*ge;return new ke(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ht(ke,(function(t,e,n,r){return 1===arguments.length?Ce(t):new ke(t,e,n,null==r?1:r)}),Pt(qt,{brighter(t){return new ke(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new ke(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new fe(De(3.1338561*(e=me*Ee(e))-1.6168667*(t=we*Ee(t))-.4906146*(n=xe*Ee(n))),De(-.9787684*e+1.9161415*t+.033454*n),De(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Ht(je,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof je)return new je(t.h,t.c,t.l,t.opacity);if(t instanceof ke||(t=Ce(t)),0===t.a&&0===t.b)return new je(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ve;return new je(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new je(t,e,n,null==r?1:r)}),Pt(qt,{brighter(t){return new je(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new je(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return $e(this).rgb()}}));var Ye=-.14861,Fe=1.78277,He=-.29227,Pe=-.90649,qe=1.97294,Oe=qe*Pe,Le=qe*Fe,Re=Fe*He-Pe*Ye;function ze(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Ie)return new Ie(t.h,t.s,t.l,t.opacity);t instanceof fe||(t=ie(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Re*r+Oe*e-Le*n)/(Re+Oe-Le),a=r-i,f=(qe*(n-i)-He*a)/Pe,c=Math.sqrt(f*f+a*a)/(qe*i*(1-i)),o=c?Math.atan2(f,a)*ve-120:NaN;return new Ie(o<0?o+360:o,c,i,t.opacity)}(t):new Ie(t,e,n,null==r?1:r)}function Ie(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ht(Ie,ze,Pt(qt,{brighter(t){return t=null==t?Lt:Math.pow(Lt,t),new Ie(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ot:Math.pow(Ot,t),new Ie(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*ge,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new fe(255*(e+n*(Ye*r+Fe*i)),255*(e+n*(He*r+Pe*i)),255*(e+n*(qe*r)),this.opacity)}}));var Xe=t=>()=>t;function Be(t,e){return function(n){return t+n*e}}function Ze(t){return 1==(t=+t)?Ve:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Xe(isNaN(e)?n:e)}}function Ve(t,e){var n=e-t;return n?Be(t,n):Xe(isNaN(t)?e:t)}var We=function t(e){var n=Ze(e);function r(t,e){var r=n((t=ae(t)).r,(e=ae(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),f=Ve(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=f(e),t+""}}return r.gamma=t,r}(1);var Qe,Je=(Qe=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],f=r>0?t[r-1]:2*i-a,c=r<e-1?t[r+2]:2*a-i;return function(t,e,n,r,i){var a=t*t,f=a*t;return((1-3*t+3*a-f)*e+(4-6*a+3*f)*n+(1+3*t+3*a-3*f)*r+f*i)/6}((n-r/e)*e,f,i,a,c)}},function(t){var e,n,r=t.length,i=new Array(r),a=new Array(r),f=new Array(r);for(e=0;e<r;++e)n=ae(t[e]),i[e]=n.r||0,a[e]=n.g||0,f[e]=n.b||0;return i=Qe(i),a=Qe(a),f=Qe(f),n.opacity=1,function(t){return n.r=i(t),n.g=a(t),n.b=f(t),n+""}});function Ge(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ke=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tn=new RegExp(Ke.source,"g");function en(t,e){var n,r,i,a=Ke.lastIndex=tn.lastIndex=0,f=-1,c=[],o=[];for(t+="",e+="";(n=Ke.exec(t))&&(r=tn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),c[f]?c[f]+=i:c[++f]=i),(n=n[0])===(r=r[0])?c[f]?c[f]+=r:c[++f]=r:(c[++f]=null,o.push({i:f,x:Ge(n,r)})),a=tn.lastIndex;return a<e.length&&(i=e.slice(a),c[f]?c[f]+=i:c[++f]=i),c.length<2?o[0]?function(t){return function(e){return t(e)+""}}(o[0].x):function(t){return function(){return t}}(e):(e=o.length,function(t){for(var n,r=0;r<e;++r)c[(n=o[r]).i]=n.x(t);return c.join("")})}var nn,rn=180/Math.PI,an={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fn(t,e,n,r,i,a){var f,c,o;return(f=Math.sqrt(t*t+e*e))&&(t/=f,e/=f),(o=t*n+e*r)&&(n-=t*o,r-=e*o),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,o/=c),t*r<e*n&&(t=-t,e=-e,o=-o,f=-f),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*rn,skewX:Math.atan(o)*rn,scaleX:f,scaleY:c}}function cn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,f){var c=[],o=[];return a=t(a),f=t(f),function(t,r,i,a,f,c){if(t!==i||r!==a){var o=f.push("translate(",null,e,null,n);c.push({i:o-4,x:Ge(t,i)},{i:o-2,x:Ge(r,a)})}else(i||a)&&f.push("translate("+i+e+a+n)}(a.translateX,a.translateY,f.translateX,f.translateY,c,o),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ge(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,f.rotate,c,o),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ge(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,f.skewX,c,o),function(t,e,n,r,a,f){if(t!==n||e!==r){var c=a.push(i(a)+"scale(",null,",",null,")");f.push({i:c-4,x:Ge(t,n)},{i:c-2,x:Ge(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,f.scaleX,f.scaleY,c,o),a=f=null,function(t){for(var e,n=-1,r=o.length;++n<r;)c[(e=o[n]).i]=e.x(t);return c.join("")}}}var on=cn((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?an:fn(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),sn=cn((function(t){return null==t?an:(nn||(nn=document.createElementNS("http://www.w3.org/2000/svg","g")),nn.setAttribute("transform",t),(t=nn.transform.baseVal.consolidate())?fn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):an)}),", ",")",")");function un(t){return((t=Math.exp(t))+1/t)/2}function hn(t){return function e(n){function r(e,r){var i=t((e=ze(e)).h,(r=ze(r)).h),a=Ve(e.s,r.s),f=Ve(e.l,r.l),c=Ve(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=f(Math.pow(t,n)),e.opacity=c(t),e+""}}return n=+n,r.gamma=e,r}(1)}!function t(e,n,r){function i(t,i){var a,f,c=t[0],o=t[1],s=t[2],u=i[0],h=i[1],l=i[2],d=u-c,b=h-o,_=d*d+b*b;if(_<1e-12)f=Math.log(l/s)/e,a=function(t){return[c+t*d,o+t*b,s*Math.exp(e*t*f)]};else{var p=Math.sqrt(_),y=(l*l-s*s+r*_)/(2*s*n*p),g=(l*l-s*s-r*_)/(2*l*n*p),v=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(g*g+1)-g);f=(m-v)/e,a=function(t){var r,i=t*f,a=un(v),u=s/(n*p)*(a*(r=e*i+v,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[c+u*d,o+u*b,s*a/un(e*i+v)]}}return a.duration=1e3*f*e/Math.SQRT2,a}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4),hn((function(t,e){var n=e-t;return n?Be(t,n>180||n<-180?n-360*Math.round(n/360):n):Xe(isNaN(t)?e:t)}));var ln,dn,bn=hn(Ve),_n=0,pn=0,yn=0,gn=1e3,vn=0,mn=0,wn=0,xn="object"==typeof performance&&performance.now?performance:Date,Mn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function An(){return mn||(Mn(Tn),mn=xn.now()+wn)}function Tn(){mn=0}function Nn(){this._call=this._time=this._next=null}function Cn(t,e,n){var r=new Nn;return r.restart(t,e,n),r}function kn(){mn=(vn=xn.now())+wn,_n=pn=0;try{!function(){An(),++_n;for(var t,e=ln;e;)(t=mn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_n}()}finally{_n=0,function(){var t,e,n=ln,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ln=e);dn=t,En(r)}(),mn=0}}function Sn(){var t=xn.now(),e=t-vn;e>gn&&(wn-=e,vn=t)}function En(t){_n||(pn&&(pn=clearTimeout(pn)),t-mn>24?(t<1/0&&(pn=setTimeout(kn,t-xn.now()-wn)),yn&&(yn=clearInterval(yn))):(yn||(vn=xn.now(),yn=setInterval(Sn,gn)),_n=1,Mn(kn)))}function Dn(t,e,n){var r=new Nn;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Nn.prototype=Cn.prototype={constructor:Nn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?An():+n)+(null==e?0:+e),this._next||dn===this||(dn?dn._next=this:ln=this,dn=this),this._call=t,this._time=n,En()},stop:function(){this._call&&(this._call=null,this._time=1/0,En())}};var Un=g("start","end","cancel","interrupt"),jn=[],$n=0,Yn=1,Fn=2,Hn=3,Pn=4,qn=5,On=6;function Ln(t,e,n,r,i,a){var f=t.__transition;if(f){if(n in f)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=Yn,n.timer.restart(f,n.delay,n.time),n.delay<=t&&f(t-n.delay)}function f(a){var s,u,h,l;if(n.state!==Yn)return o();for(s in i)if((l=i[s]).name===n.name){if(l.state===Hn)return Dn(f);l.state===Pn?(l.state=On,l.timer.stop(),l.on.call("interrupt",t,t.__data__,l.index,l.group),delete i[s]):+s<e&&(l.state=On,l.timer.stop(),l.on.call("cancel",t,t.__data__,l.index,l.group),delete i[s])}if(Dn((function(){n.state===Hn&&(n.state=Pn,n.timer.restart(c,n.delay,n.time),c(a))})),n.state=Fn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Fn){for(n.state=Hn,r=new Array(h=n.tween.length),s=0,u=-1;s<h;++s)(l=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=l);r.length=u+1}}function c(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(o),n.state=qn,1),a=-1,f=r.length;++a<f;)r[a].call(t,i);n.state===qn&&(n.on.call("end",t,t.__data__,n.index,n.group),o())}function o(){for(var r in n.state=On,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Cn(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:Un,tween:jn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:$n})}function Rn(t,e){var n=In(t,e);if(n.state>$n)throw new Error("too late; already scheduled");return n}function zn(t,e){var n=In(t,e);if(n.state>Hn)throw new Error("too late; already running");return n}function In(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Xn(t,e){var n,r;return function(){var i=zn(this,t),a=i.tween;if(a!==n)for(var f=0,c=(r=n=a).length;f<c;++f)if(r[f].name===e){(r=r.slice()).splice(f,1);break}i.tween=r}}function Bn(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=zn(this,t),f=a.tween;if(f!==r){i=(r=f).slice();for(var c={name:e,value:n},o=0,s=i.length;o<s;++o)if(i[o].name===e){i[o]=c;break}o===s&&i.push(c)}a.tween=i}}function Zn(t,e,n){var r=t._id;return t.each((function(){var t=zn(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return In(t,r).value[e]}}function Vn(t,e){var n;return("number"==typeof e?Ge:e instanceof ee?We:(n=ee(e))?(e=n,We):en)(t,e)}function Wn(t){return function(){this.removeAttribute(t)}}function Qn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jn(t,e,n){var r,i,a=n+"";return function(){var f=this.getAttribute(t);return f===a?null:f===r?i:i=e(r=f,n)}}function Gn(t,e,n){var r,i,a=n+"";return function(){var f=this.getAttributeNS(t.space,t.local);return f===a?null:f===r?i:i=e(r=f,n)}}function Kn(t,e,n){var r,i,a;return function(){var f,c,o=n(this);if(null!=o)return(f=this.getAttribute(t))===(c=o+"")?null:f===r&&c===i?a:(i=c,a=e(r=f,o));this.removeAttribute(t)}}function tr(t,e,n){var r,i,a;return function(){var f,c,o=n(this);if(null!=o)return(f=this.getAttributeNS(t.space,t.local))===(c=o+"")?null:f===r&&c===i?a:(i=c,a=e(r=f,o));this.removeAttributeNS(t.space,t.local)}}function er(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function nr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function rr(t,e){return function(){Rn(this,t).delay=+e.apply(this,arguments)}}function ir(t,e){return e=+e,function(){Rn(this,t).delay=e}}function ar(t,e){return function(){zn(this,t).duration=+e.apply(this,arguments)}}function fr(t,e){return e=+e,function(){zn(this,t).duration=e}}var cr=jt.prototype.constructor;function or(t){return function(){this.style.removeProperty(t)}}var sr=0;function ur(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function hr(){return++sr}var lr=jt.prototype;ur.prototype={constructor:ur,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=S(t));for(var r=this._groups,i=r.length,a=new Array(i),f=0;f<i;++f)for(var c,o,s=r[f],u=s.length,h=a[f]=new Array(u),l=0;l<u;++l)(c=s[l])&&(o=t.call(c,c.__data__,l,s))&&("__data__"in c&&(o.__data__=c.__data__),h[l]=o,Ln(h[l],e,n,l,h,In(c,n)));return new ur(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=D(t));for(var r=this._groups,i=r.length,a=[],f=[],c=0;c<i;++c)for(var o,s=r[c],u=s.length,h=0;h<u;++h)if(o=s[h]){for(var l,d=t.call(o,o.__data__,h,s),b=In(o,n),_=0,p=d.length;_<p;++_)(l=d[_])&&Ln(l,e,n,_,d,b);a.push(d),f.push(o)}return new ur(a,f,e,n)},selectChild:lr.selectChild,selectChildren:lr.selectChildren,filter:function(t){"function"!=typeof t&&(t=j(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,f=e[i],c=f.length,o=r[i]=[],s=0;s<c;++s)(a=f[s])&&t.call(a,a.__data__,s,f)&&o.push(a);return new ur(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),f=new Array(r),c=0;c<a;++c)for(var o,s=e[c],u=n[c],h=s.length,l=f[c]=new Array(h),d=0;d<h;++d)(o=s[d]||u[d])&&(l[d]=o);for(;c<r;++c)f[c]=e[c];return new ur(f,this._parents,this._name,this._id)},selection:function(){return new cr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=hr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var f,c=r[a],o=c.length,s=0;s<o;++s)if(f=c[s]){var u=In(f,e);Ln(f,t,n,s,c,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ur(r,this._parents,t,n)},call:lr.call,nodes:lr.nodes,node:lr.node,size:lr.size,empty:lr.empty,each:lr.each,on:function(t,e){var n=this._id;return arguments.length<2?In(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Rn:zn;return function(){var f=a(this,t),c=f.on;c!==r&&(i=(r=c).copy()).on(e,n),f.on=i}}(n,t,e))},attr:function(t,e){var n=A(t),r="transform"===n?sn:Vn;return this.attrTween(t,"function"==typeof e?(n.local?tr:Kn)(n,r,Zn(this,"attr."+t,e)):null==e?(n.local?Qn:Wn)(n):(n.local?Gn:Jn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=A(t);return this.tween(n,(r.local?er:nr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?on:Vn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=nt(this,t),f=(this.style.removeProperty(t),nt(this,t));return a===f?null:a===n&&f===r?i:i=e(n=a,r=f)}}(t,r)).on("end.style."+t,or(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var f=nt(this,t),c=n(this),o=c+"";return null==c&&(this.style.removeProperty(t),o=c=nt(this,t)),f===o?null:f===r&&o===i?a:(i=o,a=e(r=f,c))}}(t,r,Zn(this,"style."+t,e))).each(function(t,e){var n,r,i,a,f="style."+e,c="end."+f;return function(){var o=zn(this,t),s=o.on,u=null==o.value[f]?a||(a=or(e)):void 0;s===n&&i===u||(r=(n=s).copy()).on(c,i=u),o.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var f=nt(this,t);return f===a?null:f===r?i:i=e(r=f,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Zn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=In(this.node(),n).tween,a=0,f=i.length;a<f;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Xn:Bn)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?rr:ir)(e,t)):In(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ar:fr)(e,t)):In(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){zn(this,t).ease=e}}(e,t)):In(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;zn(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,f){var c={value:f},o={value:function(){0==--i&&a()}};n.each((function(){var n=zn(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(c),e._.interrupt.push(c),e._.end.push(o)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:lr[Symbol.iterator]};function dr(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}!function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3);var br=1.70158;!function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(br),function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(br),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(br);var _r=2*Math.PI;!function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=_r);function i(t){return e*dr(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*_r)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=_r);function i(t){return 1-e*dr(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*_r)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=_r);function i(t){return((t=2*t-1)<0?e*dr(-t)*Math.sin((r-t)/n):2-e*dr(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*_r)},i.period=function(n){return t(e,n)},i}(1,.3);var pr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function yr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}jt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,f=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>Fn&&n.state<qn,n.state=On,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):f=!1;f&&delete t.__transition}}(this,t)}))},jt.prototype.transition=function(t){var e,n;t instanceof ur?(e=t._id,t=t._name):(e=hr(),(n=pr).time=An(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var f,c=r[a],o=c.length,s=0;s<o;++s)(f=c[s])&&Ln(f,t,e,s,c,n||yr(f,e));return new ur(r,this._parents,t,e)};var gr={},vr={};function mr(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function wr(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function xr(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Mr(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+xr(-e,6):e>9999?"+"+xr(e,6):xr(e,4))+"-"+xr(t.getUTCMonth()+1,2)+"-"+xr(t.getUTCDate(),2)+(a?"T"+xr(n,2)+":"+xr(r,2)+":"+xr(i,2)+"."+xr(a,3)+"Z":i?"T"+xr(n,2)+":"+xr(r,2)+":"+xr(i,2)+"Z":r||n?"T"+xr(n,2)+":"+xr(r,2)+"Z":"")}function Ar(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,f=0,c=0,o=a<=0,s=!1;function u(){if(o)return vr;if(s)return s=!1,gr;var e,r,i=f;if(34===t.charCodeAt(i)){for(;f++<a&&34!==t.charCodeAt(f)||34===t.charCodeAt(++f););return(e=f)>=a?o=!0:10===(r=t.charCodeAt(f++))?s=!0:13===r&&(s=!0,10===t.charCodeAt(f)&&++f),t.slice(i+1,e-1).replace(/""/g,'"')}for(;f<a;){if(10===(r=t.charCodeAt(e=f++)))s=!0;else if(13===r)s=!0,10===t.charCodeAt(f)&&++f;else if(r!==n)continue;return t.slice(i,e)}return o=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=u())!==vr;){for(var h=[];r!==gr&&r!==vr;)h.push(r),r=u();e&&null==(h=e(h,c++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return f(e[t])})).join(t)}))}function a(e){return e.map(f).join(t)}function f(t){return null==t?"":t instanceof Date?Mr(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=mr(t);return function(r,i){return e(n(r),i,t)}}(t,e):mr(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=wr(e)),[n.map(f).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=wr(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:f}}function Tr(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,f,c,o,s,u,h,l,d=t._root,b={data:r},_=t._x0,p=t._y0,y=t._x1,g=t._y1;if(!d)return t._root=b,t;for(;d.length;)if((s=e>=(a=(_+y)/2))?_=a:y=a,(u=n>=(f=(p+g)/2))?p=f:g=f,i=d,!(d=d[h=u<<1|s]))return i[h]=b,t;if(c=+t._x.call(null,d.data),o=+t._y.call(null,d.data),e===c&&n===o)return b.next=d,i?i[h]=b:t._root=b,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(s=e>=(a=(_+y)/2))?_=a:y=a,(u=n>=(f=(p+g)/2))?p=f:g=f}while((h=u<<1|s)==(l=(o>=f)<<1|c>=a));return i[l]=d,i[h]=b,t}function Nr(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Cr(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function kr(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Ar(","),Ar("\t"),new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var Sr=Cr.prototype;function Er(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}Sr.copy=function(){var t,e,n=new Cr(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=kr(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=kr(e));return n},Sr.add=function(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Tr(this.cover(e,n),e,n,t)},Sr.addAll=function(t){var e,n,r,i,a=t.length,f=new Array(a),c=new Array(a),o=1/0,s=1/0,u=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(f[n]=r,c[n]=i,r<o&&(o=r),r>u&&(u=r),i<s&&(s=i),i>h&&(h=i));if(o>u||s>h)return this;for(this.cover(o,s).cover(u,h),n=0;n<a;++n)Tr(this,f[n],c[n],t[n]);return this},Sr.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var f,c,o=i-n||1,s=this._root;n>t||t>=i||r>e||e>=a;)switch(c=(e<r)<<1|t<n,(f=new Array(4))[c]=s,s=f,o*=2,c){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Sr.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Sr.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Sr.find=function(t,e,n){var r,i,a,f,c,o,s,u=this._x0,h=this._y0,l=this._x1,d=this._y1,b=[],_=this._root;for(_&&b.push(new Nr(_,u,h,l,d)),null==n?n=1/0:(u=t-n,h=e-n,l=t+n,d=e+n,n*=n);o=b.pop();)if(!(!(_=o.node)||(i=o.x0)>l||(a=o.y0)>d||(f=o.x1)<u||(c=o.y1)<h))if(_.length){var p=(i+f)/2,y=(a+c)/2;b.push(new Nr(_[3],p,y,f,c),new Nr(_[2],i,y,p,c),new Nr(_[1],p,a,f,y),new Nr(_[0],i,a,p,y)),(s=(e>=y)<<1|t>=p)&&(o=b[b.length-1],b[b.length-1]=b[b.length-1-s],b[b.length-1-s]=o)}else{var g=t-+this._x.call(null,_.data),v=e-+this._y.call(null,_.data),m=g*g+v*v;if(m<n){var w=Math.sqrt(n=m);u=t-w,h=e-w,l=t+w,d=e+w,r=_.data}}return r},Sr.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n,r,i,a,f,c,o,s,u,h,l,d=this._root,b=this._x0,_=this._y0,p=this._x1,y=this._y1;if(!d)return this;if(d.length)for(;;){if((s=a>=(c=(b+p)/2))?b=c:p=c,(u=f>=(o=(_+y)/2))?_=o:y=o,e=d,!(d=d[h=u<<1|s]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,l=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[l]=d:this._root=d),this):(this._root=i,this)},Sr.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Sr.root=function(){return this._root},Sr.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Sr.visit=function(t){var e,n,r,i,a,f,c=[],o=this._root;for(o&&c.push(new Nr(o,this._x0,this._y0,this._x1,this._y1));e=c.pop();)if(!t(o=e.node,r=e.x0,i=e.y0,a=e.x1,f=e