ideogram
Version:
Chromosome visualization for the web
2 lines • 355 kB
JavaScript
/*! For license information please see ideogram.min.js.LICENSE.txt */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(()=>(()=>{"use strict";var t={913:()=>{try{self["workbox:core:7.0.0"]&&_()}catch(t){}},762:()=>{try{self["workbox:range-requests:7.0.0"]&&_()}catch(t){}}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{default:()=>wg});var t={};n.r(t),n.d(t,{blob:()=>xt,buffer:()=>At,csv:()=>Gt,dsv:()=>Ht,html:()=>Yt,image:()=>jt,json:()=>zt,svg:()=>Xt,text:()=>Ot,tsv:()=>Wt,xml:()=>Ut});var e={};n.r(e),n.d(e,{brush:()=>qr,brushSelection:()=>Gr,brushX:()=>Wr,brushY:()=>jr});var r={};n.r(r),n.d(r,{dispatch:()=>ee});var i={};n.r(i),n.d(i,{FormatSpecifier:()=>Jr,format:()=>ni,formatDefaultLocale:()=>si,formatLocale:()=>ai,formatPrefix:()=>oi,formatSpecifier:()=>Kr,precisionFixed:()=>ci,precisionPrefix:()=>li,precisionRound:()=>ui});const a="1.53.0";function s(){}function c(t){return null==t?s:function(){return this.querySelector(t)}}function l(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function u(){return[]}function d(t){return null==t?u:function(){return this.querySelectorAll(t)}}function h(t){return function(){return this.matches(t)}}function f(t){return function(e){return e.matches(t)}}var p=Array.prototype.find;function m(){return this.firstElementChild}var g=Array.prototype.filter;function y(){return this.children}function v(t){return new Array(t.length)}function b(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function w(t,e,n,o,r,i){for(var a,s=0,c=e.length,l=i.length;s<l;++s)(a=e[s])?(a.__data__=i[s],o[s]=a):n[s]=new b(t,i[s]);for(;s<c;++s)(a=e[s])&&(r[s]=a)}function x(t,e,n,o,r,i,a){var s,c,l,u=new Map,d=e.length,h=i.length,f=new Array(d);for(s=0;s<d;++s)(c=e[s])&&(f[s]=l=a.call(c,c.__data__,s,e)+"",u.has(l)?r[s]=c:u.set(l,c));for(s=0;s<h;++s)l=a.call(t,i[s],s,i)+"",(c=u.get(l))?(o[s]=c,c.__data__=i[s],u.delete(l)):n[s]=new b(t,i[s]);for(s=0;s<d;++s)(c=e[s])&&u.get(f[s])===c&&(r[s]=c)}function _(t){return t.__data__}function A(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}b.prototype={constructor:b,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)}};var C="http://www.w3.org/1999/xhtml";const S={svg:"http://www.w3.org/2000/svg",xhtml:C,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function k(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),S.hasOwnProperty(e)?{space:S[e],local:t}:t}function L(t){return function(){this.removeAttribute(t)}}function T(t){return function(){this.removeAttributeNS(t.space,t.local)}}function E(t,e){return function(){this.setAttribute(t,e)}}function M(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function I(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function P(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 $(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function D(t){return function(){this.style.removeProperty(t)}}function N(t,e,n){return function(){this.style.setProperty(t,e,n)}}function F(t,e,n){return function(){var o=e.apply(this,arguments);null==o?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function B(t,e){return t.style.getPropertyValue(e)||$(t).getComputedStyle(t,null).getPropertyValue(e)}function O(t){return function(){delete this[t]}}function R(t,e){return function(){this[t]=e}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function G(t){return t.trim().split(/^|\s+/)}function W(t){return t.classList||new j(t)}function j(t){this._node=t,this._names=G(t.getAttribute("class")||"")}function q(t,e){for(var n=W(t),o=-1,r=e.length;++o<r;)n.add(e[o])}function z(t,e){for(var n=W(t),o=-1,r=e.length;++o<r;)n.remove(e[o])}function V(t){return function(){q(this,t)}}function U(t){return function(){z(this,t)}}function Y(t,e){return function(){(e.apply(this,arguments)?q:z)(this,t)}}function X(){this.textContent=""}function K(t){return function(){this.textContent=t}}function J(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Q(){this.innerHTML=""}function Z(t){return function(){this.innerHTML=t}}function tt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function et(){this.nextSibling&&this.parentNode.appendChild(this)}function nt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ot(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===C&&e.documentElement.namespaceURI===C?e.createElement(t):e.createElementNS(n,t)}}function rt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function it(t){var e=k(t);return(e.local?rt:ot)(e)}function at(){return null}function st(){var t=this.parentNode;t&&t.removeChild(this)}function ct(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function lt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ut(t){return function(){var e=this.__on;if(e){for(var n,o=0,r=-1,i=e.length;o<i;++o)n=e[o],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function dt(t,e,n){return function(){var o,r=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var a=0,s=r.length;a<s;++a)if((o=r[a]).type===t.type&&o.name===t.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),void(o.value=e);this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function ht(t,e,n){var o=$(t),r=o.CustomEvent;"function"==typeof r?r=new r(e,n):(r=o.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function ft(t,e){return function(){return ht(this,t,e)}}function pt(t,e){return function(){return ht(this,t,e.apply(this,arguments))}}j.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 mt=[null];function gt(t,e){this._groups=t,this._parents=e}function yt(){return new gt([[document.documentElement]],mt)}gt.prototype=yt.prototype={constructor:gt,select:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a,s=e[r],l=s.length,u=o[r]=new Array(l),d=0;d<l;++d)(i=s[d])&&(a=t.call(i,i.__data__,d,s))&&("__data__"in i&&(a.__data__=i.__data__),u[d]=a);return new gt(o,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);return null==e?[]:l(e)}}(t):d(t);for(var e=this._groups,n=e.length,o=[],r=[],i=0;i<n;++i)for(var a,s=e[i],c=s.length,u=0;u<c;++u)(a=s[u])&&(o.push(t.call(a,a.__data__,u,s)),r.push(a));return new gt(o,r)},selectChild:function(t){return this.select(null==t?m:function(t){return function(){return p.call(this.children,t)}}("function"==typeof t?t:f(t)))},selectChildren:function(t){return this.selectAll(null==t?y:function(t){return function(){return g.call(this.children,t)}}("function"==typeof t?t:f(t)))},filter:function(t){"function"!=typeof t&&(t=h(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,c=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&c.push(i);return new gt(o,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,_);var n=e?x:w,o=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var i=r.length,a=new Array(i),s=new Array(i),c=new Array(i),u=0;u<i;++u){var d=o[u],h=r[u],f=h.length,p=l(t.call(d,d&&d.__data__,u,o)),m=p.length,g=s[u]=new Array(m),y=a[u]=new Array(m);n(d,h,g,y,c[u]=new Array(f),p,e);for(var v,b,A=0,C=0;A<m;++A)if(v=g[A]){for(A>=C&&(C=A+1);!(b=y[C])&&++C<m;);v._next=b||null}}return(a=new gt(a,o))._enter=s,a._exit=c,a},enter:function(){return new gt(this._enter||this._groups.map(v),this._parents)},exit:function(){return new gt(this._exit||this._groups.map(v),this._parents)},join:function(t,e,n){var o=this.enter(),r=this,i=this.exit();return o="function"==typeof t?t(o):o.append(t+""),null!=e&&(r=e(r)),null==n?i.remove():n(i),o&&r?o.merge(r).order():r},merge:function(t){if(!(t instanceof gt))throw new Error("invalid merge");for(var e=this._groups,n=t._groups,o=e.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var c,l=e[s],u=n[s],d=l.length,h=a[s]=new Array(d),f=0;f<d;++f)(c=l[f]||u[f])&&(h[f]=c);for(;s<o;++s)a[s]=e[s];return new gt(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o,r=t[e],i=r.length-1,a=r[i];--i>=0;)(o=r[i])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=A);for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a,s=n[i],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(l[u]=a);l.sort(e)}return new gt(r,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 o=t[e],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}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,o=e.length;n<o;++n)for(var r,i=e[n],a=0,s=i.length;a<s;++a)(r=i[a])&&t.call(r,r.__data__,a,i);return this},attr:function(t,e){var n=k(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==e?n.local?T:L:"function"==typeof e?n.local?P:I:n.local?M:E)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?D:"function"==typeof e?F:N)(t,e,null==n?"":n)):B(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?O:"function"==typeof e?H:R)(t,e)):this.node()[t]},classed:function(t,e){var n=G(t+"");if(arguments.length<2){for(var o=W(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?Y:e?V:U)(n,e))},text:function(t){return arguments.length?this.each(null==t?X:("function"==typeof t?J:K)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Q:("function"==typeof t?tt:Z)(t)):this.node().innerHTML},raise:function(){return this.each(et)},lower:function(){return this.each(nt)},append:function(t){var e="function"==typeof t?t:it(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:it(t),o=null==e?at:"function"==typeof e?e:c(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(st)},clone:function(t){return this.select(t?lt:ct)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var o,r,i=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+""),a=i.length;if(!(arguments.length<2)){for(s=e?dt:ut,o=0;o<a;++o)this.each(s(i[o],e,n));return this}var s=this.node().__on;if(s)for(var c,l=0,u=s.length;l<u;++l)for(o=0,c=s[l];o<a;++o)if((r=i[o]).type===c.type&&r.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?pt:ft)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o,r=t[e],i=0,a=r.length;i<a;++i)(o=r[i])&&(yield o)}};const vt=yt;function bt(t){return"string"==typeof t?new gt([[document.querySelector(t)]],[document.documentElement]):new gt([[t]],mt)}function wt(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function xt(t,e){return fetch(t,e).then(wt)}function _t(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function At(t,e){return fetch(t,e).then(_t)}var Ct={},St={},kt=34,Lt=10,Tt=13;function Et(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Mt(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var o in t)o in e||n.push(e[o]=o)})),n}function It(t,e){var n=t+"",o=n.length;return o<e?new Array(e-o+1).join(0)+n:n}function Pt(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function o(t,e){var o,r=[],i=t.length,a=0,s=0,c=i<=0,l=!1;function u(){if(c)return St;if(l)return l=!1,Ct;var e,o,r=a;if(t.charCodeAt(r)===kt){for(;a++<i&&t.charCodeAt(a)!==kt||t.charCodeAt(++a)===kt;);return(e=a)>=i?c=!0:(o=t.charCodeAt(a++))===Lt?l=!0:o===Tt&&(l=!0,t.charCodeAt(a)===Lt&&++a),t.slice(r+1,e-1).replace(/""/g,'"')}for(;a<i;){if((o=t.charCodeAt(e=a++))===Lt)l=!0;else if(o===Tt)l=!0,t.charCodeAt(a)===Lt&&++a;else if(o!==n)continue;return t.slice(r,e)}return c=!0,t.slice(r,i)}for(t.charCodeAt(i-1)===Lt&&--i,t.charCodeAt(i-1)===Tt&&--i;(o=u())!==St;){for(var d=[];o!==Ct&&o!==St;)d.push(o),o=u();e&&null==(d=e(d,s++))||r.push(d)}return r}function r(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function i(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?function(t){var e,n=t.getUTCHours(),o=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+It(-e,6):e>9999?"+"+It(e,6):It(e,4))+"-"+It(t.getUTCMonth()+1,2)+"-"+It(t.getUTCDate(),2)+(i?"T"+It(n,2)+":"+It(o,2)+":"+It(r,2)+"."+It(i,3)+"Z":r?"T"+It(n,2)+":"+It(o,2)+":"+It(r,2)+"Z":o||n?"T"+It(n,2)+":"+It(o,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,i=o(t,(function(t,o){if(n)return n(t,o-1);r=t,n=e?function(t,e){var n=Et(t);return function(o,r){return e(n(o),r,t)}}(t,e):Et(t)}));return i.columns=r||[],i},parseRows:o,format:function(e,n){return null==n&&(n=Mt(e)),[n.map(a).join(t)].concat(r(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Mt(t)),r(t,e).join("\n")},formatRows:function(t){return t.map(i).join("\n")},formatRow:i,formatValue:a}}var $t=Pt(","),Dt=$t.parse,Nt=($t.parseRows,$t.format,$t.formatBody,$t.formatRows,$t.formatRow,$t.formatValue,Pt("\t")),Ft=Nt.parse;function Bt(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Ot(t,e){return fetch(t,e).then(Bt)}function Rt(t){return function(e,n,o){return 2===arguments.length&&"function"==typeof n&&(o=n,n=void 0),Ot(e,n).then((function(e){return t(e,o)}))}}function Ht(t,e,n,o){3===arguments.length&&"function"==typeof n&&(o=n,n=void 0);var r=Pt(t);return Ot(e,n).then((function(t){return r.parse(t,o)}))}Nt.parseRows,Nt.format,Nt.formatBody,Nt.formatRows,Nt.formatRow,Nt.formatValue;var Gt=Rt(Dt),Wt=Rt(Ft);function jt(t,e){return new Promise((function(n,o){var r=new Image;for(var i in e)r[i]=e[i];r.onerror=o,r.onload=function(){n(r)},r.src=t}))}function qt(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function zt(t,e){return fetch(t,e).then(qt)}function Vt(t){return(e,n)=>Ot(e,n).then((e=>(new DOMParser).parseFromString(e,t)))}const Ut=Vt("application/xml");var Yt=Vt("text/html"),Xt=Vt("image/svg+xml"),Kt={value:()=>{}};function Jt(){for(var t,e=0,n=arguments.length,o={};e<n;++e){if(!(t=arguments[e]+"")||t in o||/[\s.]/.test(t))throw new Error("illegal type: "+t);o[t]=[]}return new Qt(o)}function Qt(t){this._=t}function Zt(t,e){for(var n,o=0,r=t.length;o<r;++o)if((n=t[o]).name===e)return n.value}function te(t,e,n){for(var o=0,r=t.length;o<r;++o)if(t[o].name===e){t[o]=Kt,t=t.slice(0,o).concat(t.slice(o+1));break}return null!=n&&t.push({name:e,value:n}),t}Qt.prototype=Jt.prototype={constructor:Qt,on:function(t,e){var n,o,r=this._,i=(o=r,(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&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=i[a]).type)r[n]=te(r[n],t.name,e);else if(null==e)for(n in r)r[n]=te(r[n],t.name,null);return this}for(;++a<s;)if((n=(t=i[a]).type)&&(n=Zt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Qt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,o,r=new Array(n),i=0;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(o=this._[t]).length;i<n;++i)o[i].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)}};const ee=Jt;function ne(t){t.preventDefault(),t.stopImmediatePropagation()}function oe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function re(t,e){var n=Object.create(t.prototype);for(var o in e)n[o]=e[o];return n}function ie(){}var ae=.7,se=1/ae,ce="\\s*([+-]?\\d+)\\s*",le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",de=/^#([0-9a-f]{3,8})$/,he=new RegExp(`^rgb\\(${ce},${ce},${ce}\\)$`),fe=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),pe=new RegExp(`^rgba\\(${ce},${ce},${ce},${le}\\)$`),me=new RegExp(`^rgba\\(${ue},${ue},${ue},${le}\\)$`),ge=new RegExp(`^hsl\\(${le},${ue},${ue}\\)$`),ye=new RegExp(`^hsla\\(${le},${ue},${ue},${le}\\)$`),ve={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 be(){return this.rgb().formatHex()}function we(){return this.rgb().formatRgb()}function xe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=de.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?_e(e):3===n?new Se(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ae(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ae(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=he.exec(t))?new Se(e[1],e[2],e[3],1):(e=fe.exec(t))?new Se(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=pe.exec(t))?Ae(e[1],e[2],e[3],e[4]):(e=me.exec(t))?Ae(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ge.exec(t))?Ie(e[1],e[2]/100,e[3]/100,1):(e=ye.exec(t))?Ie(e[1],e[2]/100,e[3]/100,e[4]):ve.hasOwnProperty(t)?_e(ve[t]):"transparent"===t?new Se(NaN,NaN,NaN,0):null}function _e(t){return new Se(t>>16&255,t>>8&255,255&t,1)}function Ae(t,e,n,o){return o<=0&&(t=e=n=NaN),new Se(t,e,n,o)}function Ce(t,e,n,o){return 1===arguments.length?((r=t)instanceof ie||(r=xe(r)),r?new Se((r=r.rgb()).r,r.g,r.b,r.opacity):new Se):new Se(t,e,n,null==o?1:o);var r}function Se(t,e,n,o){this.r=+t,this.g=+e,this.b=+n,this.opacity=+o}function ke(){return`#${Me(this.r)}${Me(this.g)}${Me(this.b)}`}function Le(){const t=Te(this.opacity);return`${1===t?"rgb(":"rgba("}${Ee(this.r)}, ${Ee(this.g)}, ${Ee(this.b)}${1===t?")":`, ${t})`}`}function Te(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ee(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Me(t){return((t=Ee(t))<16?"0":"")+t.toString(16)}function Ie(t,e,n,o){return o<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new $e(t,e,n,o)}function Pe(t){if(t instanceof $e)return new $e(t.h,t.s,t.l,t.opacity);if(t instanceof ie||(t=xe(t)),!t)return new $e;if(t instanceof $e)return t;var e=(t=t.rgb()).r/255,n=t.g/255,o=t.b/255,r=Math.min(e,n,o),i=Math.max(e,n,o),a=NaN,s=i-r,c=(i+r)/2;return s?(a=e===i?(n-o)/s+6*(n<o):n===i?(o-e)/s+2:(e-n)/s+4,s/=c<.5?i+r:2-i-r,a*=60):s=c>0&&c<1?0:a,new $e(a,s,c,t.opacity)}function $e(t,e,n,o){this.h=+t,this.s=+e,this.l=+n,this.opacity=+o}function De(t){return(t=(t||0)%360)<0?t+360:t}function Ne(t){return Math.max(0,Math.min(1,t||0))}function Fe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Be(t,e,n,o,r){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*o+a*r)/6}oe(ie,xe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:be,formatHex:be,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Pe(this).formatHsl()},formatRgb:we,toString:we}),oe(Se,Ce,re(ie,{brighter(t){return t=null==t?se:Math.pow(se,t),new Se(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ae:Math.pow(ae,t),new Se(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Se(Ee(this.r),Ee(this.g),Ee(this.b),Te(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:ke,formatHex:ke,formatHex8:function(){return`#${Me(this.r)}${Me(this.g)}${Me(this.b)}${Me(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Le,toString:Le})),oe($e,(function(t,e,n,o){return 1===arguments.length?Pe(t):new $e(t,e,n,null==o?1:o)}),re(ie,{brighter(t){return t=null==t?se:Math.pow(se,t),new $e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ae:Math.pow(ae,t),new $e(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,o=n+(n<.5?n:1-n)*e,r=2*n-o;return new Se(Fe(t>=240?t-240:t+120,r,o),Fe(t,r,o),Fe(t<120?t+240:t-120,r,o),this.opacity)},clamp(){return new $e(De(this.h),Ne(this.s),Ne(this.l),Te(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=Te(this.opacity);return`${1===t?"hsl(":"hsla("}${De(this.h)}, ${100*Ne(this.s)}%, ${100*Ne(this.l)}%${1===t?")":`, ${t})`}`}}));const Oe=t=>()=>t;function Re(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Oe(isNaN(t)?e:t)}const He=function t(e){var n=function(t){return 1==(t=+t)?Re: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(o){return Math.pow(t+o*e,n)}}(e,n,t):Oe(isNaN(e)?n:e)}}(e);function o(t,e){var o=n((t=Ce(t)).r,(e=Ce(e)).r),r=n(t.g,e.g),i=n(t.b,e.b),a=Re(t.opacity,e.opacity);return function(e){return t.r=o(e),t.g=r(e),t.b=i(e),t.opacity=a(e),t+""}}return o.gamma=t,o}(1);function Ge(t){return function(e){var n,o,r=e.length,i=new Array(r),a=new Array(r),s=new Array(r);for(n=0;n<r;++n)o=Ce(e[n]),i[n]=o.r||0,a[n]=o.g||0,s[n]=o.b||0;return i=t(i),a=t(a),s=t(s),o.opacity=1,function(t){return o.r=i(t),o.g=a(t),o.b=s(t),o+""}}}function We(t,e){var n,o=e?e.length:0,r=t?Math.min(o,t.length):0,i=new Array(r),a=new Array(o);for(n=0;n<r;++n)i[n]=Ke(t[n],e[n]);for(;n<o;++n)a[n]=e[n];return function(t){for(n=0;n<r;++n)a[n]=i[n](t);return a}}function je(t,e){var n=new Date;return t=+t,e=+e,function(o){return n.setTime(t*(1-o)+e*o),n}}function qe(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ze(t,e){var n,o={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?o[n]=Ke(t[n],e[n]):r[n]=e[n];return function(t){for(n in o)r[n]=o[n](t);return r}}Ge((function(t){var e=t.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[o],i=t[o+1],a=o>0?t[o-1]:2*r-i,s=o<e-1?t[o+2]:2*i-r;return Be((n-o/e)*e,a,r,i,s)}})),Ge((function(t){var e=t.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*e),r=t[(o+e-1)%e],i=t[o%e],a=t[(o+1)%e],s=t[(o+2)%e];return Be((n-o/e)*e,r,i,a,s)}}));var Ve=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ue=new RegExp(Ve.source,"g");function Ye(t,e){var n,o,r,i=Ve.lastIndex=Ue.lastIndex=0,a=-1,s=[],c=[];for(t+="",e+="";(n=Ve.exec(t))&&(o=Ue.exec(e));)(r=o.index)>i&&(r=e.slice(i,r),s[a]?s[a]+=r:s[++a]=r),(n=n[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,c.push({i:a,x:qe(n,o)})),i=Ue.lastIndex;return i<e.length&&(r=e.slice(i),s[a]?s[a]+=r:s[++a]=r),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,o=0;o<e;++o)s[(n=c[o]).i]=n.x(t);return s.join("")})}function Xe(t,e){e||(e=[]);var n,o=t?Math.min(e.length,t.length):0,r=e.slice();return function(i){for(n=0;n<o;++n)r[n]=t[n]*(1-i)+e[n]*i;return r}}function Ke(t,e){var n,o=typeof e;return null==e||"boolean"===o?Oe(e):("number"===o?qe:"string"===o?(n=xe(e))?(e=n,He):Ye:e instanceof xe?He:e instanceof Date?je:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Xe:Array.isArray(e)?We:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ze:qe)(t,e)}function Je(){}function Qe(t){return null==t?Je:function(){return this.querySelector(t)}}function Ze(){return[]}function tn(t){return function(e){return e.matches(t)}}var en=Array.prototype.find;function nn(){return this.firstElementChild}var on=Array.prototype.filter;function rn(){return Array.from(this.children)}function an(t){return new Array(t.length)}function sn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function cn(t,e,n,o,r,i){for(var a,s=0,c=e.length,l=i.length;s<l;++s)(a=e[s])?(a.__data__=i[s],o[s]=a):n[s]=new sn(t,i[s]);for(;s<c;++s)(a=e[s])&&(r[s]=a)}function ln(t,e,n,o,r,i,a){var s,c,l,u=new Map,d=e.length,h=i.length,f=new Array(d);for(s=0;s<d;++s)(c=e[s])&&(f[s]=l=a.call(c,c.__data__,s,e)+"",u.has(l)?r[s]=c:u.set(l,c));for(s=0;s<h;++s)l=a.call(t,i[s],s,i)+"",(c=u.get(l))?(o[s]=c,c.__data__=i[s],u.delete(l)):n[s]=new sn(t,i[s]);for(s=0;s<d;++s)(c=e[s])&&u.get(f[s])===c&&(r[s]=c)}function un(t){return t.__data__}function dn(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function hn(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}sn.prototype={constructor:sn,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)}};var fn="http://www.w3.org/1999/xhtml";const pn={svg:"http://www.w3.org/2000/svg",xhtml:fn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mn(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),pn.hasOwnProperty(e)?{space:pn[e],local:t}:t}function gn(t){return function(){this.removeAttribute(t)}}function yn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vn(t,e){return function(){this.setAttribute(t,e)}}function bn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function wn(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function xn(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 _n(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function An(t){return function(){this.style.removeProperty(t)}}function Cn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Sn(t,e,n){return function(){var o=e.apply(this,arguments);null==o?this.style.removeProperty(t):this.style.setProperty(t,o,n)}}function kn(t){return function(){delete this[t]}}function Ln(t,e){return function(){this[t]=e}}function Tn(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function En(t){return t.trim().split(/^|\s+/)}function Mn(t){return t.classList||new In(t)}function In(t){this._node=t,this._names=En(t.getAttribute("class")||"")}function Pn(t,e){for(var n=Mn(t),o=-1,r=e.length;++o<r;)n.add(e[o])}function $n(t,e){for(var n=Mn(t),o=-1,r=e.length;++o<r;)n.remove(e[o])}function Dn(t){return function(){Pn(this,t)}}function Nn(t){return function(){$n(this,t)}}function Fn(t,e){return function(){(e.apply(this,arguments)?Pn:$n)(this,t)}}function Bn(){this.textContent=""}function On(t){return function(){this.textContent=t}}function Rn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Hn(){this.innerHTML=""}function Gn(t){return function(){this.innerHTML=t}}function Wn(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function jn(){this.nextSibling&&this.parentNode.appendChild(this)}function qn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===fn&&e.documentElement.namespaceURI===fn?e.createElement(t):e.createElementNS(n,t)}}function Vn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Un(t){var e=mn(t);return(e.local?Vn:zn)(e)}function Yn(){return null}function Xn(){var t=this.parentNode;t&&t.removeChild(this)}function Kn(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Jn(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Qn(t){return function(){var e=this.__on;if(e){for(var n,o=0,r=-1,i=e.length;o<i;++o)n=e[o],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function Zn(t,e,n){return function(){var o,r=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(r)for(var a=0,s=r.length;a<s;++a)if((o=r[a]).type===t.type&&o.name===t.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),void(o.value=e);this.addEventListener(t.type,i,n),o={type:t.type,name:t.name,value:e,listener:i,options:n},r?r.push(o):this.__on=[o]}}function to(t,e,n){var o=_n(t),r=o.CustomEvent;"function"==typeof r?r=new r(e,n):(r=o.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function eo(t,e){return function(){return to(this,t,e)}}function no(t,e){return function(){return to(this,t,e.apply(this,arguments))}}In.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 oo=[null];function ro(t,e){this._groups=t,this._parents=e}function io(t){return"string"==typeof t?new ro([[document.querySelector(t)]],[document.documentElement]):new ro([[t]],oo)}function ao(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,[(o=o.matrixTransform(e.getScreenCTM().inverse())).x,o.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}ro.prototype=function(){return new ro([[document.documentElement]],oo)}.prototype={constructor:ro,select:function(t){"function"!=typeof t&&(t=Qe(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a,s=e[r],c=s.length,l=o[r]=new Array(c),u=0;u<c;++u)(i=s[u])&&(a=t.call(i,i.__data__,u,s))&&("__data__"in i&&(a.__data__=i.__data__),l[u]=a);return new ro(o,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}(t):function(t){return null==t?Ze:function(){return this.querySelectorAll(t)}}(t);for(var e=this._groups,n=e.length,o=[],r=[],i=0;i<n;++i)for(var a,s=e[i],c=s.length,l=0;l<c;++l)(a=s[l])&&(o.push(t.call(a,a.__data__,l,s)),r.push(a));return new ro(o,r)},selectChild:function(t){return this.select(null==t?nn:function(t){return function(){return en.call(this.children,t)}}("function"==typeof t?t:tn(t)))},selectChildren:function(t){return this.selectAll(null==t?rn:function(t){return function(){return on.call(this.children,t)}}("function"==typeof t?t:tn(t)))},filter:function(t){"function"!=typeof t&&(t=function(t){return function(){return this.matches(t)}}(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,c=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&c.push(i);return new ro(o,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,un);var n=e?ln:cn,o=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var i=r.length,a=new Array(i),s=new Array(i),c=new Array(i),l=0;l<i;++l){var u=o[l],d=r[l],h=d.length,f=dn(t.call(u,u&&u.__data__,l,o)),p=f.length,m=s[l]=new Array(p),g=a[l]=new Array(p);n(u,d,m,g,c[l]=new Array(h),f,e);for(var y,v,b=0,w=0;b<p;++b)if(y=m[b]){for(b>=w&&(w=b+1);!(v=g[w])&&++w<p;);y._next=v||null}}return(a=new ro(a,o))._enter=s,a._exit=c,a},enter:function(){return new ro(this._enter||this._groups.map(an),this._parents)},exit:function(){return new ro(this._exit||this._groups.map(an),this._parents)},join:function(t,e,n){var o=this.enter(),r=this,i=this.exit();return"function"==typeof t?(o=t(o))&&(o=o.selection()):o=o.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?i.remove():n(i),o&&r?o.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,o=e._groups,r=n.length,i=o.length,a=Math.min(r,i),s=new Array(r),c=0;c<a;++c)for(var l,u=n[c],d=o[c],h=u.length,f=s[c]=new Array(h),p=0;p<h;++p)(l=u[p]||d[p])&&(f[p]=l);for(;c<r;++c)s[c]=n[c];return new ro(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var o,r=t[e],i=r.length-1,a=r[i];--i>=0;)(o=r[i])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=hn);for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a,s=n[i],c=s.length,l=r[i]=new Array(c),u=0;u<c;++u)(a=s[u])&&(l[u]=a);l.sort(e)}return new ro(r,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 o=t[e],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}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,o=e.length;n<o;++n)for(var r,i=e[n],a=0,s=i.length;a<s;++a)(r=i[a])&&t.call(r,r.__data__,a,i);return this},attr:function(t,e){var n=mn(t);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==e?n.local?yn:gn:"function"==typeof e?n.local?xn:wn:n.local?bn:vn)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?An:"function"==typeof e?Sn:Cn)(t,e,null==n?"":n)):function(t,e){return t.style.getPropertyValue(e)||_n(t).getComputedStyle(t,null).getPropertyValue(e)}(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kn:"function"==typeof e?Tn:Ln)(t,e)):this.node()[t]},classed:function(t,e){var n=En(t+"");if(arguments.length<2){for(var o=Mn(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?Fn:e?Dn:Nn)(n,e))},text:function(t){return arguments.length?this.each(null==t?Bn:("function"==typeof t?Rn:On)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Hn:("function"==typeof t?Wn:Gn)(t)):this.node().innerHTML},raise:function(){return this.each(jn)},lower:function(){return this.each(qn)},append:function(t){var e="function"==typeof t?t:Un(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Un(t),o=null==e?Yn:"function"==typeof e?e:Qe(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(Xn)},clone:function(t){return this.select(t?Jn:Kn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var o,r,i=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+""),a=i.length;if(!(arguments.length<2)){for(s=e?Zn:Qn,o=0;o<a;++o)this.each(s(i[o],e,n));return this}var s=this.node().__on;if(s)for(var c,l=0,u=s.length;l<u;++l)for(o=0,c=s[l];o<a;++o)if((r=i[o]).type===c.type&&r.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?no:eo)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var o,r=t[e],i=0,a=r.length;i<a;++i)(o=r[i])&&(yield o)}};var so,co,lo=0,uo=0,ho=0,fo=1e3,po=0,mo=0,go=0,yo="object"==typeof performance&&performance.now?performance:Date,vo="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function bo(){return mo||(vo(wo),mo=yo.now()+go)}function wo(){mo=0}function xo(){this._call=this._time=this._next=null}function _o(t,e,n){var o=new xo;return o.restart(t,e,n),o}function Ao(){mo=(po=yo.now())+go,lo=uo=0;try{!function(){bo(),++lo;for(var t,e=so;e;)(t=mo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--lo}()}finally{lo=0,function(){for(var t,e,n=so,o=1/0;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:so=e);co=t,So(o)}(),mo=0}}function Co(){var t=yo.now(),e=t-po;e>fo&&(go-=e,po=t)}function So(t){lo||(uo&&(uo=clearTimeout(uo)),t-mo>24?(t<1/0&&(uo=setTimeout(Ao,t-yo.now()-go)),ho&&(ho=clearInterval(ho))):(ho||(po=yo.now(),ho=setInterval(Co,fo)),lo=1,vo(Ao)))}function ko(t,e,n){var o=new xo;return e=null==e?0:+e,o.restart((n=>{o.stop(),t(n+e)}),e,n),o}xo.prototype=_o.prototype={constructor:xo,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?bo():+n)+(null==e?0:+e),this._next||co===this||(co?co._next=this:so=this,co=this),this._call=t,this._time=n,So()},stop:function(){this._call&&(this._call=null,this._time=1/0,So())}};var Lo=ee("start","end","cancel","interrupt"),To=[],Eo=0,Mo=2,Io=3,Po=5,$o=6;function Do(t,e,n,o,r,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var o,r=t.__transition;function i(c){var l,u,d,h;if(1!==n.state)return s();for(l in r)if((h=r[l]).name===n.name){if(h.state===Io)return ko(i);4===h.state?(h.state=$o,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete r[l]):+l<e&&(h.state=$o,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete r[l])}if(ko((function(){n.state===Io&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(c))})),n.state=Mo,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Mo){for(n.state=Io,o=new Array(d=n.tween.length),l=0,u=-1;l<d;++l)(h=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(o[++u]=h);o.length=u+1}}function a(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=Po,1),i=-1,a=o.length;++i<a;)o[i].call(t,r);n.state===Po&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var o in n.state=$o,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=_o((function(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}),0,n.time)}(t,n,{name:e,index:o,group:r,on:Lo,tween:To,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Eo})}function No(t,e){var n=Bo(t,e);if(n.state>Eo)throw new Error("too late; already scheduled");return n}function Fo(t,e){var n=Bo(t,e);if(n.state>Io)throw new Error("too late; already running");return n}function Bo(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Oo(t,e){var n,o,r,i=t.__transition,a=!0;if(i){for(r in e=null==e?null:e+"",i)(n=i[r]).name===e?(o=n.state>Mo&&n.state<Po,n.state=$o,n.timer.stop(),n.on.call(o?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[r]):a=!1;a&&delete t.__transition}}var Ro,Ho=180/Math.PI,Go={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Wo(t,e,n,o,r,i){var a,s,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*o)&&(n-=t*c,o-=e*c),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,c/=s),t*o<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(e,t)*Ho,skewX:Math.atan(c)*Ho,scaleX:a,scaleY:s}}function jo(t,e,n,o){function r(t){return t.length?t.pop()+" ":""}return function(i,a){var s=[],c=[];return i=t(i),a=t(a),function(t,o,r,i,a,s){if(t!==r||o!==i){var c=a.push("translate(",null,e,null,n);s.push({i:c-4,x:qe(t,r)},{i:c-2,x:qe(o,i)})}else(r||i)&&a.push("translate("+r+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,c),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(r(n)+"rotate(",null,o)-2,x:qe(t,e)})):e&&n.push(r(n)+"rotate("+e+o)}(i.rotate,a.rotate,s,c),function(t,e,n,i){t!==e?i.push({i:n.push(r(n)+"skewX(",null,o)-2,x:qe(t,e)}):e&&n.push(r(n)+"skewX("+e+o)}(i.skewX,a.skewX,s,c),function(t,e,n,o,i,a){if(t!==n||e!==o){var s=i.push(r(i)+"scale(",null,",",null,")");a.push({i:s-4,x:qe(t,n)},{i:s-2,x:qe(e,o)})}else 1===n&&1===o||i.push(r(i)+"scale("+n+","+o+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,c),i=a=null,function(t){for(var e,n=-1,o=c.length;++n<o;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var qo=jo((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Go:Wo(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),zo=jo((function(t){return null==t?Go:(Ro||(Ro=document.createElementNS("http://www.w3.org/2000/svg","g")),Ro.setAttribute("transform",t),(t=Ro.transform.baseVal.consolidate())?Wo((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Go)}),", ",")",")");function Vo(t,e){var n,o;return function(){var r=Fo(this,t),i=r.tween;if(i!==n)for(var a=0,s=(o=n=i).length;a<s;++a)if(o[a].name===e){(o=o.slice()).splice(a,1);break}r.tween=o}}function Uo(t,e,n){var o,r;if("function"!=typeof n)throw new Error;return function(){var i=Fo(this,t),a=i.tween;if(a!==o){r=(o=a).slice();for(var s={name:e,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===e){r[c]=s;break}c===l&&r.push(s)}i.tween=r}}function Yo(t,e,n){var o=t._id;return t.each((function(){var t=Fo(this,o);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Bo(t,o).value[e]}}function Xo(t,e){var n;return("number"==typeof e?qe:e instanceof xe?He:(n=xe(e))?(e=n,He):Ye)(t,e)}function Ko(t){return function(){this.removeAttribute(t)}}function Jo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qo(t,e,n){var o,r,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===o?r:r=e(o=a,n)}}function Zo(t,e,n){var o,r,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===o?r:r=e(o=a,n)}}function tr(t,e,n){var o,r,i;return function(){var a,s,c=n(this);if(null!=c)return(a=this.getAttribute(t))===(s=c+"")?null:a===o&&s===r?i:(r=s,i=e(o=a,c));this.removeAttribute(t)}}function er(t,e,n){var o,r,i;return function(){var a,s,c=n(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:a===o&&s===r?i:(r=s,i=e(o=a,c));this.removeAttributeNS(t.space,t.local)}}function nr(t,e){var n,o;function r(){var r=e.apply(this,arguments);return r!==o&&(n=(o=r)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,r)),n}return r._value=e,r}function or(t,e){var n,o;function r(){var r=e.apply(this,arguments);return r!==o&&(n=(o=r)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,r)),n}return r._value=e,r}function rr(t,e){return function(){No(this,t).delay=+e.apply(this,arguments)}}function ir(t,e){return e=+e,function(){No(this,t).delay=e}}function ar(t,e){return function(){Fo(this,t).duration=+e.apply(this,arguments)}}function sr(t,e){return e=+e,function(){Fo(this,t).duration=e}}var cr=vt.prototype.constructor;function lr(t){return function(){this.style.removeProperty(t)}}var ur=0;function dr(t,e,n,o){this._groups=t,this._parents=e,this._name=n,this._id=o}function hr(){return++ur}var fr=vt.prototype;dr.prototype=function(t){return vt().transition(t)}.prototype={constructor:dr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=c(t));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s,l,u=o[a],d=u.length,h=i[a]=new Array(d),f=0;f<d;++f)(s=u[f])&&(l=t.call(s,s.__data__,f,u))&&("__data__"in s&&(l.__data__=s.__data__),h[f]=l,Do(h[f],e,n,f,h,Bo(s,n)));return new dr(i,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=d(t));for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var c,l=o[s],u=l.length,h=0;h<u;++h)if(c=l[h]){for(var f,p=t.call(c,c.__data__,h,l),m=Bo(c,n),g=0,y=p.length;g<y;++g)(f=p[g])&&Do(f,e,n,g,p,m);i.push(p),a.push(c)}return new dr(i,a,e,n)},selectChild:fr.selectChild,selectChildren:fr.selectChildren,filter:function(t){"function"!=typeof t&&(t=h(t));for(var e=this._groups,n=e.length,o=new Array(n),r=0;r<n;++r)for(var i,a=e[r],s=a.length,c=o[r]=[],l=0;l<s;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&c.push(i);return new dr(o,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,o=e.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var c,l=e[s],u=n[s],d=l.length,h=a[s]=new Array(d),f=0;f<d;++f)(c=l[f]||u[f])&&(h[f]=c);for(;s<o;++s)a[s]=e[s];return new dr(a,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(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a,s=o[i],c=s.l