text: (function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;f="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,f.Trianglify=e()}})(function(){var e,f=Math.max,d=Math.sqrt,a=Math.abs,n=Math.floor;return function d(c,e,t){function f(r,i){if(!e[r]){if(!c[r]){var o="function"==typeof require&&require;if(!i&&o)return o(r,!0);if(n)return n(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var s=e[r]={exports:{}};c[r][0].call(s.exports,function(d){var e=c[r][1][d];return f(e?e:d)},s,s.exports,d,c,e,t)}return e[r].exports}for(var n="function"==typeof require&&require,a=0;a<t.length;a++)f(t[a]);return f}({"./lib/trianglify.js":[function(e,f){function d(e){function f(e,f,d){return(e-f[0])*(d[1]-d[0])/(f[1]-f[0])+d[0]}function d(e){return{x:(e[0][0]+e[1][0]+e[2][0])/3,y:(e[0][1]+e[1][1]+e[2][1])/3}}function c(){if(e.palette instanceof Array)return e.palette[n(b()*e.palette.length)];var f=Object.keys(e.palette);return e.palette[f[n(b()*f.length)]]}var b;if(e=function(e,f){var d={};for(var a in e)d[a]=e[a];for(a in f)if(e.hasOwnProperty(a))d[a]=f[a];else throw new Error(a+" is not a configuration option for Trianglify. Check your spelling?");return d}(s,e),b=t(e.seed),"random"===e.x_colors&&(e.x_colors=c()),"random"===e.y_colors&&(e.y_colors=c()),"match_x"===e.y_colors&&(e.y_colors=e.x_colors),!(0<e.width&&0<e.height))throw new Error("Width and height must be numbers greater than 0");if(2>e.cell_size)throw new Error("Cell size must be greater than 2.");if(!e.x_colors&&!e.y_colors)throw new Error("X and Y colors can not be both undefined.");var h;if(e.color_function)h=function(f,d){return r(e.color_function(f,d))};else if(e.x_colors&&e.y_colors){var g=r.scale(e.x_colors).mode(e.color_space),u=r.scale(e.y_colors).mode(e.color_space);h=function(f,d){return r.interpolate(g(f),u(d),0.5,e.color_space)}}else{var p=r.scale(e.x_colors?e.x_colors:e.y_colors).mode(e.color_space);h=function(f,d){return p(e.x_colors?f:d)}}for(var m=e.width,x=e.height,y=n((m+4*e.cell_size)/e.cell_size),_=n((x+4*e.cell_size)/e.cell_size),w=(y*e.cell_size-m)/2,j=(_*e.cell_size-x)/2,v=e.cell_size*e.variance/2,k=function(e){return f(e,[-w,m+w],[0,1])},z=function(e){return f(e,[-j,x+j],[0,1])},B=e.points||o(m,x,w,j,e.cell_size,v,b),S=new a(B).triangles,G=[],P=function(e){return B[e]},R=0;R<S.length;R+=3){var i=[S[R],S[R+1],S[R+2]].map(P),A=d(i),q=h(k(A.x),z(A.y)).hex();G.push([q,i])}return l(G,e)}var a=e("delaunator"),t=e("seedrandom"),r=e("chroma-js"),i=e("./colorbrewer"),o=e("./points"),l=e("./pattern"),s={width:600,height:400,cell_size:75,variance:0.75,seed:null,x_colors:"random",y_colors:"match_x",palette:i,color_space:"lab",color_function:null,stroke_width:1.51,points:void 0};d.colorbrewer=i,d.defaults=s,f.exports=d},{"./colorbrewer":"/home/christophe/trianglify/lib/colorbrewer.js","./pattern":"/home/christophe/trianglify/lib/pattern.js","./points":"/home/christophe/trianglify/lib/points.js","chroma-js":"/home/christophe/trianglify/node_modules/chroma-js/chroma.js",delaunator:"/home/christophe/trianglify/node_modules/delaunator/index.js",seedrandom:"/home/christophe/trianglify/node_modules/seedrandom/index.js"}],"/home/christophe/trianglify/lib/colorbrewer.js":[function(e,f){f.exports={YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]}},{}],"/home/christophe/trianglify/lib/pattern.js":[function(e,f){(function(d){var a="undefined"==typeof document?e("jsdom").jsdom("<html/>"):document;f.exports=function(f,t){function n(n){var r;if("object"==typeof d&&"object"==typeof d.versions&&"undefined"!=typeof d.versions.node)try{e("canvas")}catch(f){throw Error("The optional node-canvas dependency is needed for Trianglify to render using canvas in node.")}return n||(n=a.createElement("canvas")),n.setAttribute("width",t.width),n.setAttribute("height",t.height),r=n.getContext("2d"),r.canvas.width=t.width,r.canvas.height=t.height,f.forEach(function(e){r.fillStyle=r.strokeStyle=e[0],r.lineWidth=t.stroke_width,r.beginPath(),r.moveTo.apply(r,e[1][0]),r.lineTo.apply(r,e[1][1]),r.lineTo.apply(r,e[1][2]),r.fill(),r.stroke()}),n}return{polys:f,opts:t,svg:function(e){var d=a.createElementNS("http://www.w3.org/2000/svg","svg");return d.setAttribute("width",t.width),d.setAttribute("height",t.height),e&&e.includeNamespace&&d.setAttribute("xmlns","http://www.w3.org/2000/svg"),f.forEach(function(e){var f=a.createElementNS("http://www.w3.org/2000/svg","path");f.setAttribute("d","M"+e[1].join("L")+"Z"),f.setAttribute("fill",e[0]),f.setAttribute("stroke",e[0]),f.setAttribute("stroke-width",t.stroke_width),d.appendChild(f)}),d},canvas:n,png:function(){return n().toDataURL("image/png")}}}}).call(this,e("_process"))},{_process:"/home/christophe/trianglify/node_modules/process/browser.js",canvas:"/home/christophe/trianglify/node_modules/browser-resolve/empty.js",jsdom:"/home/christophe/trianglify/node_modules/browser-resolve/empty.js"}],"/home/christophe/trianglify/lib/points.js":[function(e,f){f.exports=function(e,f,d,a,t,r,o){for(var l=0.5*t,s=2*r,c=-r,b=[],h=-d;h<e+d;h+=t)for(var i=-a;i<f+a;i+=t){var g=h+l+(o()*s+c),u=i+l+(o()*s+c);b.push([n(g),n(u)])}return b}},{}],"/home/christophe/trianglify/node_modules/browser-resolve/empty.js":[function(){},{}],"/home/christophe/trianglify/node_modules/chroma-js/chroma.js":[function(t,r,i){(function(){var t,o,l,c,s,h,u,b,g,y,p,m,x,_,w,j,v,k,z,B,S,G,P,R,A,q,C,L,O,Y,T,E,N,X,D,U,K,M,W,V=Number.MAX_VALUE,F=Math.min,I=Math.cos,Z=Math.pow,Q=Math.PI,H=Number.NaN,$=Math.round;y=function(e,f,d,a){return new t(e,f,d,a)},"undefined"!=typeof r&&null!==r&&null!=r.exports&&(r.exports=y),"function"==typeof e&&e.amd?e([],function(){return y}):(X="undefined"!=typeof i&&null!==i?i:this,X.chroma=y),y.color=function(e,f,d,a){return new t(e,f,d,a)},y.hsl=function(e,f,d,n){return new t(e,f,d,n,"hsl")},y.hsv=function(e,f,d,n){return new t(e,f,d,n,"hsv")},y.rgb=function(e,f,d,n){return new t(e,f,d,n,"rgb")},y.hex=function(e){return new t(e)},y.css=function(e){return new t(e)},y.lab=function(e,f,d){return new t(e,f,d,"lab")},y.lch=function(e,f,d){return new t(e,f,d,"lch")},y.hsi=function(e,f,d){return new t(e,f,d,"hsi")},y.gl=function(e,f,d,n){return new t(255*e,255*f,255*d,n,"gl")},y.interpolate=function(e,d,a,f){return null==e||null==d?"#000":("string"===D(e)&&(e=new t(e)),"string"===D(d)&&(d=new t(d)),e.interpolate(a,d,f))},y.mix=y.interpolate,y.contrast=function(e,f){var d,a;return"string"===D(e)&&(e=new t(e)),"string"===D(f)&&(f=new t(f)),d=e.luminance(),a=f.luminance(),d>a?(d+0.05)/(a+0.05):(a+0.05)/(d+0.05)},y.luminance=function(e){return y(e).luminance()},y._Color=t,t=function(){function e(){var e,f,d,a,t,n,r,i,o,l,s,c,b,h,g,u;for(t=this,d=[],(l=0,s=arguments.length);l<s;l++)f=arguments[l],null!=f&&d.push(f);if(0===d.length)c=[255,0,255,1,"rgb"],r=c[0],i=c[1],o=c[2],e=c[3],a=c[4];else if("array"===D(d[0])){if(3===d[0].length)b=d[0],r=b[0],i=b[1],o=b[2],e=1;else if(4===d[0].length)h=d[0],r=h[0],i=h[1],o=h[2],e=h[3];else throw"unknown input argument";a=null==(g=d[1])?"rgb":g}else"string"===D(d[0])?(r=d[0],a="hex"):"object"===D(d[0])?(u=d[0]._rgb,r=u[0],i=u[1],o=u[2],e=u[3],a="rgb"):3<=d.length&&(r=d[0],i=d[1],o=d[2]);3===d.length?(a="rgb",e=1):4===d.length?"string"===D(d[3])?(a=d[3],e=1):"number"===D(d[3])&&(a="rgb",e=d[3]):5===d.length&&(e=d[3],a=d[4]),null==e&&(e=1),"rgb"===a?t._rgb=[r,i,o,e]:"gl"===a?t._rgb=[255*r,255*i,255*o,e]:"hsl"===a?(t._rgb=v(r,i,o),t._rgb[3]=e):"hsv"===a?(t._rgb=k(r,i,o),t._rgb[3]=e):"hex"===a?t._rgb=w(r):"lab"===a?(t._rgb=B(r,i,o),t._rgb[3]=e):"lch"===a?(t._rgb=P(r,i,o),t._rgb[3]=e):"hsi"===a&&(t._rgb=j(r,i,o),t._rgb[3]=e),n=p(t._rgb)}return e.prototype.rgb=function(){return this._rgb.slice(0,3)},e.prototype.rgba=function(){return this._rgb},e.prototype.hex=function(){return C(this._rgb)},e.prototype.toString=function(){return this.name()},e.prototype.hsl=function(){return O(this._rgb)},e.prototype.hsv=function(){return Y(this._rgb)},e.prototype.lab=function(){return T(this._rgb)},e.prototype.lch=function(){return E(this._rgb)},e.prototype.hsi=function(){return L(this._rgb)},e.prototype.gl=function(){return[this._rgb[0]/255,this._rgb[1]/255,this._rgb[2]/255,this._rgb[3]]},e.prototype.luminance=function(f,d){var t,n,r,i;return(null==d&&(d="rgb"),!arguments.length)?A(this._rgb):(0===f&&(this._rgb=[0,0,0,this._rgb[3]]),1===f&&(this._rgb=[255,255,255,this._rgb[3]]),t=A(this._rgb),n=1e-7,r=20,i=function(e,t){var o,l;return l=e.interpolate(0.5,t,d),o=l.luminance(),a(f-o)<n||!r--?l:o>f?i(e,l):i(l,t)},this._rgb=(t>f?i(new e("black"),this):i(this,new e("white"))).rgba(),this)},e.prototype.name=function(){var e,f;for(f in e=this.hex(),y.colors)if(e===y.colors[f])return f;return e},e.prototype.alpha=function(e){return arguments.length?(this._rgb[3]=e,this):this._rgb[3]},e.prototype.css=function(e){var f,d,a,t;return(null==e&&(e="rgb"),d=this,a=d._rgb,3===e.length&&1>a[3]&&(e+="a"),"rgb"===e)?e+"("+a.slice(0,3).map(Math.round).join(",")+")":"rgba"===e?e+"("+a.slice(0,3).map(Math.round).join(",")+","+a[3]+")":"hsl"===e||"hsla"===e?(f=d.hsl(),t=function(e){return $(100*e)/100},f[0]=t(f[0]),f[1]=t(100*f[1])+"%",f[2]=t(100*f[2])+"%",4===e.length&&(f[3]=a[3]),e+"("+f.join(",")+")"):void 0},e.prototype.interpolate=function(d,f,a){var t,n,r,i,o,l,s,c,b,h,g,u,p,m;if(c=this,null==a&&(a="rgb"),"string"===D(f)&&(f=new e(f)),"hsl"===a||"hsv"===a||"lch"===a||"hsi"===a)"hsl"===a?(p=c.hsl(),m=f.hsl()):"hsv"===a?(p=c.hsv(),m=f.hsv()):"hsi"===a?(p=c.hsi(),m=f.hsi()):"lch"===a&&(p=c.lch(),m=f.lch()),"h"===a.substr(0,1)?(r=p[0],g=p[1],l=p[2],i=m[0],u=m[1],s=m[2]):(l=p[0],g=p[1],r=p[2],s=m[0],u=m[1],i=m[2]),isNaN(r)||isNaN(i)?isNaN(r)?isNaN(i)?n=H:(n=i,(1===l||0===l)&&"hsv"!==a&&(h=u)):(n=r,(1===s||0===s)&&"hsv"!==a&&(h=g)):(t=i>r&&180<i-r?i-(r+360):i<r&&180<r-i?i+360-r:i-r,n=r+d*t),null==h&&(h=g+d*(u-g)),o=l+d*(s-l),b="h"===a.substr(0,1)?new e(n,h,o,a):new e(o,h,n,a);else if("rgb"===a)p=c._rgb,m=f._rgb,b=new e(p[0]+d*(m[0]-p[0]),p[1]+d*(m[1]-p[1]),p[2]+d*(m[2]-p[2]),a);else if("lab"===a)p=c.lab(),m=f.lab(),b=new e(p[0]+d*(m[0]-p[0]),p[1]+d*(m[1]-p[1]),p[2]+d*(m[2]-p[2]),a);else throw"color mode "+a+" is not supported";return b.alpha(c.alpha()+d*(f.alpha()-c.alpha())),b},e.prototype.premultiply=function(){var e,f;return f=this.rgb(),e=this.alpha(),y(f[0]*e,f[1]*e,f[2]*e,e)},e.prototype.darken=function(e){var f,d;return null==e&&(e=20),d=this,f=d.lch(),f[0]-=e,y.lch(f).alpha(d.alpha())},e.prototype.darker=function(e){return this.darken(e)},e.prototype.brighten=function(e){return null==e&&(e=20),this.darken(-e)},e.prototype.brighter=function(e){return this.brighten(e)},e.prototype.saturate=function(e){var f,d;return null==e&&(e=20),d=this,f=d.lch(),f[1]+=e,y.lch(f).alpha(d.alpha())},e.prototype.desaturate=function(e){return null==e&&(e=20),this.saturate(-e)},e}(),p=function(e){for(var f in e)3>f?(0>e[f]&&(e[f]=0),255<e[f]&&(e[f]=255)):3===f&&(0>e[f]&&(e[f]=0),1<e[f]&&(e[f]=1));return e},_=function(e){var f,d,a,t,n,r,i,o;if(e=e.toLowerCase(),null!=y.colors&&y.colors[e])return w(y.colors[e]);if(a=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(t=a.slice(1,4),d=n=0;2>=n;d=++n)t[d]=+t[d];t[3]=1}else if(a=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(t=a.slice(1,5),d=r=0;3>=r;d=++r)t[d]=+t[d];else if(a=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(t=a.slice(1,4),d=i=0;2>=i;d=++i)t[d]=$(2.55*t[d]);t[3]=1}else if(a=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(t=a.slice(1,5),d=o=0;2>=o;d=++o)t[d]=$(2.55*t[d]);t[3]=+t[3]}else(a=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?(f=a.slice(1,4),f[1]*=0.01,f[2]*=0.01,t=v(f),t[3]=1):(a=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&(f=a.slice(1,4),f[1]*=0.01,f[2]*=0.01,t=v(f),t[3]=+a[4]);return t},w=function(e){var f,d,a,t,n,r;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return(4===e.length||7===e.length)&&(e=e.substr(1)),3===e.length&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),r=parseInt(e,16),t=r>>16,a=255&r>>8,d=255&r,[t,a,d,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return 9===e.length&&(e=e.substr(1)),r=parseInt(e,16),t=255&r>>24,a=255&r>>16,d=255&r>>8,f=255&r,[t,a,d,f];if(n=_(e))return n;throw"unknown color: "+e},j=function(e,f,d){var a,t,n,r;return r=U(arguments),e=r[0],f=r[1],d=r[2],e/=360,e<1/3?(a=(1-f)/3,n=(1+f*x(c*e)/x(l-c*e))/3,t=1-(a+n)):e<2/3?(e-=1/3,n=(1-f)/3,t=(1+f*x(c*e)/x(l-c*e))/3,a=1-(n+t)):(e-=2/3,t=(1-f)/3,a=(1+f*x(c*e)/x(l-c*e))/3,n=1-(t+a)),n=R(3*(d*n)),t=R(3*(d*t)),a=R(3*(d*a)),[255*n,255*t,255*a]},v=function(){var e,f,d,a,t,n,i,r,o,l,s,c,b,h;if(b=U(arguments),a=b[0],r=b[1],n=b[2],0===r)i=d=e=255*n;else{for(s=[0,0,0],f=[0,0,0],l=0.5>n?n*(1+r):n+r-n*r,o=2*n-l,a/=360,s[0]=a+1/3,s[1]=a,s[2]=a-1/3,t=c=0;2>=c;t=++c)0>s[t]&&(s[t]+=1),1<s[t]&&(s[t]-=1),f[t]=1>6*s[t]?o+6*(l-o)*s[t]:1>2*s[t]?l:2>3*s[t]?o+6*((l-o)*(2/3-s[t])):o;h=[$(255*f[0]),$(255*f[1]),$(255*f[2])],i=h[0],d=h[1],e=h[2]}return[i,d,e]},k=function(){var e,d,f,a,o,i,l,c,r,s,t,b,h,g,u,p,m,y;return b=U(arguments),a=b[0],r=b[1],t=b[2],t*=255,0===r?c=f=e=t:(360===a&&(a=0),360<a&&(a-=360),0>a&&(a+=360),a/=60,o=n(a),d=a-o,i=t*(1-r),l=t*(1-r*d),s=t*(1-r*(1-d)),0===o?(h=[t,s,i],c=h[0],f=h[1],e=h[2]):1===o?(g=[l,t,i],c=g[0],f=g[1],e=g[2]):2===o?(u=[i,t,s],c=u[0],f=u[1],e=u[2]):3===o?(p=[i,l,t],c=p[0],f=p[1],e=p[2]):4===o?(m=[s,i,t],c=m[0],f=m[1],e=m[2]):5===o?(y=[t,i,l],c=y[0],f=y[1],e=y[2]):void 0),(c=$(c),f=$(f),e=$(e),[c,f,e])},o=18,s=0.95047,h=1,u=1.08883,z=function(){var e,f,a,t,n,r;return r=U(arguments),n=r[0],e=r[1],f=r[2],a=d(e*e+f*f),t=180*(Math.atan2(f,e)/Q),[n,a,t]},B=function(e,f,d){var a,t,n,r,i,o,l;return void 0!==e&&3===e.length&&(o=e,e=o[0],f=o[1],d=o[2]),void 0!==e&&3===e.length&&(l=e,e=l[0],f=l[1],d=l[2]),r=(e+16)/116,n=r+f/500,i=r-d/200,n=S(n)*s,r=S(r)*h,i=S(i)*u,t=M(3.2404542*n-1.5371385*r-0.4985314*i),a=M(-0.969266*n+1.8760108*r+0.041556*i),d=M(0.0556434*n-0.2040259*r+1.0572252*i),[R(t,0,255),R(a,0,255),R(d,0,255),1]},S=function(e){return 0.206893034<e?e*e*e:(e-4/29)/7.787037},M=function(e){return $(255*(0.00304>=e?12.92*e:1.055*Z(e,1/2.4)-0.055))},G=function(){var e,f,d,a;return a=U(arguments),d=a[0],e=a[1],f=a[2],f=f*Q/180,[d,I(f)*e,Math.sin(f)*e]},P=function(e,f,d){var t,n,a,i,o,r,l;return r=G(e,f,d),t=r[0],n=r[1],a=r[2],l=B(t,n,a),o=l[0],i=l[1],a=l[2],[R(o,0,255),R(i,0,255),R(a,0,255)]},A=function(e,f,d){var a;return a=U(arguments),e=a[0],f=a[1],d=a[2],e=q(e),f=q(f),d=q(d),0.2126*e+0.7152*f+0.0722*d},q=function(e){return e/=255,0.03928>=e?e/12.92:Z((e+0.055)/1.055,2.4)},C=function(){var e,f,d,a,t,n;return n=U(arguments),d=n[0],f=n[1],e=n[2],t=d<<16|f<<8|e,a="000000"+t.toString(16),"#"+a.substr(a.length-6)},L=function(){var e,f,a,t,n,i,o,r,l;return l=U(arguments),o=l[0],a=l[1],f=l[2],e=2*Q,o/=255,a/=255,f/=255,i=F(o,a,f),n=(o+a+f)/3,r=1-i/n,0===r?t=0:(t=(o-a+(o-f))/2,t/=d((o-a)*(o-a)+(o-f)*(a-f)),t=Math.acos(t),f>a&&(t=e-t),t/=e),[360*t,r,n]},O=function(e,d,a){var t,n,r,i,o,l;return void 0!==e&&3<=e.length&&(l=e,e=l[0],d=l[1],a=l[2]),e/=255,d/=255,a/=255,i=F(e,d,a),r=f(e,d,a),n=(r+i)/2,r===i?(o=0,t=H):o=0.5>n?(r-i)/(r+i):(r-i)/(2-r-i),e===r?t=(d-a)/(r-i):d===r?t=2+(a-e)/(r-i):a===r&&(t=4+(e-d)/(r-i)),t*=60,0>t&&(t+=360),[t,o,n]},Y=function(){var e,d,a,t,n,i,o,r,l,s;return s=U(arguments),o=s[0],a=s[1],e=s[2],i=F(o,a,e),n=f(o,a,e),d=n-i,l=n/255,0===n?(t=H,r=0):(r=d/n,o===n&&(t=(a-e)/d),a===n&&(t=2+(e-o)/d),e===n&&(t=4+(o-a)/d),t*=60,0>t&&(t+=360)),[t,r,l]},T=function(){var e,f,d,a,t,n,r;return r=U(arguments),d=r[0],f=r[1],e=r[2],d=N(d),f=N(f),e=N(e),a=K((0.4124564*d+0.3575761*f+0.1804375*e)/s),t=K((0.2126729*d+0.7151522*f+0.072175*e)/h),n=K((0.0193339*d+0.119192*f+0.9503041*e)/u),[116*t-16,500*(a-t),200*(t-n)]},N=function(e){return 0.04045>=(e/=255)?e/12.92:Z((e+0.055)/1.055,2.4)},K=function(e){return 0.008856<e?Z(e,1/3):7.787037*e+4/29},E=function(){var e,f,d,a,t,n,r;return n=U(arguments),t=n[0],d=n[1],f=n[2],r=T(t,d,f),a=r[0],e=r[1],f=r[2],z(a,e,f)},y.scale=function(e,d){var t,r,o,i,l,s,c,b,h,g,u,m,p,x,_,w,j,v,k,z,B;return w="rgb",j=y("#ccc"),B=0,p=!1,m=[0,1],g=[],k=!1,z=[],_=0,x=1,u=!1,v=0,h={},s=function(e,f){var d,a,t,n,r,i,o;if(null==e&&(e=["#ddd","#222"]),null!=e&&"string"===D(e)&&null!=(null==(r=y.brewer)?void 0:r[e])&&(e=y.brewer[e]),"array"===D(e)){for(e=e.slice(0),d=t=0,i=e.length-1;0<=i?t<=i:t>=i;d=0<=i?++t:--t)a=e[d],"string"===D(a)&&(e[d]=y(a));if(null!=f)z=f;else for(z=[],d=n=0,o=e.length-1;0<=o?n<=o:n>=o;d=0<=o?++n:--n)z.push(d/(e.length-1))}return l(),g=e},c=function(e){return null==e&&(e=[]),m=e,_=e[0],x=e[e.length-1],l(),v=2===e.length?0:e.length-1},o=function(e){var f,d;if(null!=m){for(d=m.length-1,f=0;f<d&&e>=m[f];)f++;return f-1}return 0},b=function(e){return e},t=function(e){var f,d,a,t,n;return n=e,2<m.length&&(t=m.length-1,f=o(e),a=m[0]+(m[1]-m[0])*(0+0.5*B),d=m[t-1]+(m[t]-m[t-1])*(1-0.5*B),n=_+(m[f]+0.5*(m[f+1]-m[f])-a)/(d-a)*(x-_)),n},i=function(e,d){var a,r,l,s,i,c,u,t,p;if(null==d&&(d=!1),isNaN(e))return j;if(d?u=e:2<m.length?(a=o(e),u=a/(v-1)):(u=l=_===x?0:(e-_)/(x-_),u=l=(e-_)/(x-_),u=F(1,f(0,u))),d||(u=b(u)),i=n(1e4*u),h[i])r=h[i];else{if("array"===D(g))for(s=t=0,p=z.length-1;0<=p?t<=p:t>=p;s=0<=p?++t:--t){if(c=z[s],u<=c){r=g[s];break}if(u>=c&&s===z.length-1){r=g[s];break}if(u>c&&u<z[s+1]){u=(u-c)/(z[s+1]-c),r=y.interpolate(g[s],g[s+1],u,w);break}}else"function"===D(g)&&(r=g(u));h[i]=r}return r},l=function(){return h={}},s(e,d),r=function(e){var f;return f=i(e),k&&f[k]?f[k]():f},r.domain=function(e,f,a,t){var n;return(null==a&&(a="e"),!arguments.length)?m:(null!=f&&(n=y.analyze(e,t),e=0===f?[n.min,n.max]:y.limits(n,a,f)),c(e),r)},r.mode=function(e){return arguments.length?(w=e,l(),r):w},r.range=function(e,f){return s(e,f),r},r.out=function(e){return k=e,r},r.spread=function(e){return arguments.length?(B=e,r):B},r.correctLightness=function(e){return arguments.length?(u=e,l(),b=u?function(e){var f,d,t,n,r,o,l,s,c;for(f=i(0,!0).lab()[0],d=i(1,!0).lab()[0],l=f>d,t=i(e,!0).lab()[0],r=f+(d-f)*e,n=t-r,s=0,c=1,o=20;0.01<a(n)&&0<o--;)(function(){return l&&(n*=-1),0>n?(s=e,e+=0.5*(c-e)):(c=e,e+=0.5*(s-e)),t=i(e,!0).lab()[0],n=t-r})();return e}:function(e){return e},r):u},r.colors=function(f){var d,a,t,n,i,o;if(null==f&&(f="hex"),e=[],a=[],2<m.length)for(d=t=1,o=m.length;1<=o?t<o:t>o;d=1<=o?++t:--t)a.push(0.5*(m[d-1]+m[d]));else a=m;for(n=0,i=a.length;n<i;n++)d=a[n],e.push(r(d)[f]());return e},r},null==(W=y.scales)&&(y.scales={}),y.scales.cool=function(){return y.scale([y.hsl(180,1,.9),y.hsl(250,.7,.4)])},y.scales.hot=function(){return y.scale(["#000","#f00","#ff0","#fff"],[0,0.25,0.75,1]).mode("rgb")},y.analyze=function(e,f,d){var a,t,n,r,i,o,l;if(n={min:V,max:-1*V,sum:0,values:[],count:0},null==d&&(d=function(){return!0}),a=function(e){null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)},i=function(e,t){if(d(e,t))return null!=f&&"function"===D(f)?a(f(e)):null!=f&&"string"===D(f)||"number"===D(f)?a(e[f]):a(e)},"array"===D(e))for(o=0,l=e.length;o<l;o++)r=e[o],i(r);else for(t in e)r=e[t],i(r,t);return n.domain=[n.min,n.max],n.limits=function(e,f){return y.limits(n,e,f)},n},y.limits=function(e,f,d){var t,r,o,l,s,c,b,i,h,g,u,m,x,_,w,j,v,k,z,p,B,S,G,P,R,A,q,C,L,O,Y,T,E,N,X,U,K,M,W,F,I,Q,H,$,J,ee,fe,de,ae,te,ne,re,ie,oe,le,se,ce=Math.log,be=Math.LOG10E;if(null==f&&(f="equal"),null==d&&(d=7),"array"===D(e)&&(e=y.analyze(e)),x=e.min,u=e.max,G=e.sum,A=e.values.sort(function(e,f){return e-f}),g=[],"c"===f.substr(0,1)&&(g.push(x),g.push(u)),"e"===f.substr(0,1)){for(g.push(x),b=q=1,K=d-1;1<=K?q<=K:q>=K;b=1<=K?++q:--q)g.push(x+b/d*(u-x));g.push(u)}else if("l"===f.substr(0,1)){if(0>=x)throw"Logarithmic scales are only possible for values > 0";for(_=be*ce(x),m=be*ce(u),g.push(x),(b=C=1,$=d-1);1<=$?C<=$:C>=$;b=1<=$?++C:--C)g.push(Z(10,_+b/d*(m-_)));g.push(u)}else if("q"===f.substr(0,1)){for(g.push(x),b=L=1,J=d-1;1<=J?L<=J:L>=J;b=1<=J?++L:--L)z=A.length*b/d,p=n(z),p===z?g.push(A[p]):(B=z-p,g.push(A[p]*B+A[p+1]*(1-B)));g.push(u)}else if("k"===f.substr(0,1)){for(j=A.length,t=Array(j),s=Array(d),S=!0,v=0,o=null,o=[],o.push(x),(b=O=1,ee=d-1);1<=ee?O<=ee:O>=ee;b=1<=ee?++O:--O)o.push(x+b/d*(u-x));for(o.push(u);S;){for(i=Y=0,fe=d-1;0<=fe?Y<=fe:Y>=fe;i=0<=fe?++Y:--Y)s[i]=0;for(b=T=0,de=j-1;0<=de?T<=de:T>=de;b=0<=de?++T:--T){for(R=A[b],w=V,(i=E=0,ae=d-1);0<=ae?E<=ae:E>=ae;i=0<=ae?++E:--E)c=a(o[i]-R),c<w&&(w=c,r=i);s[r]++,t[b]=r}for(k=Array(d),i=N=0,te=d-1;0<=te?N<=te:N>=te;i=0<=te?++N:--N)k[i]=null;for(b=X=0,ne=j-1;0<=ne?X<=ne:X>=ne;b=0<=ne?++X:--X)l=t[b],null===k[l]?k[l]=A[b]:k[l]+=A[b];for(i=U=0,M=d-1;0<=M?U<=M:U>=M;i=0<=M?++U:--U)k[i]*=1/s[i];for(S=!1,i=re=0,W=d-1;0<=W?re<=W:re>=W;i=0<=W?++re:--re)if(k[i]!==o[b]){S=!0;break}o=k,v++,200<v&&(S=!1)}for(h={},i=ie=0,F=d-1;0<=F?ie<=F:ie>=F;i=0<=F?++ie:--ie)h[i]=[];for(b=oe=0,I=j-1;0<=I?oe<=I:oe>=I;b=0<=I?++oe:--oe)l=t[b],h[l].push(A[b]);for(P=[],i=le=0,Q=d-1;0<=Q?le<=Q:le>=Q;i=0<=Q?++le:--le)P.push(h[i][0]),P.push(h[i][h[i].length-1]);for(P=P.sort(function(e,f){return e-f}),g.push(P[0]),(b=se=1,H=P.length-1);se<=H;b=se+=2)isNaN(P[b])||g.push(P[b])}return g},y.brewer=g={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},y.colors=m={indigo:"#4b0082",gold:"#ffd700",hotpink:"#ff69b4",firebrick:"#b22222",indianred:"#cd5c5c",yellow:"#ffff00",mistyrose:"#ffe4e1",darkolivegreen:"#556b2f",olive:"#808000",darkseagreen:"#8fbc8f",pink:"#ffc0cb",tomato:"#ff6347",lightcoral:"#f08080",orangered:"#ff4500",navajowhite:"#ffdead",lime:"#00ff00",palegreen:"#98fb98",darkslategrey:"#2f4f4f",greenyellow:"#adff2f",burlywood:"#deb887",seashell:"#fff5ee",mediumspringgreen:"#00fa9a",fuchsia:"#ff00ff",papayawhip:"#ffefd5",blanchedalmond:"#ffebcd",chartreuse:"#7fff00",dimgray:"#696969",black:"#000000",peachpuff:"#ffdab9",springgreen:"#00ff7f",aquamarine:"#7fffd4",white:"#ffffff",orange:"#ffa500",lightsalmon:"#ffa07a",darkslategray:"#2f4f4f",brown:"#a52a2a",ivory:"#fffff0",dodgerblue:"#1e90ff",peru:"#cd853f",lawngreen:"#7cfc00",chocolate:"#d2691e",crimson:"#dc143c",forestgreen:"#228b22",darkgrey:"#a9a9a9",lightseagreen:"#20b2aa",cyan:"#00ffff",mintcream:"#f5fffa",silver:"#c0c0c0",antiquewhite:"#faebd7",mediumorchid:"#ba55d3",skyblue:"#87ceeb",gray:"#808080",darkturquoise:"#00ced1",goldenrod:"#daa520",darkgreen:"#006400",floralwhite:"#fffaf0",darkviolet:"#9400d3",darkgray:"#a9a9a9",moccasin:"#ffe4b5",saddlebrown:"#8b4513",grey:"#808080",darkslateblue:"#483d8b",lightskyblue:"#87cefa",lightpink:"#ffb6c1",mediumvioletred:"#c71585",slategrey:"#708090",red:"#ff0000",deeppink:"#ff1493",limegreen:"#32cd32",darkmagenta:"#8b008b",palegoldenrod:"#eee8aa",plum:"#dda0dd",turquoise:"#40e0d0",lightgrey:"#d3d3d3",lightgoldenrodyellow:"#fafad2",darkgoldenrod:"#b8860b",lavender:"#e6e6fa",maroon:"#800000",yellowgreen:"#9acd32",sandybrown:"#f4a460",thistle:"#d8bfd8",violet:"#ee82ee",navy:"#000080",magenta:"#ff00ff",dimgrey:"#696969",tan:"#d2b48c",rosybrown:"#bc8f8f",olivedrab:"#6b8e23",blue:"#0000ff",lightblue:"#add8e6",ghostwhite:"#f8f8ff",honeydew:"#f0fff0",cornflowerblue:"#6495ed",slateblue:"#6a5acd",linen:"#faf0e6",darkblue:"#00008b",powderblue:"#b0e0e6",seagreen:"#2e8b57",darkkhaki:"#bdb76b",snow:"#fffafa",sienna:"#a0522d",mediumblue:"#0000cd",royalblue:"#4169e1",lightcyan:"#e0ffff",green:"#008000",mediumpurple:"#9370db",midnightblue:"#191970",cornsilk:"#fff8dc",paleturquoise:"#afeeee",bisque:"#ffe4c4",slategray:"#708090",darkcyan:"#008b8b",khaki:"#f0e68c",wheat:"#f5deb3",teal:"#008080",darkorchid:"#9932cc",deepskyblue:"#00bfff",salmon:"#fa8072",darkred:"#8b0000",steelblue:"#4682b4",palevioletred:"#db7093",lightslategray:"#778899",aliceblue:"#f0f8ff",lightslategrey:"#778899",lightgreen:"#90ee90",orchid:"#da70d6",gainsboro:"#dcdcdc",mediumseagreen:"#3cb371",lightgray:"#d3d3d3",mediumturquoise:"#48d1cc",lemonchiffon:"#fffacd",cadetblue:"#5f9ea0",lightyellow:"#ffffe0",lavenderblush:"#fff0f5",coral:"#ff7f50",purple:"#800080",aqua:"#00ffff",whitesmoke:"#f5f5f5",mediumslateblue:"#7b68ee",darkorange:"#ff8c00",mediumaquamarine:"#66cdaa",darksalmon:"#e9967a",beige:"#f5f5dc",blueviolet:"#8a2be2",azure:"#f0ffff",lightsteelblue:"#b0c4de",oldlace:"#fdf5e6"},D=function(){var e,f,d,a,t;for(e={},t=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"],(d=0,a=t.length);d<a;d++)f=t[d],e["[object "+f+"]"]=f.toLowerCase();return function(f){var d;return d=Object.prototype.toString.call(f),e[d]||"object"}}(),R=function(e,f,d){return null==f&&(f=0),null==d&&(d=1),e<f&&(e=f),e>d&&(e=d),e},U=function(e){return 3<=e.length?e:e[0]},c=2*Q,l=Q/3,x=I,b=function(e){var f,d,a,t,n,r,o,l,i,s,c;return e=function(){var f,d,a;for(a=[],f=0,d=e.length;f<d;f++)t=e[f],a.push(y(t));return a}(),2===e.length?(i=function(){var f,d,a;for(a=[],f=0,d=e.length;f<d;f++)t=e[f],a.push(t.lab());return a}(),n=i[0],r=i[1],f=function(e){var f,d;return d=function(){var d,a;for(a=[],f=d=0;2>=d;f=++d)a.push(n[f]+e*(r[f]-n[f]));return a}(),y.lab.apply(y,d)}):3===e.length?(s=function(){var f,d,a;for(a=[],f=0,d=e.length;f<d;f++)t=e[f],a.push(t.lab());return a}(),n=s[0],r=s[1],o=s[2],f=function(e){var f,d;return d=function(){var d,a;for(a=[],f=d=0;2>=d;f=++d)a.push((1-e)*(1-e)*n[f]+2*(1-e)*e*r[f]+e*e*o[f]);return a}(),y.lab.apply(y,d)}):4===e.length?(c=function(){var f,d,a;for(a=[],f=0,d=e.length;f<d;f++)t=e[f],a.push(t.lab());return a}(),n=c[0],r=c[1],o=c[2],l=c[3],f=function(e){var f,d;return d=function(){var d,a;for(a=[],f=d=0;2>=d;f=++d)a.push((1-e)*(1-e)*(1-e)*n[f]+3*(1-e)*(1-e)*e*r[f]+3*(1-e)*e*e*o[f]+e*e*e*l[f]);return a}(),y.lab.apply(y,d)}):5===e.length&&(d=b(e.slice(0,3)),a=b(e.slice(2,5)),f=function(e){return 0.5>e?d(2*e):a(2*(e-0.5))}),f},y.interpolate.bezier=b}).call(this)},{}],"/home/christophe/trianglify/node_modules/delaunator/index.js":[function(e,f){"use strict";function t(f,a,n){a||(a=m),n||(n=_);for(var g=Infinity,u=Infinity,w=-Infinity,j=-Infinity,v=this.coords=[],z=this.ids=new Uint32Array(f.length),B=0;B<f.length;B++){var i=f[B],p=a(i),x=n(i);z[B]=B,v[2*B]=p,v[2*B+1]=x,p<g&&(g=p),x<u&&(u=x),p>w&&(w=p),x>j&&(j=x)}var y,S,G,P=(g+w)/2,R=(u+j)/2,A=Infinity;for(B=0;B<f.length;B++){var C=r(P,R,v[2*B],v[2*B+1]);C<A&&(y=B,A=C)}for(A=Infinity,B=0;B<f.length;B++)B!==y&&(C=r(v[2*y],v[2*y+1],v[2*B],v[2*B+1]),C<A&&0<C&&(S=B,A=C));var L=Infinity;for(B=0;B<f.length;B++)if(B!==y&&B!==S){var O=l(v[2*y],v[2*y+1],v[2*S],v[2*S+1],v[2*B],v[2*B+1]);O<L&&(G=B,L=O)}if(L===Infinity)throw new Error("No Delaunay triangulation exists for this input.");if(0>o(v[2*y],v[2*y+1],v[2*S],v[2*S+1],v[2*G],v[2*G+1])){var Y=S;S=G,G=Y}var T=v[2*y],E=v[2*y+1],N=v[2*S],X=v[2*S+1],D=v[2*G],U=v[2*G+1],K=s(T,E,N,X,D,U);for(this._cx=K.x,this._cy=K.y,h(z,v,0,z.length-1,K.x,K.y),this._hashSize=Math.ceil(d(f.length)),this._hash=[],B=0;B<this._hashSize;B++)this._hash[B]=null;var M=this.hull=c(v,y);this._hashEdge(M),M.t=0,M=c(v,S,M),this._hashEdge(M),M.t=1,M=c(v,G,M),this._hashEdge(M),M.t=2;var e=2*f.length-5,W=this.triangles=new Uint32Array(3*e),V=this.halfedges=new Int32Array(3*e);this.trianglesLen=0,this._addTriangle(y,S,G,-1,-1,-1);for(var F,I,Z=0;Z<z.length;Z++)if(B=z[Z],p=v[2*B],x=v[2*B+1],(p!==F||x!==I)&&(F=p,I=x,(p!==T||x!==E)&&(p!==N||x!==X)&&(p!==D||x!==U))){var k,Q=this._hashKey(p,x),H=Q;do k=this._hash[H],H=(H+1)%this._hashSize;while((!k||k.removed)&&H!==Q);for(M=k;0<=o(p,x,M.x,M.y,M.next.x,M.next.y);)if(M=M.next,M===k)throw new Error("Something is wrong with the input points.");var $=M===k,J=this._addTriangle(M.i,B,M.next.i,-1,-1,M.t);M.t=J,M=c(v,B,M),M.t=this._legalize(J+2),M.prev.prev.t===V[J+1]&&(M.prev.prev.t=J+2);for(var t=M.next;0>o(p,x,t.x,t.y,t.next.x,t.next.y);)J=this._addTriangle(t.i,B,t.next.i,t.prev.t,-1,t.t),t.prev.t=this._legalize(J+2),this.hull=b(t),t=t.next;if($)for(t=M.prev;0>o(p,x,t.prev.x,t.prev.y,t.x,t.y);)J=this._addTriangle(t.prev.i,B,t.i,-1,t.t,t.prev.t),this._legalize(J+2),t.prev.t=J,this.hull=b(t),t=t.prev;this._hashEdge(M),this._hashEdge(M.prev)}this.triangles=W.subarray(0,this.trianglesLen),this.halfedges=V.subarray(0,this.trianglesLen)}function r(e,f,d,a){var t=e-d,n=f-a;return t*t+n*n}function o(e,f,d,a,t,n){return(a-f)*(t-d)-(d-e)*(n-a)}function i(e,f,d,a,t,n,r,i){e-=r,f-=i,d-=r,a-=i,t-=r,n-=i;var o=e*e+f*f,l=d*d+a*a,s=t*t+n*n;return 0>e*(a*s-l*n)-f*(d*s-l*t)+o*(d*n-a*t)}function l(e,f,a,t,n,r){a-=e,t-=f,n-=e,r-=f;var i=a*a+t*t,o=n*n+r*r;if(0==i||0==o)return Infinity;var l=a*r-t*n;if(0==l)return Infinity;var d=0.5*(r*i-t*o)/l,s=0.5*(a*o-n*i)/l;return d*d+s*s}function s(e,f,a,t,n,r){a-=e,t-=f,n-=e,r-=f;var i=a*a+t*t,o=n*n+r*r,l=a*r-t*n,d=0.5*(r*i-t*o)/l,s=0.5*(a*o-n*i)/l;return{x:e+d,y:f+s}}function c(e,f,d){var a={i:f,x:e[2*f],y:e[2*f+1],t:0,prev:null,next:null,removed:!1};return d?(a.next=d.next,a.prev=d,d.next.prev=a,d.next=a):(a.prev=a,a.next=a),a}function b(e){return e.prev.next=e.next,e.next.prev=e.prev,e.removed=!0,e.prev}function h(e,f,d,a,t,n){var r,i,o;if(20>=a-d)for(r=d+1;r<=a;r++){for(o=e[r],i=r-1;i>=d&&0<g(f,e[i],o,t,n);)e[i+1]=e[i--];e[i+1]=o}else{for(r=d+1,i=a,u(e,d+a>>1,r),0<g(f,e[d],e[a],t,n)&&u(e,d,a),0<g(f,e[r],e[a],t,n)&&u(e,r,a),0<g(f,e[d],e[r],t,n)&&u(e,d,r),o=e[r];;){do r++;while(0>g(f,e[r],o,t,n));do i--;while(0<g(f,e[i],o,t,n));if(i<r)break;u(e,r,i)}e[d+1]=e[i],e[i]=o,a-r+1>=i-d?(h(e,f,r,a,t,n),h(e,f,d,i-1,t,n)):(h(e,f,d,i-1,t,n),h(e,f,r,a,t,n))}}function g(e,f,d,a,t){var n=r(e[2*f],e[2*f+1],a,t),i=r(e[2*d],e[2*d+1],a,t);return n-i||e[2*f]-e[2*d]||e[2*f+1]-e[2*d+1]}function u(e,f,d){var a=e[f];e[f]=e[d],e[d]=a}function m(e){return e[0]}function _(e){return e[1]}f.exports=t,t.prototype={_hashEdge:function(f){this._hash[this._hashKey(f.x,f.y)]=f},_hashKey:function(e,f){var d=e-this._cx,t=f-this._cy,r=1-d/(a(d)+a(t));return n((2+(0>t?-r:r))/4*this._hashSize)},_legalize:function(e){var f=this.triangles,d=this.coords,a=this.halfedges,t=a[e],n=e-e%3,r=t-t%3,o=n+(e+2)%3,l=r+(t+2)%3,s=f[o],c=f[e],b=f[n+(e+1)%3],h=f[l],g=i(d[2*s],d[2*s+1],d[2*c],d[2*c+1],d[2*b],d[2*b+1],d[2*h],d[2*h+1]);return g?(f[e]=h,f[t]=s,this._link(e,a[l]),this._link(t,a[o]),this._link(o,l),this._legalize(e),this._legalize(r+(t+1)%3)):o},_link:function(e,f){this.halfedges[e]=f,-1!==f&&(this.halfedges[f]=e)},_addTriangle:function(e,f,d,n,a,r){var i=this.trianglesLen;return this.triangles[i]=e,this.triangles[i+1]=f,this.triangles[i+2]=d,this._link(i,n),this._link(i+1,a),this._link(i+2,r),this.trianglesLen+=3,i}}},{}],"/home/christophe/trianglify/node_modules/process/browser.js":[function(e,f){function d(){if(!r){r=!0;for(var e,f=n.length;f;){e=n,n=[];for(var d=-1;++d<f;)e[d]();f=n.length}r=!1}}function a(){}var t=f.exports={},n=[],r=!1;t.nextTick=function(e){n.push(e),r||setTimeout(d,0)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=a,t.addListener=a,t.once=a,t.off=a,t.removeListener=a,t.removeAllListeners=a,t.emit=a,t.binding=function(){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],"/home/christophe/trianglify/node_modules/seedrandom/index.js":[function(e,f){var d=e("./lib/alea"),a=e("./lib/xor128"),t=e("./lib/xorwow"),n=e("./lib/xorshift7"),r=e("./lib/xor4096"),i=e("./lib/tychei"),o=e("./seedrandom");o.alea=d,o.xor128=a,o.xorwow=t,o.xorshift7=n,o.xor4096=r,o.tychei=i,f.exports=o},{"./lib/alea":"/home/christophe/trianglify/node_modules/seedrandom/lib/alea.js","./lib/tychei":"/home/christophe/trianglify/node_modules/seedrandom/lib/tychei.js","./lib/xor128":"/home/christophe/trianglify/node_modules/seedrandom/lib/xor128.js","./lib/xor4096":"/home/christophe/trianglify/node_modules/seedrandom/lib/xor4096.js","./lib/xorshift7":"/home/christophe/trianglify/node_modules/seedrandom/lib/xorshift7.js","./lib/xorwow":"/home/christophe/trianglify/node_modules/seedrandom/lib/xorwow.js","./seedrandom":"/home/christophe/trianglify/node_modules/seedrandom/seedrandom.js"}],"/home/christophe/trianglify/node_modules/seedrandom/lib/alea.js":[function(f,d){(function(e,f,d){function a(e){var f=this,d=r();f.next=function(){var e=2091639*f.s0+2.3283064365386963e-10*f.c;return f.s0=f.s1,f.s1=f.s2,f.s2=e-(f.c=0|e)},f.c=1,f.s0=d(" "),f.s1=d(" "),f.s2=d(" "),f.s0-=d(e),0>f.s0&&(f.s0+=1),f.s1-=d(e),0>f.s1&&(f.s1+=1),f.s2-=d(e),0>f.s2&&(f.s2+=1),d=null}function t(e,f){return f.c=e.c,f.s0=e.s0,f.s1=e.s1,f.s2=e.s2,f}function n(e,f){var d=new a(e),n=f&&f.state,r=d.next;return r.int32=function(){return 0|4294967296*d.next()},r.double=function(){return r()+1.1102230246251565e-16*(0|2097152*r())},r.quick=r,n&&("object"==typeof n&&t(n,d),r.state=function(){return t(d,{})}),r}function r(){var e=4022871197;return function(f){f=f.toString();for(var d=0;d<f.length;d++){e+=f.charCodeAt(d);var a=0.02519603282416938*e;e=a>>>0,a-=e,a*=e,e=a>>>0,a-=e,e+=4294967296*a}return 2.3283064365386963e-10*(e>>>0)}}f&&f.exports?f.exports=n:d&&d.amd?d(function(){return n}):this.alea=n})(this,"object"==typeof d&&d,"function"==typeof e&&e)},{}],"/home/christophe/trianglify/node_modules/seedrandom/lib/tychei.js":[function(f,d){(function(e,f,d){function a(e){var f=this,d="";f.next=function(){var e=f.b,t=f.c,n=f.d,d=f.a;return e=e<<25^e>>>7^t,t=0|t-n,n=n<<24^n>>>8^d,d=0|d-e,f.b=e=e<<20^e>>>12^t,f.c=t=0|t-n,f.d=n<<16^t>>>16^d,f.a=0|d-e},f.a=0,f.b=0,f.c=-1640531527,f.d=1367130551,e===n(e)?(f.a=0|e/4294967296,f.b=0|e):d+=e;for(var a=0;a<d.length+20;a++)f.b^=0|d.charCodeAt(a),f.next()}function t(e,f){return f.a=e.a,f.b=e.b,f.c=e.c,f.d=e.d,f}function r(e,f){var d=new a(e),n=f&&f.state,r=function(){return(d.next()>>>0)/4294967296};return r.double=function(){do var e=d.next()>>>11,f=(d.next()>>>0)/4294967296,a=(e+f)/2097152;while(0===a);return a},r.int32=d.next,r.quick=r,n&&("object"==typeof n&&t(n,d),r.state=function(){return t(d,{})}),r}f&&f.exports?f.exports=r:d&&d.amd?d(function(){return r}):this.tychei=r})(this,"object"==typeof d&&d,"function"==typeof e&&e)},{}],"/home/christophe/trianglify/node_modules/seedrandom/lib/xor128.js":[function(f,d){(function(e,f,d){function a(e){var f=this,d="";f.x=0,f.y=0,f.z=0,f.w=0,f.next=function(){var e=f.x^f.x<<11;return f.x=f.y,f.y=f.z,f.z=f.w,f.w^=f.w>>>19^e^e>>>8},e===(0|e)?f.x=e:d+=e;for(var a=0;a<d.length+64;a++)f.x^=0|d.charCodeAt(a),f.next()}function t(e,f){return f.x=e.x,f.y=e.y,f.z=e.z,f.w=e.w,f}function n(e,f){var d=new a(e),n=f&&f.state,r=function(){return(d.next()>>>0)/4294967296};return r.double=function(){do var e=d.next()>>>11,f=(d.next()>>>0)/4294967296,a=(e+f)/2097152;while(0===a);return a},r.int32=d.next,r.quick=r,n&&("object"==typeof n&&t(n,d),r.state=function(){return t(d,{})}),r}f&&f.exports?f.exports=n:d&&d.amd?d(function(){return n}):this.xor128=n})(this,"object"==typeof d&&d,"function"==typeof e&&e)},{}],"/home/christophe/trianglify/node_modules/seedrandom/lib/xor4096.js":[function(d,a){(function(e,d,a){function t(e){var d=this;d.next=function(){var e,f,a=d.w,t=d.X,n=d.i;return d.w=a=0|a+1640531527,f=t[127&n+34],e=t[n=127&n+1],f^=f<<13,e^=e<<17,f^=f>>>15,e^=e>>>12,f=t[n]=f^e,d.i=n,0|f+(a^a>>>16)},function(e,d){var a,t,n,r,i,o=[],l=128;for(d===(0|d)?(t=d,d=null):(d+="\0",t=0,l=f(l,d.length)),n=0,r=-32;r<l;++r)d&&(t^=d.charCodeAt((r+32)%d.length)),0===r&&(i=t),t^=t<<10,t^=t>>>15,t^=t<<4,t^=t>>>13,0<=r&&(i=0|i+1640531527,a=o[127&r]^=t+i,n=0==a?n+1:0);for(128<=n&&(o[127&(d&&d.length||0)]=-1),n=127,r=512;0<r;--r)t=o[127&n+34],a=o[n=127&n+1],t^=t<<13,a^=a<<17,t^=t>>>15,a^=a>>>12,o[n]=t^a;e.w=i,e.X=o,e.i=n}(d,e)}function n(e,f){return f.i=e.i,f.w=e.w,f.X=e.X.slice(),f}function r(e,f){null==e&&(e=+new Date);var d=new t(e),a=f&&f.state,r=function(){return(d.next()>>>0)/4294967296};return r.double=function(){do var e=d.next()>>>11,f=(d.next()>>>0)/4294967296,a=(e+f)/2097152;while(0===a);return a},r.int32=d.next,r.quick=r,a&&(a.X&&n(a,d),r.state=function(){return n(d,{})}),r}d&&d.exports?d.exports=r:a&&a.amd?a(function(){return r}):this.xor4096=r})(this,"object"==typeof a&&a,"function"==typeof e&&e)},{}],"/home/christophe/trianglify/node_modules/seedrandom/lib/xorshift7.js":[function(f,d){(function(e,f,d){function a(e){var f=this;f.next=function(){var e,d,a=f.x,t=f.i;return e=a[t],e^=e>>>7,d=e^e<<24,e=a[7&t+1],d^=e^e>>>10,e=a[7&t+3],d^=e^e>>>3,e=a[7&t+4],d^=e^e<<7,e=a[7&t+7],e^=e<<13,d^=e^e<<9,a[t]=d,f.i=7&t+1,d},function(e,f){var d,a,t=[];if(f===(0|f))a=t[0]=f;else for(f=""+f,d=0;d<f.length;++d)t[7&d]=t[7&d]<<15^f.charCodeAt(d)+t[7&d+1]<<13;for(;8>t.length;)t.push(0);for(d=0;8>d&&0===t[d];++d);for(a=8==d?t[7]=-1:t[d],e.x=t,e.i=0,d=256;0<d;--d)e.next()}(f,e)}function t(e,f){return f.x=e.x.slice(),f.i=e.i,f}function n(e,f){null==e&&(e=+new Date);var d=new a(e),n=f&&f.state,r=function(){return(d.next()>>>0)/4294967296};return r.double=function(){do var e=d.next()>>>11,f=(d.next()>>>0)/4294967296,a=(e+f)/2097152;while(0===a);return a},r.int32=d.next,r.quick=r,n&&(n.x&&t(n,d),r.state=function(){return t(d,{})}),r}f&&f.exports?f.exports=n:d&&d.amd?d(function(){return n}):this.xorshift7=n})(this,"object"==typeof d&&d,"function"==typeof e&&e)},{}],"/home/christophe/trianglify/node_modules/seedrandom/lib/xorwow.js":[function(f,d){(function(e,f,d){function a(e){var f=this,d="";f.next=function(){var e=f.x^f.x>>>2;return f.x=f.y,f.y=f.z,f.z=f.w,f.w=f.v,0|(f.d=0|f.d+362437)+(f.v=f.v^f.v<<4^(e^e<<1))},f.x=0,f.y=0,f.z=0,f.w=0,f.v=0,e===(0|e)?f.x=e:d+=e;for(var a=0;a<d.length+64;a++)f.x^=0|d.charCodeAt(a),a==d.length&&(f.d=f.x<<10^f.x>>>4),f.next()}function t(e,f){return f.x=e.x,f.y=e.y,f.z=e.z,f.w=e.w,f.v=e.v,f.d=e.d,f}function n(e,f){var d=new a(e),n=f&&f.state,r=function(){return(d.next()>>>0)/4294967296};return r.double=function(){do var e=d.next()>>>11,f=(d.next()>>>0)/4294967296,a=(e+f)/2097152;while(0===a);return a},r.int32=d.next,r.quick=r,n&&("object"==typeof n&&t(n,d),r.state=function(){return t(d,{})}),r}f&&f.exports?f.exports=n:d&&d.amd?d(function(){return n}):this.xorwow=n})(this,"object"==typeof d&&d,"function"==typeof e&&e)},{}],"/home/christophe/trianglify/node_modules/seedrandom/seedrandom.js":[function(f,d){(function(a,t){function n(e,f,d){var n=[];f=!0==f?{entropy:!0}:f||{};var b=l(o(f.entropy?[e,c(a)]:null==e?s():e,3),n),h=new r(n),x=function(){for(var e=h.g(u),f=m,d=0;e<y;)e=(e+d)*g,f*=g,d=h.g(1);for(;e>=_;)e/=2,f/=2,d>>>=1;return(e+d)/f};return x.int32=function(){return 0|h.g(4)},x.quick=function(){return h.g(4)/4294967296},x.double=x,l(c(h.S),a),(f.pass||d||function(e,f,d,a){return a&&(a.S&&i(a,h),e.state=function(){return i(h,{})}),d?(t[p]=e,f):e})(x,b,"global"in f?f.global:this==t,f.state)}function r(e){var f,d=e.length,a=this,t=0,n=a.i=a.j=0,r=a.S=[];for(d||(e=[d++]);t<g;)r[t]=t++;for(t=0;t<g;t++)r[t]=r[n=x&n+e[t%d]+(f=r[t])],r[n]=f;(a.g=function(e){for(var f,d=0,t=a.i,n=a.j,r=a.S;e--;)f=r[t=x&t+1],d=d*g+r[x&(r[t]=r[n=x&n+f])+(r[n]=f)];return a.i=t,a.j=n,d})(g)}function i(e,f){return f.i=e.i,f.j=e.j,f.S=e.S.slice(),f}function o(e,f){var d,a=[],t=typeof e;if(f&&"object"==t)for(d in e)try{a.push(o(e[d],f-1))}catch(f){}return a.length?a:"string"==t?e:e+"\0"}function l(e,f){for(var d,a=e+"",t=0;t<a.length;)f[x&t]=x&(d^=19*f[x&t])+a.charCodeAt(t++);return c(f)}function s(){try{var e;return b&&(e=b.randomBytes)?e=e(g):(e=new Uint8Array(g),(h.crypto||h.msCrypto).getRandomValues(e)),c(e)}catch(t){var f=h.navigator,d=f&&f.plugins;return[+new Date,h,d,h.screen,c(a)]}}function c(e){return String.fromCharCode.apply(0,e)}var b,h=this,g=256,u=6,p="random",m=t.pow(g,u),y=t.pow(2,52),_=2*y,x=g-1;if(t["seed"+p]=n,l(t.random(),a),"object"==typeof d&&d.exports){d.exports=n;try{b=f("crypto")}catch(e){}}else"function"==typeof e&&e.amd&&e(function(){return n})})([],Math)},{crypto:!1}]},{},["./lib/trianglify.js"])("./lib/trianglify.js")});