text: !function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=103)}({100:function(t,n){class e extends HTMLElement{constructor(t,n,e,r){super(),this.bool=n||!1,this.size=t||35,this.color=e||"black",this.sidePanelName=r,this.sidePanel=null;const i=this.attachShadow({mode:"open"});i.innerHTML=`<style>\n        :host{\n            display:inline-block;\n            width:${this.size}px;\n            height:${this.size}px;\n            position:relative;\n        }\n        .box{\n            padding:2.5px;\n            border:1px solid ${this.color};\n            position:relative;\n            width:100%;\n            height:100%;\n            border-radius:5px;\n        }\n        .bar{\n            width:80%;\n            height:5px;\n            background-color:${this.color};\n            margin:5px auto;\n        }\n        </style>\n        <div class="box">\n            <div class="bar"></div>\n            <div class="bar"></div>\n            <div class="bar"></div>\n        </div>\n        `,this.bar1=i.querySelector(".bar:nth-of-type(1)"),this.bar2=i.querySelector(".bar:nth-of-type(2)"),this.bar3=i.querySelector(".bar:nth-of-type(3)"),this.box=i.querySelector(".box")}connectedCallback(){this.onclick=()=>{const t=this.getAttribute("bool");this.setAttribute("bool","true"===t?"false":"true")}}static get observedAttributes(){return["bool","color","sidePanel"]}attributeChangedCallback(t,n,e,r){if("bool"===t){const t=this.getAttribute("sidePanel");t||console.log("sidePanel attribute is missing");const n=document.getElementById(t);t||console.log("There's no link to side-panel"),"false"===e?(this.bar2.style.opacity=0,this.bar1.style.transform="translateY(10px) rotate(45deg)",this.bar3.style.transform="translateY(-10px) rotate(-45deg)",n.setAttribute("bool","true")):(this.bar2.style.opacity=1,this.bar1.style.transform="none",this.bar3.style.transform="none",n.setAttribute("bool","false"))}"color"===t&&(this.color=e,this.bar1.style.background=e,this.bar2.style.background=e,this.bar3.style.background=e,this.box.style.border="1px solid "+e)}}customElements.define("custom-burger",e)},101:function(t,n){class e extends HTMLElement{constructor(t,n,e,r){super(),this.bool=n||!1,this.parent=e||"",this.size=t,this.target=r||"";const i=this.attachShadow({mode:"open"});i.innerHTML=`<style>\n        :host{\n            width:${this.size}px;\n            height:calc(100vh - 145px);\n            position:absolute;\n            overflow:hidden;\n            transition:left 0.4s;\n        }\n        .box{\n            box-sizing:border-box;\n            \n            position:relative;\n            width:100%;\n            height:100%;\n        }\n        </style>\n        <div class="box"></div>\n        `,this.box=i.querySelector(".box")}connectedCallback(){}static get observedAttributes(){return["bool","size","parent"]}attributeChangedCallback(t,n,e,r){if("size"===t&&(this.size=e,this.style.width=e+"px"),"parent"===t&&(this.parent=e),"bool"===t)if("false"===e)this.style.left="-"+this.getAttribute("size")+"px";else{if(!this.box.childNodes.length&&this.getAttribute("target")){const t=document.getElementById(this.getAttribute("target"));t.style.display="block",this.box.appendChild(t);const n=this.getAttribute("parent");if(n&&document.getElementById(n)){const t=document.getElementById(n);this.style.top=t.getBoundingClientRect().top+window.scrollY+"px",this.style.height=t.getBoundingClientRect().height+"px"}}this.style.left=0}}}customElements.define("side-panel",e)},102:function(t,n){class e extends HTMLElement{constructor(t,n,e,r){super(),this.bool=n||!1,this.size=t||100,this._top=e||0,this._left=r||0,this.attachShadow({mode:"open"}).innerHTML=`<style>\n        :host{\n            width:${this.size}px;\n            height:${this.size}px;\n            left: ${this._left-this.size/2}px;\n            top: ${this._top-this.size/2}px;\n            font-size: 10px;\n            position: absolute;\n            text-indent: -9999em;\n            border-top: 1.1em solid rgba(169,169,169, 0.2);\n            border-right: 1.1em solid rgba(169,169,169, 0.2);\n            border-bottom: 1.1em solid rgba(169,169,169, 0.2);\n            border-left: 1.1em solid #a9a9a9;\n            border-radius:50%;\n            transform: translateZ(0);\n            display:none;\n            animation: load8 1.1s infinite linear;\n        }\n\n        @keyframes load8 {\n            0% {\n                -webkit-transform: rotate(0deg);\n                transform: rotate(0deg);\n            }\n            100% {\n                -webkit-transform: rotate(360deg);\n                transform: rotate(360deg);\n            }\n        }\n        \n        </style>\n        <div class="spinner"></div>\n        `}connectedCallback(){}static get observedAttributes(){return["bool","size","_left","_top"]}attributeChangedCallback(t,n,e,r){"size"===t&&(this.size=Number(e),this.style.width=e+"px",this.style.height=e+"px"),"bool"===t&&(this.bool=e,"false"===e?this.style.dispaly="none":this.style.display="block"),"_left"===t&&(this._left=Number(e),0===this._left&&(this._left=window.innerWidth/2),this.style.left=this._left-this.size/2+"px"),"_top"===t&&(this._top=Number(e),0===this._top&&(this._top=window.innerHeight/2),this.style.top=this._top-this.size/2+"px")}}customElements.define("spin-icon",e)},103:function(t,n,e){"use strict";e.r(n);var r=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}};var o=i(r),u=o.right,a=(o.left,u);var s=Array.prototype,l=(s.slice,s.map,Math.sqrt(50)),c=Math.sqrt(10),f=Math.sqrt(2),h=function(t,n,e){var r,i,o,u,a=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(u=p(t,n,e))||!isFinite(u))return[];if(u>0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a<i;)o[a]=(t+a)*u;else for(t=Math.floor(t*u),n=Math.ceil(n*u),o=new Array(i=Math.ceil(t-n+1));++a<i;)o[a]=(t-a)/u;return r&&o.reverse(),o};function p(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=l?10:o>=c?5:o>=f?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=l?10:o>=c?5:o>=f?2:1)}function d(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=l?i*=10:o>=c?i*=5:o>=f&&(i*=2),n<t?-i:i}var g=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r};var v=Array.prototype.slice,y=function(t){return t};function m(t){return"translate("+(t+.5)+",0)"}function _(t){return"translate(0,"+(t+.5)+")"}function w(t){return function(n){return+t(n)}}function x(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}function b(){return!this.__axis}function M(t,n){var e=[],r=null,i=null,o=6,u=6,a=3,s=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?m:_;function f(f){var h=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):y:i,d=Math.max(o,0)+a,g=n.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,_=(n.bandwidth?x:w)(n.copy()),M=f.selection?f.selection():f,C=M.selectAll(".domain").data([null]),k=M.selectAll(".tick").data(h,n).order(),A=k.exit(),T=k.enter().append("g").attr("class","tick"),N=k.select("line"),S=k.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(T),N=N.merge(T.append("line").attr("stroke","currentColor").attr(l+"2",s*o)),S=S.merge(T.append("text").attr("fill","currentColor").attr(l,s*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==M&&(C=C.transition(f),k=k.transition(f),N=N.transition(f),S=S.transition(f),A=A.transition(f).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=_(t))?c(t):this.getAttribute("transform")})),T.attr("opacity",1e-6).attr("transform",(function(t){var n=this.parentNode.__axis;return c(n&&isFinite(n=n(t))?n:_(t))}))),A.remove(),C.attr("d",4===t||2==t?u?"M"+s*u+","+v+"H0.5V"+m+"H"+s*u:"M0.5,"+v+"V"+m:u?"M"+v+","+s*u+"V0.5H"+m+"V"+s*u:"M"+v+",0.5H"+m),k.attr("opacity",1).attr("transform",(function(t){return c(_(t))})),N.attr(l+"2",s*o),S.attr(l,s*d).text(p),M.filter(b).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),M.each((function(){this.__axis=_}))}return f.scale=function(t){return arguments.length?(n=t,f):n},f.ticks=function(){return e=v.call(arguments),f},f.tickArguments=function(t){return arguments.length?(e=null==t?[]:v.call(t),f):e.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:v.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=u=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(u=+t,f):u},f.tickPadding=function(t){return arguments.length?(a=+t,f):a},f}function C(t){return M(3,t)}function k(t){return M(4,t)}var A={value:function(){}};function T(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new N(r)}function N(t){this._=t}function S(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function U(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function D(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=A,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}N.prototype=T.prototype={constructor:N,on:function(t,n){var e,r=this._,i=S(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=D(r[e],t.name,n);else if(null==n)for(e in r)r[e]=D(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=U(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new N(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var L=T;function E(){}var R=function(t){return null==t?E:function(){return this.querySelector(t)}};function P(){return[]}var F=function(t){return null==t?P:function(){return this.querySelectorAll(t)}},z=function(t){return function(){return this.matches(t)}},q=function(t){return new Array(t.length)};function H(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}H.prototype={constructor:H,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Y(t,n,e,r,i,o){for(var u,a=0,s=n.length,l=o.length;a<l;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new H(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function j(t,n,e,r,i,o,u){var a,s,l,c={},f=n.length,h=o.length,p=new Array(f);for(a=0;a<f;++a)(s=n[a])&&(p[a]=l="$"+u.call(s,s.__data__,a,n),l in c?i[a]=s:c[l]=s);for(a=0;a<h;++a)(s=c[l="$"+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],c[l]=null):e[a]=new H(t,o[a]);for(a=0;a<f;++a)(s=n[a])&&c[p[a]]===s&&(i[a]=s)}function O(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var $="http://www.w3.org/1999/xhtml",I={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},V=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),I.hasOwnProperty(n)?{space:I[n],local:t}:t};function X(t){return function(){this.removeAttribute(t)}}function B(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Z(t,n){return function(){this.setAttribute(t,n)}}function W(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Q(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function J(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var G=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function K(t){return function(){this.style.removeProperty(t)}}function tt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function nt(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function et(t,n){return t.style.getPropertyValue(n)||G(t).getComputedStyle(t,null).getPropertyValue(n)}function rt(t){return function(){delete this[t]}}function it(t,n){return function(){this[t]=n}}function ot(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function ut(t){return t.trim().split(/^|\s+/)}function at(t){return t.classList||new st(t)}function st(t){this._node=t,this._names=ut(t.getAttribute("class")||"")}function lt(t,n){for(var e=at(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function ct(t,n){for(var e=at(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function ft(t){return function(){lt(this,t)}}function ht(t){return function(){ct(this,t)}}function pt(t,n){return function(){(n.apply(this,arguments)?lt:ct)(this,t)}}st.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function dt(){this.textContent=""}function gt(t){return function(){this.textContent=t}}function vt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function yt(){this.innerHTML=""}function mt(t){return function(){this.innerHTML=t}}function _t(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function wt(){this.nextSibling&&this.parentNode.appendChild(this)}function xt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===$&&n.documentElement.namespaceURI===$?n.createElement(t):n.createElementNS(e,t)}}function Mt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var Ct=function(t){var n=V(t);return(n.local?Mt:bt)(n)};function kt(){return null}function At(){var t=this.parentNode;t&&t.removeChild(this)}function Tt(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Nt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var St={},Ut=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(St={mouseenter:"mouseover",mouseleave:"mouseout"}));function Dt(t,n,e){return t=Lt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Lt(t,n,e){return function(r){var i=Ut;Ut=r;try{t.call(this,this.__data__,n,e)}finally{Ut=i}}}function Et(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function Rt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function Pt(t,n,e){var r=St.hasOwnProperty(t.type)?Dt:Lt;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,f=s.length;c<f;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function Ft(t,n,e){var r=G(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function zt(t,n){return function(){return Ft(this,t,n)}}function qt(t,n){return function(){return Ft(this,t,n.apply(this,arguments))}}var Ht=[null];function Yt(t,n){this._groups=t,this._parents=n}function jt(){return new Yt([[document.documentElement]],Ht)}Yt.prototype=jt.prototype={constructor:Yt,select:function(t){"function"!=typeof t&&(t=R(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,l=r[i]=new Array(s),c=0;c<s;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),l[c]=u);return new Yt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=F(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Yt(r,i)},filter:function(t){"function"!=typeof t&&(t=z(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new Yt(r,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var e,r=n?j:Y,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),c=0;c<u;++c){var f=i[c],h=o[c],p=h.length,d=t.call(f,f&&f.__data__,c,i),g=d.length,v=s[c]=new Array(g),y=a[c]=new Array(g);r(f,h,v,y,l[c]=new Array(p),d,n);for(var m,_,w=0,x=0;w<g;++w)if(m=v[w]){for(w>=x&&(x=w+1);!(_=y[x])&&++x<g;);m._next=_||null}}return(a=new Yt(a,i))._enter=s,a._exit=l,a},enter:function(){return new Yt(this._enter||this._groups.map(q),this._parents)},exit:function(){return new Yt(this._exit||this._groups.map(q),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new Yt(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=O);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new Yt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=V(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?B:X:"function"==typeof n?e.local?J:Q:e.local?W:Z)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?K:"function"==typeof n?nt:tt)(t,n,null==e?"":e)):et(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?rt:"function"==typeof n?ot:it)(t,n)):this.node()[t]},classed:function(t,n){var e=ut(t+"");if(arguments.length<2){for(var r=at(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?pt:n?ft:ht)(e,n))},text:function(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?vt:gt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?yt:("function"==typeof t?_t:mt)(t)):this.node().innerHTML},raise:function(){return this.each(wt)},lower:function(){return this.each(xt)},append:function(t){var n="function"==typeof t?t:Ct(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:Ct(t),r=null==n?kt:"function"==typeof n?n:R(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(At)},clone:function(t){return this.select(t?Nt:Tt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=Et(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?Pt:Rt,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?qt:zt)(t,n))}};var Ot=jt,$t=function(t){return"string"==typeof t?new Yt([[document.querySelector(t)]],[document.documentElement]):new Yt([[t]],Ht)};var It=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function Vt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Xt(){}var Bt="\\s*([+-]?\\d+)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Wt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qt=/^#([0-9a-f]{3,8})$/,Jt=new RegExp("^rgb\\("+[Bt,Bt,Bt]+"\\)$"),Gt=new RegExp("^rgb\\("+[Wt,Wt,Wt]+"\\)$"),Kt=new RegExp("^rgba\\("+[Bt,Bt,Bt,Zt]+"\\)$"),tn=new RegExp("^rgba\\("+[Wt,Wt,Wt,Zt]+"\\)$"),nn=new RegExp("^hsl\\("+[Zt,Wt,Wt]+"\\)$"),en=new RegExp("^hsla\\("+[Zt,Wt,Wt,Zt]+"\\)$"),rn={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 on(){return this.rgb().formatHex()}function un(){return this.rgb().formatRgb()}function an(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Qt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?sn(n):3===e?new hn(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new hn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new hn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Jt.exec(t))?new hn(n[1],n[2],n[3],1):(n=Gt.exec(t))?new hn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Kt.exec(t))?ln(n[1],n[2],n[3],n[4]):(n=tn.exec(t))?ln(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=nn.exec(t))?vn(n[1],n[2]/100,n[3]/100,1):(n=en.exec(t))?vn(n[1],n[2]/100,n[3]/100,n[4]):rn.hasOwnProperty(t)?sn(rn[t]):"transparent"===t?new hn(NaN,NaN,NaN,0):null}function sn(t){return new hn(t>>16&255,t>>8&255,255&t,1)}function ln(t,n,e,r){return r<=0&&(t=n=e=NaN),new hn(t,n,e,r)}function cn(t){return t instanceof Xt||(t=an(t)),t?new hn((t=t.rgb()).r,t.g,t.b,t.opacity):new hn}function fn(t,n,e,r){return 1===arguments.length?cn(t):new hn(t,n,e,null==r?1:r)}function hn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function pn(){return"#"+gn(this.r)+gn(this.g)+gn(this.b)}function dn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function gn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function vn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new mn(t,n,e,r)}function yn(t){if(t instanceof mn)return new mn(t.h,t.s,t.l,t.opacity);if(t instanceof Xt||(t=an(t)),!t)return new mn;if(t instanceof mn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new mn(u,a,s,t.opacity)}function mn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function _n(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function wn(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}It(Xt,an,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:on,formatHex:on,formatHsl:function(){return yn(this).formatHsl()},formatRgb:un,toString:un}),It(hn,fn,Vt(Xt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new hn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new hn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:pn,formatHex:pn,formatRgb:dn,toString:dn})),It(mn,(function(t,n,e,r){return 1===arguments.length?yn(t):new mn(t,n,e,null==r?1:r)}),Vt(Xt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new mn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new mn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new hn(_n(t>=240?t-240:t+120,i,r),_n(t,i,r),_n(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var xn=function(t){return function(){return t}};function bn(t,n){return function(e){return t+e*n}}function Mn(t){return 1==(t=+t)?Cn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):xn(isNaN(n)?e:n)}}function Cn(t,n){var e=n-t;return e?bn(t,e):xn(isNaN(t)?n:t)}var kn=function t(n){var e=Mn(n);function r(t,n){var r=e((t=fn(t)).r,(n=fn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Cn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function An(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=fn(n[e]),o[e]=r.r||0,u[e]=r.g||0,a[e]=r.b||0;return o=t(o),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=u(t),r.b=a(t),r+""}}}An((function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return wn((e-r/n)*n,u,i,o,a)}})),An((function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return wn((e-r/n)*n,i,o,u,a)}}));var Tn=function(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}};function Nn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Sn(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),u=new Array(r);for(e=0;e<i;++e)o[e]=qn(t[e],n[e]);for(;e<r;++e)u[e]=n[e];return function(t){for(e=0;e<i;++e)u[e]=o[e](t);return u}}var Un=function(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}},Dn=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},Ln=function(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=qn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rn=new RegExp(En.source,"g");var Pn,Fn,zn=function(t,n){var e,r,i,o=En.lastIndex=Rn.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=En.exec(t))&&(r=Rn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:Dn(e,r)})),o=Rn.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})},qn=function(t,n){var e,r=typeof n;return null==n||"boolean"===r?xn(n):("number"===r?Dn:"string"===r?(e=an(n))?(n=e,kn):zn:n instanceof an?kn:n instanceof Date?Un:Nn(n)?Tn:Array.isArray(n)?Sn:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Ln:Dn)(t,n)},Hn=0,Yn=0,jn=0,On=0,$n=0,In=0,Vn="object"==typeof performance&&performance.now?performance:Date,Xn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Bn(){return $n||(Xn(Zn),$n=Vn.now()+In)}function Zn(){$n=0}function Wn(){this._call=this._time=this._next=null}function Qn(t,n,e){var r=new Wn;return r.restart(t,n,e),r}function Jn(){$n=(On=Vn.now())+In,Hn=Yn=0;try{!function(){Bn(),++Hn;for(var t,n=Pn;n;)(t=$n-n._time)>=0&&n._call.call(null,t),n=n._next;--Hn}()}finally{Hn=0,function(){var t,n,e=Pn,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Pn=n);Fn=t,Kn(r)}(),$n=0}}function Gn(){var t=Vn.now(),n=t-On;n>1e3&&(In-=n,On=t)}function Kn(t){Hn||(Yn&&(Yn=clearTimeout(Yn)),t-$n>24?(t<1/0&&(Yn=setTimeout(Jn,t-Vn.now()-In)),jn&&(jn=clearInterval(jn))):(jn||(On=Vn.now(),jn=setInterval(Gn,1e3)),Hn=1,Xn(Jn)))}Wn.prototype=Qn.prototype={constructor:Wn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Bn():+e)+(null==n?0:+n),this._next||Fn===this||(Fn?Fn._next=this:Pn=this,Fn=this),this._call=t,this._time=e,Kn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kn())}};var te=function(t,n,e){var r=new Wn;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},ne=L("start","end","cancel","interrupt"),ee=[],re=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,c,f,h;if(1!==e.state)return a();for(l in i)if((h=i[l]).name===e.name){if(3===h.state)return te(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(te((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(s))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(f=e.tween.length),l=0,c=-1;l<f;++l)(h=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=h);r.length=c+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=5,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Qn((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:ne,tween:ee,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function ie(t,n){var e=ue(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function oe(t,n){var e=ue(t,n);if(e.state>3)throw new Error("too late; already running");return e}function ue(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ae,se,le,ce,fe=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},he=180/Math.PI,pe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},de=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*he,skewX:Math.atan(s)*he,scaleX:u,scaleY:a}};function ge(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:Dn(t,i)},{i:s-2,x:Dn(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Dn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Dn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Dn(t,e)},{i:a-2,x:Dn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var ve=ge((function(t){return"none"===t?pe:(ae||(ae=document.createElement("DIV"),se=document.documentElement,le=document.defaultView),ae.style.transform=t,t=le.getComputedStyle(se.appendChild(ae),null).getPropertyValue("transform"),se.removeChild(ae),t=t.slice(7,-1).split(","),de(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ye=ge((function(t){return null==t?pe:(ce||(ce=document.createElementNS("http://www.w3.org/2000/svg","g")),ce.setAttribute("transform",t),(t=ce.transform.baseVal.consolidate())?(t=t.matrix,de(t.a,t.b,t.c,t.d,t.e,t.f)):pe)}),", ",")",")");function me(t,n){var e,r;return function(){var i=oe(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function _e(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=oe(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function we(t,n,e){var r=t._id;return t.each((function(){var t=oe(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return ue(t,r).value[n]}}var xe=function(t,n){var e;return("number"==typeof n?Dn:n instanceof an?kn:(e=an(n))?(n=e,kn):zn)(t,n)};function be(t){return function(){this.removeAttribute(t)}}function Me(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ce(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}}function ke(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}function Ae(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}}function Te(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}function Ne(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Se(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Ue(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Se(t,i)),e}return i._value=n,i}function De(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Ne(t,i)),e}return i._value=n,i}function Le(t,n){return function(){ie(this,t).delay=+n.apply(this,arguments)}}function Ee(t,n){return n=+n,function(){ie(this,t).delay=n}}function Re(t,n){return function(){oe(this,t).duration=+n.apply(this,arguments)}}function Pe(t,n){return n=+n,function(){oe(this,t).duration=n}}function Fe(t,n){if("function"!=typeof n)throw new Error;return function(){oe(this,t).ease=n}}function ze(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?ie:oe;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var qe=Ot.prototype.constructor;function He(t){return function(){this.style.removeProperty(t)}}function Ye(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function je(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Ye(t,o,e)),r}return o._value=n,o}function Oe(t){return function(n){this.textContent=t.call(this,n)}}function $e(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Oe(r)),n}return r._value=t,r}var Ie=0;function Ve(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Xe(t){return Ot().transition(t)}function Be(){return++Ie}var Ze=Ot.prototype;Ve.prototype=Xe.prototype={constructor:Ve,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=R(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,s,l=r[u],c=l.length,f=o[u]=new Array(c),h=0;h<c;++h)(a=l[h])&&(s=t.call(a,a.__data__,h,l))&&("__data__"in a&&(s.__data__=a.__data__),f[h]=s,re(f[h],n,e,h,f,ue(a,e)));return new Ve(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=F(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,l=r[a],c=l.length,f=0;f<c;++f)if(s=l[f]){for(var h,p=t.call(s,s.__data__,f,l),d=ue(s,e),g=0,v=p.length;g<v;++g)(h=p[g])&&re(h,n,e,g,p,d);o.push(p),u.push(s)}return new Ve(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=z(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new Ve(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new Ve(u,this._parents,this._name,this._id)},selection:function(){return new qe(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Be(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=ue(u,n);re(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ve(r,this._parents,t,e)},call:Ze.call,nodes:Ze.nodes,node:Ze.node,size:Ze.size,empty:Ze.empty,each:Ze.each,on:function(t,n){var e=this._id;return arguments.length<2?ue(this.node(),e).on.on(t):this.each(ze(e,t,n))},attr:function(t,n){var e=V(t),r="transform"===e?ye:xe;return this.attrTween(t,"function"==typeof n?(e.local?Te:Ae)(e,r,we(this,"attr."+t,n)):null==n?(e.local?Me:be)(e):(e.local?ke:Ce)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=V(t);return this.tween(e,(r.local?Ue:De)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?ve:xe;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=et(this,t),u=(this.style.removeProperty(t),et(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,He(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=et(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=et(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,we(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=oe(this,t),l=s.on,c=null==s.value[u]?o||(o=He(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=et(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,je(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(we(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,$e(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ue(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?me:_e)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Le:Ee)(n,t)):ue(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Re:Pe)(n,t)):ue(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(Fe(n,t)):ue(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each((function(){var e=oe(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n}))}))}};var We={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Qe(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return We.time=Bn(),We;return e}Ot.prototype.interrupt=function(t){return this.each((function(){fe(this,t)}))},Ot.prototype.transition=function(t){var n,e;t instanceof Ve?(n=t._id,t=t._name):(n=Be(),(e=We).time=Bn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)(u=a[l])&&re(u,t,n,l,a,e||Qe(u,n));return new Ve(r,this._parents,t,n)};function Je(t){return[+t[0],+t[1]]}function Ge(t){return[Je(t[0]),Je(t[1])]}["w","e"].map(Ke),["n","s"].map(Ke),["n","w","e","s","nw","ne","sw","se"].map(Ke);function Ke(t){return{type:t}}Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var tr=Math.PI,nr=2*tr,er=nr-1e-6;function rr(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ir(){return new rr}rr.prototype=ir.prototype={constructor:rr,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,u=this._y1,a=e-t,s=r-n,l=o-t,c=u-n,f=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(f>1e-6)if(Math.abs(c*a-s*l)>1e-6&&i){var h=e-o,p=r-u,d=a*a+s*s,g=h*h+p*p,v=Math.sqrt(d),y=Math.sqrt(f),m=i*Math.tan((tr-Math.acos((d+f-g)/(2*v*y)))/2),_=m/y,w=m/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(n+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>l*p)+","+(this._x1=t+w*a)+","+(this._y1=n+w*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var u=(e=+e)*Math.cos(r),a=e*Math.sin(r),s=t+u,l=n+a,c=1^o,f=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+s+","+l:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+s+","+l),e&&(f<0&&(f=f%nr+nr),f>er?this._+="A"+e+","+e+",0,1,"+c+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+c+","+(this._x1=s)+","+(this._y1=l):f>1e-6&&(this._+="A"+e+","+e+",0,"+ +(f>=tr)+","+c+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var or=ir;function ur(){}function ar(t,n){var e=new ur;if(t instanceof ur)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}ur.prototype=ar.prototype={constructor:ur,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var sr=ar;function lr(){}var cr=sr.prototype;function fr(t,n){var e=new lr;if(t instanceof lr)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}lr.prototype=fr.prototype={constructor:lr,has:cr.has,add:function(t){return this["$"+(t+="")]=t,this},remove:cr.remove,clear:cr.clear,values:cr.keys,size:cr.size,empty:cr.empty,each:cr.each};Array.prototype.slice;var hr={},pr={};function dr(t){return new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'})).join(",")+"}")}function gr(t){var n=Object.create(null),e=[];return t.forEach((function(t){for(var r in t)r in n||e.push(n[r]=r)})),e}function vr(t,n){var e=t+"",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function yr(t){var n,e=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((n=t.getUTCFullYear())<0?"-"+vr(-n,6):n>9999?"+"+vr(n,6):vr(n,4))+"-"+vr(t.getUTCMonth()+1,2)+"-"+vr(t.getUTCDate(),2)+(o?"T"+vr(e,2)+":"+vr(r,2)+":"+vr(i,2)+"."+vr(o,3)+"Z":i?"T"+vr(e,2)+":"+vr(r,2)+":"+vr(i,2)+"Z":r||e?"T"+vr(e,2)+":"+vr(r,2)+"Z":"")}var mr=function(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,u=0,a=0,s=o<=0,l=!1;function c(){if(s)return pr;if(l)return l=!1,hr;var n,r,i=u;if(34===t.charCodeAt(i)){for(;u++<o&&34!==t.charCodeAt(u)||34===t.charCodeAt(++u););return(n=u)>=o?s=!0:10===(r=t.charCodeAt(u++))?l=!0:13===r&&(l=!0,10===t.charCodeAt(u)&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u<o;){if(10===(r=t.charCodeAt(n=u++)))l=!0;else if(13===r)l=!0,10===t.charCodeAt(u)&&++u;else if(r!==e)continue;return t.slice(i,n)}return s=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=c())!==pr;){for(var f=[];r!==hr&&r!==pr;)f.push(r),r=c();n&&null==(f=n(f,a++))||i.push(f)}return i}function i(n,e){return n.map((function(n){return e.map((function(t){return u(n[t])})).join(t)}))}function o(n){return n.map(u).join(t)}function u(t){return null==t?"":t instanceof Date?yr(t):n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,i,o=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=dr(t);return function(r,i){return n(e(r),i,t)}}(t,n):dr(t)}));return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=gr(n)),[e.map(u).join(t)].concat(i(n,e)).join("\n")},formatBody:function(t,n){return null==n&&(n=gr(t)),i(t,n).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:u}},_r=mr(","),wr=_r.parse,xr=(_r.parseRows,_r.format,_r.formatBody,_r.formatRows,_r.formatRow,_r.formatValue,mr("\t")),br=xr.parse;xr.parseRows,xr.format,xr.formatBody,xr.formatRows,xr.formatRow,xr.formatValue;function Mr(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Cr=function(t,n){return fetch(t,n).then(Mr)};function kr(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),Cr(n,e).then((function(n){return t(n,r)}))}}kr(wr),kr(br);function Ar(t){return function(n,e){return Cr(n,e).then((function(n){return(new DOMParser).parseFromString(n,t)}))}}Ar("application/xml"),Ar("text/html"),Ar("image/svg+xml");function Tr(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,s,l,c,f,h,p=t._root,d={data:r},g=t._x0,v=t._y0,y=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((l=n>=(o=(g+y)/2))?g=o:y=o,(c=e>=(u=(v+m)/2))?v=u:m=u,i=p,!(p=p[f=c<<1|l]))return i[f]=d,t;if(a=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===a&&e===s)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(l=n>=(o=(g+y)/2))?g=o:y=o,(c=e>=(u=(v+m)/2))?v=u:m=u}while((f=c<<1|l)==(h=(s>=u)<<1|a>=o));return i[h]=p,i[f]=d,t}var Nr=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function Sr(t){return t[0]}function Ur(t){return t[1]}function Dr(t,n,e){var r=new Lr(null==n?Sr:n,null==e?Ur:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Lr(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Er(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Rr=Dr.prototype=Lr.prototype;Rr.copy=function(){var t,n,e=new Lr(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Er(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Er(n));return e},Rr.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Tr(this.cover(n,e),n,e,t)},Rr.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),s=1/0,l=1/0,c=-1/0,f=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(u[e]=r,a[e]=i,r<s&&(s=r),r>c&&(c=r),i<l&&(l=i),i>f&&(f=i));if(s>c||l>f)return this;for(this.cover(s,l).cover(c,f),e=0;e<o;++e)Tr(this,u[e],a[e],t[e]);return this},Rr.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var u,a,s=i-e,l=this._root;e>t||t>=i||r>n||n>=o;)switch(a=(n<r)<<1|t<e,(u=new Array(4))[a]=l,l=u,s*=2,a){case 0:i=e+s,o=r+s;break;case 1:e=i-s,o=r+s;break;case 2:i=e+s,r=o-s;break;case 3:e=i-s,r=o-s}this._root&&this._root.length&&(this._root=l)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Rr.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Rr.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]]},Rr.find=function(t,n,e){var r,i,o,u,a,s,l,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new Nr(g,c,f,h,p)),null==e?e=1/0:(c=t-e,f=n-e,h=t+e,p=n+e,e*=e);s=d.pop();)if(!(!(g=s.node)||(i=s.x0)>h||(o=s.y0)>p||(u=s.x1)<c||(a=s.y1)<f))if(g.length){var v=(i+u)/2,y=(o+a)/2;d.push(new Nr(g[3],v,y,u,a),new Nr(g[2],i,y,v,a),new Nr(g[1],v,o,u,y),new Nr(g[0],i,o,v,y)),(l=(n>=y)<<1|t>=v)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-l],d[d.length-1-l]=s)}else{var m=t-+this._x.call(null,g.data),_=n-+this._y.call(null,g.data),w=m*m+_*_;if(w<e){var x=Math.sqrt(e=w);c=t-x,f=n-x,h=t+x,p=n+x,r=g.data}}return r},Rr.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,i,o,u,a,s,l,c,f,h,p=this._root,d=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((l=o>=(a=(d+v)/2))?d=a:v=a,(c=u>=(s=(g+y)/2))?g=s:y=s,n=p,!(p=p[f=c<<1|l]))return this;if(!p.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},Rr.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Rr.root=function(){return this._root},Rr.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},Rr.visit=function(t){var n,e,r,i,o,u,a=[],s=this._root;for(s&&a.push(new Nr(s,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(s=n.node,r=n.x0,i=n.y0,o=n.x1,u=n.y1)&&s.length){var l=(r+o)/2,c=(i+u)/2;(e=s[3])&&a.push(new Nr(e,l,c,o,u)),(e=s[2])&&a.push(new Nr(e,r,c,l,u)),(e=s[1])&&a.push(new Nr(e,l,i,o,c)),(e=s[0])&&a.push(new Nr(e,r,i,l,c))}return this},Rr.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Nr(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,u=n.x0,a=n.y0,s=n.x1,l=n.y1,c=(u+s)/2,f=(a+l)/2;(o=i[0])&&e.push(new Nr(o,u,a,c,f)),(o=i[1])&&e.push(new Nr(o,c,a,s,f)),(o=i[2])&&e.push(new Nr(o,u,f,c,l)),(o=i[3])&&e.push(new Nr(o,c,f,s,l))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Rr.x=function(t){return arguments.length?(this._x=t,this):this._x},Rr.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var Pr=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},Fr=function(t){return(t=Pr(Math.abs(t)))?t[1]:NaN},zr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qr(t){if(!(n=zr.exec(t)))throw new Error("invalid format: "+t);var n;return new Hr({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Hr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}qr.prototype=Hr.prototype,Hr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Yr,jr,Or,$r,Ir=function(t,n){var e=Pr(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Vr={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Ir(100*t,n)},r:Ir,s:function(t,n){var e=Pr(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Yr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Pr(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Xr=function(t){return t},Br=Array.prototype.map,Zr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];jr=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?Xr:(n=Br.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],u=0,a=n[0],s=0;i>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),o.push(t.substring(i-=a,i+a)),!((s+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Xr:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(Br.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var n=(t=qr(t)).fill,e=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,v=t.precision,y=t.trim,m=t.type;"n"===m?(g=!0,m="g"):Vr[m]||(void 0===v&&(v=12),y=!0,m="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",w="$"===h?o:/[%p]/.test(m)?s:"",x=Vr[m],b=/[defgprs%]/.test(m);function M(t){var i,o,s,h=_,M=w;if("c"===m)M=x(t)+M,t="";else{var C=(t=+t)<0;if(t=isNaN(t)?c:x(Math.abs(t),v),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),C&&0==+t&&(C=!1),h=(C?"("===f?f:l:"-"===f||"("===f?"":f)+h,M=("s"===m?Zr[8+Yr/3]:"")+M+(C&&"("===f?")":""),b)for(i=-1,o=t.length;++i<o;)if(48>(s=t.charCodeAt(i))||s>57){M=(46===s?u+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var k=h.length+t.length+M.length,A=k<d?new Array(d-k+1).join(n):"";switch(g&&p&&(t=r(A+t,A.length?d-M.length:1/0),A=""),e){case"<":t=h+t+M+A;break;case"=":t=h+A+t+M;break;case"^":t=A.slice(0,k=A.length>>1)+h+t+M+A.slice(k);break;default:t=A+h+t+M}return a(t)}return v=void 0===v?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),M.toString=function(){return t+""},M}return{format:f,formatPrefix:function(t,n){var e=f(((t=qr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fr(n)/3))),i=Math.pow(10,-r),o=Zr[8+r/3];return function(t){return e(i*t)+o}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Or=jr.format,$r=jr.formatPrefix;var Wr=function(){return Math.random()},Qr=(function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Wr),function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Wr)),Jr=(function t(n){function e(){var t=Qr.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Wr),function t(n){function e(t){return function(){for(var e=0,r=0;r<t;++r)e+=n();return e}}return e.source=t,e}(Wr));(function t(n){function e(t){var e=Jr.source(n)(t);return function(){return e()/t}}return e.source=t,e})(Wr),function t(n){function e(t){return function(){return-Math.log(1-n())/t}}return e.source=t,e}(Wr);function Gr(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}var Kr=Array.prototype,ti=Kr.map,ni=Kr.slice,ei={name:"implicit"};function ri(){var t=sr(),n=[],e=[],r=ei;function i(i){var o=i+"",u=t.get(o);if(!u){if(r!==ei)return r;t.set(o,u=n.push(i))}return e[(u-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=sr();for(var r,o,u=-1,a=e.length;++u<a;)t.has(o=(r=e[u])+"")||t.set(o,n.push(r));return i},i.range=function(t){return arguments.length?(e=ni.call(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ri(n,e).unknown(r)},Gr.apply(i,arguments),i}var ii=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}},oi=function(t){return+t},ui=[0,1];function ai(t){return t}function si(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function li(t){var n,e=t[0],r=t[t.length-1];return e>r&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function ci(t,n,e){var r=t[0],i=t[1],o=n[0],u=n[1];return i<r?(r=si(i,r),o=e(u,o)):(r=si(r,i),o=e(o,u)),function(t){return o(r(t))}}function fi(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),u=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<r;)i[u]=si(t[u],t[u+1]),o[u]=e(n[u],n[u+1]);return function(n){var e=a(t,n,1,r)-1;return o[e](i[e](n))}}function hi(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function pi(){var t,n,e,r,i,o,u=ui,a=ui,s=qn,l=ai;function c(){return r=Math.min(u.length,a.length)>2?fi:ci,i=o=null,f}function f(n){return isNaN(n=+n)?e:(i||(i=r(u.map(t),a,s)))(t(l(n)))}return f.invert=function(e){return l(n((o||(o=r(a,u.map(t),Dn)))(e)))},f.domain=function(t){return arguments.length?(u=ti.call(t,oi),l===ai||(l=li(u)),c()):u.slice()},f.range=function(t){return arguments.length?(a=ni.call(t),c()):a.slice()},f.rangeRound=function(t){return a=ni.call(t),s=ii,c()},f.clamp=function(t){return arguments.length?(l=t?li(u):ai,f):l!==ai},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(e=t,f):e},function(e,r){return t=e,n=r,c()}}function di(t,n){return pi()(t,n)}var gi=function(t,n,e,r){var i,o=d(t,n,e);switch((r=qr(null==r?",f":r)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fr(n)/3)))-Fr(Math.abs(t)))}(o,u))||(r.precision=i),$r(r,u);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Fr(n)-Fr(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Fr(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Or(r)};function vi(t){var n=t.domain;return t.ticks=function(t){var e=n();return h(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return gi(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,u=i.length-1,a=i[o],s=i[u];return s<a&&(r=a,a=s,s=r,r=o,o=u,u=r),(r=p(a,s,e))>0?r=p(a=Math.floor(a/r)*r,s=Math.ceil(s/r)*r,e):r<0&&(r=p(a=Math.ceil(a*r)/r,s=Math.floor(s*r)/r,e)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(s/r)*r,n(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(s*r)/r,n(i)),t},t}function yi(){var t=di(ai,ai);return t.copy=function(){return hi(t,yi())},Gr.apply(t,arguments),vi(t)}var mi=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),t[r]=n.floor(o),t[i]=n.ceil(u),t};function _i(t){return Math.log(t)}function wi(t){return Math.exp(t)}function xi(t){return-Math.log(-t)}function bi(t){return-Math.exp(-t)}function Mi(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ci(t){return function(n){return-t(-n)}}function ki(t){var n,e,r=t(_i,wi),i=r.domain,o=10;function u(){return n=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}(o),e=function(t){return 10===t?Mi:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}(o),i()[0]<0?(n=Ci(n),e=Ci(e),t(xi,bi)):t(_i,wi),r}return r.base=function(t){return arguments.length?(o=+t,u()):o},r.domain=function(t){return arguments.length?(i(t),u()):i()},r.ticks=function(t){var r,u=i(),a=u[0],s=u[u.length-1];(r=s<a)&&(p=a,a=s,s=p);var l,c,f,p=n(a),d=n(s),g=null==t?10:+t,v=[];if(!(o%1)&&d-p<g){if(p=Math.round(p)-1,d=Math.round(d)+1,a>0){for(;p<d;++p)for(c=1,l=e(p);c<o;++c)if(!((f=l*c)<a)){if(f>s)break;v.push(f)}}else for(;p<d;++p)for(c=o-1,l=e(p);c>=1;--c)if(!((f=l*c)<a)){if(f>s)break;v.push(f)}}else v=h(p,d,Math.min(d-p,g)).map(e);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=Or(i)),t===1/0)return i;null==t&&(t=10);var u=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/e(Math.round(n(t)));return r*o<o-.5&&(r*=o),r<=u?i(t):""}},r.nice=function(){return i(mi(i(),{floor:function(t){return e(Math.floor(n(t)))},ceil:function(t){return e(Math.ceil(n(t)))}}))},r}function Ai(){var t=ki(pi()).domain([1,10]);return t.copy=function(){return hi(t,Ai()).base(t.base())},Gr.apply(t,arguments),t}var Ti=new Date,Ni=new Date;function Si(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var u,a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u<e&&e<r);return a},i.filter=function(e){return Si((function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return Ti.setTime(+n),Ni.setTime(+r),t(Ti),t(Ni),Math.floor(e(Ti,Ni))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var Ui=Si((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Ui.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Si((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var Di=Ui,Li=(Ui.range,Si((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));Li.range;function Ei(t){return Si((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Ri=Ei(0),Pi=Ei(1),Fi=Ei(2),zi=Ei(3),qi=Ei(4),Hi=Ei(5),Yi=Ei(6),ji=(Ri.range,Pi.range,Fi.range,zi.range,qi.range,Hi.range,Yi.range,Si((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}))),Oi=ji,$i=(ji.range,Si((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()}))),Ii=($i.range,Si((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getMinutes()}))),Vi=(Ii.range,Si((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()}))),Xi=(Vi.range,Si((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t})));Xi.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Si((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Xi:null};Xi.range;function Bi(t){return Si((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}var Zi=Bi(0),Wi=Bi(1),Qi=Bi(2),Ji=Bi(3),Gi=Bi(4),Ki=Bi(5),to=Bi(6),no=(Zi.range,Wi.range,Qi.range,Ji.range,Gi.range,Ki.range,to.range,Si((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1}))),eo=no,ro=(no.range,Si((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));ro.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Si((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var io=ro;ro.range;function oo(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function uo(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ao(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}var so,lo={"-":"",_:" ",0:"0"},co=/^\s*\d+/,fo=/^%/,ho=/[\\^$*+?|[\]().{}]/g;function po(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function go(t){return t.replace(ho,"\\$&")}function vo(t){return new RegExp("^(?:"+t.map(go).join("|")+")","i")}function yo(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function mo(t,n,e){var r=co.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function _o(t,n,e){var r=co.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function wo(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function xo(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function bo(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function Mo(t,n,e){var r=co.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Co(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function ko(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function Ao(t,n,e){var r=co.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function To(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function No(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function So(t,n,e){var r=co.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Uo(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Do(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Lo(t,n,e){var r=co.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function Eo(t,n,e){var r=co.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Ro(t,n,e){var r=co.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Po(t,n,e){var r=fo.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Fo(t,n,e){var r=co.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function zo(t,n,e){var r=co.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function qo(t,n){return po(t.getDate(),n,2)}function Ho(t,n){return po(t.getHours(),n,2)}function Yo(t,n){return po(t.getHours()%12||12,n,2)}function jo(t,n){return po(1+Oi.count(Di(t),t),n,3)}function Oo(t,n){return po(t.getMilliseconds(),n,3)}function $o(t,n){return Oo(t,n)+"000"}function Io(t,n){return po(t.getMonth()+1,n,2)}function Vo(t,n){return po(t.getMinutes(),n,2)}function Xo(t,n){return po(t.getSeconds(),n,2)}function Bo(t){var n=t.getDay();return 0===n?7:n}function Zo(t,n){return po(Ri.count(Di(t)-1,t),n,2)}function Wo(t,n){var e=t.getDay();return t=e>=4||0===e?qi(t):qi.ceil(t),po(qi.count(Di(t),t)+(4===Di(t).getDay()),n,2)}function Qo(t){return t.getDay()}function Jo(t,n){return po(Pi.count(Di(t)-1,t),n,2)}function Go(t,n){return po(t.getFullYear()%100,n,2)}function Ko(t,n){return po(t.getFullYear()%1e4,n,4)}function tu(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+po(n/60|0,"0",2)+po(n%60,"0",2)}function nu(t,n){return po(t.getUTCDate(),n,2)}function eu(t,n){return po(t.getUTCHours(),n,2)}function ru(t,n){return po(t.getUTCHours()%12||12,n,2)}function iu(t,n){return po(1+eo.count(io(t),t),n,3)}function ou(t,n){return po(t.getUTCMilliseconds(),n,3)}function uu(t,n){return ou(t,n)+"000"}function au(t,n){return po(t.getUTCMonth()+1,n,2)}function su(t,n){return po(t.getUTCMinutes(),n,2)}function lu(t,n){return po(t.getUTCSeconds(),n,2)}function cu(t){var n=t.getUTCDay();return 0===n?7:n}function fu(t,n){return po(Zi.count(io(t)-1,t),n,2)}function hu(t,n){var e=t.getUTCDay();return t=e>=4||0===e?Gi(t):Gi.ceil(t),po(Gi.count(io(t),t)+(4===io(t).getUTCDay()),n,2)}function pu(t){return t.getUTCDay()}function du(t,n){return po(Wi.count(io(t)-1,t),n,2)}function gu(t,n){return po(t.getUTCFullYear()%100,n,2)}function vu(t,n){return po(t.getUTCFullYear()%1e4,n,4)}function yu(){return"+0000"}function mu(){return"%"}function _u(t){return+t}function wu(t){return Math.floor(+t/1e3)}!function(t){so=function(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,s=t.shortMonths,l=vo(i),c=yo(i),f=vo(o),h=yo(o),p=vo(u),d=yo(u),g=vo(a),v=yo(a),y=vo(s),m=yo(s),_={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:qo,e:qo,f:$o,H:Ho,I:Yo,j:jo,L:Oo,m:Io,M:Vo,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:_u,s:wu,S:Xo,u:Bo,U:Zo,V:Wo,w:Qo,W:Jo,x:null,X:null,y:Go,Y:Ko,Z:tu,"%":mu},w={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:nu,e:nu,f:uu,H:eu,I:ru,j:iu,L:ou,m:au,M:su,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:_u,s:wu,S:lu,u:cu,U:fu,V:hu,w:pu,W:du,x:null,X:null,y:gu,Y:vu,Z:yu,"%":mu},x={a:function(t,n,e){var r=p.exec(n.slice(e));return r?(t.w=d[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=m[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=v[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return C(t,n,e,r)},d:No,e:No,f:Ro,H:Uo,I:Uo,j:So,L:Eo,m:To,M:Do,p:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.p=c[r[0].toLowerCase()],e+r[0].length):-1},q:Ao,Q:Fo,s:zo,S:Lo,u:_o,U:wo,V:xo,w:mo,W:bo,x:function(t,n,r){return C(t,e,n,r)},X:function(t,n,e){return C(t,r,n,e)},y:Co,Y:Mo,Z:ko,"%":Po};function b(t,n){return function(e){var r,i,o,u=[],a=-1,s=0,l=t.length;for(e instanceof Date||(e=new Date(+e));++a<l;)37===t.charCodeAt(a)&&(u.push(t.slice(s,a)),null!=(i=lo[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),u.push(r),s=a+1);return u.push(t.slice(s,a)),u.join("")}}function M(t,n){return function(e){var r,i,o=ao(1900,void 0,1);if(C(o,t,e+="",0)!=e.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=uo(ao(o.y,0,1))).getUTCDay(),r=i>4||0===i?Wi.ceil(r):Wi(r),r=eo.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=oo(ao(o.y,0,1))).getDay(),r=i>4||0===i?Pi.ceil(r):Pi(r),r=Oi.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?uo(ao(o.y,0,1)).getUTCDay():oo(ao(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,uo(o)):oo(o)}}function C(t,n,e,r){for(var i,o,u=0,a=n.length,s=e.length;u<a;){if(r>=s)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=x[i in lo?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return _.x=b(e,_),_.X=b(r,_),_.c=b(n,_),w.x=b(e,w),w.X=b(r,w),w.c=b(n,w),{format:function(t){var n=b(t+="",_);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=b(t+="",w);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}(t),so.format,so.parse,so.utcFormat,so.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xu=Si((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),bu=(xu.range,Si((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()}))),Mu=(bu.range,Si((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getUTCMinutes()})));Mu.range;var Cu=function(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]="#"+t.slice(6*r,6*++r);return e}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ku=function(t){return"string"==typeof t?new Yt([document.querySelectorAll(t)],[document.documentElement]):new Yt([null==t?[]:t],Ht)},Au=function(t){return function(){return t}};function Tu(t){this._context=t}Tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Nu=function(t){return new Tu(t)};function Su(t){return t[0]}function Uu(t){return t[1]}var Du=function(){var t=Su,n=Uu,e=Au(!0),r=null,i=Nu,o=null;function u(u){var a,s,l,c=u.length,f=!1;for(null==r&&(o=i(l=or())),a=0;a<=c;++a)!(a<c&&e(s=u[a],a,u))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,a,u),+n(s,a,u));if(l)return o=null,l+""||null}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Au(+n),u):t},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Au(+t),u):n},u.defined=function(t){return arguments.length?(e="function"==typeof t?t:Au(!!t),u):e},u.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),u):i},u.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),u):r},u};function Lu(){this._=null}function Eu(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ru(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function Pu(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function Fu(t){for(;t.L;)t=t.L;return t}Lu.prototype={constructor:Lu,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=Fu(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(Ru(this,e),e=(t=e).U),e.C=!1,r.C=!0,Pu(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Pu(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ru(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,u=t.R;if(e=o?u?Fu(u):o:u,i?i.L===t?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==u?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=u,u.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,Ru(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,Pu(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Ru(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Pu(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,Ru(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Pu(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zu=Lu;function qu(t,n,e,r){var i=[null,null],o=sa.push(i)-1;return i.left=t,i.right=n,e&&Yu(i,t,n,e),r&&Yu(i,n,t,r),ua[t.index].halfedges.push(o),ua[n.index].halfedges.push(o),i}function Hu(t,n,e){var r=[n,e];return r.left=t,r}function Yu(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function ju(t,n,e,r,i){var o,u=t[0],a=t[1],s=u[0],l=u[1],c=0,f=1,h=a[0]-s,p=a[1]-l;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>c&&(c=o)}if(o=i-l,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<f&&(f=o)}return!(c>0||f<1)||(c>0&&(t[0]=[s+c*h,l+c*p]),f<1&&(t[1]=[s+f*h,l+f*p]),!0)}}}}}function Ou(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,s=t[0],l=t.left,c=t.right,f=l[0],h=l[1],p=c[0],d=c[1],g=(f+p)/2,v=(h+d)/2;if(d===h){if(g<n||g>=r)return;if(f>p){if(s){if(s[1]>=i)return}else s=[g,e];o=[g,i]}else{if(s){if(s[1]<e)return}else s=[g,i];o=[g,e]}}else if(a=v-(u=(f-p)/(d-h))*g,u<-1||u>1)if(f>p){if(s){if(s[1]>=i)return}else s=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(s){if(s[1]<e)return}else s=[(i-a)/u,i];o=[(e-a)/u,e]}else if(h<d){if(s){if(s[0]>=r)return}else s=[n,u*n+a];o=[r,u*r+a]}else{if(s){if(s[0]<n)return}else s=[r,u*r+a];o=[n,u*n+a]}return t[0]=s,t[1]=o,!0}function $u(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Iu(t,n){return n[+(n.left!==t.site)]}function Vu(t,n){return n[+(n.left===t.site)]}var Xu,Bu=[];function Zu(){Eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Wu(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var u=i[0],a=i[1],s=r[0]-u,l=r[1]-a,c=o[0]-u,f=o[1]-a,h=2*(s*f-l*c);if(!(h>=-ca)){var p=s*s+l*l,d=c*c+f*f,g=(f*p-l*d)/h,v=(s*d-c*p)/h,y=Bu.pop()||new Zu;y.arc=t,y.site=i,y.x=g+u,y.y=(y.cy=v+a)+Math.sqrt(g*g+v*v),t.circle=y;for(var m=null,_=aa._;_;)if(y.y<_.y||y.y===_.y&&y.x<=_.x){if(!_.L){m=_.P;break}_=_.L}else{if(!_.R){m=_;break}_=_.R}aa.insert(m,y),m||(Xu=y)}}}}function Qu(t){var n=t.circle;n&&(n.P||(Xu=n.N),aa.remove(n),Bu.push(n),Eu(n),t.circle=null)}var Ju=[];function Gu(){Eu(this),this.edge=this.site=this.circle=null}function Ku(t){var n=Ju.pop()||new Gu;return n.site=t,n}function ta(t){Qu(t),oa.remove(t),Ju.push(t),Eu(t)}function na(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],o=t.P,u=t.N,a=[t];ta(t);for(var s=o;s.circle&&Math.abs(e-s.circle.x)<la&&Math.abs(r-s.circle.cy)<la;)o=s.P,a.unshift(s),ta(s),s=o;a.unshift(s),Qu(s);for(var l=u;l.circle&&Math.abs(e-l.circle.x)<la&&Math.abs(r-l.circle.cy)<la;)u=l.N,a.push(l),ta(l),l=u;a.push(l),Qu(l);var c,f=a.length;for(c=1;c<f;++c)l=a[c],s=a[c-1],Yu(l.edge,s.site,l.site,i);s=a[0],(l=a[f-1]).edge=qu(s.site,l.site,null,i),Wu(s),Wu(l)}function ea(t){for(var n,e,r,i,o=t[0],u=t[1],a=oa._;a;)if((r=ra(a,u)-o)>la)a=a.L;else{if(!((i=o-ia(a,u))>la)){r>-la?(n=a.P,e=a):i>-la?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){ua[t.index]={site:t,halfedges:[]}}(t);var s=Ku(t);if(oa.insert(n,s),n||e){if(n===e)return Qu(n),e=Ku(n.site),oa.insert(s,e),s.edge=e.edge=qu(n.site,s.site),Wu(n),void Wu(e);if(e){Qu(n),Qu(e);var l=n.site,c=l[0],f=l[1],h=t[0]-c,p=t[1]-f,d=e.site,g=d[0]-c,v=d[1]-f,y=2*(h*v-p*g),m=h*h+p*p,_=g*g+v*v,w=[(v*m-p*_)/y+c,(h*_-g*m)/y+f];Yu(e.edge,l,d,w),s.edge=qu(l,t,null,w),e.edge=qu(t,d,null,w),Wu(n),Wu(e)}else s.edge=qu(n.site,s.site)}}function ra(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;var a=(e=u.site)[0],s=e[1],l=s-n;if(!l)return a;var c=a-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+i-o/2)))/f+r:(r+a)/2}function ia(t,n){var e=t.N;if(e)return ra(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var oa,ua,aa,sa,la=1e-6,ca=1e-12;function fa(t,n){return n[1]-t[1]||n[0]-t[0]}function ha(t,n){var e,r,i,o=t.sort(fa).pop();for(sa=[],ua=new Array(t.length),oa=new zu,aa=new zu;;)if(i=Xu,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===e&&o[1]===r||(ea(o),e=o[0],r=o[1]),o=t.pop();else{if(!i)break;na(i.arc)}if(function(){for(var t,n,e,r,i=0,o=ua.length;i<o;++i)if((t=ua[i])&&(r=(n=t.halfedges).length)){var u=new Array(r),a=new Array(r);for(e=0;e<r;++e)u[e]=e,a[e]=$u(t,sa[n[e]]);for(u.sort((function(t,n){return a[n]-a[t]})),e=0;e<r;++e)a[e]=n[u[e]];for(e=0;e<r;++e)n[e]=a[e]}}(),n){var u=+n[0][0],a=+n[0][1],s=+n[1][0],l=+n[1][1];!function(t,n,e,r){for(var i,o=sa.length;o--;)Ou(i=sa[o],t,n,e,r)&&ju(i,t,n,e,r)&&(Math.abs(i[0][0]-i[1][0])>la||Math.abs(i[0][1]-i[1][1])>la)||delete sa[o]}(u,a,s,l),function(t,n,e,r){var i,o,u,a,s,l,c,f,h,p,d,g,v=ua.length,y=!0;for(i=0;i<v;++i)if(o=ua[i]){for(u=o.site,a=(s=o.halfedges).length;a--;)sa[s[a]]||s.splice(a,1);for(a=0,l=s.length;a<l;)d=(p=Vu(o,sa[s[a]]))[0],g=p[1],f=(c=Iu(o,sa[s[++a%l]]))[0],h=c[1],(Math.abs(d-f)>la||Math.abs(g-h)>la)&&(s.splice(a,0,sa.push(Hu(u,p,Math.abs(d-t)<la&&r-g>la?[t,Math.abs(f-t)<la?h:r]:Math.abs(g-r)<la&&e-d>la?[Math.abs(h-r)<la?f:e,r]:Math.abs(d-e)<la&&g-n>la?[e,Math.abs(f-e)<la?h:n]:Math.abs(g-n)<la&&d-t>la?[Math.abs(h-n)<la?f:t,n]:null))-1),++l);l&&(y=!1)}if(y){var m,_,w,x=1/0;for(i=0,y=null;i<v;++i)(o=ua[i])&&(w=(m=(u=o.site)[0]-t)*m+(_=u[1]-n)*_)<x&&(x=w,y=o);if(y){var b=[t,n],M=[t,r],C=[e,r],k=[e,n];y.halfedges.push(sa.push(Hu(u=y.site,b,M))-1,sa.push(Hu(u,M,C))-1,sa.push(Hu(u,C,k))-1,sa.push(Hu(u,k,b))-1)}}for(i=0;i<v;++i)(o=ua[i])&&(o.halfedges.length||delete ua[i])}(u,a,s,l)}this.edges=sa,this.cells=ua,oa=aa=sa=ua=null}ha.prototype={constructor:ha,polygons:function(){var t=this.edges;return this.cells.map((function(n){var e=n.halfedges.map((function(e){return Iu(n,t[e])}));return e.data=n.site.data,e}))},triangles:function(){var t=[],n=this.edges;return this.cells.forEach((function(e,r){if(o=(i=e.halfedges).length)for(var i,o,u,a,s,l,c=e.site,f=-1,h=n[i[o-1]],p=h.left===c?h.right:h.left;++f<o;)u=p,p=(h=n[i[f]]).left===c?h.right:h.left,u&&p&&r<u.index&&r<p.index&&(s=u,l=p,((a=c)[0]-l[0])*(s[1]-a[1])-(a[0]-s[0])*(l[1]-a[1])<0)&&t.push([c.data,u.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,n,e){for(var r,i,o=this,u=o._found||0,a=o.cells.length;!(i=o.cells[u]);)if(++u>=a)return null;var s=t-i.site[0],l=n-i.site[1],c=s*s+l*l;do{i=o.cells[r=u],u=null,i.halfedges.forEach((function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var s=t-a[0],l=n-a[1],f=s*s+l*l;f<c&&(c=f,u=a.index)}}))}while(null!==u);return o._found=r,null==e||c<=e*e?i.site:null}};Math.SQRT2;function pa(t,n,e){this.k=t,this.x=n,this.y=e}pa.prototype={constructor:pa,scale:function(t){return 1===t?this:new pa(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new pa(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new pa(1,0,0);pa.prototype;function da(t,n){return t.each((function(){var t=n.apply(this,arguments),e=$t(this);for(var r in t)e.attr(r,t[r])}))}function ga(t,n){for(var e in n)t.attr(e,n[e]);return t}function va(t,n,e){return t.each((function(){var t=n.apply(this,arguments),r=$t(this);for(var i in t)r.style(i,t[i],e)}))}function ya(t,n,e){for(var r in n)t.style(r,n[r],e);return t}function ma(t,n){return t.each((function(){var t=n.apply(this,arguments),e=$t(this);for(var r in t)e.property(r,t[r])}))}function _a(t,n){for(var e in n)t.property(e,n[e]);return t}function wa(t,n){return t.each((function(){var e=n.apply(this,arguments),r=$t(this).transition(t);for(var i in e)r.attr(i,e[i])}))}function xa(t,n){for(var e in n)t.attr(e,n[e]);return t}function ba(t,n,e){return t.each((function(){var r=n.apply(this,arguments),i=$t(this).transition(t);for(var o in r)i.style(o,r[o],e)}))}function Ma(t,n,e){for(var r in n)t.style(r,n[r],e);return t}Ot.prototype.attrs=function(t){return("function"==typeof t?da:ga)(this,t)},Ot.prototype.styles=function(t,n){return("function"==typeof t?va:ya)(this,t,null==n?"":n)},Ot.prototype.properties=function(t){return("function"==typeof t?ma:_a)(this,t)},Xe.prototype.attrs=function(t){return("function"==typeof t?wa:xa)(this,t)},Xe.prototype.styles=function(t,n){return("function"==typeof t?ba:Ma)(this,t,null==n?"":n)};e(100),e(101),e(102);const Ca=["https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv","https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_global.csv","https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_recovered_global.csv"],ka=ri(Cu),Aa={confirmed:[],death:[],recovered:[],active:[],countries:"__COUNTRIES__".split(","),country:"__COUNTRY__",axisType:"logarythmic",selectedType:"confirmed",accessStorage:!0},Ta={};let Na=null;const Sa=document.getElementById("spinner");function Ua(){$t("#selectedCountry").text("Selected Country: "+Aa.country).attr("text-align","right"),Ta.width=window.innerWidth>1023?document.querySelector("section").getBoundingClientRect().width-250:document.querySelector("section").getBoundingClientRect().width,Ta.height=window.innerWidth>480?450:350,Ta.margin=70,Ta.oneColumn=window.innerWidth<1024;const t=Aa[Aa.selectedType];Da(t,"#container","checkbox","#sidepanel"),Da(t,"#container2","radio","#sidepanel2"),function(t,n,e){const r=t,i=e.width,o=e.height,u=e.margin;$t(n).style("width",i).style("height",o);const a=g(r.map(t=>t.latest).concat([1e6])),s=yi().domain([0,r[0].data.length]).range([u,i-u]),l=Ai(10).clamp(!0).domain([1,a]).range([o-u,u]),c=C(s),f=k(l).ticks(10,0).tickSize(2*Ta.margin-Ta.width).ticks(5).tickFormat(t=>t);$t("svg").selectAll("g").remove(),$t("svg").append("g").call(f).attr("transform",`translate(${u},0)`),$t("svg").append("g").call(c).attr("transform",`translate(0, ${o-u})`);const h=r.filter(t=>-1!==Aa.countries.indexOf(t.name)),p=$t(n);p.selectAll("path.line").data(h.map(t=>t.data)).join("path").attr("class","line").attrs({d:Du().x((t,n)=>s(n)).y((t,n)=>l(t)),stroke:(t,n)=>ka(Aa.countries.indexOf(h[n].name)),fill:"none","stroke-width":2}),p.selectAll("text.cname").data(h).join("text").attr("class","cname").attrs({x:(t,n)=>s(t.data.length),y:(t,n)=>l(t.data[t.data.length-1]),stroke:"none",fill:(t,n)=>ka(Aa.countries.indexOf(t.name))}).text(t=>t.name)}(t,"#s1",Ta),function(t,n,e,r){const i=t.find(t=>t.name===Aa.country),o=r.width,u=r.height,a=r.margin,s=i.data.map((t,n,e)=>0===n?t:e[n]-e[n-1]),l=(o-2*a)/s.length,c=$t(n);c.style("width",o).style("height",u);const f="logarithmic"===e?1e5:function(t){const n=t+"",e=n.slice(0,1),r=(Number(e)+1)*10**n.slice(1).length;return Number(r)}(g(s)),h=yi().domain([0,s.length]).range([a,o-a]),p="logarithmic"===e?Ai(10).clamp(!0).domain([1,f]).range([u-a,a]):yi().domain([0,f]).range([u-a,a]),d=C(h),v=k(p).ticks(10,0).tickSize(2*Ta.margin-Ta.width).ticks(5).tickFormat(t=>t);c.selectAll("g").remove(),c.append("g").call(v).attr("transform",`translate(${a},0)`),c.append("g").call(d).attr("transform",`translate(0, ${u-a})`),c.selectAll("rect").data(s).join("rect").attrs({stroke:"white",fill:"#333",x:(t,n)=>p(0)-p(t)>0?h(n):0,y:t=>p(t),width:l,height:t=>Math.abs(p(0)-p(t))})}(t,"#s2",Aa.axisType,Ta)}function Da(t,n,e,r){t.sort((t,n)=>n.latest-t.latest);let i=$t(n);const o=document.querySelector(r);if(o){const t=o.shadowRoot;if(t){const e=t.querySelector(n);e&&(i=$t(e))}}i.styles({display:"inline-block",width:"250px",height:"100%",overflow:"scroll",border:"1px solid"});const u=(t,n)=>{let r="white";if("radio"===e)Aa.country===t&&(r="#333");else if("checkbox"===e){const n=Aa.countries.indexOf(t);-1!==n&&(r=ka(n))}return r},a=(t,n)=>{let r="black";if("radio"===e)Aa.country===t&&(r="white");else if("checkbox"===e){-1!==Aa.countries.indexOf(t)&&(r="white")}return r};i.selectAll("div."+e).data(t).join("div").attr("class",e).styles({width:"250px","box-sizing":"border-box",height:"30px",border:"1px solid #ccc",display:"flex","justify-content":"space-between",font:"16px/30px sans-serif",padding:"0 1rem",background:(t,n)=>u(t.name),color:(t,n)=>a(t.name)}).html((t,n)=>"<div><input"+((t,n)=>{let r="";if("radio"===e)Aa.country===t&&(r=" checked");else if("checkbox"===e){-1!==Aa.countries.indexOf(t)&&(r=" checked")}return r})(t.name)+" style='width:1px;visibility:hidden' type='"+e+"'/>"+(n+1)+" <span>"+t.name+"</span></div><div>"+Or(",")(t.latest)+"</div>").on("click",(t,n,r)=>{if("checkbox"===e){const e=r[n].querySelector("input");e.checked=!e.checked,e.checked?Aa.countries.push(t.name):Aa.countries=Aa.countries.filter(n=>n!==t.name),r[n].style.background=u(t.name),r[n].style.color=a(t.name)}else if("radio"===e){r[n].querySelector("input[type='radio']").checked=!0,Aa.country=t.name,$t("#selectedCountry").text("Selected Country: "+Aa.country).attr("text-align","right"),r[n].parentElement.querySelectorAll("div.radio").forEach(t=>{t.style.background="white",t.style.color="black",t.querySelector("input").checked=!1}),r[n].style.background=u(t.name),r[n].style.color=a(t.name),r[n].querySelector("input").checked=!0}location.href="fmp://$/covid19?script=saveCountry&param="+Aa.country+"&$countries="+Aa.countries.join(","),Ua()})}function La(t){const n=function(t){return t.split("\n").map(t=>t.split(/[^0-9a-zA-Z ,\.]/).join(""))}(t),e=[];n.forEach(t=>{const n=t.split(",");n[0]||e.find(t=>t.name===n[1])||e.push({name:n[1],data:n.slice(4).map(t=>Number(t)),latest:Number(n[n.length-1])})});const r=e[0].data.length;return Ea(n,e,"Australia",r),Ea(n,e,"China",r),Ea(n,e,"Canada",r,["Diamond Princess","Recovered"]),e}function Ea(t,n,e,r,i){const o=t.filter(t=>{const n=t.split(",")[0];return i?t.match(e)&&!i.includes(n):t.match(e)}),u={name:e,data:Array(r).fill(0)};o.forEach(t=>{const n=t.split(",").slice(4).map(t=>Number(t));u.data.forEach((t,e)=>{u.data[e]=t+n[e]})}),u.latest=u.data[u.data.length-1],n.push(u)}Sa.setAttribute("bool","true"),Promise.all(Ca.map(t=>fetch(t).then(t=>t.text()))).then(t=>{var n,e,r;Aa.confirmed=La(t[0]),Aa.death=La(t[1]),Aa.recovered=La(t[2]),Aa.active=(n=Aa.confirmed,e=Aa.death,r=Aa.recovered,Array(n.length).fill({}).map((t,i)=>{const o=n[i].name,u=n[i].data,a=e.find(t=>t.name===o).data,s=r.find(t=>t.name===o).data,l=u.map((t,n)=>t-a[n]-s[n]);return{name:o,data:l,latest:l[l.length-1]}})),$t("#caseTypes").selectAll("input+label").on("click",(t,n,e)=>{Aa.selectedType=e[n].getAttribute("for"),$t("div.subTitle").text(e[n].textContent+" Daily Count"),Ua()}),$t("#caseTypes").selectAll("input").on("click",(t,n,e)=>{Aa.selectedType=document.querySelector("#caseTypes input:checked").value;const r=Aa.selectedType.slice(0,1).toUpperCase()+Aa.selectedType.slice(1);$t("div.subTitle").text(r+" Daily Count"),Ua()}),ku("#dailyCount input+label").on("click",(t,n,e)=>{Aa.axisType=e[n].textContent.toLowerCase(),Ua()}),ku("#dailyCount input").on("click",(t,n,e)=>{Aa.axisType=e[n].value,Ua()});const i=t[0].split("\n")[0].split(",");$t("#latestDate").text("Last Updated: "+i[i.length-1]),Ua(),Sa.style.display="none"}),window.onresize=function(){Na=setTimeout(()=>{Na&&clearTimeout(Na),Ua()},200)}}});