!function(e){if(“object”==typeof exports&&“undefined”!=typeof module)module.exports=e();else if(“function”==typeof define&&define.amd)define([],e);else{var r;r=“undefined”!=typeof window?window:“undefined”!=typeof global?global:“undefined”!=typeof self?self:this,r.Trianglify=e()}}(function(){var e;return function r(e,f,n){function t(o,c){if(!f){if(!e){var u=“function”==typeof require&&require;if(!c&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error(“Cannot find module '”o“'”);throw l.code=“MODULE_NOT_FOUND”,l}var i=f={exports:{}};e[0].call(i.exports,function®{var f=e[1];return t(f?f:r)},i,i.exports,r,e,f,n)}return f.exports}for(var a=“function”==typeof require&&require,o=0;o);return t}({“./lib/trianglify.js”:[function(e,r){function f(e){function r(e,r,f){return(e-r)*(f-f)/(r-r)+f}function f(f,n){for(var t=[],a=-y;f+y>a;a+=e.cell_size)for(var o=-v;n+v>o;o+=e.cell_size){var c=a+e.cell_size/2+r(rand(),,[-w,w]),u=o+e.cell_size/2+r(rand(),,[-w,w]);t.push(.map(Math.floor))}return t}function o(e){return{x:(e[0]+e[0]+e[0])/3,y:(e[1]+e[1]+e[1])/3}}function l(){if(e.palette instanceof Array)return e.palette;var r=Object.keys(e.palette);return e.palette[r]}function i(e,r){var f={};for(var n in e)f=e;for(n in r){if(!e.hasOwnProperty(n))throw new Error(n+“ is not a configuration option for Trianglify. Check your spelling?”);f=r}return f}if(e=i(u,e),rand=t(e.seed),“random”===e.x_colors&&(e.x_colors=l()),“random”===e.y_colors&&(e.y_colors=l()),“match_x”===e.y_colors&&(e.y_colors=e.x_colors),!(e.width>0&&e.height>0))throw new Error(“Width and height must be numbers greater than 0”);if(e.cell_size<2)throw new Error(“Cell size must be greater than 2.”);var d;if(e.color_function)d=function(r,f){return a(e.color_function(r,f))};else{var s=a.scale(e.x_colors).mode(e.color_space),b=a.scale(e.y_colors).mode(e.color_space);d=function(r,f){return a.interpolate(s®,b(f),.5,e.color_space)}}for(var h=e.width,g=e.height,p=Math.floor((h+4*e.cell_size)/e.cell_size),m=Math.floor((g+4*e.cell_size)/e.cell_size),y=(p*e.cell_size-h)/2,v=(m*e.cell_size-g)/2,w=e.cell_size*e.variance/2,_=function(e){return r(e,,[0,1])},k=function(e){return r(e,,[0,1])},x=f(h,g),M=n.triangulate(x),j=[],N=function(e){return x},P=0;P<M.length;P+=3){var q=[M,M,M].map(N),A=o(q),G=d(_(A.x),k(A.y)).hex();j.push()}return c(j,e)}var n=e(“delaunay-fast”),t=e(“seedrandom”),a=e(“chroma-js”),o=e(“./colorbrewer”),c=e(“./pattern”),u={width:600,height:400,cell_size:75,variance:.75,seed:null,x_colors:“random”,y_colors:“match_x”,palette:o,color_space:“lab”,color_function:null,stroke_width:1.51};f.colorbrewer=o,f.defaults=u,r.exports=f},{“./colorbrewer”:“/Users/qrohlf/Projects/trianglify/lib/colorbrewer.js”,“./pattern”:“/Users/qrohlf/Projects/trianglify/lib/pattern.js”,“chroma-js”:“/Users/qrohlf/Projects/trianglify/node_modules/chroma-js/chroma.js”,“delaunay-fast”:“/Users/qrohlf/Projects/trianglify/node_modules/delaunay-fast/delaunay.js”,seedrandom:“/Users/qrohlf/Projects/trianglify/node_modules/seedrandom/seedrandom.js”}],“/Users/qrohlf/Projects/trianglify/lib/colorbrewer.js”:[function(e,r){r.exports={YlGn:,YlGnBu:,GnBu:,BuGn:,PuBuGn:,PuBu:,BuPu:,RdPu:,PuRd:,OrRd:,YlOrRd:,YlOrBr:,Purples:,Blues:,Greens:,Oranges:,Reds:,Greys:,PuOr:,BrBG:,PRGn:,PiYG:,RdBu:,RdGy:,RdYlBu:,Spectral:,RdYlGn:}},{}],“/Users/qrohlf/Projects/trianglify/lib/pattern.js”:[function(e,r){function f(e,r){function f(){var f=n.createElementNS(“www.w3.org/2000/svg”,“svg”);return f.setAttribute(“width”,r.width),f.setAttribute(“height”,r.height),e.forEach(function(e){var t=n.createElementNS(“http://www.w3.org/2000/svg”,“path”);t.setAttribute(“d”,“M”+e[1].join(“L”)+“Z”),t.setAttribute(“fill”,e[0]),t.setAttribute(“stroke”,e[0]),t.setAttribute(“stroke-width”,r.stroke_width),f.appendChild(t)}),f}function t(f){return f||(f=n.createElement(“canvas”)),f.setAttribute(“width”,r.width),f.setAttribute(“height”,r.height),ctx=f.getContext(“2d”),ctx.canvas.width=r.width,ctx.canvas.height=r.height,e.forEach(function(e){ctx.fillStyle=ctx.strokeStyle=e,ctx.lineWidth=r.stroke_width,ctx.beginPath(),ctx.moveTo.apply(ctx,e[0]),ctx.lineTo.apply(ctx,e[1]),ctx.lineTo.apply(ctx,e[2]),ctx.fill(),ctx.stroke()}),f}function a(){return t().toDataURL(“image/png”)}return{polys:e,opts:r,svg:f,canvas:t,png:a}}var n=“undefined”!=typeof document?document:e(“jsdom”).jsdom(“<html/>”);r.exports=f},{jsdom:“/Users/qrohlf/Projects/trianglify/node_modules/browserify/node_modules/browser-resolve/empty.js”}],“/Users/qrohlf/Projects/trianglify/node_modules/browserify/node_modules/browser-resolve/empty.js”:,“/Users/qrohlf/Projects/trianglify/node_modules/chroma-js/chroma.js”:[function(r,f,n){(function(){var r,t,a,o,c,u,l,i,d,s,b,h,g,p,m,y,v,w,_,k,x,M,j,N,P,q,A,G,B,I,E,R,S,O,U,z,Y,T,C;s=function(e,f,n,t){return new r(e,f,n,t)},“undefined”!=typeof f&&null!==f&&null!=f.exports&&(f.exports=s),“function”==typeof e&&e.amd?e([],function(){return s}):(O=“undefined”!=typeof n&&null!==n?n:this,O.chroma=s),s.color=function(e,f,n,t){return new r(e,f,n,t)},s.hsl=function(e,f,n,t){return new r(e,f,n,t,“hsl”)},s.hsv=function(e,f,n,t){return new r(e,f,n,t,“hsv”)},s.rgb=function(e,f,n,t){return new r(e,f,n,t,“rgb”)},s.hex=function(e){return new r(e)},s.css=function(e){return new r(e)},s.lab=function(e,f,n){return new r(e,f,n,“lab”)},s.lch=function(e,f,n){return new r(e,f,n,“lch”)},s.hsi=function(e,f,n){return new r(e,f,n,“hsi”)},s.gl=function(e,f,n,t){return new r(255*e,255*f,255*n,t,“gl”)},s.interpolate=function(e,f,n,t){return null==e||null==f?“#000”:(“string”===U(e)&&(e=new r(e)),“string”===U(f)&&(f=new r(f)),e.interpolate(n,f,t))},s.mix=s.interpolate,s.contrast=function(e,f){var n,t;return“string”===U(e)&&(e=new r(e)),“string”===U(f)&&(f=new r(f)),n=e.luminance(),t=f.luminance(),n>t?(n+.05)/(t+.05):(t+.05)/(n+.05)},s.luminance=function(e){return s(e).luminance()},s._Color=r,r=function(){function e(){var e,r,f,n,t,a,o,c,u,l,i,d,s,h,g,p;for(t=this,f=[],l=0,i=arguments.length;i>l;l++)r=arguments,null!=r&&f.push®;if(0===f.length)d=,o=d,c=d,u=d,e=d,n=d;else if(“array”===U(f)){if(3===f.length)s=f,o=s,c=s,u=s,e=1;else{if(4!==f.length)throw“unknown input argument”;h=f,o=h,c=h,u=h,e=h}n=null!=(g=f)?g:“rgb”}else“string”===U(f)?(o=f,n=“hex”):“object”===U(f)?(p=f._rgb,o=p,c=p,u=p,e=p,n=“rgb”):f.length>=3&&(o=f,c=f,u=f);3===f.length?(n=“rgb”,e=1):4===f.length?“string”===U(f)?(n=f,e=1):“number”===U(f)&&(n=“rgb”,e=f):5===f.length&&(e=f,n=f),null==e&&(e=1),“rgb”===n?t._rgb=:“gl”===n?t._rgb=:“hsl”===n?(t._rgb=v(o,c,u),t._rgb=e):“hsv”===n?(t._rgb=w(o,c,u),t._rgb=e):“hex”===n?t._rgb=m(o):“lab”===n?(t._rgb=k(o,c,u),t._rgb=e):“lch”===n?(t._rgb=j(o,c,u),t._rgb=e):“hsi”===n&&(t._rgb=y(o,c,u),t._rgb=e),a=b(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 A(this._rgb)},e.prototype.toString=function(){return this.name()},e.prototype.hsl=function(){return B(this._rgb)},e.prototype.hsv=function(){return I(this._rgb)},e.prototype.lab=function(){return E(this._rgb)},e.prototype.lch=function(){return R(this._rgb)},e.prototype.hsi=function(){return G(this._rgb)},e.prototype.gl=function(){return[this._rgb/255,this._rgb/255,this._rgb/255,this._rgb]},e.prototype.luminance=function(r,f){var n,t,a,o;return null==f&&(f=“rgb”),arguments.length?(0===r&&(this._rgb=[0,0,0,this._rgb]),1===r&&(this._rgb=[255,255,255,this._rgb]),n=P(this._rgb),t=1e-7,a=20,o=function(e,n){var c,u;return u=e.interpolate(.5,n,f),c=u.luminance(),Math.abs(r-c)<t||!a–?u:c>r?o(e,u):o(u,n)},this._rgb=(n>r?o(new e(“black”),this):o(this,new e(“white”))).rgba(),this):P(this._rgb)},e.prototype.name=function(){var e,r;e=this.hex();for(r in s.colors)if(e===s.colors)return r;return e},e.prototype.alpha=function(e){return arguments.length?(this._rgb=e,this):this._rgb},e.prototype.css=function(e){var r,f,n,t;return null==e&&(e=“rgb”),f=this,n=f._rgb,3===e.length&&n<1&&(e+=“a”),“rgb”===e?e+“(”+n.slice(0,3).map(Math.round).join(“,”)+“)”:“rgba”===e?e+“(”+n.slice(0,3).map(Math.round).join(“,”)+“,”n[3]“)”:“hsl”===e||“hsla”===e?(r=f.hsl(),t=function(e){return Math.round(100*e)/100},r=t(r),r=t(100*r)+“%”,r=t(100*r)+“%”,4===e.length&&(r=n),e+“(”+r.join(“,”)+“)”):void 0},e.prototype.interpolate=function(r,f,n){var t,a,o,c,u,l,i,d,s,b,h,g,p,m;if(d=this,null==n&&(n=“rgb”),“string”===U(f)&&(f=new e(f)),“hsl”===n||“hsv”===n||“lch”===n||“hsi”===n)“hsl”===n?(p=d.hsl(),m=f.hsl()):“hsv”===n?(p=d.hsv(),m=f.hsv()):“hsi”===n?(p=d.hsi(),m=f.hsi()):“lch”===n&&(p=d.lch(),m=f.lch()),“h”===n.substr(0,1)?(o=p,h=p,l=p,c=m,g=m,i=m):(l=p,h=p,o=p,i=m,g=m,c=m),isNaN(o)||isNaN©?isNaN(o)?isNaN©?a=Number.NaN:(a=c,1!==l&&0!==l||“hsv”===n||(b=g)):(a=o,1!==i&&0!==i||“hsv”===n||(b=h)):(t=c>o&&c-o>180?c-(o+360):o>c&&o-c>180?c+360-o:c-o,a=o+r*t),null==b&&(b=h+r*(g-h)),u=l+r*(i-l),s=“h”===n.substr(0,1)?new e(a,b,u,n):new e(u,b,a,n);else if(“rgb”===n)p=d._rgb,m=f._rgb,s=new e(p+r*(m-p),p+r*(m-p),p+r*(m-p),n);else{if(“lab”!==n)throw“color mode ”n“ is not supported”;p=d.lab(),m=f.lab(),s=new e(p+r*(m-p),p+r*(m-p),p+r*(m-p),n)}return s.alpha(d.alpha()+r*(f.alpha()-d.alpha())),s},e.prototype.premultiply=function(){var e,r;return r=this.rgb(),e=this.alpha(),s(r*e,r*e,r*e,e)},e.prototype.darken=function(e){var r,f;return null==e&&(e=20),f=this,r=f.lch(),r-=e,s.lch®.alpha(f.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 r,f;return null==e&&(e=20),f=this,r=f.lch(),r+=e,s.lch®.alpha(f.alpha())},e.prototype.desaturate=function(e){return null==e&&(e=20),this.saturate(-e)},e}(),b=function(e){var r;for(r in e)3>r?(e<0&&(e=0),e>255&&(e=255)):3===r&&(e<0&&(e=0),e>1&&(e=1));return e},p=function(e){var r,f,n,t,a,o,c,u;if(e=e.toLowerCase(),null!=s.colors&&s.colors)return m(s.colors);if(n=e.match(/rgb(s*(-?d+),s*(-?d+)s*,s*(-?d+)s*)/)){for(t=n.slice(1,4),f=a=0;2>=a;f=++a)t=+t;t=1}else if(n=e.match(/rgba(s*(-?d+),s*(-?d+)s*,s*(-?d+)s*,s*(|[01]?.d+))/))for(t=n.slice(1,5),f=o=0;3>=o;f=++o)t=+t;else if(n=e.match(/rgb(s*(-?d+(?:.d+)?)%,s*(-?d+(?:.d+)?)%s*,s*(-?d+(?:.d+)?)%s*)/)){for(t=n.slice(1,4),f=c=0;2>=c;f=++c)t=Math.round(2.55*t);t=1}else if(n=e.match(/rgba(s*(-?d+(?:.d+)?)%,s*(-?d+(?:.d+)?)%s*,s*(-?d+(?:.d+)?)%s*,s*(|[01]?.d+))/)){for(t=n.slice(1,5),f=u=0;2>=u;f=++u)t=Math.round(2.55*t);t=+t}else(n=e.match(/hsl(s*(-?d+(?:.d+)?),s*(-?d+(?:.d+)?)%s*,s*(-?d+(?:.d+)?)%s*)/))?(r=n.slice(1,4),r*=.01,r*=.01,t=v®,t=1):(n=e.match(/hsla(s*(-?d+(?:.d+)?),s*(-?d+(?:.d+)?)%s*,s*(-?d+(?:.d+)?)%s*,s*(|[01]?.d+))/))&&(r=n.slice(1,4),r*=.01,r*=.01,t=v®,t=+n);return t},m=function(e){var r,f,n,t,a,o;if(e.match(/^#?({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+e+e+e+e+e),o=parseInt(e,16),t=o>>16,n=o>>8&255,f=255&o,;if(e.match(/^#?({8})$/))return 9===e.length&&(e=e.substr(1)),o=parseInt(e,16),t=o>>24&255,n=o>>16&255,f=o>>8&255,r=255&o,;if(a=p(e))return a;throw“unknown color: ”+e},y=function(e,r,f){var n,t,c,u;return u=z(arguments),e=u,r=u,f=u,e/=360,1/3>e?(n=(1-r)/3,c=(1+r*g(o*e)/g(a-o*e))/3,t=1-(n+c)):2/3>e?(e-=1/3,c=(1-r)/3,t=(1+r*g(o*e)/g(a-o*e))/3,n=1-(c+t)):(e-=2/3,t=(1-r)/3,n=(1+r*g(o*e)/g(a-o*e))/3,c=1-(t+n)),c=N(f*c*3),t=N(f*t*3),n=N(f*n*3),},v=function(){var e,r,f,n,t,a,o,c,u,l,i,d,s,b;if(s=z(arguments),n=s,c=s,a=s,0===c)o=f=e=255*a;else{for(i=,r=,l=.5>a?a*(1+c):a+c-a*c,u=2*a-l,n/=360,i=n+1/3,i=n,i=n-1/3,t=d=0;2>=d;t=++d)i<0&&(i+=1),i>1&&(i-=1),r=6*i<1?u+6*(l-u)*i:2*i<1?l:3*i<2?u+(l-u)*(2/3-i)*6:u;b=[Math.round(255*r),Math.round(255*r),Math.round(255*r)],o=b,f=b,e=b}return},w=function(){var e,r,f,n,t,a,o,c,u,l,i,d,s,b,h,g,p,m;if(d=z(arguments),n=d,u=d,i=d,i*=255,0===u)c=f=e=i;else switch(360===n&&(n=0),n>360&&(n-=360),0>n&&(n+=360),n/=60,t=Math.floor(n),r=n-t,a=i*(1-u),o=i*(1-u*r),l=i*(1-u*(1-r)),t){case 0:s=,c=s,f=s,e=s;break;case 1:b=,c=b,f=b,e=b;break;case 2:h=,c=h,f=h,e=h;break;case 3:g=,c=g,f=g,e=g;break;case 4:p=,c=p,f=p,e=p;break;case 5:m=,c=m,f=m,e=m}return c=Math.round©,f=Math.round(f),e=Math.round(e),},t=18,c=.95047,u=1,l=1.08883,_=function(){var e,r,f,n,t,a;return a=z(arguments),t=a,e=a,r=a,f=Math.sqrt(e*e+r*r),n=Math.atan2(r,e)/Math.PI*180,},k=function(e,r,f){var n,t,a,o,i,d,s;return void 0!==e&&3===e.length&&(d=e,e=d,r=d,f=d),void 0!==e&&3===e.length&&(s=e,e=s,r=s,f=s),o=(e+16)/116,a=o+r/500,i=o-f/200,a=x(a)*c,o=x(o)*u,i=x(i)*l,t=T(3.2404542*a-1.5371385*o-.4985314*i),n=T(-.969266*a+1.8760108*o+.041556*i),f=T(.0556434*a-.2040259*o+1.0572252*i),},x=function(e){return e>.206893034?e*e*e:(e-4/29)/7.787037},T=function(e){return Math.round(255*(.00304>=e?12.92*e:1.055*Math.pow(e,1/2.4)-.055))},M=function(){var e,r,f,n;return n=z(arguments),f=n,e=n,r=n,r=r*Math.PI/180,},j=function(e,r,f){var n,t,a,o,c,u,l;return u=M(e,r,f),n=u,t=u,a=u,l=k(n,t,a),c=l,o=l,a=l,[N(c,0,255),N(o,0,255),N(a,0,255)]},P=function(e,r,f){var n;return n=z(arguments),e=n,r=n,f=n,e=q(e),r=q®,f=q(f),.2126*e+.7152*r+.0722*f},q=function(e){return e/=255,.03928>=e?e/12.92:Math.pow((e+.055)/1.055,2.4)},A=function(){var e,r,f,n,t,a;return a=z(arguments),f=a,r=a,e=a,t=f<<16|r<<8|e,n=“000000”+t.toString(16),“#”+n.substr(n.length-6)},G=function(){var e,r,f,n,t,a,o,c,u;return u=z(arguments),o=u,f=u,r=u,e=2*Math.PI,o/=255,f/=255,r/=255,a=Math.min(o,f,r),t=(o+f+r)/3,c=1-a/t,0===c?n=0:(n=(o-f+(o-r))/2,n/=Math.sqrt((o-f)*(o-f)+(o-r)*(f-r)),n=Math.acos(n),r>f&&(n=e-n),n/=e),},B=function(e,r,f){var n,t,a,o,c,u;return void 0!==e&&e.length>=3&&(u=e,e=u,r=u,f=u),e/=255,r/=255,f/=255,o=Math.min(e,r,f),a=Math.max(e,r,f),t=(a+o)/2,a===o?(c=0,n=Number.NaN):c=.5>t?(a-o)/(a+o):(a-o)/(2-a-o),e===a?n=(r-f)/(a-o):r===a?n=2+(f-e)/(a-o):f===a&&(n=4+(e-r)/(a-o)),n*=60,0>n&&(n+=360),},I=function(){var e,r,f,n,t,a,o,c,u,l;return l=z(arguments),o=l,f=l,e=l,a=Math.min(o,f,e),t=Math.max(o,f,e),r=t-a,u=t/255,0===t?(n=Number.NaN,c=0):(c=r/t,o===t&&(n=(f-e)/r),f===t&&(n=2+(e-o)/r),e===t&&(n=4+(o-f)/r),n*=60,0>n&&(n+=360)),},E=function(){var e,r,f,n,t,a,o;return o=z(arguments),f=o,r=o,e=o,f=S(f),r=S®,e=S(e),n=Y((.4124564*f+.3575761*r+.1804375*e)/c),t=Y((.2126729*f+.7151522*r+.072175*e)/u),a=Y((.0193339*f+.119192*r+.9503041*e)/l),},S=function(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},Y=function(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29},R=function(){var e,r,f,n,t,a,o;return a=z(arguments),t=a,f=a,r=a,o=E(t,f,r),n=o,e=o,r=o,_(n,e,r)},s.scale=function(e,r){var f,n,t,a,o,c,u,l,i,d,b,h,g,p,m,y,v,w,_,k,x;return y=“rgb”,v=s(“#ccc”),x=0,g=!1,h=,d=[],_=!1,k=,m=0,p=1,b=!1,w=0,i={},c=function(e,r){var f,n,t,a,c,u,l;if(null==e&&(e=),null!=e&&“string”===U(e)&&null!=(null!=(c=s.brewer)?c:void 0)&&(e=s.brewer),“array”===U(e)){for(e=e.slice(0),f=t=0,u=e.length-1;u>=0?u>=t:t>=u;f=u>=0?++t:–t)n=e,“string”===U(n)&&(e=s(n));if(null!=r)k=r;else for(k=[],f=a=0,l=e.length-1;l>=0?l>=a:a>=l;f=l>=0?++a:–a)k.push(f/(e.length-1))}return o(),d=e},u=function(e){return null==e&&(e=[]),h=e,m=e,p=e,o(),w=2===e.length?0:e.length-1},t=function(e){var r,f;if(null!=h){for(f=h.length-1,r=0;f>r&&e>=h;)r++;return r-1}return 0},l=function(e){return e},f=function(e){var r,f,n,a,o;return o=e,h.length>2&&(a=h.length-1,r=t(e),n=h+(h-h)*(0+.5*x),f=h+(h-h)*(1-.5*x),o=m+(h+.5*(h-h)-n)/(f-n)*(p-m)),o},a=function(e,r){var f,n,a,o,c,u,b,g,_;if(null==r&&(r=!1),isNaN(e))return v;if(r?b=e:h.length>2?(f=t(e),b=f/(w-1)):(b=a=m!==p?(e-m)/(p-m):0,b=a=(e-m)/(p-m),b=Math.min(1,Math.max(0,b))),r||(b=l(b)),c=Math.floor(1e4*b),i)n=i;else{if(“array”===U(d))for(o=g=0,_=k.length-1;_>=0?_>=g:g>=_;o=_>=0?++g:–g){if(u=k,u>=b){n=d;break}if(b>=u&&o===k.length-1){n=d;break}if(b>u&&b){b=(b-u)/(k-u),n=s.interpolate(d,d,b,y);break}}else“function”===U(d)&&(n=d(b));i=n}return n},o=function(){return i={}},c(e,r),n=function(e){var r;return r=a(e),_&&r?r():r},n.domain=function(e,r,f,t){var a;return null==f&&(f=“e”),arguments.length?(null!=r&&(a=s.analyze(e,t),e=0===r?:s.limits(a,f,r)),u(e),n):h},n.mode=function(e){return arguments.length?(y=e,o(),n):y},n.range=function(e,r){return c(e,r),n},n.out=function(e){return _=e,n},n.spread=function(e){return arguments.length?(x=e,n):x},n.correctLightness=function(e){return arguments.length?(b=e,o(),l=b?function(e){var r,f,n,t,o,c,u,l,i;for(r=a(0,!0).lab(),f=a(1,!0).lab(),u=r>f,n=a(e,!0).lab(),o=r+(f-r)*e,t=n-o,l=0,i=1,c=20;Math.abs(t)>.01&&c–>0;)!function(){return u&&(t*=-1),0>t?(l=e,e+=.5*(i-e)):(i=e,e+=.5*(l-e)),n=a(e,!0).lab(),t=n-o}();return e}:function(e){return e},n):b},n.colors=function®{var f,t,a,o,c,u;if(null==r&&(r=“hex”),e=[],t=,h.length>2)for(f=a=1,u=h.length;u>=1?u>a:a>u;f=u>=1?++a:–a)t.push(.5*(h+h));else t=h;for(o=0,c=t.length;c>o;o++)f=t,e.push(n(f)());return e},n},null==(C=s.scales)&&(s.scales={}),s.scales.cool=function(){return s.scale()},s.scales.hot=function(){return s.scale(,[0,.25,.75,1]).mode(“rgb”)},s.analyze=function(e,r,f){var n,t,a,o,c,u,l;if(a={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==f&&(f=function(){return!0}),n=function(e){null==e||isNaN(e)||(a.values.push(e),a.sum+=e,e<a.min&&(a.min=e),e>a.max&&(a.max=e),a.count+=1)},c=function(e,t){return f(e,t)?null!=r&&“function”===U®?n(r(e)):null!=r&&“string”===U®||“number”===U®?n(e):n(e):void 0},“array”===U(e))for(u=0,l=e.length;l>u;u++)o=e,c(o);else for(t in e)o=e,c(o,t);return a.domain=,a.limits=function(e,r){return s.limits(a,e,r)},a},s.limits=function(e,r,f){var n,t,a,o,c,u,l,i,d,b,h,g,p,m,y,v,w,_,k,x,M,j,N,P,q,A,G,B,I,E,R,S,O,z,Y,T,C,L,F,V,D,X,W,$,Z,H,J,K,Q,er,rr,fr,nr,tr,ar,or;if(null==r&&(r=“equal”),null==f&&(f=7),“array”===U(e)&&(e=s.analyze(e)),p=e.min,h=e.max,N=e.sum,A=e.values.sort(function(e,r){return e-r}),b=[],“c”===r.substr(0,1)&&(b.push(p),b.push(h)),“e”===r.substr(0,1)){for(b.push(p),l=G=1,C=f-1;C>=1?C>=G:G>=C;l=C>=1?++G:–G)b.push(p+l/f*(h-p));b.push(h)}else if(“l”===r.substr(0,1)){if(0>=p)throw“Logarithmic scales are only possible for values > 0”;for(m=Math.LOG10E*Math.log(p),g=Math.LOG10E*Math.log(h),b.push(p),l=B=1,$=f-1;$>=1?$>=B:B>=$;l=$>=1?++B:–B)b.push(Math.pow(10,m+l/f*(g-m)));b.push(h)}else if(“q”===r.substr(0,1)){for(b.push(p),l=I=1,Z=f-1;Z>=1?Z>=I:I>=Z;l=Z>=1?++I:–I)k=A.length*l/f,x=Math.floor(k),x===k?b.push(A):(M=k-x,b.push(A*M+A*(1-M)));b.push(h)}else if(“k”===r.substr(0,1)){for(v=A.length,n=new Array(v),c=new Array(f),j=!0,w=0,a=null,a=[],a.push(p),l=E=1,H=f-1;H>=1?H>=E:E>=H;l=H>=1?++E:–E)a.push(p+l/f*(h-p));for(a.push(h);j;){for(i=R=0,J=f-1;J>=0?J>=R:R>=J;i=J>=0?++R:–R)c=0;for(l=S=0,K=v-1;K>=0?K>=S:S>=K;l=K>=0?++S:–S){for(q=A,y=Number.MAX_VALUE,i=O=0,Q=f-1;Q>=0?Q>=O:O>=Q;i=Q>=0?++O:–O)u=Math.abs(a-q),y>u&&(y=u,t=i);c++,n=t}for(_=new Array(f),i=z=0,er=f-1;er>=0?er>=z:z>=er;i=er>=0?++z:–z)_=null;for(l=Y=0,rr=v-1;rr>=0?rr>=Y:Y>=rr;l=rr>=0?++Y:–Y)o=n,null===[o]?[o]=A:_+=A;for(i=T=0,L=f-1;L>=0?L>=T:T>=L;i=L>=0?++T:–T)_*=1/c;for(j=!1,i=fr=0,F=f-1;F>=0?F>=fr:fr>=F;i=F>=0?++fr:–fr)if(_!==a){j=!0;break}a=_,w++,w>200&&(j=!1)}for(d={},i=nr=0,V=f-1;V>=0?V>=nr:nr>=V;i=V>=0?++nr:–nr)d=[];for(l=tr=0,D=v-1;D>=0?D>=tr:tr>=D;l=D>=0?++tr:–tr)o=n,d.push(A);for(P=[],i=ar=0,X=f-1;X>=0?X>=ar:ar>=X;i=X>=0?++ar:–ar)P.push(d[0]),P.push(d[d.length-1]);for(P=P.sort(function(e,r){return e-r}),b.push(P),l=or=1,W=P.length-1;W>=or;l=or+=2)isNaN(P)||b.push(P)}return b},s.brewer=d={OrRd:,PuBu:,BuPu:,Oranges:,BuGn:,YlOrBr:,YlGn:,Reds:,RdPu:,Greens:,YlGnBu:,Purples:,GnBu:,Greys:,YlOrRd:,PuRd:,Blues:,PuBuGn:,Spectral:,RdYlGn:,RdBu:,PiYG:,PRGn:,RdYlBu:,BrBG:,RdGy:,PuOr:,Set2:,Accent:,Set1:,Set3:,Dark2:,Paired:,Pastel2:,Pastel1:},s.colors=h={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”},U=function(){var e,r,f,n,t;for(e={},t=“Boolean Number String Function Array Date RegExp Undefined Null”.split(“ ”),f=0,n=t.length;n>f;f++)r=t,e[“[object ”r“]”]=r.toLowerCase();return function®{var f;return f=Object.prototype.toString.call®,e||“object”}}(),N=function(e,r,f){return null==r&&(r=0),null==f&&(f=1),r>e&&(e=r),e>f&&(e=f),e},z=function(e){return e.length>=3?e:e},o=2*Math.PI,a=Math.PI/3,g=Math.cos,i=function(e){var r,f,n,t,a,o,c,u,l,d,b;return e=function(){var r,f,n;for(n=[],r=0,f=e.length;f>r;r++)t=e,n.push(s(t));return n}(),2===e.length?(l=function(){var r,f,n;for(n=[],r=0,f=e.length;f>r;r++)t=e,n.push(t.lab());return n}(),a=l,o=l,r=function(e){var r,f;return f=function(){var f,n;for(n=[],r=f=0;2>=f;r=++f)n.push(a+e*(o-a));return n}(),s.lab.apply(s,f)}):3===e.length?(d=function(){var r,f,n;for(n=[],r=0,f=e.length;f>r;r++)t=e,n.push(t.lab());return n}(),a=d,o=d,c=d,r=function(e){var r,f;return f=function(){var f,n;for(n=[],r=f=0;2>=f;r=++f)n.push((1-e)*(1-e)*a+2*(1-e)*e*o+e*e*c);return n}(),s.lab.apply(s,f)}):4===e.length?(b=function(){var r,f,n;for(n=[],r=0,f=e.length;f>r;r++)t=e,n.push(t.lab());return n}(),a=b,o=b,c=b,u=b,r=function(e){var r,f;return f=function(){var f,n;for(n=[],r=f=0;2>=f;r=++f)n.push((1-e)*(1-e)*(1-e)*a+3*(1-e)*(1-e)*e*o+3*(1-e)*e*e*c+e*e*e*u);return n}(),s.lab.apply(s,f)}):5===e.length&&(f=i(e.slice(0,3)),n=i(e.slice(2,5)),r=function(e){return.5>e?f(2*e):n(2*(e-.5))}),r},s.interpolate.bezier=i}).call(this)},{}],“/Users/qrohlf/Projects/trianglify/node_modules/delaunay-fast/delaunay.js”:[function(e,r){var f;!function(){“use strict”;function e(e){var r,f,n,t,a,o,c=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;for(r=e.length;r–;)e[0][0]),e[0]>l&&(l=e[0]),e[1][1]),e[1]>i&&(i=e[1]); return f=l-c,n=i-u,t=Math.max(f,n),a=c+.5*f,o=u+.5*n,[,[a,o+20*t],]}function n(e,r,f,n){var t,o,c,u,l,i,d,s,b,h,g=e[0],p=e[1],m=e[0],y=e[1],v=e[0],w=e[1],_=Math.abs(p-y),k=Math.abs(y-w);if(a>_&&a>k)throw new Error(“Eek! Coincident points!”);return a>_?(u=-((v-m)/(w-y)),i=(m+v)/2,s=(y+w)/2,t=(m+g)/2,o=u*(t-i)+s):a>k?(c=-((m-g)/(y-p)),l=(g+m)/2,d=(p+y)/2,t=(v+m)/2,o=c*(t-l)+d):(c=-((m-g)/(y-p)),u=-((v-m)/(w-y)),l=(g+m)/2,i=(m+v)/2,d=(p+y)/2,s=(y+w)/2,t=(c*l-u*i+s-d)/(c-u),o=_>k?c*(t-l)+d:u*(t-i)+s),b=m-t,h=y-o,{i:r,j:f,k:n,x:t,y:o,r:b*b+h*h}}function t(e){var r,f,n,t,a,o;for(f=e.length;f;)for(t=e,n=e,r=f;r;)if(o=e,a=e,n===a&&t===o||n===o&&t===a){e.splice(f,2),e.splice(r,2);break}}var a=1/1048576;f={triangulate:function(r,f){var o,c,u,l,i,d,s,b,h,g,p,m,y=r.length;if(3>y)return[];if(r=r.slice(0),f)for(o=y;o–;)r=r[f];for(u=new Array(y),o=y;o–;)u=o;for(u.sort(function(e,f){return r[0]-r[0]}),l=e®,r.push(l,l,l),i=,d=[],s=,o=u.length;o–;s.length=0){for(m=u,c=i.length;c–;)b=r[0]-i.x,b>0&&b*b>i.r?(d.push(i),i.splice(c,1)):(h=r[1]-i.y,b*b+h*h-i.r>a||(s.push(i.i,i.j,i.j,i.k,i.k,i.i),i.splice(c,1)));for(t(s),c=s.length;c;)p=s,g=s,i.push(n(r,g,p,m))}for(o=i.length;o–;)d.push(i);for(i.length=0,o=d.length;o–;)d.i.j.k.i,d.j,d.k);return i},contains:function(e,r){if(r<e[0]&&r<e[0]&&r<e[0]||r>e[0]&&r>e[0]&&r>e[0]||r<e[1]&&r<e[1]&&r<e[1]||r>e[1]&&r>e[1]&&r>e[1])return null;var f=e[0]-e[0],n=e[0]-e[0],t=e[1]-e[1],a=e[1]-e[1],o=f*a-n*t;if(0===o)return null;var c=(a*(r-e[0])-n*(r-e[1]))/o,u=(f*(r-e[1])-t*(r-e[0]))/o;return 0>c||0>u||c+u>1?null:}},“undefined”!=typeof r&&(r.exports=f)}()},{}],“/Users/qrohlf/Projects/trianglify/node_modules/seedrandom/seedrandom.js”:[function(r,f){!function(e,f,n,t,a,o,c,u,l){function i(e){var r,f=e.length,n=this,a=0,o=n.i=n.j=0,c=n.S=[];for(f||(e=);t>a;)c=a++;for(a=0;t>a;a++)c=c[o=w&o+e+(r=c)],c=r;(n.g=function(e){for(var r,f=0,a=n.i,o=n.j,c=n.S;e–;)r=c,f=f*t+c[w&(c=c)+(c=r)];return n.i=a,n.j=o,f})(t)}function d(e,r){return r.i=e.i,r.j=e.j,r.S=e.S.slice(),r}function s(e,r){var f,n=[],t=typeof e;if(r&&“object”==t)for(f in e)try{n.push(s(e,r-1))}catch(a){}return n.length?n:“string”==t?e:e+“x00”}function b(e,r){for(var f,n=e+“”,t=0;t=w&(f^=19*r)+n.charCodeAt(t++);return g®}function h®{try{return p?g(p.randomBytes(t)):(e.crypto.getRandomValues(r=new Uint8Array(t)),g®)}catch(n){return[+new Date,e,(r=e.navigator)&&r.plugins,e.screen,g(f)]}}function g(e){return String.fromCharCode.apply(0,e)}var p,m=n.pow(t,a),y=n.pow(2,o),v=2*y,w=t-1,_=n=function(e,r,o){var c=[];r=1==r?{entropy:!0}:r||{};var u=b(s(r.entropy?:null==e?h():e,3),c),p=new i©;return b(g(p.S),f),(r.pass||o||function(e,r,f,t){return t&&(t.S&&d(t,p),e.state=function(){return d(p,{})}),f?(n=e,r):e})(function(){for(var e=p.g(a),r=m,f=0;y>e;)e=(e+f)*t,r*=t,f=p.g(1);for(;e>=v;)e/=2,r/=2,f>>>=1;return(e+f)/r},u,“global”in r?r.global:this==n,r.state)};if(b(n(),f),c&&c.exports){c.exports=_;try{p=r(“crypto”)}catch(k){}}else u&&u.amd&&u(function(){return _})}(this,[],Math,256,6,52,“object”==typeof f&&f,“function”==typeof e&&e,“random”)},{crypto:!1}]},{},[“./lib/trianglify.js”])(“./lib/trianglify.js”)});