app/assets/javascripts/index.pack.js in attractor-2.0.3 vs app/assets/javascripts/index.pack.js in attractor-2.0.4

- old
+ new

@@ -33,6 +33,6 @@ * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case o:case u:case l:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case s:return t;default:return e}}case v:case y:case a:return e}}}function x(t){return w(t)===h}e.typeOf=w,e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=s,e.Element=i,e.ForwardRef=p,e.Fragment=o,e.Lazy=v,e.Memo=y,e.Portal=a,e.Profiler=u,e.StrictMode=l,e.Suspense=d,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===u||t===l||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===s||t.$$typeof===c||t.$$typeof===p||t.$$typeof===g||t.$$typeof===_||t.$$typeof===b)},e.isAsyncMode=function(t){return x(t)||w(t)===f},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===o},e.isLazy=function(t){return w(t)===v},e.isMemo=function(t){return w(t)===y},e.isPortal=function(t){return w(t)===a},e.isProfiler=function(t){return w(t)===u},e.isStrictMode=function(t){return w(t)===l},e.isSuspense=function(t){return w(t)===d}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(40),o=n.n(a),l=n(2),u=n.n(l),s=n(3),c=n.n(s),f=n(5),h=n.n(f),p=n(11),d=n(1),m=n.n(d);function y(t){return(y="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})(t)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){v(t,e,n[e])}))}return t}function _(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function b(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function w(t){return e=t,(e-=0)==e?t:(t=t.replace(/[\-_\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))).substr(0,1).toLowerCase()+t.substr(1);var e}var x=!1;try{x=!0}catch(t){}function k(t){return null===t?null:"object"===y(t)&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:"fas",iconName:t}:void 0}function E(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?v({},t,e):{}}function T(t){var e=t.icon,n=t.mask,r=t.symbol,i=t.className,a=t.title,o=k(e),l=E("classes",[].concat(b(function(t){var e,n=t.spin,r=t.pulse,i=t.fixedWidth,a=t.inverse,o=t.border,l=t.listItem,u=t.flip,s=t.size,c=t.rotation,f=t.pull,h=(v(e={"fa-spin":n,"fa-pulse":r,"fa-fw":i,"fa-inverse":a,"fa-border":o,"fa-li":l,"fa-flip-horizontal":"horizontal"===u||"both"===u,"fa-flip-vertical":"vertical"===u||"both"===u},"fa-".concat(s),void 0!==s),v(e,"fa-rotate-".concat(c),void 0!==c),v(e,"fa-pull-".concat(f),void 0!==f),v(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(h).map((function(t){return h[t]?t:null})).filter((function(t){return t}))}(t)),b(i.split(" ")))),u=E("transform","string"==typeof t.transform?p.b.transform(t.transform):t.transform),s=E("mask",k(n)),c=Object(p.a)(o,g({},l,u,s,{symbol:r,title:a}));if(!c)return function(){var t;!x&&console&&"function"==typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find icon",o),null;var f=c.abstract,h={};return Object.keys(t).forEach((function(e){T.defaultProps.hasOwnProperty(e)||(h[e]=t[e])})),S(f[0],h)}T.displayName="FontAwesomeIcon",T.propTypes={border:m.a.bool,className:m.a.string,mask:m.a.oneOfType([m.a.object,m.a.array,m.a.string]),fixedWidth:m.a.bool,inverse:m.a.bool,flip:m.a.oneOf(["horizontal","vertical","both"]),icon:m.a.oneOfType([m.a.object,m.a.array,m.a.string]),listItem:m.a.bool,pull:m.a.oneOf(["right","left"]),pulse:m.a.bool,rotation:m.a.oneOf([90,180,270]),size:m.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:m.a.bool,symbol:m.a.oneOfType([m.a.bool,m.a.string]),title:m.a.string,transform:m.a.oneOfType([m.a.string,m.a.object]),swapOpacity:m.a.bool},T.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var S=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var i=(n.children||[]).map((function(n){return t(e,n)})),a=Object.keys(n.attributes||{}).reduce((function(t,e){var r=n.attributes[e];switch(e){case"class":t.attrs.className=r,delete n.attributes.class;break;case"style":t.attrs.style=function(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n,r=e.indexOf(":"),i=w(e.slice(0,r)),a=e.slice(r+1).trim();return i.startsWith("webkit")?t[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=a:t[i]=a,t}),{})}(r);break;default:0===e.indexOf("aria-")||0===e.indexOf("data-")?t.attrs[e.toLowerCase()]=r:t.attrs[w(e)]=r}return t}),{attrs:{}}),o=r.style,l=void 0===o?{}:o,u=_(r,["style"]);return a.attrs.style=g({},a.attrs.style,l),e.apply(void 0,[n.tag,g({},a.attrs,u)].concat(b(i)))}.bind(null,i.a.createElement),C={prefix:"fas",iconName:"arrow-right",icon:[448,512,[],"f061","M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"]},M={prefix:"fas",iconName:"sad-tear",icon:[496,512,[],"f5b4","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM152 416c-26.5 0-48-21-48-47 0-20 28.5-60.4 41.6-77.8 3.2-4.3 9.6-4.3 12.8 0C171.5 308.6 200 349 200 369c0 26-21.5 47-48 47zm16-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm170.2 154.2C315.8 367.4 282.9 352 248 352c-21.2 0-21.2-32 0-32 44.4 0 86.3 19.6 114.7 53.8 13.8 16.4-11.2 36.5-24.5 20.4z"]},N=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},P=function(t){return null===t?NaN:+t};function O(t,e,n){return(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).sort(N),function(t,e,n=P){if(!(r=t.length))return;if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t),l=+n(t[a+1],a+1,t);return o+(l-o)*(i-a)}(t,e)}function A(){var t=Object(r.useState)(95),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)([]),l=u()(o,2),s=l[0],f=l[1],p=function(){var t=h()(c.a.mark((function t(e){var n,r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.values){t.next=5;break}r=O(window.values,e/100,(function(t){return t.x*t.y})),n=window.values.filter((function(t){return t.x*t.y>r})),t.next=10;break;case 5:return t.next=7,fetch("suggestions?t=".concat(e));case 7:return t.next=9,t.sent.json();case 9:n=t.sent;case 10:f(n);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){p(n)}),[]),i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"d-flex justify-content-between"},i.a.createElement("div",null,i.a.createElement("h5",{className:"card-title"},"Refactoring Candidates"),i.a.createElement("h6",{className:"card-subtitle text-muted"},"Top 95 Percentile of Churn * Complexity")),i.a.createElement("div",{id:"percentile-input-group"},i.a.createElement("label",{htmlFor:"percentile",className:"text-muted"},i.a.createElement("small",null,"Percentile")),i.a.createElement("div",{className:"input-group align-items-start"},i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"percentile-button",id:"percentile",value:n,onChange:function(t){return a(t.target.value)}}),i.a.createElement("div",{className:"input-group-append"},i.a.createElement("button",{className:"btn btn-dark",type:"button",id:"percentile-button",onClick:function(t){t.preventDefault(),p(n)}},i.a.createElement(T,{icon:C})))))),i.a.createElement("table",{className:"table mt-4"},i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",{scope:"col"},"File Path"),i.a.createElement("th",{scope:"col"},"Churn"),i.a.createElement("th",{scope:"col"},"Complexity"),i.a.createElement("th",{scope:"col"},"Churn * Complexity"))),i.a.createElement("tbody",{id:"suggestions-table"},s.length>0&&s.map((function(t){return i.a.createElement("tr",{key:t.file_path},i.a.createElement("td",null,t.file_path),i.a.createElement("td",null,t.x),i.a.createElement("td",null,Math.round(t.y)),i.a.createElement("td",null,Math.round(t.x*t.y)))}))))))}var L=n(8),R=n.n(L),F=function(t){var e=t.activeFile,n=t.handleClose;return i.a.createElement("div",{className:"col-4"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},e.file_path),i.a.createElement("h6",{className:"text-muted"},"Additional information"),i.a.createElement("button",{type:"button",className:"close","aria-label":"Close",onClick:n},i.a.createElement("span",{"aria-hidden":"true"},"×"))),i.a.createElement("div",{className:"card-body"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Method Teardown")),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,Object.entries(e.details).map((function(t){var e=u()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-9 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-3"},Math.round(100*r)/100))})))),i.a.createElement("h6",{className:"text-muted mt-3"},"Git history (last 10 commits)"),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,e.history.map((function(t){var e=u()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-3 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-8 text-truncate"},r))})))))))},z=function(t){var e=t.state,n=t.dispatch,r=t.activePlot;return i.a.createElement("div",{className:"mt-3"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Display options")),i.a.createElement("form",null,i.a.createElement("div",{className:"form-row"},i.a.createElement("div",{className:"form-group col-2"},i.a.createElement("input",{checked:e.displayFilenames,className:"form-check-input",type:"checkbox",id:"filenames-check",onChange:function(){n({type:"SET_DISPLAY_FILENAMES",displayFilenames:!e.displayFilenames})}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"filenames-check"},i.a.createElement("small",null,"Display filenames"))),i.a.createElement("div",{className:"form-group col-2"},i.a.createElement("input",{checked:e.displayRegression,className:"form-check-input",type:"checkbox",id:"regression-check",disabled:r!==jf.SCATTER_PLOT,onChange:function(){n({type:"SET_DISPLAY_REGRESSION",displayRegression:!e.displayRegression})}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"regression-check"},i.a.createElement("small",null,"Display regression"))),i.a.createElement("div",{className:"form-group col-3"},i.a.createElement("label",{htmlFor:"regression-type",className:"text-muted ".concat(r===jf.TREE_MAP&&"disabled")},i.a.createElement("small",null,"Regression Type")),i.a.createElement("select",{id:"regression-type",className:"form-control",disabled:r!==jf.SCATTER_PLOT,onChange:function(t){n({type:"SET_REGRESSION_TYPE",regressionType:parseInt(t.currentTarget.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Power Law"),i.a.createElement("option",{value:"1"},"Linear"))))))},I=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var j,U,D=(1===(j=I).length&&(U=j,j=function(t,e){return I(U(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;j(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;j(t[i],e)>0?r=i:n=i+1}return n}}),H=D.right;var W=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},$=Array.prototype,Y=$.slice,B=($.map,function(t){return function(){return t}}),q=function(t){return t},V=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},X=Math.sqrt(50),Q=Math.sqrt(10),K=Math.sqrt(2);var G=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},Z=function(){var t=q,e=W,n=G;function r(r){var i,a,o=r.length,l=new Array(o);for(i=0;i<o;++i)l[i]=t(r[i],i,r);var u,s,c,f,h,p,d=e(l),m=d[0],y=d[1],v=n(l,m,y);Array.isArray(v)||(u=m,s=y,c=v,f=Math.abs(s-u)/Math.max(0,c),h=Math.pow(10,Math.floor(Math.log(f)/Math.LN10)),(p=f/h)>=X?h*=10:p>=Q?h*=5:p>=K&&(h*=2),v=s<u?-h:h,v=V(Math.ceil(m/v)*v,y,v));for(var g=v.length;v[0]<=m;)v.shift(),--g;for(;v[g-1]>y;)v.pop(),--g;var _,b=new Array(g+1);for(i=0;i<=g;++i)(_=b[i]=[]).x0=i>0?v[i-1]:m,_.x1=i<g?v[i]:y;for(i=0;i<o;++i)m<=(a=l[i])&&a<=y&&b[H(v,a,0,g)].push(r[i]);return b}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:B(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:B([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?B(Y.call(t)):B(t),r):n},r},J=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r};var tt=Array.prototype.slice,et=function(t){return t},nt=1,rt=2,it=3,at=4,ot=1e-6;function lt(t){return"translate("+(t+.5)+",0)"}function ut(t){return"translate(0,"+(t+.5)+")"}function st(t){return function(e){return+t(e)}}function ct(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ft(){return!this.__axis}function ht(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u=t===nt||t===at?-1:1,s=t===at||t===rt?"x":"y",c=t===nt||t===it?lt:ut;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):et:i,d=Math.max(a,0)+l,m=e.range(),y=+m[0]+.5,v=+m[m.length-1]+.5,g=(e.bandwidth?ct:st)(e.copy()),_=f.selection?f.selection():f,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(h,e).order(),x=w.exit(),k=w.enter().append("g").attr("class","tick"),E=w.select("line"),T=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),E=E.merge(k.append("line").attr("stroke","currentColor").attr(s+"2",u*a)),T=T.merge(k.append("text").attr("fill","currentColor").attr(s,u*d).attr("dy",t===nt?"0em":t===it?"0.71em":"0.32em")),f!==_&&(b=b.transition(f),w=w.transition(f),E=E.transition(f),T=T.transition(f),x=x.transition(f).attr("opacity",ot).attr("transform",(function(t){return isFinite(t=g(t))?c(t):this.getAttribute("transform")})),k.attr("opacity",ot).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:g(t))}))),x.remove(),b.attr("d",t===at||t==rt?o?"M"+u*o+","+y+"H0.5V"+v+"H"+u*o:"M0.5,"+y+"V"+v:o?"M"+y+","+u*o+"V0.5H"+v+"V"+u*o:"M"+y+",0.5H"+v),w.attr("opacity",1).attr("transform",(function(t){return c(g(t))})),E.attr(s+"2",u*a),T.attr(s,u*d).text(p),_.filter(ft).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===rt?"start":t===at?"end":"middle"),_.each((function(){this.__axis=g}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=tt.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:tt.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:tt.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function pt(t){return ht(it,t)}function dt(t){return ht(at,t)}var mt={value:function(){}};function yt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new vt(r)}function vt(t){this._=t}function gt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function _t(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function bt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}vt.prototype=yt.prototype={constructor:vt,on:function(t,e){var n,r=this._,i=gt(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=bt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=bt(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=_t(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new vt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var wt=yt,xt="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:xt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Et=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),kt.hasOwnProperty(e)?{space:kt[e],local:t}:t};function Tt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===xt&&e.documentElement.namespaceURI===xt?e.createElement(t):e.createElementNS(n,t)}}function St(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var Ct=function(t){var e=Et(t);return(e.local?St:Tt)(e)};function Mt(){}var Nt=function(t){return null==t?Mt:function(){return this.querySelector(t)}};function Pt(){return[]}var Ot=function(t){return null==t?Pt:function(){return this.querySelectorAll(t)}},At=function(t){return function(){return this.matches(t)}},Lt=function(t){return new Array(t.length)};function Rt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Rt.prototype={constructor:Rt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Ft="$";function zt(t,e,n,r,i,a){for(var o,l=0,u=e.length,s=a.length;l<s;++l)(o=e[l])?(o.__data__=a[l],r[l]=o):n[l]=new Rt(t,a[l]);for(;l<u;++l)(o=e[l])&&(i[l]=o)}function It(t,e,n,r,i,a,o){var l,u,s,c={},f=e.length,h=a.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=s=Ft+o.call(u,u.__data__,l,e),s in c?i[l]=u:c[s]=u);for(l=0;l<h;++l)(u=c[s=Ft+o.call(t,a[l],l,a)])?(r[l]=u,u.__data__=a[l],c[s]=null):n[l]=new Rt(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(i[l]=u)}function jt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ut(t){return function(){this.removeAttribute(t)}}function Dt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ht(t,e){return function(){this.setAttribute(t,e)}}function Wt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function $t(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Yt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Bt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function qt(t){return function(){this.style.removeProperty(t)}}function Vt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Xt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Qt(t,e){return t.style.getPropertyValue(e)||Bt(t).getComputedStyle(t,null).getPropertyValue(e)}function Kt(t){return function(){delete this[t]}}function Gt(t,e){return function(){this[t]=e}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Jt(t){return t.trim().split(/^|\s+/)}function te(t){return t.classList||new ee(t)}function ee(t){this._node=t,this._names=Jt(t.getAttribute("class")||"")}function ne(t,e){for(var n=te(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function re(t,e){for(var n=te(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ie(t){return function(){ne(this,t)}}function ae(t){return function(){re(this,t)}}function oe(t,e){return function(){(e.apply(this,arguments)?ne:re)(this,t)}}ee.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function le(){this.textContent=""}function ue(t){return function(){this.textContent=t}}function se(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ce(){this.innerHTML=""}function fe(t){return function(){this.innerHTML=t}}function he(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function pe(){this.nextSibling&&this.parentNode.appendChild(this)}function de(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function me(){return null}function ye(){var t=this.parentNode;t&&t.removeChild(this)}function ve(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function ge(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var _e={},be=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(_e={mouseenter:"mouseover",mouseleave:"mouseout"}));function we(t,e,n){return t=xe(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function xe(t,e,n){return function(r){var i=be;be=r;try{t.call(this,this.__data__,e,n)}finally{be=i}}}function ke(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ee(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Te(t,e,n){var r=_e.hasOwnProperty(t.type)?we:xe;return function(i,a,o){var l,u=this.__on,s=r(e,a,o);if(u)for(var c=0,f=u.length;c<f;++c)if((l=u[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=s,l.capture=n),void(l.value=e);this.addEventListener(t.type,s,n),l={type:t.type,name:t.name,value:e,listener:s,capture:n},u?u.push(l):this.__on=[l]}}function Se(t,e,n){var r=Bt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ce(t,e){return function(){return Se(this,t,e)}}function Me(t,e){return function(){return Se(this,t,e.apply(this,arguments))}}var Ne=[null];function Pe(t,e){this._groups=t,this._parents=e}function Oe(){return new Pe([[document.documentElement]],Ne)}Pe.prototype=Oe.prototype={constructor:Pe,select:function(t){"function"!=typeof t&&(t=Nt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,l=e[i],u=l.length,s=r[i]=new Array(u),c=0;c<u;++c)(a=l[c])&&(o=t.call(a,a.__data__,c,l))&&("__data__"in a&&(o.__data__=a.__data__),s[c]=o);return new Pe(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Ot(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,l=e[a],u=l.length,s=0;s<u;++s)(o=l[s])&&(r.push(t.call(o,o.__data__,s,l)),i.push(o));return new Pe(r,i)},filter:function(t){"function"!=typeof t&&(t=At(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new Pe(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n,r=e?It:zt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,l=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var f=i[c],h=a[c],p=h.length,d=t.call(f,f&&f.__data__,c,i),m=d.length,y=u[c]=new Array(m),v=l[c]=new Array(m);r(f,h,y,v,s[c]=new Array(p),d,e);for(var g,_,b=0,w=0;b<m;++b)if(g=y[b]){for(b>=w&&(w=b+1);!(_=v[w])&&++w<m;);g._next=_||null}}return(l=new Pe(l,i))._enter=u,l._exit=s,l},enter:function(){return new Pe(this._enter||this._groups.map(Lt),this._parents)},exit:function(){return new Pe(this._exit||this._groups.map(Lt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new Pe(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=jt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,l=n[a],u=l.length,s=i[a]=new Array(u),c=0;c<u;++c)(o=l[c])&&(s[c]=o);s.sort(e)}return new Pe(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,l=a.length;o<l;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Et(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Dt:Ut:"function"==typeof e?n.local?Yt:$t:n.local?Wt:Ht)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?qt:"function"==typeof e?Xt:Vt)(t,e,null==n?"":n)):Qt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Kt:"function"==typeof e?Zt:Gt)(t,e)):this.node()[t]},classed:function(t,e){var n=Jt(t+"");if(arguments.length<2){for(var r=te(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?oe:e?ie:ae)(n,e))},text:function(t){return arguments.length?this.each(null==t?le:("function"==typeof t?se:ue)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ce:("function"==typeof t?he:fe)(t)):this.node().innerHTML},raise:function(){return this.each(pe)},lower:function(){return this.each(de)},append:function(t){var e="function"==typeof t?t:Ct(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ct(t),r=null==e?me:"function"==typeof e?e:Nt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ye)},clone:function(t){return this.select(t?ge:ve)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=ke(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?Te:Ee,null==n&&(n=!1),r=0;r<o;++r)this.each(l(a[r],e,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(r=0,u=l[s];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Me:Ce)(t,e))}};var Ae=Oe,Le=function(t){return"string"==typeof t?new Pe([[document.querySelector(t)]],[document.documentElement]):new Pe([[t]],Ne)},Re=0;function Fe(){this._="@"+(++Re).toString(36)}Fe.prototype=function(){return new Fe}.prototype={constructor:Fe,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function ze(t,e,n,r,i,a,o,l,u,s){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=l,this.dy=u,this._=s}ze.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ie=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function je(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ue(){}var De="\\s*([+-]?\\d+)\\s*",He="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",We="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$e=/^#([0-9a-f]{3,8})$/,Ye=new RegExp("^rgb\\("+[De,De,De]+"\\)$"),Be=new RegExp("^rgb\\("+[We,We,We]+"\\)$"),qe=new RegExp("^rgba\\("+[De,De,De,He]+"\\)$"),Ve=new RegExp("^rgba\\("+[We,We,We,He]+"\\)$"),Xe=new RegExp("^hsl\\("+[He,We,We]+"\\)$"),Qe=new RegExp("^hsla\\("+[He,We,We,He]+"\\)$"),Ke={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 Ge(){return this.rgb().formatHex()}function Ze(){return this.rgb().formatRgb()}function Je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=$e.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tn(e):3===n?new an(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new an(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new an(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ye.exec(t))?new an(e[1],e[2],e[3],1):(e=Be.exec(t))?new an(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qe.exec(t))?en(e[1],e[2],e[3],e[4]):(e=Ve.exec(t))?en(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xe.exec(t))?sn(e[1],e[2]/100,e[3]/100,1):(e=Qe.exec(t))?sn(e[1],e[2]/100,e[3]/100,e[4]):Ke.hasOwnProperty(t)?tn(Ke[t]):"transparent"===t?new an(NaN,NaN,NaN,0):null}function tn(t){return new an(t>>16&255,t>>8&255,255&t,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new an(t,e,n,r)}function nn(t){return t instanceof Ue||(t=Je(t)),t?new an((t=t.rgb()).r,t.g,t.b,t.opacity):new an}function rn(t,e,n,r){return 1===arguments.length?nn(t):new an(t,e,n,null==r?1:r)}function an(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function on(){return"#"+un(this.r)+un(this.g)+un(this.b)}function ln(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function un(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function sn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hn(t,e,n,r)}function cn(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof Ue||(t=Je(t)),!t)return new hn;if(t instanceof hn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n<r):n===a?(r-e)/l+2:(e-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new hn(o,l,u,t.opacity)}function fn(t,e,n,r){return 1===arguments.length?cn(t):new hn(t,e,n,null==r?1:r)}function hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function dn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Ie(Ue,Je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ge,formatHex:Ge,formatHsl:function(){return cn(this).formatHsl()},formatRgb:Ze,toString:Ze}),Ie(an,rn,je(Ue,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new an(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new an(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:on,formatHex:on,formatRgb:ln,toString:ln})),Ie(hn,fn,je(Ue,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new an(pn(t>=240?t-240:t+120,i,r),pn(t,i,r),pn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var mn=function(t){return function(){return t}};function yn(t,e){return function(n){return t+n*e}}function vn(t,e){var n=e-t;return n?yn(t,n>180||n<-180?n-360*Math.round(n/360):n):mn(isNaN(t)?e:t)}function gn(t){return 1==(t=+t)?_n:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):mn(isNaN(e)?n:e)}}function _n(t,e){var n=e-t;return n?yn(t,n):mn(isNaN(t)?e:t)}var bn=function t(e){var n=gn(e);function r(t,e){var r=n((t=rn(t)).r,(e=rn(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=_n(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function wn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=rn(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}wn((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return dn((n-r/e)*e,o,i,a,l)}})),wn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return dn((n-r/e)*e,i,a,o,l)}}));var xn=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Ln(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}},kn=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},En=function(t,e){return e-=t=+t,function(n){return t+e*n}},Tn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ln(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Sn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(Sn.source,"g");var Mn,Nn,Pn,On,An=function(t,e){var n,r,i,a=Sn.lastIndex=Cn.lastIndex=0,o=-1,l=[],u=[];for(t+="",e+="";(n=Sn.exec(t))&&(r=Cn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:En(n,r)})),a=Cn.lastIndex;return a<e.length&&(i=e.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})},Ln=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?mn(e):("number"===r?En:"string"===r?(n=Je(e))?(e=n,bn):An:e instanceof Je?bn:e instanceof Date?kn:Array.isArray(e)?xn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Tn:En)(t,e)},Rn=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},Fn=180/Math.PI,zn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},In=function(t,e,n,r,i,a){var o,l,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Fn,skewX:Math.atan(u)*Fn,scaleX:o,scaleY:l}};function jn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var l=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,l){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);l.push({i:u-4,x:En(t,i)},{i:u-2,x:En(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,l,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:En(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:En(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:En(t,n)},{i:l-2,x:En(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var Un=jn((function(t){return"none"===t?zn:(Mn||(Mn=document.createElement("DIV"),Nn=document.documentElement,Pn=document.defaultView),Mn.style.transform=t,t=Pn.getComputedStyle(Nn.appendChild(Mn),null).getPropertyValue("transform"),Nn.removeChild(Mn),t=t.slice(7,-1).split(","),In(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Dn=jn((function(t){return null==t?zn:(On||(On=document.createElementNS("http://www.w3.org/2000/svg","g")),On.setAttribute("transform",t),(t=On.transform.baseVal.consolidate())?(t=t.matrix,In(t.a,t.b,t.c,t.d,t.e,t.f)):zn)}),", ",")",")");Math.SQRT2;function Hn(t){return function(e,n){var r=t((e=fn(e)).h,(n=fn(n)).h),i=_n(e.s,n.s),a=_n(e.l,n.l),o=_n(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}Hn(vn),Hn(_n);var Wn=Math.PI/180,$n=180/Math.PI,Yn=.96422,Bn=1,qn=.82521,Vn=4/29,Xn=6/29,Qn=3*Xn*Xn,Kn=Xn*Xn*Xn;function Gn(t){if(t instanceof Jn)return new Jn(t.l,t.a,t.b,t.opacity);if(t instanceof or)return lr(t);t instanceof an||(t=nn(t));var e,n,r=rr(t.r),i=rr(t.g),a=rr(t.b),o=tr((.2225045*r+.7168786*i+.0606169*a)/Bn);return r===i&&i===a?e=n=o:(e=tr((.4360747*r+.3850649*i+.1430804*a)/Yn),n=tr((.0139322*r+.0971045*i+.7141733*a)/qn)),new Jn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Zn(t,e,n,r){return 1===arguments.length?Gn(t):new Jn(t,e,n,null==r?1:r)}function Jn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function tr(t){return t>Kn?Math.pow(t,1/3):t/Qn+Vn}function er(t){return t>Xn?t*t*t:Qn*(t-Vn)}function nr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ir(t){if(t instanceof or)return new or(t.h,t.c,t.l,t.opacity);if(t instanceof Jn||(t=Gn(t)),0===t.a&&0===t.b)return new or(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*$n;return new or(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ar(t,e,n,r){return 1===arguments.length?ir(t):new or(t,e,n,null==r?1:r)}function or(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function lr(t){if(isNaN(t.h))return new Jn(t.l,0,0,t.opacity);var e=t.h*Wn;return new Jn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function ur(t){return function(e,n){var r=t((e=ar(e)).h,(n=ar(n)).h),i=_n(e.c,n.c),a=_n(e.l,n.l),o=_n(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}Ie(Jn,Zn,je(Ue,{brighter:function(t){return new Jn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Jn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new an(nr(3.1338561*(e=Yn*er(e))-1.6168667*(t=Bn*er(t))-.4906146*(n=qn*er(n))),nr(-.9787684*e+1.9161415*t+.033454*n),nr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Ie(or,ar,je(Ue,{brighter:function(t){return new or(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new or(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return lr(this).rgb()}}));ur(vn),ur(_n);var sr=-.29227,cr=-.90649,fr=1.97294,hr=fr*cr,pr=1.78277*fr,dr=1.78277*sr- -.14861*cr;function mr(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);t instanceof an||(t=nn(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(dr*r+hr*e-pr*n)/(dr+hr-pr),a=r-i,o=(fr*(n-i)-sr*a)/cr,l=Math.sqrt(o*o+a*a)/(fr*i*(1-i)),u=l?Math.atan2(o,a)*$n-120:NaN;return new yr(u<0?u+360:u,l,i,t.opacity)}(t):new yr(t,e,n,null==r?1:r)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function vr(t){return function e(n){function r(e,r){var i=t((e=mr(e)).h,(r=mr(r)).h),a=_n(e.s,r.s),o=_n(e.l,r.l),l=_n(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}Ie(yr,mr,je(Ue,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Wn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new an(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(sr*r+cr*i)),255*(e+n*(fr*r)),this.opacity)}}));vr(vn),vr(_n);var gr,_r,br=0,wr=0,xr=0,kr=1e3,Er=0,Tr=0,Sr=0,Cr="object"==typeof performance&&performance.now?performance:Date,Mr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Nr(){return Tr||(Mr(Pr),Tr=Cr.now()+Sr)}function Pr(){Tr=0}function Or(){this._call=this._time=this._next=null}function Ar(t,e,n){var r=new Or;return r.restart(t,e,n),r}function Lr(){Tr=(Er=Cr.now())+Sr,br=wr=0;try{!function(){Nr(),++br;for(var t,e=gr;e;)(t=Tr-e._time)>=0&&e._call.call(null,t),e=e._next;--br}()}finally{br=0,function(){var t,e,n=gr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:gr=e);_r=t,Fr(r)}(),Tr=0}}function Rr(){var t=Cr.now(),e=t-Er;e>kr&&(Sr-=e,Er=t)}function Fr(t){br||(wr&&(wr=clearTimeout(wr)),t-Tr>24?(t<1/0&&(wr=setTimeout(Lr,t-Cr.now()-Sr)),xr&&(xr=clearInterval(xr))):(xr||(Er=Cr.now(),xr=setInterval(Rr,kr)),br=1,Mr(Lr)))}Or.prototype=Ar.prototype={constructor:Or,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Nr():+n)+(null==e?0:+e),this._next||_r===this||(_r?_r._next=this:gr=this,_r=this),this._call=t,this._time=n,Fr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fr())}};var zr=function(t,e,n){var r=new Or;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Ir=wt("start","end","cancel","interrupt"),jr=[],Ur=0,Dr=1,Hr=2,Wr=3,$r=4,Yr=5,Br=6,qr=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var s,c,f,h;if(n.state!==Dr)return l();for(s in i)if((h=i[s]).name===n.name){if(h.state===Wr)return zr(a);h.state===$r?(h.state=Br,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<e&&(h.state=Br,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[s])}if(zr((function(){n.state===Wr&&(n.state=$r,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=Hr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Hr){for(n.state=Wr,r=new Array(f=n.tween.length),s=0,c=-1;s<f;++s)(h=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=Yr,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===Yr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=Br,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Ar((function(t){n.state=Dr,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Ir,tween:jr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ur})};function Vr(t,e){var n=Qr(t,e);if(n.state>Ur)throw new Error("too late; already scheduled");return n}function Xr(t,e){var n=Qr(t,e);if(n.state>Wr)throw new Error("too late; already running");return n}function Qr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var Kr=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>Hr&&n.state<Yr,n.state=Br,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}};function Gr(t,e){var n,r;return function(){var i=Xr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o<l;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Zr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Xr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===e){i[u]=l;break}u===s&&i.push(l)}a.tween=i}}function Jr(t,e,n){var r=t._id;return t.each((function(){var t=Xr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Qr(t,r).value[e]}}var ti=function(t,e){var n;return("number"==typeof e?En:e instanceof Je?bn:(n=Je(e))?(e=n,bn):An)(t,e)};function ei(t){return function(){this.removeAttribute(t)}}function ni(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ri(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function ii(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function ai(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttribute(t)}}function oi(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function li(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return i._value=e,i}function ui(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return i._value=e,i}function si(t,e){return function(){Vr(this,t).delay=+e.apply(this,arguments)}}function ci(t,e){return e=+e,function(){Vr(this,t).delay=e}}function fi(t,e){return function(){Xr(this,t).duration=+e.apply(this,arguments)}}function hi(t,e){return e=+e,function(){Xr(this,t).duration=e}}function pi(t,e){if("function"!=typeof e)throw new Error;return function(){Xr(this,t).ease=e}}function di(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Vr:Xr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var mi=Ae.prototype.constructor;function yi(t){return function(){this.style.removeProperty(t)}}function vi(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,a,n)),r}return a._value=e,a}var gi=0;function _i(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function bi(){return++gi}var wi=Ae.prototype;_i.prototype=function(t){return Ae().transition(t)}.prototype={constructor:_i,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Nt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l,u,s=r[o],c=s.length,f=a[o]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=t.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,qr(f[h],e,n,h,f,Qr(l,n)));return new _i(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ot(t));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u,s=r[l],c=s.length,f=0;f<c;++f)if(u=s[f]){for(var h,p=t.call(u,u.__data__,f,s),d=Qr(u,n),m=0,y=p.length;m<y;++m)(h=p[m])&&qr(h,e,n,m,p,d);a.push(p),o.push(u)}return new _i(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=At(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new _i(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new _i(o,this._parents,this._name,this._id)},selection:function(){return new mi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=bi(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)if(o=l[s]){var c=Qr(o,e);qr(o,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _i(r,this._parents,t,n)},call:wi.call,nodes:wi.nodes,node:wi.node,size:wi.size,empty:wi.empty,each:wi.each,on:function(t,e){var n=this._id;return arguments.length<2?Qr(this.node(),n).on.on(t):this.each(di(n,t,e))},attr:function(t,e){var n=Et(t),r="transform"===n?Dn:ti;return this.attrTween(t,"function"==typeof e?(n.local?oi:ai)(n,r,Jr(this,"attr."+t,e)):null==e?(n.local?ni:ei)(n):(n.local?ii:ri)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Et(t);return this.tween(n,(r.local?li:ui)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Un:ti;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Qt(this,t),o=(this.style.removeProperty(t),Qt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,yi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Qt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=Qt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,Jr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=Xr(this,t),s=u.on,c=null==u.value[o]?a||(a=yi(e)):void 0;s===n&&i===c||(r=(n=s).copy()).on(l,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Qt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,vi(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Jr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Qr(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Gr:Zr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?si:ci)(e,t)):Qr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?fi:hi)(e,t)):Qr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(pi(e,t)):Qr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var l={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Xr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Math.PI;(function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n})(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var xi=2*Math.PI,ki=(function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=xi);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*xi)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=xi);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*xi)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=xi);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*xi)},i.period=function(n){return t(e,n)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function Ei(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ki.time=Nr(),ki;return n}Ae.prototype.interrupt=function(t){return this.each((function(){Kr(this,t)}))},Ae.prototype.transition=function(t){var e,n;t instanceof _i?(e=t._id,t=t._name):(e=bi(),(n=ki).time=Nr(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)(o=l[s])&&qr(o,t,e,s,l,n||Ei(o,e));return new _i(r,this._parents,t,e)};function Ti(t){return[+t[0],+t[1]]}function Si(t){return[Ti(t[0]),Ti(t[1])]}["w","e"].map(Ci),["n","s"].map(Ci),["n","w","e","s","nw","ne","sw","se"].map(Ci);function Ci(t){return{type:t}}var Mi=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Ni=function(t){return 1===t.length&&(t=function(t){return function(e,n){return Mi(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}(Mi);Ni.right,Ni.left;var Pi=Array.prototype;Pi.slice,Pi.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Oi=Math.PI,Ai=2*Oi,Li=Ai-1e-6;function Ri(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Fi(){return new Ri}Ri.prototype=Fi.prototype={constructor:Ri,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,l=n-t,u=r-e,s=a-t,c=o-e,f=s*s+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(c*l-u*s)>1e-6&&i){var h=n-a,p=r-o,d=l*l+u*u,m=h*h+p*p,y=Math.sqrt(d),v=Math.sqrt(f),g=i*Math.tan((Oi-Math.acos((d+f-m)/(2*y*v)))/2),_=g/v,b=g/y;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*s)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>s*p)+","+(this._x1=t+b*l)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),l=n*Math.sin(r),u=t+o,s=e+l,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+s:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+u+","+s),n&&(f<0&&(f=f%Ai+Ai),f>Li?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Oi)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var zi=Fi;function Ii(){}function ji(t,e){var n=new Ii;if(t instanceof Ii)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Ii.prototype=ji.prototype={constructor:Ii,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Ui=ji;function Di(){}var Hi=Ui.prototype;function Wi(t,e){var n=new Di;if(t instanceof Di)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}Di.prototype=Wi.prototype={constructor:Di,has:Hi.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Hi.remove,clear:Hi.clear,values:Hi.keys,size:Hi.size,empty:Hi.empty,each:Hi.each};var $i=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Yi=function(t){return 1===t.length&&(t=function(t){return function(e,n){return $i(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}($i);Yi.right,Yi.left;var Bi=Array.prototype;Bi.slice,Bi.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Array.prototype.slice;var qi={},Vi={},Xi=34,Qi=10,Ki=13;function Gi(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function Zi(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Ji(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ta(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Ji(-e,6):e>9999?"+"+Ji(e,6):Ji(e,4))+"-"+Ji(t.getUTCMonth()+1,2)+"-"+Ji(t.getUTCDate(),2)+(a?"T"+Ji(n,2)+":"+Ji(r,2)+":"+Ji(i,2)+"."+Ji(a,3)+"Z":i?"T"+Ji(n,2)+":"+Ji(r,2)+":"+Ji(i,2)+"Z":r||n?"T"+Ji(n,2)+":"+Ji(r,2)+"Z":"")}var ea=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,u=a<=0,s=!1;function c(){if(u)return Vi;if(s)return s=!1,qi;var e,r,i=o;if(t.charCodeAt(i)===Xi){for(;o++<a&&t.charCodeAt(o)!==Xi||t.charCodeAt(++o)===Xi;);return(e=o)>=a?u=!0:(r=t.charCodeAt(o++))===Qi?s=!0:r===Ki&&(s=!0,t.charCodeAt(o)===Qi&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===Qi)s=!0;else if(r===Ki)s=!0,t.charCodeAt(o)===Qi&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===Qi&&--a,t.charCodeAt(a-1)===Ki&&--a;(r=c())!==Vi;){for(var f=[];r!==qi&&r!==Vi;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ta(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Gi(t);return function(r,i){return e(n(r),i,t)}}(t,e):Gi(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Zi(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Zi(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")}}},na=ea(","),ra=na.parse,ia=(na.parseRows,na.format,na.formatBody,na.formatRows,ea("\t")),aa=ia.parse;ia.parseRows,ia.format,ia.formatBody,ia.formatRows;function oa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var la=function(t,e){return fetch(t,e).then(oa)};function ua(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),la(e,n).then((function(e){return t(e,r)}))}}ua(ra),ua(aa);function sa(t){return function(e,n){return la(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}sa("application/xml"),sa("text/html"),sa("image/svg+xml");function ca(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,l,u,s,c,f,h,p=t._root,d={data:r},m=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o,i=p,!(p=p[f=c<<1|s]))return i[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o}while((f=c<<1|s)==(h=(u>=o)<<1|l>=a));return i[h]=p,i[f]=d,t}var fa=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ha(t){return t[0]}function pa(t){return t[1]}function da(t,e,n){var r=new ma(null==e?ha:e,null==n?pa:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ma(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function ya(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var va=da.prototype=ma.prototype;va.copy=function(){var t,e,n=new ma(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=ya(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=ya(e));return n},va.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return ca(this.cover(e,n),e,n,t)},va.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),l=new Array(a),u=1/0,s=1/0,c=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,l[n]=i,r<u&&(u=r),r>c&&(c=r),i<s&&(s=i),i>f&&(f=i));if(u>c||s>f)return this;for(this.cover(u,s).cover(c,f),n=0;n<a;++n)ca(this,o[n],l[n],t[n]);return this},va.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,l,u=i-n,s=this._root;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,(o=new Array(4))[l]=s,s=o,u*=2,l){case 0:i=n+u,a=r+u;break;case 1:n=i-u,a=r+u;break;case 2:i=n+u,r=a-u;break;case 3:n=i-u,r=a-u}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},va.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},va.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]]},va.find=function(t,e,n){var r,i,a,o,l,u,s,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],m=this._root;for(m&&d.push(new fa(m,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(m=u.node)||(i=u.x0)>h||(a=u.y0)>p||(o=u.x1)<c||(l=u.y1)<f))if(m.length){var y=(i+o)/2,v=(a+l)/2;d.push(new fa(m[3],y,v,o,l),new fa(m[2],i,v,y,l),new fa(m[1],y,a,o,v),new fa(m[0],i,a,y,v)),(s=(e>=v)<<1|t>=y)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=u)}else{var g=t-+this._x.call(null,m.data),_=e-+this._y.call(null,m.data),b=g*g+_*_;if(b<n){var w=Math.sqrt(n=b);c=t-w,f=e-w,h=t+w,p=e+w,r=m.data}}return r},va.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,l,u,s,c,f,h,p=this._root,d=this._x0,m=this._y0,y=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((s=a>=(l=(d+y)/2))?d=l:y=l,(c=o>=(u=(m+v)/2))?m=u:v=u,e=p,!(p=p[f=c<<1|s]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},va.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},va.root=function(){return this._root},va.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},va.visit=function(t){var e,n,r,i,a,o,l=[],u=this._root;for(u&&l.push(new fa(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&u.length){var s=(r+a)/2,c=(i+o)/2;(n=u[3])&&l.push(new fa(n,s,c,a,o)),(n=u[2])&&l.push(new fa(n,r,c,s,o)),(n=u[1])&&l.push(new fa(n,s,i,a,c)),(n=u[0])&&l.push(new fa(n,r,i,s,c))}return this},va.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new fa(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,l=e.y0,u=e.x1,s=e.y1,c=(o+u)/2,f=(l+s)/2;(a=i[0])&&n.push(new fa(a,o,l,c,f)),(a=i[1])&&n.push(new fa(a,c,l,u,f)),(a=i[2])&&n.push(new fa(a,o,f,c,s)),(a=i[3])&&n.push(new fa(a,c,f,u,s))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},va.x=function(t){return arguments.length?(this._x=t,this):this._x},va.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var ga=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},_a=function(t){return(t=ga(Math.abs(t)))?t[1]:NaN},ba=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wa(t){if(!(e=ba.exec(t)))throw new Error("invalid format: "+t);var e;return new xa({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function xa(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}wa.prototype=xa.prototype,xa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ka,Ea,Ta,Sa,Ca=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Ma=function(t,e){var n=ga(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Na={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Ma(100*t,e)},r:Ma,s:function(t,e){var n=ga(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(ka=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ga(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Pa=function(t){return t},Oa=Array.prototype.map,Aa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Ea=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Pa:(e=Oa.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?Pa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Oa.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=wa(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,v=t.trim,g=t.type;"n"===g?(m=!0,g="g"):Na[g]||(void 0===y&&(y=12),v=!0,g="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",b="$"===h?a:/[%p]/.test(g)?u:"",w=Na[g],x=/[defgprs%]/.test(g);function k(t){var i,a,u,h=_,k=b;if("c"===g)k=w(t)+k,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:w(Math.abs(t),y),v&&(t=Ca(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:s:"-"===f||"("===f?"":f)+h,k=("s"===g?Aa[8+ka/3]:"")+k+(E&&"("===f?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var T=h.length+t.length+k.length,S=T<d?new Array(d-T+1).join(e):"";switch(m&&p&&(t=r(S+t,S.length?d-k.length:1/0),S=""),n){case"<":t=h+t+k+S;break;case"=":t=h+S+t+k;break;case"^":t=S.slice(0,T=S.length>>1)+h+t+k+S.slice(T);break;default:t=S+h+t+k}return l(t)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=wa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(_a(e)/3))),i=Math.pow(10,-r),a=Aa[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ta=Ea.format,Sa=Ea.formatPrefix;var La=function(){return new Ra};function Ra(){this.reset()}Ra.prototype={constructor:Ra,reset:function(){this.s=this.t=0},add:function(t){za(Fa,t,this.t),za(this,Fa.s,this.s),this.s?this.t+=Fa.t:this.s=Fa.t},valueOf:function(){return this.s}};var Fa=new Ra;function za(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Ia=1e-6,ja=1e-12,Ua=Math.PI,Da=Ua/2,Ha=Ua/4,Wa=2*Ua,$a=Ua/180,Ya=Math.abs,Ba=Math.atan,qa=Math.atan2,Va=Math.cos,Xa=(Math.ceil,Math.exp),Qa=(Math.floor,Math.log),Ka=(Math.pow,Math.sin),Ga=Math.sign||function(t){return t>0?1:t<0?-1:0},Za=Math.sqrt,Ja=Math.tan;function to(t){return t>1?0:t<-1?Ua:Math.acos(t)}function eo(t){return t>1?Da:t<-1?-Da:Math.asin(t)}function no(){}La(),La();function ro(t){var e=t[0],n=t[1],r=Va(n);return[r*Va(e),r*Ka(e),Ka(n)]}function io(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ao(t){var e=Za(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}La();function oo(t,e){return[Ya(t)>Ua?t+Math.round(-t/Wa)*Wa:t,e]}oo.invert=oo;var lo=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:no,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},uo=function(t,e){return Ya(t[0]-e[0])<Ia&&Ya(t[1]-e[1])<Ia};function so(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var co=function(t,e,n,r,i){var a,o,l=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(uo(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else l.push(n=new so(r,t,null,!0)),u.push(n.o=new so(r,null,n,!1)),l.push(n=new so(o,t,null,!1)),u.push(n.o=new so(o,null,n,!0))}})),l.length){for(u.sort(e),fo(l),fo(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var s,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=s.length;a<o;++a)i.point((c=s[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,a=s.length-1;a>=0;--a)i.point((c=s[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function fo(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ho=La();function po(t){return Ya(t[0])<=Ua?t[0]:Ga(t[0])*((Ya(t[0])+Ua)%Wa-Ua)}var mo=function(t,e){var n=po(e),r=e[1],i=Ka(r),a=[Ka(n),-Va(n),0],o=0,l=0;ho.reset(),1===i?r=Da+Ia:-1===i&&(r=-Da-Ia);for(var u=0,s=t.length;u<s;++u)if(f=(c=t[u]).length)for(var c,f,h=c[f-1],p=po(h),d=h[1]/2+Ha,m=Ka(d),y=Va(d),v=0;v<f;++v,p=_,m=w,y=x,h=g){var g=c[v],_=po(g),b=g[1]/2+Ha,w=Ka(b),x=Va(b),k=_-p,E=k>=0?1:-1,T=E*k,S=T>Ua,C=m*w;if(ho.add(qa(C*E*Ka(T),y*x+C*Va(T))),o+=S?k+E*Wa:k,S^p>=n^_>=n){var M=io(ro(h),ro(g));ao(M);var N=io(a,M);ao(N);var P=(S^k>=0?-1:1)*eo(N[2]);(r>P||r===P&&(M[0]||M[1]))&&(l+=S^k>=0?1:-1)}}return(o<-Ia||o<Ia&&ho<-Ia)^1&l},yo=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var vo=function(t){return 1===t.length&&(t=function(t){return function(e,n){return yo(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}(yo);vo.right,vo.left;var go=Array.prototype;go.slice,go.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var _o=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n};var bo=function(t,e,n,r){return function(i){var a,o,l,u=e(i),s=lo(),c=e(s),f=!1,h={point:p,lineStart:m,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=g,h.lineEnd=_,o=[],a=[]},polygonEnd:function(){h.point=p,h.lineStart=m,h.lineEnd=y,o=_o(o);var t=mo(a,r);o.length?(f||(i.polygonStart(),f=!0),co(o,xo,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function m(){h.point=d,u.lineStart()}function y(){h.point=p,u.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function g(){c.lineStart(),l=[]}function _(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,u=c.clean(),h=s.result(),p=h.length;if(l.pop(),a.push(l),l=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(wo))}return h}};function wo(t){return t.length>1}function xo(t,e){return((t=t.x)[0]<0?t[1]-Da-Ia:Da-t[1])-((e=e.x)[0]<0?e[1]-Da-Ia:Da-e[1])}bo((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l=a>0?Ua:-Ua,u=Ya(a-n);Ya(u-Ua)<Ia?(t.point(n,r=(r+o)/2>0?Da:-Da),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&u>=Ua&&(Ya(n-i)<Ia&&(n-=i*Ia),Ya(a-l)<Ia&&(a-=l*Ia),r=function(t,e,n,r){var i,a,o=Ka(t-n);return Ya(o)>Ia?Ba((Ka(e)*(a=Va(r))*Ka(n)-Ka(r)*(i=Va(e))*Ka(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=a,r=o),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Da,r.point(-Ua,i),r.point(0,i),r.point(Ua,i),r.point(Ua,0),r.point(Ua,-i),r.point(0,-i),r.point(-Ua,-i),r.point(-Ua,0),r.point(-Ua,i);else if(Ya(t[0]-e[0])>Ia){var a=t[0]<e[0]?Ua:-Ua;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Ua,-Da]);La();La(),La();function ko(t){this._context=t}ko.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Wa)}},result:no};La();function Eo(){this._string=[]}function To(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Eo.prototype={_radius:4.5,_circle:To(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=To(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function So(t){return function(e){var n=new Co;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Co(){}Co.prototype={constructor:Co,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};Va(30*$a);So({point:function(t,e){this.stream.point(t*$a,e*$a)}});function Mo(t){return function(e,n){var r=Va(e),i=Va(n),a=t(r*i);return[a*i*Ka(e),a*Ka(n)]}}function No(t){return function(e,n){var r=Za(e*e+n*n),i=t(r),a=Ka(i),o=Va(i);return[qa(e*a,r*o),eo(r&&n*a/r)]}}var Po=Mo((function(t){return Za(2/(1+t))}));Po.invert=No((function(t){return 2*eo(t/2)}));var Oo=Mo((function(t){return(t=to(t))&&t/Ka(t)}));Oo.invert=No((function(t){return t}));function Ao(t,e){return[t,Qa(Ja((Da+e)/2))]}Ao.invert=function(t,e){return[t,2*Ba(Xa(e))-Da]};function Lo(t,e){return[t,e]}Lo.invert=Lo;var Ro=1.340264,Fo=-.081106,zo=893e-6,Io=.003796,jo=Za(3)/2;function Uo(t,e){var n=eo(jo*Ka(e)),r=n*n,i=r*r*r;return[t*Va(n)/(jo*(Ro+3*Fo*r+i*(7*zo+9*Io*r))),n*(Ro+Fo*r+i*(zo+Io*r))]}Uo.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Ro+Fo*i+a*(zo+Io*i))-e)/(Ro+3*Fo*i+a*(7*zo+9*Io*i)))*r)*i*i,!(Ya(n)<ja));++o);return[jo*t*(Ro+3*Fo*i+a*(7*zo+9*Io*i))/Va(r),eo(Ka(r)/jo)]};function Do(t,e){var n=Va(e),r=Va(t)*n;return[n*Ka(t)/r,Ka(e)/r]}Do.invert=No(Ba);function Ho(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Ho.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Ya(n)>Ia&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function Wo(t,e){return[Va(e)*Ka(t),Ka(e)]}Wo.invert=No(eo);function $o(t,e){var n=Va(e),r=1+Va(t)*n;return[n*Ka(t)/r,Ka(e)/r]}$o.invert=No((function(t){return 2*Ba(t)}));function Yo(t,e){return[Qa(Ja((Da+e)/2)),-t]}Yo.invert=function(t,e){return[-e,2*Ba(Xa(t))-Da]};function Bo(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function qo(t,e){var n,r,i,a,o,l=new Ko(t),u=+t.value&&(l.value=t.value),s=[l];for(null==e&&(e=Vo);n=s.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)s.push(r=n.children[a]=new Ko(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(Qo)}function Vo(t){return t.children}function Xo(t){t.data=t.data.data}function Qo(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ko(t){this.data=t,this.depth=this.height=0,this.parent=null}Ko.prototype=qo.prototype={constructor:Ko,count:function(){return this.eachAfter(Bo)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return qo(this).eachBefore(Xo)}};Array.prototype.slice;function Go(t){if("function"!=typeof t)throw new Error;return t}function Zo(){return 0}var Jo=function(t){return function(){return t}};var tl=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},el=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(r-e)/t.value;++l<u;)(a=o[l]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*s};function nl(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}nl.prototype=Object.create(Ko.prototype);var rl=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(i-n)/t.value;++l<u;)(a=o[l]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*s},il=(1+Math.sqrt(5))/2;function al(t,e,n,r,i,a){for(var o,l,u,s,c,f,h,p,d,m,y,v=[],g=e.children,_=0,b=0,w=g.length,x=e.value;_<w;){u=i-n,s=a-r;do{c=g[b++].value}while(!c&&b<w);for(f=h=c,y=c*c*(m=Math.max(s/u,u/s)/(x*t)),d=Math.max(h/y,y/f);b<w;++b){if(c+=l=g[b].value,l<f&&(f=l),l>h&&(h=l),y=c*c*m,(p=Math.max(h/y,y/f))>d){c-=l;break}d=p}v.push(o={value:c,dice:u<s,children:g.slice(_,b)}),o.dice?el(o,n,r,i,x?r+=s*c/x:a):rl(o,n,r,x?n+=u*c/x:i,a),x-=c,_=b}return v}var ol=function t(e){function n(t,n,r,i,a){al(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(il);(function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,l,u,s,c,f=-1,h=o.length,p=t.value;++f<h;){for(u=(l=o[f]).children,s=l.value=0,c=u.length;s<c;++s)l.value+=u[s].value;l.dice?el(l,n,r,i,r+=(a-r)*l.value/p):rl(l,n,r,n+=(i-n)*l.value/p,a),p-=l.value}else t._squarify=o=al(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n})(il);var ll=function(){return Math.random()},ul=(function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(ll),function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(ll)),sl=(function t(e){function n(){var t=ul.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(ll),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(ll)),cl=(function t(e){function n(t){var n=sl.source(e)(t);return function(){return n()/t}}return n.source=t,n}(ll),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(ll),function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}),fl=function(t){return 1===t.length&&(t=function(t){return function(e,n){return cl(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var hl=fl(cl),pl=hl.right,dl=(hl.left,pl);var ml=Array.prototype,yl=(ml.slice,ml.map,Math.sqrt(50)),vl=Math.sqrt(10),gl=Math.sqrt(2),_l=function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=bl(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return r&&a.reverse(),a};function bl(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=yl?10:a>=vl?5:a>=gl?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=yl?10:a>=vl?5:a>=gl?2:1)}function wl(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=yl?i*=10:a>=vl?i*=5:a>=gl&&(i*=2),e<t?-i:i}function xl(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var kl=Array.prototype,El=kl.map,Tl=kl.slice,Sl={name:"implicit"};function Cl(){var t=Ui(),e=[],n=[],r=Sl;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Sl)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ui();for(var r,a,o=-1,l=n.length;++o<l;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Tl.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Cl(e,n).unknown(r)},xl.apply(i,arguments),i}var Ml=function(t){return function(){return t}},Nl=function(t){return+t},Pl=[0,1];function Ol(t){return t}function Al(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Ml(isNaN(e)?NaN:.5)}function Ll(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Rl(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Al(i,r),a=n(o,a)):(r=Al(r,i),a=n(a,o)),function(t){return a(r(t))}}function Fl(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Al(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=dl(t,e,1,r)-1;return a[n](i[n](e))}}function zl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Il(){var t,e,n,r,i,a,o=Pl,l=Pl,u=Ln,s=Ol;function c(){return r=Math.min(o.length,l.length)>2?Fl:Rl,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),l,u)))(t(s(e)))}return f.invert=function(n){return s(e((a||(a=r(l,o.map(t),En)))(n)))},f.domain=function(t){return arguments.length?(o=El.call(t,Nl),s===Ol||(s=Ll(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=Tl.call(t),c()):l.slice()},f.rangeRound=function(t){return l=Tl.call(t),u=Rn,c()},f.clamp=function(t){return arguments.length?(s=t?Ll(o):Ol,f):s!==Ol},f.interpolate=function(t){return arguments.length?(u=t,c()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function jl(t,e){return Il()(t,e)}var Ul=function(t,e,n,r){var i,a=wl(t,e,n);switch((r=wa(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_a(e)/3)))-_a(Math.abs(t)))}(a,o))||(r.precision=i),Sa(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,_a(e)-_a(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-_a(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Ta(r)};function Dl(t){var e=t.domain;return t.ticks=function(t){var n=e();return _l(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ul(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,l=i[a],u=i[o];return u<l&&(r=l,l=u,u=r,r=a,a=o,o=r),(r=bl(l,u,n))>0?r=bl(l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=bl(l=Math.ceil(l*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function Hl(){var t=jl(Ol,Ol);return t.copy=function(){return zl(t,Hl())},xl.apply(t,arguments),Dl(t)}var Wl=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function $l(t){return Math.log(t)}function Yl(t){return Math.exp(t)}function Bl(t){return-Math.log(-t)}function ql(t){return-Math.exp(-t)}function Vl(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Xl(t){return function(e){return-t(-e)}}function Ql(t){var e,n,r=t($l,Yl),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Vl:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Xl(e),n=Xl(n),t(Bl,ql)):t($l,Yl),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),l=o[0],u=o[o.length-1];(r=u<l)&&(h=l,l=u,u=h);var s,c,f,h=e(l),p=e(u),d=null==t?10:+t,m=[];if(!(a%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,l>0){for(;h<p;++h)for(c=1,s=n(h);c<a;++c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else for(;h<p;++h)for(c=a-1,s=n(h);c>=1;--c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else m=_l(h,p,Math.min(p-h,d)).map(n);return r?m.reverse():m},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Ta(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Wl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Kl(){var t=Ql(Il()).domain([1,10]);return t.copy=function(){return zl(t,Kl()).base(t.base())},xl.apply(t,arguments),t}var Gl=new Date,Zl=new Date;function Jl(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return l;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return l},i.filter=function(n){return Jl((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Gl.setTime(+e),Zl.setTime(+r),t(Gl),t(Zl),Math.floor(n(Gl,Zl))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var tu=Jl((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));tu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Jl((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var eu=tu,nu=(tu.range,Jl((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),ru=(nu.range,6e4),iu=6048e5;function au(t){return Jl((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ru)/iu}))}var ou=au(0),lu=au(1),uu=au(2),su=au(3),cu=au(4),fu=au(5),hu=au(6),pu=(ou.range,lu.range,uu.range,su.range,cu.range,fu.range,hu.range,Jl((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ru)/864e5}),(function(t){return t.getDate()-1}))),du=pu,mu=(pu.range,Jl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*ru)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),yu=(mu.range,Jl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*ru)}),(function(t,e){return(e-t)/ru}),(function(t){return t.getMinutes()}))),vu=(yu.range,Jl((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),gu=(vu.range,Jl((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));gu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Jl((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):gu:null};gu.range;function _u(t){return Jl((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/iu}))}var bu=_u(0),wu=_u(1),xu=_u(2),ku=_u(3),Eu=_u(4),Tu=_u(5),Su=_u(6),Cu=(bu.range,wu.range,xu.range,ku.range,Eu.range,Tu.range,Su.range,Jl((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),Mu=Cu,Nu=(Cu.range,Jl((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Nu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Jl((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Pu=Nu;Nu.range;function Ou(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Au(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Lu(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var Ru,Fu,zu,Iu={"-":"",_:" ",0:"0"},ju=/^\s*\d+/,Uu=/^%/,Du=/[\\^$*+?|[\]().{}]/g;function Hu(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Wu(t){return t.replace(Du,"\\$&")}function $u(t){return new RegExp("^(?:"+t.map(Wu).join("|")+")","i")}function Yu(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Bu(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function qu(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Vu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Xu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Qu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ku(t,e,n){var r=ju.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Gu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Zu(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ju(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ts(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function es(t,e,n){var r=ju.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ns(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rs(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function is(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function as(t,e,n){var r=ju.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function os(t,e,n){var r=ju.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ls(t,e,n){var r=Uu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function us(t,e,n){var r=ju.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ss(t,e,n){var r=ju.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function cs(t,e){return Hu(t.getDate(),e,2)}function fs(t,e){return Hu(t.getHours(),e,2)}function hs(t,e){return Hu(t.getHours()%12||12,e,2)}function ps(t,e){return Hu(1+du.count(eu(t),t),e,3)}function ds(t,e){return Hu(t.getMilliseconds(),e,3)}function ms(t,e){return ds(t,e)+"000"}function ys(t,e){return Hu(t.getMonth()+1,e,2)}function vs(t,e){return Hu(t.getMinutes(),e,2)}function gs(t,e){return Hu(t.getSeconds(),e,2)}function _s(t){var e=t.getDay();return 0===e?7:e}function bs(t,e){return Hu(ou.count(eu(t),t),e,2)}function ws(t,e){var n=t.getDay();return t=n>=4||0===n?cu(t):cu.ceil(t),Hu(cu.count(eu(t),t)+(4===eu(t).getDay()),e,2)}function xs(t){return t.getDay()}function ks(t,e){return Hu(lu.count(eu(t),t),e,2)}function Es(t,e){return Hu(t.getFullYear()%100,e,2)}function Ts(t,e){return Hu(t.getFullYear()%1e4,e,4)}function Ss(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hu(e/60|0,"0",2)+Hu(e%60,"0",2)}function Cs(t,e){return Hu(t.getUTCDate(),e,2)}function Ms(t,e){return Hu(t.getUTCHours(),e,2)}function Ns(t,e){return Hu(t.getUTCHours()%12||12,e,2)}function Ps(t,e){return Hu(1+Mu.count(Pu(t),t),e,3)}function Os(t,e){return Hu(t.getUTCMilliseconds(),e,3)}function As(t,e){return Os(t,e)+"000"}function Ls(t,e){return Hu(t.getUTCMonth()+1,e,2)}function Rs(t,e){return Hu(t.getUTCMinutes(),e,2)}function Fs(t,e){return Hu(t.getUTCSeconds(),e,2)}function zs(t){var e=t.getUTCDay();return 0===e?7:e}function Is(t,e){return Hu(bu.count(Pu(t),t),e,2)}function js(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Eu(t):Eu.ceil(t),Hu(Eu.count(Pu(t),t)+(4===Pu(t).getUTCDay()),e,2)}function Us(t){return t.getUTCDay()}function Ds(t,e){return Hu(wu.count(Pu(t),t),e,2)}function Hs(t,e){return Hu(t.getUTCFullYear()%100,e,2)}function Ws(t,e){return Hu(t.getUTCFullYear()%1e4,e,4)}function $s(){return"+0000"}function Ys(){return"%"}function Bs(t){return+t}function qs(t){return Math.floor(+t/1e3)}!function(t){Ru=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,l=t.months,u=t.shortMonths,s=$u(i),c=Yu(i),f=$u(a),h=Yu(a),p=$u(o),d=Yu(o),m=$u(l),y=Yu(l),v=$u(u),g=Yu(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:cs,e:cs,f:ms,H:fs,I:hs,j:ps,L:ds,m:ys,M:vs,p:function(t){return i[+(t.getHours()>=12)]},Q:Bs,s:qs,S:gs,u:_s,U:bs,V:ws,w:xs,W:ks,x:null,X:null,y:Es,Y:Ts,Z:Ss,"%":Ys},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:Cs,e:Cs,f:As,H:Ms,I:Ns,j:Ps,L:Os,m:Ls,M:Rs,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bs,s:qs,S:Fs,u:zs,U:Is,V:js,w:Us,W:Ds,x:null,X:null,y:Hs,Y:Ws,Z:$s,"%":Ys},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:ts,e:ts,f:os,H:ns,I:ns,j:es,L:as,m:Ju,M:rs,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:us,s:ss,S:is,u:qu,U:Vu,V:Xu,w:Bu,W:Qu,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Gu,Y:Ku,Z:Zu,"%":ls};function x(t,e){return function(n){var r,i,a,o=[],l=-1,u=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++l<s;)37===t.charCodeAt(l)&&(o.push(t.slice(u,l)),null!=(i=Iu[r=t.charAt(++l)])?r=t.charAt(++l):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=l+1);return o.push(t.slice(u,l)),o.join("")}}function k(t,e){return function(n){var r,i,a=Lu(1900);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("p"in a&&(a.H=a.H%12+12*a.p),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Au(Lu(a.y))).getUTCDay(),r=i>4||0===i?wu.ceil(r):wu(r),r=Mu.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=e(Lu(a.y))).getDay(),r=i>4||0===i?lu.ceil(r):lu(r),r=du.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Au(Lu(a.y)).getUTCDay():e(Lu(a.y)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Au(a)):e(a)}}function E(t,e,n,r){for(var i,a,o=0,l=e.length,u=n.length;o<l;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Iu?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",Ou);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t,Au);return e.toString=function(){return t},e}}}(t),Ru.format,Ru.parse,Fu=Ru.utcFormat,zu=Ru.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Fu("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||zu("%Y-%m-%dT%H:%M:%S.%LZ");var Vs=Jl((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Xs=(Vs.range,Jl((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Qs=(Xs.range,Jl((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*ru)}),(function(t,e){return(e-t)/ru}),(function(t){return t.getUTCMinutes()})));Qs.range;var Ks=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Gs=function(t){return function(){return t}},Zs=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),Js=Math.PI,tc=2*Js;function ec(t){this._context=t}ec.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var nc=function(t){return new ec(t)};function rc(t){return t[0]}function ic(t){return t[1]}var ac=function(){var t=rc,e=ic,n=Gs(!0),r=null,i=nc,a=null;function o(o){var l,u,s,c=o.length,f=!1;for(null==r&&(a=i(s=zi())),l=0;l<=c;++l)!(l<c&&n(u=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(u,l,o),+e(u,l,o));if(s)return a=null,s+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Gs(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Gs(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Gs(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o};lc(nc);function oc(t){this._curve=t}function lc(t){function e(e){return new oc(t(e))}return e._curve=t,e}oc.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};Array.prototype.slice;Math.sqrt(1/3);var uc=Math.sin(Js/10)/Math.sin(7*Js/10),sc=(Math.sin(tc/10),Math.cos(tc/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function cc(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function fc(t){this._context=t}fc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:cc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:cc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hc(t){this._context=t}hc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:cc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function pc(t){this._context=t}pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:cc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function dc(t,e){this._basis=new fc(t),this._beta=e}dc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,l=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*l));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new fc(t):new dc(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function mc(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function yc(t,e){this._context=t,this._k=(1-e)/6}yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mc(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:mc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new yc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function vc(t,e){this._context=t,this._k=(1-e)/6}vc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new vc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function gc(t,e){this._context=t,this._k=(1-e)/6}gc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:mc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new gc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function _c(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Zs){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Zs){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*s+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*s+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function bc(t,e){this._context=t,this._alpha=e}bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_c(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new bc(t,e):new yc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function wc(t,e){this._context=t,this._alpha=e}wc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_c(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new wc(t,e):new vc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function xc(t,e){this._context=t,this._alpha=e}xc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_c(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new xc(t,e):new gc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function kc(t){this._context=t}kc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Ec(t){return t<0?-1:1}function Tc(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(Ec(a)+Ec(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Sc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Cc(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function Mc(t){this._context=t}function Nc(t){this._context=new Pc(t)}function Pc(t){this._context=t}function Oc(t){this._context=t}function Ac(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}Mc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Cc(this,this._t0,Sc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Cc(this,Sc(this,n=Tc(this,t,e)),n);break;default:Cc(this,this._t0,n=Tc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Nc.prototype=Object.create(Mc.prototype)).point=function(t,e){Mc.prototype.point.call(this,e,t)},Pc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Oc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Ac(t),i=Ac(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Lc(t,e){this._context=t,this._t=e}Lc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function Rc(){this._=null}function Fc(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function zc(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ic(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function jc(t){for(;t.L;)t=t.L;return t}Rc.prototype={constructor:Rc,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=jc(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(zc(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ic(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ic(this,n),n=(t=n).U),n.C=!1,r.C=!0,zc(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?jc(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,zc(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ic(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,zc(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ic(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,zc(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ic(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Uc=Rc;function Dc(t,e,n,r){var i=[null,null],a=ff.push(i)-1;return i.left=t,i.right=e,n&&Wc(i,t,e,n),r&&Wc(i,e,t,r),sf[t.index].halfedges.push(a),sf[e.index].halfedges.push(a),i}function Hc(t,e,n){var r=[e,n];return r.left=t,r}function Wc(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function $c(t,e,n,r,i){var a,o=t[0],l=t[1],u=o[0],s=o[1],c=0,f=1,h=l[0]-u,p=l[1]-s;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}if(a=n-s,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=i-s,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return!(c>0||f<1)||(c>0&&(t[0]=[u+c*h,s+c*p]),f<1&&(t[1]=[u+f*h,s+f*p]),!0)}}}}}function Yc(t,e,n,r,i){var a=t[1];if(a)return!0;var o,l,u=t[0],s=t.left,c=t.right,f=s[0],h=s[1],p=c[0],d=c[1],m=(f+p)/2,y=(h+d)/2;if(d===h){if(m<e||m>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[m,n];a=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];a=[m,n]}}else if(l=y-(o=(f-p)/(d-h))*m,o<-1||o>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-l)/o,n];a=[(i-l)/o,i]}else{if(u){if(u[1]<n)return}else u=[(i-l)/o,i];a=[(n-l)/o,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,o*e+l];a=[r,o*r+l]}else{if(u){if(u[0]<e)return}else u=[r,o*r+l];a=[e,o*e+l]}return t[0]=u,t[1]=a,!0}function Bc(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function qc(t,e){return e[+(e.left!==t.site)]}function Vc(t,e){return e[+(e.left===t.site)]}var Xc,Qc=[];function Kc(){Fc(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gc(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],l=i[1],u=r[0]-o,s=r[1]-l,c=a[0]-o,f=a[1]-l,h=2*(u*f-s*c);if(!(h>=-pf)){var p=u*u+s*s,d=c*c+f*f,m=(f*p-s*d)/h,y=(u*d-c*p)/h,v=Qc.pop()||new Kc;v.arc=t,v.site=i,v.x=m+o,v.y=(v.cy=y+l)+Math.sqrt(m*m+y*y),t.circle=v;for(var g=null,_=cf._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}cf.insert(g,v),g||(Xc=v)}}}}function Zc(t){var e=t.circle;e&&(e.P||(Xc=e.N),cf.remove(e),Qc.push(e),Fc(e),t.circle=null)}var Jc=[];function tf(){Fc(this),this.edge=this.site=this.circle=null}function ef(t){var e=Jc.pop()||new tf;return e.site=t,e}function nf(t){Zc(t),uf.remove(t),Jc.push(t),Fc(t)}function rf(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];nf(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<hf&&Math.abs(r-u.circle.cy)<hf;)a=u.P,l.unshift(u),nf(u),u=a;l.unshift(u),Zc(u);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<hf&&Math.abs(r-s.circle.cy)<hf;)o=s.N,l.push(s),nf(s),s=o;l.push(s),Zc(s);var c,f=l.length;for(c=1;c<f;++c)s=l[c],u=l[c-1],Wc(s.edge,u.site,s.site,i);u=l[0],(s=l[f-1]).edge=Dc(u.site,s.site,null,i),Gc(u),Gc(s)}function af(t){for(var e,n,r,i,a=t[0],o=t[1],l=uf._;l;)if((r=of(l,o)-a)>hf)l=l.L;else{if(!((i=a-lf(l,o))>hf)){r>-hf?(e=l.P,n=l):i>-hf?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){sf[t.index]={site:t,halfedges:[]}}(t);var u=ef(t);if(uf.insert(e,u),e||n){if(e===n)return Zc(e),n=ef(e.site),uf.insert(u,n),u.edge=n.edge=Dc(e.site,u.site),Gc(e),void Gc(n);if(n){Zc(e),Zc(n);var s=e.site,c=s[0],f=s[1],h=t[0]-c,p=t[1]-f,d=n.site,m=d[0]-c,y=d[1]-f,v=2*(h*y-p*m),g=h*h+p*p,_=m*m+y*y,b=[(y*g-p*_)/v+c,(h*_-m*g)/v+f];Wc(n.edge,s,d,b),u.edge=Dc(s,t,null,b),n.edge=Dc(t,d,null,b),Gc(e),Gc(n)}else u.edge=Dc(e.site,u.site)}}function of(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var l=(n=o.site)[0],u=n[1],s=u-e;if(!s)return l;var c=l-r,f=1/a-1/s,h=c/s;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*s)-u+s/2+i-a/2)))/f+r:(r+l)/2}function lf(t,e){var n=t.N;if(n)return of(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var uf,sf,cf,ff,hf=1e-6,pf=1e-12;function df(t,e){return e[1]-t[1]||e[0]-t[0]}function mf(t,e){var n,r,i,a=t.sort(df).pop();for(ff=[],sf=new Array(t.length),uf=new Uc,cf=new Uc;;)if(i=Xc,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(af(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;rf(i.arc)}if(function(){for(var t,e,n,r,i=0,a=sf.length;i<a;++i)if((t=sf[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),l=new Array(r);for(n=0;n<r;++n)o[n]=n,l[n]=Bc(t,ff[e[n]]);for(o.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[o[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var o=+e[0][0],l=+e[0][1],u=+e[1][0],s=+e[1][1];!function(t,e,n,r){for(var i,a=ff.length;a--;)Yc(i=ff[a],t,e,n,r)&&$c(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>hf||Math.abs(i[0][1]-i[1][1])>hf)||delete ff[a]}(o,l,u,s),function(t,e,n,r){var i,a,o,l,u,s,c,f,h,p,d,m,y=sf.length,v=!0;for(i=0;i<y;++i)if(a=sf[i]){for(o=a.site,l=(u=a.halfedges).length;l--;)ff[u[l]]||u.splice(l,1);for(l=0,s=u.length;l<s;)d=(p=Vc(a,ff[u[l]]))[0],m=p[1],f=(c=qc(a,ff[u[++l%s]]))[0],h=c[1],(Math.abs(d-f)>hf||Math.abs(m-h)>hf)&&(u.splice(l,0,ff.push(Hc(o,p,Math.abs(d-t)<hf&&r-m>hf?[t,Math.abs(f-t)<hf?h:r]:Math.abs(m-r)<hf&&n-d>hf?[Math.abs(h-r)<hf?f:n,r]:Math.abs(d-n)<hf&&m-e>hf?[n,Math.abs(f-n)<hf?h:e]:Math.abs(m-e)<hf&&d-t>hf?[Math.abs(h-e)<hf?f:t,e]:null))-1),++s);s&&(v=!1)}if(v){var g,_,b,w=1/0;for(i=0,v=null;i<y;++i)(a=sf[i])&&(b=(g=(o=a.site)[0]-t)*g+(_=o[1]-e)*_)<w&&(w=b,v=a);if(v){var x=[t,e],k=[t,r],E=[n,r],T=[n,e];v.halfedges.push(ff.push(Hc(o=v.site,x,k))-1,ff.push(Hc(o,k,E))-1,ff.push(Hc(o,E,T))-1,ff.push(Hc(o,T,x))-1)}}for(i=0;i<y;++i)(a=sf[i])&&(a.halfedges.length||delete sf[i])}(o,l,u,s)}this.edges=ff,this.cells=sf,uf=cf=ff=sf=null}mf.prototype={constructor:mf,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return qc(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,l,u,s,c=n.site,f=-1,h=e[i[a-1]],p=h.left===c?h.right:h.left;++f<a;)o=p,p=(h=e[i[f]]).left===c?h.right:h.left,o&&p&&r<o.index&&r<p.index&&(u=o,s=p,((l=c)[0]-s[0])*(u[1]-l[1])-(l[0]-u[0])*(s[1]-l[1])<0)&&t.push([c.data,o.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,l=a.cells.length;!(i=a.cells[o]);)if(++o>=l)return null;var u=t-i.site[0],s=e-i.site[1],c=u*u+s*s;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var u=t-l[0],s=e-l[1],f=u*u+s*s;f<c&&(c=f,o=l.index)}}))}while(null!==o);return a._found=r,null==n||c<=n*n?i.site:null}};function yf(t,e,n){this.k=t,this.x=e,this.y=n}yf.prototype={constructor:yf,scale:function(t){return 1===t?this:new yf(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new yf(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new yf(1,0,0);yf.prototype;function vf(t,e,n,r,i){const a=t.length;let o=0,l=0;for(let u=0;u<a;u++){const s=t[u],c=e(s),f=n(s),h=i(c);o+=Math.pow(f-h,2),l+=Math.pow(f-r/a,2)}return 1-o/l}function gf(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function _f(t,e,n){const r=.01;let i=[o(t),o(e)],a=0;for(;l(i)&&a<1e4;);return i;function o(t){return[t,n(t)]}function l(t){a++;const e=t.length;let n=!1;for(let a=0;a<e-1;a++){const e=t[a],l=t[a+1],u=[((i=[e,l])[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2],s=o(u[0]),c=gf([e,u]),f=gf([e,s]);Math.abs(c-f)>r&&(t.splice(a+1,0,s),n=!0)}var i;return n}}var bf=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=t?+t[0]:1/0,f=t?+t[1]:-1/0;for(let h=0;h<i;h++){const i=r[h],p=e(i,h,r),d=n(i,h,r);null!=p&&isFinite(p)&&null!=d&&isFinite(d)&&(a++,o+=p,l+=d,u+=p*d,s+=p*p,t||(p<c&&(c=p),p>f&&(f=p)))}const h=((i=a)*u-o*l)/(i*s-o*o),p=(l-h*o)/i,d=t=>h*t+p,m=vf(r,e,n,l,d),y=[[c,c*h+p],[f,f*h+p]];return y.a=h,y.b=p,y.predict=d,y.rSquared=m,y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r};var wf=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;for(let p=0;p<i;p++){const i=r[p],d=e(i,p,r),m=n(i,p,r);null!=d&&isFinite(d)&&null!=m&&isFinite(m)&&(a++,o+=Math.log(d),l+=Math.log(m)*Math.log(d),u+=Math.log(m),s+=Math.pow(Math.log(d),2),c+=m,t||(d<f&&(f=d),d>h&&(h=d)))}const p=((i=a)*l-o*u)/(i*s-Math.pow(o,2)),d=Math.exp((u-p*o)/i),m=t=>d*Math.pow(t,p),y=_f(f,h,m);return y.a=d,y.b=p,y.predict=m,y.rSquared=vf(r,e,n,c,m),y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r};var xf=function(t){return t};function kf(t,...e){return Ef(t,xf,xf,e)}function Ef(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new Map,l=r[a++];let u=-1;for(const t of i){const e=l(t,++u,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}var Tf=function(t,e){switch(t){case If.LINEAR:return"y = ".concat(e.a.toFixed(2)," x + ").concat(e.b.toFixed(2));case If.POWER_LAW:default:return"y = ".concat(e.a.toFixed(2)," x ^ ").concat(e.b.toFixed(2))}},Sf=function(t,e,n){return function(){var t=ol,e=!1,n=1,r=1,i=[0],a=Zo,o=Zo,l=Zo,u=Zo,s=Zo;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(tl),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<c&&(c=h=(c+h)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=s(e)-n,c+=o(e)-n,(f-=l(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<c&&(c=h=(c+h)/2),t(e,r,c,f,h))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=Go(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Jo(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Jo(+t),c):o},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:Jo(+t),c):l},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Jo(+t),c):u},c.paddingLeft=function(t){return arguments.length?(s="function"==typeof t?t:Jo(+t),c):s},c}().tile(ol).size([e,n]).padding(1).round(!0)(qo(t).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})))},Cf=Ta(",d"),Mf=function(t){t.append("text").selectAll("tspan").data((function(t){return t.data.name.concat(Cf(t.value))})).join("tspan").attr("x",3).attr("y",(function(t,e,n){return"".concat(.3*(e===n.length-1)+1.1+.9*e,"em")})).attr("fill-opacity",(function(t,e,n){return e===n.length-1?.7:null})).text((function(t){return t}))},Nf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.displayFilenames,s=t.path,c=t.activeFile,f=Object(r.useRef)(null);return Object(r.useEffect)((function(){!function(t,e){var n=e.values,r=e.displayRegression,i=void 0===r||r,a=e.regressionType,o=void 0===a?0:a,l=(e.metricType,e.displayFilenames),u=void 0!==l&&l,s=e.filePrefix,c=void 0===s?"":s,f=e.path,h=void 0===f?"":f,p=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var d=600,m=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(c).concat(h))}));var y={top:20,right:30,bottom:30,left:40},v=Kl().domain(W(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["green","red"]),g=Kl().domain(W(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["lightgreen","tomato"]),_=Hl().domain(W(n,(function(t){return t.x}))).nice().range([y.left,d-y.right]),b=Hl().domain(W(n,(function(t){return t.y}))).nice().range([m-y.bottom,y.top]),w=function(t){return t.attr("transform","translate(0,".concat(m-y.bottom,")")).call(pt(_)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("x",d/2+y.left).attr("y",30).attr("fill","#000").attr("font-size",12).attr("font-weight","bold").attr("text-anchor","end").text("Churn")}))},x=function(t){return t.attr("transform","translate(".concat(y.left,",0)")).call(dt(b)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("y",-30).attr("x",-m/2).attr("transform","rotate(-90)").attr("fill","#000").attr("font-size",12).attr("text-anchor","start").attr("font-weight","bold").text("Complexity")}))},k=ac().x((function(t){return _(t[0])})).y((function(t){return b(t[1])})),E=Le(t).append("svg").attr("viewBox",[0,0,d,m]),T=E.append("g");if(T.append("g").attr("class","axis").call(w).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),T.append("g").attr("class","axis").call(x).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),T.append("g").attr("stroke-width",1.5).attr("font-family","Red Hat Text").attr("font-size",12).selectAll("g").data(n).join("g").attr("transform",(function(t){return"translate(".concat(_(t.x),",").concat(b(t.y),")")})).call((function(t){return t.append("circle").attr("fill",(function(t){return g(t.x*t.y)})).attr("stroke",(function(t){return v(t.x*t.y)})).attr("style","cursor:pointer").attr("r",4)})).call((function(t){return u?t.append("text").attr("dy","0.35em").attr("x",7).attr("style","cursor:pointer").text((function(t){return t.file_path})):null})).on("click",(function(t){p(t)})),i){var S=function(t){switch(t){case If.LINEAR:return bf().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,J(n,(function(t){return t.x}))]);case If.POWER_LAW:default:return n=n.filter((function(t){return t.y>0})),wf().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,J(n,(function(t){return t.x}))])}}(o),C=S(n);T.append("g").attr("font-family","Red Hat Text").attr("font-size",24).call((function(t){return t.append("path").attr("class","regression").datum(S(n)).attr("d",k)})).call((function(t){return t.append("text").attr("dy","60").attr("dx","33%").text("R^2 = ".concat(C.rSquared.toFixed(2)))})).call((function(t){return t.append("text").attr("dy","30").attr("dx","33%").text(Tf(o,C))}))}}(f.current,{values:n,displayRegression:o,regressionType:l,displayFilenames:u,filePrefix:a,path:s,activeFile:c},e)})),i.a.createElement("div",{id:"canvas",ref:f})},Pf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,s=t.metricType,c=t.displayFilenames,f=t.path,h=t.activeFile,p=Object(r.useRef)(null);return Object(r.useEffect)((function(){!function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=e.displayFilenames,o=void 0!==a&&a,l=e.filePrefix,s=void 0===l?"":l,c=e.path,f=void 0===c?"":c,h=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var p=600,d=600,m=Cl(Ks),y=(n=n.filter((function(t){return t.file_path.startsWith("".concat(s).concat(f))}))).map((function(t){var e;switch(i){case Uf.COMPLEXITY:e=t.y;break;case Uf.CHURN:e=t.x;break;case Uf.CHURN_COMPLEXITY:default:e=t.y*t.x}return{name:t.file_path.substring(s.length+1),value:e,file_path:t.file_path,details:t.details,history:t.history}})).map((function(t){return{name:t.name.split("/"),value:t.value,file_path:t.file_path,details:t.details,history:t.history}})),v={name:s,children:Array.from(kf(y,(function(t){return t.name[0]})),(function(t){var e=u()(t,2),n=e[0],r=e[1];return{name:n,children:Array.from(kf(r,(function(t){return t.name[1]})),(function(t){var e=u()(t,2);return{name:e[0],children:e[1]}}))}}))},g=Le(t).append("svg").attr("viewBox",[0,0,p,d]).style("font-size","10px");if(v.children.length>0){var _=Sf(v,p,d),b=g.selectAll("g").data(_.leaves()).join("g").attr("transform",(function(t){return"translate(".concat(t.x0,",").concat(t.y0,")")}));b.append("title").text((function(t){return"".concat(t.ancestors().reverse().map((function(t){return t.data.name})).join("/"),"\n").concat(Cf(t.value))})),b.append("rect").attr("fill",(function(t){for(;t.depth>1;)t=t.parent;return m(t.data.name)})).attr("fill-opacity",.6).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).on("click",(function(t){h(t.data)})),o&&Mf(b)}}(p.current,{values:n,displayRegression:o,regressionType:l,metricType:s,displayFilenames:c,filePrefix:a,path:f,activeFile:h},e)})),i.a.createElement("div",{id:"canvas",ref:p})},Of=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.metricType,s=t.displayFilenames,c=t.path,f=t.activeFile,h=Object(r.useRef)(null);return Object(r.useEffect)((function(){!function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=(e.displayFilenames,e.filePrefix),o=void 0===a?"":a,l=e.path,u=void 0===l?"":l;e.activeFile,arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.innerHTML="";var s=600,c=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(o).concat(u))}));var f={top:20,right:30,bottom:30,left:40},h=Le(t).append("svg").attr("viewBox",[0,0,s,c]).style("font-size","10px"),p=n.map((function(t){return i===Uf.COMPLEXITY?t.y:t.x})),d=Hl().domain(W(p)).range(["green","red"]),m=Hl().domain(W(p)).nice(20).range([f.left,s-f.right]),y=Z().domain(m.domain()).thresholds(m.ticks(20))(p),v=Hl().domain([0,J(y,(function(t){return t.length}))]).nice().range([c-f.bottom,f.top]),g=function(t){return t.attr("transform","translate(0,".concat(c-f.bottom,")")).call(pt(m).tickSizeOuter(0))},_=function(t){return t.attr("transform","translate(".concat(f.left,",0)")).call(dt(v))};h.append("g").selectAll("rect").data(y).join("rect").attr("fill",(function(t){return d(t.x0)})).attr("x",(function(t){return m(t.x0)+1})).attr("width",(function(t){return Math.max(0,m(t.x1)-m(t.x0)-1)})).attr("y",(function(t){return v(t.length)})).attr("height",(function(t){return v(0)-v(t.length)})),h.append("g").call(g),h.append("g").call(_)}(h.current,{values:n,displayRegression:o,regressionType:l,metricType:u,displayFilenames:s,filePrefix:a,path:c,activeFile:f},e)})),i.a.createElement("div",{id:"canvas",ref:h})},Af=n(41),Lf=n.n(Af);function Rf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ff(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Rf(n,!0).forEach((function(e){Lf()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rf(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var zf=function(t,e){var n=t;switch(e.type){case"SET_DISPLAY_REGRESSION":n=Ff({},t,{displayRegression:e.displayRegression});break;case"SET_DISPLAY_FILENAMES":n=Ff({},t,{displayFilenames:e.displayFilenames});break;case"SET_REGRESSION_TYPE":n=Ff({},t,{regressionType:e.regressionType});break;case"SET_METRIC_TYPE":n=Ff({},t,{metricType:e.metricType});break;case"SET_VALUES":n=Ff({},t,{values:e.values});break;case"SET_FILE_PREFIX":n=Ff({},t,{filePrefix:e.filePrefix});break;case"SET_PATH":n=Ff({},t,{path:e.path});break;case"SET_ACTIVE_FILE":n=Ff({},t,{activeFile:e.activeFile})}return n},If={POWER_LAW:0,LINEAR:1},jf={SCATTER_PLOT:0,TREE_MAP:1},Uf={CHURN_COMPLEXITY:0,COMPLEXITY:1,CHURN:2},Df={displayRegression:!1,displayFilenames:!1,regressionType:If.POWER_LAW,metricType:Uf.CHURN_COMPLEXITY,values:[],filePrefix:"",path:"",activeFile:{}},Hf=function(t){var e=t.type,n=t.finishedLoadingCallback,a=(t.errorCallback,Object(r.useReducer)(zf,Df)),o=u()(a,2),l=o[0],s=o[1],f=Object(r.useState)(0),p=u()(f,2),d=p[0],m=p[1],y=Object(r.useState)(!1),v=u()(y,2),g=v[0],_=v[1],b=function(){var t=h()(c.a.mark((function t(){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.values){t.next=4;break}n=new Promise((function(t,e){return t(window.values)})),t.next=9;break;case 4:return t.next=6,fetch("values?type=".concat(e));case 6:return t.next=8,t.sent.json();case 8:n=t.sent;case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),w=function(){var t=h()(c.a.mark((function t(){var e;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.filePrefix){t.next=4;break}e=new Promise((function(t,e){return t(window.filePrefix)})),t.next=9;break;case 4:return t.next=6,fetch("file_prefix");case 6:return t.next=8,t.sent.json();case 8:e=t.sent;case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function x(t){s({type:"SET_ACTIVE_FILE",activeFile:t})}Object(r.useEffect)((function(){h()(c.a.mark((function t(){var e,r,i,a;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([b(),w()]);case 2:e=t.sent,r=u()(e,2),i=r[0],a=r[1],void 0===i.error?(_(!1),s({type:"SET_VALUES",values:i}),a.file_prefix&&s({type:"SET_FILE_PREFIX",filePrefix:a.file_prefix})):_(!0),n();case 8:case"end":return t.stop()}}),t)})))()}),[e]);return i.a.createElement("div",{className:"row pt-4"},i.a.createElement("div",{className:l.activeFile&&0!==Object.keys(l.activeFile).length?"col-8":"col-12"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},"Churn vs Complexity"),i.a.createElement("h6",{className:"text-muted"},"Click on a point for additional information")),i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:"col-12 col-lg-4"},i.a.createElement("div",{id:"path-input-group"},i.a.createElement("label",{htmlFor:"path",className:"text-muted"},i.a.createElement("small",null,"Base Path")),i.a.createElement("div",{className:"input-group mb-3"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("span",{className:"input-group-text",id:"path-text"},"./".concat(l.filePrefix||""))),i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"path-text",id:"path",value:l.path,onChange:function(t){t.preventDefault(),s({type:"SET_PATH",path:t.target.value})}})))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("label",{htmlFor:"path",className:"text-muted d-block"},i.a.createElement("small",null,"Plot Type")),i.a.createElement("div",{className:"btn-group btn-group-toggle",role:"toolbar","aria-label":"Plot Type"},i.a.createElement("button",{className:"btn btn-secondary ".concat(d===jf.SCATTER_PLOT&&"active"),onClick:function(t){t.preventDefault(),m(jf.SCATTER_PLOT)}},"Scatterplot/Hist"),i.a.createElement("button",{className:"btn btn-secondary ".concat(d===jf.TREE_MAP&&"active"),onClick:function(t){t.preventDefault(),m(jf.TREE_MAP)}},"Treemap"))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("div",{className:"form-group"},i.a.createElement("label",{htmlFor:"metric-type",className:"text-muted"},i.a.createElement("small",null,"Metric")),i.a.createElement("select",{id:"metric-type",className:"form-control",onChange:function(t){t.preventDefault(),s({type:"SET_METRIC_TYPE",metricType:parseInt(t.target.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Churn * Complexity"),i.a.createElement("option",{value:"1"},"Complexity"),i.a.createElement("option",{value:"2"},"Churn"))))),i.a.createElement("div",{className:"d-flex ".concat(g?"justify-content-center align-items-center":"justify-content-start"),id:"canvas-wrapper"},g?i.a.createElement("div",{className:"text-center error"},i.a.createElement(T,{icon:M,size:"6x"}),i.a.createElement("h3",null,"Oh snap!"),"There has been an error loading the churn count."):i.a.createElement(i.a.Fragment,null,d===jf.SCATTER_PLOT?l.metricType===Uf.CHURN_COMPLEXITY?i.a.createElement(Nf,R()({fileClickCallback:x},l)):i.a.createElement(Of,R()({fileClickCallback:x},l)):i.a.createElement(Pf,R()({fileClickCallback:x},l)))),i.a.createElement(z,{state:l,dispatch:s,activePlot:d})))),l.activeFile&&Object.keys(l.activeFile).length>0&&i.a.createElement(F,{activeFile:l.activeFile,handleClose:function(){s({type:"SET_ACTIVE_FILE",activeFile:{}})}}))},Wf=n(42),$f=n.n(Wf);var Yf=function(){return(Yf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};var Bf,qf=function(){var t=Object(r.useState)(0)[1];return Object(r.useCallback)((function(){return t((function(t){return t+1}))}),[])},Vf=function(t){void 0===t&&(t={});var e=qf(),n=Object(r.useRef)(Yf({},t));return[Object(r.useCallback)((function(){return n.current}),[]),Object(r.useCallback)((function(t){t&&(Object.assign(n.current,t),e())}),[])]},Xf=function(t){Object(r.useEffect)(t,[])},Qf=function(t,e){var n=Object(r.useRef)(!0);Object(r.useEffect)((function(){if(!n.current)return t();n.current=!1}),e)},Kf=(n(43),function(t,e,n){return t=(t=t<=n?t:n)>=e?t:e}),Gf=!1,Zf=[],Jf=function(t){Zf.push(t),Gf||1!==Zf.length||function t(){Gf=!0;var e=Zf.shift();if(e)return e(t);Gf=!1}()},th=function(t,e){var n;Bf=window.requestAnimationFrame((function r(i){i-(n=n||i)>e?t():Bf=window.requestAnimationFrame(r)}))},eh=function(){},nh={isFinished:!1,progress:0,sideEffect:eh},rh=function(){Bf&&window.cancelAnimationFrame(Bf),Gf=!1,Zf=[]},ih=function(t){var e=void 0===t?{}:t,n=e.animationDuration,i=void 0===n?200:n,a=e.incrementDuration,o=void 0===a?800:a,l=e.isAnimating,u=void 0!==l&&l,s=e.minimum,c=void 0===s?.08:s,f=Vf(nh),h=f[0],p=f[1],d=function(t){if(1===(t=Kf(t,c,1)))return rh(),Jf((function(e){p({progress:t,sideEffect:function(){return th(e,i)}})})),void Jf((function(){p({isFinished:!0,sideEffect:rh})}));Jf((function(e){p({progress:t,sideEffect:function(){return th(e,i)}})}))},m=function(){var t,e;d((t=h().progress,e=0,t>=0&&t<.2?e=.1:t>=.2&&t<.5?e=.04:t>=.5&&t<.8?e=.02:t>=.8&&t<.99&&(e=.005),Kf(t+e,0,.994)))},y=function(){!function t(){m(),Jf((function(e){th((function(){t(),e()}),o)}))}()},v=Object(r.useRef)(eh);return Object(r.useEffect)((function(){v.current=m})),Xf((function(){return u&&y(),rh})),Qf((function(){h().sideEffect()}),[h().sideEffect]),Qf((function(){u?p({sideEffect:y}):d(1)}),[u]),{animationDuration:i,isFinished:h().isFinished,progress:h().progress}},ah=function(t){var e=t.children,n=$f()(t,["children"]);return e(ih(n))};var oh=function(t){var e=t.progress,n=t.animationDuration;return r.createElement("div",{className:"progressbar",style:{marginLeft:"".concat(100*(-1+e),"%"),transition:"margin-left ".concat(n,"ms linear")}},r.createElement("div",{className:"shadow"}))};oh.propTypes={animationDuration:m.a.number.isRequired,progress:m.a.number.isRequired};var lh=oh,uh=function(t){var e=t.children,n=t.isFinished,i=t.animationDuration;return r.createElement("div",{style:{opacity:n?0:1,pointerEvents:"none",transition:"opacity ".concat(i,"ms linear")}},e)};uh.propTypes={animationDuration:m.a.number.isRequired,children:m.a.node.isRequired,isFinished:m.a.bool.isRequired};var sh=uh,ch=function(t){var e=t.isAnimating,n=t.key;return i.a.createElement(ah,{isAnimating:e,key:n},(function(t){var e=t.animationDuration,n=t.isFinished,r=t.progress;return i.a.createElement(sh,{isFinished:n,animationDuration:e},i.a.createElement(lh,{progress:r,animationDuration:e}))}))};function fh(){var t=Object(r.useState)(window.type||"rb"),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)(!0),l=u()(o,2),s=l[0],c=l[1];return i.a.createElement(i.a.Fragment,null,i.a.createElement(ch,{isAnimating:s,key:n}),i.a.createElement("nav",{className:"navbar navbar-expand-lg navbar-light bg-light fixed-top"},i.a.createElement("a",{className:"navbar-brand",href:"#"},i.a.createElement("img",{src:"images/attractor_logo.svg",alt:"",width:"36",className:"mr-3"}),"Attractor"),i.a.createElement("ul",{className:"navbar-nav mx-auto"},Object.entries(window.types).map((function(t){var e=u()(t,2),r=e[0],o=e[1];return i.a.createElement("li",{className:"nav-item ".concat(n===r?"active":"")},i.a.createElement("a",{className:"nav-link",href:window.serveStatic?"index.".concat(r,".html"):"#",onClick:function(){window.serveStatic||(c(!0),a(r))}},o))})))),i.a.createElement("div",{className:"container"},i.a.createElement(Hf,{type:n,finishedLoadingCallback:function(){c(!1)}}),i.a.createElement("div",{className:"row mt-3"},i.a.createElement("div",{className:"col-12"},i.a.createElement(A,null)))))}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("react-root")&&o.a.render(i.a.createElement(fh,null),document.getElementById("react-root"))}))}]); + */Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case o:case u:case l:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case s:return t;default:return e}}case v:case y:case a:return e}}}function x(t){return w(t)===h}e.typeOf=w,e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=s,e.Element=i,e.ForwardRef=p,e.Fragment=o,e.Lazy=v,e.Memo=y,e.Portal=a,e.Profiler=u,e.StrictMode=l,e.Suspense=d,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===u||t===l||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===s||t.$$typeof===c||t.$$typeof===p||t.$$typeof===g||t.$$typeof===_||t.$$typeof===b)},e.isAsyncMode=function(t){return x(t)||w(t)===f},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===o},e.isLazy=function(t){return w(t)===v},e.isMemo=function(t){return w(t)===y},e.isPortal=function(t){return w(t)===a},e.isProfiler=function(t){return w(t)===u},e.isStrictMode=function(t){return w(t)===l},e.isSuspense=function(t){return w(t)===d}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(40),o=n.n(a),l=n(2),u=n.n(l),s=n(3),c=n.n(s),f=n(5),h=n.n(f),p=n(11),d=n(1),m=n.n(d);function y(t){return(y="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})(t)}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){v(t,e,n[e])}))}return t}function _(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function b(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function w(t){return e=t,(e-=0)==e?t:(t=t.replace(/[\-_\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))).substr(0,1).toLowerCase()+t.substr(1);var e}var x=!1;try{x=!0}catch(t){}function k(t){return null===t?null:"object"===y(t)&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:"fas",iconName:t}:void 0}function E(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?v({},t,e):{}}function T(t){var e=t.icon,n=t.mask,r=t.symbol,i=t.className,a=t.title,o=k(e),l=E("classes",[].concat(b(function(t){var e,n=t.spin,r=t.pulse,i=t.fixedWidth,a=t.inverse,o=t.border,l=t.listItem,u=t.flip,s=t.size,c=t.rotation,f=t.pull,h=(v(e={"fa-spin":n,"fa-pulse":r,"fa-fw":i,"fa-inverse":a,"fa-border":o,"fa-li":l,"fa-flip-horizontal":"horizontal"===u||"both"===u,"fa-flip-vertical":"vertical"===u||"both"===u},"fa-".concat(s),void 0!==s),v(e,"fa-rotate-".concat(c),void 0!==c),v(e,"fa-pull-".concat(f),void 0!==f),v(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(h).map((function(t){return h[t]?t:null})).filter((function(t){return t}))}(t)),b(i.split(" ")))),u=E("transform","string"==typeof t.transform?p.b.transform(t.transform):t.transform),s=E("mask",k(n)),c=Object(p.a)(o,g({},l,u,s,{symbol:r,title:a}));if(!c)return function(){var t;!x&&console&&"function"==typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find icon",o),null;var f=c.abstract,h={};return Object.keys(t).forEach((function(e){T.defaultProps.hasOwnProperty(e)||(h[e]=t[e])})),S(f[0],h)}T.displayName="FontAwesomeIcon",T.propTypes={border:m.a.bool,className:m.a.string,mask:m.a.oneOfType([m.a.object,m.a.array,m.a.string]),fixedWidth:m.a.bool,inverse:m.a.bool,flip:m.a.oneOf(["horizontal","vertical","both"]),icon:m.a.oneOfType([m.a.object,m.a.array,m.a.string]),listItem:m.a.bool,pull:m.a.oneOf(["right","left"]),pulse:m.a.bool,rotation:m.a.oneOf([90,180,270]),size:m.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:m.a.bool,symbol:m.a.oneOfType([m.a.bool,m.a.string]),title:m.a.string,transform:m.a.oneOfType([m.a.string,m.a.object]),swapOpacity:m.a.bool},T.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var S=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var i=(n.children||[]).map((function(n){return t(e,n)})),a=Object.keys(n.attributes||{}).reduce((function(t,e){var r=n.attributes[e];switch(e){case"class":t.attrs.className=r,delete n.attributes.class;break;case"style":t.attrs.style=function(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n,r=e.indexOf(":"),i=w(e.slice(0,r)),a=e.slice(r+1).trim();return i.startsWith("webkit")?t[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=a:t[i]=a,t}),{})}(r);break;default:0===e.indexOf("aria-")||0===e.indexOf("data-")?t.attrs[e.toLowerCase()]=r:t.attrs[w(e)]=r}return t}),{attrs:{}}),o=r.style,l=void 0===o?{}:o,u=_(r,["style"]);return a.attrs.style=g({},a.attrs.style,l),e.apply(void 0,[n.tag,g({},a.attrs,u)].concat(b(i)))}.bind(null,i.a.createElement),C={prefix:"fas",iconName:"arrow-right",icon:[448,512,[],"f061","M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"]},M={prefix:"fas",iconName:"sad-tear",icon:[496,512,[],"f5b4","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM152 416c-26.5 0-48-21-48-47 0-20 28.5-60.4 41.6-77.8 3.2-4.3 9.6-4.3 12.8 0C171.5 308.6 200 349 200 369c0 26-21.5 47-48 47zm16-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm170.2 154.2C315.8 367.4 282.9 352 248 352c-21.2 0-21.2-32 0-32 44.4 0 86.3 19.6 114.7 53.8 13.8 16.4-11.2 36.5-24.5 20.4z"]},N=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},P=function(t){return null===t?NaN:+t};function O(t,e,n){return(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).sort(N),function(t,e,n=P){if(!(r=t.length))return;if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t),l=+n(t[a+1],a+1,t);return o+(l-o)*(i-a)}(t,e)}function A(t){var e=t.type,n=Object(r.useState)(95),a=u()(n,2),o=a[0],l=a[1],s=Object(r.useState)([]),f=u()(s,2),p=f[0],d=f[1],m=function(){var t=h()(c.a.mark((function t(n){var r,i;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.values){t.next=5;break}i=O(window.values,n/100,(function(t){return t.x*t.y})),r=window.values.filter((function(t){return t.x*t.y>i})),t.next=10;break;case 5:return t.next=7,fetch("suggestions?t=".concat(n,"&type=").concat(e));case 7:return t.next=9,t.sent.json();case 9:r=t.sent;case 10:d(r);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){m(o)}),[e]),i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"d-flex justify-content-between"},i.a.createElement("div",null,i.a.createElement("h5",{className:"card-title"},"Refactoring Candidates"),i.a.createElement("h6",{className:"card-subtitle text-muted"},"Top 95 Percentile of Churn * Complexity")),i.a.createElement("div",{id:"percentile-input-group"},i.a.createElement("label",{htmlFor:"percentile",className:"text-muted"},i.a.createElement("small",null,"Percentile")),i.a.createElement("div",{className:"input-group align-items-start"},i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"percentile-button",id:"percentile",value:o,onChange:function(t){return l(t.target.value)}}),i.a.createElement("div",{className:"input-group-append"},i.a.createElement("button",{className:"btn btn-dark",type:"button",id:"percentile-button",onClick:function(t){t.preventDefault(),m(o)}},i.a.createElement(T,{icon:C})))))),i.a.createElement("table",{className:"table mt-4"},i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",{scope:"col"},"File Path"),i.a.createElement("th",{scope:"col"},"Churn"),i.a.createElement("th",{scope:"col"},"Complexity"),i.a.createElement("th",{scope:"col"},"Churn * Complexity"))),i.a.createElement("tbody",{id:"suggestions-table"},p.length>0&&p.map((function(t){return i.a.createElement("tr",{key:t.file_path},i.a.createElement("td",null,t.file_path),i.a.createElement("td",null,t.x),i.a.createElement("td",null,Math.round(t.y)),i.a.createElement("td",null,Math.round(t.x*t.y)))}))))))}var L=n(8),R=n.n(L),F=function(t){var e=t.activeFile,n=t.handleClose;return i.a.createElement("div",{className:"col-4"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},e.file_path),i.a.createElement("h6",{className:"text-muted"},"Additional information"),i.a.createElement("button",{type:"button",className:"close","aria-label":"Close",onClick:n},i.a.createElement("span",{"aria-hidden":"true"},"×"))),i.a.createElement("div",{className:"card-body"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Method Teardown")),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,Object.entries(e.details).map((function(t){var e=u()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-9 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-3"},Math.round(100*r)/100))})))),i.a.createElement("h6",{className:"text-muted mt-3"},"Git history (last 10 commits)"),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,e.history.map((function(t){var e=u()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-3 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-8 text-truncate"},r))})))))))},z=function(t){var e=t.state,n=t.dispatch,r=t.activePlot;return i.a.createElement("div",{className:"mt-3"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Display options")),i.a.createElement("form",null,i.a.createElement("div",{className:"form-row"},i.a.createElement("div",{className:"form-group col-2"},i.a.createElement("input",{checked:e.displayFilenames,className:"form-check-input",type:"checkbox",id:"filenames-check",onChange:function(){n({type:"SET_DISPLAY_FILENAMES",displayFilenames:!e.displayFilenames})}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"filenames-check"},i.a.createElement("small",null,"Display filenames"))),i.a.createElement("div",{className:"form-group col-2"},i.a.createElement("input",{checked:e.displayRegression,className:"form-check-input",type:"checkbox",id:"regression-check",disabled:r!==jf.SCATTER_PLOT,onChange:function(){n({type:"SET_DISPLAY_REGRESSION",displayRegression:!e.displayRegression})}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"regression-check"},i.a.createElement("small",null,"Display regression"))),i.a.createElement("div",{className:"form-group col-3"},i.a.createElement("label",{htmlFor:"regression-type",className:"text-muted ".concat(r===jf.TREE_MAP&&"disabled")},i.a.createElement("small",null,"Regression Type")),i.a.createElement("select",{id:"regression-type",className:"form-control",disabled:r!==jf.SCATTER_PLOT,onChange:function(t){n({type:"SET_REGRESSION_TYPE",regressionType:parseInt(t.currentTarget.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Power Law"),i.a.createElement("option",{value:"1"},"Linear"))))))},I=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var j,U,D=(1===(j=I).length&&(U=j,j=function(t,e){return I(U(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;j(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;j(t[i],e)>0?r=i:n=i+1}return n}}),H=D.right;var W=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},$=Array.prototype,Y=$.slice,B=($.map,function(t){return function(){return t}}),q=function(t){return t},V=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},X=Math.sqrt(50),Q=Math.sqrt(10),K=Math.sqrt(2);var G=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},Z=function(){var t=q,e=W,n=G;function r(r){var i,a,o=r.length,l=new Array(o);for(i=0;i<o;++i)l[i]=t(r[i],i,r);var u,s,c,f,h,p,d=e(l),m=d[0],y=d[1],v=n(l,m,y);Array.isArray(v)||(u=m,s=y,c=v,f=Math.abs(s-u)/Math.max(0,c),h=Math.pow(10,Math.floor(Math.log(f)/Math.LN10)),(p=f/h)>=X?h*=10:p>=Q?h*=5:p>=K&&(h*=2),v=s<u?-h:h,v=V(Math.ceil(m/v)*v,y,v));for(var g=v.length;v[0]<=m;)v.shift(),--g;for(;v[g-1]>y;)v.pop(),--g;var _,b=new Array(g+1);for(i=0;i<=g;++i)(_=b[i]=[]).x0=i>0?v[i-1]:m,_.x1=i<g?v[i]:y;for(i=0;i<o;++i)m<=(a=l[i])&&a<=y&&b[H(v,a,0,g)].push(r[i]);return b}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:B(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:B([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?B(Y.call(t)):B(t),r):n},r},J=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r};var tt=Array.prototype.slice,et=function(t){return t},nt=1,rt=2,it=3,at=4,ot=1e-6;function lt(t){return"translate("+(t+.5)+",0)"}function ut(t){return"translate(0,"+(t+.5)+")"}function st(t){return function(e){return+t(e)}}function ct(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ft(){return!this.__axis}function ht(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u=t===nt||t===at?-1:1,s=t===at||t===rt?"x":"y",c=t===nt||t===it?lt:ut;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):et:i,d=Math.max(a,0)+l,m=e.range(),y=+m[0]+.5,v=+m[m.length-1]+.5,g=(e.bandwidth?ct:st)(e.copy()),_=f.selection?f.selection():f,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(h,e).order(),x=w.exit(),k=w.enter().append("g").attr("class","tick"),E=w.select("line"),T=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),E=E.merge(k.append("line").attr("stroke","currentColor").attr(s+"2",u*a)),T=T.merge(k.append("text").attr("fill","currentColor").attr(s,u*d).attr("dy",t===nt?"0em":t===it?"0.71em":"0.32em")),f!==_&&(b=b.transition(f),w=w.transition(f),E=E.transition(f),T=T.transition(f),x=x.transition(f).attr("opacity",ot).attr("transform",(function(t){return isFinite(t=g(t))?c(t):this.getAttribute("transform")})),k.attr("opacity",ot).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:g(t))}))),x.remove(),b.attr("d",t===at||t==rt?o?"M"+u*o+","+y+"H0.5V"+v+"H"+u*o:"M0.5,"+y+"V"+v:o?"M"+y+","+u*o+"V0.5H"+v+"V"+u*o:"M"+y+",0.5H"+v),w.attr("opacity",1).attr("transform",(function(t){return c(g(t))})),E.attr(s+"2",u*a),T.attr(s,u*d).text(p),_.filter(ft).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===rt?"start":t===at?"end":"middle"),_.each((function(){this.__axis=g}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=tt.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:tt.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:tt.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function pt(t){return ht(it,t)}function dt(t){return ht(at,t)}var mt={value:function(){}};function yt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new vt(r)}function vt(t){this._=t}function gt(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function _t(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function bt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}vt.prototype=yt.prototype={constructor:vt,on:function(t,e){var n,r=this._,i=gt(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=bt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=bt(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=_t(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new vt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var wt=yt,xt="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:xt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Et=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),kt.hasOwnProperty(e)?{space:kt[e],local:t}:t};function Tt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===xt&&e.documentElement.namespaceURI===xt?e.createElement(t):e.createElementNS(n,t)}}function St(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var Ct=function(t){var e=Et(t);return(e.local?St:Tt)(e)};function Mt(){}var Nt=function(t){return null==t?Mt:function(){return this.querySelector(t)}};function Pt(){return[]}var Ot=function(t){return null==t?Pt:function(){return this.querySelectorAll(t)}},At=function(t){return function(){return this.matches(t)}},Lt=function(t){return new Array(t.length)};function Rt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Rt.prototype={constructor:Rt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Ft="$";function zt(t,e,n,r,i,a){for(var o,l=0,u=e.length,s=a.length;l<s;++l)(o=e[l])?(o.__data__=a[l],r[l]=o):n[l]=new Rt(t,a[l]);for(;l<u;++l)(o=e[l])&&(i[l]=o)}function It(t,e,n,r,i,a,o){var l,u,s,c={},f=e.length,h=a.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=s=Ft+o.call(u,u.__data__,l,e),s in c?i[l]=u:c[s]=u);for(l=0;l<h;++l)(u=c[s=Ft+o.call(t,a[l],l,a)])?(r[l]=u,u.__data__=a[l],c[s]=null):n[l]=new Rt(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(i[l]=u)}function jt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ut(t){return function(){this.removeAttribute(t)}}function Dt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ht(t,e){return function(){this.setAttribute(t,e)}}function Wt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function $t(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Yt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Bt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function qt(t){return function(){this.style.removeProperty(t)}}function Vt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Xt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Qt(t,e){return t.style.getPropertyValue(e)||Bt(t).getComputedStyle(t,null).getPropertyValue(e)}function Kt(t){return function(){delete this[t]}}function Gt(t,e){return function(){this[t]=e}}function Zt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Jt(t){return t.trim().split(/^|\s+/)}function te(t){return t.classList||new ee(t)}function ee(t){this._node=t,this._names=Jt(t.getAttribute("class")||"")}function ne(t,e){for(var n=te(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function re(t,e){for(var n=te(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ie(t){return function(){ne(this,t)}}function ae(t){return function(){re(this,t)}}function oe(t,e){return function(){(e.apply(this,arguments)?ne:re)(this,t)}}ee.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function le(){this.textContent=""}function ue(t){return function(){this.textContent=t}}function se(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ce(){this.innerHTML=""}function fe(t){return function(){this.innerHTML=t}}function he(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function pe(){this.nextSibling&&this.parentNode.appendChild(this)}function de(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function me(){return null}function ye(){var t=this.parentNode;t&&t.removeChild(this)}function ve(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function ge(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var _e={},be=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(_e={mouseenter:"mouseover",mouseleave:"mouseout"}));function we(t,e,n){return t=xe(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function xe(t,e,n){return function(r){var i=be;be=r;try{t.call(this,this.__data__,e,n)}finally{be=i}}}function ke(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ee(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function Te(t,e,n){var r=_e.hasOwnProperty(t.type)?we:xe;return function(i,a,o){var l,u=this.__on,s=r(e,a,o);if(u)for(var c=0,f=u.length;c<f;++c)if((l=u[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=s,l.capture=n),void(l.value=e);this.addEventListener(t.type,s,n),l={type:t.type,name:t.name,value:e,listener:s,capture:n},u?u.push(l):this.__on=[l]}}function Se(t,e,n){var r=Bt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ce(t,e){return function(){return Se(this,t,e)}}function Me(t,e){return function(){return Se(this,t,e.apply(this,arguments))}}var Ne=[null];function Pe(t,e){this._groups=t,this._parents=e}function Oe(){return new Pe([[document.documentElement]],Ne)}Pe.prototype=Oe.prototype={constructor:Pe,select:function(t){"function"!=typeof t&&(t=Nt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,l=e[i],u=l.length,s=r[i]=new Array(u),c=0;c<u;++c)(a=l[c])&&(o=t.call(a,a.__data__,c,l))&&("__data__"in a&&(o.__data__=a.__data__),s[c]=o);return new Pe(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Ot(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,l=e[a],u=l.length,s=0;s<u;++s)(o=l[s])&&(r.push(t.call(o,o.__data__,s,l)),i.push(o));return new Pe(r,i)},filter:function(t){"function"!=typeof t&&(t=At(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new Pe(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n,r=e?It:zt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,l=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var f=i[c],h=a[c],p=h.length,d=t.call(f,f&&f.__data__,c,i),m=d.length,y=u[c]=new Array(m),v=l[c]=new Array(m);r(f,h,y,v,s[c]=new Array(p),d,e);for(var g,_,b=0,w=0;b<m;++b)if(g=y[b]){for(b>=w&&(w=b+1);!(_=v[w])&&++w<m;);g._next=_||null}}return(l=new Pe(l,i))._enter=u,l._exit=s,l},enter:function(){return new Pe(this._enter||this._groups.map(Lt),this._parents)},exit:function(){return new Pe(this._exit||this._groups.map(Lt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new Pe(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=jt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,l=n[a],u=l.length,s=i[a]=new Array(u),c=0;c<u;++c)(o=l[c])&&(s[c]=o);s.sort(e)}return new Pe(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,l=a.length;o<l;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Et(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Dt:Ut:"function"==typeof e?n.local?Yt:$t:n.local?Wt:Ht)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?qt:"function"==typeof e?Xt:Vt)(t,e,null==n?"":n)):Qt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Kt:"function"==typeof e?Zt:Gt)(t,e)):this.node()[t]},classed:function(t,e){var n=Jt(t+"");if(arguments.length<2){for(var r=te(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?oe:e?ie:ae)(n,e))},text:function(t){return arguments.length?this.each(null==t?le:("function"==typeof t?se:ue)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ce:("function"==typeof t?he:fe)(t)):this.node().innerHTML},raise:function(){return this.each(pe)},lower:function(){return this.each(de)},append:function(t){var e="function"==typeof t?t:Ct(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ct(t),r=null==e?me:"function"==typeof e?e:Nt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ye)},clone:function(t){return this.select(t?ge:ve)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=ke(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?Te:Ee,null==n&&(n=!1),r=0;r<o;++r)this.each(l(a[r],e,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(r=0,u=l[s];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Me:Ce)(t,e))}};var Ae=Oe,Le=function(t){return"string"==typeof t?new Pe([[document.querySelector(t)]],[document.documentElement]):new Pe([[t]],Ne)},Re=0;function Fe(){this._="@"+(++Re).toString(36)}Fe.prototype=function(){return new Fe}.prototype={constructor:Fe,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function ze(t,e,n,r,i,a,o,l,u,s){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=l,this.dy=u,this._=s}ze.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ie=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function je(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ue(){}var De="\\s*([+-]?\\d+)\\s*",He="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",We="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$e=/^#([0-9a-f]{3,8})$/,Ye=new RegExp("^rgb\\("+[De,De,De]+"\\)$"),Be=new RegExp("^rgb\\("+[We,We,We]+"\\)$"),qe=new RegExp("^rgba\\("+[De,De,De,He]+"\\)$"),Ve=new RegExp("^rgba\\("+[We,We,We,He]+"\\)$"),Xe=new RegExp("^hsl\\("+[He,We,We]+"\\)$"),Qe=new RegExp("^hsla\\("+[He,We,We,He]+"\\)$"),Ke={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 Ge(){return this.rgb().formatHex()}function Ze(){return this.rgb().formatRgb()}function Je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=$e.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?tn(e):3===n?new an(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new an(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new an(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Ye.exec(t))?new an(e[1],e[2],e[3],1):(e=Be.exec(t))?new an(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=qe.exec(t))?en(e[1],e[2],e[3],e[4]):(e=Ve.exec(t))?en(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xe.exec(t))?sn(e[1],e[2]/100,e[3]/100,1):(e=Qe.exec(t))?sn(e[1],e[2]/100,e[3]/100,e[4]):Ke.hasOwnProperty(t)?tn(Ke[t]):"transparent"===t?new an(NaN,NaN,NaN,0):null}function tn(t){return new an(t>>16&255,t>>8&255,255&t,1)}function en(t,e,n,r){return r<=0&&(t=e=n=NaN),new an(t,e,n,r)}function nn(t){return t instanceof Ue||(t=Je(t)),t?new an((t=t.rgb()).r,t.g,t.b,t.opacity):new an}function rn(t,e,n,r){return 1===arguments.length?nn(t):new an(t,e,n,null==r?1:r)}function an(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function on(){return"#"+un(this.r)+un(this.g)+un(this.b)}function ln(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function un(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function sn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new hn(t,e,n,r)}function cn(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);if(t instanceof Ue||(t=Je(t)),!t)return new hn;if(t instanceof hn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n<r):n===a?(r-e)/l+2:(e-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new hn(o,l,u,t.opacity)}function fn(t,e,n,r){return 1===arguments.length?cn(t):new hn(t,e,n,null==r?1:r)}function hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function dn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Ie(Ue,Je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Ge,formatHex:Ge,formatHsl:function(){return cn(this).formatHsl()},formatRgb:Ze,toString:Ze}),Ie(an,rn,je(Ue,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new an(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new an(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:on,formatHex:on,formatRgb:ln,toString:ln})),Ie(hn,fn,je(Ue,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new an(pn(t>=240?t-240:t+120,i,r),pn(t,i,r),pn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var mn=function(t){return function(){return t}};function yn(t,e){return function(n){return t+n*e}}function vn(t,e){var n=e-t;return n?yn(t,n>180||n<-180?n-360*Math.round(n/360):n):mn(isNaN(t)?e:t)}function gn(t){return 1==(t=+t)?_n:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):mn(isNaN(e)?n:e)}}function _n(t,e){var n=e-t;return n?yn(t,n):mn(isNaN(t)?e:t)}var bn=function t(e){var n=gn(e);function r(t,e){var r=n((t=rn(t)).r,(e=rn(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=_n(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function wn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=rn(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}wn((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return dn((n-r/e)*e,o,i,a,l)}})),wn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return dn((n-r/e)*e,i,a,o,l)}}));var xn=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Ln(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}},kn=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},En=function(t,e){return e-=t=+t,function(n){return t+e*n}},Tn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ln(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Sn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cn=new RegExp(Sn.source,"g");var Mn,Nn,Pn,On,An=function(t,e){var n,r,i,a=Sn.lastIndex=Cn.lastIndex=0,o=-1,l=[],u=[];for(t+="",e+="";(n=Sn.exec(t))&&(r=Cn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:En(n,r)})),a=Cn.lastIndex;return a<e.length&&(i=e.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})},Ln=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?mn(e):("number"===r?En:"string"===r?(n=Je(e))?(e=n,bn):An:e instanceof Je?bn:e instanceof Date?kn:Array.isArray(e)?xn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Tn:En)(t,e)},Rn=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},Fn=180/Math.PI,zn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},In=function(t,e,n,r,i,a){var o,l,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Fn,skewX:Math.atan(u)*Fn,scaleX:o,scaleY:l}};function jn(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var l=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,l){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);l.push({i:u-4,x:En(t,i)},{i:u-2,x:En(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,l,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:En(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:En(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:En(t,n)},{i:l-2,x:En(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var Un=jn((function(t){return"none"===t?zn:(Mn||(Mn=document.createElement("DIV"),Nn=document.documentElement,Pn=document.defaultView),Mn.style.transform=t,t=Pn.getComputedStyle(Nn.appendChild(Mn),null).getPropertyValue("transform"),Nn.removeChild(Mn),t=t.slice(7,-1).split(","),In(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Dn=jn((function(t){return null==t?zn:(On||(On=document.createElementNS("http://www.w3.org/2000/svg","g")),On.setAttribute("transform",t),(t=On.transform.baseVal.consolidate())?(t=t.matrix,In(t.a,t.b,t.c,t.d,t.e,t.f)):zn)}),", ",")",")");Math.SQRT2;function Hn(t){return function(e,n){var r=t((e=fn(e)).h,(n=fn(n)).h),i=_n(e.s,n.s),a=_n(e.l,n.l),o=_n(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}Hn(vn),Hn(_n);var Wn=Math.PI/180,$n=180/Math.PI,Yn=.96422,Bn=1,qn=.82521,Vn=4/29,Xn=6/29,Qn=3*Xn*Xn,Kn=Xn*Xn*Xn;function Gn(t){if(t instanceof Jn)return new Jn(t.l,t.a,t.b,t.opacity);if(t instanceof or)return lr(t);t instanceof an||(t=nn(t));var e,n,r=rr(t.r),i=rr(t.g),a=rr(t.b),o=tr((.2225045*r+.7168786*i+.0606169*a)/Bn);return r===i&&i===a?e=n=o:(e=tr((.4360747*r+.3850649*i+.1430804*a)/Yn),n=tr((.0139322*r+.0971045*i+.7141733*a)/qn)),new Jn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Zn(t,e,n,r){return 1===arguments.length?Gn(t):new Jn(t,e,n,null==r?1:r)}function Jn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function tr(t){return t>Kn?Math.pow(t,1/3):t/Qn+Vn}function er(t){return t>Xn?t*t*t:Qn*(t-Vn)}function nr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ir(t){if(t instanceof or)return new or(t.h,t.c,t.l,t.opacity);if(t instanceof Jn||(t=Gn(t)),0===t.a&&0===t.b)return new or(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*$n;return new or(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ar(t,e,n,r){return 1===arguments.length?ir(t):new or(t,e,n,null==r?1:r)}function or(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function lr(t){if(isNaN(t.h))return new Jn(t.l,0,0,t.opacity);var e=t.h*Wn;return new Jn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function ur(t){return function(e,n){var r=t((e=ar(e)).h,(n=ar(n)).h),i=_n(e.c,n.c),a=_n(e.l,n.l),o=_n(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}Ie(Jn,Zn,je(Ue,{brighter:function(t){return new Jn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Jn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new an(nr(3.1338561*(e=Yn*er(e))-1.6168667*(t=Bn*er(t))-.4906146*(n=qn*er(n))),nr(-.9787684*e+1.9161415*t+.033454*n),nr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Ie(or,ar,je(Ue,{brighter:function(t){return new or(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new or(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return lr(this).rgb()}}));ur(vn),ur(_n);var sr=-.29227,cr=-.90649,fr=1.97294,hr=fr*cr,pr=1.78277*fr,dr=1.78277*sr- -.14861*cr;function mr(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);t instanceof an||(t=nn(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(dr*r+hr*e-pr*n)/(dr+hr-pr),a=r-i,o=(fr*(n-i)-sr*a)/cr,l=Math.sqrt(o*o+a*a)/(fr*i*(1-i)),u=l?Math.atan2(o,a)*$n-120:NaN;return new yr(u<0?u+360:u,l,i,t.opacity)}(t):new yr(t,e,n,null==r?1:r)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function vr(t){return function e(n){function r(e,r){var i=t((e=mr(e)).h,(r=mr(r)).h),a=_n(e.s,r.s),o=_n(e.l,r.l),l=_n(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}Ie(yr,mr,je(Ue,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Wn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new an(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(sr*r+cr*i)),255*(e+n*(fr*r)),this.opacity)}}));vr(vn),vr(_n);var gr,_r,br=0,wr=0,xr=0,kr=1e3,Er=0,Tr=0,Sr=0,Cr="object"==typeof performance&&performance.now?performance:Date,Mr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Nr(){return Tr||(Mr(Pr),Tr=Cr.now()+Sr)}function Pr(){Tr=0}function Or(){this._call=this._time=this._next=null}function Ar(t,e,n){var r=new Or;return r.restart(t,e,n),r}function Lr(){Tr=(Er=Cr.now())+Sr,br=wr=0;try{!function(){Nr(),++br;for(var t,e=gr;e;)(t=Tr-e._time)>=0&&e._call.call(null,t),e=e._next;--br}()}finally{br=0,function(){var t,e,n=gr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:gr=e);_r=t,Fr(r)}(),Tr=0}}function Rr(){var t=Cr.now(),e=t-Er;e>kr&&(Sr-=e,Er=t)}function Fr(t){br||(wr&&(wr=clearTimeout(wr)),t-Tr>24?(t<1/0&&(wr=setTimeout(Lr,t-Cr.now()-Sr)),xr&&(xr=clearInterval(xr))):(xr||(Er=Cr.now(),xr=setInterval(Rr,kr)),br=1,Mr(Lr)))}Or.prototype=Ar.prototype={constructor:Or,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Nr():+n)+(null==e?0:+e),this._next||_r===this||(_r?_r._next=this:gr=this,_r=this),this._call=t,this._time=n,Fr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fr())}};var zr=function(t,e,n){var r=new Or;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Ir=wt("start","end","cancel","interrupt"),jr=[],Ur=0,Dr=1,Hr=2,Wr=3,$r=4,Yr=5,Br=6,qr=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var s,c,f,h;if(n.state!==Dr)return l();for(s in i)if((h=i[s]).name===n.name){if(h.state===Wr)return zr(a);h.state===$r?(h.state=Br,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<e&&(h.state=Br,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[s])}if(zr((function(){n.state===Wr&&(n.state=$r,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=Hr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Hr){for(n.state=Wr,r=new Array(f=n.tween.length),s=0,c=-1;s<f;++s)(h=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=Yr,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===Yr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=Br,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Ar((function(t){n.state=Dr,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Ir,tween:jr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ur})};function Vr(t,e){var n=Qr(t,e);if(n.state>Ur)throw new Error("too late; already scheduled");return n}function Xr(t,e){var n=Qr(t,e);if(n.state>Wr)throw new Error("too late; already running");return n}function Qr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var Kr=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>Hr&&n.state<Yr,n.state=Br,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}};function Gr(t,e){var n,r;return function(){var i=Xr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o<l;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Zr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Xr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===e){i[u]=l;break}u===s&&i.push(l)}a.tween=i}}function Jr(t,e,n){var r=t._id;return t.each((function(){var t=Xr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Qr(t,r).value[e]}}var ti=function(t,e){var n;return("number"==typeof e?En:e instanceof Je?bn:(n=Je(e))?(e=n,bn):An)(t,e)};function ei(t){return function(){this.removeAttribute(t)}}function ni(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ri(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function ii(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function ai(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttribute(t)}}function oi(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function li(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return i._value=e,i}function ui(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return i._value=e,i}function si(t,e){return function(){Vr(this,t).delay=+e.apply(this,arguments)}}function ci(t,e){return e=+e,function(){Vr(this,t).delay=e}}function fi(t,e){return function(){Xr(this,t).duration=+e.apply(this,arguments)}}function hi(t,e){return e=+e,function(){Xr(this,t).duration=e}}function pi(t,e){if("function"!=typeof e)throw new Error;return function(){Xr(this,t).ease=e}}function di(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Vr:Xr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var mi=Ae.prototype.constructor;function yi(t){return function(){this.style.removeProperty(t)}}function vi(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,a,n)),r}return a._value=e,a}var gi=0;function _i(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function bi(){return++gi}var wi=Ae.prototype;_i.prototype=function(t){return Ae().transition(t)}.prototype={constructor:_i,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Nt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l,u,s=r[o],c=s.length,f=a[o]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=t.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,qr(f[h],e,n,h,f,Qr(l,n)));return new _i(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Ot(t));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u,s=r[l],c=s.length,f=0;f<c;++f)if(u=s[f]){for(var h,p=t.call(u,u.__data__,f,s),d=Qr(u,n),m=0,y=p.length;m<y;++m)(h=p[m])&&qr(h,e,n,m,p,d);a.push(p),o.push(u)}return new _i(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=At(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new _i(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new _i(o,this._parents,this._name,this._id)},selection:function(){return new mi(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=bi(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)if(o=l[s]){var c=Qr(o,e);qr(o,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new _i(r,this._parents,t,n)},call:wi.call,nodes:wi.nodes,node:wi.node,size:wi.size,empty:wi.empty,each:wi.each,on:function(t,e){var n=this._id;return arguments.length<2?Qr(this.node(),n).on.on(t):this.each(di(n,t,e))},attr:function(t,e){var n=Et(t),r="transform"===n?Dn:ti;return this.attrTween(t,"function"==typeof e?(n.local?oi:ai)(n,r,Jr(this,"attr."+t,e)):null==e?(n.local?ni:ei)(n):(n.local?ii:ri)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Et(t);return this.tween(n,(r.local?li:ui)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Un:ti;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Qt(this,t),o=(this.style.removeProperty(t),Qt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,yi(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Qt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=Qt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,Jr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=Xr(this,t),s=u.on,c=null==u.value[o]?a||(a=yi(e)):void 0;s===n&&i===c||(r=(n=s).copy()).on(l,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Qt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,vi(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Jr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Qr(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Gr:Zr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?si:ci)(e,t)):Qr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?fi:hi)(e,t)):Qr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(pi(e,t)):Qr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var l={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Xr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Math.PI;(function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n})(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var xi=2*Math.PI,ki=(function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=xi);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*xi)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=xi);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*xi)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=xi);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*xi)},i.period=function(n){return t(e,n)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function Ei(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ki.time=Nr(),ki;return n}Ae.prototype.interrupt=function(t){return this.each((function(){Kr(this,t)}))},Ae.prototype.transition=function(t){var e,n;t instanceof _i?(e=t._id,t=t._name):(e=bi(),(n=ki).time=Nr(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)(o=l[s])&&qr(o,t,e,s,l,n||Ei(o,e));return new _i(r,this._parents,t,e)};function Ti(t){return[+t[0],+t[1]]}function Si(t){return[Ti(t[0]),Ti(t[1])]}["w","e"].map(Ci),["n","s"].map(Ci),["n","w","e","s","nw","ne","sw","se"].map(Ci);function Ci(t){return{type:t}}var Mi=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Ni=function(t){return 1===t.length&&(t=function(t){return function(e,n){return Mi(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}(Mi);Ni.right,Ni.left;var Pi=Array.prototype;Pi.slice,Pi.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Oi=Math.PI,Ai=2*Oi,Li=Ai-1e-6;function Ri(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Fi(){return new Ri}Ri.prototype=Fi.prototype={constructor:Ri,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,l=n-t,u=r-e,s=a-t,c=o-e,f=s*s+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(c*l-u*s)>1e-6&&i){var h=n-a,p=r-o,d=l*l+u*u,m=h*h+p*p,y=Math.sqrt(d),v=Math.sqrt(f),g=i*Math.tan((Oi-Math.acos((d+f-m)/(2*y*v)))/2),_=g/v,b=g/y;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*s)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>s*p)+","+(this._x1=t+b*l)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),l=n*Math.sin(r),u=t+o,s=e+l,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+s:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+u+","+s),n&&(f<0&&(f=f%Ai+Ai),f>Li?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Oi)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var zi=Fi;function Ii(){}function ji(t,e){var n=new Ii;if(t instanceof Ii)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Ii.prototype=ji.prototype={constructor:Ii,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Ui=ji;function Di(){}var Hi=Ui.prototype;function Wi(t,e){var n=new Di;if(t instanceof Di)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}Di.prototype=Wi.prototype={constructor:Di,has:Hi.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Hi.remove,clear:Hi.clear,values:Hi.keys,size:Hi.size,empty:Hi.empty,each:Hi.each};var $i=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var Yi=function(t){return 1===t.length&&(t=function(t){return function(e,n){return $i(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}($i);Yi.right,Yi.left;var Bi=Array.prototype;Bi.slice,Bi.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Array.prototype.slice;var qi={},Vi={},Xi=34,Qi=10,Ki=13;function Gi(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function Zi(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function Ji(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ta(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Ji(-e,6):e>9999?"+"+Ji(e,6):Ji(e,4))+"-"+Ji(t.getUTCMonth()+1,2)+"-"+Ji(t.getUTCDate(),2)+(a?"T"+Ji(n,2)+":"+Ji(r,2)+":"+Ji(i,2)+"."+Ji(a,3)+"Z":i?"T"+Ji(n,2)+":"+Ji(r,2)+":"+Ji(i,2)+"Z":r||n?"T"+Ji(n,2)+":"+Ji(r,2)+"Z":"")}var ea=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,u=a<=0,s=!1;function c(){if(u)return Vi;if(s)return s=!1,qi;var e,r,i=o;if(t.charCodeAt(i)===Xi){for(;o++<a&&t.charCodeAt(o)!==Xi||t.charCodeAt(++o)===Xi;);return(e=o)>=a?u=!0:(r=t.charCodeAt(o++))===Qi?s=!0:r===Ki&&(s=!0,t.charCodeAt(o)===Qi&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===Qi)s=!0;else if(r===Ki)s=!0,t.charCodeAt(o)===Qi&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===Qi&&--a,t.charCodeAt(a-1)===Ki&&--a;(r=c())!==Vi;){for(var f=[];r!==qi&&r!==Vi;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ta(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Gi(t);return function(r,i){return e(n(r),i,t)}}(t,e):Gi(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Zi(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Zi(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")}}},na=ea(","),ra=na.parse,ia=(na.parseRows,na.format,na.formatBody,na.formatRows,ea("\t")),aa=ia.parse;ia.parseRows,ia.format,ia.formatBody,ia.formatRows;function oa(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var la=function(t,e){return fetch(t,e).then(oa)};function ua(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),la(e,n).then((function(e){return t(e,r)}))}}ua(ra),ua(aa);function sa(t){return function(e,n){return la(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}sa("application/xml"),sa("text/html"),sa("image/svg+xml");function ca(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,l,u,s,c,f,h,p=t._root,d={data:r},m=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o,i=p,!(p=p[f=c<<1|s]))return i[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o}while((f=c<<1|s)==(h=(u>=o)<<1|l>=a));return i[h]=p,i[f]=d,t}var fa=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ha(t){return t[0]}function pa(t){return t[1]}function da(t,e,n){var r=new ma(null==e?ha:e,null==n?pa:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ma(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function ya(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var va=da.prototype=ma.prototype;va.copy=function(){var t,e,n=new ma(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=ya(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=ya(e));return n},va.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return ca(this.cover(e,n),e,n,t)},va.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),l=new Array(a),u=1/0,s=1/0,c=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,l[n]=i,r<u&&(u=r),r>c&&(c=r),i<s&&(s=i),i>f&&(f=i));if(u>c||s>f)return this;for(this.cover(u,s).cover(c,f),n=0;n<a;++n)ca(this,o[n],l[n],t[n]);return this},va.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,l,u=i-n,s=this._root;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,(o=new Array(4))[l]=s,s=o,u*=2,l){case 0:i=n+u,a=r+u;break;case 1:n=i-u,a=r+u;break;case 2:i=n+u,r=a-u;break;case 3:n=i-u,r=a-u}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},va.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},va.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]]},va.find=function(t,e,n){var r,i,a,o,l,u,s,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],m=this._root;for(m&&d.push(new fa(m,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(m=u.node)||(i=u.x0)>h||(a=u.y0)>p||(o=u.x1)<c||(l=u.y1)<f))if(m.length){var y=(i+o)/2,v=(a+l)/2;d.push(new fa(m[3],y,v,o,l),new fa(m[2],i,v,y,l),new fa(m[1],y,a,o,v),new fa(m[0],i,a,y,v)),(s=(e>=v)<<1|t>=y)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=u)}else{var g=t-+this._x.call(null,m.data),_=e-+this._y.call(null,m.data),b=g*g+_*_;if(b<n){var w=Math.sqrt(n=b);c=t-w,f=e-w,h=t+w,p=e+w,r=m.data}}return r},va.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,l,u,s,c,f,h,p=this._root,d=this._x0,m=this._y0,y=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((s=a>=(l=(d+y)/2))?d=l:y=l,(c=o>=(u=(m+v)/2))?m=u:v=u,e=p,!(p=p[f=c<<1|s]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},va.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},va.root=function(){return this._root},va.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},va.visit=function(t){var e,n,r,i,a,o,l=[],u=this._root;for(u&&l.push(new fa(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&u.length){var s=(r+a)/2,c=(i+o)/2;(n=u[3])&&l.push(new fa(n,s,c,a,o)),(n=u[2])&&l.push(new fa(n,r,c,s,o)),(n=u[1])&&l.push(new fa(n,s,i,a,c)),(n=u[0])&&l.push(new fa(n,r,i,s,c))}return this},va.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new fa(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,l=e.y0,u=e.x1,s=e.y1,c=(o+u)/2,f=(l+s)/2;(a=i[0])&&n.push(new fa(a,o,l,c,f)),(a=i[1])&&n.push(new fa(a,c,l,u,f)),(a=i[2])&&n.push(new fa(a,o,f,c,s)),(a=i[3])&&n.push(new fa(a,c,f,u,s))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},va.x=function(t){return arguments.length?(this._x=t,this):this._x},va.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var ga=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},_a=function(t){return(t=ga(Math.abs(t)))?t[1]:NaN},ba=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wa(t){if(!(e=ba.exec(t)))throw new Error("invalid format: "+t);var e;return new xa({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function xa(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}wa.prototype=xa.prototype,xa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ka,Ea,Ta,Sa,Ca=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Ma=function(t,e){var n=ga(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Na={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Ma(100*t,e)},r:Ma,s:function(t,e){var n=ga(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(ka=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ga(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Pa=function(t){return t},Oa=Array.prototype.map,Aa=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Ea=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Pa:(e=Oa.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?Pa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Oa.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=wa(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,v=t.trim,g=t.type;"n"===g?(m=!0,g="g"):Na[g]||(void 0===y&&(y=12),v=!0,g="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",b="$"===h?a:/[%p]/.test(g)?u:"",w=Na[g],x=/[defgprs%]/.test(g);function k(t){var i,a,u,h=_,k=b;if("c"===g)k=w(t)+k,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:w(Math.abs(t),y),v&&(t=Ca(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:s:"-"===f||"("===f?"":f)+h,k=("s"===g?Aa[8+ka/3]:"")+k+(E&&"("===f?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var T=h.length+t.length+k.length,S=T<d?new Array(d-T+1).join(e):"";switch(m&&p&&(t=r(S+t,S.length?d-k.length:1/0),S=""),n){case"<":t=h+t+k+S;break;case"=":t=h+S+t+k;break;case"^":t=S.slice(0,T=S.length>>1)+h+t+k+S.slice(T);break;default:t=S+h+t+k}return l(t)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=wa(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(_a(e)/3))),i=Math.pow(10,-r),a=Aa[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Ta=Ea.format,Sa=Ea.formatPrefix;var La=function(){return new Ra};function Ra(){this.reset()}Ra.prototype={constructor:Ra,reset:function(){this.s=this.t=0},add:function(t){za(Fa,t,this.t),za(this,Fa.s,this.s),this.s?this.t+=Fa.t:this.s=Fa.t},valueOf:function(){return this.s}};var Fa=new Ra;function za(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Ia=1e-6,ja=1e-12,Ua=Math.PI,Da=Ua/2,Ha=Ua/4,Wa=2*Ua,$a=Ua/180,Ya=Math.abs,Ba=Math.atan,qa=Math.atan2,Va=Math.cos,Xa=(Math.ceil,Math.exp),Qa=(Math.floor,Math.log),Ka=(Math.pow,Math.sin),Ga=Math.sign||function(t){return t>0?1:t<0?-1:0},Za=Math.sqrt,Ja=Math.tan;function to(t){return t>1?0:t<-1?Ua:Math.acos(t)}function eo(t){return t>1?Da:t<-1?-Da:Math.asin(t)}function no(){}La(),La();function ro(t){var e=t[0],n=t[1],r=Va(n);return[r*Va(e),r*Ka(e),Ka(n)]}function io(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function ao(t){var e=Za(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}La();function oo(t,e){return[Ya(t)>Ua?t+Math.round(-t/Wa)*Wa:t,e]}oo.invert=oo;var lo=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:no,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},uo=function(t,e){return Ya(t[0]-e[0])<Ia&&Ya(t[1]-e[1])<Ia};function so(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var co=function(t,e,n,r,i){var a,o,l=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(uo(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else l.push(n=new so(r,t,null,!0)),u.push(n.o=new so(r,null,n,!1)),l.push(n=new so(o,t,null,!1)),u.push(n.o=new so(o,null,n,!0))}})),l.length){for(u.sort(e),fo(l),fo(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var s,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=s.length;a<o;++a)i.point((c=s[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,a=s.length-1;a>=0;--a)i.point((c=s[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function fo(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ho=La();function po(t){return Ya(t[0])<=Ua?t[0]:Ga(t[0])*((Ya(t[0])+Ua)%Wa-Ua)}var mo=function(t,e){var n=po(e),r=e[1],i=Ka(r),a=[Ka(n),-Va(n),0],o=0,l=0;ho.reset(),1===i?r=Da+Ia:-1===i&&(r=-Da-Ia);for(var u=0,s=t.length;u<s;++u)if(f=(c=t[u]).length)for(var c,f,h=c[f-1],p=po(h),d=h[1]/2+Ha,m=Ka(d),y=Va(d),v=0;v<f;++v,p=_,m=w,y=x,h=g){var g=c[v],_=po(g),b=g[1]/2+Ha,w=Ka(b),x=Va(b),k=_-p,E=k>=0?1:-1,T=E*k,S=T>Ua,C=m*w;if(ho.add(qa(C*E*Ka(T),y*x+C*Va(T))),o+=S?k+E*Wa:k,S^p>=n^_>=n){var M=io(ro(h),ro(g));ao(M);var N=io(a,M);ao(N);var P=(S^k>=0?-1:1)*eo(N[2]);(r>P||r===P&&(M[0]||M[1]))&&(l+=S^k>=0?1:-1)}}return(o<-Ia||o<Ia&&ho<-Ia)^1&l},yo=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var vo=function(t){return 1===t.length&&(t=function(t){return function(e,n){return yo(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}(yo);vo.right,vo.left;var go=Array.prototype;go.slice,go.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var _o=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n};var bo=function(t,e,n,r){return function(i){var a,o,l,u=e(i),s=lo(),c=e(s),f=!1,h={point:p,lineStart:m,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=g,h.lineEnd=_,o=[],a=[]},polygonEnd:function(){h.point=p,h.lineStart=m,h.lineEnd=y,o=_o(o);var t=mo(a,r);o.length?(f||(i.polygonStart(),f=!0),co(o,xo,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function m(){h.point=d,u.lineStart()}function y(){h.point=p,u.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function g(){c.lineStart(),l=[]}function _(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,u=c.clean(),h=s.result(),p=h.length;if(l.pop(),a.push(l),l=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(wo))}return h}};function wo(t){return t.length>1}function xo(t,e){return((t=t.x)[0]<0?t[1]-Da-Ia:Da-t[1])-((e=e.x)[0]<0?e[1]-Da-Ia:Da-e[1])}bo((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l=a>0?Ua:-Ua,u=Ya(a-n);Ya(u-Ua)<Ia?(t.point(n,r=(r+o)/2>0?Da:-Da),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&u>=Ua&&(Ya(n-i)<Ia&&(n-=i*Ia),Ya(a-l)<Ia&&(a-=l*Ia),r=function(t,e,n,r){var i,a,o=Ka(t-n);return Ya(o)>Ia?Ba((Ka(e)*(a=Va(r))*Ka(n)-Ka(r)*(i=Va(e))*Ka(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=a,r=o),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Da,r.point(-Ua,i),r.point(0,i),r.point(Ua,i),r.point(Ua,0),r.point(Ua,-i),r.point(0,-i),r.point(-Ua,-i),r.point(-Ua,0),r.point(-Ua,i);else if(Ya(t[0]-e[0])>Ia){var a=t[0]<e[0]?Ua:-Ua;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Ua,-Da]);La();La(),La();function ko(t){this._context=t}ko.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Wa)}},result:no};La();function Eo(){this._string=[]}function To(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Eo.prototype={_radius:4.5,_circle:To(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=To(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function So(t){return function(e){var n=new Co;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Co(){}Co.prototype={constructor:Co,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};Va(30*$a);So({point:function(t,e){this.stream.point(t*$a,e*$a)}});function Mo(t){return function(e,n){var r=Va(e),i=Va(n),a=t(r*i);return[a*i*Ka(e),a*Ka(n)]}}function No(t){return function(e,n){var r=Za(e*e+n*n),i=t(r),a=Ka(i),o=Va(i);return[qa(e*a,r*o),eo(r&&n*a/r)]}}var Po=Mo((function(t){return Za(2/(1+t))}));Po.invert=No((function(t){return 2*eo(t/2)}));var Oo=Mo((function(t){return(t=to(t))&&t/Ka(t)}));Oo.invert=No((function(t){return t}));function Ao(t,e){return[t,Qa(Ja((Da+e)/2))]}Ao.invert=function(t,e){return[t,2*Ba(Xa(e))-Da]};function Lo(t,e){return[t,e]}Lo.invert=Lo;var Ro=1.340264,Fo=-.081106,zo=893e-6,Io=.003796,jo=Za(3)/2;function Uo(t,e){var n=eo(jo*Ka(e)),r=n*n,i=r*r*r;return[t*Va(n)/(jo*(Ro+3*Fo*r+i*(7*zo+9*Io*r))),n*(Ro+Fo*r+i*(zo+Io*r))]}Uo.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Ro+Fo*i+a*(zo+Io*i))-e)/(Ro+3*Fo*i+a*(7*zo+9*Io*i)))*r)*i*i,!(Ya(n)<ja));++o);return[jo*t*(Ro+3*Fo*i+a*(7*zo+9*Io*i))/Va(r),eo(Ka(r)/jo)]};function Do(t,e){var n=Va(e),r=Va(t)*n;return[n*Ka(t)/r,Ka(e)/r]}Do.invert=No(Ba);function Ho(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Ho.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Ya(n)>Ia&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function Wo(t,e){return[Va(e)*Ka(t),Ka(e)]}Wo.invert=No(eo);function $o(t,e){var n=Va(e),r=1+Va(t)*n;return[n*Ka(t)/r,Ka(e)/r]}$o.invert=No((function(t){return 2*Ba(t)}));function Yo(t,e){return[Qa(Ja((Da+e)/2)),-t]}Yo.invert=function(t,e){return[-e,2*Ba(Xa(t))-Da]};function Bo(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function qo(t,e){var n,r,i,a,o,l=new Ko(t),u=+t.value&&(l.value=t.value),s=[l];for(null==e&&(e=Vo);n=s.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)s.push(r=n.children[a]=new Ko(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(Qo)}function Vo(t){return t.children}function Xo(t){t.data=t.data.data}function Qo(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ko(t){this.data=t,this.depth=this.height=0,this.parent=null}Ko.prototype=qo.prototype={constructor:Ko,count:function(){return this.eachAfter(Bo)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return qo(this).eachBefore(Xo)}};Array.prototype.slice;function Go(t){if("function"!=typeof t)throw new Error;return t}function Zo(){return 0}var Jo=function(t){return function(){return t}};var tl=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},el=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(r-e)/t.value;++l<u;)(a=o[l]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*s};function nl(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}nl.prototype=Object.create(Ko.prototype);var rl=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(i-n)/t.value;++l<u;)(a=o[l]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*s},il=(1+Math.sqrt(5))/2;function al(t,e,n,r,i,a){for(var o,l,u,s,c,f,h,p,d,m,y,v=[],g=e.children,_=0,b=0,w=g.length,x=e.value;_<w;){u=i-n,s=a-r;do{c=g[b++].value}while(!c&&b<w);for(f=h=c,y=c*c*(m=Math.max(s/u,u/s)/(x*t)),d=Math.max(h/y,y/f);b<w;++b){if(c+=l=g[b].value,l<f&&(f=l),l>h&&(h=l),y=c*c*m,(p=Math.max(h/y,y/f))>d){c-=l;break}d=p}v.push(o={value:c,dice:u<s,children:g.slice(_,b)}),o.dice?el(o,n,r,i,x?r+=s*c/x:a):rl(o,n,r,x?n+=u*c/x:i,a),x-=c,_=b}return v}var ol=function t(e){function n(t,n,r,i,a){al(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(il);(function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,l,u,s,c,f=-1,h=o.length,p=t.value;++f<h;){for(u=(l=o[f]).children,s=l.value=0,c=u.length;s<c;++s)l.value+=u[s].value;l.dice?el(l,n,r,i,r+=(a-r)*l.value/p):rl(l,n,r,n+=(i-n)*l.value/p,a),p-=l.value}else t._squarify=o=al(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n})(il);var ll=function(){return Math.random()},ul=(function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(ll),function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(ll)),sl=(function t(e){function n(){var t=ul.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(ll),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(ll)),cl=(function t(e){function n(t){var n=sl.source(e)(t);return function(){return n()/t}}return n.source=t,n}(ll),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(ll),function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}),fl=function(t){return 1===t.length&&(t=function(t){return function(e,n){return cl(t(e),n)}}(t)),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var hl=fl(cl),pl=hl.right,dl=(hl.left,pl);var ml=Array.prototype,yl=(ml.slice,ml.map,Math.sqrt(50)),vl=Math.sqrt(10),gl=Math.sqrt(2),_l=function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=bl(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return r&&a.reverse(),a};function bl(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=yl?10:a>=vl?5:a>=gl?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=yl?10:a>=vl?5:a>=gl?2:1)}function wl(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=yl?i*=10:a>=vl?i*=5:a>=gl&&(i*=2),e<t?-i:i}function xl(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var kl=Array.prototype,El=kl.map,Tl=kl.slice,Sl={name:"implicit"};function Cl(){var t=Ui(),e=[],n=[],r=Sl;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Sl)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ui();for(var r,a,o=-1,l=n.length;++o<l;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Tl.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Cl(e,n).unknown(r)},xl.apply(i,arguments),i}var Ml=function(t){return function(){return t}},Nl=function(t){return+t},Pl=[0,1];function Ol(t){return t}function Al(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Ml(isNaN(e)?NaN:.5)}function Ll(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Rl(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Al(i,r),a=n(o,a)):(r=Al(r,i),a=n(a,o)),function(t){return a(r(t))}}function Fl(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Al(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=dl(t,e,1,r)-1;return a[n](i[n](e))}}function zl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Il(){var t,e,n,r,i,a,o=Pl,l=Pl,u=Ln,s=Ol;function c(){return r=Math.min(o.length,l.length)>2?Fl:Rl,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),l,u)))(t(s(e)))}return f.invert=function(n){return s(e((a||(a=r(l,o.map(t),En)))(n)))},f.domain=function(t){return arguments.length?(o=El.call(t,Nl),s===Ol||(s=Ll(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=Tl.call(t),c()):l.slice()},f.rangeRound=function(t){return l=Tl.call(t),u=Rn,c()},f.clamp=function(t){return arguments.length?(s=t?Ll(o):Ol,f):s!==Ol},f.interpolate=function(t){return arguments.length?(u=t,c()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function jl(t,e){return Il()(t,e)}var Ul=function(t,e,n,r){var i,a=wl(t,e,n);switch((r=wa(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_a(e)/3)))-_a(Math.abs(t)))}(a,o))||(r.precision=i),Sa(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,_a(e)-_a(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-_a(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Ta(r)};function Dl(t){var e=t.domain;return t.ticks=function(t){var n=e();return _l(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ul(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,l=i[a],u=i[o];return u<l&&(r=l,l=u,u=r,r=a,a=o,o=r),(r=bl(l,u,n))>0?r=bl(l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=bl(l=Math.ceil(l*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function Hl(){var t=jl(Ol,Ol);return t.copy=function(){return zl(t,Hl())},xl.apply(t,arguments),Dl(t)}var Wl=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function $l(t){return Math.log(t)}function Yl(t){return Math.exp(t)}function Bl(t){return-Math.log(-t)}function ql(t){return-Math.exp(-t)}function Vl(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Xl(t){return function(e){return-t(-e)}}function Ql(t){var e,n,r=t($l,Yl),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Vl:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Xl(e),n=Xl(n),t(Bl,ql)):t($l,Yl),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),l=o[0],u=o[o.length-1];(r=u<l)&&(h=l,l=u,u=h);var s,c,f,h=e(l),p=e(u),d=null==t?10:+t,m=[];if(!(a%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,l>0){for(;h<p;++h)for(c=1,s=n(h);c<a;++c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else for(;h<p;++h)for(c=a-1,s=n(h);c>=1;--c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else m=_l(h,p,Math.min(p-h,d)).map(n);return r?m.reverse():m},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Ta(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Wl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Kl(){var t=Ql(Il()).domain([1,10]);return t.copy=function(){return zl(t,Kl()).base(t.base())},xl.apply(t,arguments),t}var Gl=new Date,Zl=new Date;function Jl(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return l;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return l},i.filter=function(n){return Jl((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Gl.setTime(+e),Zl.setTime(+r),t(Gl),t(Zl),Math.floor(n(Gl,Zl))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var tu=Jl((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));tu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Jl((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var eu=tu,nu=(tu.range,Jl((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),ru=(nu.range,6e4),iu=6048e5;function au(t){return Jl((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ru)/iu}))}var ou=au(0),lu=au(1),uu=au(2),su=au(3),cu=au(4),fu=au(5),hu=au(6),pu=(ou.range,lu.range,uu.range,su.range,cu.range,fu.range,hu.range,Jl((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ru)/864e5}),(function(t){return t.getDate()-1}))),du=pu,mu=(pu.range,Jl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*ru)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),yu=(mu.range,Jl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*ru)}),(function(t,e){return(e-t)/ru}),(function(t){return t.getMinutes()}))),vu=(yu.range,Jl((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),gu=(vu.range,Jl((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));gu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Jl((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):gu:null};gu.range;function _u(t){return Jl((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/iu}))}var bu=_u(0),wu=_u(1),xu=_u(2),ku=_u(3),Eu=_u(4),Tu=_u(5),Su=_u(6),Cu=(bu.range,wu.range,xu.range,ku.range,Eu.range,Tu.range,Su.range,Jl((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),Mu=Cu,Nu=(Cu.range,Jl((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Nu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Jl((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Pu=Nu;Nu.range;function Ou(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Au(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Lu(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var Ru,Fu,zu,Iu={"-":"",_:" ",0:"0"},ju=/^\s*\d+/,Uu=/^%/,Du=/[\\^$*+?|[\]().{}]/g;function Hu(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Wu(t){return t.replace(Du,"\\$&")}function $u(t){return new RegExp("^(?:"+t.map(Wu).join("|")+")","i")}function Yu(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Bu(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function qu(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Vu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Xu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Qu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ku(t,e,n){var r=ju.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Gu(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Zu(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ju(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ts(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function es(t,e,n){var r=ju.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ns(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rs(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function is(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function as(t,e,n){var r=ju.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function os(t,e,n){var r=ju.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ls(t,e,n){var r=Uu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function us(t,e,n){var r=ju.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ss(t,e,n){var r=ju.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function cs(t,e){return Hu(t.getDate(),e,2)}function fs(t,e){return Hu(t.getHours(),e,2)}function hs(t,e){return Hu(t.getHours()%12||12,e,2)}function ps(t,e){return Hu(1+du.count(eu(t),t),e,3)}function ds(t,e){return Hu(t.getMilliseconds(),e,3)}function ms(t,e){return ds(t,e)+"000"}function ys(t,e){return Hu(t.getMonth()+1,e,2)}function vs(t,e){return Hu(t.getMinutes(),e,2)}function gs(t,e){return Hu(t.getSeconds(),e,2)}function _s(t){var e=t.getDay();return 0===e?7:e}function bs(t,e){return Hu(ou.count(eu(t),t),e,2)}function ws(t,e){var n=t.getDay();return t=n>=4||0===n?cu(t):cu.ceil(t),Hu(cu.count(eu(t),t)+(4===eu(t).getDay()),e,2)}function xs(t){return t.getDay()}function ks(t,e){return Hu(lu.count(eu(t),t),e,2)}function Es(t,e){return Hu(t.getFullYear()%100,e,2)}function Ts(t,e){return Hu(t.getFullYear()%1e4,e,4)}function Ss(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hu(e/60|0,"0",2)+Hu(e%60,"0",2)}function Cs(t,e){return Hu(t.getUTCDate(),e,2)}function Ms(t,e){return Hu(t.getUTCHours(),e,2)}function Ns(t,e){return Hu(t.getUTCHours()%12||12,e,2)}function Ps(t,e){return Hu(1+Mu.count(Pu(t),t),e,3)}function Os(t,e){return Hu(t.getUTCMilliseconds(),e,3)}function As(t,e){return Os(t,e)+"000"}function Ls(t,e){return Hu(t.getUTCMonth()+1,e,2)}function Rs(t,e){return Hu(t.getUTCMinutes(),e,2)}function Fs(t,e){return Hu(t.getUTCSeconds(),e,2)}function zs(t){var e=t.getUTCDay();return 0===e?7:e}function Is(t,e){return Hu(bu.count(Pu(t),t),e,2)}function js(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Eu(t):Eu.ceil(t),Hu(Eu.count(Pu(t),t)+(4===Pu(t).getUTCDay()),e,2)}function Us(t){return t.getUTCDay()}function Ds(t,e){return Hu(wu.count(Pu(t),t),e,2)}function Hs(t,e){return Hu(t.getUTCFullYear()%100,e,2)}function Ws(t,e){return Hu(t.getUTCFullYear()%1e4,e,4)}function $s(){return"+0000"}function Ys(){return"%"}function Bs(t){return+t}function qs(t){return Math.floor(+t/1e3)}!function(t){Ru=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,l=t.months,u=t.shortMonths,s=$u(i),c=Yu(i),f=$u(a),h=Yu(a),p=$u(o),d=Yu(o),m=$u(l),y=Yu(l),v=$u(u),g=Yu(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:cs,e:cs,f:ms,H:fs,I:hs,j:ps,L:ds,m:ys,M:vs,p:function(t){return i[+(t.getHours()>=12)]},Q:Bs,s:qs,S:gs,u:_s,U:bs,V:ws,w:xs,W:ks,x:null,X:null,y:Es,Y:Ts,Z:Ss,"%":Ys},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:Cs,e:Cs,f:As,H:Ms,I:Ns,j:Ps,L:Os,m:Ls,M:Rs,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bs,s:qs,S:Fs,u:zs,U:Is,V:js,w:Us,W:Ds,x:null,X:null,y:Hs,Y:Ws,Z:$s,"%":Ys},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:ts,e:ts,f:os,H:ns,I:ns,j:es,L:as,m:Ju,M:rs,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:us,s:ss,S:is,u:qu,U:Vu,V:Xu,w:Bu,W:Qu,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Gu,Y:Ku,Z:Zu,"%":ls};function x(t,e){return function(n){var r,i,a,o=[],l=-1,u=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++l<s;)37===t.charCodeAt(l)&&(o.push(t.slice(u,l)),null!=(i=Iu[r=t.charAt(++l)])?r=t.charAt(++l):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=l+1);return o.push(t.slice(u,l)),o.join("")}}function k(t,e){return function(n){var r,i,a=Lu(1900);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("p"in a&&(a.H=a.H%12+12*a.p),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Au(Lu(a.y))).getUTCDay(),r=i>4||0===i?wu.ceil(r):wu(r),r=Mu.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=e(Lu(a.y))).getDay(),r=i>4||0===i?lu.ceil(r):lu(r),r=du.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Au(Lu(a.y)).getUTCDay():e(Lu(a.y)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Au(a)):e(a)}}function E(t,e,n,r){for(var i,a,o=0,l=e.length,u=n.length;o<l;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Iu?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",Ou);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t,Au);return e.toString=function(){return t},e}}}(t),Ru.format,Ru.parse,Fu=Ru.utcFormat,zu=Ru.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Fu("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||zu("%Y-%m-%dT%H:%M:%S.%LZ");var Vs=Jl((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Xs=(Vs.range,Jl((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Qs=(Xs.range,Jl((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*ru)}),(function(t,e){return(e-t)/ru}),(function(t){return t.getUTCMinutes()})));Qs.range;var Ks=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Gs=function(t){return function(){return t}},Zs=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),Js=Math.PI,tc=2*Js;function ec(t){this._context=t}ec.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var nc=function(t){return new ec(t)};function rc(t){return t[0]}function ic(t){return t[1]}var ac=function(){var t=rc,e=ic,n=Gs(!0),r=null,i=nc,a=null;function o(o){var l,u,s,c=o.length,f=!1;for(null==r&&(a=i(s=zi())),l=0;l<=c;++l)!(l<c&&n(u=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(u,l,o),+e(u,l,o));if(s)return a=null,s+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Gs(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Gs(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Gs(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o};lc(nc);function oc(t){this._curve=t}function lc(t){function e(e){return new oc(t(e))}return e._curve=t,e}oc.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};Array.prototype.slice;Math.sqrt(1/3);var uc=Math.sin(Js/10)/Math.sin(7*Js/10),sc=(Math.sin(tc/10),Math.cos(tc/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function cc(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function fc(t){this._context=t}fc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:cc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:cc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hc(t){this._context=t}hc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:cc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function pc(t){this._context=t}pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:cc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function dc(t,e){this._basis=new fc(t),this._beta=e}dc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,l=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*l));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new fc(t):new dc(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function mc(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function yc(t,e){this._context=t,this._k=(1-e)/6}yc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mc(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:mc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new yc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function vc(t,e){this._context=t,this._k=(1-e)/6}vc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new vc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function gc(t,e){this._context=t,this._k=(1-e)/6}gc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:mc(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new gc(t,e)}return n.tension=function(e){return t(+e)},n})(0);function _c(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Zs){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Zs){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*s+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*s+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function bc(t,e){this._context=t,this._alpha=e}bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:_c(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new bc(t,e):new yc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function wc(t,e){this._context=t,this._alpha=e}wc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:_c(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new wc(t,e):new vc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function xc(t,e){this._context=t,this._alpha=e}xc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_c(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new xc(t,e):new gc(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function kc(t){this._context=t}kc.prototype={areaStart:sc,areaEnd:sc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Ec(t){return t<0?-1:1}function Tc(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(Ec(a)+Ec(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Sc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Cc(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function Mc(t){this._context=t}function Nc(t){this._context=new Pc(t)}function Pc(t){this._context=t}function Oc(t){this._context=t}function Ac(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}Mc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Cc(this,this._t0,Sc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Cc(this,Sc(this,n=Tc(this,t,e)),n);break;default:Cc(this,this._t0,n=Tc(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Nc.prototype=Object.create(Mc.prototype)).point=function(t,e){Mc.prototype.point.call(this,e,t)},Pc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Oc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Ac(t),i=Ac(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Lc(t,e){this._context=t,this._t=e}Lc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function Rc(){this._=null}function Fc(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function zc(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ic(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function jc(t){for(;t.L;)t=t.L;return t}Rc.prototype={constructor:Rc,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=jc(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(zc(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ic(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ic(this,n),n=(t=n).U),n.C=!1,r.C=!0,zc(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?jc(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,zc(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ic(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,zc(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ic(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,zc(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ic(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Uc=Rc;function Dc(t,e,n,r){var i=[null,null],a=ff.push(i)-1;return i.left=t,i.right=e,n&&Wc(i,t,e,n),r&&Wc(i,e,t,r),sf[t.index].halfedges.push(a),sf[e.index].halfedges.push(a),i}function Hc(t,e,n){var r=[e,n];return r.left=t,r}function Wc(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function $c(t,e,n,r,i){var a,o=t[0],l=t[1],u=o[0],s=o[1],c=0,f=1,h=l[0]-u,p=l[1]-s;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}if(a=n-s,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=i-s,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return!(c>0||f<1)||(c>0&&(t[0]=[u+c*h,s+c*p]),f<1&&(t[1]=[u+f*h,s+f*p]),!0)}}}}}function Yc(t,e,n,r,i){var a=t[1];if(a)return!0;var o,l,u=t[0],s=t.left,c=t.right,f=s[0],h=s[1],p=c[0],d=c[1],m=(f+p)/2,y=(h+d)/2;if(d===h){if(m<e||m>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[m,n];a=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];a=[m,n]}}else if(l=y-(o=(f-p)/(d-h))*m,o<-1||o>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-l)/o,n];a=[(i-l)/o,i]}else{if(u){if(u[1]<n)return}else u=[(i-l)/o,i];a=[(n-l)/o,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,o*e+l];a=[r,o*r+l]}else{if(u){if(u[0]<e)return}else u=[r,o*r+l];a=[e,o*e+l]}return t[0]=u,t[1]=a,!0}function Bc(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function qc(t,e){return e[+(e.left!==t.site)]}function Vc(t,e){return e[+(e.left===t.site)]}var Xc,Qc=[];function Kc(){Fc(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gc(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],l=i[1],u=r[0]-o,s=r[1]-l,c=a[0]-o,f=a[1]-l,h=2*(u*f-s*c);if(!(h>=-pf)){var p=u*u+s*s,d=c*c+f*f,m=(f*p-s*d)/h,y=(u*d-c*p)/h,v=Qc.pop()||new Kc;v.arc=t,v.site=i,v.x=m+o,v.y=(v.cy=y+l)+Math.sqrt(m*m+y*y),t.circle=v;for(var g=null,_=cf._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}cf.insert(g,v),g||(Xc=v)}}}}function Zc(t){var e=t.circle;e&&(e.P||(Xc=e.N),cf.remove(e),Qc.push(e),Fc(e),t.circle=null)}var Jc=[];function tf(){Fc(this),this.edge=this.site=this.circle=null}function ef(t){var e=Jc.pop()||new tf;return e.site=t,e}function nf(t){Zc(t),uf.remove(t),Jc.push(t),Fc(t)}function rf(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];nf(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<hf&&Math.abs(r-u.circle.cy)<hf;)a=u.P,l.unshift(u),nf(u),u=a;l.unshift(u),Zc(u);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<hf&&Math.abs(r-s.circle.cy)<hf;)o=s.N,l.push(s),nf(s),s=o;l.push(s),Zc(s);var c,f=l.length;for(c=1;c<f;++c)s=l[c],u=l[c-1],Wc(s.edge,u.site,s.site,i);u=l[0],(s=l[f-1]).edge=Dc(u.site,s.site,null,i),Gc(u),Gc(s)}function af(t){for(var e,n,r,i,a=t[0],o=t[1],l=uf._;l;)if((r=of(l,o)-a)>hf)l=l.L;else{if(!((i=a-lf(l,o))>hf)){r>-hf?(e=l.P,n=l):i>-hf?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){sf[t.index]={site:t,halfedges:[]}}(t);var u=ef(t);if(uf.insert(e,u),e||n){if(e===n)return Zc(e),n=ef(e.site),uf.insert(u,n),u.edge=n.edge=Dc(e.site,u.site),Gc(e),void Gc(n);if(n){Zc(e),Zc(n);var s=e.site,c=s[0],f=s[1],h=t[0]-c,p=t[1]-f,d=n.site,m=d[0]-c,y=d[1]-f,v=2*(h*y-p*m),g=h*h+p*p,_=m*m+y*y,b=[(y*g-p*_)/v+c,(h*_-m*g)/v+f];Wc(n.edge,s,d,b),u.edge=Dc(s,t,null,b),n.edge=Dc(t,d,null,b),Gc(e),Gc(n)}else u.edge=Dc(e.site,u.site)}}function of(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var l=(n=o.site)[0],u=n[1],s=u-e;if(!s)return l;var c=l-r,f=1/a-1/s,h=c/s;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*s)-u+s/2+i-a/2)))/f+r:(r+l)/2}function lf(t,e){var n=t.N;if(n)return of(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var uf,sf,cf,ff,hf=1e-6,pf=1e-12;function df(t,e){return e[1]-t[1]||e[0]-t[0]}function mf(t,e){var n,r,i,a=t.sort(df).pop();for(ff=[],sf=new Array(t.length),uf=new Uc,cf=new Uc;;)if(i=Xc,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(af(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;rf(i.arc)}if(function(){for(var t,e,n,r,i=0,a=sf.length;i<a;++i)if((t=sf[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),l=new Array(r);for(n=0;n<r;++n)o[n]=n,l[n]=Bc(t,ff[e[n]]);for(o.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[o[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var o=+e[0][0],l=+e[0][1],u=+e[1][0],s=+e[1][1];!function(t,e,n,r){for(var i,a=ff.length;a--;)Yc(i=ff[a],t,e,n,r)&&$c(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>hf||Math.abs(i[0][1]-i[1][1])>hf)||delete ff[a]}(o,l,u,s),function(t,e,n,r){var i,a,o,l,u,s,c,f,h,p,d,m,y=sf.length,v=!0;for(i=0;i<y;++i)if(a=sf[i]){for(o=a.site,l=(u=a.halfedges).length;l--;)ff[u[l]]||u.splice(l,1);for(l=0,s=u.length;l<s;)d=(p=Vc(a,ff[u[l]]))[0],m=p[1],f=(c=qc(a,ff[u[++l%s]]))[0],h=c[1],(Math.abs(d-f)>hf||Math.abs(m-h)>hf)&&(u.splice(l,0,ff.push(Hc(o,p,Math.abs(d-t)<hf&&r-m>hf?[t,Math.abs(f-t)<hf?h:r]:Math.abs(m-r)<hf&&n-d>hf?[Math.abs(h-r)<hf?f:n,r]:Math.abs(d-n)<hf&&m-e>hf?[n,Math.abs(f-n)<hf?h:e]:Math.abs(m-e)<hf&&d-t>hf?[Math.abs(h-e)<hf?f:t,e]:null))-1),++s);s&&(v=!1)}if(v){var g,_,b,w=1/0;for(i=0,v=null;i<y;++i)(a=sf[i])&&(b=(g=(o=a.site)[0]-t)*g+(_=o[1]-e)*_)<w&&(w=b,v=a);if(v){var x=[t,e],k=[t,r],E=[n,r],T=[n,e];v.halfedges.push(ff.push(Hc(o=v.site,x,k))-1,ff.push(Hc(o,k,E))-1,ff.push(Hc(o,E,T))-1,ff.push(Hc(o,T,x))-1)}}for(i=0;i<y;++i)(a=sf[i])&&(a.halfedges.length||delete sf[i])}(o,l,u,s)}this.edges=ff,this.cells=sf,uf=cf=ff=sf=null}mf.prototype={constructor:mf,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return qc(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,l,u,s,c=n.site,f=-1,h=e[i[a-1]],p=h.left===c?h.right:h.left;++f<a;)o=p,p=(h=e[i[f]]).left===c?h.right:h.left,o&&p&&r<o.index&&r<p.index&&(u=o,s=p,((l=c)[0]-s[0])*(u[1]-l[1])-(l[0]-u[0])*(s[1]-l[1])<0)&&t.push([c.data,o.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,l=a.cells.length;!(i=a.cells[o]);)if(++o>=l)return null;var u=t-i.site[0],s=e-i.site[1],c=u*u+s*s;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var u=t-l[0],s=e-l[1],f=u*u+s*s;f<c&&(c=f,o=l.index)}}))}while(null!==o);return a._found=r,null==n||c<=n*n?i.site:null}};function yf(t,e,n){this.k=t,this.x=e,this.y=n}yf.prototype={constructor:yf,scale:function(t){return 1===t?this:new yf(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new yf(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new yf(1,0,0);yf.prototype;function vf(t,e,n,r,i){const a=t.length;let o=0,l=0;for(let u=0;u<a;u++){const s=t[u],c=e(s),f=n(s),h=i(c);o+=Math.pow(f-h,2),l+=Math.pow(f-r/a,2)}return 1-o/l}function gf(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function _f(t,e,n){const r=.01;let i=[o(t),o(e)],a=0;for(;l(i)&&a<1e4;);return i;function o(t){return[t,n(t)]}function l(t){a++;const e=t.length;let n=!1;for(let a=0;a<e-1;a++){const e=t[a],l=t[a+1],u=[((i=[e,l])[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2],s=o(u[0]),c=gf([e,u]),f=gf([e,s]);Math.abs(c-f)>r&&(t.splice(a+1,0,s),n=!0)}var i;return n}}var bf=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=t?+t[0]:1/0,f=t?+t[1]:-1/0;for(let h=0;h<i;h++){const i=r[h],p=e(i,h,r),d=n(i,h,r);null!=p&&isFinite(p)&&null!=d&&isFinite(d)&&(a++,o+=p,l+=d,u+=p*d,s+=p*p,t||(p<c&&(c=p),p>f&&(f=p)))}const h=((i=a)*u-o*l)/(i*s-o*o),p=(l-h*o)/i,d=t=>h*t+p,m=vf(r,e,n,l,d),y=[[c,c*h+p],[f,f*h+p]];return y.a=h,y.b=p,y.predict=d,y.rSquared=m,y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r};var wf=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;for(let p=0;p<i;p++){const i=r[p],d=e(i,p,r),m=n(i,p,r);null!=d&&isFinite(d)&&null!=m&&isFinite(m)&&(a++,o+=Math.log(d),l+=Math.log(m)*Math.log(d),u+=Math.log(m),s+=Math.pow(Math.log(d),2),c+=m,t||(d<f&&(f=d),d>h&&(h=d)))}const p=((i=a)*l-o*u)/(i*s-Math.pow(o,2)),d=Math.exp((u-p*o)/i),m=t=>d*Math.pow(t,p),y=_f(f,h,m);return y.a=d,y.b=p,y.predict=m,y.rSquared=vf(r,e,n,c,m),y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r};var xf=function(t){return t};function kf(t,...e){return Ef(t,xf,xf,e)}function Ef(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new Map,l=r[a++];let u=-1;for(const t of i){const e=l(t,++u,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}var Tf=function(t,e){switch(t){case If.LINEAR:return"y = ".concat(e.a.toFixed(2)," x + ").concat(e.b.toFixed(2));case If.POWER_LAW:default:return"y = ".concat(e.a.toFixed(2)," x ^ ").concat(e.b.toFixed(2))}},Sf=function(t,e,n){return function(){var t=ol,e=!1,n=1,r=1,i=[0],a=Zo,o=Zo,l=Zo,u=Zo,s=Zo;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(tl),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<c&&(c=h=(c+h)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=s(e)-n,c+=o(e)-n,(f-=l(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<c&&(c=h=(c+h)/2),t(e,r,c,f,h))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=Go(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Jo(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Jo(+t),c):o},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:Jo(+t),c):l},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Jo(+t),c):u},c.paddingLeft=function(t){return arguments.length?(s="function"==typeof t?t:Jo(+t),c):s},c}().tile(ol).size([e,n]).padding(1).round(!0)(qo(t).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})))},Cf=Ta(",d"),Mf=function(t){t.append("text").selectAll("tspan").data((function(t){return t.data.name.concat(Cf(t.value))})).join("tspan").attr("x",3).attr("y",(function(t,e,n){return"".concat(.3*(e===n.length-1)+1.1+.9*e,"em")})).attr("fill-opacity",(function(t,e,n){return e===n.length-1?.7:null})).text((function(t){return t}))},Nf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.displayFilenames,s=t.path,c=t.activeFile,f=Object(r.useRef)(null);return Object(r.useEffect)((function(){!function(t,e){var n=e.values,r=e.displayRegression,i=void 0===r||r,a=e.regressionType,o=void 0===a?0:a,l=(e.metricType,e.displayFilenames),u=void 0!==l&&l,s=e.filePrefix,c=void 0===s?"":s,f=e.path,h=void 0===f?"":f,p=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var d=600,m=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(c).concat(h))}));var y={top:20,right:30,bottom:30,left:40},v=Kl().domain(W(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["green","red"]),g=Kl().domain(W(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["lightgreen","tomato"]),_=Hl().domain(W(n,(function(t){return t.x}))).nice().range([y.left,d-y.right]),b=Hl().domain(W(n,(function(t){return t.y}))).nice().range([m-y.bottom,y.top]),w=function(t){return t.attr("transform","translate(0,".concat(m-y.bottom,")")).call(pt(_)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("x",d/2+y.left).attr("y",30).attr("fill","#000").attr("font-size",12).attr("font-weight","bold").attr("text-anchor","end").text("Churn")}))},x=function(t){return t.attr("transform","translate(".concat(y.left,",0)")).call(dt(b)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("y",-30).attr("x",-m/2).attr("transform","rotate(-90)").attr("fill","#000").attr("font-size",12).attr("text-anchor","start").attr("font-weight","bold").text("Complexity")}))},k=ac().x((function(t){return _(t[0])})).y((function(t){return b(t[1])})),E=Le(t).append("svg").attr("viewBox",[0,0,d,m]),T=E.append("g");if(T.append("g").attr("class","axis").call(w).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),T.append("g").attr("class","axis").call(x).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),T.append("g").attr("stroke-width",1.5).attr("font-family","Red Hat Text").attr("font-size",12).selectAll("g").data(n).join("g").attr("transform",(function(t){return"translate(".concat(_(t.x),",").concat(b(t.y),")")})).call((function(t){return t.append("circle").attr("fill",(function(t){return g(t.x*t.y)})).attr("stroke",(function(t){return v(t.x*t.y)})).attr("style","cursor:pointer").attr("r",4)})).call((function(t){return u?t.append("text").attr("dy","0.35em").attr("x",7).attr("style","cursor:pointer").text((function(t){return t.file_path})):null})).on("click",(function(t){p(t)})),i){var S=function(t){switch(t){case If.LINEAR:return bf().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,J(n,(function(t){return t.x}))]);case If.POWER_LAW:default:return n=n.filter((function(t){return t.y>0})),wf().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,J(n,(function(t){return t.x}))])}}(o),C=S(n);T.append("g").attr("font-family","Red Hat Text").attr("font-size",24).call((function(t){return t.append("path").attr("class","regression").datum(S(n)).attr("d",k)})).call((function(t){return t.append("text").attr("dy","60").attr("dx","33%").text("R^2 = ".concat(C.rSquared.toFixed(2)))})).call((function(t){return t.append("text").attr("dy","30").attr("dx","33%").text(Tf(o,C))}))}}(f.current,{values:n,displayRegression:o,regressionType:l,displayFilenames:u,filePrefix:a,path:s,activeFile:c},e)})),i.a.createElement("div",{id:"canvas",ref:f})},Pf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,s=t.metricType,c=t.displayFilenames,f=t.path,h=t.activeFile,p=Object(r.useRef)(null);return Object(r.useEffect)((function(){!function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=e.displayFilenames,o=void 0!==a&&a,l=e.filePrefix,s=void 0===l?"":l,c=e.path,f=void 0===c?"":c,h=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var p=600,d=600,m=Cl(Ks),y=(n=n.filter((function(t){return t.file_path.startsWith("".concat(s).concat(f))}))).map((function(t){var e;switch(i){case Uf.COMPLEXITY:e=t.y;break;case Uf.CHURN:e=t.x;break;case Uf.CHURN_COMPLEXITY:default:e=t.y*t.x}return{name:t.file_path.substring(s.length+1),value:e,file_path:t.file_path,details:t.details,history:t.history}})).map((function(t){return{name:t.name.split("/"),value:t.value,file_path:t.file_path,details:t.details,history:t.history}})),v={name:s,children:Array.from(kf(y,(function(t){return t.name[0]})),(function(t){var e=u()(t,2),n=e[0],r=e[1];return{name:n,children:Array.from(kf(r,(function(t){return t.name[1]})),(function(t){var e=u()(t,2);return{name:e[0],children:e[1]}}))}}))},g=Le(t).append("svg").attr("viewBox",[0,0,p,d]).style("font-size","10px");if(v.children.length>0){var _=Sf(v,p,d),b=g.selectAll("g").data(_.leaves()).join("g").attr("transform",(function(t){return"translate(".concat(t.x0,",").concat(t.y0,")")}));b.append("title").text((function(t){return"".concat(t.ancestors().reverse().map((function(t){return t.data.name})).join("/"),"\n").concat(Cf(t.value))})),b.append("rect").attr("fill",(function(t){for(;t.depth>1;)t=t.parent;return m(t.data.name)})).attr("fill-opacity",.6).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).on("click",(function(t){h(t.data)})),o&&Mf(b)}}(p.current,{values:n,displayRegression:o,regressionType:l,metricType:s,displayFilenames:c,filePrefix:a,path:f,activeFile:h},e)})),i.a.createElement("div",{id:"canvas",ref:p})},Of=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.metricType,s=t.displayFilenames,c=t.path,f=t.activeFile,h=Object(r.useRef)(null);return Object(r.useEffect)((function(){!function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=(e.displayFilenames,e.filePrefix),o=void 0===a?"":a,l=e.path,u=void 0===l?"":l;e.activeFile,arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.innerHTML="";var s=600,c=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(o).concat(u))}));var f={top:20,right:30,bottom:30,left:40},h=Le(t).append("svg").attr("viewBox",[0,0,s,c]).style("font-size","10px"),p=n.map((function(t){return i===Uf.COMPLEXITY?t.y:t.x})),d=Hl().domain(W(p)).range(["green","red"]),m=Hl().domain(W(p)).nice(20).range([f.left,s-f.right]),y=Z().domain(m.domain()).thresholds(m.ticks(20))(p),v=Hl().domain([0,J(y,(function(t){return t.length}))]).nice().range([c-f.bottom,f.top]),g=function(t){return t.attr("transform","translate(0,".concat(c-f.bottom,")")).call(pt(m).tickSizeOuter(0))},_=function(t){return t.attr("transform","translate(".concat(f.left,",0)")).call(dt(v))};h.append("g").selectAll("rect").data(y).join("rect").attr("fill",(function(t){return d(t.x0)})).attr("x",(function(t){return m(t.x0)+1})).attr("width",(function(t){return Math.max(0,m(t.x1)-m(t.x0)-1)})).attr("y",(function(t){return v(t.length)})).attr("height",(function(t){return v(0)-v(t.length)})),h.append("g").call(g),h.append("g").call(_)}(h.current,{values:n,displayRegression:o,regressionType:l,metricType:u,displayFilenames:s,filePrefix:a,path:c,activeFile:f},e)})),i.a.createElement("div",{id:"canvas",ref:h})},Af=n(41),Lf=n.n(Af);function Rf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ff(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Rf(n,!0).forEach((function(e){Lf()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rf(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var zf=function(t,e){var n=t;switch(e.type){case"SET_DISPLAY_REGRESSION":n=Ff({},t,{displayRegression:e.displayRegression});break;case"SET_DISPLAY_FILENAMES":n=Ff({},t,{displayFilenames:e.displayFilenames});break;case"SET_REGRESSION_TYPE":n=Ff({},t,{regressionType:e.regressionType});break;case"SET_METRIC_TYPE":n=Ff({},t,{metricType:e.metricType});break;case"SET_VALUES":n=Ff({},t,{values:e.values});break;case"SET_FILE_PREFIX":n=Ff({},t,{filePrefix:e.filePrefix});break;case"SET_PATH":n=Ff({},t,{path:e.path});break;case"SET_ACTIVE_FILE":n=Ff({},t,{activeFile:e.activeFile})}return n},If={POWER_LAW:0,LINEAR:1},jf={SCATTER_PLOT:0,TREE_MAP:1},Uf={CHURN_COMPLEXITY:0,COMPLEXITY:1,CHURN:2},Df={displayRegression:!1,displayFilenames:!1,regressionType:If.POWER_LAW,metricType:Uf.CHURN_COMPLEXITY,values:[],filePrefix:"",path:"",activeFile:{}},Hf=function(t){var e=t.type,n=t.finishedLoadingCallback,a=(t.errorCallback,Object(r.useReducer)(zf,Df)),o=u()(a,2),l=o[0],s=o[1],f=Object(r.useState)(0),p=u()(f,2),d=p[0],m=p[1],y=Object(r.useState)(!1),v=u()(y,2),g=v[0],_=v[1],b=function(){var t=h()(c.a.mark((function t(){var n;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.values){t.next=4;break}n=new Promise((function(t,e){return t(window.values)})),t.next=9;break;case 4:return t.next=6,fetch("values?type=".concat(e));case 6:return t.next=8,t.sent.json();case 8:n=t.sent;case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),w=function(){var t=h()(c.a.mark((function t(){var e;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!window.filePrefix){t.next=4;break}e=new Promise((function(t,e){return t(window.filePrefix)})),t.next=9;break;case 4:return t.next=6,fetch("file_prefix");case 6:return t.next=8,t.sent.json();case 8:e=t.sent;case 9:return t.abrupt("return",e);case 10:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function x(t){s({type:"SET_ACTIVE_FILE",activeFile:t})}Object(r.useEffect)((function(){h()(c.a.mark((function t(){var e,r,i,a;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([b(),w()]);case 2:e=t.sent,r=u()(e,2),i=r[0],a=r[1],void 0===i.error?(_(!1),s({type:"SET_VALUES",values:i}),a.file_prefix&&s({type:"SET_FILE_PREFIX",filePrefix:a.file_prefix})):_(!0),n();case 8:case"end":return t.stop()}}),t)})))()}),[e]);return i.a.createElement("div",{className:"row pt-4"},i.a.createElement("div",{className:l.activeFile&&0!==Object.keys(l.activeFile).length?"col-8":"col-12"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},"Churn vs Complexity"),i.a.createElement("h6",{className:"text-muted"},"Click on a point for additional information")),i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:"col-12 col-lg-4"},i.a.createElement("div",{id:"path-input-group"},i.a.createElement("label",{htmlFor:"path",className:"text-muted"},i.a.createElement("small",null,"Base Path")),i.a.createElement("div",{className:"input-group mb-3"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("span",{className:"input-group-text",id:"path-text"},"./".concat(l.filePrefix||""))),i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"path-text",id:"path",value:l.path,onChange:function(t){t.preventDefault(),s({type:"SET_PATH",path:t.target.value})}})))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("label",{htmlFor:"path",className:"text-muted d-block"},i.a.createElement("small",null,"Plot Type")),i.a.createElement("div",{className:"btn-group btn-group-toggle",role:"toolbar","aria-label":"Plot Type"},i.a.createElement("button",{className:"btn btn-secondary ".concat(d===jf.SCATTER_PLOT&&"active"),onClick:function(t){t.preventDefault(),m(jf.SCATTER_PLOT)}},"Scatterplot/Hist"),i.a.createElement("button",{className:"btn btn-secondary ".concat(d===jf.TREE_MAP&&"active"),onClick:function(t){t.preventDefault(),m(jf.TREE_MAP)}},"Treemap"))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("div",{className:"form-group"},i.a.createElement("label",{htmlFor:"metric-type",className:"text-muted"},i.a.createElement("small",null,"Metric")),i.a.createElement("select",{id:"metric-type",className:"form-control",onChange:function(t){t.preventDefault(),s({type:"SET_METRIC_TYPE",metricType:parseInt(t.target.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Churn * Complexity"),i.a.createElement("option",{value:"1"},"Complexity"),i.a.createElement("option",{value:"2"},"Churn"))))),i.a.createElement("div",{className:"d-flex ".concat(g?"justify-content-center align-items-center":"justify-content-start"),id:"canvas-wrapper"},g?i.a.createElement("div",{className:"text-center error"},i.a.createElement(T,{icon:M,size:"6x"}),i.a.createElement("h3",null,"Oh snap!"),"There has been an error loading the churn count."):i.a.createElement(i.a.Fragment,null,d===jf.SCATTER_PLOT?l.metricType===Uf.CHURN_COMPLEXITY?i.a.createElement(Nf,R()({fileClickCallback:x},l)):i.a.createElement(Of,R()({fileClickCallback:x},l)):i.a.createElement(Pf,R()({fileClickCallback:x},l)))),i.a.createElement(z,{state:l,dispatch:s,activePlot:d})))),l.activeFile&&Object.keys(l.activeFile).length>0&&i.a.createElement(F,{activeFile:l.activeFile,handleClose:function(){s({type:"SET_ACTIVE_FILE",activeFile:{}})}}))},Wf=n(42),$f=n.n(Wf);var Yf=function(){return(Yf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};var Bf,qf=function(){var t=Object(r.useState)(0)[1];return Object(r.useCallback)((function(){return t((function(t){return t+1}))}),[])},Vf=function(t){void 0===t&&(t={});var e=qf(),n=Object(r.useRef)(Yf({},t));return[Object(r.useCallback)((function(){return n.current}),[]),Object(r.useCallback)((function(t){t&&(Object.assign(n.current,t),e())}),[])]},Xf=function(t){Object(r.useEffect)(t,[])},Qf=function(t,e){var n=Object(r.useRef)(!0);Object(r.useEffect)((function(){if(!n.current)return t();n.current=!1}),e)},Kf=(n(43),function(t,e,n){return t=(t=t<=n?t:n)>=e?t:e}),Gf=!1,Zf=[],Jf=function(t){Zf.push(t),Gf||1!==Zf.length||function t(){Gf=!0;var e=Zf.shift();if(e)return e(t);Gf=!1}()},th=function(t,e){var n;Bf=window.requestAnimationFrame((function r(i){i-(n=n||i)>e?t():Bf=window.requestAnimationFrame(r)}))},eh=function(){},nh={isFinished:!1,progress:0,sideEffect:eh},rh=function(){Bf&&window.cancelAnimationFrame(Bf),Gf=!1,Zf=[]},ih=function(t){var e=void 0===t?{}:t,n=e.animationDuration,i=void 0===n?200:n,a=e.incrementDuration,o=void 0===a?800:a,l=e.isAnimating,u=void 0!==l&&l,s=e.minimum,c=void 0===s?.08:s,f=Vf(nh),h=f[0],p=f[1],d=function(t){if(1===(t=Kf(t,c,1)))return rh(),Jf((function(e){p({progress:t,sideEffect:function(){return th(e,i)}})})),void Jf((function(){p({isFinished:!0,sideEffect:rh})}));Jf((function(e){p({progress:t,sideEffect:function(){return th(e,i)}})}))},m=function(){var t,e;d((t=h().progress,e=0,t>=0&&t<.2?e=.1:t>=.2&&t<.5?e=.04:t>=.5&&t<.8?e=.02:t>=.8&&t<.99&&(e=.005),Kf(t+e,0,.994)))},y=function(){!function t(){m(),Jf((function(e){th((function(){t(),e()}),o)}))}()},v=Object(r.useRef)(eh);return Object(r.useEffect)((function(){v.current=m})),Xf((function(){return u&&y(),rh})),Qf((function(){h().sideEffect()}),[h().sideEffect]),Qf((function(){u?p({sideEffect:y}):d(1)}),[u]),{animationDuration:i,isFinished:h().isFinished,progress:h().progress}},ah=function(t){var e=t.children,n=$f()(t,["children"]);return e(ih(n))};var oh=function(t){var e=t.progress,n=t.animationDuration;return r.createElement("div",{className:"progressbar",style:{marginLeft:"".concat(100*(-1+e),"%"),transition:"margin-left ".concat(n,"ms linear")}},r.createElement("div",{className:"shadow"}))};oh.propTypes={animationDuration:m.a.number.isRequired,progress:m.a.number.isRequired};var lh=oh,uh=function(t){var e=t.children,n=t.isFinished,i=t.animationDuration;return r.createElement("div",{style:{opacity:n?0:1,pointerEvents:"none",transition:"opacity ".concat(i,"ms linear")}},e)};uh.propTypes={animationDuration:m.a.number.isRequired,children:m.a.node.isRequired,isFinished:m.a.bool.isRequired};var sh=uh,ch=function(t){var e=t.isAnimating,n=t.key;return i.a.createElement(ah,{isAnimating:e,key:n},(function(t){var e=t.animationDuration,n=t.isFinished,r=t.progress;return i.a.createElement(sh,{isFinished:n,animationDuration:e},i.a.createElement(lh,{progress:r,animationDuration:e}))}))};function fh(){var t=Object(r.useState)(window.type||"rb"),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)(!0),l=u()(o,2),s=l[0],c=l[1];return i.a.createElement(i.a.Fragment,null,i.a.createElement(ch,{isAnimating:s,key:n}),i.a.createElement("nav",{className:"navbar navbar-expand-lg navbar-light bg-light fixed-top"},i.a.createElement("a",{className:"navbar-brand",href:"#"},i.a.createElement("img",{src:"images/attractor_logo.svg",alt:"",width:"36",className:"mr-3"}),"Attractor"),i.a.createElement("ul",{className:"navbar-nav mx-auto"},Object.entries(window.types).map((function(t){var e=u()(t,2),r=e[0],o=e[1];return i.a.createElement("li",{className:"nav-item ".concat(n===r?"active":"")},i.a.createElement("a",{className:"nav-link",href:window.serveStatic?"index.".concat(r,".html"):"#",onClick:function(){window.serveStatic||(c(!0),a(r))}},o))})))),i.a.createElement("div",{className:"container"},i.a.createElement(Hf,{type:n,finishedLoadingCallback:function(){c(!1)}}),i.a.createElement("div",{className:"row mt-3"},i.a.createElement("div",{className:"col-12"},i.a.createElement(A,{type:n})))))}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("react-root")&&o.a.render(i.a.createElement(fh,null),document.getElementById("react-root"))}))}]); \ No newline at end of file