UNPKG

almus-d3-graph

Version:

React component to build interactive and configurable graphs with d3 effortlessly

1 lines 146 kB
!function(t){var n={};function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(i,r,function(n){return t[n]}.bind(null,r));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=16)}([function(t,n,e){"use strict";e.r(n);var i="http://www.w3.org/1999/xhtml",r={svg:"http://www.w3.org/2000/svg",xhtml:i,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),r.hasOwnProperty(n)?{space:r[n],local:t}:t};var u=function(t){var n=o(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===i&&n.documentElement.namespaceURI===i?n.createElement(t):n.createElementNS(e,t)}})(n)};function a(){}var s=function(t){return null==t?a:function(){return this.querySelector(t)}};function c(){return[]}var l=function(t){return null==t?c:function(){return this.querySelectorAll(t)}},h=function(t){return function(){return this.matches(t)}},f=function(t){return new Array(t.length)};function p(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}p.prototype={constructor:p,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 d="$";function _(t,n,e,i,r,o){for(var u,a=0,s=n.length,c=o.length;a<c;++a)(u=n[a])?(u.__data__=o[a],i[a]=u):e[a]=new p(t,o[a]);for(;a<s;++a)(u=n[a])&&(r[a]=u)}function y(t,n,e,i,r,o,u){var a,s,c,l={},h=n.length,f=o.length,_=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(_[a]=c=d+u.call(s,s.__data__,a,n),c in l?r[a]=s:l[c]=s);for(a=0;a<f;++a)(s=l[c=d+u.call(t,o[a],a,o)])?(i[a]=s,s.__data__=o[a],l[c]=null):e[a]=new p(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&l[_[a]]===s&&(r[a]=s)}function v(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function g(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function x(t,n){return function(){this.setAttribute(t,n)}}function b(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function w(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function k(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var M=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function O(t){return function(){this.style.removeProperty(t)}}function E(t,n,e){return function(){this.style.setProperty(t,n,e)}}function N(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function S(t,n){return t.style.getPropertyValue(n)||M(t).getComputedStyle(t,null).getPropertyValue(n)}function A(t){return function(){delete this[t]}}function T(t,n){return function(){this[t]=n}}function C(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function P(t){return t.trim().split(/^|\s+/)}function R(t){return t.classList||new j(t)}function j(t){this._node=t,this._names=P(t.getAttribute("class")||"")}function L(t,n){for(var e=R(t),i=-1,r=n.length;++i<r;)e.add(n[i])}function D(t,n){for(var e=R(t),i=-1,r=n.length;++i<r;)e.remove(n[i])}function I(t){return function(){L(this,t)}}function z(t){return function(){D(this,t)}}function G(t,n){return function(){(n.apply(this,arguments)?L:D)(this,t)}}j.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function q(){this.textContent=""}function H(t){return function(){this.textContent=t}}function Y(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function F(){this.innerHTML=""}function W(t){return function(){this.innerHTML=t}}function U(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function X(){this.nextSibling&&this.parentNode.appendChild(this)}function V(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function K(){return null}function B(){var t=this.parentNode;t&&t.removeChild(this)}function $(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Z(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var Q={},J=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Q={mouseenter:"mouseover",mouseleave:"mouseout"}));function tt(t,n,e){return t=nt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function nt(t,n,e){return function(i){var r=J;J=i;try{t.call(this,this.__data__,n,e)}finally{J=r}}}function et(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function it(t){return function(){var n=this.__on;if(n){for(var e,i=0,r=-1,o=n.length;i<o;++i)e=n[i],t.type&&e.type!==t.type||e.name!==t.name?n[++r]=e:this.removeEventListener(e.type,e.listener,e.capture);++r?n.length=r:delete this.__on}}}function rt(t,n,e){var i=Q.hasOwnProperty(t.type)?tt:nt;return function(r,o,u){var a,s=this.__on,c=i(n,o,u);if(s)for(var l=0,h=s.length;l<h;++l)if((a=s[l]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=c,a.capture=e),void(a.value=n);this.addEventListener(t.type,c,e),a={type:t.type,name:t.name,value:n,listener:c,capture:e},s?s.push(a):this.__on=[a]}}function ot(t,n,e,i){var r=J;t.sourceEvent=J,J=t;try{return n.apply(e,i)}finally{J=r}}function ut(t,n,e){var i=M(t),r=i.CustomEvent;"function"==typeof r?r=new r(n,e):(r=i.document.createEvent("Event"),e?(r.initEvent(n,e.bubbles,e.cancelable),r.detail=e.detail):r.initEvent(n,!1,!1)),t.dispatchEvent(r)}var at=[null];function st(t,n){this._groups=t,this._parents=n}function ct(){return new st([[document.documentElement]],at)}st.prototype=ct.prototype={constructor:st,select:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,u,a=n[r],c=a.length,l=i[r]=new Array(c),h=0;h<c;++h)(o=a[h])&&(u=t.call(o,o.__data__,h,a))&&("__data__"in o&&(u.__data__=o.__data__),l[h]=u);return new st(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=l(t));for(var n=this._groups,e=n.length,i=[],r=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,c=0;c<s;++c)(u=a[c])&&(i.push(t.call(u,u.__data__,c,a)),r.push(u));return new st(i,r)},filter:function(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r<e;++r)for(var o,u=n[r],a=u.length,s=i[r]=[],c=0;c<a;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&s.push(o);return new st(i,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),l=-1,this.each(function(t){d[++l]=t}),d;var e,i=n?y:_,r=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),c=new Array(u),l=0;l<u;++l){var h=r[l],f=o[l],p=f.length,d=t.call(h,h&&h.__data__,l,r),v=d.length,g=s[l]=new Array(v),m=a[l]=new Array(v);i(h,f,g,m,c[l]=new Array(p),d,n);for(var x,b,w=0,k=0;w<v;++w)if(x=g[w]){for(w>=k&&(k=w+1);!(b=m[k])&&++k<v;);x._next=b||null}}return(a=new st(a,r))._enter=s,a._exit=c,a},enter:function(){return new st(this._enter||this._groups.map(f),this._parents)},exit:function(){return new st(this._exit||this._groups.map(f),this._parents)},join:function(t,n,e){var i=this.enter(),r=this,o=this.exit();return i="function"==typeof t?t(i):i.append(t+""),null!=n&&(r=n(r)),null==e?o.remove():e(o),i&&r?i.merge(r).order():r},merge:function(t){for(var n=this._groups,e=t._groups,i=n.length,r=e.length,o=Math.min(i,r),u=new Array(i),a=0;a<o;++a)for(var s,c=n[a],l=e[a],h=c.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=c[p]||l[p])&&(f[p]=s);for(;a<i;++a)u[a]=n[a];return new st(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var i,r=t[n],o=r.length-1,u=r[o];--o>=0;)(i=r[o])&&(u&&4^i.compareDocumentPosition(u)&&u.parentNode.insertBefore(i,u),u=i);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=v);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o<i;++o){for(var u,a=e[o],s=a.length,c=r[o]=new Array(s),l=0;l<s;++l)(u=a[l])&&(c[l]=u);c.sort(n)}return new st(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var i=t[n],r=0,o=i.length;r<o;++r){var u=i[r];if(u)return u}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,i=n.length;e<i;++e)for(var r,o=n[e],u=0,a=o.length;u<a;++u)(r=o[u])&&t.call(r,r.__data__,u,o);return this},attr:function(t,n){var e=o(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==n?e.local?m:g:"function"==typeof n?e.local?k:w:e.local?b:x)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?O:"function"==typeof n?N:E)(t,n,null==e?"":e)):S(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?A:"function"==typeof n?C:T)(t,n)):this.node()[t]},classed:function(t,n){var e=P(t+"");if(arguments.length<2){for(var i=R(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof n?G:n?I:z)(e,n))},text:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?Y:H)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?F:("function"==typeof t?U:W)(t)):this.node().innerHTML},raise:function(){return this.each(X)},lower:function(){return this.each(V)},append:function(t){var n="function"==typeof t?t:u(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:u(t),i=null==n?K:"function"==typeof n?n:s(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(B)},clone:function(t){return this.select(t?Z:$)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var i,r,o=et(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?rt:it,null==e&&(e=!1),i=0;i<u;++i)this.each(a(o[i],n,e));return this}var a=this.node().__on;if(a)for(var s,c=0,l=a.length;c<l;++c)for(i=0,s=a[c];i<u;++i)if((r=o[i]).type===s.type&&r.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return ut(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return ut(this,t,n)}})(t,n))}};var lt=ct,ht=function(t){return"string"==typeof t?new st([[document.querySelector(t)]],[document.documentElement]):new st([[t]],at)},ft=function(t){return ht(u(t).call(document.documentElement))},pt=0;function dt(){return new _t}function _t(){this._="@"+(++pt).toString(36)}_t.prototype=dt.prototype={constructor:_t,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 yt=function(){for(var t,n=J;t=n.sourceEvent;)n=t;return n},vt=function(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())).x,i.y]}var r=t.getBoundingClientRect();return[n.clientX-r.left-t.clientLeft,n.clientY-r.top-t.clientTop]},gt=function(t){var n=yt();return n.changedTouches&&(n=n.changedTouches[0]),vt(t,n)},mt=function(t){return"string"==typeof t?new st([document.querySelectorAll(t)],[document.documentElement]):new st([null==t?[]:t],at)},xt=function(t,n,e){arguments.length<3&&(e=n,n=yt().changedTouches);for(var i,r=0,o=n?n.length:0;r<o;++r)if((i=n[r]).identifier===e)return vt(t,i);return null},bt=function(t,n){null==n&&(n=yt().touches);for(var e=0,i=n?n.length:0,r=new Array(i);e<i;++e)r[e]=vt(t,n[e]);return r};e.d(n,"create",function(){return ft}),e.d(n,"creator",function(){return u}),e.d(n,"local",function(){return dt}),e.d(n,"matcher",function(){return h}),e.d(n,"mouse",function(){return gt}),e.d(n,"namespace",function(){return o}),e.d(n,"namespaces",function(){return r}),e.d(n,"clientPoint",function(){return vt}),e.d(n,"select",function(){return ht}),e.d(n,"selectAll",function(){return mt}),e.d(n,"selection",function(){return lt}),e.d(n,"selector",function(){return s}),e.d(n,"selectorAll",function(){return l}),e.d(n,"style",function(){return S}),e.d(n,"touch",function(){return xt}),e.d(n,"touches",function(){return bt}),e.d(n,"window",function(){return M}),e.d(n,"event",function(){return J}),e.d(n,"customEvent",function(){return ot})},function(t,n,e){"use strict";var i,r,o=0,u=0,a=0,s=1e3,c=0,l=0,h=0,f="object"==typeof performance&&performance.now?performance:Date,p="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function d(){return l||(p(_),l=f.now()+h)}function _(){l=0}function y(){this._call=this._time=this._next=null}function v(t,n,e){var i=new y;return i.restart(t,n,e),i}function g(){l=(c=f.now())+h,o=u=0;try{!function(){d(),++o;for(var t,n=i;n;)(t=l-n._time)>=0&&n._call.call(null,t),n=n._next;--o}()}finally{o=0,function(){var t,n,e=i,o=1/0;for(;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:i=n);r=t,x(o)}(),l=0}}function m(){var t=f.now(),n=t-c;n>s&&(h-=n,c=t)}function x(t){o||(u&&(u=clearTimeout(u)),t-l>24?(t<1/0&&(u=setTimeout(g,t-f.now()-h)),a&&(a=clearInterval(a))):(a||(c=f.now(),a=setInterval(m,s)),o=1,p(g)))}y.prototype=v.prototype={constructor:y,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?d():+e)+(null==n?0:+n),this._next||r===this||(r?r._next=this:i=this,r=this),this._call=t,this._time=e,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}};var b=function(t,n,e){var i=new y;return n=null==n?0:+n,i.restart(function(e){i.stop(),t(e+n)},n,e),i};e.d(n,"a",function(){return d}),e.d(n,"c",function(){return v}),e.d(n,"b",function(){return b})},function(t,n,e){"use strict";var i={value:function(){}};function r(){for(var t,n=0,e=arguments.length,i={};n<e;++n){if(!(t=arguments[n]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new o(i)}function o(t){this._=t}function u(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 a(t,n){for(var e,i=0,r=t.length;i<r;++i)if((e=t[i]).name===n)return e.value}function s(t,n,e){for(var r=0,o=t.length;r<o;++r)if(t[r].name===n){t[r]=i,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}o.prototype=r.prototype={constructor:o,on:function(t,n){var e,i=this._,r=u(t+"",i),o=-1,c=r.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<c;)if(e=(t=r[o]).type)i[e]=s(i[e],t.name,n);else if(null==n)for(e in i)i[e]=s(i[e],t.name,null);return this}for(;++o<c;)if((e=(t=r[o]).type)&&(e=a(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new o(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,i,r=new Array(e),o=0;o<e;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(i=this._[t]).length;o<e;++o)i[o].value.apply(n,r)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(n,e)}};var c=r;e.d(n,"a",function(){return c})},function(t,n,e){"use strict";t.exports=e(18)},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},o=e(8),u=(i=o)&&i.__esModule?i:{default:i};n.default=r({COORDS_SEPARATOR:",",FORCE_X:.06,FORCE_Y:.06,GRAPH_CONTAINER_ID:"graph-container-zoomable",GRAPH_WRAPPER_ID:"graph-wrapper",KEYWORDS:{SAME:"SAME"},LINK_CLASS_NAME:"link",NODE_CLASS_NAME:"node",TTL_DOUBLE_CLICK_IN_MS:300},u.default)},function(t,n,e){"use strict";e.r(n);var i=e(2),r=e(0);function o(){r.event.stopImmediatePropagation()}var u=function(){r.event.preventDefault(),r.event.stopImmediatePropagation()},a=function(t){var n=t.document.documentElement,e=Object(r.select)(t).on("dragstart.drag",u,!0);"onselectstart"in n?e.on("selectstart.drag",u,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")};function s(t,n){var e=t.document.documentElement,i=Object(r.select)(t).on("dragstart.drag",null);n&&(i.on("click.drag",u,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var c=function(t){return function(){return t}};function l(t,n,e,i,r,o,u,a,s,c){this.target=t,this.type=n,this.subject=e,this.identifier=i,this.active=r,this.x=o,this.y=u,this.dx=a,this.dy=s,this._=c}function h(){return!r.event.ctrlKey&&!r.event.button}function f(){return this.parentNode}function p(t){return null==t?{x:r.event.x,y:r.event.y}:t}function d(){return navigator.maxTouchPoints||"ontouchstart"in this}l.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var _=function(){var t,n,e,_,y=h,v=f,g=p,m=d,x={},b=Object(i.a)("start","drag","end"),w=0,k=0;function M(t){t.on("mousedown.drag",O).filter(m).on("touchstart.drag",S).on("touchmove.drag",A).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function O(){if(!_&&y.apply(this,arguments)){var i=C("mouse",v.apply(this,arguments),r.mouse,this,arguments);i&&(Object(r.select)(r.event.view).on("mousemove.drag",E,!0).on("mouseup.drag",N,!0),a(r.event.view),o(),e=!1,t=r.event.clientX,n=r.event.clientY,i("start"))}}function E(){if(u(),!e){var i=r.event.clientX-t,o=r.event.clientY-n;e=i*i+o*o>k}x.mouse("drag")}function N(){Object(r.select)(r.event.view).on("mousemove.drag mouseup.drag",null),s(r.event.view,e),u(),x.mouse("end")}function S(){if(y.apply(this,arguments)){var t,n,e=r.event.changedTouches,i=v.apply(this,arguments),u=e.length;for(t=0;t<u;++t)(n=C(e[t].identifier,i,r.touch,this,arguments))&&(o(),n("start"))}}function A(){var t,n,e=r.event.changedTouches,i=e.length;for(t=0;t<i;++t)(n=x[e[t].identifier])&&(u(),n("drag"))}function T(){var t,n,e=r.event.changedTouches,i=e.length;for(_&&clearTimeout(_),_=setTimeout(function(){_=null},500),t=0;t<i;++t)(n=x[e[t].identifier])&&(o(),n("end"))}function C(t,n,e,i,o){var u,a,s,c=e(n,t),h=b.copy();if(Object(r.customEvent)(new l(M,"beforestart",u,t,w,c[0],c[1],0,0,h),function(){return null!=(r.event.subject=u=g.apply(i,o))&&(a=u.x-c[0]||0,s=u.y-c[1]||0,!0)}))return function f(p){var d,_=c;switch(p){case"start":x[t]=f,d=w++;break;case"end":delete x[t],--w;case"drag":c=e(n,t),d=w}Object(r.customEvent)(new l(M,p,u,t,d,c[0]+a,c[1]+s,c[0]-_[0],c[1]-_[1],h),h.apply,h,[p,i,o])}}return M.filter=function(t){return arguments.length?(y="function"==typeof t?t:c(!!t),M):y},M.container=function(t){return arguments.length?(v="function"==typeof t?t:c(t),M):v},M.subject=function(t){return arguments.length?(g="function"==typeof t?t:c(t),M):g},M.touchable=function(t){return arguments.length?(m="function"==typeof t?t:c(!!t),M):m},M.on=function(){var t=b.on.apply(b,arguments);return t===b?M:t},M.clickDistance=function(t){return arguments.length?(k=(t=+t)*t,M):Math.sqrt(k)},M};e.d(n,"drag",function(){return _}),e.d(n,"dragDisable",function(){return a}),e.d(n,"dragEnable",function(){return s})},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={automaticRearrangeAfterDropNode:!1,collapsible:!1,directed:!1,focusAnimationDuration:.75,focusZoom:1,height:400,highlightDegree:1,highlightOpacity:1,linkHighlightBehavior:!1,maxZoom:8,minZoom:.1,nodeHighlightBehavior:!1,panAndZoom:!1,staticGraph:!1,staticGraphWithDragAndDrop:!1,width:800,d3:{alphaTarget:.05,gravity:-100,linkLength:100,linkStrength:1},node:{color:"#d3d3d3",fontColor:"black",fontSize:8,fontWeight:"normal",highlightColor:"SAME",highlightFontSize:8,highlightFontWeight:"normal",highlightStrokeColor:"SAME",highlightStrokeWidth:"SAME",labelProperty:"id",mouseCursor:"pointer",opacity:1,renderLabel:!0,size:200,strokeColor:"none",strokeWidth:1.5,svg:"",symbolType:"circle",viewGenerator:null},link:{color:"#d3d3d3",fontColor:"black",fontSize:8,fontWeight:"normal",highlightColor:"#d3d3d3",highlightFontSize:8,highlightFontWeight:"normal",labelProperty:"label",mouseCursor:"pointer",opacity:1,renderLabel:!1,semanticStrokeWidth:!1,strokeWidth:1.5,type:"STRAIGHT",marker:null}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};function r(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(n).reduce(function(e,r){return n[r]?Object.keys(n[r]).reduce(function(e,o){return t===r?i({},e,{outDegree:e.outDegree+n[t][o]}):t===o?i({},e,{inDegree:e.inDegree+n[r][t]}):e},e):e},{inDegree:0,outDegree:0})}n.computeNodeDegree=r,n.getTargetLeafConnections=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=arguments[2].directed;return Object.keys(n[t]).reduce(function(i,o){return function(t,n,e){var i=r(t,n),o=i.inDegree,u=i.outDegree;return e?function(t,n){return t<=1&&n<1}(o,u):function(t,n){return t<=1&&n<=1}(o,u)}(o,n,e)&&i.push({source:t,target:o}),i},[])},n.isNodeVisible=function(t,n,e){var i=r(t,e),o=i.inDegree,u=i.outDegree,a=!!n[t]._orphan;return o>0||u>0||a},n.toggleLinksConnections=function(t,n){return t.map(function(t){var e=t.source,r=t.target,o=e.id||e,u=r.id||r,a=n&&n[o]&&n[o][u];return i({},t,a?{isHidden:!1}:{isHidden:!0})})},n.toggleLinksMatrixConnections=function(t,n,e){var r=e.directed;return n.reduce(function(t,n){t[n.source]||(t[n.source]={}),t[n.source][n.target]||(t[n.source][n.target]=0);var e=0===t[n.source][n.target]?1:0;return t[n.source][n.target]=e,r||(t[n.target][n.source]=e),t},i({},t))}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={SYMBOLS:{CIRCLE:"circle",CROSS:"cross",DIAMOND:"diamond",SQUARE:"square",STAR:"star",TRIANGLE:"triangle",WYE:"wye"}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default={GRAPH_NO_ID_PROP:"id prop not defined! id property is mandatory and it should be unique.",INVALID_LINKS:"you provided a invalid links data structure. Links source and target attributes must point to an existent node",INSUFFICIENT_DATA:"you have not provided enough data for react-d3-graph to render something. You need to provide at least one node",INVALID_LINK_VALUE:"links 'value' attribute must be of type number"}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=20;function o(t,n){return!!t&&t.hasOwnProperty(n)&&"object"===i(t[n])&&null!==t[n]&&!u(t[n])}function u(t){return!!t&&"object"===(void 0===t?"undefined":i(t))&&!Object.keys(t).length}function a(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).reduce(function(n,e){return t.hasOwnProperty(e)&&(n[e]=t[e]),n},{})}n.default={isDeepEqual:function t(n,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=[];if(0===i&&n===e)return!0;if(u(n)&&!u(e)||!u(n)&&u(e))return!1;var s=Object.keys(n),c=Object.keys(e);if(s.length!==c.length)return!1;var l=!0,h=!1,f=void 0;try{for(var p,d=s[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var _=p.value;if(o(n,_)&&o(e,_)&&i<r)a.push(t(n[_],e[_],i+1));else{var y=u(n[_])&&u(e[_])||e.hasOwnProperty(_)&&e[_]===n[_];if(a.push(y),!y)break}}}catch(t){h=!0,f=t}finally{try{!l&&d.return&&d.return()}finally{if(h)throw f}}return-1===a.indexOf(!1)},isEmptyObject:u,deepClone:function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,u=Object.keys(n),a=!0,s=!1,c=void 0;try{for(var l,h=u[Symbol.iterator]();!(a=(l=h.next()).done);a=!0){var f=l.value,p=o(n,f);e[f]=p&&i<r?t(n[f],{},i+1):n[f]}}catch(t){s=!0,c=t}finally{try{!a&&h.return&&h.return()}finally{if(s)throw c}}return e},merge:function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a={};if(0===Object.keys(n||{}).length)return e&&!u(e)?e:{};var s=!0,c=!1,l=void 0;try{for(var h,f=Object.keys(n)[Symbol.iterator]();!(s=(h=f.next()).done);s=!0){var p=h.value;e[p]&&"object"===i(e[p])&&"object"===i(n[p])&&o<r?function(){var i=t(n[p],e[p],o+1);a[p]=n[p].hasOwnProperty("length")&&e[p].hasOwnProperty("length")?Object.keys(i).map(function(t){return i[t]}):i}():a[p]=e.hasOwnProperty(p)?e[p]:n[p]}}catch(t){c=!0,l=t}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}return a},pick:a,antiPick:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return a(t,Object.keys(t).filter(function(t){return!n.includes(t)}))},throwErr:function(t,n){throw Error("react-d3-graph :: "+t+" :: "+n)}}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.HIGHLIGHTED="H",n.MARKER_LARGE_OFFSET=4,n.MARKER_MEDIUM_OFFSET=2,n.MARKER_SMALL_SIZE=16,n.MARKERS={MARKER_S:"marker-small",MARKER_SH:"marker-small-highlighted",MARKER_M:"marker-medium",MARKER_MH:"marker-medium-highlighted",MARKER_L:"marker-large",MARKER_LH:"marker-large-highlighted"},n.SIZES={S:"S",M:"M",L:"L"}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},o=function(){function t(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(n,e,i){return e&&t(n.prototype,e),i&&t(n,i),n}}(),u=e(3),a=(i=u)&&i.__esModule?i:{default:i};function s(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}var c=function(t){function n(){var t,e,i;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return e=i=s(this,(t=n.__proto__||Object.getPrototypeOf(n)).call.apply(t,[this].concat(o))),i.handleOnClickLink=function(){return i.props.onClickLink&&i.props.onClickLink(i.props.source,i.props.target)},i.handleOnRightClickLink=function(t){return i.props.onRightClickLink&&i.props.onRightClickLink(t,i.props.source,i.props.target)},i.handleOnMouseOverLink=function(){return i.props.onMouseOverLink&&i.props.onMouseOverLink(i.props.source,i.props.target)},i.handleOnMouseOutLink=function(){return i.props.onMouseOutLink&&i.props.onMouseOutLink(i.props.source,i.props.target)},s(i,e)}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,a.default.Component),o(n,[{key:"render",value:function(){var t={strokeWidth:this.props.strokeWidth,stroke:this.props.stroke,opacity:this.props.opacity,fill:"none",cursor:this.props.mouseCursor},n={className:this.props.className,d:this.props.d,onClick:this.handleOnClickLink,onContextMenu:this.handleOnRightClickLink,onMouseOut:this.handleOnMouseOutLink,onMouseOver:this.handleOnMouseOverLink,style:t};this.props.markerId&&(n.markerEnd="url(#"+this.props.markerId+")");var e=this.props,i=e.label,o=e.id,u={dy:-1,style:{fill:this.props.fontColor,fontSize:this.props.fontSize,fontWeight:this.props.fontWeight}};return a.default.createElement("g",null,this.props.linkMarkerDefs?a.default.createElement("defs",null,this.props.linkMarkerDefs):null,a.default.createElement("path",r({},n,{id:o})),i&&a.default.createElement("text",r({style:{textAnchor:"middle"}},u),a.default.createElement("textPath",{href:"#"+o,startOffset:"50%"},i)))}}]),n}();n.default=c},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},r=function(){function t(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(n,e,i){return e&&t(n.prototype,e),i&&t(n,i),n}}(),o=s(e(3)),u=s(e(14)),a=s(e(22));function s(t){return t&&t.__esModule?t:{default:t}}function c(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}var l=function(t){function n(){var t,e,i;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return e=i=c(this,(t=n.__proto__||Object.getPrototypeOf(n)).call.apply(t,[this].concat(o))),i.handleOnClickNode=function(){return i.props.onClickNode&&i.props.onClickNode(i.props.id)},i.handleOnRightClickNode=function(t){return i.props.onRightClickNode&&i.props.onRightClickNode(t,i.props.id)},i.handleOnMouseOverNode=function(){return i.props.onMouseOverNode&&i.props.onMouseOverNode(i.props.id)},i.handleOnMouseOutNode=function(){return i.props.onMouseOut&&i.props.onMouseOut(i.props.id)},c(i,e)}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)}(n,o.default.Component),r(n,[{key:"render",value:function(){var t={cursor:this.props.cursor,onClick:this.handleOnClickNode,onContextMenu:this.handleOnRightClickNode,onMouseOut:this.handleOnMouseOutNode,onMouseOver:this.handleOnMouseOverNode,opacity:this.props.opacity},n={dx:this.props.dx||u.default.NODE_LABEL_DX,dy:u.default.NODE_LABEL_DY,fill:this.props.fontColor,fontSize:this.props.fontSize,fontWeight:this.props.fontWeight,opacity:this.props.opacity},e=this.props.size,r=this.props.cx,s=this.props.cy,c=void 0,l=void 0;if(this.props.svg||this.props.viewGenerator){var h=e/10,f=e/10,p=f/2,d=h/2,_="translate("+p+","+d+")";c=o.default.createElement("text",i({},n,{transform:_}),this.props.label),l=this.props.viewGenerator&&!this.props.overrideGlobalViewGenerator?o.default.createElement("svg",i({},t,{width:f,height:h}),o.default.createElement("foreignObject",{x:"0",y:"0",width:"100%",height:"100%"},o.default.createElement("section",{style:{height:h,width:f,backgroundColor:"transparent"}},this.props.viewGenerator(this.props)))):o.default.createElement("image",i({},t,{href:this.props.svg,width:f,height:h})),r-=p,s-=d}else t.d=a.default.buildSvgSymbol(e,this.props.type),t.fill=this.props.fill,t.stroke=this.props.stroke,t.strokeWidth=this.props.strokeWidth,c=o.default.createElement("text",n,this.props.label),l=o.default.createElement("path",t);c="string"==typeof this.props.label?c:this.props.label;var y={className:this.props.className,cx:this.props.cx,cy:this.props.cy,id:this.props.id,transform:"translate("+r+","+s+")"};return o.default.createElement("g",y,l,this.props.renderLabel&&c)}}]),n}();n.default=l},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},r=u(e(6)),o=u(e(8));function u(t){return t&&t.__esModule?t:{default:t}}n.default=i({ARC:{START_ANGLE:0,END_ANGLE:2*Math.PI},DEFAULT_NODE_SIZE:r.default.node.size,NODE_LABEL_DX:".90em",NODE_LABEL_DY:".35em"},o.default)},function(t,n,e){"use strict";e.r(n);var i=function(t,n){var e;function i(){var i,r,o=e.length,u=0,a=0;for(i=0;i<o;++i)u+=(r=e[i]).x,a+=r.y;for(u=u/o-t,a=a/o-n,i=0;i<o;++i)(r=e[i]).x-=u,r.y-=a}return null==t&&(t=0),null==n&&(n=0),i.initialize=function(t){e=t},i.x=function(n){return arguments.length?(t=+n,i):t},i.y=function(t){return arguments.length?(n=+t,i):n},i},r=function(t){return function(){return t}},o=function(){return 1e-6*(Math.random()-.5)};function u(t,n,e,i){if(isNaN(n)||isNaN(e))return t;var r,o,u,a,s,c,l,h,f,p=t._root,d={data:i},_=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=n>=(o=(_+v)/2))?_=o:v=o,(l=e>=(u=(y+g)/2))?y=u:g=u,r=p,!(p=p[h=l<<1|c]))return r[h]=d,t;if(a=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===a&&e===s)return d.next=p,r?r[h]=d:t._root=d,t;do{r=r?r[h]=new Array(4):t._root=new Array(4),(c=n>=(o=(_+v)/2))?_=o:v=o,(l=e>=(u=(y+g)/2))?y=u:g=u}while((h=l<<1|c)==(f=(s>=u)<<1|a>=o));return r[f]=p,r[h]=d,t}var a=function(t,n,e,i,r){this.node=t,this.x0=n,this.y0=e,this.x1=i,this.y1=r};function s(t){return t[0]}function c(t){return t[1]}function l(t,n,e){var i=new h(null==n?s:n,null==e?c:e,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function h(t,n,e,i,r,o){this._x=t,this._y=n,this._x0=e,this._y0=i,this._x1=r,this._y1=o,this._root=void 0}function f(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var p=l.prototype=h.prototype;function d(t){return t.x+t.vx}function _(t){return t.y+t.vy}p.copy=function(){var t,n,e=new h(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return e;if(!i.length)return e._root=f(i),e;for(t=[{source:i,target:e._root=new Array(4)}];i=t.pop();)for(var r=0;r<4;++r)(n=i.source[r])&&(n.length?t.push({source:n,target:i.target[r]=new Array(4)}):i.target[r]=f(n));return e},p.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return u(this.cover(n,e),n,e,t)},p.addAll=function(t){var n,e,i,r,o=t.length,a=new Array(o),s=new Array(o),c=1/0,l=1/0,h=-1/0,f=-1/0;for(e=0;e<o;++e)isNaN(i=+this._x.call(null,n=t[e]))||isNaN(r=+this._y.call(null,n))||(a[e]=i,s[e]=r,i<c&&(c=i),i>h&&(h=i),r<l&&(l=r),r>f&&(f=r));if(c>h||l>f)return this;for(this.cover(c,l).cover(h,f),e=0;e<o;++e)u(this,a[e],s[e],t[e]);return this},p.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,i=this._y0,r=this._x1,o=this._y1;if(isNaN(e))r=(e=Math.floor(t))+1,o=(i=Math.floor(n))+1;else{for(var u,a,s=r-e,c=this._root;e>t||t>=r||i>n||n>=o;)switch(a=(n<i)<<1|t<e,(u=new Array(4))[a]=c,c=u,s*=2,a){case 0:r=e+s,o=i+s;break;case 1:e=r-s,o=i+s;break;case 2:r=e+s,i=o-s;break;case 3:e=r-s,i=o-s}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=i,this._x1=r,this._y1=o,this},p.data=function(){var t=[];return this.visit(function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)}),t},p.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},p.find=function(t,n,e){var i,r,o,u,s,c,l,h=this._x0,f=this._y0,p=this._x1,d=this._y1,_=[],y=this._root;for(y&&_.push(new a(y,h,f,p,d)),null==e?e=1/0:(h=t-e,f=n-e,p=t+e,d=n+e,e*=e);c=_.pop();)if(!(!(y=c.node)||(r=c.x0)>p||(o=c.y0)>d||(u=c.x1)<h||(s=c.y1)<f))if(y.length){var v=(r+u)/2,g=(o+s)/2;_.push(new a(y[3],v,g,u,s),new a(y[2],r,g,v,s),new a(y[1],v,o,u,g),new a(y[0],r,o,v,g)),(l=(n>=g)<<1|t>=v)&&(c=_[_.length-1],_[_.length-1]=_[_.length-1-l],_[_.length-1-l]=c)}else{var m=t-+this._x.call(null,y.data),x=n-+this._y.call(null,y.data),b=m*m+x*x;if(b<e){var w=Math.sqrt(e=b);h=t-w,f=n-w,p=t+w,d=n+w,i=y.data}}return i},p.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,i,r,o,u,a,s,c,l,h,f,p=this._root,d=this._x0,_=this._y0,y=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((c=o>=(a=(d+y)/2))?d=a:y=a,(l=u>=(s=(_+v)/2))?_=s:v=s,n=p,!(p=p[h=l<<1|c]))return this;if(!p.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,f=h)}for(;p.data!==t;)if(i=p,!(p=p.next))return this;return(r=p.next)&&delete p.next,i?(r?i.next=r:delete i.next,this):n?(r?n[h]=r:delete n[h],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[f]=p:this._root=p),this):(this._root=r,this)},p.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},p.root=function(){return this._root},p.size=function(){var t=0;return this.visit(function(n){if(!n.length)do{++t}while(n=n.next)}),t},p.visit=function(t){var n,e,i,r,o,u,s=[],c=this._root;for(c&&s.push(new a(c,this._x0,this._y0,this._x1,this._y1));n=s.pop();)if(!t(c=n.node,i=n.x0,r=n.y0,o=n.x1,u=n.y1)&&c.length){var l=(i+o)/2,h=(r+u)/2;(e=c[3])&&s.push(new a(e,l,h,o,u)),(e=c[2])&&s.push(new a(e,i,h,l,u)),(e=c[1])&&s.push(new a(e,l,r,o,h)),(e=c[0])&&s.push(new a(e,i,r,l,h))}return this},p.visitAfter=function(t){var n,e=[],i=[];for(this._root&&e.push(new a(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var r=n.node;if(r.length){var o,u=n.x0,s=n.y0,c=n.x1,l=n.y1,h=(u+c)/2,f=(s+l)/2;(o=r[0])&&e.push(new a(o,u,s,h,f)),(o=r[1])&&e.push(new a(o,h,s,c,f)),(o=r[2])&&e.push(new a(o,u,f,h,l)),(o=r[3])&&e.push(new a(o,h,f,c,l))}i.push(n)}for(;n=i.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},p.x=function(t){return arguments.length?(this._x=t,this):this._x},p.y=function(t){return arguments.length?(this._y=t,this):this._y};var y=function(t){var n,e,i=1,u=1;function a(){for(var t,r,a,c,h,f,p,y=n.length,v=0;v<u;++v)for(r=l(n,d,_).visitAfter(s),t=0;t<y;++t)a=n[t],f=e[a.index],p=f*f,c=a.x+a.vx,h=a.y+a.vy,r.visit(g);function g(t,n,e,r,u){var s=t.data,l=t.r,d=f+l;if(!s)return n>c+d||r<c-d||e>h+d||u<h-d;if(s.index>a.index){var _=c-s.x-s.vx,y=h-s.y-s.vy,v=_*_+y*y;v<d*d&&(0===_&&(v+=(_=o())*_),0===y&&(v+=(y=o())*y),v=(d-(v=Math.sqrt(v)))/v*i,a.vx+=(_*=v)*(d=(l*=l)/(p+l)),a.vy+=(y*=v)*d,s.vx-=_*(d=1-d),s.vy-=y*d)}}}function s(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function c(){if(n){var i,r,o=n.length;for(e=new Array(o),i=0;i<o;++i)r=n[i],e[r.index]=+t(r,i,n)}}return"function"!=typeof t&&(t=r(null==t?1:+t)),a.initialize=function(t){n=t,c()},a.iterations=function(t){return arguments.length?(u=+t,a):u},a.strength=function(t){return arguments.length?(i=+t,a):i},a.radius=function(n){return arguments.length?(t="function"==typeof n?n:r(+n),c(),a):t},a};function v(){}function g(t,n){var e=new v;if(t instanceof v)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var i,r=-1,o=t.length;if(null==n)for(;++r<o;)e.set(r,t[r]);else for(;++r<o;)e.set(n(i=t[r],r,t),i)}else if(t)for(var u in t)e.set(u,t[u]);return e}v.prototype=g.prototype={constructor:v,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var m=g;function x(){}var b=m.prototype;function w(t,n){var e=new x;if(t instanceof x)t.each(function(t){e.add(t)});else if(t){var i=-1,r=t.length;if(null==n)for(;++i<r;)e.add(t[i]);else for(;++i<r;)e.add(n(t[i],i,t))}return e}x.prototype=w.prototype={constructor:x,has:b.has,add:function(t){return this["$"+(t+="")]=t,this},remove:b.remove,clear:b.clear,values:b.keys,size:b.size,empty:b.empty,each:b.each};function k(t){return t.index}function M(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}var O=function(t){var n,e,i,u,a,s=k,c=function(t){return 1/Math.min(u[t.source.index],u[t.target.index])},l=r(30),h=1;function f(i){for(var r=0,u=t.length;r<h;++r)for(var s,c,l,f,p,d,_,y=0;y<u;++y)c=(s=t[y]).source,f=(l=s.target).x+l.vx-c.x-c.vx||o(),p=l.y+l.vy-c.y-c.vy||o(),f*=d=((d=Math.sqrt(f*f+p*p))-e[y])/d*i*n[y],p*=d,l.vx-=f*(_=a[y]),l.vy-=p*_,c.vx+=f*(_=1-_),c.vy+=p*_}function p(){if(i){var r,o,c=i.length,l=t.length,h=m(i,s);for(r=0,u=new Array(c);r<l;++r)(o=t[r]).index=r,"object"!=typeof o.source&&(o.source=M(h,o.source)),"object"!=typeof o.target&&(o.target=M(h,o.target)),u[o.source.index]=(u[o.source.index]||0)+1,u[o.target.index]=(u[o.target.index]||0)+1;for(r=0,a=new Array(l);r<l;++r)o=t[r],a[r]=u[o.source.index]/(u[o.source.index]+u[o.target.index]);n=new Array(l),d(),e=new Array(l),_()}}function d(){if(i)for(var e=0,r=t.length;e<r;++e)n[e]=+c(t[e],e,t)}function _(){if(i)for(var n=0,r=t.length;n<r;++n)e[n]=+l(t[n],n,t)}return null==t&&(t=[]),f.initialize=function(t){i=t,p()},f.links=function(n){return arguments.length?(t=n,p(),f):t},f.id=function(t){return arguments.length?(s=t,f):s},f.iterations=function(t){return arguments.length?(h=+t,f):h},f.strength=function(t){return arguments.length?(c="function"==typeof t?t:r(+t),d(),f):c},f.distance=function(t){return arguments.length?(l="function"==typeof t?t:r(+t),_(),f):l},f},E=e(2),N=e(1);function S(t){return t.x}function A(t){return t.y}var T=10,C=Math.PI*(3-Math.sqrt(5)),P=function(t){var n,e=1,i=.001,r=1-Math.pow(i,1/300),o=0,u=.6,a=m(),s=Object(N.c)(l),c=Object(E.a)("tick","end");function l(){h(),c.call("tick",n),e<i&&(s.stop(),c.call("end",n))}function h(i){var s,c,l=t.length;void 0===i&&(i=1);for(var h=0;h<i;++h)for(e+=(o-e)*r,a.each(function(t){t(e)}),s=0;s<l;++s)null==(c=t[s]).fx?c.x+=c.vx*=u:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=u:(c.y=c.fy,c.vy=0);return n}function f(){for(var n,e=0,i=t.length;e<i;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var r=T*Math.sqrt(e),o=e*C;n.x=r*Math.cos(o),n.y=r*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function p(n){return n.initialize&&n.initialize(t),n}return null==t&&(t=[]),f(),n={tick:h,restart:function(){return s.restart(l),n},stop:function(){return s.stop(),n},nodes:function(e){return arguments.length?(t=e,f(),a.each(p),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(i=+t,n):i},alphaDecay:function(t){return arguments.length?(r=+t,n):+r},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(u=1-t,n):1-u},force:function(t,e){return arguments.length>1?(null==e?a.remove(t):a.set(t,p(e)),n):a.get(t)},find:function(n,e,i){var r,o,u,a,s,c=0,l=t.length;for(null==i?i=1/0:i*=i,c=0;c<l;++c)(u=(r=n-(a=t[c]).x)*r+(o=e-a.y)*o)<i&&(s=a,i=u);return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}},R=function(){var t,n,e,i,u=r(-30),a=1,s=1/0,c=.81;function h(i){var r,o=t.length,u=l(t,S,A).visitAfter(p);for(e=i,r=0;r<o;++r)n=t[r],u.visit(d)}function f(){if(t){var n,e,r=t.length;for(i=new Array(r),n=0;n<r;++n)e=t[n],i[e.index]=+u(e,n,t)}}function p(t){var n,e,r,o,u,a=0,s=0;if(t.length){for(r=o=u=0;u<4;++u)(n=t[u])&&(e=Math.abs(n.value))&&(a+=n.value,s+=e,r+=e*n.x,o+=e*n.y);t.x=r/s,t.y=o/s}else{(n=t).x=n.data.x,n.y=n.data.y;do{a+=i[n.data.index]}while(n=n.next)}t.value=a}function d(t,r,u,l){if(!t.value)return!0;var h=t.x-n.x,f=t.y-n.y,p=l-r,d=h*h+f*f;if(p*p/c<d)return d<s&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d<a&&(d=Math.sqrt(a*d)),n.vx+=h*t.value*e/d,n.vy+=f*t.value*e/d),!0;if(!(t.length||d>=s)){(t.data!==n||t.next)&&(0===h&&(d+=(h=o())*h),0===f&&(d+=(f=o())*f),d<a&&(d=Math.sqrt(a*d)));do{t.data!==n&&(p=i[t.data.index]*e/d,n.vx+=h*p,n.vy+=f*p)}while(t=t.next)}}return h.initialize=function(n){t=n,f()},h.strength=function(t){return arguments.length?(u="function"==typeof t?t:r(+t),f(),h):u},h.distanceMin=function(t){return arguments.length?(a=t*t,h):Math.sqrt(a)},h.distanceMax=function(t){return arguments.length?(s=t*t,h):Math.sqrt(s)},h.theta=function(t){return arguments.length?(c=t*t,h):Math.sqrt(c)},h},j=function(t,n,e){var i,o,u,a=r(.1);function s(t){for(var r=0,a=i.length;r<a;++r){var s=i[r],c=s.x-n||1e-6,l=s.y-e||1e-6,h=Math.sqrt(c*c+l*l),f=(u[r]-h)*o[r]*t/h;s.vx+=c*f,s.vy+=l*f}}function c(){if(i){var n,e=i.length;for(o=new Array(e),u=new Array(e),n=0;n<e;++n)u[n]=+t(i[n],n,i),o[n]=isNaN(u[n])?0:+a(i[n],n,i)}}return"function"!=typeof t&&(t=r(+t)),null==n&&(n=0),null==e&&(e=0),s.initialize=function(t){i=t,c()},s.strength=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),c(),s):a},s.radius=function(n){return arguments.length?(t="function"==typeof n?n:r(+n),c(),s):t},s.x=function(t){return arguments.length?(n=+t,s):n},s.y=function(t){return arguments.length?(e=+t,s):e},s},L=function(t){var n,e,i,o=r(.1);function u(t){for(var r,o=0,u=n.length;o<u;++o)(r=n[o]).vx+=(i[o]-r.x)*e[o]*t}function a(){if(n){var r,u=n.length;for(e=new Array(u),i=new Array(u),r=0;r<u;++r)e[r]=isNaN(i[r]=+t(n[r],r,n))?0:+o(n[r],r,n)}}return"function"!=typeof t&&(t=r(null==t?0:+t)),u.initialize=function(t){n=t,a()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),a(),u):o},u.x=function(n){return arguments.length?(t="function"==typeof n?n:r(+n),a(),u):t},u},D=function(t){var n,e,i,o=r(.1);function u(t){for(var r,o=0,u=n.length;o<u;++o)(r=n[o]).vy+=(i[o]-r.y)*e[o]*t}function a(){if(n){var r,u=n.length;for(e=new Array(u),i=new Array(u),r=0;r<u;++r)e[r]=isNaN(i[r]=+t(n[r],r,n))?0:+o(n[r],r,n)}}return"function"!=typeof t&&(t=r(null==t?0:+t)),u.initialize=function(t){n=t,a()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),a(),u):o},u.y=function(n){return arguments.length?(t="function"==typeof n?n:r(+n),a(),u):t},u};e.d(n,"forceCenter",function(){return i}),e.d(n,"forceCollide",function(){return y}),e.d(n,"forceLink",function(){return O}),e.d(n,"forceManyBody",function(){return R}),e.d(n,"forceRadial",function(){return j}),e.d(n,"forceSimulation",function(){return P}),e.d(n,"forceX",function(){return L}),e.d(n,"forceY",function(){return D})},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Link=n.Node=n.Graph=void 0;var i=u(e(17)),r=u(e(13)),o=u(e(12));function u(t){return t&&t.__esModule?t:{default:t}}n.Graph=i.default,n.Node=r.default,n.Link=o.default},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},r=function(){function t(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(n,e,i){return e&&t(n.prototype,e),i&&t(n,i),n}}(),o=g(e(3)),u=e(5),a=e(15),s=e(0),c=e(28),l=g(e(4)),h=g(e(6)),f=g(e(9)),p=v(e(7)),d=v(e(20)),_=v(e(21)),y=g(e(10));function v(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}function g(t){return t&&t.__esModule?t:{default:t}}var m=function(t){function n(t){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n);var e=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t));return e._generateFocusAnimationProps=function(){var t=e.state.focusedNodeId;return e.state.enableFocusAnimation&&(e.focusAnimationTimeout&&clearTimeout(e