plotly.js
Version:
The open source javascript graphing library that powers plotly
18 lines • 5.18 MB
JavaScript
/**
* plotly.js (strict - minified) v3.3.1
* Copyright 2012-2025, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
(
function(root, factory) {
if (typeof module === "object" && module.exports) {
module.exports = factory();
} else {
root.moduleName = factory();
}
} (typeof self !== "undefined" ? self : this, () => {
"use strict";var Plotly=(()=>{var Ktt=Object.create;var LM=Object.defineProperty,Jtt=Object.defineProperties,$tt=Object.getOwnPropertyDescriptor,Qtt=Object.getOwnPropertyDescriptors,ert=Object.getOwnPropertyNames,sL=Object.getOwnPropertySymbols,trt=Object.getPrototypeOf,L9=Object.prototype.hasOwnProperty,xee=Object.prototype.propertyIsEnumerable;var _ee=(e,t,r)=>t in e?LM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ym=(e,t)=>{for(var r in t||(t={}))L9.call(t,r)&&_ee(e,r,t[r]);if(sL)for(var r of sL(t))xee.call(t,r)&&_ee(e,r,t[r]);return e},O1=(e,t)=>Jtt(e,Qtt(t));var bee=(e,t)=>{var r={};for(var n in e)L9.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sL)for(var n of sL(e))t.indexOf(n)<0&&xee.call(e,n)&&(r[n]=e[n]);return r};var tc=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wee=(e,t)=>{for(var r in t)LM(e,r,{get:t[r],enumerable:!0})},Tee=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ert(t))!L9.call(e,i)&&i!==r&&LM(e,i,{get:()=>t[i],enumerable:!(n=$tt(t,i))||n.enumerable});return e};var rrt=(e,t,r)=>(r=e!=null?Ktt(trt(e)):{},Tee(t||!e||!e.__esModule?LM(r,"default",{value:e,enumerable:!0}):r,e)),ob=e=>Tee(LM({},"__esModule",{value:!0}),e);var lL=Ae(Aee=>{"use strict";Aee.version="3.3.1"});var Mee=Ae((See,uL)=>{(function(t,r,n){r[t]=r[t]||n(),typeof uL!="undefined"&&uL.exports&&(uL.exports=r[t])})("Promise",typeof window!="undefined"?window:See,function(){"use strict";var t,r,n,i=Object.prototype.toString,a=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(k,E,A,L){return Object.defineProperty(k,E,{value:A,writable:!0,configurable:L!==!1})}}catch(v){t=function(E,A,L){return E[A]=L,E}}n=function(){var k,E,A;function L(x,C){this.fn=x,this.self=C,this.next=void 0}return{add:function(C,M){A=new L(C,M),E?E.next=A:k=A,E=A,A=void 0},drain:function(){var C=k;for(k=E=r=void 0;C;)C.fn.call(C.self),C=C.next}}}();function o(v,k){n.add(v,k),r||(r=a(n.drain))}function s(v){var k,E=typeof v;return v!=null&&(E=="object"||E=="function")&&(k=v.then),typeof k=="function"?k:!1}function u(){for(var v=0;v<this.chain.length;v++)l(this,this.state===1?this.chain[v].success:this.chain[v].failure,this.chain[v]);this.chain.length=0}function l(v,k,E){var A,L;try{k===!1?E.reject(v.msg):(k===!0?A=v.msg:A=k.call(void 0,v.msg),A===E.promise?E.reject(TypeError("Promise-chain cycle")):(L=s(A))?L.call(A,E.resolve,E.reject):E.resolve(A))}catch(x){E.reject(x)}}function f(v){var k,E=this;if(!E.triggered){E.triggered=!0,E.def&&(E=E.def);try{(k=s(v))?o(function(){var A=new d(E);try{k.call(v,function(){f.apply(A,arguments)},function(){c.apply(A,arguments)})}catch(L){c.call(A,L)}}):(E.msg=v,E.state=1,E.chain.length>0&&o(u,E))}catch(A){c.call(new d(E),A)}}}function c(v){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=v,k.state=2,k.chain.length>0&&o(u,k))}function h(v,k,E,A){for(var L=0;L<k.length;L++)(function(C){v.resolve(k[C]).then(function(m){E(C,m)},A)})(L)}function d(v){this.def=v,this.triggered=!1}function p(v){this.promise=v,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function _(v){if(typeof v!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var k=new p(this);this.then=function(A,L){var x={success:typeof A=="function"?A:!0,failure:typeof L=="function"?L:!1};return x.promise=new this.constructor(function(M,m){if(typeof M!="function"||typeof m!="function")throw TypeError("Not a function");x.resolve=M,x.reject=m}),k.chain.push(x),k.state!==0&&o(u,k),x.promise},this.catch=function(A){return this.then(void 0,A)};try{v.call(void 0,function(A){f.call(k,A)},function(A){c.call(k,A)})}catch(E){c.call(k,E)}}var b=t({},"constructor",_,!1);return _.prototype=b,t(b,"__NPO__",0,!1),t(_,"resolve",function(k){var E=this;return k&&typeof k=="object"&&k.__NPO__===1?k:new E(function(L,x){if(typeof L!="function"||typeof x!="function")throw TypeError("Not a function");L(k)})}),t(_,"reject",function(k){return new this(function(A,L){if(typeof A!="function"||typeof L!="function")throw TypeError("Not a function");L(k)})}),t(_,"all",function(k){var E=this;return i.call(k)!="[object Array]"?E.reject(TypeError("Not an array")):k.length===0?E.resolve([]):new E(function(L,x){if(typeof L!="function"||typeof x!="function")throw TypeError("Not a function");var C=k.length,M=Array(C),m=0;h(E,k,function(T,B){M[T]=B,++m===C&&L(M)},x)})}),t(_,"race",function(k){var E=this;return i.call(k)!="[object Array]"?E.reject(TypeError("Not an array")):new E(function(L,x){if(typeof L!="function"||typeof x!="function")throw TypeError("Not a function");h(E,k,function(M,m){L(m)},x)})}),_})});var Jl=Ae((Lir,fL)=>{(function(){var e={version:"3.8.2"},t=[].slice,r=function(Z){return t.call(Z)},n=self.document;function i(Z){return Z&&(Z.ownerDocument||Z.document||Z).documentElement}function a(Z){return Z&&(Z.ownerDocument&&Z.ownerDocument.defaultView||Z.document&&Z||Z.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(Z){r=function(se){for(var Pe=se.length,Xe=new Array(Pe);Pe--;)Xe[Pe]=se[Pe];return Xe}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(Z){var o=this.Element.prototype,s=o.setAttribute,u=o.setAttributeNS,l=this.CSSStyleDeclaration.prototype,f=l.setProperty;o.setAttribute=function(se,Pe){s.call(this,se,Pe+"")},o.setAttributeNS=function(se,Pe,Xe){u.call(this,se,Pe,Xe+"")},l.setProperty=function(se,Pe,Xe){f.call(this,se,Pe+"",Xe)}}e.ascending=c;function c(Z,se){return Z<se?-1:Z>se?1:Z>=se?0:NaN}e.descending=function(Z,se){return se<Z?-1:se>Z?1:se>=Z?0:NaN},e.min=function(Z,se){var Pe=-1,Xe=Z.length,Qe,st;if(arguments.length===1){for(;++Pe<Xe;)if((st=Z[Pe])!=null&&st>=st){Qe=st;break}for(;++Pe<Xe;)(st=Z[Pe])!=null&&Qe>st&&(Qe=st)}else{for(;++Pe<Xe;)if((st=se.call(Z,Z[Pe],Pe))!=null&&st>=st){Qe=st;break}for(;++Pe<Xe;)(st=se.call(Z,Z[Pe],Pe))!=null&&Qe>st&&(Qe=st)}return Qe},e.max=function(Z,se){var Pe=-1,Xe=Z.length,Qe,st;if(arguments.length===1){for(;++Pe<Xe;)if((st=Z[Pe])!=null&&st>=st){Qe=st;break}for(;++Pe<Xe;)(st=Z[Pe])!=null&&st>Qe&&(Qe=st)}else{for(;++Pe<Xe;)if((st=se.call(Z,Z[Pe],Pe))!=null&&st>=st){Qe=st;break}for(;++Pe<Xe;)(st=se.call(Z,Z[Pe],Pe))!=null&&st>Qe&&(Qe=st)}return Qe},e.extent=function(Z,se){var Pe=-1,Xe=Z.length,Qe,st,jt;if(arguments.length===1){for(;++Pe<Xe;)if((st=Z[Pe])!=null&&st>=st){Qe=jt=st;break}for(;++Pe<Xe;)(st=Z[Pe])!=null&&(Qe>st&&(Qe=st),jt<st&&(jt=st))}else{for(;++Pe<Xe;)if((st=se.call(Z,Z[Pe],Pe))!=null&&st>=st){Qe=jt=st;break}for(;++Pe<Xe;)(st=se.call(Z,Z[Pe],Pe))!=null&&(Qe>st&&(Qe=st),jt<st&&(jt=st))}return[Qe,jt]};function h(Z){return Z===null?NaN:+Z}function d(Z){return!isNaN(Z)}e.sum=function(Z,se){var Pe=0,Xe=Z.length,Qe,st=-1;if(arguments.length===1)for(;++st<Xe;)d(Qe=+Z[st])&&(Pe+=Qe);else for(;++st<Xe;)d(Qe=+se.call(Z,Z[st],st))&&(Pe+=Qe);return Pe},e.mean=function(Z,se){var Pe=0,Xe=Z.length,Qe,st=-1,jt=Xe;if(arguments.length===1)for(;++st<Xe;)d(Qe=h(Z[st]))?Pe+=Qe:--jt;else for(;++st<Xe;)d(Qe=h(se.call(Z,Z[st],st)))?Pe+=Qe:--jt;if(jt)return Pe/jt},e.quantile=function(Z,se){var Pe=(Z.length-1)*se+1,Xe=Math.floor(Pe),Qe=+Z[Xe-1],st=Pe-Xe;return st?Qe+st*(Z[Xe]-Qe):Qe},e.median=function(Z,se){var Pe=[],Xe=Z.length,Qe,st=-1;if(arguments.length===1)for(;++st<Xe;)d(Qe=h(Z[st]))&&Pe.push(Qe);else for(;++st<Xe;)d(Qe=h(se.call(Z,Z[st],st)))&&Pe.push(Qe);if(Pe.length)return e.quantile(Pe.sort(c),.5)},e.variance=function(Z,se){var Pe=Z.length,Xe=0,Qe,st,jt=0,_t=-1,hr=0;if(arguments.length===1)for(;++_t<Pe;)d(Qe=h(Z[_t]))&&(st=Qe-Xe,Xe+=st/++hr,jt+=st*(Qe-Xe));else for(;++_t<Pe;)d(Qe=h(se.call(Z,Z[_t],_t)))&&(st=Qe-Xe,Xe+=st/++hr,jt+=st*(Qe-Xe));if(hr>1)return jt/(hr-1)},e.deviation=function(){var Z=e.variance.apply(this,arguments);return Z&&Math.sqrt(Z)};function p(Z){return{left:function(se,Pe,Xe,Qe){for(arguments.length<3&&(Xe=0),arguments.length<4&&(Qe=se.length);Xe<Qe;){var st=Xe+Qe>>>1;Z(se[st],Pe)<0?Xe=st+1:Qe=st}return Xe},right:function(se,Pe,Xe,Qe){for(arguments.length<3&&(Xe=0),arguments.length<4&&(Qe=se.length);Xe<Qe;){var st=Xe+Qe>>>1;Z(se[st],Pe)>0?Qe=st:Xe=st+1}return Xe}}}var _=p(c);e.bisectLeft=_.left,e.bisect=e.bisectRight=_.right,e.bisector=function(Z){return p(Z.length===1?function(se,Pe){return c(Z(se),Pe)}:Z)},e.shuffle=function(Z,se,Pe){(Xe=arguments.length)<3&&(Pe=Z.length,Xe<2&&(se=0));for(var Xe=Pe-se,Qe,st;Xe;)st=Math.random()*Xe--|0,Qe=Z[Xe+se],Z[Xe+se]=Z[st+se],Z[st+se]=Qe;return Z},e.permute=function(Z,se){for(var Pe=se.length,Xe=new Array(Pe);Pe--;)Xe[Pe]=Z[se[Pe]];return Xe},e.pairs=function(Z){for(var se=0,Pe=Z.length-1,Xe,Qe=Z[0],st=new Array(Pe<0?0:Pe);se<Pe;)st[se]=[Xe=Qe,Qe=Z[++se]];return st},e.transpose=function(Z){if(!(st=Z.length))return[];for(var se=-1,Pe=e.min(Z,b),Xe=new Array(Pe);++se<Pe;)for(var Qe=-1,st,jt=Xe[se]=new Array(st);++Qe<st;)jt[Qe]=Z[Qe][se];return Xe};function b(Z){return Z.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(Z){var se=[];for(var Pe in Z)se.push(Pe);return se},e.values=function(Z){var se=[];for(var Pe in Z)se.push(Z[Pe]);return se},e.entries=function(Z){var se=[];for(var Pe in Z)se.push({key:Pe,value:Z[Pe]});return se},e.merge=function(Z){for(var se=Z.length,Pe,Xe=-1,Qe=0,st,jt;++Xe<se;)Qe+=Z[Xe].length;for(st=new Array(Qe);--se>=0;)for(jt=Z[se],Pe=jt.length;--Pe>=0;)st[--Qe]=jt[Pe];return st};var v=Math.abs;e.range=function(Z,se,Pe){if(arguments.length<3&&(Pe=1,arguments.length<2&&(se=Z,Z=0)),(se-Z)/Pe===1/0)throw new Error("infinite range");var Xe=[],Qe=k(v(Pe)),st=-1,jt;if(Z*=Qe,se*=Qe,Pe*=Qe,Pe<0)for(;(jt=Z+Pe*++st)>se;)Xe.push(jt/Qe);else for(;(jt=Z+Pe*++st)<se;)Xe.push(jt/Qe);return Xe};function k(Z){for(var se=1;Z*se%1;)se*=10;return se}function E(Z,se){for(var Pe in se)Object.defineProperty(Z.prototype,Pe,{value:se[Pe],enumerable:!1})}e.map=function(Z,se){var Pe=new A;if(Z instanceof A)Z.forEach(function(_t,hr){Pe.set(_t,hr)});else if(Array.isArray(Z)){var Xe=-1,Qe=Z.length,st;if(arguments.length===1)for(;++Xe<Qe;)Pe.set(Xe,Z[Xe]);else for(;++Xe<Qe;)Pe.set(se.call(Z,st=Z[Xe],Xe),st)}else for(var jt in Z)Pe.set(jt,Z[jt]);return Pe};function A(){this._=Object.create(null)}var L="__proto__",x="\0";E(A,{has:m,get:function(Z){return this._[C(Z)]},set:function(Z,se){return this._[C(Z)]=se},remove:P,keys:T,values:function(){var Z=[];for(var se in this._)Z.push(this._[se]);return Z},entries:function(){var Z=[];for(var se in this._)Z.push({key:M(se),value:this._[se]});return Z},size:B,empty:F,forEach:function(Z){for(var se in this._)Z.call(this,M(se),this._[se])}});function C(Z){return(Z+="")===L||Z[0]===x?x+Z:Z}function M(Z){return(Z+="")[0]===x?Z.slice(1):Z}function m(Z){return C(Z)in this._}function P(Z){return(Z=C(Z))in this._&&delete this._[Z]}function T(){var Z=[];for(var se in this._)Z.push(M(se));return Z}function B(){var Z=0;for(var se in this._)++Z;return Z}function F(){for(var Z in this._)return!1;return!0}e.nest=function(){var Z={},se=[],Pe=[],Xe,Qe;function st(_t,hr,Cr){if(Cr>=se.length)return Qe?Qe.call(Z,hr):Xe?hr.sort(Xe):hr;for(var zr=-1,fi=hr.length,$r=se[Cr++],Bi,fn,mi,zi=new A,ji;++zr<fi;)(ji=zi.get(Bi=$r(fn=hr[zr])))?ji.push(fn):zi.set(Bi,[fn]);return _t?(fn=_t(),mi=function(pn,sn){fn.set(pn,st(_t,sn,Cr))}):(fn={},mi=function(pn,sn){fn[pn]=st(_t,sn,Cr)}),zi.forEach(mi),fn}function jt(_t,hr){if(hr>=se.length)return _t;var Cr=[],zr=Pe[hr++];return _t.forEach(function(fi,$r){Cr.push({key:fi,values:jt($r,hr)})}),zr?Cr.sort(function(fi,$r){return zr(fi.key,$r.key)}):Cr}return Z.map=function(_t,hr){return st(hr,_t,0)},Z.entries=function(_t){return jt(st(e.map,_t,0),0)},Z.key=function(_t){return se.push(_t),Z},Z.sortKeys=function(_t){return Pe[se.length-1]=_t,Z},Z.sortValues=function(_t){return Xe=_t,Z},Z.rollup=function(_t){return Qe=_t,Z},Z},e.set=function(Z){var se=new U;if(Z)for(var Pe=0,Xe=Z.length;Pe<Xe;++Pe)se.add(Z[Pe]);return se};function U(){this._=Object.create(null)}E(U,{has:m,add:function(Z){return this._[C(Z+="")]=!0,Z},remove:P,values:T,size:B,empty:F,forEach:function(Z){for(var se in this._)Z.call(this,M(se))}}),e.behavior={};function G(Z){return Z}e.rebind=function(Z,se){for(var Pe=1,Xe=arguments.length,Qe;++Pe<Xe;)Z[Qe=arguments[Pe]]=j(Z,se,se[Qe]);return Z};function j(Z,se,Pe){return function(){var Xe=Pe.apply(se,arguments);return Xe===se?Z:Xe}}function W(Z,se){if(se in Z)return se;se=se.charAt(0).toUpperCase()+se.slice(1);for(var Pe=0,Xe=N.length;Pe<Xe;++Pe){var Qe=N[Pe]+se;if(Qe in Z)return Qe}}var N=["webkit","ms","moz","Moz","o","O"];function H(){}e.dispatch=function(){for(var Z=new re,se=-1,Pe=arguments.length;++se<Pe;)Z[arguments[se]]=ae(Z);return Z};function re(){}re.prototype.on=function(Z,se){var Pe=Z.indexOf("."),Xe="";if(Pe>=0&&(Xe=Z.slice(Pe+1),Z=Z.slice(0,Pe)),Z)return arguments.length<2?this[Z].on(Xe):this[Z].on(Xe,se);if(arguments.length===2){if(se==null)for(Z in this)this.hasOwnProperty(Z)&&this[Z].on(Xe,null);return this}};function ae(Z){var se=[],Pe=new A;function Xe(){for(var Qe=se,st=-1,jt=Qe.length,_t;++st<jt;)(_t=Qe[st].on)&&_t.apply(this,arguments);return Z}return Xe.on=function(Qe,st){var jt=Pe.get(Qe),_t;return arguments.length<2?jt&&jt.on:(jt&&(jt.on=null,se=se.slice(0,_t=se.indexOf(jt)).concat(se.slice(_t+1)),Pe.remove(Qe)),st&&se.push(Pe.set(Qe,{on:st})),Z)},Xe}e.event=null;function be(){e.event.preventDefault()}function ze(){for(var Z=e.event,se;se=Z.sourceEvent;)Z=se;return Z}function Ce(Z){for(var se=new re,Pe=0,Xe=arguments.length;++Pe<Xe;)se[arguments[Pe]]=ae(se);return se.of=function(Qe,st){return function(jt){try{var _t=jt.sourceEvent=e.event;jt.target=Z,e.event=jt,se[jt.type].apply(Qe,st)}finally{e.event=_t}}},se}e.requote=function(Z){return Z.replace(de,"\\$&")};var de=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,te={}.__proto__?function(Z,se){Z.__proto__=se}:function(Z,se){for(var Pe in se)Z[Pe]=se[Pe]};function ke(Z){return te(Z,De),Z}var Ee=function(Z,se){return se.querySelector(Z)},Me=function(Z,se){return se.querySelectorAll(Z)},Ue=function(Z,se){var Pe=Z.matches||Z[W(Z,"matchesSelector")];return Ue=function(Xe,Qe){return Pe.call(Xe,Qe)},Ue(Z,se)};typeof Sizzle=="function"&&(Ee=function(Z,se){return Sizzle(Z,se)[0]||null},Me=Sizzle,Ue=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var De=e.selection.prototype=[];De.select=function(Z){var se=[],Pe,Xe,Qe,st;Z=ye(Z);for(var jt=-1,_t=this.length;++jt<_t;){se.push(Pe=[]),Pe.parentNode=(Qe=this[jt]).parentNode;for(var hr=-1,Cr=Qe.length;++hr<Cr;)(st=Qe[hr])?(Pe.push(Xe=Z.call(st,st.__data__,hr,jt)),Xe&&"__data__"in st&&(Xe.__data__=st.__data__)):Pe.push(null)}return ke(se)};function ye(Z){return typeof Z=="function"?Z:function(){return Ee(Z,this)}}De.selectAll=function(Z){var se=[],Pe,Xe;Z=qe(Z);for(var Qe=-1,st=this.length;++Qe<st;)for(var jt=this[Qe],_t=-1,hr=jt.length;++_t<hr;)(Xe=jt[_t])&&(se.push(Pe=r(Z.call(Xe,Xe.__data__,_t,Qe))),Pe.parentNode=Xe);return ke(se)};function qe(Z){return typeof Z=="function"?Z:function(){return Me(Z,this)}}var ce="http://www.w3.org/1999/xhtml",Je={svg:"http://www.w3.org/2000/svg",xhtml:ce,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:Je,qualify:function(Z){var se=Z.indexOf(":"),Pe=Z;return se>=0&&(Pe=Z.slice(0,se))!=="xmlns"&&(Z=Z.slice(se+1)),Je.hasOwnProperty(Pe)?{space:Je[Pe],local:Z}:Z}},De.attr=function(Z,se){if(arguments.length<2){if(typeof Z=="string"){var Pe=this.node();return Z=e.ns.qualify(Z),Z.local?Pe.getAttributeNS(Z.space,Z.local):Pe.getAttribute(Z)}for(se in Z)this.each(nt(se,Z[se]));return this}return this.each(nt(Z,se))};function nt(Z,se){Z=e.ns.qualify(Z);function Pe(){this.removeAttribute(Z)}function Xe(){this.removeAttributeNS(Z.space,Z.local)}function Qe(){this.setAttribute(Z,se)}function st(){this.setAttributeNS(Z.space,Z.local,se)}function jt(){var hr=se.apply(this,arguments);hr==null?this.removeAttribute(Z):this.setAttribute(Z,hr)}function _t(){var hr=se.apply(this,arguments);hr==null?this.removeAttributeNS(Z.space,Z.local):this.setAttributeNS(Z.space,Z.local,hr)}return se==null?Z.local?Xe:Pe:typeof se=="function"?Z.local?_t:jt:Z.local?st:Qe}function gt(Z){return Z.trim().replace(/\s+/g," ")}De.classed=function(Z,se){if(arguments.length<2){if(typeof Z=="string"){var Pe=this.node(),Xe=(Z=at(Z)).length,Qe=-1;if(se=Pe.classList){for(;++Qe<Xe;)if(!se.contains(Z[Qe]))return!1}else for(se=Pe.getAttribute("class");++Qe<Xe;)if(!Nt(Z[Qe]).test(se))return!1;return!0}for(se in Z)this.each(Ke(se,Z[se]));return this}return this.each(Ke(Z,se))};function Nt(Z){return new RegExp("(?:^|\\s+)"+e.requote(Z)+"(?:\\s+|$)","g")}function at(Z){return(Z+"").trim().split(/^|\s+/)}function Ke(Z,se){Z=at(Z).map(Ct);var Pe=Z.length;function Xe(){for(var st=-1;++st<Pe;)Z[st](this,se)}function Qe(){for(var st=-1,jt=se.apply(this,arguments);++st<Pe;)Z[st](this,jt)}return typeof se=="function"?Qe:Xe}function Ct(Z){var se=Nt(Z);return function(Pe,Xe){if(Qe=Pe.classList)return Xe?Qe.add(Z):Qe.remove(Z);var Qe=Pe.getAttribute("class")||"";Xe?(se.lastIndex=0,se.test(Qe)||Pe.setAttribute("class",gt(Qe+" "+Z))):Pe.setAttribute("class",gt(Qe.replace(se," ")))}}De.style=function(Z,se,Pe){var Xe=arguments.length;if(Xe<3){if(typeof Z!="string"){Xe<2&&(se="");for(Pe in Z)this.each(wt(Pe,Z[Pe],se));return this}if(Xe<2){var Qe=this.node();return a(Qe).getComputedStyle(Qe,null).getPropertyValue(Z)}Pe=""}return this.each(wt(Z,se,Pe))};function wt(Z,se,Pe){function Xe(){this.style.removeProperty(Z)}function Qe(){this.style.setProperty(Z,se,Pe)}function st(){var jt=se.apply(this,arguments);jt==null?this.style.removeProperty(Z):this.style.setProperty(Z,jt,Pe)}return se==null?Xe:typeof se=="function"?st:Qe}De.property=function(Z,se){if(arguments.length<2){if(typeof Z=="string")return this.node()[Z];for(se in Z)this.each(St(se,Z[se]));return this}return this.each(St(Z,se))};function St(Z,se){function Pe(){delete this[Z]}function Xe(){this[Z]=se}function Qe(){var st=se.apply(this,arguments);st==null?delete this[Z]:this[Z]=st}return se==null?Pe:typeof se=="function"?Qe:Xe}De.text=function(Z){return arguments.length?this.each(typeof Z=="function"?function(){var se=Z.apply(this,arguments);this.textContent=se==null?"":se}:Z==null?function(){this.textContent=""}:function(){this.textContent=Z}):this.node().textContent},De.html=function(Z){return arguments.length?this.each(typeof Z=="function"?function(){var se=Z.apply(this,arguments);this.innerHTML=se==null?"":se}:Z==null?function(){this.innerHTML=""}:function(){this.innerHTML=Z}):this.node().innerHTML},De.append=function(Z){return Z=Dt(Z),this.select(function(){return this.appendChild(Z.apply(this,arguments))})};function Dt(Z){function se(){var Xe=this.ownerDocument,Qe=this.namespaceURI;return Qe===ce&&Xe.documentElement.namespaceURI===ce?Xe.createElement(Z):Xe.createElementNS(Qe,Z)}function Pe(){return this.ownerDocument.createElementNS(Z.space,Z.local)}return typeof Z=="function"?Z:(Z=e.ns.qualify(Z)).local?Pe:se}De.insert=function(Z,se){return Z=Dt(Z),se=ye(se),this.select(function(){return this.insertBefore(Z.apply(this,arguments),se.apply(this,arguments)||null)})},De.remove=function(){return this.each(Zt)};function Zt(){var Z=this.parentNode;Z&&Z.removeChild(this)}De.data=function(Z,se){var Pe=-1,Xe=this.length,Qe,st;if(!arguments.length){for(Z=new Array(Xe=(Qe=this[0]).length);++Pe<Xe;)(st=Qe[Pe])&&(Z[Pe]=st.__data__);return Z}function jt(zr,fi){var $r,Bi=zr.length,fn=fi.length,mi=Math.min(Bi,fn),zi=new Array(fn),ji=new Array(fn),pn=new Array(Bi),sn,wi;if(se){var xo=new A,no=new Array(Bi),Xo;for($r=-1;++$r<Bi;)(sn=zr[$r])&&(xo.has(Xo=se.call(sn,sn.__data__,$r))?pn[$r]=sn:xo.set(Xo,sn),no[$r]=Xo);for($r=-1;++$r<fn;)(sn=xo.get(Xo=se.call(fi,wi=fi[$r],$r)))?sn!==!0&&(zi[$r]=sn,sn.__data__=wi):ji[$r]=Et(wi),xo.set(Xo,!0);for($r=-1;++$r<Bi;)$r in no&&xo.get(no[$r])!==!0&&(pn[$r]=zr[$r])}else{for($r=-1;++$r<mi;)sn=zr[$r],wi=fi[$r],sn?(sn.__data__=wi,zi[$r]=sn):ji[$r]=Et(wi);for(;$r<fn;++$r)ji[$r]=Et(fi[$r]);for(;$r<Bi;++$r)pn[$r]=zr[$r]}ji.update=zi,ji.parentNode=zi.parentNode=pn.parentNode=zr.parentNode,_t.push(ji),hr.push(zi),Cr.push(pn)}var _t=vt([]),hr=ke([]),Cr=ke([]);if(typeof Z=="function")for(;++Pe<Xe;)jt(Qe=this[Pe],Z.call(Qe,Qe.parentNode.__data__,Pe));else for(;++Pe<Xe;)jt(Qe=this[Pe],Z);return hr.enter=function(){return _t},hr.exit=function(){return Cr},hr};function Et(Z){return{__data__:Z}}De.datum=function(Z){return arguments.length?this.property("__data__",Z):this.property("__data__")},De.filter=function(Z){var se=[],Pe,Xe,Qe;typeof Z!="function"&&(Z=Te(Z));for(var st=0,jt=this.length;st<jt;st++){se.push(Pe=[]),Pe.parentNode=(Xe=this[st]).parentNode;for(var _t=0,hr=Xe.length;_t<hr;_t++)(Qe=Xe[_t])&&Z.call(Qe,Qe.__data__,_t,st)&&Pe.push(Qe)}return ke(se)};function Te(Z){return function(){return Ue(this,Z)}}De.order=function(){for(var Z=-1,se=this.length;++Z<se;)for(var Pe=this[Z],Xe=Pe.length-1,Qe=Pe[Xe],st;--Xe>=0;)(st=Pe[Xe])&&(Qe&&Qe!==st.nextSibling&&Qe.parentNode.insertBefore(st,Qe),Qe=st);return this},De.sort=function(Z){Z=ot.apply(this,arguments);for(var se=-1,Pe=this.length;++se<Pe;)this[se].sort(Z);return this.order()};function ot(Z){return arguments.length||(Z=c),function(se,Pe){return se&&Pe?Z(se.__data__,Pe.__data__):!se-!Pe}}De.each=function(Z){return Tt(this,function(se,Pe,Xe){Z.call(se,se.__data__,Pe,Xe)})};function Tt(Z,se){for(var Pe=0,Xe=Z.length;Pe<Xe;Pe++)for(var Qe=Z[Pe],st=0,jt=Qe.length,_t;st<jt;st++)(_t=Qe[st])&&se(_t,st,Pe);return Z}De.call=function(Z){var se=r(arguments);return Z.apply(se[0]=this,se),this},De.empty=function(){return!this.node()},De.node=function(){for(var Z=0,se=this.length;Z<se;Z++)for(var Pe=this[Z],Xe=0,Qe=Pe.length;Xe<Qe;Xe++){var st=Pe[Xe];if(st)return st}return null},De.size=function(){var Z=0;return Tt(this,function(){++Z}),Z};function vt(Z){return te(Z,Ye),Z}var Ye=[];e.selection.enter=vt,e.selection.enter.prototype=Ye,Ye.append=De.append,Ye.empty=De.empty,Ye.node=De.node,Ye.call=De.call,Ye.size=De.size,Ye.select=function(Z){for(var se=[],Pe,Xe,Qe,st,jt,_t=-1,hr=this.length;++_t<hr;){Qe=(st=this[_t]).update,se.push(Pe=[]),Pe.parentNode=st.parentNode;for(var Cr=-1,zr=st.length;++Cr<zr;)(jt=st[Cr])?(Pe.push(Qe[Cr]=Xe=Z.call(st.parentNode,jt.__data__,Cr,_t)),Xe.__data__=jt.__data__):Pe.push(null)}return ke(se)},Ye.insert=function(Z,se){return arguments.length<2&&(se=He(this)),De.insert.call(this,Z,se)};function He(Z){var se,Pe;return function(Xe,Qe,st){var jt=Z[st].update,_t=jt.length,hr;for(st!=Pe&&(Pe=st,se=0),Qe>=se&&(se=Qe+1);!(hr=jt[se])&&++se<_t;);return hr}}e.select=function(Z){var se;return typeof Z=="string"?(se=[Ee(Z,n)],se.parentNode=n.documentElement):(se=[Z],se.parentNode=i(Z)),ke([se])},e.selectAll=function(Z){var se;return typeof Z=="string"?(se=r(Me(Z,n)),se.parentNode=n.documentElement):(se=r(Z),se.parentNode=null),ke([se])},De.on=function(Z,se,Pe){var Xe=arguments.length;if(Xe<3){if(typeof Z!="string"){Xe<2&&(se=!1);for(Pe in Z)this.each(it(Pe,Z[Pe],se));return this}if(Xe<2)return(Xe=this.node()["__on"+Z])&&Xe._;Pe=!1}return this.each(it(Z,se,Pe))};function it(Z,se,Pe){var Xe="__on"+Z,Qe=Z.indexOf("."),st=It;Qe>0&&(Z=Z.slice(0,Qe));var jt=et.get(Z);jt&&(Z=jt,st=Yt);function _t(){var zr=this[Xe];zr&&(this.removeEventListener(Z,zr,zr.$),delete this[Xe])}function hr(){var zr=st(se,r(arguments));_t.call(this),this.addEventListener(Z,this[Xe]=zr,zr.$=Pe),zr._=se}function Cr(){var zr=new RegExp("^__on([^.]+)"+e.requote(Z)+"$"),fi;for(var $r in this)if(fi=$r.match(zr)){var Bi=this[$r];this.removeEventListener(fi[1],Bi,Bi.$),delete this[$r]}}return Qe?se?hr:_t:se?H:Cr}var et=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&et.forEach(function(Z){"on"+Z in n&&et.remove(Z)});function It(Z,se){return function(Pe){var Xe=e.event;e.event=Pe,se[0]=this.__data__;try{Z.apply(this,se)}finally{e.event=Xe}}}function Yt(Z,se){var Pe=It(Z,se);return function(Xe){var Qe=this,st=Xe.relatedTarget;(!st||st!==Qe&&!(st.compareDocumentPosition(Qe)&8))&&Pe.call(Qe,Xe)}}var cr,_r=0;function yr(Z){var se=".dragsuppress-"+ ++_r,Pe="click"+se,Xe=e.select(a(Z)).on("touchmove"+se,be).on("dragstart"+se,be).on("selectstart"+se,be);if(cr==null&&(cr="onselectstart"in Z?!1:W(Z.style,"userSelect")),cr){var Qe=i(Z).style,st=Qe[cr];Qe[cr]="none"}return function(jt){if(Xe.on(se,null),cr&&(Qe[cr]=st),jt){var _t=function(){Xe.on(Pe,null)};Xe.on(Pe,function(){be(),_t()},!0),setTimeout(_t,0)}}}e.mouse=function(Z){return Re(Z,ze())};var Ut=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Re(Z,se){se.changedTouches&&(se=se.changedTouches[0]);var Pe=Z.ownerSVGElement||Z;if(Pe.createSVGPoint){var Xe=Pe.createSVGPoint();if(Ut<0){var Qe=a(Z);if(Qe.scrollX||Qe.scrollY){Pe=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var st=Pe[0][0].getScreenCTM();Ut=!(st.f||st.e),Pe.remove()}}return Ut?(Xe.x=se.pageX,Xe.y=se.pageY):(Xe.x=se.clientX,Xe.y=se.clientY),Xe=Xe.matrixTransform(Z.getScreenCTM().inverse()),[Xe.x,Xe.y]}var jt=Z.getBoundingClientRect();return[se.clientX-jt.left-Z.clientLeft,se.clientY-jt.top-Z.clientTop]}e.touch=function(Z,se,Pe){if(arguments.length<3&&(Pe=se,se=ze().changedTouches),se){for(var Xe=0,Qe=se.length,st;Xe<Qe;++Xe)if((st=se[Xe]).identifier===Pe)return Re(Z,st)}},e.behavior.drag=function(){var Z=Ce(Qe,"drag","dragstart","dragend"),se=null,Pe=st(H,e.mouse,a,"mousemove","mouseup"),Xe=st(xe,e.touch,G,"touchmove","touchend");function Qe(){this.on("mousedown.drag",Pe).on("touchstart.drag",Xe)}function st(jt,_t,hr,Cr,zr){return function(){var fi=this,$r=e.event.target.correspondingElement||e.event.target,Bi=fi.parentNode,fn=Z.of(fi,arguments),mi=0,zi=jt(),ji=".drag"+(zi==null?"":"-"+zi),pn,sn=e.select(hr($r)).on(Cr+ji,no).on(zr+ji,Xo),wi=yr($r),xo=_t(Bi,zi);se?(pn=se.apply(fi,arguments),pn=[pn.x-xo[0],pn.y-xo[1]]):pn=[0,0],fn({type:"dragstart"});function no(){var js=_t(Bi,zi),El,Pl;js&&(El=js[0]-xo[0],Pl=js[1]-xo[1],mi|=El|Pl,xo=js,fn({type:"drag",x:js[0]+pn[0],y:js[1]+pn[1],dx:El,dy:Pl}))}function Xo(){_t(Bi,zi)&&(sn.on(Cr+ji,null).on(zr+ji,null),wi(mi),fn({type:"dragend"}))}}}return Qe.origin=function(jt){return arguments.length?(se=jt,Qe):se},e.rebind(Qe,Z,"on")};function xe(){return e.event.changedTouches[0].identifier}e.touches=function(Z,se){return arguments.length<2&&(se=ze().touches),se?r(se).map(function(Pe){var Xe=Re(Z,Pe);return Xe.identifier=Pe.identifier,Xe}):[]};var Oe=1e-6,Ie=Oe*Oe,Fe=Math.PI,ft=2*Fe,ge=ft-Oe,fe=Fe/2,pe=Fe/180,dt=180/Fe;function Pt(Z){return Z>0?1:Z<0?-1:0}function zt(Z,se,Pe){return(se[0]-Z[0])*(Pe[1]-Z[1])-(se[1]-Z[1])*(Pe[0]-Z[0])}function rr(Z){return Z>1?0:Z<-1?Fe:Math.acos(Z)}function Gr(Z){return Z>1?fe:Z<-1?-fe:Math.asin(Z)}function Br(Z){return((Z=Math.exp(Z))-1/Z)/2}function Er(Z){return((Z=Math.exp(Z))+1/Z)/2}function Rr(Z){return((Z=Math.exp(2*Z))-1)/(Z+1)}function pi(Z){return(Z=Math.sin(Z/2))*Z}var Di=Math.SQRT2,ni=2,$i=4;e.interpolateZoom=function(Z,se){var Pe=Z[0],Xe=Z[1],Qe=Z[2],st=se[0],jt=se[1],_t=se[2],hr=st-Pe,Cr=jt-Xe,zr=hr*hr+Cr*Cr,fi,$r;if(zr<Ie)$r=Math.log(_t/Qe)/Di,fi=function(pn){return[Pe+pn*hr,Xe+pn*Cr,Qe*Math.exp(Di*pn*$r)]};else{var Bi=Math.sqrt(zr),fn=(_t*_t-Qe*Qe+$i*zr)/(2*Qe*ni*Bi),mi=(_t*_t-Qe*Qe-$i*zr)/(2*_t*ni*Bi),zi=Math.log(Math.sqrt(fn*fn+1)-fn),ji=Math.log(Math.sqrt(mi*mi+1)-mi);$r=(ji-zi)/Di,fi=function(pn){var sn=pn*$r,wi=Er(zi),xo=Qe/(ni*Bi)*(wi*Rr(Di*sn+zi)-Br(zi));return[Pe+xo*hr,Xe+xo*Cr,Qe*wi/Er(Di*sn+zi)]}}return fi.duration=$r*1e3,fi},e.behavior.zoom=function(){var Z={x:0,y:0,k:1},se,Pe,Xe,Qe=[960,500],st=Qi,jt=250,_t=0,hr="mousedown.zoom",Cr="mousemove.zoom",zr="mouseup.zoom",fi,$r="touchstart.zoom",Bi,fn=Ce(sn,"zoomstart","zoom","zoomend"),mi,zi,ji,pn;Ai||(Ai="onwheel"in n?(si=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(si=function(){return e.event.wheelDelta},"mousewheel"):(si=function(){return-e.event.detail},"MozMousePixelScroll"));function sn(ds){ds.on(hr,fu).on(Ai+".zoom",Vu).on("dblclick.zoom",tf).on($r,Xu)}sn.event=function(ds){ds.each(function(){var Wl=fn.of(this,arguments),Tu=Z;Ol?e.select(this).transition().each("start.zoom",function(){Z=this.__chart__||{x:0,y:0,k:1},Pl(Wl)}).tween("zoom:zoom",function(){var Au=Qe[0],lf=Qe[1],hf=Pe?Pe[0]:Au/2,Mf=Pe?Pe[1]:lf/2,pf=e.interpolateZoom([(hf-Z.x)/Z.k,(Mf-Z.y)/Z.k,Au/Z.k],[(hf-Tu.x)/Tu.k,(Mf-Tu.y)/Tu.k,Au/Tu.k]);return function(fc){var Be=pf(fc),qt=Au/Be[2];this.__chart__=Z={x:hf-Be[0]*qt,y:Mf-Be[1]*qt,k:qt},pu(Wl)}}).each("interrupt.zoom",function(){Il(Wl)}).each("end.zoom",function(){Il(Wl)}):(this.__chart__=Z,Pl(Wl),pu(Wl),Il(Wl))})},sn.translate=function(ds){return arguments.length?(Z={x:+ds[0],y:+ds[1],k:Z.k},El(),sn):[Z.x,Z.y]},sn.scale=function(ds){return arguments.length?(Z={x:Z.x,y:Z.y,k:null},no(+ds),El(),sn):Z.k},sn.scaleExtent=function(ds){return arguments.length?(st=ds==null?Qi:[+ds[0],+ds[1]],sn):st},sn.center=function(ds){return arguments.length?(Xe=ds&&[+ds[0],+ds[1]],sn):Xe},sn.size=function(ds){return arguments.length?(Qe=ds&&[+ds[0],+ds[1]],sn):Qe},sn.duration=function(ds){return arguments.length?(jt=+ds,sn):jt},sn.x=function(ds){return arguments.length?(zi=ds,mi=ds.copy(),Z={x:0,y:0,k:1},sn):zi},sn.y=function(ds){return arguments.length?(pn=ds,ji=ds.copy(),Z={x:0,y:0,k:1},sn):pn};function wi(ds){return[(ds[0]-Z.x)/Z.k,(ds[1]-Z.y)/Z.k]}function xo(ds){return[ds[0]*Z.k+Z.x,ds[1]*Z.k+Z.y]}function no(ds){Z.k=Math.max(st[0],Math.min(st[1],ds))}function Xo(ds,Wl){Wl=xo(Wl),Z.x+=ds[0]-Wl[0],Z.y+=ds[1]-Wl[1]}function js(ds,Wl,Tu,Au){ds.__chart__={x:Z.x,y:Z.y,k:Z.k},no(Math.pow(2,Au)),Xo(Pe=Wl,Tu),ds=e.select(ds),jt>0&&(ds=ds.transition().duration(jt)),ds.call(sn.event)}function El(){zi&&zi.domain(mi.range().map(function(ds){return(ds-Z.x)/Z.k}).map(mi.invert)),pn&&pn.domain(ji.range().map(function(ds){return(ds-Z.y)/Z.k}).map(ji.invert))}function Pl(ds){_t++||ds({type:"zoomstart"})}function pu(ds){El(),ds({type:"zoom",scale:Z.k,translate:[Z.x,Z.y]})}function Il(ds){--_t||(ds({type:"zoomend"}),Pe=null)}function fu(){var ds=this,Wl=fn.of(ds,arguments),Tu=0,Au=e.select(a(ds)).on(Cr,Mf).on(zr,pf),lf=wi(e.mouse(ds)),hf=yr(ds);Us.call(ds),Pl(Wl);function Mf(){Tu=1,Xo(e.mouse(ds),lf),pu(Wl)}function pf(){Au.on(Cr,null).on(zr,null),hf(Tu),Il(Wl)}}function Xu(){var ds=this,Wl=fn.of(ds,arguments),Tu={},Au=0,lf,hf=".zoom-"+e.event.changedTouches[0].identifier,Mf="touchmove"+hf,pf="touchend"+hf,fc=[],Be=e.select(ds),qt=yr(ds);Qr(),Pl(Wl),Be.on(hr,null).on($r,Qr);function ar(){var vi=e.touches(ds);return lf=Z.k,vi.forEach(function(on){on.identifier in Tu&&(Tu[on.identifier]=wi(on))}),vi}function Qr(){var vi=e.event.target;e.select(vi).on(Mf,yi).on(pf,ci),fc.push(vi);for(var on=e.event.changedTouches,Bn=0,Ln=on.length;Bn<Ln;++Bn)Tu[on[Bn].identifier]=null;var wn=ar(),Ls=Date.now();if(wn.length===1){if(Ls-Bi<500){var ua=wn[0];js(ds,ua,Tu[ua.identifier],Math.floor(Math.log(Z.k)/Math.LN2)+1),be()}Bi=Ls}else if(wn.length>1){var ua=wn[0],Hn=wn[1],qi=ua[0]-Hn[0],Wr=ua[1]-Hn[1];Au=qi*qi+Wr*Wr}}function yi(){var vi=e.touches(ds),on,Bn,Ln,wn;Us.call(ds);for(var Ls=0,ua=vi.length;Ls<ua;++Ls,wn=null)if(Ln=vi[Ls],wn=Tu[Ln.identifier]){if(Bn)break;on=Ln,Bn=wn}if(wn){var Hn=(Hn=Ln[0]-on[0])*Hn+(Hn=Ln[1]-on[1])*Hn,qi=Au&&Math.sqrt(Hn/Au);on=[(on[0]+Ln[0])/2,(on[1]+Ln[1])/2],Bn=[(Bn[0]+wn[0])/2,(Bn[1]+wn[1])/2],no(qi*lf)}Bi=null,Xo(on,Bn),pu(Wl)}function ci(){if(e.event.touches.length){for(var vi=e.event.changedTouches,on=0,Bn=vi.length;on<Bn;++on)delete Tu[vi[on].identifier];for(var Ln in Tu)return void ar()}e.selectAll(fc).on(hf,null),Be.on(hr,fu).on($r,Xu),qt(),Il(Wl)}}function Vu(){var ds=fn.of(this,arguments);fi?clearTimeout(fi):(Us.call(this),se=wi(Pe=Xe||e.mouse(this)),Pl(ds)),fi=setTimeout(function(){fi=null,Il(ds)},50),be(),no(Math.pow(2,si()*.002)*Z.k),Xo(Pe,se),pu(ds)}function tf(){var ds=e.mouse(this),Wl=Math.log(Z.k)/Math.LN2;js(this,ds,wi(ds),e.event.shiftKey?Math.ceil(Wl)-1:Math.floor(Wl)+1)}return e.rebind(sn,fn,"on")};var Qi=[0,1/0],si,Ai;e.color=Ni;function Ni(){}Ni.prototype.toString=function(){return this.rgb()+""},e.hsl=Rt;function Rt(Z,se,Pe){return this instanceof Rt?(this.h=+Z,this.s=+se,void(this.l=+Pe)):arguments.length<2?Z instanceof Rt?new Rt(Z.h,Z.s,Z.l):xn(""+Z,bi,Rt):new Rt(Z,se,Pe)}var yt=Rt.prototype=new Ni;yt.brighter=function(Z){return Z=Math.pow(.7,arguments.length?Z:1),new Rt(this.h,this.s,this.l/Z)},yt.darker=function(Z){return Z=Math.pow(.7,arguments.length?Z:1),new Rt(this.h,this.s,Z*this.l)},yt.rgb=function(){return Gt(this.h,this.s,this.l)};function Gt(Z,se,Pe){var Xe,Qe;Z=isNaN(Z)?0:(Z%=360)<0?Z+360:Z,se=isNaN(se)||se<0?0:se>1?1:se,Pe=Pe<0?0:Pe>1?1:Pe,Qe=Pe<=.5?Pe*(1+se):Pe+se-Pe*se,Xe=2*Pe-Qe;function st(_t){return _t>360?_t-=360:_t<0&&(_t+=360),_t<60?Xe+(Qe-Xe)*_t/60:_t<180?Qe:_t<240?Xe+(Qe-Xe)*(240-_t)/60:Xe}function jt(_t){return Math.round(st(_t)*255)}return new Fi(jt(Z+120),jt(Z),jt(Z-120))}e.hcl=Wt;function Wt(Z,se,Pe){return this instanceof Wt?(this.h=+Z,this.c=+se,void(this.l=+Pe)):arguments.length<2?Z instanceof Wt?new Wt(Z.h,Z.c,Z.l):Z instanceof Nr?ti(Z.l,Z.a,Z.b):ti((Z=Xr((Z=e.rgb(Z)).r,Z.g,Z.b)).l,Z.a,Z.b):new Wt(Z,se,Pe)}var xr=Wt.prototype=new Ni;xr.brighter=function(Z){return new Wt(this.h,this.c,Math.min(100,this.l+Or*(arguments.length?Z:1)))},xr.darker=function(Z){return new Wt(this.h,this.c,Math.max(0,this.l-Or*(arguments.length?Z:1)))},xr.rgb=function(){return Lr(this.h,this.c,this.l).rgb()};function Lr(Z,se,Pe){return isNaN(Z)&&(Z=0),isNaN(se)&&(se=0),new Nr(Pe,Math.cos(Z*=pe)*se,Math.sin(Z)*se)}e.lab=Nr;function Nr(Z,se,Pe){return this instanceof Nr?(this.l=+Z,this.a=+se,void(this.b=+Pe)):arguments.length<2?Z instanceof Nr?new Nr(Z.l,Z.a,Z.b):Z instanceof Wt?Lr(Z.h,Z.c,Z.l):Xr((Z=Fi(Z)).r,Z.g,Z.b):new Nr(Z,se,Pe)}var Or=18,Hr=.95047,jr=1,gi=1.08883,ki=Nr.prototype=new Ni;ki.brighter=function(Z){return new Nr(Math.min(100,this.l+Or*(arguments.length?Z:1)),this.a,this.b)},ki.darker=function(Z){return new Nr(Math.max(0,this.l-Or*(arguments.length?Z:1)),this.a,this.b)},ki.rgb=function(){return Vi(this.l,this.a,this.b)};function Vi(Z,se,Pe){var Xe=(Z+16)/116,Qe=Xe+se/500,st=Xe-Pe/200;return Qe=tn(Qe)*Hr,Xe=tn(Xe)*jr,st=tn(st)*gi,new Fi(oi(3.2404542*Qe-1.5371385*Xe-.4985314*st),oi(-.969266*Qe+1.8760108*Xe+.041556*st),oi(.0556434*Qe-.2040259*Xe+1.0572252*st))}function ti(Z,se,Pe){return Z>0?new Wt(Math.atan2(Pe,se)*dt,Math.sqrt(se*se+Pe*Pe),Z):new Wt(NaN,NaN,Z)}function tn(Z){return Z>.206893034?Z*Z*Z:(Z-4/29)/7.787037}function Yr(Z){return Z>.008856?Math.pow(Z,1/3):7.787037*Z+4/29}function oi(Z){return Math.round(255*(Z<=.00304?12.92*Z:1.055*Math.pow(Z,1/2.4)-.055))}e.rgb=Fi;function Fi(Z,se,Pe){return this instanceof Fi?(this.r=~~Z,this.g=~~se,void(this.b=~~Pe)):arguments.length<2?Z instanceof Fi?new Fi(Z.r,Z.g,Z.b):xn(""+Z,Fi,Gt):new Fi(Z,se,Pe)}function an(Z){return new Fi(Z>>16,Z>>8&255,Z&255)}function nn(Z){return an(Z)+""}var Ri=Fi.prototype=new Ni;Ri.brighter=function(Z){Z=Math.pow(.7,arguments.length?Z:1);var se=this.r,Pe=this.g,Xe=this.b,Qe=30;return!se&&!Pe&&!Xe?new Fi(Qe,Qe,Qe):(se&&se<Qe&&(se=Qe),Pe&&Pe<Qe&&(Pe=Qe),Xe&&Xe<Qe&&(Xe=Qe),new Fi(Math.min(255,se/Z),Math.min(255,Pe/Z),Math.min(255,Xe/Z)))},Ri.darker=function(Z){return Z=Math.pow(.7,arguments.length?Z:1),new Fi(Z*this.r,Z*this.g,Z*this.b)},Ri.hsl=function(){return bi(this.r,this.g,this.b)},Ri.toString=function(){return"#"+Ii(this.r)+Ii(this.g)+Ii(this.b)};function Ii(Z){return Z<16?"0"+Math.max(0,Z).toString(16):Math.min(255,Z).toString(16)}function xn(Z,se,Pe){var Xe=0,Qe=0,st=0,jt,_t,hr;if(jt=/([a-z]+)\((.*)\)/.exec(Z=Z.toLowerCase()),jt)switch(_t=jt[2].split(","),jt[1]){case"hsl":return Pe(parseFloat(_t[0]),parseFloat(_t[1])/100,parseFloat(_t[2])/100);case"rgb":return se(tr(_t[0]),tr(_t[1]),tr(_t[2]))}return(hr=pr.get(Z))?se(hr.r,hr.g,hr.b):(Z!=null&&Z.charAt(0)==="#"&&!isNaN(hr=parseInt(Z.slice(1),16))&&(Z.length===4?(Xe=(hr&3840)>>4,Xe=Xe>>4|Xe,Qe=hr&240,Qe=Qe>>4|Qe,st=hr&15,st=st<<4|st):Z.length===7&&(Xe=(hr&16711680)>>16,Qe=(hr&65280)>>8,st=hr&255)),se(Xe,Qe,st))}function bi(Z,se,Pe){var Xe=Math.min(Z/=255,se/=255,Pe/=255),Qe=Math.max(Z,se,Pe),st=Qe-Xe,jt,_t,hr=(Qe+Xe)/2;return st?(_t=hr<.5?st/(Qe+Xe):st/(2-Qe-Xe),Z==Qe?jt=(se-Pe)/st+(se<Pe?6:0):se==Qe?jt=(Pe-Z)/st+2:jt=(Z-se)/st+4,jt*=60):(jt=NaN,_t=hr>0&&hr<1?0:jt),new Rt(jt,_t,hr)}function Xr(Z,se,Pe){Z=ct(Z),se=ct(se),Pe=ct(Pe);var Xe=Yr((.4124564*Z+.3575761*se+.1804375*Pe)/Hr),Qe=Yr((.2126729*Z+.7151522*se+.072175*Pe)/jr),st=Yr((.0193339*Z+.119192*se+.9503041*Pe)/gi);return Nr(116*Qe-16,500*(Xe-Qe),200*(Qe-st))}function ct(Z){return(Z/=255)<=.04045?Z/12.92:Math.pow((Z+.055)/1.055,2.4)}function tr(Z){var se=parseFloat(Z);return Z.charAt(Z.length-1)==="%"?Math.round(se*2.55):se}var pr=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});pr.forEach(function(Z,se){pr.set(Z,an(se))});function gr(Z){return typeof Z=="function"?Z:function(){return Z}}e.functor=gr,e.xhr=Zr(G);function Zr(Z){return function(se,Pe,Xe){return arguments.length===2&&typeof Pe=="function"&&(Xe=Pe,Pe=null),Ti(se,Pe,Z,Xe)}}function Ti(Z,se,Pe,Xe){var Qe={},st=e.dispatch("beforesend","progress","load","error"),jt={},_t=new XMLHttpRequest,hr=null;self.XDomainRequest&&!("withCredentials"in _t)&&/^(http(s)?:)?\/\//.test(Z)&&(_t=new XDomainRequest),"onload"in _t?_t.onload=_t.onerror=Cr:_t.onreadystatechange=function(){_t.readyState>3&&Cr()};function Cr(){var zr=_t.status,fi;if(!zr&&ii(_t)||zr>=200&&zr<300||zr===304){try{fi=Pe.call(Qe,_t)}catch($r){st.error.call(Qe,$r);return}st.load.call(Qe,fi)}else st.error.call(Qe,_t)}return _t.onprogress=function(zr){var fi=e.event;e.event=zr;try{st.progress.call(Qe,_t)}finally{e.event=fi}},Qe.header=function(zr,fi){return zr=(zr+"").toLowerCase(),arguments.length<2?jt[zr]:(fi==null?delete jt[zr]:jt[zr]=fi+"",Qe)},Qe.mimeType=function(zr){return arguments.length?(se=zr==null?null:zr+"",Qe):se},Qe.responseType=function(zr){return arguments.length?(hr=zr,Qe):hr},Qe.response=function(zr){return Pe=zr,Qe},["get","post"].forEach(function(zr){Qe[zr]=function(){return Qe.send.apply(Qe,[zr].concat(r(arguments)))}}),Qe.send=function(zr,fi,$r){if(arguments.length===2&&typeof fi=="function"&&($r=fi,fi=null),_t.open(zr,Z,!0),se!=null&&!("accept"in jt)&&(jt.accept=se+",*/*"),_t.setRequestHeader)for(var Bi in jt)_t.setRequestHeader(Bi,jt[Bi]);return se!=null&&_t.overrideMimeType&&_t.overrideMimeType(se),hr!=null&&(_t.responseType=hr),$r!=null&&Qe.on("error",$r).on("load",function(fn){$r(null,fn)}),st.beforesend.call(Qe,_t),_t.send(fi==null?null:fi),Qe},Qe.abort=function(){return _t.abort(),Qe},e.rebind(Qe,st,"on"),Xe==null?Qe:Qe.get(en(Xe))}function en(Z){return Z.length===1?function(se,Pe){Z(se==null?Pe:null)}:Z}function ii(Z){var se=Z.responseType;return se&&se!=="text"?Z.response:Z.responseText}e.dsv=function(Z,se){var Pe=new RegExp('["'+Z+`
]`),Xe=Z.charCodeAt(0);function Qe(Cr,zr,fi){arguments.length<3&&(fi=zr,zr=null);var $r=Ti(Cr,se,zr==null?st:jt(zr),fi);return $r.row=function(Bi){return arguments.length?$r.response((zr=Bi)==null?st:jt(Bi)):zr},$r}function st(Cr){return Qe.parse(Cr.responseText)}function jt(Cr){return function(zr){return Qe.parse(zr.responseText,Cr)}}Qe.parse=function(Cr,zr){var fi;return Qe.parseRows(Cr,function($r,Bi){if(fi)return fi($r,Bi-1);var fn=function(mi){for(var zi={},ji=$r.length,pn=0;pn<ji;++pn)zi[$r[pn]]=mi[pn];return zi};fi=zr?function(mi,zi){return zr(fn(mi),zi)}:fn})},Qe.parseRows=function(Cr,zr){var fi={},$r={},Bi=[],fn=Cr.length,mi=0,zi=0,ji,pn;function sn(){if(mi>=fn)return $r;if(pn)return pn=!1,fi;var xo=mi;if(Cr.charCodeAt(xo)===34){for(var no=xo;no++<fn;)if(Cr.charCodeAt(no)===34){if(Cr.charCodeAt(no+1)!==34)break;++no}mi=no+2;var Xo=Cr.charCodeAt(no+1);return Xo===13?(pn=!0,Cr.charCodeAt(no+2)===10&&++mi):Xo===10&&(pn=!0),Cr.slice(xo+1,no).replace(/""/g,'"')}for(;mi<fn;){var Xo=Cr.charCodeAt(mi++),js=1;if(Xo===10)pn=!0;else if(Xo===13)pn=!0,Cr.charCodeAt(mi)===10&&(++mi,++js);else if(Xo!==Xe)continue;return Cr.slice(xo,mi-js)}return Cr.slice(xo)}for(;(ji=sn())!==$r;){for(var wi=[];ji!==fi&&ji!==$r;)wi.push(ji),ji=sn();zr&&(wi=zr(wi,zi++))==null||Bi.push(wi)}return Bi},Qe.format=function(Cr){if(Array.isArray(Cr[0]))return Qe.formatRows(Cr);var zr=new U,fi=[];return Cr.forEach(function($r){for(var Bi in $r)zr.has(Bi)||fi.push(zr.add(Bi))}),[fi.map(hr).join(Z)].concat(Cr.map(function($r){return fi.map(function(Bi){return hr($r[Bi])}).join(Z)})).join(`
`)},Qe.formatRows=function(Cr){return Cr.map(_t).join(`
`)};function _t(Cr){return Cr.map(hr).join(Z)}function hr(Cr){return Pe.test(Cr)?'"'+Cr.replace(/\"/g,'""')+'"':Cr}return Qe},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Xi,aa,Mn,Un,Ga=this[W(this,"requestAnimationFrame")]||function(Z){setTimeout(Z,17)};e.timer=function(){ma.apply(this,arguments)};function ma(Z,se,Pe){var Xe=arguments.length;Xe<2&&(se=0),Xe<3&&(Pe=Date.now());var Qe=Pe+se,st={c:Z,t:Qe,n:null};return aa?aa.n=st:Xi=st,aa=st,Mn||(Un=clearTimeout(Un),Mn=1,Ga(oa)),st}function oa(){var Z=ka(),se=so()-Z;se>24?(isFinite(se)&&(clearTimeout(Un),Un=setTimeout(oa,se)),Mn=0):(Mn=1,Ga(oa))}e.timer.flush=function(){ka(),so()};function ka(){for(var Z=Date.now(),se=Xi;se;)Z>=se.t&&se.c(Z-se.t)&&(se.c=null),se=se.n;return Z}function so(){for(var Z,se=Xi,Pe=1/0;se;)se.c?(se.t<Pe&&(Pe=se.t),se=(Z=se).n):se=Z?Z.n=se.n:Xi=se.n;return aa=Z,Pe}e.round=function(Z,se){return se?Math.round(Z*(se=Math.pow(10,se)))/se:Math.round(Z)},e.geom={};function Kr(Z){return Z[0]}function Ia(Z){return Z[1]}e.geom.hull=function(Z){var se=Kr,Pe=Ia;if(arguments.length)return Xe(Z);function Xe(Qe){if(Qe.length<3)return[];var st=gr(se),jt=gr(Pe),_t,hr=Qe.length,Cr=[],zr=[];for(_t=0;_t<hr;_t++)Cr.push([+st.call(this,Qe[_t],_t),+jt.call(this,Qe[_t],_t),_t]);for(Cr.sort(fa),_t=0;_t<hr;_t++)zr.push([Cr[_t][0],-Cr[_t][1]]);var fi=Yo(Cr),$r=Yo(zr),Bi=$r[0]===fi[0],fn=$r[$r.length-1]===fi[fi.length-1],mi=[];for(_t=fi.length-1;_t>=0;--_t)mi.push(Qe[Cr[fi[_t]][2]]);for(_t=+Bi;_t<$r.length-fn;++_t)mi.push(Qe[Cr[$r[_t]][2]]);return mi}return Xe.x=function(Qe){return arguments.length?(se=Qe,Xe):se},Xe.y=function(Qe){return arguments.length?(Pe=Qe,Xe):Pe},Xe};function Yo(Z){for(var se=Z.length,Pe=[0,1],Xe=2,Qe=2;Qe<se;Qe++){for(;Xe>1&&zt(Z[Pe[Xe-2]],Z[Pe[Xe-1]],Z[Qe])<=0;)--Xe;Pe[Xe++]=Qe}return Pe.slice(0,Xe)}function fa(Z,se){return Z[0]-se[0]||Z[1]-se[1]}e.geom.polygon=function(Z){return te(Z,kn),Z};var kn=e.geom.polygon.prototype=[];kn.area=function(){for(var Z=-1,se=this.length,Pe,Xe=this[se-1],Qe=0;++Z<se;)Pe=Xe,Xe=this[Z],Qe+=Pe[1]*Xe[0]-Pe[0]*Xe[1];return Qe*.5},kn.centroid=function(Z){var se=-1,Pe=this.length,Xe=0,Qe=0,st,jt=this[Pe-1],_t;for(arguments.length||(Z=-1/(6*this.area()));++se<Pe;)st=jt,jt=this[se],_t=st[0]*jt[1]-jt[0]*st[1],Xe+=(st[0]+jt[0])*_t,Qe+=(st[1]+jt[1])*_t;return[Xe*Z,Qe*Z]},kn.clip=function(Z){for(var se,Pe=uo(Z),Xe=-1,Qe=this.length-uo(this),st,jt,_t=this[Qe-1],hr,Cr,zr;++Xe<Qe;){for(se=Z.slice(),Z.length=0,hr=this[Xe],Cr=se[(jt=se.length-Pe)-1],st=-1;++st<jt;)zr=se[st],Aa(zr,_t,hr)?(Aa(Cr,_t,hr)||Z.push(ys(Cr,zr,_t,hr)),Z.push(zr)):Aa(Cr,_t,hr)&&Z.push(ys(Cr,zr,_t,hr)),Cr=zr;Pe&&Z.push(Z[0]),_t=hr}return Z};function Aa(Z,se,Pe){return(Pe[0]-se[0])*(Z[1]-se[1])<(Pe[1]-se[1])*(Z[0]-se[0])}function ys(Z,se,Pe,Xe){var Qe=Z[0],st=Pe[0],jt=se[0]-Qe,_t=Xe[0]-st,hr=Z[1],Cr=Pe[1],zr=se[1]-hr,fi=Xe[1]-Cr,$r=(_t*(hr-Cr)-fi*(Qe-st))/(fi*jt-_t*zr);return[Qe+$r*jt,hr+$r*zr]}function uo(Z){var se=Z[0],Pe=Z[Z.length-1];return!(se[0]-Pe[0]||se[1]-Pe[1])}var ls,$a,fo,mn=[],ra,wa,ws=[];function Co(){No(this),this.edge=this.site=this.circle=null}function Po(Z){var se=mn.pop()||new Co;return se.site=Z,se}function Wi(Z){Sa(Z),fo.remove(Z),mn.push(Z),No(Z)}function gn(Z){var se=Z.circle,Pe=se.x,Xe=se.cy,Qe={x:Pe,y:Xe},st=Z.P,jt=Z.N,_t=[Z];Wi(Z);for(var hr=st;hr.circle&&v(Pe-hr.circle.x)<Oe&&v(Xe-hr.circle.cy)<Oe;)st=hr.P,_t.unshift(hr),Wi(hr),hr=st;_t.unshift(hr),Sa(hr);for(var Cr=jt;Cr.circle&&v(Pe-Cr.circle.x)<Oe&&v(Xe-Cr.circle.cy)<Oe;)jt=Cr.N,_t.push(Cr),Wi(Cr),Cr=jt;_t.push(Cr),Sa(Cr);var zr=_t.length,fi;for(fi=1;fi<zr;++fi)Cr=_t[fi],hr=_t[fi-1],ps(Cr.edge,hr.site,Cr.site,Qe);hr=_t[0],Cr=_t[zr-1],Cr.edge=vo(hr.site,Cr.site,null,Qe),Hi(hr),Hi(Cr)}function Ps(Z){for(var se=Z.x,Pe=Z.y,Xe,Qe,st,jt,_t=fo._;_t;)if(st=Ha(_t,Pe)-se,st>Oe)_t=_t.L;else if(jt=se-Sn(_t,Pe),jt>Oe){if(!_t.R){Xe=_t;break}_t=_t.R}else{st>-Oe?(Xe=_t.P,Qe=_t):jt>-Oe?(Xe=_t,Qe=_t.N):Xe=Qe=_t;break}var hr=Po(Z);if(fo.insert(Xe,hr),!(!Xe&&!Qe)){if(Xe===Qe){Sa(Xe),Qe=Po(Xe.site),fo.insert(hr,Qe),hr.edge=Qe.edge=vo(Xe.site,hr.site),Hi(Xe),Hi(Qe);return}if(!Qe){hr.edge=vo(Xe.site,hr.site);return}Sa(Xe),Sa(Qe);var Cr=Xe.site,zr=Cr.x,fi=Cr.y,$r=Z.x-zr,Bi=Z.y-fi,fn=Qe.site,mi=fn.x-zr,zi=fn.y-fi,ji=2*($r*zi-Bi*mi),pn=$r*$r+Bi*Bi,sn=mi*mi+zi*zi,wi={x:(zi*pn-Bi*sn)/ji+zr,y:($r*sn-mi*pn)/ji+fi};ps(Qe.edge,Cr,fn,wi),hr.edge=vo(Cr,Z,null,wi),Qe.edge=vo(Z,fn,null,wi),Hi(Xe),Hi(Qe)}}function Ha(Z,se){var Pe=Z.site,Xe=Pe.x,Qe=Pe.y,st=Qe-se;if(!st)return Xe;var jt=Z.P;if(!jt)return-1/0;Pe=jt.site;var _t=Pe.x,hr=Pe.y,Cr=hr-se;if(!Cr)return _t;var zr=_t-Xe,fi=1/st-1/Cr,$r=zr/Cr;return fi?(-$r+Math.sqrt($r*$r-2*fi*(zr*zr/(-2*Cr)-hr+Cr/2+Qe-st/2)))/fi+Xe:(Xe+_t)/2}function Sn(Z,se){var Pe=Z.N;if(Pe)return Ha(Pe,se);var Xe=Z.site;return Xe.y===se?Xe.x:1/0}function ao(Z){this.site=Z,this.edges=[]}ao.prototype.prepare=function(){for(var Z=this.edges,se=Z.length,Pe;se--;)Pe=Z[se].edge,(!Pe.b||!Pe.a)&&Z.splice(se,1);return Z.sort(Ko),Z.length};function Ba(Z){for(var se=Z[0][0],Pe=Z[1][0],Xe=Z[0][1],Qe=Z[1][1],st,jt,_t,hr,Cr=$a,zr=Cr.length,fi,$r,Bi,fn,mi,zi;zr--;)if(fi=Cr[zr],!(!fi||!fi.prepare()))for(Bi=fi.edges,fn=Bi.length,$r=0;$r<fn;)zi=Bi[$r].end(),_t=zi.x,hr=zi.y,mi=Bi[++$r%fn].start(),st=mi.x,jt=mi.y,(v(_t-st)>Oe||v(hr-jt)>Oe)&&(Bi.splice($r,0,new co(Ts(fi.site,zi,v(_t-se)<Oe&&Qe-hr>Oe?{x:se,y:v(st-se)<Oe?jt:Qe}:v(hr-Qe)<Oe&&Pe-_t>Oe?{x:v(jt-Qe)<Oe?st:Pe,y:Qe}:v(_t-Pe)<Oe&&hr-Xe>Oe?{x:Pe,y:v(st-Pe)<Oe?jt:Xe}:v(hr-Xe)<Oe&&_t-se>Oe?{x:v(jt-Xe)<Oe?st:se,y:Xe}:null),fi.site,null)),++fn)}function Ko(Z,se){return se.angle-Z.angle}function Qo(){No(this),this.x=this.y=this.arc=this.site=this.cy=null}function Hi(Z){var se=Z.P,Pe=Z.N;if(!(!se||!Pe)){var Xe=se.site,Qe=Z.site,st=Pe.site;if(Xe!==st){var jt=Qe.x,_t=Qe.y,hr=Xe.x-jt,Cr=Xe.y-_t,zr=st.x-jt,zi=st.y-_t,fi=2*(hr*zi-Cr*zr);if(!(fi>=-Ie)){var $r=hr*hr+Cr*Cr,Bi=zr*zr+zi*zi,fn=(zi*$r-Cr*Bi)/fi,mi=(hr*Bi-zr*$r)/fi,zi=mi+_t,ji=ws.pop()||new Qo;ji.arc=Z,ji.site=Qe,ji.x=fn+jt,ji.y=zi+Math.sqrt(fn*fn+mi*mi),ji.cy=zi,Z.circle=ji;for(var pn=null,sn=wa._;sn;)if(ji.y<sn.y||ji.y===sn.y&&ji.x<=sn.x)if(sn.L)sn=sn.L;else{pn=sn.P;break}else if(sn.R)sn=sn.R;else{pn=sn;break}wa.insert(pn,ji),pn||(ra=ji)}}}}function Sa(Z){var se=Z.circle;se&&(se.P||(ra=se.N),wa.remove(se),ws.push(se),No(se),Z.circle=null)}function Qa(Z,se,Pe,Xe){return function(Qe){var st=Qe.a,jt=Qe.b,_t=st.x,hr=st.y,Cr=jt.x,zr=jt.y,fi=0,$r=1,Bi=Cr-_t,fn=zr-hr,mi;if(mi=Z-_t,!(!Bi&&mi>0)){if(mi/=Bi,Bi<0){if(mi<fi)return;mi<$r&&($r=mi)}else