d3-svg-annotation
Version:
Full documentation: [http://d3-annotation.susielu.com](http://d3-annotation.susielu.com)
2 lines • 81.4 kB
JavaScript
!function t(n,e,i){function o(a,s){if(!e[a]){if(!n[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var h=e[a]={exports:{}};n[a][0].call(h.exports,function(t){var e=n[a][1][t];return o(e?e:t)},h,h.exports,t,n,e,i)}return e[a].exports}for(var r="function"==typeof require&&require,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,e){!function(t,i){"object"==typeof e&&void 0!==n?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function n(){for(var t,n=0,i=arguments.length,o={};n<i;++n){if(!(t=arguments[n]+"")||t in o)throw new Error("illegal type: "+t);o[t]=[]}return new e(o)}function e(t){this._=t}function i(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function o(t,n){for(var e,i=0,o=t.length;i<o;++i)if((e=t[i]).name===n)return e.value}function r(t,n,e){for(var i=0,o=t.length;i<o;++i)if(t[i].name===n){t[i]=a,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=e&&t.push({name:n,value:e}),t}var a={value:function(){}};e.prototype=n.prototype={constructor:e,on:function(t,n){var e,a=this._,s=i(t+"",a),c=-1,u=s.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++c<u;)if(e=(t=s[c]).type)a[e]=r(a[e],t.name,n);else if(null==n)for(e in a)a[e]=r(a[e],t.name,null);return this}for(;++c<u;)if((e=(t=s[c]).type)&&(e=o(a[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var i in n)t[i]=n[i].slice();return new e(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,i,o=new Array(e),r=0;r<e;++r)o[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],r=0,e=i.length;r<e;++r)i[r].value.apply(n,o)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],o=0,r=i.length;o<r;++o)i[o].value.apply(n,e)}},t.dispatch=n,Object.defineProperty(t,"__esModule",{value:!0})})},{}],2:[function(t,n,e){!function(i,o){"object"==typeof e&&void 0!==n?o(e,t("d3-dispatch"),t("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection"],o):o(i.d3=i.d3||{},i.d3,i.d3)}(this,function(t,n,e){"use strict";function i(){e.event.stopImmediatePropagation()}function o(t,n){var i=t.document.documentElement,o=e.select(t).on("dragstart.drag",null);n&&(o.on("click.drag",u,!0),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in i?o.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}function r(t,n,e,i,o,r,a,s,c,u){this.target=t,this.type=n,this.subject=e,this.identifier=i,this.active=o,this.x=r,this.y=a,this.dx=s,this.dy=c,this._=u}function a(){return!e.event.button}function s(){return this.parentNode}function c(t){return null==t?{x:e.event.x,y:e.event.y}:t}var u=function(){e.event.preventDefault(),e.event.stopImmediatePropagation()},h=function(t){var n=t.document.documentElement,i=e.select(t).on("dragstart.drag",u,!0);"onselectstart"in n?i.on("selectstart.drag",u,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")},l=function(t){return function(){return t}};r.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var f=function(){function t(t){t.on("mousedown.drag",f).on("touchstart.drag",p).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",v).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){if(!m&&b.apply(this,arguments)){var t=x("mouse",w.apply(this,arguments),e.mouse,this,arguments);t&&(e.select(e.event.view).on("mousemove.drag",d,!0).on("mouseup.drag",_,!0),h(e.event.view),i(),g=!1,t("start"))}}function d(){u(),g=!0,T.mouse("drag")}function _(){e.select(e.event.view).on("mousemove.drag mouseup.drag",null),o(e.event.view,g),u(),T.mouse("end")}function p(){if(b.apply(this,arguments)){var t,n,o=e.event.changedTouches,r=w.apply(this,arguments),a=o.length;for(t=0;t<a;++t)(n=x(o[t].identifier,r,e.touch,this,arguments))&&(i(),n("start"))}}function y(){var t,n,i=e.event.changedTouches,o=i.length;for(t=0;t<o;++t)(n=T[i[t].identifier])&&(u(),n("drag"))}function v(){var t,n,o=e.event.changedTouches,r=o.length;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),t=0;t<r;++t)(n=T[o[t].identifier])&&(i(),n("end"))}function x(n,i,o,a,s){var c,u,h,l=o(i,n),f=j.copy();if(e.customEvent(new r(t,"beforestart",c,n,N,l[0],l[1],0,0,f),function(){return null!=(e.event.subject=c=M.apply(a,s))&&(u=c.x-l[0]||0,h=c.y-l[1]||0,!0)}))return function d(_){var p,y=l;switch(_){case"start":T[n]=d,p=N++;break;case"end":delete T[n],--N;case"drag":l=o(i,n),p=N}e.customEvent(new r(t,_,c,n,p,l[0]+u,l[1]+h,l[0]-y[0],l[1]-y[1],f),f.apply,f,[_,a,s])}}var g,m,b=a,w=s,M=c,T={},j=n.dispatch("start","drag","end"),N=0;return t.filter=function(n){return arguments.length?(b="function"==typeof n?n:l(!!n),t):b},t.container=function(n){return arguments.length?(w="function"==typeof n?n:l(n),t):w},t.subject=function(n){return arguments.length?(M="function"==typeof n?n:l(n),t):M},t.on=function(){var n=j.on.apply(j,arguments);return n===j?t:n},t};t.drag=f,t.dragDisable=h,t.dragEnable=o,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-dispatch":1,"d3-selection":4}],3:[function(t,n,e){!function(t,i){"object"==typeof e&&void 0!==n?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function n(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function e(){return new n}var i=Math.PI,o=2*i,r=1e-6,a=o-r;n.prototype=e.prototype={constructor:n,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,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,o,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,e,o,a){t=+t,n=+n,e=+e,o=+o,a=+a;var s=this._x1,c=this._y1,u=e-t,h=o-n,l=s-t,f=c-n,d=l*l+f*f;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(d>r)if(Math.abs(f*u-h*l)>r&&a){var _=e-s,p=o-c,y=u*u+h*h,v=_*_+p*p,x=Math.sqrt(y),g=Math.sqrt(d),m=a*Math.tan((i-Math.acos((y+d-v)/(2*x*g)))/2),b=m/g,w=m/x;Math.abs(b-1)>r&&(this._+="L"+(t+b*l)+","+(n+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*_>l*p)+","+(this._x1=t+w*u)+","+(this._y1=n+w*h)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,s,c,u){t=+t,n=+n,e=+e;var h=e*Math.cos(s),l=e*Math.sin(s),f=t+h,d=n+l,_=1^u,p=u?s-c:c-s;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+f+","+d:(Math.abs(this._x1-f)>r||Math.abs(this._y1-d)>r)&&(this._+="L"+f+","+d),e&&(p>a?this._+="A"+e+","+e+",0,1,"+_+","+(t-h)+","+(n-l)+"A"+e+","+e+",0,1,"+_+","+(this._x1=f)+","+(this._y1=d):(p<0&&(p=p%o+o),this._+="A"+e+","+e+",0,"+ +(p>=i)+","+_+","+(this._x1=t+e*Math.cos(c))+","+(this._y1=n+e*Math.sin(c))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}},t.path=e,Object.defineProperty(t,"__esModule",{value:!0})})},{}],4:[function(t,n,e){!function(t,i){"object"==typeof e&&void 0!==n?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Yt.hasOwnProperty(n)?{space:Yt[n],local:t}:t}function e(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Wt&&n.documentElement.namespaceURI===Wt?n.createElement(t):n.createElementNS(e,t)}}function i(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var o=n(t);return(o.local?i:e)(o)}function r(){return new a}function a(){this._="@"+(++zt).toString(36)}function s(t,n,e){return t=c(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function c(n,e,i){return function(o){var r=t.event;t.event=o;try{n.call(this,this.__data__,e,i)}finally{t.event=r}}}function u(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 h(t){return function(){var n=this.__on;if(n){for(var e,i=0,o=-1,r=n.length;i<r;++i)e=n[i],t.type&&e.type!==t.type||e.name!==t.name?n[++o]=e:this.removeEventListener(e.type,e.listener,e.capture);++o?n.length=o:delete this.__on}}}function l(t,n,e){var i=Ft.hasOwnProperty(t.type)?s:c;return function(o,r,a){var s,c=this.__on,u=i(n,r,a);if(c)for(var h=0,l=c.length;h<l;++h)if((s=c[h]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=e),void(s.value=n);this.addEventListener(t.type,u,e),s={type:t.type,name:t.name,value:n,listener:u,capture:e},c?c.push(s):this.__on=[s]}}function f(t,n,e){var i,o,r=u(t+""),a=r.length;{if(!(arguments.length<2)){for(s=n?l:h,null==e&&(e=!1),i=0;i<a;++i)this.each(s(r[i],n,e));return this}var s=this.node().__on;if(s)for(var c,f=0,d=s.length;f<d;++f)for(i=0,c=s[f];i<a;++i)if((o=r[i]).type===c.type&&o.name===c.name)return c.value}}function d(n,e,i,o){var r=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(i,o)}finally{t.event=r}}function _(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function p(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=n.clientX,i.y=n.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var o=t.getBoundingClientRect();return[n.clientX-o.left-t.clientLeft,n.clientY-o.top-t.clientTop]}function y(t){var n=_();return n.changedTouches&&(n=n.changedTouches[0]),p(t,n)}function v(){}function x(t){return null==t?v:function(){return this.querySelector(t)}}function g(t){"function"!=typeof t&&(t=x(t));for(var n=this._groups,e=n.length,i=new Array(e),o=0;o<e;++o)for(var r,a,s=n[o],c=s.length,u=i[o]=new Array(c),h=0;h<c;++h)(r=s[h])&&(a=t.call(r,r.__data__,h,s))&&("__data__"in r&&(a.__data__=r.__data__),u[h]=a);return new Rt(i,this._parents)}function m(){return[]}function b(t){return null==t?m:function(){return this.querySelectorAll(t)}}function w(t){"function"!=typeof t&&(t=b(t));for(var n=this._groups,e=n.length,i=[],o=[],r=0;r<e;++r)for(var a,s=n[r],c=s.length,u=0;u<c;++u)(a=s[u])&&(i.push(t.call(a,a.__data__,u,s)),o.push(a));return new Rt(i,o)}function M(t){"function"!=typeof t&&(t=Gt(t));for(var n=this._groups,e=n.length,i=new Array(e),o=0;o<e;++o)for(var r,a=n[o],s=a.length,c=i[o]=[],u=0;u<s;++u)(r=a[u])&&t.call(r,r.__data__,u,a)&&c.push(r);return new Rt(i,this._parents)}function T(t){return new Array(t.length)}function j(){return new Rt(this._enter||this._groups.map(T),this._parents)}function N(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function k(t){return function(){return t}}function S(t,n,e,i,o,r){for(var a,s=0,c=n.length,u=r.length;s<u;++s)(a=n[s])?(a.__data__=r[s],i[s]=a):e[s]=new N(t,r[s]);for(;s<c;++s)(a=n[s])&&(o[s]=a)}function O(t,n,e,i,o,r,a){var s,c,u,h={},l=n.length,f=r.length,d=new Array(l);for(s=0;s<l;++s)(c=n[s])&&(d[s]=u=Jt+a.call(c,c.__data__,s,n),u in h?o[s]=c:h[u]=c);for(s=0;s<f;++s)u=Jt+a.call(t,r[s],s,r),(c=h[u])?(i[s]=c,c.__data__=r[s],h[u]=null):e[s]=new N(t,r[s]);for(s=0;s<l;++s)(c=n[s])&&h[d[s]]===c&&(o[s]=c)}function C(t,n){if(!t)return d=new Array(this.size()),u=-1,this.each(function(t){d[++u]=t}),d;var e=n?O:S,i=this._parents,o=this._groups;"function"!=typeof t&&(t=k(t));for(var r=o.length,a=new Array(r),s=new Array(r),c=new Array(r),u=0;u<r;++u){var h=i[u],l=o[u],f=l.length,d=t.call(h,h&&h.__data__,u,i),_=d.length,p=s[u]=new Array(_),y=a[u]=new Array(_);e(h,l,p,y,c[u]=new Array(f),d,n);for(var v,x,g=0,m=0;g<_;++g)if(v=p[g]){for(g>=m&&(m=g+1);!(x=y[m])&&++m<_;);v._next=x||null}}return a=new Rt(a,i),a._enter=s,a._exit=c,a}function P(){return new Rt(this._exit||this._groups.map(T),this._parents)}function A(t){for(var n=this._groups,e=t._groups,i=n.length,o=e.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var c,u=n[s],h=e[s],l=u.length,f=a[s]=new Array(l),d=0;d<l;++d)(c=u[d]||h[d])&&(f[d]=c);for(;s<i;++s)a[s]=n[s];return new Rt(a,this._parents)}function E(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var i,o=t[n],r=o.length-1,a=o[r];--r>=0;)(i=o[r])&&(a&&a!==i.nextSibling&&a.parentNode.insertBefore(i,a),a=i);return this}function B(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=R);for(var e=this._groups,i=e.length,o=new Array(i),r=0;r<i;++r){for(var a,s=e[r],c=s.length,u=o[r]=new Array(c),h=0;h<c;++h)(a=s[h])&&(u[h]=a);u.sort(n)}return new Rt(o,this._parents).order()}function R(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function q(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function H(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function D(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var i=t[n],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function L(){var t=0;return this.each(function(){++t}),t}function X(){return!this.node()}function W(t){for(var n=this._groups,e=0,i=n.length;e<i;++e)for(var o,r=n[e],a=0,s=r.length;a<s;++a)(o=r[a])&&t.call(o,o.__data__,a,r);return this}function Y(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I(t,n){return function(){this.setAttribute(t,n)}}function U(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function V(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function G(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)}}function F(t,e){var i=n(t);if(arguments.length<2){var o=this.node();return i.local?o.getAttributeNS(i.space,i.local):o.getAttribute(i)}return this.each((null==e?i.local?z:Y:"function"==typeof e?i.local?G:V:i.local?U:I)(i,e))}function J(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Z(t){return function(){this.style.removeProperty(t)}}function Q(t,n,e){return function(){this.style.setProperty(t,n,e)}}function $(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function K(t,n,e){var i;return arguments.length>1?this.each((null==n?Z:"function"==typeof n?$:Q)(t,n,null==e?"":e)):J(i=this.node()).getComputedStyle(i,null).getPropertyValue(t)}function tt(t){return function(){delete this[t]}}function nt(t,n){return function(){this[t]=n}}function et(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function it(t,n){return arguments.length>1?this.each((null==n?tt:"function"==typeof n?et:nt)(t,n)):this.node()[t]}function ot(t){return t.trim().split(/^|\s+/)}function rt(t){return t.classList||new at(t)}function at(t){this._node=t,this._names=ot(t.getAttribute("class")||"")}function st(t,n){for(var e=rt(t),i=-1,o=n.length;++i<o;)e.add(n[i])}function ct(t,n){for(var e=rt(t),i=-1,o=n.length;++i<o;)e.remove(n[i])}function ut(t){return function(){st(this,t)}}function ht(t){return function(){ct(this,t)}}function lt(t,n){return function(){(n.apply(this,arguments)?st:ct)(this,t)}}function ft(t,n){var e=ot(t+"");if(arguments.length<2){for(var i=rt(this.node()),o=-1,r=e.length;++o<r;)if(!i.contains(e[o]))return!1;return!0}return this.each(("function"==typeof n?lt:n?ut:ht)(e,n))}function dt(){this.textContent=""}function _t(t){return function(){this.textContent=t}}function pt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function yt(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?pt:_t)(t)):this.node().textContent}function vt(){this.innerHTML=""}function xt(t){return function(){this.innerHTML=t}}function gt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function mt(t){return arguments.length?this.each(null==t?vt:("function"==typeof t?gt:xt)(t)):this.node().innerHTML}function bt(){this.nextSibling&&this.parentNode.appendChild(this)}function wt(){return this.each(bt)}function Mt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Tt(){return this.each(Mt)}function jt(t){var n="function"==typeof t?t:o(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function Nt(){return null}function kt(t,n){var e="function"==typeof t?t:o(t),i=null==n?Nt:"function"==typeof n?n:x(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})}function St(){var t=this.parentNode;t&&t.removeChild(this)}function Ot(){return this.each(St)}function Ct(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Pt(t,n,e){var i=J(t),o=i.CustomEvent;o?o=new o(n,e):(o=i.document.createEvent("Event"),e?(o.initEvent(n,e.bubbles,e.cancelable),o.detail=e.detail):o.initEvent(n,!1,!1)),t.dispatchEvent(o)}function At(t,n){return function(){return Pt(this,t,n)}}function Et(t,n){return function(){return Pt(this,t,n.apply(this,arguments))}}function Bt(t,n){return this.each(("function"==typeof n?Et:At)(t,n))}function Rt(t,n){this._groups=t,this._parents=n}function qt(){return new Rt([[document.documentElement]],Zt)}function Ht(t){return"string"==typeof t?new Rt([[document.querySelector(t)]],[document.documentElement]):new Rt([[t]],Zt)}function Dt(t){return"string"==typeof t?new Rt([document.querySelectorAll(t)],[document.documentElement]):new Rt([null==t?[]:t],Zt)}function Lt(t,n,e){arguments.length<3&&(e=n,n=_().changedTouches);for(var i,o=0,r=n?n.length:0;o<r;++o)if((i=n[o]).identifier===e)return p(t,i);return null}function Xt(t,n){null==n&&(n=_().touches);for(var e=0,i=n?n.length:0,o=new Array(i);e<i;++e)o[e]=p(t,n[e]);return o}var Wt="http://www.w3.org/1999/xhtml",Yt={svg:"http://www.w3.org/2000/svg",xhtml:Wt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},zt=0;a.prototype=r.prototype={constructor:a,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var It=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Ut=document.documentElement;if(!Ut.matches){var Vt=Ut.webkitMatchesSelector||Ut.msMatchesSelector||Ut.mozMatchesSelector||Ut.oMatchesSelector;It=function(t){return function(){return Vt.call(this,t)}}}}var Gt=It,Ft={};if(t.event=null,"undefined"!=typeof document){"onmouseenter"in document.documentElement||(Ft={mouseenter:"mouseover",mouseleave:"mouseout"})}N.prototype={constructor:N,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)}};var Jt="$";at.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}};var Zt=[null];Rt.prototype=qt.prototype={constructor:Rt,select:g,selectAll:w,filter:M,data:C,enter:j,exit:P,merge:A,order:E,sort:B,call:q,nodes:H,node:D,size:L,empty:X,each:W,attr:F,style:K,property:it,classed:ft,text:yt,html:mt,raise:wt,lower:Tt,append:jt,insert:kt,remove:Ot,datum:Ct,on:f,dispatch:Bt},t.creator=o,t.local=r,t.matcher=Gt,t.mouse=y,t.namespace=n,t.namespaces=Yt,t.select=Ht,t.selectAll=Dt,t.selection=qt,t.selector=x,t.selectorAll=b,t.touch=Lt,t.touches=Xt,t.window=J,t.customEvent=d,Object.defineProperty(t,"__esModule",{value:!0})})},{}],5:[function(t,n,e){!function(i,o){"object"==typeof e&&void 0!==n?o(e,t("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-path"],o):o(i.d3=i.d3||{},i.d3)}(this,function(t,n){"use strict";function e(t){return t.innerRadius}function i(t){return t.outerRadius}function o(t){return t.startAngle}function r(t){return t.endAngle}function a(t){return t&&t.padAngle}function s(t){return t>=1?J:t<=-1?-J:Math.asin(t)}function c(t,n,e,i,o,r,a,s){var c=e-t,u=i-n,h=a-o,l=s-r,f=(h*(n-r)-l*(t-o))/(l*c-h*u);return[t+f*c,n+f*u]}function u(t,n,e,i,o,r,a){var s=t-e,c=n-i,u=(a?r:-r)/Math.sqrt(s*s+c*c),h=u*c,l=-u*s,f=t+h,d=n+l,_=e+h,p=i+l,y=(f+_)/2,v=(d+p)/2,x=_-f,g=p-d,m=x*x+g*g,b=o-r,w=f*p-_*d,M=(g<0?-1:1)*Math.sqrt(Math.max(0,b*b*m-w*w)),T=(w*g-x*M)/m,j=(-w*x-g*M)/m,N=(w*g+x*M)/m,k=(-w*x+g*M)/m,S=T-y,O=j-v,C=N-y,P=k-v;return S*S+O*O>C*C+P*P&&(T=N,j=k),{cx:T,cy:j,x01:-h,y01:-l,x11:T*(o/b-1),y11:j*(o/b-1)}}function h(t){this._context=t}function l(t){return t[0]}function f(t){return t[1]}function d(t){this._curve=t}function _(t){function n(n){return new d(t(n))}return n._curve=t,n}function p(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(_(t)):n()._curve},t}function y(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function v(t){this._context=t}function x(t){this._context=t}function g(t){this._context=t}function m(t,n){this._basis=new v(t),this._beta=n}function b(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function w(t,n){this._context=t,this._k=(1-n)/6}function M(t,n){this._context=t,this._k=(1-n)/6}function T(t,n){this._context=t,this._k=(1-n)/6}function j(t,n,e){var i=t._x1,o=t._y1,r=t._x2,a=t._y2;if(t._l01_a>G){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,o=(o*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>G){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*u+t._x1*t._l23_2a-n*t._l12_2a)/h,a=(a*u+t._y1*t._l23_2a-e*t._l12_2a)/h}t._context.bezierCurveTo(i,o,r,a,t._x2,t._y2)}function N(t,n){this._context=t,this._alpha=n}function k(t,n){this._context=t,this._alpha=n}function S(t,n){this._context=t,this._alpha=n}function O(t){this._context=t}function C(t){return t<0?-1:1}function P(t,n,e){var i=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(i||o<0&&-0),a=(e-t._y1)/(o||i<0&&-0),s=(r*o+a*i)/(i+o);return(C(r)+C(a))*Math.min(Math.abs(r),Math.abs(a),.5*Math.abs(s))||0}function A(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function E(t,n,e){var i=t._x0,o=t._y0,r=t._x1,a=t._y1,s=(r-i)/3;t._context.bezierCurveTo(i+s,o+s*n,r-s,a-s*e,r,a)}function B(t){this._context=t}function R(t){this._context=new q(t)}function q(t){this._context=t}function H(t){return new B(t)}function D(t){return new R(t)}function L(t){this._context=t}function X(t){var n,e,i=t.length-1,o=new Array(i),r=new Array(i),a=new Array(i);for(o[0]=0,r[0]=2,a[0]=t[0]+2*t[1],n=1;n<i-1;++n)o[n]=1,r[n]=4,a[n]=4*t[n]+2*t[n+1];for(o[i-1]=2,r[i-1]=7,a[i-1]=8*t[i-1]+t[i],n=1;n<i;++n)e=o[n]/r[n-1],r[n]-=e,a[n]-=e*a[n-1];for(o[i-1]=a[i-1]/r[i-1],n=i-2;n>=0;--n)o[n]=(a[n]-o[n+1])/r[n];for(r[i-1]=(t[i]+o[i-1])/2,n=0;n<i-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function W(t,n){this._context=t,this._t=n}function Y(t){return new W(t,0)}function z(t){return new W(t,1)}function I(t,n){return t[n]}function U(t){for(var n,e=0,i=-1,o=t.length;++i<o;)(n=+t[i][1])&&(e+=n);return e}var V=function(t){return function(){return t}},G=1e-12,F=Math.PI,J=F/2,Z=2*F,Q=function(){function t(){var t,e,i=+h.apply(this,arguments),o=+l.apply(this,arguments),r=_.apply(this,arguments)-J,a=p.apply(this,arguments)-J,x=Math.abs(a-r),g=a>r;if(v||(v=t=n.path()),o<i&&(e=o,o=i,i=e),o>G)if(x>Z-G)v.moveTo(o*Math.cos(r),o*Math.sin(r)),v.arc(0,0,o,r,a,!g),i>G&&(v.moveTo(i*Math.cos(a),i*Math.sin(a)),v.arc(0,0,i,a,r,g));else{var m,b,w=r,M=a,T=r,j=a,N=x,k=x,S=y.apply(this,arguments)/2,O=S>G&&(d?+d.apply(this,arguments):Math.sqrt(i*i+o*o)),C=Math.min(Math.abs(o-i)/2,+f.apply(this,arguments)),P=C,A=C;if(O>G){var E=s(O/i*Math.sin(S)),B=s(O/o*Math.sin(S));(N-=2*E)>G?(E*=g?1:-1,T+=E,j-=E):(N=0,T=j=(r+a)/2),(k-=2*B)>G?(B*=g?1:-1,w+=B,M-=B):(k=0,w=M=(r+a)/2)}var R=o*Math.cos(w),q=o*Math.sin(w),H=i*Math.cos(j),D=i*Math.sin(j);if(C>G){var L=o*Math.cos(M),X=o*Math.sin(M),W=i*Math.cos(T),Y=i*Math.sin(T);if(x<F){var z=N>G?c(R,q,W,Y,L,X,H,D):[H,D],I=R-z[0],U=q-z[1],V=L-z[0],Q=X-z[1],$=1/Math.sin(Math.acos((I*V+U*Q)/(Math.sqrt(I*I+U*U)*Math.sqrt(V*V+Q*Q)))/2),K=Math.sqrt(z[0]*z[0]+z[1]*z[1]);P=Math.min(C,(i-K)/($-1)),A=Math.min(C,(o-K)/($+1))}}k>G?A>G?(m=u(W,Y,R,q,o,A,g),b=u(L,X,H,D,o,A,g),v.moveTo(m.cx+m.x01,m.cy+m.y01),A<C?v.arc(m.cx,m.cy,A,Math.atan2(m.y01,m.x01),Math.atan2(b.y01,b.x01),!g):(v.arc(m.cx,m.cy,A,Math.atan2(m.y01,m.x01),Math.atan2(m.y11,m.x11),!g),v.arc(0,0,o,Math.atan2(m.cy+m.y11,m.cx+m.x11),Math.atan2(b.cy+b.y11,b.cx+b.x11),!g),v.arc(b.cx,b.cy,A,Math.atan2(b.y11,b.x11),Math.atan2(b.y01,b.x01),!g))):(v.moveTo(R,q),v.arc(0,0,o,w,M,!g)):v.moveTo(R,q),i>G&&N>G?P>G?(m=u(H,D,L,X,i,-P,g),b=u(R,q,W,Y,i,-P,g),v.lineTo(m.cx+m.x01,m.cy+m.y01),P<C?v.arc(m.cx,m.cy,P,Math.atan2(m.y01,m.x01),Math.atan2(b.y01,b.x01),!g):(v.arc(m.cx,m.cy,P,Math.atan2(m.y01,m.x01),Math.atan2(m.y11,m.x11),!g),v.arc(0,0,i,Math.atan2(m.cy+m.y11,m.cx+m.x11),Math.atan2(b.cy+b.y11,b.cx+b.x11),g),v.arc(b.cx,b.cy,P,Math.atan2(b.y11,b.x11),Math.atan2(b.y01,b.x01),!g))):v.arc(0,0,i,j,T,g):v.lineTo(H,D)}else v.moveTo(0,0);if(v.closePath(),t)return v=null,t+""||null}var h=e,l=i,f=V(0),d=null,_=o,p=r,y=a,v=null;return t.centroid=function(){var t=(+h.apply(this,arguments)+ +l.apply(this,arguments))/2,n=(+_.apply(this,arguments)+ +p.apply(this,arguments))/2-F/2;return[Math.cos(n)*t,Math.sin(n)*t]},t.innerRadius=function(n){return arguments.length?(h="function"==typeof n?n:V(+n),t):h},t.outerRadius=function(n){return arguments.length?(l="function"==typeof n?n:V(+n),t):l},t.cornerRadius=function(n){return arguments.length?(f="function"==typeof n?n:V(+n),t):f},t.padRadius=function(n){return arguments.length?(d=null==n?null:"function"==typeof n?n:V(+n),t):d},t.startAngle=function(n){return arguments.length?(_="function"==typeof n?n:V(+n),t):_},t.endAngle=function(n){return arguments.length?(p="function"==typeof n?n:V(+n),t):p},t.padAngle=function(n){return arguments.length?(y="function"==typeof n?n:V(+n),t):y},t.context=function(n){return arguments.length?(v=null==n?null:n,t):v},t};h.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 $=function(t){return new h(t)},K=function(){function t(t){var c,u,h,l=t.length,f=!1;for(null==r&&(s=a(h=n.path())),c=0;c<=l;++c)!(c<l&&o(u=t[c],c,t))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+e(u,c,t),+i(u,c,t));if(h)return s=null,h+""||null}var e=l,i=f,o=V(!0),r=null,a=$,s=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:V(+n),t):e},t.y=function(n){return arguments.length?(i="function"==typeof n?n:V(+n),t):i},t.defined=function(n){return arguments.length?(o="function"==typeof n?n:V(!!n),t):o},t.curve=function(n){return arguments.length?(a=n,null!=r&&(s=a(r)),t):a},t.context=function(n){return arguments.length?(null==n?r=s=null:s=a(r=n),t):r},t},tt=function(){function t(t){var e,l,f,d,_,p=t.length,y=!1,v=new Array(p),x=new Array(p);for(null==c&&(h=u(_=n.path())),e=0;e<=p;++e){if(!(e<p&&s(d=t[e],e,t))===y)if(y=!y)l=e,h.areaStart(),h.lineStart();else{for(h.lineEnd(),h.lineStart(),f=e-1;f>=l;--f)h.point(v[f],x[f]);h.lineEnd(),h.areaEnd()}y&&(v[e]=+i(d,e,t),x[e]=+r(d,e,t),h.point(o?+o(d,e,t):v[e],a?+a(d,e,t):x[e]))}if(_)return h=null,_+""||null}function e(){return K().defined(s).curve(u).context(c)}var i=l,o=null,r=V(0),a=f,s=V(!0),c=null,u=$,h=null;return t.x=function(n){return arguments.length?(i="function"==typeof n?n:V(+n),o=null,t):i},t.x0=function(n){return arguments.length?(i="function"==typeof n?n:V(+n),t):i},t.x1=function(n){return arguments.length?(o=null==n?null:"function"==typeof n?n:V(+n),t):o},t.y=function(n){return arguments.length?(r="function"==typeof n?n:V(+n),a=null,t):r},t.y0=function(n){return arguments.length?(r="function"==typeof n?n:V(+n),t):r},t.y1=function(n){return arguments.length?(a=null==n?null:"function"==typeof n?n:V(+n),t):a},t.lineX0=t.lineY0=function(){return e().x(i).y(r)},t.lineY1=function(){return e().x(i).y(a)},t.lineX1=function(){return e().x(o).y(r)},t.defined=function(n){return arguments.length?(s="function"==typeof n?n:V(!!n),t):s},t.curve=function(n){return arguments.length?(u=n,null!=c&&(h=u(c)),t):u},t.context=function(n){return arguments.length?(null==n?c=h=null:h=u(c=n),t):c},t},nt=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},et=function(t){return t},it=function(){function t(t){var s,c,u,h,l,f=t.length,d=0,_=new Array(f),p=new Array(f),y=+o.apply(this,arguments),v=Math.min(Z,Math.max(-Z,r.apply(this,arguments)-y)),x=Math.min(Math.abs(v)/f,a.apply(this,arguments)),g=x*(v<0?-1:1);for(s=0;s<f;++s)(l=p[_[s]=s]=+n(t[s],s,t))>0&&(d+=l);for(null!=e?_.sort(function(t,n){return e(p[t],p[n])}):null!=i&&_.sort(function(n,e){return i(t[n],t[e])}),s=0,u=d?(v-f*g)/d:0;s<f;++s,y=h)c=_[s],l=p[c],h=y+(l>0?l*u:0)+g,p[c]={data:t[c],index:s,value:l,startAngle:y,endAngle:h,padAngle:x};return p}var n=et,e=nt,i=null,o=V(0),r=V(Z),a=V(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:V(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,i=null,t):e},t.sort=function(n){return arguments.length?(i=n,e=null,t):i},t.startAngle=function(n){return arguments.length?(o="function"==typeof n?n:V(+n),t):o},t.endAngle=function(n){return arguments.length?(r="function"==typeof n?n:V(+n),t):r},t.padAngle=function(n){return arguments.length?(a="function"==typeof n?n:V(+n),t):a},t},ot=_($);d.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var rt=function(){return p(K().curve(ot))},at=function(){var t=tt().curve(ot),n=t.curve,e=t.lineX0,i=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return p(e())},delete t.lineX0,t.lineEndAngle=function(){return p(i())},delete t.lineX1,t.lineInnerRadius=function(){return p(o())},delete t.lineY0,t.lineOuterRadius=function(){return p(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(_(t)):n()._curve},t},st={draw:function(t,n){var e=Math.sqrt(n/F);t.moveTo(e,0),t.arc(0,0,e,0,Z)}},ct={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}
},ut=Math.sqrt(1/3),ht=2*ut,lt={draw:function(t,n){var e=Math.sqrt(n/ht),i=e*ut;t.moveTo(0,-e),t.lineTo(i,0),t.lineTo(0,e),t.lineTo(-i,0),t.closePath()}},ft=.8908130915292852,dt=Math.sin(F/10)/Math.sin(7*F/10),_t=Math.sin(Z/10)*dt,pt=-Math.cos(Z/10)*dt,yt={draw:function(t,n){var e=Math.sqrt(n*ft),i=_t*e,o=pt*e;t.moveTo(0,-e),t.lineTo(i,o);for(var r=1;r<5;++r){var a=Z*r/5,s=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-s*e),t.lineTo(s*i-c*o,c*i+s*o)}t.closePath()}},vt={draw:function(t,n){var e=Math.sqrt(n),i=-e/2;t.rect(i,i,e,e)}},xt=Math.sqrt(3),gt={draw:function(t,n){var e=-Math.sqrt(n/(3*xt));t.moveTo(0,2*e),t.lineTo(-xt*e,-e),t.lineTo(xt*e,-e),t.closePath()}},mt=-.5,bt=Math.sqrt(3)/2,wt=1/Math.sqrt(12),Mt=3*(wt/2+1),Tt={draw:function(t,n){var e=Math.sqrt(n/Mt),i=e/2,o=e*wt,r=i,a=e*wt+e,s=-r,c=a;t.moveTo(i,o),t.lineTo(r,a),t.lineTo(s,c),t.lineTo(mt*i-bt*o,bt*i+mt*o),t.lineTo(mt*r-bt*a,bt*r+mt*a),t.lineTo(mt*s-bt*c,bt*s+mt*c),t.lineTo(mt*i+bt*o,mt*o-bt*i),t.lineTo(mt*r+bt*a,mt*a-bt*r),t.lineTo(mt*s+bt*c,mt*c-bt*s),t.closePath()}},jt=[st,ct,lt,vt,yt,gt,Tt],Nt=function(){function t(){var t;if(o||(o=t=n.path()),e.apply(this,arguments).draw(o,+i.apply(this,arguments)),t)return o=null,t+""||null}var e=V(st),i=V(64),o=null;return t.type=function(n){return arguments.length?(e="function"==typeof n?n:V(n),t):e},t.size=function(n){return arguments.length?(i="function"==typeof n?n:V(+n),t):i},t.context=function(n){return arguments.length?(o=null==n?null:n,t):o},t},kt=function(){};v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:y(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:y(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var St=function(t){return new v(t)};x.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:y(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ot=function(t){return new x(t)};g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break;case 3:this._point=4;default:y(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ct=function(t){return new g(t)};m.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var i,o=t[0],r=n[0],a=t[e]-o,s=n[e]-r,c=-1;++c<=e;)i=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(o+i*a),this._beta*n[c]+(1-this._beta)*(r+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Pt=function t(n){function e(t){return 1===n?new v(t):new m(t,n)}return e.beta=function(n){return t(+n)},e}(.85);w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:b(this,this._x1,this._y1)}(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,this._x1=t,this._y1=n;break;case 2:this._point=3;default:b(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var At=function t(n){function e(t){return new w(t,n)}return e.tension=function(n){return t(+n)},e}(0);M.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:b(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new M(t,n)}return e.tension=function(n){return t(+n)},e}(0);T.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Bt=function t(n){function e(t){return new T(t,n)}return e.tension=function(n){return t(+n)},e}(0);N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(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;break;case 2:this._point=3;default:j(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Rt=function t(n){function e(t){return n?new N(t,n):new w(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);k.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:j(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var qt=function t(n){function e(t){return n?new k(t,n):new M(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:j(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ht=function t(n){function e(t){return n?new S(t,n):new T(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);O.prototype={areaStart:kt,areaEnd:kt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Dt=function(t){return new O(t)};B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:E(this,this._t0,A(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(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;break;case 2:this._point=3,E(this,A(this,e=P(this,t,n)),e);break;default:E(this,this._t0,e=P(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(R.prototype=Object.create(B.prototype)).point=function(t,n){B.prototype.point.call(this,n,t)},q.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,i,o,r){this._context.bezierCurveTo(n,t,i,e,r,o)}},L.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var i=X(t),o=X(n),r=0,a=1;a<e;++r,++a)this._context.bezierCurveTo(i[0][r],o[0][r],i[1][r],o[1][r],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Lt=function(t){return new L(t)};W.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,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:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Xt=function(t){return new W(t,.5)},Wt=Array.prototype.slice,Yt=function(t,n){if((i=t.length)>1)for(var e,i,o=1,r=t[n[0]],a=r.length;o<i;++o){e=r,r=t[n[o]];for(var s=0;s<a;++s)r[s][1]+=r[s][0]=isNaN(e[s][1])?e[s][0]:e[s][1]}},zt=function(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e},It=function(){function t(t){var r,a,s=n.apply(this,arguments),c=t.length,u=s.length,h=new Array(u);for(r=0;r<u;++r){for(var l,f=s[r],d=h[r]=new Array(c),_=0;_<c;++_)d[_]=l=[0,+o(t[_],f,_,t)],l.data=t[_];d.key=f}for(r=0,a=e(h);r<u;++r)h[a[r]].index=r;return i(h,a),h}var n=V([]),e=zt,i=Yt,o=I;return t.keys=function(e){return arguments.length?(n="function"==typeof e?e:V(Wt.call(e)),t):n},t.value=function(n){return arguments.length?(o="function"==typeof n?n:V(+n),t):o},t.order=function(n){return arguments.length?(e=null==n?zt:"function"==typeof n?n:V(Wt.call(n)),t):e},t.offset=function(n){return arguments.length?(i=null==n?Yt:n,t):i},t},Ut=function(t,n){if((i=t.length)>0){for(var e,i,o,r=0,a=t[0].length;r<a;++r){for(o=e=0;e<i;++e)o+=t[e][r][1]||0;if(o)for(e=0;e<i;++e)t[e][r][1]/=o}Yt(t,n)}},Vt=function(t,n){if((e=t.length)>0){for(var e,i=0,o=t[n[0]],r=o.length;i<r;++i){for(var a=0,s=0;a<e;++a)s+=t[a][i][1]||0;o[i][1]+=o[i][0]=-s/2}Yt(t,n)}},Gt=function(t,n){if((o=t.length)>0&&(i=(e=t[n[0]]).length)>0){for(var e,i,o,r=0,a=1;a<i;++a){for(var s=0,c=0,u=0;s<o;++s){for(var h=t[n[s]],l=h[a][1]||0,f=h[a-1][1]||0,d=(l-f)/2,_=0;_<s;++_){var p=t[n[_]];d+=(p[a][1]||0)-(p[a-1][1]||0)}c+=l,u+=d*l}e[a-1][1]+=e[a-1][0]=r,c&&(r-=u/c)}e[a-1][1]+=e[a-1][0]=r,Yt(t,n)}},Ft=function(t){var n=t.map(U);return zt(t).sort(function(t,e){return n[t]-n[e]})},Jt=function(t){return Ft(t).reverse()},Zt=function(t){var n,e,i=t.length,o=t.map(U),r=zt(t).sort(function(t,n){return o[n]-o[t]}),a=0,s=0,c=[],u=[];for(n=0;n<i;++n)e=r[n],a<s?(a+=o[e],c.push(e)):(s+=o[e],u.push(e));return u.reverse().concat(c)},Qt=function(t){return zt(t).reverse()};t.arc=Q,t.area=tt,t.line=K,t.pie=it,t.radialArea=at,t.radialLine=rt,t.symbol=Nt,t.symbols=jt,t.symbolCircle=st,t.symbolCross=ct,t.symbolDiamond=lt,t.symbolSquare=vt,t.symbolStar=yt,t.symbolTriangle=gt,t.symbolWye=Tt,t.curveBasisClosed=Ot,t.curveBasisOpen=Ct,t.curveBasis=St,t.curveBundle=Pt,t.curveCardinalClosed=Et,t.curveCardinalOpen=Bt,t.curveCardinal=At,t.curveCatmullRomClosed=qt,t.curveCatmullRomOpen=Ht,t.curveCatmullRom=Rt,t.curveLinearClosed=Dt,t.curveLinear=$,t.curveMonotoneX=H,t.curveMonotoneY=D,t.curveNatural=Lt,t.curveStep=Xt,t.curveStepAfter=z,t.curveStepBefore=Y,t.stack=It,t.stackOffsetExpand=Ut,t.stackOffsetNone=Yt,t.stackOffsetSilhouette=Vt,t.stackOffsetWiggle=Gt,t.stackOrderAscending=Ft,t.stackOrderDescending=Jt,t.stackOrderInsideOut=Zt,t.stackOrderNone=zt,t.stackOrderReverse=Qt,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-path":3}],6:[function(t,n,e){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(){var t=[],n=void 0,e=void 0,i=[],o={},r={},s=!1,f=void 0,d=u.d3Callout,_=void 0,p=void 0,y=(0,l.dispatch)("subjectover","subjectout","subjectclick","connectorover","connectorout","connectorclick","noteover","noteout","noteclick"),v=void 0,x=function(e){v=e,s||e.selectAll("circle.handle").remove();var l=t.map(function(t){return t.type||(t.type=d),t.disable||(t.disable=i),new a.default(t)});n=new c.default({annotations:l,accessors:o,accessorsInverse:r,ids:f}),e.selectAll("g").data([n]).enter().append("g").attr("class","annotations");var x=e.select("g.annotations");(0,u.newWithClass)(x,n.annotations,"g","annotation"),x.selectAll("g.annotation").each(function(t){var n=(0,h.select)(this);t.position,n.attr("class","annotation"),(0,u.newWithClass)(n,[t],"g","annotation-connector"),(0,u.newWithClass)(n,[t],"g","annotation-subject"),(0,u.newWithClass)(n,[t],"g","annotation-note"),(0,u.newWithClass)(n.select("g.annotation-note"),[t],"g","annotation-note-content"),t.type=new t.type({a:n,annotation:t,textWrap:_,notePadding:p,editMode:s,dispatcher:y,accessors:o}),t.type.draw()})};return x.json=function(){return console.log("Annotations JSON was copied to your clipboard. Please note the annotation type is not JSON compatible. It appears in the objects array in the console, but not in the copied JSON.",n.json),window.copy(JSON.stringify(n.json.map(function(t){return delete t.type,t}))),x},x.update=function(){return t&&n&&(t=n.annotations.map(function(t,n){return t.type.draw(),t})),x},x.updatedAccessors=function(){return n.setPositionWithAccessors(),t=n.annotations,x},x.disable=function(e){return arguments.length?(i=e,n&&(n.updateDisable(i),t=n.annotations),x):i},x.textWrap=function(e){return arguments.length?(_=e,n&&(n.updateTextWrap(_),t=n.annotations),x):_},x.notePadding=function(e){return arguments.length?(p=e,n&&(n.updateNotePadding(p),t=n.annotations),x):p},x.type=function(e,i){return arguments.length?(d=e,n&&(n.annotations.map(function(t){t.type.note&&t.type.note.selectAll("*:not(.annotation-note-content)").remove(),t.type.noteContent&&t.type.noteContent.selectAll("*").remove(),t.typ