!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SvgPie=t()}}(function(){return function t(n,e,i){function r(a,u){if(!e[a]){if(!n[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var f=e[a]={exports:{}};n[a][0].call(f.exports,function(t){var e=n[a][1][t];return r(e||t)},f,f.exports,t,n,e,i)}return e[a].exports}for(var o="function"==typeof require&&require,a=0;a=0?(o>=x?10:o>=w?5:o>=M?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=x?10:o>=w?5:o>=M?2:1)}function r(t,n,e){var i=Math.abs(n-t)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=x?r*=10:o>=w?r*=5:o>=M&&(r*=2),nn?1:t>=n?0:NaN},u=function(t){return 1===t.length&&(t=n(t)),{left:function(n,e,i,r){for(null==i&&(i=0),null==r&&(r=n.length);i>>1;t(n[o],e)<0?i=o+1:r=o}return i},right:function(n,e,i,r){for(null==i&&(i=0),null==r&&(r=n.length);i>>1;t(n[o],e)>0?r=o:i=o+1}return i}}},c=u(a),s=c.right,f=c.left,l=function(t){return null===t?NaN:+t},h=function(t,n){var e,i,r=t.length,o=0,a=-1,u=0,c=0;if(null==n)for(;++a1)return c/(o-1)},d=function(t,n){var e=h(t,n);return e?Math.sqrt(e):e},p=function(t,n){var e,i,r,o=t.length,a=-1;if(null==n){for(;++a=e)for(i=r=e;++ae&&(i=e),r=e)for(i=r=e;++ae&&(i=e),r=1)return+e(t[i-1],i-1,t);var i,r=(i-1)*n,o=Math.floor(r),a=+e(t[o],o,t);return a+(+e(t[o+1],o+1,t)-a)*(r-o)}},N=function(t,n){var e,i,r=t.length,o=-1;if(null==n){for(;++o=e)for(i=e;++oe&&(i=e)}else for(;++o=e)for(i=e;++oe&&(i=e);return i},S=function(t){if(!(r=t.length))return[];for(var n=-1,e=N(t,o),i=new Array(e);++nt?1:n>=t?0:NaN},t.deviation=d,t.extent=p,t.histogram=function(){function t(t){var o,a,u=t.length,c=new Array(u);for(o=0;oh;)d.pop(),--p;var _,y=new Array(p+1);for(o=0;o<=p;++o)(_=y[o]=[]).x0=o>0?d[o-1]:l,_.x1=o=e)for(i=e;++oi&&(i=e)}else for(;++o=e)for(i=e;++oi&&(i=e);return i},t.mean=function(t,n){var e,i=t.length,r=i,o=-1,a=0;if(null==n)for(;++o=0;)for(n=(i=t[r]).length;--n>=0;)e[--a]=i[n];return e},t.min=N,t.pairs=function(t,n){null==n&&(n=e);for(var i=0,r=t.length-1,o=t[0],a=new Array(r<0?0:r);i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),a=new Array(o=Math.ceil(n-t+1));++c=f.length)return null!=u&&n.sort(u),null!=c?c(n):n;for(var a,s,l,h=-1,d=n.length,p=f[i++],_=e(),y=r();++hf.length)return t;var i,r=l[e-1];return null!=c&&e>=f.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:n(t,e)})})),null!=r?i.sort(function(t,n){return r(t.key,n.key)}):i}var u,c,s,f=[],l=[];return s={object:function(n){return t(n,0,i,r)},map:function(n){return t(n,0,o,a)},entries:function(e){return n(t(e,0,o,a),0)},key:function(t){return f.push(t),s},sortKeys:function(t){return l[f.length-1]=t,s},sortValues:function(t){return u=t,s},rollup:function(t){return c=t,s}}},t.set=c,t.map=e,t.keys=function(t){var n=[];for(var e in t)n.push(e);return n},t.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},t.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},Object.defineProperty(t,"__esModule",{value:!0})})},{}],3:[function(t,n,e){!function(t,i){i("object"==typeof e&&void 0!==n?e:t.d3=t.d3||{})}(this,function(t){"use strict";function n(t,n){var e=Object.create(t.prototype);for(var i in n)e[i]=n[i];return e}function e(){}function i(t){var n;return t=(t+"").trim().toLowerCase(),(n=O.exec(t))?(n=parseInt(n[1],16),new c(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=D.exec(t))?r(parseInt(n[1],16)):(n=P.exec(t))?new c(n[1],n[2],n[3],1):(n=U.exec(t))?new c(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Y.exec(t))?o(n[1],n[2],n[3],n[4]):(n=F.exec(t))?o(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=I.exec(t))?s(n[1],n[2]/100,n[3]/100,1):(n=L.exec(t))?s(n[1],n[2]/100,n[3]/100,n[4]):j.hasOwnProperty(t)?r(j[t]):"transparent"===t?new c(NaN,NaN,NaN,0):null}function r(t){return new c(t>>16&255,t>>8&255,255&t,1)}function o(t,n,e,i){return i<=0&&(t=n=e=NaN),new c(t,n,e,i)}function a(t){return t instanceof e||(t=i(t)),t?(t=t.rgb(),new c(t.r,t.g,t.b,t.opacity)):new c}function u(t,n,e,i){return 1===arguments.length?a(t):new c(t,n,e,null==i?1:i)}function c(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function s(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new h(t,n,e,i)}function f(t){if(t instanceof h)return new h(t.h,t.s,t.l,t.opacity);if(t instanceof e||(t=i(t)),!t)return new h;if(t instanceof h)return t;var n=(t=t.rgb()).r/255,r=t.g/255,o=t.b/255,a=Math.min(n,r,o),u=Math.max(n,r,o),c=NaN,s=u-a,f=(u+a)/2;return s?(c=n===u?(r-o)/s+6*(r0&&f<1?0:c,new h(c,s,f,t.opacity)}function l(t,n,e,i){return 1===arguments.length?f(t):new h(t,n,e,null==i?1:i)}function h(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function d(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function p(t){if(t instanceof y)return new y(t.l,t.a,t.b,t.opacity);if(t instanceof M){var n=t.h*q;return new y(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof c||(t=a(t));var e=m(t.r),i=m(t.g),r=m(t.b),o=g((.4124564*e+.3575761*i+.1804375*r)/H),u=g((.2126729*e+.7151522*i+.072175*r)/z);return new y(116*u-16,500*(o-u),200*(u-g((.0193339*e+.119192*i+.9503041*r)/X)),t.opacity)}function _(t,n,e,i){return 1===arguments.length?p(t):new y(t,n,e,null==i?1:i)}function y(t,n,e,i){this.l=+t,this.a=+n,this.b=+e,this.opacity=+i}function g(t){return t>W?Math.pow(t,1/3):t/V+B}function v(t){return t>$?t*t*t:V*(t-B)}function b(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function m(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function x(t){if(t instanceof M)return new M(t.h,t.c,t.l,t.opacity);t instanceof y||(t=p(t));var n=Math.atan2(t.b,t.a)*R;return new M(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function w(t,n,e,i){return 1===arguments.length?x(t):new M(t,n,e,null==i?1:i)}function M(t,n,e,i){this.h=+t,this.c=+n,this.l=+e,this.opacity=+i}function T(t){if(t instanceof N)return new N(t.h,t.s,t.l,t.opacity);t instanceof c||(t=a(t));var n=t.r/255,e=t.g/255,i=t.b/255,r=(et*i+tt*n-nt*e)/(et+tt-nt),o=i-r,u=(K*(e-r)-J*o)/G,s=Math.sqrt(u*u+o*o)/(K*r*(1-r)),f=s?Math.atan2(u,o)*R-120:NaN;return new N(f<0?f+360:f,s,r,t.opacity)}function k(t,n,e,i){return 1===arguments.length?T(t):new N(t,n,e,null==i?1:i)}function N(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}var S=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},A="\\s*([+-]?\\d+)\\s*",C="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",E="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O=/^#([0-9a-f]{3})$/,D=/^#([0-9a-f]{6})$/,P=new RegExp("^rgb\\("+[A,A,A]+"\\)$"),U=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),Y=new RegExp("^rgba\\("+[A,A,A,C]+"\\)$"),F=new RegExp("^rgba\\("+[E,E,E,C]+"\\)$"),I=new RegExp("^hsl\\("+[C,E,E]+"\\)$"),L=new RegExp("^hsla\\("+[C,E,E,C]+"\\)$"),j={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};S(e,i,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),S(c,u,n(e,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new c(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){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+")")}})),S(h,l,n(e,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new h(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new h(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new c(d(t>=240?t-240:t+120,r,i),d(t,r,i),d(t<120?t+240:t-120,r,i),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}}));var q=Math.PI/180,R=180/Math.PI,H=.95047,z=1,X=1.08883,B=4/29,$=6/29,V=3*$*$,W=$*$*$;S(y,_,n(e,{brighter:function(t){return new y(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new y(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=z*v(t),n=H*v(n),e=X*v(e),new c(b(3.2404542*n-1.5371385*t-.4985314*e),b(-.969266*n+1.8760108*t+.041556*e),b(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),S(M,w,n(e,{brighter:function(t){return new M(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new M(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return p(this).rgb()}}));var Z=-.14861,Q=1.78277,J=-.29227,G=-.90649,K=1.97294,tt=K*G,nt=K*Q,et=Q*J-G*Z;S(N,k,n(e,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new N(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new N(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*q,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(t),r=Math.sin(t);return new c(255*(n+e*(Z*i+Q*r)),255*(n+e*(J*i+G*r)),255*(n+e*(K*i)),this.opacity)}})),t.color=i,t.rgb=u,t.hsl=l,t.lab=_,t.hcl=w,t.cubehelix=k,Object.defineProperty(t,"__esModule",{value:!0})})},{}],4:[function(t,n,e){!function(t,i){i("object"==typeof e&&void 0!==n?e:t.d3=t.d3||{})}(this,function(t){"use strict";function n(){for(var t,n=0,i=arguments.length,r={};n=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function r(t,n){for(var e,i=0,r=t.length;i0)for(var e,i,r=new Array(e),o=0;o",r=n[3]||"-",o=n[4]||"",a=!!n[5],u=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),h=n[9]||"";"n"===h?(c=!0,h="g"):f[h]||(h=""),(a||"0"===e&&"="===i)&&(a=!0,e="0",i="="),this.fill=e,this.align=i,this.sign=r,this.symbol=o,this.zero=a,this.width=u,this.comma=c,this.precision=s,this.type=h}function i(n){return h=_(n),t.format=h.format,t.formatPrefix=h.formatPrefix,h}var r,o=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,i=t.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+t.slice(e+1)]},a=function(t){return(t=o(Math.abs(t)))?t[1]:NaN},u=function(t,n){return function(e,i){for(var r=e.length,o=[],a=0,u=t[0],c=0;r>0&&u>0&&(c+u+1>i&&(u=Math.max(1,i-c)),o.push(e.substring(r-=u,r+u)),!((c+=u+1)>i));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}},c=function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}},s=function(t,n){var e=o(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},f={"":function(t,n){t:for(var e,i=(t=t.toPrecision(n)).length,r=1,o=-1;r0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},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,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return s(100*t,n)},r:s,s:function(t,n){var e=o(t,n);if(!e)return t+"";var i=e[0],a=e[1],u=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,c=i.length;return u===c?i:u>c?i+new Array(u-c+1).join("0"):u>0?i.slice(0,u)+"."+i.slice(u):"0."+new Array(1-u).join("0")+o(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},l=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;n.prototype=e.prototype,e.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var h,d=function(t){return t},p=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"],_=function(t){function e(t){function e(t){var n,e,o,f=m,h=x;if("c"===b)h=w(t)+h,t="";else{var d=(t=+t)<0;if(t=w(Math.abs(t),v),d&&0==+t&&(d=!1),f=(d?"("===c?c:"-":"-"===c||"("===c?"":c)+f,h=h+("s"===b?p[8+r/3]:"")+(d&&"("===c?")":""),M)for(n=-1,e=t.length;++n(o=t.charCodeAt(n))||o>57){h=(46===o?s+t.slice(n+1):t.slice(n))+h,t=t.slice(0,n);break}}g&&!_&&(t=i(t,1/0));var T=f.length+t.length+h.length,k=T>1)+f+t+h+k.slice(T);break;default:t=k+f+t+h}return l(t)}var a=(t=n(t)).fill,u=t.align,c=t.sign,d=t.symbol,_=t.zero,y=t.width,g=t.comma,v=t.precision,b=t.type,m="$"===d?o[0]:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o[1]:/[%p]/.test(b)?h:"",w=f[b],M=!b||/[defgprs%]/.test(b);return v=null==v?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),e.toString=function(){return t+""},e}var i=t.grouping&&t.thousands?u(t.grouping,t.thousands):d,o=t.currency,s=t.decimal,l=t.numerals?c(t.numerals):d,h=t.percent||"%";return{format:e,formatPrefix:function(t,i){var r=e((t=n(t),t.type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor(a(i)/3))),u=Math.pow(10,-o),c=p[8+o/3];return function(t){return r(u*t)+c}}}};i({decimal:".",thousands:",",grouping:[3],currency:["$",""]});t.formatDefaultLocale=i,t.formatLocale=_,t.formatSpecifier=n,t.precisionFixed=function(t){return Math.max(0,-a(Math.abs(t)))},t.precisionPrefix=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(a(n)/3)))-a(Math.abs(t)))},t.precisionRound=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,a(n)-a(t))+1},Object.defineProperty(t,"__esModule",{value:!0})})},{}],7:[function(t,n,e){!function(i,r){"object"==typeof e&&void 0!==n?r(e,t("d3-color")):r(i.d3=i.d3||{},i.d3)}(this,function(t,n){"use strict";function e(t,n,e,i,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*i+a*r)/6}function i(t,n){return function(e){return t+e*n}}function r(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}function o(t,n){var e=n-t;return e?i(t,e>180||e<-180?e-360*Math.round(e/360):e):T(isNaN(t)?n:t)}function a(t){return 1==(t=+t)?u:function(n,e){return e-n?r(n,e,t):T(isNaN(n)?e:n)}}function u(t,n){var e=n-t;return e?i(t,e):T(isNaN(t)?n:t)}function c(t){return function(e){var i,r,o=e.length,a=new Array(o),u=new Array(o),c=new Array(o);for(i=0;i180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(r(e)+"rotate(",null,i)-2,x:E(t,n)})):n&&e.push(r(e)+"rotate("+n+i)}function u(t,n,e,o){t!==n?o.push({i:e.push(r(e)+"skewX(",null,i)-2,x:E(t,n)}):n&&e.push(r(e)+"skewX("+n+i)}function c(t,n,e,i,o,a){if(t!==e||n!==i){var u=o.push(r(o)+"scale(",null,",",null,")");a.push({i:u-4,x:E(t,e)},{i:u-2,x:E(n,i)})}else 1===e&&1===i||o.push(r(o)+"scale("+e+","+i+")")}return function(n,e){var i=[],r=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,i,r),a(n.rotate,e.rotate,i,r),u(n.skewX,e.skewX,i,r),c(n.scaleX,n.scaleY,e.scaleX,e.scaleY,i,r),n=e=null,function(t){for(var n,e=-1,o=r.length;++e=1?(i=1,n-1):Math.floor(i*n),o=t[r],a=t[r+1],u=r>0?t[r-1]:2*o-a,c=ro&&(r=n.slice(o,r),u[a]?u[a]+=r:u[++a]=r),(e=e[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,c.push({i:a,x:E(e,i)})),o=P.lastIndex;return o1e-6)if(Math.abs(l*c-s*f)>1e-6&&o){var d=e-a,p=r-u,_=c*c+s*s,y=d*d+p*p,g=Math.sqrt(_),v=Math.sqrt(h),b=o*Math.tan((i-Math.acos((_+h-y)/(2*g*v)))/2),m=b/v,x=b/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*f)+","+(n+m*l)),this._+="A"+o+","+o+",0,0,"+ +(l*d>f*p)+","+(this._x1=t+x*c)+","+(this._y1=n+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,a,u,c){t=+t,n=+n;var s=(e=+e)*Math.cos(a),f=e*Math.sin(a),l=t+s,h=n+f,d=1^c,p=c?a-u:u-a;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%r+r),p>o?this._+="A"+e+","+e+",0,1,"+d+","+(t-s)+","+(n-f)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=i)+","+d+","+(this._x1=t+e*Math.cos(u))+","+(this._y1=n+e*Math.sin(u))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}},t.path=e,Object.defineProperty(t,"__esModule",{value:!0})})},{}],9:[function(t,n,e){!function(i,r){"object"==typeof e&&void 0!==n?r(e,t("d3-array"),t("d3-collection"),t("d3-interpolate"),t("d3-format"),t("d3-time"),t("d3-time-format"),t("d3-color")):r(i.d3=i.d3||{},i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3)}(this,function(t,n,e,i,r,o,a,u){"use strict";function c(t){function n(n){var e=n+"",a=i.get(e);if(!a){if(o!==R)return o;i.set(e,a=r.push(n))}return t[(a-1)%t.length]}var i=e.map(),r=[],o=R;return t=null==t?[]:q.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],i=e.map();for(var o,a,u=-1,c=t.length;++u=e?1:i(t)}}}function d(t){return function(n,e){var i=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:i(t)}}}function p(t,n,e,i){var r=t[0],o=t[1],a=n[0],u=n[1];return o2?_:p,a=u=null,r}function r(n){return(a||(a=o(c,s,y?h(t):t,f)))(+n)}var o,a,u,c=X,s=X,f=i.interpolate,y=!1;return r.invert=function(t){return(u||(u=o(s,c,l,y?d(n):n)))(+t)},r.domain=function(t){return arguments.length?(c=j.call(t,z),e()):c.slice()},r.range=function(t){return arguments.length?(s=q.call(t),e()):s.slice()},r.rangeRound=function(t){return s=q.call(t),f=i.interpolateRound,e()},r.clamp=function(t){return arguments.length?(y=!!t,e()):y},r.interpolate=function(t){return arguments.length?(f=t,e()):f},e()}function v(t){var e=t.domain;return t.ticks=function(t){var i=e();return n.ticks(i[0],i[i.length-1],null==t?10:t)},t.tickFormat=function(t,n){return B(e(),t,n)},t.nice=function(i){null==i&&(i=10);var r,o=e(),a=0,u=o.length-1,c=o[a],s=o[u];return s0?(c=Math.floor(c/r)*r,s=Math.ceil(s/r)*r,r=n.tickIncrement(c,s,i)):r<0&&(c=Math.ceil(c*r)/r,s=Math.floor(s*r)/r,r=n.tickIncrement(c,s,i)),r>0?(o[a]=Math.floor(c/r)*r,o[u]=Math.ceil(s/r)*r,e(o)):r<0&&(o[a]=Math.ceil(c*r)/r,o[u]=Math.floor(s*r)/r,e(o)),t},t}function b(){var t=g(l,i.interpolateNumber);return t.copy=function(){return y(t,b())},v(t)}function m(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=j.call(e,z),t):n.slice()},t.copy=function(){return m().domain(n)},v(t)}function x(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:H(n)}function w(t,n){return t<0?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function M(t){return isFinite(t)?+("1e"+t):t<0?0:t}function T(t){return 10===t?M:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function k(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function N(t){return function(n){return-t(-n)}}function S(){function t(){return a=k(o),u=T(o),i()[0]<0&&(a=N(a),u=N(u)),e}var e=g(x,w).domain([1,10]),i=e.domain,o=10,a=k(10),u=T(10);return e.base=function(n){return arguments.length?(o=+n,t()):o},e.domain=function(n){return arguments.length?(i(n),t()):i()},e.ticks=function(t){var e,r=i(),c=r[0],s=r[r.length-1];(e=s0){for(;ds)break;y.push(h)}}else for(;d=1;--l)if(!((h=f*l)s)break;y.push(h)}}else y=n.ticks(d,p,Math.min(p-d,_)).map(u);return e?y.reverse():y},e.tickFormat=function(t,n){if(null==n&&(n=10===o?".0e":","),"function"!=typeof n&&(n=r.format(n)),t===1/0)return n;null==t&&(t=10);var i=Math.max(1,o*t/e.ticks().length);return function(t){var e=t/u(Math.round(a(t)));return e*o0?o[n-1]:i[0],n=o?[a[o-1],r]:[a[n-1],a[n]]},t.copy=function(){return O().domain([i,r]).range(u)},v(t)}function D(){function t(t){if(t<=t)return i[n.bisect(e,t,0,r)]}var e=[.5],i=[0,1],r=1;return t.domain=function(n){return arguments.length?(e=q.call(n),r=Math.min(e.length,i.length-1),t):e.slice()},t.range=function(n){return arguments.length?(i=q.call(n),r=Math.min(e.length,i.length-1),t):i.slice()},t.invertExtent=function(t){var n=i.indexOf(t);return[e[n-1],e[n]]},t.copy=function(){return D().domain(e).range(i)},t}function P(t){return new Date(t)}function U(t){return t instanceof Date?+t:+new Date(+t)}function Y(t,e,r,o,a,u,c,s,f){function h(n){return(c(n)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return ct.h=360*t-100,ct.s=1.5-1.5*n,ct.l=.8-.9*n,ct+""},t.interpolateWarm=at,t.interpolateCool=ut,t.interpolateViridis=st,t.interpolateMagma=ft,t.interpolateInferno=lt,t.interpolatePlasma=ht,t.scaleSequential=I,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-array":1,"d3-collection":2,"d3-color":3,"d3-format":6,"d3-interpolate":7,"d3-time":13,"d3-time-format":12}],10:[function(t,n,e){!function(t,i){i("object"==typeof e&&void 0!==n?e:t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===G&&n.documentElement.namespaceURI===G?n.createElement(t):n.createElementNS(e,t)}}function e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(){return new r}function r(){this._="@"+(++et).toString(36)}function o(t,n,e){return t=a(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function a(n,e,i){return function(r){var o=t.event;t.event=r;try{n.call(this,this.__data__,e,i)}finally{t.event=o}}}function u(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function c(t){return function(){var n=this.__on;if(n){for(var e,i=0,r=-1,o=n.length;in?1:t>=n?0:NaN}function y(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function v(t,n){return function(){this.setAttribute(t,n)}}function b(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function m(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function x(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function w(t){return function(){this.style.removeProperty(t)}}function M(t,n,e){return function(){this.style.setProperty(t,n,e)}}function T(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function k(t,n){return t.style.getPropertyValue(n)||_t(t).getComputedStyle(t,null).getPropertyValue(n)}function N(t){return function(){delete this[t]}}function S(t,n){return function(){this[t]=n}}function A(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function C(t){return t.trim().split(/^|\s+/)}function E(t){return t.classList||new O(t)}function O(t){this._node=t,this._names=C(t.getAttribute("class")||"")}function D(t,n){for(var e=E(t),i=-1,r=n.length;++i=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),K.hasOwnProperty(n)?{space:K[n],local:t}:t},nt=function(t){var i=tt(t);return(i.local?e:n)(i)},et=0;r.prototype=i.prototype={constructor:r,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var it=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var rt=document.documentElement;if(!rt.matches){var ot=rt.webkitMatchesSelector||rt.msMatchesSelector||rt.mozMatchesSelector||rt.oMatchesSelector;it=function(t){return function(){return ot.call(this,t)}}}}var at=it,ut={};t.event=null,"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ut={mouseenter:"mouseover",mouseleave:"mouseout"}));var ct=function(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e},st=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var i=e.createSVGPoint();return i.x=n.clientX,i.y=n.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var r=t.getBoundingClientRect();return[n.clientX-r.left-t.clientLeft,n.clientY-r.top-t.clientTop]},ft=function(t){return null==t?f:function(){return this.querySelector(t)}},lt=function(t){return null==t?l:function(){return this.querySelectorAll(t)}},ht=function(t){return new Array(t.length)};h.prototype={constructor:h,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var dt=function(t){return function(){return t}},pt="$",_t=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};O.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var yt=[null];Q.prototype=J.prototype={constructor:Q,select:function(t){"function"!=typeof t&&(t=ft(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r=w&&(w=x+1);!(m=v[w])&&++w=0;)(i=r[o])&&(a&&a!==i.nextSibling&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){t||(t=_);for(var n=this._groups,e=n.length,i=new Array(e),r=0;r1?this.each((null==n?w:"function"==typeof n?T:M)(t,n,null==e?"":e)):k(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?N:"function"==typeof n?A:S)(t,n)):this.node()[t]},classed:function(t,n){var e=C(t+"");if(arguments.length<2){for(var i=E(this.node()),r=-1,o=e.length;++r1?0:t<-1?rt:Math.acos(t)}function i(t){return t>=1?ot:t<=-1?-ot:Math.asin(t)}function r(t){return t.innerRadius}function o(t){return t.outerRadius}function a(t){return t.startAngle}function u(t){return t.endAngle}function c(t){return t&&t.padAngle}function s(t,n,e,i,r,o,a,u){var c=e-t,s=i-n,f=a-r,l=u-o,h=(f*(n-o)-l*(t-r))/(l*c-f*s);return[t+h*c,n+h*s]}function f(t,n,e,i,r,o,a){var u=t-e,c=n-i,s=(a?o:-o)/et(u*u+c*c),f=s*c,l=-s*u,h=t+f,d=n+l,p=e+f,_=i+l,y=(h+p)/2,g=(d+_)/2,v=p-h,b=_-d,m=v*v+b*b,x=r-o,w=h*_-p*d,M=(b<0?-1:1)*et(K(0,x*x*m-w*w)),T=(w*b-v*M)/m,k=(-w*v-b*M)/m,N=(w*b+v*M)/m,S=(-w*v+b*M)/m,A=T-y,C=k-g,E=N-y,O=S-g;return A*A+C*C>E*E+O*O&&(T=N,k=S),{cx:T,cy:k,x01:-f,y01:-l,x11:T*(r/x-1),y11:k*(r/x-1)}}function l(t){this._context=t}function h(t){return t[0]}function d(t){return t[1]}function p(t){this._curve=t}function _(t){function n(n){return new p(t(n))}return n._curve=t,n}function y(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(_(t)):n()._curve},t}function g(t){return t.source}function v(t){return t.target}function b(t){function e(){var e,c=yt.call(arguments),s=i.apply(this,c),f=r.apply(this,c);if(u||(u=e=n.path()),t(u,+o.apply(this,(c[0]=s,c)),+a.apply(this,c),+o.apply(this,(c[0]=f,c)),+a.apply(this,c)),e)return u=null,e+""||null}var i=g,r=v,o=h,a=d,u=null;return e.source=function(t){return arguments.length?(i=t,e):i},e.target=function(t){return arguments.length?(r=t,e):r},e.x=function(t){return arguments.length?(o="function"==typeof t?t:Z(+t),e):o},e.y=function(t){return arguments.length?(a="function"==typeof t?t:Z(+t),e):a},e.context=function(t){return arguments.length?(u=null==t?null:t,e):u},e}function m(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function x(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+r)/2,i,e,i,r)}function w(t,n,e,i,r){var o=_t(n,e),a=_t(n,e=(e+r)/2),u=_t(i,e),c=_t(i,r);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],c[0],c[1])}function M(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function T(t){this._context=t}function k(t){this._context=t}function N(t){this._context=t}function S(t,n){this._basis=new T(t),this._beta=n}function A(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function C(t,n){this._context=t,this._k=(1-n)/6}function E(t,n){this._context=t,this._k=(1-n)/6}function O(t,n){this._context=t,this._k=(1-n)/6}function D(t,n,e){var i=t._x1,r=t._y1,o=t._x2,a=t._y2;if(t._l01_a>it){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>it){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,a=(a*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(i,r,o,a,t._x2,t._y2)}function P(t,n){this._context=t,this._alpha=n}function U(t,n){this._context=t,this._alpha=n}function Y(t,n){this._context=t,this._alpha=n}function F(t){this._context=t}function I(t){return t<0?-1:1}function L(t,n,e){var i=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),a=(e-t._y1)/(r||i<0&&-0),u=(o*r+a*i)/(i+r);return(I(o)+I(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function j(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function q(t,n,e){var i=t._x0,r=t._y0,o=t._x1,a=t._y1,u=(o-i)/3;t._context.bezierCurveTo(i+u,r+u*n,o-u,a-u*e,o,a)}function R(t){this._context=t}function H(t){this._context=new z(t)}function z(t){this._context=t}function X(t){this._context=t}function B(t){var n,e,i=t.length-1,r=new Array(i),o=new Array(i),a=new Array(i);for(r[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n=0;--n)r[n]=(a[n]-r[n+1])/o[n];for(o[i-1]=(t[i]+r[i-1])/2,n=0;n=l;--h)f.point(g[h],v[h]);f.lineEnd(),f.areaEnd()}y&&(g[e]=+i(d,e,t),v[e]=+o(d,e,t),f.point(r?+r(d,e,t):g[e],a?+a(d,e,t):v[e]))}if(p)return f=null,p+""||null}function e(){return ct().defined(u).curve(s).context(c)}var i=h,r=null,o=Z(0),a=d,u=Z(!0),c=null,s=ut,f=null;return t.x=function(n){return arguments.length?(i="function"==typeof n?n:Z(+n),r=null,t):i},t.x0=function(n){return arguments.length?(i="function"==typeof n?n:Z(+n),t):i},t.x1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:Z(+n),t):r},t.y=function(n){return arguments.length?(o="function"==typeof n?n:Z(+n),a=null,t):o},t.y0=function(n){return arguments.length?(o="function"==typeof n?n:Z(+n),t):o},t.y1=function(n){return arguments.length?(a=null==n?null:"function"==typeof n?n:Z(+n),t):a},t.lineX0=t.lineY0=function(){return e().x(i).y(o)},t.lineY1=function(){return e().x(i).y(a)},t.lineX1=function(){return e().x(r).y(o)},t.defined=function(n){return arguments.length?(u="function"==typeof n?n:Z(!!n),t):u},t.curve=function(n){return arguments.length?(s=n,null!=c&&(f=s(c)),t):s},t.context=function(n){return arguments.length?(null==n?c=f=null:f=s(c=n),t):c},t},ft=function(t,n){return nt?1:n>=t?0:NaN},lt=function(t){return t},ht=_(ut);p.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var dt=function(){return y(ct().curve(ht))},pt=function(){var t=st().curve(ht),n=t.curve,e=t.lineX0,i=t.lineX1,r=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return y(e())},delete t.lineX0,t.lineEndAngle=function(){return y(i())},delete t.lineX1,t.lineInnerRadius=function(){return y(r())},delete t.lineY0,t.lineOuterRadius=function(){return y(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(_(t)):n()._curve},t},_t=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},yt=Array.prototype.slice,gt={draw:function(t,n){var e=Math.sqrt(n/rt);t.moveTo(e,0),t.arc(0,0,e,0,at)}},vt={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},bt=Math.sqrt(1/3),mt=2*bt,xt={draw:function(t,n){var e=Math.sqrt(n/mt),i=e*bt;t.moveTo(0,-e),t.lineTo(i,0),t.lineTo(0,e),t.lineTo(-i,0),t.closePath()}},wt=Math.sin(rt/10)/Math.sin(7*rt/10),Mt=Math.sin(at/10)*wt,Tt=-Math.cos(at/10)*wt,kt={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),i=Mt*e,r=Tt*e;t.moveTo(0,-e),t.lineTo(i,r);for(var o=1;o<5;++o){var a=at*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*i-c*r,c*i+u*r)}t.closePath()}},Nt={draw:function(t,n){var e=Math.sqrt(n),i=-e/2;t.rect(i,i,e,e)}},St=Math.sqrt(3),At={draw:function(t,n){var e=-Math.sqrt(n/(3*St));t.moveTo(0,2*e),t.lineTo(-St*e,-e),t.lineTo(St*e,-e),t.closePath()}},Ct=-.5,Et=Math.sqrt(3)/2,Ot=1/Math.sqrt(12),Dt=3*(Ot/2+1),Pt={draw:function(t,n){var e=Math.sqrt(n/Dt),i=e/2,r=e*Ot,o=i,a=e*Ot+e,u=-o,c=a;t.moveTo(i,r),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(Ct*i-Et*r,Et*i+Ct*r),t.lineTo(Ct*o-Et*a,Et*o+Ct*a),t.lineTo(Ct*u-Et*c,Et*u+Ct*c),t.lineTo(Ct*i+Et*r,Ct*r-Et*i),t.lineTo(Ct*o+Et*a,Ct*a-Et*o),t.lineTo(Ct*u+Et*c,Ct*c-Et*u),t.closePath()}},Ut=[gt,vt,xt,Nt,kt,At,Pt],Yt=function(){};T.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:M(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:M(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};k.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:M(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break;case 3:this._point=4;default:M(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};S.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var i,r=t[0],o=n[0],a=t[e]-r,u=n[e]-o,c=-1;++c<=e;)i=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(r+i*a),this._beta*n[c]+(1-this._beta)*(o+i*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Ft=function t(n){function e(t){return 1===n?new T(t):new S(t,n)}return e.beta=function(n){return t(+n)},e}(.85);C.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:A(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:A(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var It=function t(n){function e(t){return new C(t,n)}return e.tension=function(n){return t(+n)},e}(0);E.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:A(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return new E(t,n)}return e.tension=function(n){return t(+n)},e}(0);O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var jt=function t(n){function e(t){return new O(t,n)}return e.tension=function(n){return t(+n)},e}(0);P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:D(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var qt=function t(n){function e(t){return n?new P(t,n):new C(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);U.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:D(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Rt=function t(n){function e(t){return n?new U(t,n):new E(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:D(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ht=function t(n){function e(t){return n?new Y(t,n):new O(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);F.prototype={areaStart:Yt,areaEnd:Yt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};R.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:q(this,this._t0,j(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,q(this,j(this,e=L(this,t,n)),e);break;default:q(this,this._t0,e=L(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(H.prototype=Object.create(R.prototype)).point=function(t,n){R.prototype.point.call(this,n,t)},z.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,i,r,o){this._context.bezierCurveTo(n,t,i,e,o,r)}},X.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var i=B(t),r=B(n),o=0,a=1;a=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var zt=function(t,n){if((r=t.length)>1)for(var e,i,r,o=1,a=t[n[0]],u=a.length;o=0;)e[n]=n;return e},Bt=function(t){var n=t.map(W);return Xt(t).sort(function(t,e){return n[t]-n[e]})};t.arc=function(){function t(){var t,r,o=+l.apply(this,arguments),a=+h.apply(this,arguments),u=_.apply(this,arguments)-ot,c=y.apply(this,arguments)-ot,b=Q(c-u),m=c>u;if(v||(v=t=n.path()),ait)if(b>at-it)v.moveTo(a*G(u),a*nt(u)),v.arc(0,0,a,u,c,!m),o>it&&(v.moveTo(o*G(c),o*nt(c)),v.arc(0,0,o,c,u,m));else{var x,w,M=u,T=c,k=u,N=c,S=b,A=b,C=g.apply(this,arguments)/2,E=C>it&&(p?+p.apply(this,arguments):et(o*o+a*a)),O=tt(Q(a-o)/2,+d.apply(this,arguments)),D=O,P=O;if(E>it){var U=i(E/o*nt(C)),Y=i(E/a*nt(C));(S-=2*U)>it?(U*=m?1:-1,k+=U,N-=U):(S=0,k=N=(u+c)/2),(A-=2*Y)>it?(Y*=m?1:-1,M+=Y,T-=Y):(A=0,M=T=(u+c)/2)}var F=a*G(M),I=a*nt(M),L=o*G(N),j=o*nt(N);if(O>it){var q=a*G(T),R=a*nt(T),H=o*G(k),z=o*nt(k);if(bit?s(F,I,H,z,q,R,L,j):[L,j],B=F-X[0],$=I-X[1],V=q-X[0],W=R-X[1],Z=1/nt(e((B*V+$*W)/(et(B*B+$*$)*et(V*V+W*W)))/2),K=et(X[0]*X[0]+X[1]*X[1]);D=tt(O,(o-K)/(Z-1)),P=tt(O,(a-K)/(Z+1))}}A>it?P>it?(x=f(H,z,F,I,a,P,m),w=f(q,R,L,j,a,P,m),v.moveTo(x.cx+x.x01,x.cy+x.y01),Pit&&S>it?D>it?(x=f(L,j,q,R,o,-D,m),w=f(F,I,H,z,o,-D,m),v.lineTo(x.cx+x.x01,x.cy+x.y01),D0&&(d+=l);for(null!=e?p.sort(function(t,n){return e(_[t],_[n])}):null!=i&&p.sort(function(n,e){return i(t[n],t[e])}),u=0,s=d?(g-h*b)/d:0;u0?l*s:0)+b,_[c]={data:t[c],index:u,value:l,startAngle:y,endAngle:f,padAngle:v};return _}var n=lt,e=ft,i=null,r=Z(0),o=Z(at),a=Z(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:Z(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,i=null,t):e},t.sort=function(n){return arguments.length?(i=n,e=null,t):i},t.startAngle=function(n){return arguments.length?(r="function"==typeof n?n:Z(+n),t):r},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:Z(+n),t):o},t.padAngle=function(n){return arguments.length?(a="function"==typeof n?n:Z(+n),t):a},t},t.areaRadial=pt,t.radialArea=pt,t.lineRadial=dt,t.radialLine=dt,t.pointRadial=_t,t.linkHorizontal=function(){return b(m)},t.linkVertical=function(){return b(x)},t.linkRadial=function(){var t=b(w);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){function t(){var t;if(r||(r=t=n.path()),e.apply(this,arguments).draw(r,+i.apply(this,arguments)),t)return r=null,t+""||null}var e=Z(gt),i=Z(64),r=null;return t.type=function(n){return arguments.length?(e="function"==typeof n?n:Z(n),t):e},t.size=function(n){return arguments.length?(i="function"==typeof n?n:Z(+n),t):i},t.context=function(n){return arguments.length?(r=null==n?null:n,t):r},t},t.symbols=Ut,t.symbolCircle=gt,t.symbolCross=vt,t.symbolDiamond=xt,t.symbolSquare=Nt,t.symbolStar=kt,t.symbolTriangle=At,t.symbolWye=Pt,t.curveBasisClosed=function(t){return new k(t)},t.curveBasisOpen=function(t){return new N(t)},t.curveBasis=function(t){return new T(t)},t.curveBundle=Ft,t.curveCardinalClosed=Lt,t.curveCardinalOpen=jt,t.curveCardinal=It,t.curveCatmullRomClosed=Rt,t.curveCatmullRomOpen=Ht,t.curveCatmullRom=qt,t.curveLinearClosed=function(t){return new F(t)},t.curveLinear=ut,t.curveMonotoneX=function(t){return new R(t)},t.curveMonotoneY=function(t){return new H(t)},t.curveNatural=function(t){return new X(t)},t.curveStep=function(t){return new $(t,.5)},t.curveStepAfter=function(t){return new $(t,1)},t.curveStepBefore=function(t){return new $(t,0)},t.stack=function(){function t(t){var o,a,u=n.apply(this,arguments),c=t.length,s=u.length,f=new Array(s);for(o=0;o0){for(var e,i,r,o=0,a=t[0].length;o1)for(var e,i,r,o,a,u,c=0,s=t[n[0]].length;c=0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=a,i[0]=a+=r):i[0]=o},t.stackOffsetNone=zt,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,i=0,r=t[n[0]],o=r.length;i0&&(i=(e=t[n[0]]).length)>0){for(var e,i,r,o=0,a=1;a53)return null;"w"in s||(s.w=1),"Z"in s?(a=(c=(a=i(r(s.y))).getUTCDay())>4||0===c?n.utcMonday.ceil(a):n.utcMonday(a),a=n.utcDay.offset(a,7*(s.V-1)),s.y=a.getUTCFullYear(),s.m=a.getUTCMonth(),s.d=a.getUTCDate()+(s.w+6)%7):(a=(c=(a=e(r(s.y))).getDay())>4||0===c?n.timeMonday.ceil(a):n.timeMonday(a),a=n.timeDay.offset(a,7*(s.V-1)),s.y=a.getFullYear(),s.m=a.getMonth(),s.d=a.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),c="Z"in s?i(r(s.y)).getUTCDay():e(r(s.y)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(c+5)%7:s.w+7*s.U-(c+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,i(s)):e(s)}}function u(t,n,e,i){for(var r,o,a=0,u=n.length,c=e.length;a=c)return-1;if(37===(r=n.charCodeAt(a++))){if(r=n.charAt(a++),!(o=Pt[r in pt?n.charAt(a++):r])||(i=o(t,e,i))<0)return-1}else if(r!=e.charCodeAt(i++))return-1}return i}var ht=t.dateTime,dt=t.date,_t=t.time,yt=t.periods,gt=t.days,vt=t.shortDays,bt=t.months,mt=t.shortMonths,xt=c(yt),wt=s(yt),Mt=c(gt),Tt=s(gt),kt=c(vt),Nt=s(vt),St=c(bt),At=s(bt),Ct=c(mt),Et=s(mt),Ot={a:function(t){return vt[t.getDay()]},A:function(t){return gt[t.getDay()]},b:function(t){return mt[t.getMonth()]},B:function(t){return bt[t.getMonth()]},c:null,d:C,e:C,f:U,H:E,I:O,j:D,L:P,m:Y,M:F,p:function(t){return yt[+(t.getHours()>=12)]},Q:ft,s:lt,S:I,u:L,U:j,V:q,w:R,W:H,x:null,X:null,y:z,Y:X,Z:B,"%":st},Dt={a:function(t){return vt[t.getUTCDay()]},A:function(t){return gt[t.getUTCDay()]},b:function(t){return mt[t.getUTCMonth()]},B:function(t){return bt[t.getUTCMonth()]},c:null,d:$,e:$,f:J,H:V,I:W,j:Z,L:Q,m:G,M:K,p:function(t){return yt[+(t.getUTCHours()>=12)]},Q:ft,s:lt,S:tt,u:nt,U:et,V:it,w:rt,W:ot,x:null,X:null,y:at,Y:ut,Z:ct,"%":st},Pt={a:function(t,n,e){var i=kt.exec(n.slice(e));return i?(t.w=Nt[i[0].toLowerCase()],e+i[0].length):-1},A:function(t,n,e){var i=Mt.exec(n.slice(e));return i?(t.w=Tt[i[0].toLowerCase()],e+i[0].length):-1},b:function(t,n,e){var i=Ct.exec(n.slice(e));return i?(t.m=Et[i[0].toLowerCase()],e+i[0].length):-1},B:function(t,n,e){var i=St.exec(n.slice(e));return i?(t.m=At[i[0].toLowerCase()],e+i[0].length):-1},c:function(t,n,e){return u(t,ht,n,e)},d:b,e:b,f:k,H:x,I:x,j:m,L:T,m:v,M:w,p:function(t,n,e){var i=xt.exec(n.slice(e));return i?(t.p=wt[i[0].toLowerCase()],e+i[0].length):-1},Q:S,s:A,S:M,u:l,U:h,V:d,w:f,W:p,x:function(t,n,e){return u(t,dt,n,e)},X:function(t,n,e){return u(t,_t,n,e)},y:y,Y:_,Z:g,"%":N};return Ot.x=o(dt,Ot),Ot.X=o(_t,Ot),Ot.c=o(ht,Ot),Dt.x=o(dt,Dt),Dt.X=o(_t,Dt),Dt.c=o(ht,Dt),{format:function(t){var n=o(t+="",Ot);return n.toString=function(){return t},n},parse:function(t){var n=a(t+="",e);return n.toString=function(){return t},n},utcFormat:function(t){var n=o(t+="",Dt);return n.toString=function(){return t},n},utcParse:function(t){var n=a(t,i);return n.toString=function(){return t},n}}}function a(t,n,e){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o68?1900:2e3),e+i[0].length):-1}function g(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function v(t,n,e){var i=_t.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function b(t,n,e){var i=_t.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function m(t,n,e){var i=_t.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function x(t,n,e){var i=_t.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function w(t,n,e){var i=_t.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function M(t,n,e){var i=_t.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function T(t,n,e){var i=_t.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function k(t,n,e){var i=_t.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function N(t,n,e){var i=yt.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function S(t,n,e){var i=_t.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function A(t,n,e){var i=_t.exec(n.slice(e));return i?(t.Q=1e3*+i[0],e+i[0].length):-1}function C(t,n){return a(t.getDate(),n,2)}function E(t,n){return a(t.getHours(),n,2)}function O(t,n){return a(t.getHours()%12||12,n,2)}function D(t,e){return a(1+n.timeDay.count(n.timeYear(t),t),e,3)}function P(t,n){return a(t.getMilliseconds(),n,3)}function U(t,n){return P(t,n)+"000"}function Y(t,n){return a(t.getMonth()+1,n,2)}function F(t,n){return a(t.getMinutes(),n,2)}function I(t,n){return a(t.getSeconds(),n,2)}function L(t){var n=t.getDay();return 0===n?7:n}function j(t,e){return a(n.timeSunday.count(n.timeYear(t),t),e,2)}function q(t,e){var i=t.getDay();return t=i>=4||0===i?n.timeThursday(t):n.timeThursday.ceil(t),a(n.timeThursday.count(n.timeYear(t),t)+(4===n.timeYear(t).getDay()),e,2)}function R(t){return t.getDay()}function H(t,e){return a(n.timeMonday.count(n.timeYear(t),t),e,2)}function z(t,n){return a(t.getFullYear()%100,n,2)}function X(t,n){return a(t.getFullYear()%1e4,n,4)}function B(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+a(n/60|0,"0",2)+a(n%60,"0",2)}function $(t,n){return a(t.getUTCDate(),n,2)}function V(t,n){return a(t.getUTCHours(),n,2)}function W(t,n){return a(t.getUTCHours()%12||12,n,2)}function Z(t,e){return a(1+n.utcDay.count(n.utcYear(t),t),e,3)}function Q(t,n){return a(t.getUTCMilliseconds(),n,3)}function J(t,n){return Q(t,n)+"000"}function G(t,n){return a(t.getUTCMonth()+1,n,2)}function K(t,n){return a(t.getUTCMinutes(),n,2)}function tt(t,n){return a(t.getUTCSeconds(),n,2)}function nt(t){var n=t.getUTCDay();return 0===n?7:n}function et(t,e){return a(n.utcSunday.count(n.utcYear(t),t),e,2)}function it(t,e){var i=t.getUTCDay();return t=i>=4||0===i?n.utcThursday(t):n.utcThursday.ceil(t),a(n.utcThursday.count(n.utcYear(t),t)+(4===n.utcYear(t).getUTCDay()),e,2)}function rt(t){return t.getUTCDay()}function ot(t,e){return a(n.utcMonday.count(n.utcYear(t),t),e,2)}function at(t,n){return a(t.getUTCFullYear()%100,n,2)}function ut(t,n){return a(t.getUTCFullYear()%1e4,n,4)}function ct(){return"+0000"}function st(){return"%"}function ft(t){return+t}function lt(t){return Math.floor(+t/1e3)}function ht(n){return dt=o(n),t.timeFormat=dt.format,t.timeParse=dt.parse,t.utcFormat=dt.utcFormat,t.utcParse=dt.utcParse,dt}var dt,pt={"-":"",_:" ",0:"0"},_t=/^\s*\d+/,yt=/^%/,gt=/[\\^$*+?|[\]().{}]/g;ht({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"]});var vt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ"),bt=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");t.timeFormatDefaultLocale=ht,t.timeFormatLocale=o,t.isoFormat=vt,t.isoParse=bt,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-time":13}],13:[function(t,n,e){!function(t,i){i("object"==typeof e&&void 0!==n?e:t.d3=t.d3||{})}(this,function(t){"use strict";function n(t,e,i,a){function u(n){return t(n=new Date(+n)),n}return u.floor=u,u.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},u.round=function(t){var n=u(t),e=u.ceil(t);return t-n0))return o;do{o.push(new Date(+n))}while(e(n,r),t(n),n=n)for(;t(n),!i(n);)n.setTime(n-1)},function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!i(t););else for(;--n>=0;)for(;e(t,1),!i(t););})},i&&(u.count=function(n,e){return r.setTime(+n),o.setTime(+e),t(r),t(o),Math.floor(i(r,o))},u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(a?function(n){return a(n)%t==0}:function(n){return u.count(0,n)%t==0}):u:null}),u}function e(t){return n(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*c)/s})}function i(t){return n(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/s})}var r=new Date,o=new Date,a=n(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):a:null};var u=a.range,c=6e4,s=6048e5,f=n(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),l=f.range,h=n(function(t){t.setTime(Math.floor(t/c)*c)},function(t,n){t.setTime(+t+n*c)},function(t,n){return(n-t)/c},function(t){return t.getMinutes()}),d=h.range,p=n(function(t){var n=t.getTimezoneOffset()*c%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()}),_=p.range,y=n(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*c)/864e5},function(t){return t.getDate()-1}),g=y.range,v=e(0),b=e(1),m=e(2),x=e(3),w=e(4),M=e(5),T=e(6),k=v.range,N=b.range,S=m.range,A=x.range,C=w.range,E=M.range,O=T.range,D=n(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),P=D.range,U=n(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});U.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var Y=U.range,F=n(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*c)},function(t,n){return(n-t)/c},function(t){return t.getUTCMinutes()}),I=F.range,L=n(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()}),j=L.range,q=n(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1}),R=q.range,H=i(0),z=i(1),X=i(2),B=i(3),$=i(4),V=i(5),W=i(6),Z=H.range,Q=z.range,J=X.range,G=B.range,K=$.range,tt=V.range,nt=W.range,et=n(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),it=et.range,rt=n(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var ot=rt.range;t.timeInterval=n,t.timeMillisecond=a,t.timeMilliseconds=u,t.utcMillisecond=a,t.utcMilliseconds=u,t.timeSecond=f,t.timeSeconds=l,t.utcSecond=f,t.utcSeconds=l,t.timeMinute=h,t.timeMinutes=d,t.timeHour=p,t.timeHours=_,t.timeDay=y,t.timeDays=g,t.timeWeek=v,t.timeWeeks=k,t.timeSunday=v,t.timeSundays=k,t.timeMonday=b,t.timeMondays=N,t.timeTuesday=m,t.timeTuesdays=S,t.timeWednesday=x,t.timeWednesdays=A,t.timeThursday=w,t.timeThursdays=C,t.timeFriday=M,t.timeFridays=E,t.timeSaturday=T,t.timeSaturdays=O,t.timeMonth=D,t.timeMonths=P,t.timeYear=U,t.timeYears=Y,t.utcMinute=F,t.utcMinutes=I,t.utcHour=L,t.utcHours=j,t.utcDay=q,t.utcDays=R,t.utcWeek=H,t.utcWeeks=Z,t.utcSunday=H,t.utcSundays=Z,t.utcMonday=z,t.utcMondays=Q,t.utcTuesday=X,t.utcTuesdays=J,t.utcWednesday=B,t.utcWednesdays=G,t.utcThursday=$,t.utcThursdays=K,t.utcFriday=V,t.utcFridays=tt,t.utcSaturday=W,t.utcSaturdays=nt,t.utcMonth=et,t.utcMonths=it,t.utcYear=rt,t.utcYears=ot,Object.defineProperty(t,"__esModule",{value:!0})})},{}],14:[function(t,n,e){!function(t,i){i("object"==typeof e&&void 0!==n?e:t.d3=t.d3||{})}(this,function(t){"use strict";function n(){return g||(m(e),g=b.now()+v)}function e(){g=0}function i(){this._call=this._time=this._next=null}function r(t,n,e){var r=new i;return r.restart(t,n,e),r}function o(){n(),++h;for(var t,e=f;e;)(t=g-e._time)>=0&&e._call.call(null,t),e=e._next;--h}function a(){g=(y=b.now())+v,h=d=0;try{o()}finally{h=0,c(),g=0}}function u(){var t=b.now(),n=t-y;n>_&&(v-=n,y=t)}function c(){for(var t,n,e=f,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:f=n);l=t,s(i)}function s(t){h||(d&&(d=clearTimeout(d)),t-g>24?(t<1/0&&(d=setTimeout(a,t-b.now()-v)),p&&(p=clearInterval(p))):(p||(y=b.now(),p=setInterval(u,_)),h=1,m(a)))}var f,l,h=0,d=0,p=0,_=1e3,y=0,g=0,v=0,b="object"==typeof performance&&performance.now?performance:Date,m="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};i.prototype=r.prototype={constructor:i,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?n():+i)+(null==e?0:+e),this._next||l===this||(l?l._next=this:f=this,l=this),this._call=t,this._time=i,s()},stop:function(){this._call&&(this._call=null,this._time=1/0,s())}};t.now=n,t.timer=r,t.timerFlush=o,t.timeout=function(t,n,e){var r=new i;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},t.interval=function(t,e,r){var o=new i,a=e;return null==e?(o.restart(t,e,r),o):(e=+e,r=null==r?n():+r,o.restart(function n(i){i+=a,o.restart(n,a+=e,r),t(i)},e,r),o)},Object.defineProperty(t,"__esModule",{value:!0})})},{}],15:[function(t,n,e){!function(i,r){"object"==typeof e&&void 0!==n?r(e,t("d3-selection"),t("d3-dispatch"),t("d3-timer"),t("d3-interpolate"),t("d3-color"),t("d3-ease")):r(i.d3=i.d3||{},i.d3,i.d3,i.d3,i.d3,i.d3,i.d3)}(this,function(t,n,e,i,r,o,a){"use strict";function u(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>z)throw new Error("too late");return e}function c(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>B)throw new Error("too late");return e}function s(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function f(t,n,e){function r(s){var f,l,h,d;if(e.state!==X)return a();for(f in c)if((d=c[f]).name===e.name){if(d.state===$)return i.timeout(r);d.state===V?(d.state=Z,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete c[f]):+f=0&&(t=t.slice(0,n)),!t||"start"===t})}function A(t,n,e){var i,r,o=S(n)?u:c;return function(){var a=o(this,t),u=a.on;u!==i&&(r=(i=u).copy()).on(n,e),a.on=r}}function C(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function E(t,e){var i,r,o;return function(){var a=n.style(this,t),u=(this.style.removeProperty(t),n.style(this,t));return a===u?null:a===i&&u===r?o:o=e(i=a,r=u)}}function O(t){return function(){this.style.removeProperty(t)}}function D(t,e,i){var r,o;return function(){var a=n.style(this,t);return a===i?null:a===r?o:o=e(r=a,i)}}function P(t,e,i){var r,o,a;return function(){var u=n.style(this,t),c=i(this);return null==c&&(this.style.removeProperty(t),c=n.style(this,t)),u===c?null:u===r&&c===o?a:a=e(r=u,o=c)}}function U(t,n,e){function i(){var i=this,r=n.apply(i,arguments);return r&&function(n){i.style.setProperty(t,r(n),e)}}return i._value=n,i}function Y(t){return function(){this.textContent=t}}function F(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function I(t,n,e,i){this._groups=t,this._parents=n,this._name=e,this._id=i}function L(t){return n.selection().transition(t)}function j(){return++tt}function q(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return et.time=i.now(),et;return e}var R=e.dispatch("start","end","interrupt"),H=[],z=0,X=1,B=2,$=3,V=4,W=5,Z=6,Q=function(t,n,e,i,r,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};f(t,e,{name:n,index:i,group:r,on:R,tween:H,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:z})},J=function(t,n){var e,i,r,o=t.__transition,a=!0;if(o){n=null==n?null:n+"";for(r in o)(e=o[r]).name===n?(i=e.state>B&&e.stateX&&e.name===n)return new I([[t]],it,n,+i)}return null},t.interrupt=J,Object.defineProperty(t,"__esModule",{value:!0})})},{"d3-color":3,"d3-dispatch":4,"d3-ease":5,"d3-interpolate":7,"d3-selection":10,"d3-timer":14}],16:[function(t,n,e){!function(e,i){if("object"==typeof n&&n.exports){var r=Object.assign({},t("d3-scale"),t("d3-selection"),t("d3-shape"),t("d3-color"),t("d3-interpolate"),t("d3-transition"));n.exports=i(r)}else e.SvgPie=i(e.d3)}(this,function(t){function n(i,r){if(!(this instanceof n))return new n(i,r);this.options=Object.assign({},e,r.options),this.data=Object.assign({},r.data);var o,a=this,u=t.select(i),c=u.append("svg"),s=c.append("g");"boolean"==typeof this.options.showTotal&&this.options.showTotal&&((o=u.append("p").attr("class","svg-total")).node()._current=0),u.style("position","relative").style("display","flex").style("flex-direction","column").style("justify-content","center").style("align-items","center"),c.style("position","absolute").style("top","0").style("left","0");var f,l,h,d,p,_=!1;if("boolean"==typeof this.options.showTooltip&&this.options.showTooltip){var y=u.append("div").attr("class","svg-tooltip").style("position","absolute").style("display","none").style("pointer-events","none");y.append("div").attr("class","svg-tooltip-label"),y.append("div").attr("class","svg-tooltip-value")}var g=t.pie().value(function(t){return t.value}).sort(function(t,n){return"boolean"==typeof a.options.sort&&a.options.sort?n.value-t.value>0&&"Other"!==n.label?1:-1:null});this.update=function(){var n;if("string"==typeof this.data.labels?n=[this.data.labels]:Array.isArray(this.data.labels)&&(n=this.data.labels),p=[],Array.isArray(this.data.dataset)&&"object"==typeof this.data.dataset[0])this.data.dataset.forEach(function(t){p.push(Object.assign({},t))});else if("number"==typeof this.data.values)p.push({value:this.data.values,label:"string"==typeof n[0]?n[0]:""});else{if(!(Array.isArray(this.data.values)&&this.data.values.length>0))throw new Error("No data provided");this.data.values.forEach(function(t,e){p.push({value:t,label:"string"==typeof n[e]?n[e]:""})})}var e=p.map(function(t){return t.value}).reduce(function(t,n){return t+n});if("boolean"==typeof this.options.percents&&this.options.percents&&e<100&&p.push({value:100-e,label:"Other"}),"boolean"==typeof this.options.group&&this.options.group&&p.length>2){var i=3*e/100,r=p.filter(function(t){return t.value=i}),r){var u=!1;p.forEach(function(t){"Other"===t.label&&(t.value+=r,u=!0)}),u||p.push({value:r,label:"Other"})}}var c=s.selectAll(".svg-segment").data(g(p),function(t){return t.data.label});c.exit().remove();var _=c.enter().append("g").attr("class","svg-segment");_.append("path"),_.append("text");var y=_.merge(c);f=y.select("path"),"boolean"==typeof this.options.showLabels&&this.options.showLabels&&(l=y.select("text").text(function(t){return t.data.label}).style("font-size",".8em").attr("class","svg-chart-label")),"boolean"==typeof this.options.showTotal&&this.options.showTotal&&o.data([e]).transition().duration(this.options.transition&&this.options.initialTransition?this.options.transition:0).tween("text",function(n){var e=t.interpolate(this._current,n);return this._current=n,function(t){a.options.percents?o.text(e(t).toFixed(0)+"%"):o.text(e(t).toFixed(2))}}),d=(p.length-1)/(this.options.colors.length-1),h=t.scaleLinear().domain(this.options.colors.map(function(t,n){return n*d})).interpolate(t.interpolateHcl).range(this.options.colors.map(function(n){return t.rgb(n)})),f.attr("fill",function(t,n){return h(n)}),this.render()}.bind(this),this.render=function(){var n=parseInt(u.style("width")),e=n>600?n/1.5:n,i=Math.min(n,e)/2,r=i*this.options.innerRadiusSize;u.style("height",e+"px"),c.attr("width",n).attr("height",e),s.attr("transform","translate("+n/2+","+e/2+")");var o=t.arc().innerRadius(function(t,n){return"Other"===t.data.label&&r>0?r+(i-r)*(1-a.options.otherSize)/2:r}).outerRadius(function(t,n){return"Other"===t.data.label?i-(i-r)*(1-a.options.otherSize)/2:i});if("boolean"==typeof this.options.showLabels&&this.options.showLabels){var h=i-25,d=t.arc().innerRadius(h).outerRadius(h);l.attr("transform",function(t){return"translate("+d.centroid(t)+")"}).attr("dy","0.35em").attr("dx",function(t){return d.centroid(t)[0]>0?(-10*t.data.label.length*d.centroid(t)[0]/i).toFixed(0)+"px":"0px"})}"boolean"==typeof this.options.transition&&this.options.transition&&(this.options.transition=this.defaultOptions.transition),"number"==typeof this.options.transition&&this.options.transition>0?f.transition().duration(this.options.transition).attrTween("d",function(n,e,i){void 0===this._current&&"boolean"==typeof a.options.initialTransition&&a.options.initialTransition&&!_&&(this._current={index:e,startAngle:0},this._current.endAngle=e===p.length-1?2*Math.PI:0),void 0===this._current&&_&&(this._current=Object.assign({},n),e&&(this._current.endAngle=this._current.startAngle=i[e-1]._current.endAngle));var r=t.interpolate(this._current,n);return this._current=r(0),function(t){return o(r(t))}}).on("end",function(){_||(_=!0)}):f.attr("d",o),"boolean"==typeof this.options.showTooltip&&this.options.showTooltip&&(f.on("mouseover",function(t){"Other"===t.data.label&&1!==a.options.otherSize||(y.style("display","block"),y.select(".svg-tooltip-label").text(t.data.label),y.select(".svg-tooltip-value").text(a.options.percents?t.data.value+"%":t.data.value))}),u.node().addEventListener("mousemove",function(t){var i=t.layerY,r=t.layerX,o=i