graphdb-workbench
Version:
The web application for GraphDB APIs
1 lines • 331 kB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[14,2,10,22,27,28,29,30,35,36,48,56,57,58,59,60,61,62,64,65,81,84,85,86,89,104],{206:function(e,t,n){"use strict";var r=r||{};r.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),r.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},r.Click={delayDblClick:function(){var e=d3.dispatch("click","dblclick");return d3.rebind((function(t){var n,r=null;t.on("mousedown",(function(){n=d3.mouse(document.body),new Date})),t.on("mouseup",(function(t){var i,o;i=n,o=d3.mouse(document.body),Math.sqrt(Math.pow(i[0]-o[0],2),Math.pow(i[1]-o[1],2))>5||(r?(window.clearTimeout(r),r=null,e.dblclick(t)):r=window.setTimeout((d3.event,function(){e.click(t),r=null}),250))}))}),e,"on")}},t.a=r},207:function(e,t,n){"use strict";var r=r||{};r.Export={getCSSRules:function(e){var t=$('link[href="'+e+'"]')[0].sheet.rules,n="";return _.each(t,(function(e){n+=e.cssText})),n},generateBase64ImageSource:function(){var e=d3.selectAll("svg").attr({version:"1.1",xmlns:"http://www.w3.org/2000/svg"}).node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(e)))}},t.a=r},209:function(e,t,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=f(),i=null,o=null,a=null,s=null;function u(e){var t;i="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,o=i.createSVGPoint(),document.body.appendChild(r)}u.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),f=t.apply(this,r),p=e.apply(this,r),h=d(),g=l.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=s.apply(this,r);for(h.html(o).style({opacity:1,"pointer-events":"all"});g--;)h.classed(l[g],!1);return i=c.get(p).apply(this),v?h.style(v):h.classed(p,!0).style({top:i.top+f[0]+m+"px",left:i.left+f[1]+y+"px"}),u},u.hide=function(){return d().style({opacity:0,"pointer-events":"none"}),u},u.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return d().attr(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d(),n),u},u.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return d().style(e);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d(),n),u},u.direction=function(t){return arguments.length?(e=null==t?t:d3.functor(t),u):e},u.offset=function(e){return arguments.length?(t=null==e?e:d3.functor(e),u):t},u.html=function(e){return arguments.length?(n=null==e?e:d3.functor(e),u):n},u.customPosition=function(e){return arguments.length?(s=null==e?e:d3.functor(e),u):s},u.destroy=function(){return r&&(d().remove(),r=null),u};var c=d3.map({n:function(){var e=p();return{top:e.n.y-r.offsetHeight,left:e.n.x-r.offsetWidth/2}},s:function(){var e=p();return{top:e.s.y,left:e.s.x-r.offsetWidth/2}},e:function(){var e=p();return{top:e.e.y-r.offsetHeight/2,left:e.e.x}},w:function(){var e=p();return{top:e.w.y-r.offsetHeight/2,left:e.w.x-r.offsetWidth}},nw:function(){var e=p();return{top:e.nw.y-r.offsetHeight,left:e.nw.x-r.offsetWidth}},ne:function(){var e=p();return{top:e.ne.y-r.offsetHeight,left:e.ne.x}},sw:function(){var e=p();return{top:e.sw.y,left:e.sw.x-r.offsetWidth}},se:function(){var e=p();return{top:e.se.y,left:e.e.x}}}),l=c.keys();function f(){var e=d3.select(document.createElement("div"));return e.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),e.node()}function d(){return null===r&&(r=f(),document.body.appendChild(r)),d3.select(r)}function p(){for(var e=a||d3.event.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var t={},n=e.getScreenCTM(),r=e.getBBox(),i=r.width,s=r.height,u=r.x,c=r.y;return o.x=u,o.y=c,t.nw=o.matrixTransform(n),o.x+=i,t.ne=o.matrixTransform(n),o.y+=s,t.se=o.matrixTransform(n),o.x-=i,t.sw=o.matrixTransform(n),o.y-=s/2,t.w=o.matrixTransform(n),o.x+=i,t.e=o.matrixTransform(n),o.x-=i/2,o.y-=s/2,t.n=o.matrixTransform(n),o.y+=s,t.s=o.matrixTransform(n),t}return u}})?r.apply(t,i):r)||(e.exports=o)},214:function(e,t,n){var r,i;!function(){var o={version:"3.5.12"},a=[].slice,s=function(e){return a.call(e)},u=this.document;function c(e){return e&&(e.ownerDocument||e.document||e).documentElement}function l(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(u)try{s(u.documentElement.childNodes)[0].nodeType}catch(e){s=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var f=this.Element.prototype,d=f.setAttribute,p=f.setAttributeNS,h=this.CSSStyleDeclaration.prototype,g=h.setProperty;f.setAttribute=function(e,t){d.call(this,e,t+"")},f.setAttributeNS=function(e,t,n){p.call(this,e,t,n+"")},h.setProperty=function(e,t,n){g.call(this,e,t+"",n)}}function m(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function y(e){return null===e?NaN:+e}function v(e){return!isNaN(e)}function x(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}o.ascending=m,o.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},o.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},o.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},o.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)v(n=+e[o])&&(r+=n);else for(;++o<i;)v(n=+t.call(e,e[o],o))&&(r+=n);return r},o.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)v(n=y(e[o]))?r+=n:--a;else for(;++o<i;)v(n=y(t.call(e,e[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},o.median=function(e,t){var n,r=[],i=e.length,a=-1;if(1===arguments.length)for(;++a<i;)v(n=y(e[a]))&&r.push(n);else for(;++a<i;)v(n=y(t.call(e,e[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(m),.5)},o.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,u=0;if(1===arguments.length)for(;++s<i;)v(n=y(e[s]))&&(a+=(r=n-o)*(n-(o+=r/++u)));else for(;++s<i;)v(n=y(t.call(e,e[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++u)));if(u>1)return a/(u-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var w=x(m);function b(e){return e.length}o.bisectLeft=w.left,o.bisect=o.bisectRight=w.right,o.bisector=function(e){return x(1===e.length?function(t,n){return m(e(t),n)}:e)},o.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},o.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},o.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},o.zip=function(){if(!(r=arguments.length))return[];for(var e=-1,t=o.min(arguments,b),n=new Array(t);++e<t;)for(var r,i=-1,a=n[e]=new Array(r);++i<r;)a[i]=arguments[i][e];return n},o.transpose=function(e){return o.zip.apply(o,e)},o.keys=function(e){var t=[];for(var n in e)t.push(n);return t},o.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},o.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},o.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var C=Math.abs;function S(e){for(var t=1;e*t%1;)t*=10;return t}function M(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function T(){this._=Object.create(null)}o.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=S(C(n)),a=-1;if(e*=o,t*=o,(n*=o)<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},o.map=function(e,t){var n=new T;if(e instanceof T)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};var _="__proto__",E="\0";function R(e){return(e+="")===_||e[0]===E?E+e:e}function k(e){return(e+="")[0]===E?e.slice(1):e}function A(e){return R(e)in this._}function I(e){return(e=R(e))in this._&&delete this._[e]}function N(){var e=[];for(var t in this._)e.push(k(t));return e}function L(){var e=0;for(var t in this._)++e;return e}function D(){for(var e in this._)return!1;return!0}function $(){this._=Object.create(null)}function O(e){return e}function P(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function q(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=z.length;n<r;++n){var i=z[n]+t;if(i in e)return i}}M(T,{has:A,get:function(e){return this._[R(e)]},set:function(e,t){return this._[R(e)]=t},remove:I,keys:N,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:k(t),value:this._[t]});return e},size:L,empty:D,forEach:function(e){for(var t in this._)e.call(this,k(t),this._[t])}}),o.nest=function(){var e,t,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return t?t.call(n,o):e?o.sort(e):o;for(var u,c,l,f,d=-1,p=o.length,h=r[s++],g=new T;++d<p;)(f=g.get(u=h(c=o[d])))?f.push(c):g.set(u,[c]);return i?(c=i(),l=function(e,t){c.set(e,a(i,t,s))}):(c={},l=function(e,t){c[e]=a(i,t,s)}),g.forEach(l),c}return n.map=function(e,t){return a(t,e,0)},n.entries=function(e){return function e(t,n){if(n>=r.length)return t;var o=[],a=i[n++];return t.forEach((function(t,r){o.push({key:t,values:e(r,n)})})),a?o.sort((function(e,t){return a(e.key,t.key)})):o}(a(o.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return i[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},o.set=function(e){var t=new $;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},M($,{has:A,add:function(e){return this._[R(e+="")]=!0,e},remove:I,values:N,size:L,empty:D,forEach:function(e){for(var t in this._)e.call(this,k(t))}}),o.behavior={},o.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=P(e,t,t[n]);return e};var z=["webkit","ms","moz","Moz","o","O"];function U(){}function j(){}function Q(e){var t=[],n=new T;function r(){for(var n,r=t,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return e}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,t=t.slice(0,o=t.indexOf(a)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function F(){o.event.preventDefault()}function H(){for(var e,t=o.event;e=t.sourceEvent;)t=e;return t}function G(e){for(var t=new j,n=0,r=arguments.length;++n<r;)t[arguments[n]]=Q(t);return t.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=e,o.event=i,t[i.type].apply(n,r)}finally{o.event=a}}},t}o.dispatch=function(){for(var e=new j,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=Q(e);return e},j.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},o.event=null,o.requote=function(e){return e.replace(B,"\\$&")};var B=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,V={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function W(e){return V(e,Z),e}var Y=function(e,t){return t.querySelector(e)},X=function(e,t){return t.querySelectorAll(e)},J=function(e,t){var n=e.matches||e[q(e,"matchesSelector")];return(J=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Y=function(e,t){return Sizzle(e,t)[0]||null},X=Sizzle,J=Sizzle.matchesSelector),o.selection=function(){return o.select(u.documentElement)};var Z=o.selection.prototype=[];function K(e){return"function"==typeof e?e:function(){return Y(e,this)}}function ee(e){return"function"==typeof e?e:function(){return X(e,this)}}Z.select=function(e){var t,n,r,i,o=[];e=K(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var u=-1,c=r.length;++u<c;)(i=r[u])?(t.push(n=e.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return W(o)},Z.selectAll=function(e){var t,n,r=[];e=ee(e);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,c=a.length;++u<c;)(n=a[u])&&(r.push(t=s(e.call(n,n.__data__,u,i))),t.parentNode=n);return W(r)};var te={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ne(e,t){return e=o.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}:function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function re(e){return e.trim().replace(/\s+/g," ")}function ie(e){return new RegExp("(?:^|\\s+)"+o.requote(e)+"(?:\\s+|$)","g")}function oe(e){return(e+"").trim().split(/^|\s+/)}function ae(e,t){var n=(e=oe(e).map(se)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function se(e){var t=ie(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",re(i+" "+e))):n.setAttribute("class",re(i.replace(t," ")))}}function ue(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function ce(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function le(e){return"function"==typeof e?e:(e=o.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,n=this.namespaceURI;return n?t.createElementNS(n,e):t.createElement(e)}}function fe(){var e=this.parentNode;e&&e.removeChild(this)}function de(e){return{__data__:e}}function pe(e){return function(){return J(this,e)}}function he(e){return arguments.length||(e=m),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function ge(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function me(e){return V(e,ye),e}o.ns={prefix:te,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),te.hasOwnProperty(n)?{space:te[n],local:e}:e}},Z.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=o.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ne(t,e[t]));return this}return this.each(ne(e,t))},Z.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=oe(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!ie(e[i]).test(t))return!1;return!0}for(t in e)this.each(ae(t,e[t]));return this}return this.each(ae(e,t))},Z.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(ue(n,e[n],t));return this}if(r<2){var i=this.node();return l(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(ue(e,t,n))},Z.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(ce(t,e[t]));return this}return this.each(ce(e,t))},Z.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Z.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Z.append=function(e){return e=le(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},Z.insert=function(e,t){return e=le(e),t=K(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},Z.remove=function(){return this.each(fe)},Z.data=function(e,t){var n,r,i=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(e[i]=r.__data__);return e}function a(e,n){var r,i,o,a=e.length,l=n.length,f=Math.min(a,l),d=new Array(l),p=new Array(l),h=new Array(a);if(t){var g,m=new T,y=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(m.has(g=t.call(i,i.__data__,r))?h[r]=i:m.set(g,i),y[r]=g);for(r=-1;++r<l;)(i=m.get(g=t.call(n,o=n[r],r)))?!0!==i&&(d[r]=i,i.__data__=o):p[r]=de(o),m.set(g,!0);for(r=-1;++r<a;)r in y&&!0!==m.get(y[r])&&(h[r]=e[r])}else{for(r=-1;++r<f;)i=e[r],o=n[r],i?(i.__data__=o,d[r]=i):p[r]=de(o);for(;r<l;++r)p[r]=de(n[r]);for(;r<a;++r)h[r]=e[r]}p.update=d,p.parentNode=d.parentNode=h.parentNode=e.parentNode,s.push(p),u.push(d),c.push(h)}var s=me([]),u=W([]),c=W([]);if("function"==typeof e)for(;++i<o;)a(n=this[i],e.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],e);return u.enter=function(){return s},u.exit=function(){return c},u},Z.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Z.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=pe(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;s<u;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return W(i)},Z.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Z.sort=function(e){e=he.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Z.each=function(e){return ge(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},Z.call=function(e){var t=s(arguments);return e.apply(t[0]=this,t),this},Z.empty=function(){return!this.node()},Z.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},Z.size=function(){var e=0;return ge(this,(function(){++e})),e};var ye=[];function ve(e){var t,n;return function(r,i,o){var a,s=e[o].update,u=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<u;);return a}}function xe(e,t,n){var r="__on"+e,i=e.indexOf("."),a=be;i>0&&(e=e.slice(0,i));var u=we.get(e);function c(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return u&&(e=u,a=Ce),i?t?function(){var i=a(t,s(arguments));c.call(this),this.addEventListener(e,this[r]=i,i.$=n),i._=t}:c:t?U:function(){var t,n=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}o.selection.enter=me,o.selection.enter.prototype=ye,ye.append=Z.append,ye.empty=Z.empty,ye.node=Z.node,ye.call=Z.call,ye.size=Z.size,ye.select=function(e){for(var t,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,l=i.length;++c<l;)(o=i[c])?(t.push(r[c]=n=e.call(i.parentNode,o.__data__,c,s)),n.__data__=o.__data__):t.push(null)}return W(a)},ye.insert=function(e,t){return arguments.length<2&&(t=ve(this)),Z.insert.call(this,e,t)},o.select=function(e){var t;return"string"==typeof e?(t=[Y(e,u)]).parentNode=u.documentElement:(t=[e]).parentNode=c(e),W([t])},o.selectAll=function(e){var t;return"string"==typeof e?(t=s(X(e,u))).parentNode=u.documentElement:(t=s(e)).parentNode=null,W([t])},Z.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(xe(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(xe(e,t,n))};var we=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function be(e,t){return function(n){var r=o.event;o.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{o.event=r}}}function Ce(e,t){var n=be(e,t);return function(e){var t=e.relatedTarget;t&&(t===this||8&t.compareDocumentPosition(this))||n.call(this,e)}}u&&we.forEach((function(e){"on"+e in u&&we.remove(e)}));var Se,Me=0;function Te(e){var t=".dragsuppress-"+ ++Me,n="click"+t,r=o.select(l(e)).on("touchmove"+t,F).on("dragstart"+t,F).on("selectstart"+t,F);if(null==Se&&(Se=!("onselectstart"in e)&&q(e.style,"userSelect")),Se){var i=c(e).style,a=i[Se];i[Se]="none"}return function(e){if(r.on(t,null),Se&&(i[Se]=a),e){var o=function(){r.on(n,null)};r.on(n,(function(){F(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(e){return Ee(e,H())};var _e=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ee(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(_e<0){var i=l(e);if(i.scrollX||i.scrollY){var a=(n=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();_e=!(a.f||a.e),n.remove()}}return _e?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Re(){return o.event.changedTouches[0].identifier}o.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=H().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return Ee(e,r)},o.behavior.drag=function(){var e=G(i,"drag","dragstart","dragend"),t=null,n=a(U,o.mouse,l,"mousemove","mouseup"),r=a(Re,o.touch,O,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var u,c=this,l=o.event.target,f=c.parentNode,d=e.of(c,arguments),p=0,h=n(),g=".drag"+(null==h?"":"-"+h),m=o.select(i(l)).on(a+g,x).on(s+g,w),y=Te(l),v=r(f,h);function x(){var e,t,n=r(f,h);n&&(e=n[0]-v[0],t=n[1]-v[1],p|=e|t,v=n,d({type:"drag",x:n[0]+u[0],y:n[1]+u[1],dx:e,dy:t}))}function w(){r(f,h)&&(m.on(a+g,null).on(s+g,null),y(p),d({type:"dragend"}))}u=t?[(u=t.apply(c,arguments)).x-v[0],u.y-v[1]]:[0,0],d({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(t=e,i):t},o.rebind(i,e,"on")},o.touches=function(e,t){return arguments.length<2&&(t=H().touches),t?s(t).map((function(t){var n=Ee(e,t);return n.identifier=t.identifier,n})):[]};var ke=1e-6,Ae=ke*ke,Ie=Math.PI,Ne=2*Ie,Le=Ne-ke,De=Ie/2,$e=Ie/180,Oe=180/Ie;function Pe(e){return e>0?1:e<0?-1:0}function qe(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function ze(e){return e>1?0:e<-1?Ie:Math.acos(e)}function Ue(e){return e>1?De:e<-1?-De:Math.asin(e)}function je(e){return((e=Math.exp(e))+1/e)/2}function Qe(e){return(e=Math.sin(e/2))*e}var Fe=Math.SQRT2;o.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],u=t[1],c=t[2],l=s-i,f=u-o,d=l*l+f*f;if(d<Ae)r=Math.log(c/a)/Fe,n=function(e){return[i+e*l,o+e*f,a*Math.exp(Fe*e*r)]};else{var p=Math.sqrt(d),h=(c*c-a*a+4*d)/(2*a*2*p),g=(c*c-a*a-4*d)/(2*c*2*p),m=Math.log(Math.sqrt(h*h+1)-h),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-m)/Fe,n=function(e){var t,n=e*r,s=je(m),u=a/(2*p)*(s*(t=Fe*n+m,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(m));return[i+u*l,o+u*f,a*s/je(Fe*n+m)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var e,t,n,r,i,a,s,c,f,d={x:0,y:0,k:1},p=[960,500],h=Be,g=250,m=0,y="mousedown.zoom",v="mousemove.zoom",x="mouseup.zoom",w="touchstart.zoom",b=G(C,"zoomstart","zoom","zoomend");function C(e){e.on(y,I).on(Ge+".zoom",L).on("dblclick.zoom",D).on(w,N)}function S(e){return[(e[0]-d.x)/d.k,(e[1]-d.y)/d.k]}function M(e){d.k=Math.max(h[0],Math.min(h[1],e))}function T(e,t){t=function(e){return[e[0]*d.k+d.x,e[1]*d.k+d.y]}(t),d.x+=e[0]-t[0],d.y+=e[1]-t[1]}function _(e,n,r,i){e.__chart__={x:d.x,y:d.y,k:d.k},M(Math.pow(2,i)),T(t=n,r),e=o.select(e),g>0&&(e=e.transition().duration(g)),e.call(C.event)}function E(){s&&s.domain(a.range().map((function(e){return(e-d.x)/d.k})).map(a.invert)),f&&f.domain(c.range().map((function(e){return(e-d.y)/d.k})).map(c.invert))}function R(e){m++||e({type:"zoomstart"})}function k(e){E(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function A(e){--m||(e({type:"zoomend"}),t=null)}function I(){var e=this,t=b.of(e,arguments),n=0,r=o.select(l(e)).on(v,(function(){n=1,T(o.mouse(e),i),k(t)})).on(x,(function(){r.on(v,null).on(x,null),a(n),A(t)})),i=S(o.mouse(e)),a=Te(e);_s.call(e),R(t)}function N(){var e,t=this,n=b.of(t,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,u="touchmove"+s,c="touchend"+s,l=[],f=o.select(t),p=Te(t);function h(){var n=o.touches(t);return e=d.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=S(e))})),n}function g(){var e=o.event.target;o.select(e).on(u,m).on(c,v),l.push(e);for(var n=o.event.changedTouches,s=0,f=n.length;s<f;++s)r[n[s].identifier]=null;var p=h(),g=Date.now();if(1===p.length){if(g-i<500){var y=p[0];_(t,y,r[y.identifier],Math.floor(Math.log(d.k)/Math.LN2)+1),F()}i=g}else if(p.length>1){y=p[0];var x=p[1],w=y[0]-x[0],b=y[1]-x[1];a=w*w+b*b}}function m(){var s,u,c,l,f=o.touches(t);_s.call(t);for(var d=0,p=f.length;d<p;++d,l=null)if(c=f[d],l=r[c.identifier]){if(u)break;s=c,u=l}if(l){var h=(h=c[0]-s[0])*h+(h=c[1]-s[1])*h,g=a&&Math.sqrt(h/a);s=[(s[0]+c[0])/2,(s[1]+c[1])/2],u=[(u[0]+l[0])/2,(u[1]+l[1])/2],M(g*e)}i=null,T(s,u),k(n)}function v(){if(o.event.touches.length){for(var e=o.event.changedTouches,t=0,i=e.length;t<i;++t)delete r[e[t].identifier];for(var a in r)return void h()}o.selectAll(l).on(s,null),f.on(y,I).on(w,N),p(),A(n)}g(),R(n),f.on(y,null).on(w,g)}function L(){var i=b.of(this,arguments);r?clearTimeout(r):(_s.call(this),e=S(t=n||o.mouse(this)),R(i)),r=setTimeout((function(){r=null,A(i)}),50),F(),M(Math.pow(2,.002*He())*d.k),T(t,e),k(i)}function D(){var e=o.mouse(this),t=Math.log(d.k)/Math.LN2;_(this,e,S(e),o.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return Ge||(Ge="onwheel"in u?(He=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in u?(He=function(){return o.event.wheelDelta},"mousewheel"):(He=function(){return-o.event.detail},"MozMousePixelScroll")),C.event=function(e){e.each((function(){var e=b.of(this,arguments),n=d;ks?o.select(this).transition().each("start.zoom",(function(){d=this.__chart__||{x:0,y:0,k:1},R(e)})).tween("zoom:zoom",(function(){var r=p[0],i=p[1],a=t?t[0]:r/2,s=t?t[1]:i/2,u=o.interpolateZoom([(a-d.x)/d.k,(s-d.y)/d.k,r/d.k],[(a-n.x)/n.k,(s-n.y)/n.k,r/n.k]);return function(t){var n=u(t),i=r/n[2];this.__chart__=d={x:a-n[0]*i,y:s-n[1]*i,k:i},k(e)}})).each("interrupt.zoom",(function(){A(e)})).each("end.zoom",(function(){A(e)})):(this.__chart__=d,R(e),k(e),A(e))}))},C.translate=function(e){return arguments.length?(d={x:+e[0],y:+e[1],k:d.k},E(),C):[d.x,d.y]},C.scale=function(e){return arguments.length?(d={x:d.x,y:d.y,k:null},M(+e),E(),C):d.k},C.scaleExtent=function(e){return arguments.length?(h=null==e?Be:[+e[0],+e[1]],C):h},C.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],C):n},C.size=function(e){return arguments.length?(p=e&&[+e[0],+e[1]],C):p},C.duration=function(e){return arguments.length?(g=+e,C):g},C.x=function(e){return arguments.length?(s=e,a=e.copy(),d={x:0,y:0,k:1},C):s},C.y=function(e){return arguments.length?(f=e,c=e.copy(),d={x:0,y:0,k:1},C):f},o.rebind(C,b,"on")};var He,Ge,Be=[0,1/0];function Ve(){}function We(e,t,n){return this instanceof We?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof We?new We(e.h,e.s,e.l):mt(""+e,yt,We):new We(e,t,n)}o.color=Ve,Ve.prototype.toString=function(){return this.rgb()+""},o.hsl=We;var Ye=We.prototype=new Ve;function Xe(e,t,n){var r,i;function o(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new ft(o(e+120),o(e),o(e-120))}function Je(e,t,n){return this instanceof Je?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof Je?new Je(e.h,e.c,e.l):st(e instanceof et?e.l:(e=vt((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Je(e,t,n)}Ye.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,this.l/e)},Ye.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new We(this.h,this.s,e*this.l)},Ye.rgb=function(){return Xe(this.h,this.s,this.l)},o.hcl=Je;var Ze=Je.prototype=new Ve;function Ke(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new et(n,Math.cos(e*=$e)*t,Math.sin(e)*t)}function et(e,t,n){return this instanceof et?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof et?new et(e.l,e.a,e.b):e instanceof Je?Ke(e.h,e.c,e.l):vt((e=ft(e)).r,e.g,e.b):new et(e,t,n)}Ze.brighter=function(e){return new Je(this.h,this.c,Math.min(100,this.l+tt*(arguments.length?e:1)))},Ze.darker=function(e){return new Je(this.h,this.c,Math.max(0,this.l-tt*(arguments.length?e:1)))},Ze.rgb=function(){return Ke(this.h,this.c,this.l).rgb()},o.lab=et;var tt=18,nt=.95047,rt=1,it=1.08883,ot=et.prototype=new Ve;function at(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new ft(lt(3.2404542*(i=ut(i)*nt)-1.5371385*(r=ut(r)*rt)-.4985314*(o=ut(o)*it)),lt(-.969266*i+1.8760108*r+.041556*o),lt(.0556434*i-.2040259*r+1.0572252*o))}function st(e,t,n){return e>0?new Je(Math.atan2(n,t)*Oe,Math.sqrt(t*t+n*n),e):new Je(NaN,NaN,e)}function ut(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ct(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function lt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ft(e,t,n){return this instanceof ft?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ft?new ft(e.r,e.g,e.b):mt(""+e,ft,Xe):new ft(e,t,n)}function dt(e){return new ft(e>>16,e>>8&255,255&e)}function pt(e){return dt(e)+""}ot.brighter=function(e){return new et(Math.min(100,this.l+tt*(arguments.length?e:1)),this.a,this.b)},ot.darker=function(e){return new et(Math.max(0,this.l-tt*(arguments.length?e:1)),this.a,this.b)},ot.rgb=function(){return at(this.l,this.a,this.b)},o.rgb=ft;var ht=ft.prototype=new Ve;function gt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function mt(e,t,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(wt(i[0]),wt(i[1]),wt(i[2]))}return(o=bt.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),t(a,s,u))}function yt(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=u>0&&u<1?0:r),new We(r,i,u)}function vt(e,t,n){var r=ct((.4124564*(e=xt(e))+.3575761*(t=xt(t))+.1804375*(n=xt(n)))/nt),i=ct((.2126729*e+.7151522*t+.072175*n)/rt);return et(116*i-16,500*(r-i),200*(i-ct((.0193339*e+.119192*t+.9503041*n)/it)))}function xt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function wt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ht.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ft(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new ft(i,i,i)},ht.darker=function(e){return new ft((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},ht.hsl=function(){return yt(this.r,this.g,this.b)},ht.toString=function(){return"#"+gt(this.r)+gt(this.g)+gt(this.b)};var bt=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function Ct(e){return"function"==typeof e?e:function(){return e}}function St(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Mt(t,n,e,r)}}function Mt(e,t,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,l=null;function f(){var e,t=c.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(c)||t>=200&&t<300||304===t){try{e=n.call(i,c)}catch(e){return void a.error.call(i,e)}a.load.call(i,e)}else a.error.call(i,c)}return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(e)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var t=o.event;o.event=e;try{a.progress.call(i,c)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?u[e]:(null==t?delete u[e]:u[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(l=e,i):l},i.response=function(e){return n=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),c.open(n,e,!0),null==t||"accept"in u||(u.accept=t+",*/*"),c.setRequestHeader)for(var s in u)c.setRequestHeader(s,u[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),a.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}bt.forEach((function(e,t){bt.set(e,dt(t))})),o.functor=Ct,o.xhr=St(O),o.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=Mt(e,t,null==n?o:a(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?o:a(e)):n},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(u).join(e)}function u(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i}))},i.parseRows=function(e,t){var n,i,o={},a={},s=[],u=e.length,c=0,l=0;function f(){if(c>=u)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++<u;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return c=n+2,13===(s=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++c):10===s&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;c<u;){var s,l=1;if(10===(s=e.charCodeAt(c++)))i=!0;else if(13===s)i=!0,10===e.charCodeAt(c)&&(++c,++l);else if(s!==r)continue;return e.slice(t,c-l)}return e.slice(t)}for(;(n=f())!==a;){for(var d=[];n!==o&&n!==a;)d.push(n),n=f();t&&null==(d=t(d,l++))||s.push(d)}return s},i.format=function(t){if(Array.isArray(t[0]))return i.formatRows(t);var n=new $,r=[];return t.forEach((function(e){for(var t in e)n.has(t)||r.push(n.add(t))})),[r.map(u).join(e)].concat(t.map((function(t){return r.map((function(e){return u(t[e])})).join(e)}))).join("\n")},i.formatRows=function(e){return e.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var Tt,_t,Et,Rt,kt=this[q(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function At(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i={c:e,t:n+t,n:null};return _t?_t.n=i:Tt=i,_t=i,Et||(Rt=clearTimeout(Rt),Et=1,kt(It)),i}function It(){var e=Nt(),t=Lt()-e;t>24?(isFinite(t)&&(clearTimeout(Rt),Rt=setTimeout(It,t)),Et=0):(Et=1,kt(It))}function Nt(){for(var e=Date.now(),t=Tt;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Lt(){for(var e,t=Tt,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:Tt=t.n;return _t=e,n}function Dt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}o.timer=function(){At.apply(this,arguments)},o.timer.flush=function(){Nt(),Lt()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var $t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var n=Math.pow(10,3*C(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}));function Ot(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,a=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>t&&(s=Math.max(1,t-u)),o.push(e.substring(i-=s,i+s)),!((u+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:O;return function(e){var n=Pt.exec(e),r=n[1]||" ",s=n[2]||">",u=n[3]||"-",c=n[4]||"",l=n[5],f=+n[6],d=n[7],p=n[8],h=n[9],g=1,m="",y="",v=!1,x=!0;switch(p&&(p=+p.substring(1)),(l||"0"===r&&"="===s)&&(l=r="0",s="="),h){case"n":d=!0,h="g";break;case"%":g=100,y="%",h="f";break;case"p":g=100,y="%",h="r";break;case"b":case"o":case"x":case"X":"#"===c&&(m="0"+h.toLowerCase());case"c":x=!1;case"d":v=!0,p=0;break;case"s":g=-1,h="r"}"$"===c&&(m=i[0],y=i[1]),"r"!=h||p||(h="g"),null!=p&&("g"==h?p=Math.max(1,Math.min(21,p)):"e"!=h&&"f"!=h||(p=Math.max(0,Math.min(20,p)))),h=qt.get(h)||zt;var w=l&&d;return function(e){var n=y;if(v&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===u?"":u;if(g<0){var c=o.formatPrefix(e,p);e=c.scale(e),n=c.symbol+y}else e*=g;var b,C,S=(e=h(e,p)).lastIndexOf(".");if(S<0){var M=x?e.lastIndexOf("e"):-1;M<0?(b=e,C=""):(b=e.substring(0,M),C=e.substring(M))}else b=e.substring(0,S),C=t+e.substring(S+1);!l&&d&&(b=a(b,1/0));var T=m.length+b.length+C.length+(w?0:i.length),_=T<f?new Array(T=f-T+1).join(r):"";return w&&(b=a(_+b,_.length?f-C.length:1/0)),i+=m,e=b+C,("<"===s?i+e+_:">"===s?_+i+e:"^"===s?_.substring(0,T>>=1)+i+e+_.substring(T):i+(w?e:_+e))+n}}}o.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=o.round(e,Dt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),$t[8+n/3]};var Pt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,qt=o.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=o.round(e,Dt(e,t))).toFixed(Math.max(0,Math.min(20,Dt(e*(1+1e-15),t))))}});function zt(e){return e+""}var Ut=o.time={},jt=Date;function Qt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Qt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Ft.setUTCDate.apply(this._,arguments)},setDay:function(){Ft.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ft.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ft.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ft.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ft.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ft.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ft.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ft.setTime.apply(this._,arguments)}};var Ft=Date.prototype;function Ht(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new jt(n-1)),1),n}function o(e,n){return t(e=new jt(+e),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;a<r;)s.push(new Date(+a)),t(a,1);return s}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var s=e.utc=Gt(e);return s.floor=s,s.round=Gt(r),s.ceil=Gt(i),s.offset=Gt(o),s.range=function(e,t,n){try{jt=Qt;var r=new Qt;return r._=e,a(r,t,n)}finally{jt=Date}},e}function Gt(e){return function(t,n){try{jt=Qt;var r=new Qt;return r._=t,e(r,n)._}finally{jt=Date}}}function Bt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,u=e.months,c=e.shortMonths;function l(e){var t=e.length;function n(n){for(var r,i,o,a=[],s=-1,u=0;++s<t;)37===e.charCodeAt(s)&&(a.push(e.slice(u,s)),null!=(i=Vt[r=e.charAt(++s)])&&(r=e.charAt(++s)),(o=b[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),u=s+1);return a.push(e.slice(u,s)),a.join("")}return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(n,e,t,0)!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&jt!==Qt,i=new(r?Qt:jt);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return e},n}function f(e,t,n,r){for(var i,o,a,s=0,u=t.length,c=n.length;s<u;){if(r>=c)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=C[a in Vt?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}l.utc=function(e){var t=l(e);function n(e){try{var n=new(jt=Qt);return n._=e,t(n)}finally{jt=Date}}return n.parse=function(e){try{jt=Qt;var n=t.parse(e);return n&&n._}finally{jt=Date}},n.toString=t.toString,n},l.multi=l.utc.multi=gn;var d=o.map(),p=Jt(a),h=Zt(a),g=Jt(s),m=Zt(s),y=Jt(u),v=Zt(u),x=Jt(c),w=Zt(c);i.forEach((function(e,t){d.set(e.toLowerCase(),t)}));var b={a:function(e){return s[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return c[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:l(t),d:function(e,t){return Xt(e.getDate(),t,2)},e:function(e,t){return Xt(e.getDate(),t,2)},H:function(e,t){return Xt(e.getHours(),t,2)},I:function(e,t){return Xt(e.getHours()%12||12,t,2)},j:function(e,t){return Xt(1+Ut.dayOfYear(e),t,3)},L:function(e,t){return Xt(e.getMilliseconds(),t,3)},m:function(e,t){return Xt(e.getMonth()+1,t,2)},M:function(e,t){return Xt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return Xt(e.getSeconds(),t,2)},U:function(e,t){return Xt(Ut.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Xt(Ut.mondayOfYear(e),t,2)},x:l(n),X:l(r),y:function(e,t){return Xt(e.getFullYear()%100,t,2)},Y:function(e,t){return Xt(e.getFullYear()%1e4,t,4)},Z:pn,"%":function(){return"%"}},C={a:function(e,t,n){g.lastIndex=0;var r=g.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){p.lastIndex=0;var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){x.lastIndex=0;var r=x.exec(t.slice(n));return r?(e.m=w.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){y.lastIndex=0;var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return f(e,b.c.toString(),t,n)},d:sn,e:sn,H:cn,I:cn,j:un,L:dn,m:an,M:ln,p:function(e,t,n){var r=d.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:fn,U:en,w:Kt,W:tn,x:function(e,t,n){return f(e,b.x.toString(),t,n)},X:function(e,t,n){return f(e,b.X.toString(),t,n)},y:rn,Y:nn,Z:on,"%":hn};return l}Ut.year=Ht((function(e){return(e=Ut.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),Ut.years=Ut.year.range,Ut.years.utc=Ut.year.utc.range,Ut.day=Ht((function(e){var t=new jt(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),Ut.days=Ut.day.range,Ut.days.utc=Ut.day.utc.range,Ut.dayOfYear=function(e){var t=Ut.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var n=Ut[e]=Ht((function(e){return(e=Ut.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var n=Ut.year(e).getDay();return Math.floor((Ut.dayOfYear(e)+(n+t)%7)/7)-(n!==t)}));Ut[e+"s"]=n.range,Ut[e+"s"].utc=n.utc.range,Ut[e+"OfYear"]=function(e){var n=Ut.year(e).getDay();return Math.floor((Ut.dayOfYear(e)+(n+t)%7)/7)}})),Ut.week=Ut.sunday,Ut.weeks=Ut.sunday.range,Ut.weeks.utc=Ut.sunday.utc.range,Ut.weekOfYear=Ut.sundayOfYear;var Vt={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,Yt=/^%/;function Xt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Jt(e){return new RegExp("^(?:"+e.map(o.requote).join("|")+")","i")}function Zt(e){for(var t=new T,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);r