define("clustergrammer_widget2",["@jupyter-widgets/base"],function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EXTENSION_SPEC_VERSION="0.6.1"},function(e,n){e.exports=t},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});const o=n(1),a=n(0),s=r(n(5)),u=i(n(6));console.log("version 0.6.1, new reorder buttons");class l extends o.DOMWidgetModel{defaults(){return Object.assign({},super.defaults(),{_model_name:l.model_name,_model_module:l.model_module,_model_module_version:l.model_module_version,_view_name:l.view_name,_view_module:l.view_module,_view_module_version:l.view_module_version,value:"default-string",network:""})}}function c(t){var e=document.getElementById(t.container_name);console.log("inst_container_2",e),t.container=e;var n=s.default(t);console.log("making clustergram in make_viz"),console.log(n)}l.serializers=Object.assign({},o.DOMWidgetModel.serializers),l.model_name="ExampleModel",l.model_module="clustergrammer_widget2",l.model_module_version=a.EXTENSION_SPEC_VERSION,l.view_name="ExampleView",l.view_module="clustergrammer_widget2",l.view_module_version=a.EXTENSION_SPEC_VERSION,e.ExampleModel=l,console.log(c);e.ExampleView=class extends o.DOMWidgetView{render(){this.value_changed(),console.log("\n**********************************************"),console.log("rendering!!"),console.log("**********************************************");var t=this.model.get("network"),e=JSON.parse(t);console.log(e);var n=this.cid;console.log("container_name",n);var r=u.select(this.el).append("div").classed("clustergrammer_glidget",!0).attr("id",n).style("width","900px").style("height","1035px").style("border","2px solid #eee"),i="#"+n;console.log(n,r,i);var o={container_name:n,network:e,viz_width:900,viz_height:900};console.log(o),setTimeout(c,10,o)}value_changed(){console.log("CHANGING")}}},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(4)),r(n(0)),r(n(2))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(1),i=n(2),o=n(0),a={id:"clustergrammer_widget2",requires:[r.IJupyterWidgetRegistry],activate:function(t,e){e.registerWidget({name:"clustergrammer_widget2",version:o.EXTENSION_SPEC_VERSION,exports:{ExampleModel:i.ExampleModel,ExampleView:i.ExampleView}})},autoStart:!0};e.default=a},function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="./src/main.js")}({"./node_modules/base64-js/index.js":
/*!*****************************************!*\
  !*** ./node_modules/base64-js/index.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){"use strict";e.byteLength=function(t){var e=l(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){for(var e,n=l(t),r=n[0],a=n[1],s=new o(function(t,e,n){return 3*(e+n)/4-n}(0,r,a)),u=0,c=a>0?r-4:r,f=0;f<c;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===a&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,s[u++]=255&e);1===a&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(f(t,a,a+16383>s?s:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function f(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(c(r));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"./node_modules/big-rat/add.js":
/*!*************************************!*\
  !*** ./node_modules/big-rat/add.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/rationalize */"./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},"./node_modules/big-rat/cmp.js":
/*!*************************************!*\
  !*** ./node_modules/big-rat/cmp.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},"./node_modules/big-rat/div.js":
/*!*************************************!*\
  !*** ./node_modules/big-rat/div.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/rationalize */"./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[1]),t[1].mul(e[0]))}},"./node_modules/big-rat/index.js":
/*!***************************************!*\
  !*** ./node_modules/big-rat/index.js ***!
  \***************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./is-rat */"./node_modules/big-rat/is-rat.js"),i=n(/*! ./lib/is-bn */"./node_modules/big-rat/lib/is-bn.js"),o=n(/*! ./lib/num-to-bn */"./node_modules/big-rat/lib/num-to-bn.js"),a=n(/*! ./lib/str-to-bn */"./node_modules/big-rat/lib/str-to-bn.js"),s=n(/*! ./lib/rationalize */"./node_modules/big-rat/lib/rationalize.js"),u=n(/*! ./div */"./node_modules/big-rat/div.js");t.exports=function t(e,n){if(r(e))return n?u(e,t(n)):[e[0].clone(),e[1].clone()];var l=0;var c,f;if(i(e))c=e.clone();else if("string"==typeof e)c=a(e);else{if(0===e)return[o(0),o(1)];if(e===Math.floor(e))c=o(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),l-=256;c=o(e)}}if(r(n))c.mul(n[1]),f=n[0].clone();else if(i(n))f=n.clone();else if("string"==typeof n)f=a(n);else if(n)if(n===Math.floor(n))f=o(n);else{for(;n!==Math.floor(n);)n*=Math.pow(2,256),l+=256;f=o(n)}else f=o(1);l>0?c=c.ushln(l):l<0&&(f=f.ushln(-l));return s(c,f)}},"./node_modules/big-rat/is-rat.js":
/*!****************************************!*\
  !*** ./node_modules/big-rat/is-rat.js ***!
  \****************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/is-bn */"./node_modules/big-rat/lib/is-bn.js");t.exports=function(t){return Array.isArray(t)&&2===t.length&&r(t[0])&&r(t[1])}},"./node_modules/big-rat/lib/bn-sign.js":
/*!*********************************************!*\
  !*** ./node_modules/big-rat/lib/bn-sign.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! bn.js */"./node_modules/bn.js/lib/bn.js");t.exports=function(t){return t.cmp(new r(0))}},"./node_modules/big-rat/lib/bn-to-num.js":
/*!***********************************************!*\
  !*** ./node_modules/big-rat/lib/bn-to-num.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./bn-sign */"./node_modules/big-rat/lib/bn-sign.js");t.exports=function(t){var e=t.length,n=t.words,i=0;if(1===e)i=n[0];else if(2===e)i=n[0]+67108864*n[1];else for(var o=0;o<e;o++){var a=n[o];i+=a*Math.pow(67108864,o)}return r(t)*i}},"./node_modules/big-rat/lib/ctz.js":
/*!*****************************************!*\
  !*** ./node_modules/big-rat/lib/ctz.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! double-bits */"./node_modules/double-bits/double.js"),i=n(/*! bit-twiddle */"./node_modules/bit-twiddle/twiddle.js").countTrailingZeros;t.exports=function(t){var e=i(r.lo(t));if(e<32)return e;var n=i(r.hi(t));if(n>20)return 52;return n+32}},"./node_modules/big-rat/lib/is-bn.js":
/*!*******************************************!*\
  !*** ./node_modules/big-rat/lib/is-bn.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){"use strict";n(/*! bn.js */"./node_modules/bn.js/lib/bn.js");t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},"./node_modules/big-rat/lib/num-to-bn.js":
/*!***********************************************!*\
  !*** ./node_modules/big-rat/lib/num-to-bn.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! bn.js */"./node_modules/bn.js/lib/bn.js"),i=n(/*! double-bits */"./node_modules/double-bits/double.js");t.exports=function(t){var e=i.exponent(t);return e<52?new r(t):new r(t*Math.pow(2,52-e)).ushln(e-52)}},"./node_modules/big-rat/lib/rationalize.js":
/*!*************************************************!*\
  !*** ./node_modules/big-rat/lib/rationalize.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./num-to-bn */"./node_modules/big-rat/lib/num-to-bn.js"),i=n(/*! ./bn-sign */"./node_modules/big-rat/lib/bn-sign.js");t.exports=function(t,e){var n=i(t),o=i(e);if(0===n)return[r(0),r(1)];if(0===o)return[r(0),r(0)];o<0&&(t=t.neg(),e=e.neg());var a=t.gcd(e);if(a.cmpn(1))return[t.div(a),e.div(a)];return[t,e]}},"./node_modules/big-rat/lib/str-to-bn.js":
/*!***********************************************!*\
  !*** ./node_modules/big-rat/lib/str-to-bn.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! bn.js */"./node_modules/bn.js/lib/bn.js");t.exports=function(t){return new r(t)}},"./node_modules/big-rat/mul.js":
/*!*************************************!*\
  !*** ./node_modules/big-rat/mul.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/rationalize */"./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[0]),t[1].mul(e[1]))}},"./node_modules/big-rat/sign.js":
/*!**************************************!*\
  !*** ./node_modules/big-rat/sign.js ***!
  \**************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/bn-sign */"./node_modules/big-rat/lib/bn-sign.js");t.exports=function(t){return r(t[0])*r(t[1])}},"./node_modules/big-rat/sub.js":
/*!*************************************!*\
  !*** ./node_modules/big-rat/sub.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/rationalize */"./node_modules/big-rat/lib/rationalize.js");t.exports=function(t,e){return r(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},"./node_modules/big-rat/to-float.js":
/*!******************************************!*\
  !*** ./node_modules/big-rat/to-float.js ***!
  \******************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/bn-to-num */"./node_modules/big-rat/lib/bn-to-num.js"),i=n(/*! ./lib/ctz */"./node_modules/big-rat/lib/ctz.js");t.exports=function(t){var e=t[0],n=t[1];if(0===e.cmpn(0))return 0;var o=e.abs().divmod(n.abs()),a=o.div,s=r(a),u=o.mod,l=e.negative!==n.negative?-1:1;if(0===u.cmpn(0))return l*s;if(s){var c=i(s)+4,f=r(u.ushln(c).divRound(n));return l*(s+f*Math.pow(2,-c))}var h=n.bitLength()-u.bitLength()+53,f=r(u.ushln(h).divRound(n));return h<1023?l*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),l*f*Math.pow(2,1023-h))}},"./node_modules/binary-search-bounds/search-bounds.js":
/*!************************************************************!*\
  !*** ./node_modules/binary-search-bounds/search-bounds.js ***!
  \************************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n,r,i){var o=["function ",t,"(a,l,h,",r.join(","),"){",i?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];return i?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),n?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),i?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],i),r("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",n,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/bit-twiddle/twiddle.js":
/*!*********************************************!*\
  !*** ./node_modules/bit-twiddle/twiddle.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){"use strict";"use restrict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,n;return e=(t>65535)<<4,e|=n=((t>>>=e)>255)<<3,e|=n=((t>>>=n)>15)<<2,(e|=n=((t>>>=n)>3)<<1)|(t>>>=n)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,n){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},"./node_modules/bn.js/lib/bn.js":
/*!**************************************!*\
  !*** ./node_modules/bn.js/lib/bn.js ***!
  \**************************************/
/*! no static exports found */function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(/*! buffer */0).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o<i;o++){var a=t.charCodeAt(o)-48;r<<=4,r|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a<o;a++){var s=t.charCodeAt(a)-48;i*=r,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=t.length-6,r=0;n>=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,l=0,c=n;c<s;c+=r)l=u(t,c,c+r,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var f=1;for(l=u(t,c,t.length,e),c=0;c<a;c++)f*=e;this.imuln(f),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var l=1;l<r;l++){for(var c=u>>>26,f=67108863&u,h=Math.min(l,e.length-1),p=Math.max(0,l-t.length+1);p<=h;p++){var d=l-p|0;c+=(a=(i=0|t.words[d])*(o=0|e.words[p])+f)/67108864|0,f=67108863&a}n.words[l]=0|f,u=0|c}return 0!==u?n.words[l]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(t=t||10,e=0|e||1,16===t||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],u=(16777215&(s<<i|o)).toString(16);n=0!==(o=s>>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],p=f[t];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);n=(d=d.idivn(p)).isZero()?m+n:l[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s<o;s++)l[s]=0}else{for(s=0;s<o-i;s++)l[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[o-s-1]=a}return l},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<n.length;a++)o=(e=(0|n.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,a=t.words,s=e.words,u=n.words,l=0,c=0|a[0],f=8191&c,h=c>>>13,p=0|a[1],d=8191&p,m=p>>>13,g=0|a[2],v=8191&g,y=g>>>13,_=0|a[3],b=8191&_,x=_>>>13,w=0|a[4],j=8191&w,M=w>>>13,A=0|a[5],k=8191&A,z=A>>>13,E=0|a[6],S=8191&E,N=E>>>13,T=0|a[7],C=8191&T,O=T>>>13,P=0|a[8],I=8191&P,B=P>>>13,D=0|a[9],F=8191&D,R=D>>>13,L=0|s[0],q=8191&L,U=L>>>13,H=0|s[1],Y=8191&H,V=H>>>13,Z=0|s[2],W=8191&Z,X=Z>>>13,Q=0|s[3],$=8191&Q,G=Q>>>13,K=0|s[4],J=8191&K,tt=K>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,pt=0|s[9],dt=8191&pt,mt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(l+(r=Math.imul(f,q))|0)+((8191&(i=(i=Math.imul(f,U))+Math.imul(h,q)|0))<<13)|0;l=((o=Math.imul(h,U))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(d,q),i=(i=Math.imul(d,U))+Math.imul(m,q)|0,o=Math.imul(m,U);var vt=(l+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,V)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,V)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,q),i=(i=Math.imul(v,U))+Math.imul(y,q)|0,o=Math.imul(y,U),r=r+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,V)|0;var yt=(l+(r=r+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,W)|0))<<13)|0;l=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(b,q),i=(i=Math.imul(b,U))+Math.imul(x,q)|0,o=Math.imul(x,U),r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,V)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,V)|0,r=r+Math.imul(d,W)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,X)|0;var _t=(l+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,U))+Math.imul(M,q)|0,o=Math.imul(M,U),r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,V)|0,r=r+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,X)|0,r=r+Math.imul(d,$)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var bt=(l+(r=r+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,J)|0))<<13)|0;l=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(k,q),i=(i=Math.imul(k,U))+Math.imul(z,q)|0,o=Math.imul(z,U),r=r+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,V)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,V)|0,r=r+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,X)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(d,J)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0;var xt=(l+(r=r+Math.imul(f,nt)|0)|0)+((8191&(i=(i=i+Math.imul(f,rt)|0)+Math.imul(h,nt)|0))<<13)|0;l=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(S,q),i=(i=Math.imul(S,U))+Math.imul(N,q)|0,o=Math.imul(N,U),r=r+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,V)|0)+Math.imul(z,Y)|0,o=o+Math.imul(z,V)|0,r=r+Math.imul(j,W)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,X)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(d,nt)|0,i=(i=i+Math.imul(d,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var wt=(l+(r=r+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;l=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(C,q),i=(i=Math.imul(C,U))+Math.imul(O,q)|0,o=Math.imul(O,U),r=r+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,V)|0,r=r+Math.imul(k,W)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(z,W)|0,o=o+Math.imul(z,X)|0,r=r+Math.imul(j,$)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var jt=(l+(r=r+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(h,ut)|0))<<13)|0;l=((o=o+Math.imul(h,lt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,r=Math.imul(I,q),i=(i=Math.imul(I,U))+Math.imul(B,q)|0,o=Math.imul(B,U),r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,V)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(S,W)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,X)|0,r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(z,$)|0,o=o+Math.imul(z,G)|0,r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var Mt=(l+(r=r+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;l=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(F,q),i=(i=Math.imul(F,U))+Math.imul(R,q)|0,o=Math.imul(R,U),r=r+Math.imul(I,Y)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,V)|0,r=r+Math.imul(C,W)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,X)|0,r=r+Math.imul(S,$)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(z,J)|0,o=o+Math.imul(z,tt)|0,r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(M,nt)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,lt)|0,r=r+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var At=(l+(r=r+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,dt)|0))<<13)|0;l=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,V))+Math.imul(R,Y)|0,o=Math.imul(R,V),r=r+Math.imul(I,W)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,X)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(z,nt)|0,o=o+Math.imul(z,rt)|0,r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,at)|0,r=r+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,lt)|0,r=r+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,o=o+Math.imul(y,ht)|0;var kt=(l+(r=r+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(F,W),i=(i=Math.imul(F,X))+Math.imul(R,W)|0,o=Math.imul(R,X),r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,G)|0,r=r+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(z,ot)|0,o=o+Math.imul(z,at)|0,r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,lt)|0,r=r+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(x,ft)|0,o=o+Math.imul(x,ht)|0;var zt=(l+(r=r+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,dt)|0))<<13)|0;l=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,r=Math.imul(F,$),i=(i=Math.imul(F,G))+Math.imul(R,$)|0,o=Math.imul(R,G),r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,tt)|0,r=r+Math.imul(C,nt)|0,i=(i=i+Math.imul(C,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(z,ut)|0,o=o+Math.imul(z,lt)|0,r=r+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,ht)|0;var Et=(l+(r=r+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(x,dt)|0))<<13)|0;l=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(F,J),i=(i=Math.imul(F,tt))+Math.imul(R,J)|0,o=Math.imul(R,tt),r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(B,nt)|0,o=o+Math.imul(B,rt)|0,r=r+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,at)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,at)|0,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,lt)|0,r=r+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(z,ft)|0,o=o+Math.imul(z,ht)|0;var St=(l+(r=r+Math.imul(j,dt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(M,dt)|0))<<13)|0;l=((o=o+Math.imul(M,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(F,nt),i=(i=Math.imul(F,rt))+Math.imul(R,nt)|0,o=Math.imul(R,rt),r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,r=r+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,lt)|0,r=r+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(N,ft)|0,o=o+Math.imul(N,ht)|0;var Nt=(l+(r=r+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(z,dt)|0))<<13)|0;l=((o=o+Math.imul(z,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(F,ot),i=(i=Math.imul(F,at))+Math.imul(R,ot)|0,o=Math.imul(R,at),r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,lt)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,lt)|0,r=r+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(O,ft)|0,o=o+Math.imul(O,ht)|0;var Tt=(l+(r=r+Math.imul(S,dt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(N,dt)|0))<<13)|0;l=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(F,ut),i=(i=Math.imul(F,lt))+Math.imul(R,ut)|0,o=Math.imul(R,lt),r=r+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Ct=(l+(r=r+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,mt)|0)+Math.imul(O,dt)|0))<<13)|0;l=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(F,ft),i=(i=Math.imul(F,ht))+Math.imul(R,ft)|0,o=Math.imul(R,ht);var Ot=(l+(r=r+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(B,dt)|0))<<13)|0;l=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Pt=(l+(r=Math.imul(F,dt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(R,dt)|0))<<13)|0;return l=((o=Math.imul(R,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=_t,u[4]=bt,u[5]=xt,u[6]=wt,u[7]=jt,u[8]=Mt,u[9]=At,u[10]=kt,u[11]=zt,u[12]=Et,u[13]=St,u[14]=Nt,u[15]=Tt,u[16]=Ct,u[17]=Ot,u[18]=Pt,0!==l&&(u[19]=l,n.length++),n};function d(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var s=67108863&r,u=Math.min(o,e.length-1),l=Math.max(0,o-t.length+1);l<=u;l++){var c=o-l,f=(0|t.words[c])*(0|e.words[l]),h=67108863&f;s=67108863&(h=h+s|0),i+=(a=(a=a+(f/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},m.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a<o;a++)r[a]=e[t[a]],i[a]=n[t[a]]},m.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),l=Math.sin(2*Math.PI/s),c=0;c<i;c+=s)for(var f=u,h=l,p=0;p<a;p++){var d=n[c+p],m=r[c+p],g=n[c+p+a],v=r[c+p+a],y=f*g-h*v;v=f*v+h*g,g=y,n[c+p]=d+g,r[c+p]=m+v,n[c+p+a]=d-g,r[c+p+a]=m-v,p!==s&&(y=u*f-l*h,h=u*h+l*f,f=y)}},m.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},m.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,n,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},m.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),u=new Array(r),l=new Array(r),c=new Array(r),f=new Array(r),h=n.words;h.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,l,r),this.transform(a,o,s,u,r,i),this.transform(l,o,c,f,r,i);for(var p=0;p<r;p++){var d=s[p]*c[p]-u[p]*f[p];u[p]=s[p]*f[p]+u[p]*c[p],s[p]=d}return this.conjugate(s,u,r),this.transform(s,u,h,o,r,i),this.conjugate(h,o,r),this.normalize13b(h,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),d(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var s=this.words[e]&o,u=(0|this.words[e])-s<<n;this.words[e]=u|a,a=s>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<<o,u=n;if(i-=a,i=Math.max(0,i),u){for(var l=0;l<a;l++)u.words[l]=this.words[l];u.length=a}if(0===a);else if(this.length>a)for(this.length-=a,l=0;l<this.length;l++)this.words[l]=this.words[l+a];else this.words[0]=0,this.length=1;var c=0;for(l=this.length-1;l>=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var s=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+s;var u=(0|t.words[i])*e;s=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,s&&(s.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,f);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++l;for(var c=n.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var d=0,m=1;0==(n.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(n.iushrn(d);d-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(l)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,c=1;0==(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0==(n.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new w(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function j(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(_,v),i(b,v),i(x,v),x.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new _;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return g[t]=e,e},w.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},w.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=a;0!==p.cmp(s);){for(var m=p,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g<d);var v=this.pow(f,new o(1).iushln(d-g-1));h=h.redMul(v),f=v.redSqr(),p=p.redMul(f),d=g}return h},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],a=0,s=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var l=e.words[r],c=u-1;c>=0;c--){var f=l>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===c)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new j(t)},i(j,w),j.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},j.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},j.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},j.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},j.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(this,n(/*! ./../../webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(t))},"./node_modules/box-intersect/index.js":
/*!*********************************************!*\
  !*** ./node_modules/box-intersect/index.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){switch(arguments.length){case 1:return function(t){return r=[],l(t,t,c,!0),r}(t);case 2:return"function"==typeof e?l(t,t,e,!0):function(t,e){return r=[],l(t,e,c,!1),r}(t,e);case 3:return l(t,e,n,!1);default:throw new Error("box-intersect: Invalid arguments")}};var r,i=n(/*! typedarray-pool */"./node_modules/typedarray-pool/pool.js"),o=n(/*! ./lib/sweep */"./node_modules/box-intersect/lib/sweep.js"),a=n(/*! ./lib/intersect */"./node_modules/box-intersect/lib/intersect.js");function s(t,e){for(var n=0;n<t;++n)if(!(e[n]<=e[n+t]))return!0;return!1}function u(t,e,n,r){for(var i=0,o=0,a=0,u=t.length;a<u;++a){var l=t[a];if(!s(e,l)){for(var c=0;c<2*e;++c)n[i++]=l[c];r[o++]=a}}return o}function l(t,e,n,r){var s=t.length,l=e.length;if(!(s<=0||l<=0)){var c=t[0].length>>>1;if(!(c<=0)){var f,h=i.mallocDouble(2*c*s),p=i.mallocInt32(s);if((s=u(t,c,h,p))>0){if(1===c&&r)o.init(s),f=o.sweepComplete(c,n,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*c*l),m=i.mallocInt32(l);(l=u(e,c,d,m))>0&&(o.init(s+l),f=1===c?o.sweepBipartite(c,n,0,s,h,p,0,l,d,m):a(c,n,r,s,h,p,l,d,m),i.free(d),i.free(m))}i.free(h),i.free(p)}return f}}}function c(t,e){r.push([t,e])}},"./node_modules/box-intersect/lib/brute.js":
/*!*************************************************!*\
  !*** ./node_modules/box-intersect/lib/brute.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r="d",i="ax",o="vv",a="fp",s="es",u="rs",l="re",c="rb",f="ri",h="rp",p="bs",d="be",m="bb",g="bi",v="bp",y="rv",_="Q",b=[r,i,o,u,l,c,f,p,d,m,g];function x(t){var e="bruteForce"+(t?"Full":"Partial"),n=[],x=b.slice();t||x.splice(3,0,a);var w=["function "+e+"("+x.join()+"){"];function j(e,a){var x=function(t,e,n){var a="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(n?"Full":""),x=["function ",a,"(",b.join(),"){","var ",s,"=2*",r,";"],w="for(var i="+u+","+h+"="+s+"*"+u+";i<"+l+";++i,"+h+"+="+s+"){var x0="+c+"["+i+"+"+h+"],x1="+c+"["+i+"+"+h+"+"+r+"],xi="+f+"[i];",j="for(var j="+p+","+v+"="+s+"*"+p+";j<"+d+";++j,"+v+"+="+s+"){var y0="+m+"["+i+"+"+v+"],"+(n?"y1="+m+"["+i+"+"+v+"+"+r+"],":"")+"yi="+g+"[j];";return t?x.push(w,_,":",j):x.push(j,_,":",w),n?x.push("if(y1<x0||x1<y0)continue;"):e?x.push("if(y0<=x0||x1<y0)continue;"):x.push("if(y0<x0||x1<y0)continue;"),x.push("for(var k="+i+"+1;k<"+r+";++k){var r0="+c+"[k+"+h+"],r1="+c+"[k+"+r+"+"+h+"],b0="+m+"[k+"+v+"],b1="+m+"[k+"+r+"+"+v+"];if(r1<b0||b1<r0)continue "+_+";}var "+y+"="+o+"("),e?x.push("yi,xi"):x.push("xi,yi"),x.push(");if("+y+"!==void 0)return "+y+";}}}"),{name:a,code:x.join("")}}(e,a,t);n.push(x.code),w.push("return "+x.name+"("+b.join()+");")}w.push("if("+l+"-"+u+">"+d+"-"+p+"){"),t?(j(!0,!1),w.push("}else{"),j(!1,!1)):(w.push("if("+a+"){"),j(!0,!0),w.push("}else{"),j(!0,!1),w.push("}}else{if("+a+"){"),j(!1,!0),w.push("}else{"),j(!1,!1),w.push("}")),w.push("}}return "+e);var M=n.join("")+w.join("");return new Function(M)()}e.partial=x(!1),e.full=x(!0)},"./node_modules/box-intersect/lib/intersect.js":
/*!*****************************************************!*\
  !*** ./node_modules/box-intersect/lib/intersect.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n,o,c,z,E,S,N){!function(t,e){var n=8*i.log2(e+1)*(t+1)|0,o=i.nextPow2(b*n);w.length<o&&(r.free(w),w=r.mallocInt32(o));var a=i.nextPow2(x*n);j<a&&(r.free(j),j=r.mallocDouble(a))}(t,o+E);var T,C=0,O=2*t;M(C++,0,0,o,0,E,n?16:0,-1/0,1/0),n||M(C++,0,0,E,0,o,1,-1/0,1/0);for(;C>0;){var P=(C-=1)*b,I=w[P],B=w[P+1],D=w[P+2],F=w[P+3],R=w[P+4],L=w[P+5],q=C*x,U=j[q],H=j[q+1],Y=1&L,V=!!(16&L),Z=c,W=z,X=S,Q=N;if(Y&&(Z=S,W=N,X=c,Q=z),!(2&L&&(D=g(t,I,B,D,Z,W,H),B>=D)||4&L&&(B=v(t,I,B,D,Z,W,U))>=D)){var $=D-B,G=R-F;if(V){if(t*$*($+G)<p){if(void 0!==(T=u.scanComplete(t,I,e,B,D,Z,W,F,R,X,Q)))return T;continue}}else{if(t*Math.min($,G)<f){if(void 0!==(T=a(t,I,e,Y,B,D,Z,W,F,R,X,Q)))return T;continue}if(t*$*G<h){if(void 0!==(T=u.scanBipartite(t,I,e,Y,B,D,Z,W,F,R,X,Q)))return T;continue}}var K=d(t,I,B,D,Z,W,U,H);if(B<K)if(t*(K-B)<f){if(void 0!==(T=s(t,I+1,e,B,K,Z,W,F,R,X,Q)))return T}else if(I===t-2){if(void 0!==(T=Y?u.sweepBipartite(t,e,F,R,X,Q,B,K,Z,W):u.sweepBipartite(t,e,B,K,Z,W,F,R,X,Q)))return T}else M(C++,I+1,B,K,F,R,Y,-1/0,1/0),M(C++,I+1,F,R,B,K,1^Y,-1/0,1/0);if(K<D){var J=l(t,I,F,R,X,Q),tt=X[O*J+I],et=m(t,I,J,R,X,Q,tt);if(et<R&&M(C++,I,K,D,et,R,(4|Y)+(V?16:0),tt,H),F<J&&M(C++,I,K,D,F,J,(2|Y)+(V?16:0),U,tt),J+1===et){if(void 0!==(T=V?k(t,I,e,K,D,Z,W,J,X,Q[J]):A(t,I,e,Y,K,D,Z,W,J,X,Q[J])))return T}else if(J<et){var nt;if(V){if(nt=y(t,I,K,D,Z,W,tt),K<nt){var rt=m(t,I,K,nt,Z,W,tt);if(I===t-2){if(K<rt&&void 0!==(T=u.sweepComplete(t,e,K,rt,Z,W,J,et,X,Q)))return T;if(rt<nt&&void 0!==(T=u.sweepBipartite(t,e,rt,nt,Z,W,J,et,X,Q)))return T}else K<rt&&M(C++,I+1,K,rt,J,et,16,-1/0,1/0),rt<nt&&(M(C++,I+1,rt,nt,J,et,0,-1/0,1/0),M(C++,I+1,J,et,rt,nt,1,-1/0,1/0))}}else nt=Y?_(t,I,K,D,Z,W,tt):y(t,I,K,D,Z,W,tt),K<nt&&(I===t-2?T=Y?u.sweepBipartite(t,e,J,et,X,Q,K,nt,Z,W):u.sweepBipartite(t,e,K,nt,Z,W,J,et,X,Q):(M(C++,I+1,K,nt,J,et,Y,-1/0,1/0),M(C++,I+1,J,et,K,nt,1^Y,-1/0,1/0)))}}}}};var r=n(/*! typedarray-pool */"./node_modules/typedarray-pool/pool.js"),i=n(/*! bit-twiddle */"./node_modules/bit-twiddle/twiddle.js"),o=n(/*! ./brute */"./node_modules/box-intersect/lib/brute.js"),a=o.partial,s=o.full,u=n(/*! ./sweep */"./node_modules/box-intersect/lib/sweep.js"),l=n(/*! ./median */"./node_modules/box-intersect/lib/median.js"),c=n(/*! ./partition */"./node_modules/box-intersect/lib/partition.js"),f=128,h=1<<22,p=1<<22,d=c("!(lo>=p0)&&!(p1>=hi)",["p0","p1"]),m=c("lo===p0",["p0"]),g=c("lo<p0",["p0"]),v=c("hi<=p0",["p0"]),y=c("lo<=p0&&p0<=hi",["p0"]),_=c("lo<p0&&p0<=hi",["p0"]),b=6,x=2,w=r.mallocInt32(1024),j=r.mallocDouble(1024);function M(t,e,n,r,i,o,a,s,u){var l=b*t;w[l]=e,w[l+1]=n,w[l+2]=r,w[l+3]=i,w[l+4]=o,w[l+5]=a;var c=x*t;j[c]=s,j[c+1]=u}function A(t,e,n,r,i,o,a,s,u,l,c){var f=2*t,h=u*f,p=l[h+e];t:for(var d=i,m=i*f;d<o;++d,m+=f){var g=a[m+e],v=a[m+e+t];if(!(p<g||v<p)&&(!r||p!==g)){for(var y,_=s[d],b=e+1;b<t;++b){g=a[m+b],v=a[m+b+t];var x=l[h+b],w=l[h+b+t];if(v<x||w<g)continue t}if(void 0!==(y=r?n(c,_):n(_,c)))return y}}}function k(t,e,n,r,i,o,a,s,u,l){var c=2*t,f=s*c,h=u[f+e];t:for(var p=r,d=r*c;p<i;++p,d+=c){var m=a[p];if(m!==l){var g=o[d+e],v=o[d+e+t];if(!(h<g||v<h)){for(var y=e+1;y<t;++y){g=o[d+y],v=o[d+y+t];var _=u[f+y],b=u[f+y+t];if(v<_||b<g)continue t}var x=n(m,l);if(void 0!==x)return x}}}}},"./node_modules/box-intersect/lib/median.js":
/*!**************************************************!*\
  !*** ./node_modules/box-intersect/lib/median.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n,a,s,u){if(a<=n+1)return n;var l=n,c=a,f=a+n>>>1,h=2*t,p=f,d=s[h*f+e];for(;l<c;){if(c-l<i){o(t,e,l,c,s,u),d=s[h*f+e];break}var m=c-l,g=Math.random()*m+l|0,v=s[h*g+e],y=Math.random()*m+l|0,_=s[h*y+e],b=Math.random()*m+l|0,x=s[h*b+e];v<=_?x>=_?(p=y,d=_):v>=x?(p=g,d=v):(p=b,d=x):_>=x?(p=y,d=_):x>=v?(p=g,d=v):(p=b,d=x);for(var w=h*(c-1),j=h*p,M=0;M<h;++M,++w,++j){var A=s[w];s[w]=s[j],s[j]=A}var k=u[c-1];u[c-1]=u[p],u[p]=k,p=r(t,e,l,c-1,s,u,d);for(var w=h*(c-1),j=h*p,M=0;M<h;++M,++w,++j){var A=s[w];s[w]=s[j],s[j]=A}var k=u[c-1];if(u[c-1]=u[p],u[p]=k,f<p){for(c=p-1;l<c&&s[h*(c-1)+e]===d;)c-=1;c+=1}else{if(!(p<f))break;for(l=p+1;l<c&&s[h*l+e]===d;)l+=1}}return r(t,e,n,f,s,u,s[h*f+e])};var r=n(/*! ./partition */"./node_modules/box-intersect/lib/partition.js")("lo<p0",["p0"]),i=8;function o(t,e,n,r,i,o){for(var a=2*t,s=a*(n+1)+e,u=n+1;u<r;++u,s+=a)for(var l=i[s],c=u,f=a*(u-1);c>n&&i[f+e]>l;--c,f-=a){for(var h=f,p=f+a,d=0;d<a;++d,++h,++p){var m=i[h];i[h]=i[p],i[p]=m}var g=o[c];o[c]=o[c-1],o[c-1]=g}}},"./node_modules/box-intersect/lib/partition.js":
/*!*****************************************************!*\
  !*** ./node_modules/box-intersect/lib/partition.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n="abcdef".split("").concat(e),i=[];t.indexOf("lo")>=0&&i.push("lo=e[k+n]");t.indexOf("hi")>=0&&i.push("hi=e[k+o]");return n.push(r.replace("_",i.join()).replace("$",t)),Function.apply(void 0,n)};var r="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m"},"./node_modules/box-intersect/lib/sort.js":
/*!************************************************!*\
  !*** ./node_modules/box-intersect/lib/sort.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){e<=4*r?i(0,e-1,t):function t(e,n,f){var h=(n-e+1)/6|0,p=e+h,d=n-h,m=e+n>>1,g=m-h,v=m+h,y=p,_=g,b=m,x=v,w=d,j=e+1,M=n-1,A=0;l(y,_,f)&&(A=y,y=_,_=A);l(x,w,f)&&(A=x,x=w,w=A);l(y,b,f)&&(A=y,y=b,b=A);l(_,b,f)&&(A=_,_=b,b=A);l(y,x,f)&&(A=y,y=x,x=A);l(b,x,f)&&(A=b,b=x,x=A);l(_,w,f)&&(A=_,_=w,w=A);l(_,b,f)&&(A=_,_=b,b=A);l(x,w,f)&&(A=x,x=w,w=A);var k=f[2*_];var z=f[2*_+1];var E=f[2*x];var S=f[2*x+1];var N=2*y;var T=2*b;var C=2*w;var O=2*p;var P=2*m;var I=2*d;for(var B=0;B<2;++B){var D=f[N+B],F=f[T+B],R=f[C+B];f[O+B]=D,f[P+B]=F,f[I+B]=R}a(g,e,f);a(v,n,f);for(var L=j;L<=M;++L)if(c(L,k,z,f))L!==j&&o(L,j,f),++j;else if(!c(L,E,S,f))for(;;){if(c(M,E,S,f)){c(M,k,z,f)?(s(L,j,M,f),++j,--M):(o(L,M,f),--M);break}if(--M<L)break}u(e,j-1,k,z,f);u(n,M+1,E,S,f);j-2-e<=r?i(e,j-2,f):t(e,j-2,f);n-(M+2)<=r?i(M+2,n,f):t(M+2,n,f);M-j<=r?i(j,M,f):t(j,M,f)}(0,e-1,t)};var r=32;function i(t,e,n){for(var r=2*(t+1),i=t+1;i<=e;++i){for(var o=n[r++],a=n[r++],s=i,u=r-2;s-- >t;){var l=n[u-2],c=n[u-1];if(l<o)break;if(l===o&&c<a)break;n[u]=l,n[u+1]=c,u-=2}n[u]=o,n[u+1]=a}}function o(t,e,n){e*=2;var r=n[t*=2],i=n[t+1];n[t]=n[e],n[t+1]=n[e+1],n[e]=r,n[e+1]=i}function a(t,e,n){e*=2,n[t*=2]=n[e],n[t+1]=n[e+1]}function s(t,e,n,r){e*=2,n*=2;var i=r[t*=2],o=r[t+1];r[t]=r[e],r[t+1]=r[e+1],r[e]=r[n],r[e+1]=r[n+1],r[n]=i,r[n+1]=o}function u(t,e,n,r,i){e*=2,i[t*=2]=i[e],i[e]=n,i[t+1]=i[e+1],i[e+1]=r}function l(t,e,n){e*=2;var r=n[t*=2],i=n[e];return!(r<i)&&(r!==i||n[t+1]>n[e+1])}function c(t,e,n,r){var i=r[t*=2];return i<e||i===e&&r[t+1]<n}},"./node_modules/box-intersect/lib/sweep.js":
/*!*************************************************!*\
  !*** ./node_modules/box-intersect/lib/sweep.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports={init:function(t){var e=i.nextPow2(t);s.length<e&&(r.free(s),s=r.mallocInt32(e));u.length<e&&(r.free(u),u=r.mallocInt32(e));l.length<e&&(r.free(l),l=r.mallocInt32(e));c.length<e&&(r.free(c),c=r.mallocInt32(e));f.length<e&&(r.free(f),f=r.mallocInt32(e));h.length<e&&(r.free(h),h=r.mallocInt32(e));var n=8*e;p.length<n&&(r.free(p),p=r.mallocDouble(n))},sweepBipartite:function(t,e,n,r,i,f,h,g,v,y){for(var _=0,b=2*t,x=t-1,w=b-1,j=n;j<r;++j){var M=f[j],A=b*j;p[_++]=i[A+x],p[_++]=-(M+1),p[_++]=i[A+w],p[_++]=M}for(var j=h;j<g;++j){var M=y[j]+a,k=b*j;p[_++]=v[k+x],p[_++]=-M,p[_++]=v[k+w],p[_++]=M}var z=_>>>1;o(p,z);for(var E=0,S=0,j=0;j<z;++j){var N=0|p[2*j+1];if(N>=a)d(l,c,S--,N=N-a|0);else if(N>=0)d(s,u,E--,N);else if(N<=-a){N=-N-a|0;for(var T=0;T<E;++T){var C=e(s[T],N);if(void 0!==C)return C}m(l,c,S++,N)}else{N=-N-1|0;for(var T=0;T<S;++T){var C=e(N,l[T]);if(void 0!==C)return C}m(s,u,E++,N)}}},sweepComplete:function(t,e,n,r,i,a,g,v,y,_){for(var b=0,x=2*t,w=t-1,j=x-1,M=n;M<r;++M){var A=a[M]+1<<1,k=x*M;p[b++]=i[k+w],p[b++]=-A,p[b++]=i[k+j],p[b++]=A}for(var M=g;M<v;++M){var A=_[M]+1<<1,z=x*M;p[b++]=y[z+w],p[b++]=1|-A,p[b++]=y[z+j],p[b++]=1|A}var E=b>>>1;o(p,E);for(var S=0,N=0,T=0,M=0;M<E;++M){var C=0|p[2*M+1],O=1&C;if(M<E-1&&C>>1==p[2*M+3]>>1&&(O=2,M+=1),C<0){for(var P=-(C>>1)-1,I=0;I<T;++I){var B=e(f[I],P);if(void 0!==B)return B}if(0!==O)for(var I=0;I<S;++I){var B=e(s[I],P);if(void 0!==B)return B}if(1!==O)for(var I=0;I<N;++I){var B=e(l[I],P);if(void 0!==B)return B}0===O?m(s,u,S++,P):1===O?m(l,c,N++,P):2===O&&m(f,h,T++,P)}else{var P=(C>>1)-1;0===O?d(s,u,S--,P):1===O?d(l,c,N--,P):2===O&&d(f,h,T--,P)}}},scanBipartite:function(t,e,n,r,i,l,c,f,h,g,v,y){var _=0,b=2*t,x=e,w=e+t,j=1,M=1;r?M=a:j=a;for(var A=i;A<l;++A){var k=A+j,z=b*A;p[_++]=c[z+x],p[_++]=-k,p[_++]=c[z+w],p[_++]=k}for(var A=h;A<g;++A){var k=A+M,E=b*A;p[_++]=v[E+x],p[_++]=-k}var S=_>>>1;o(p,S);for(var N=0,A=0;A<S;++A){var T=0|p[2*A+1];if(T<0){var k=-T,C=!1;if(k>=a?(C=!r,k-=a):(C=!!r,k-=1),C)m(s,u,N++,k);else{var O=y[k],P=b*k,I=v[P+e+1],B=v[P+e+1+t];t:for(var D=0;D<N;++D){var F=s[D],R=b*F;if(!(B<c[R+e+1]||c[R+e+1+t]<I)){for(var L=e+2;L<t;++L)if(v[P+L+t]<c[R+L]||c[R+L+t]<v[P+L])continue t;var q,U=f[F];if(void 0!==(q=r?n(O,U):n(U,O)))return q}}}}else d(s,u,N--,T-j)}},scanComplete:function(t,e,n,r,i,u,l,c,f,h,d){for(var m=0,g=2*t,v=e,y=e+t,_=r;_<i;++_){var b=_+a,x=g*_;p[m++]=u[x+v],p[m++]=-b,p[m++]=u[x+y],p[m++]=b}for(var _=c;_<f;++_){var b=_+1,w=g*_;p[m++]=h[w+v],p[m++]=-b}var j=m>>>1;o(p,j);for(var M=0,_=0;_<j;++_){var A=0|p[2*_+1];if(A<0){var b=-A;if(b>=a)s[M++]=b-a;else{var k=d[b-=1],z=g*b,E=h[z+e+1],S=h[z+e+1+t];t:for(var N=0;N<M;++N){var T=s[N],C=l[T];if(C===k)break;var O=g*T;if(!(S<u[O+e+1]||u[O+e+1+t]<E)){for(var P=e+2;P<t;++P)if(h[z+P+t]<u[O+P]||u[O+P+t]<h[z+P])continue t;var I=n(C,k);if(void 0!==I)return I}}}}else{for(var b=A-a,N=M-1;N>=0;--N)if(s[N]===b){for(var P=N+1;P<M;++P)s[P-1]=s[P];break}--M}}}};var r=n(/*! typedarray-pool */"./node_modules/typedarray-pool/pool.js"),i=n(/*! bit-twiddle */"./node_modules/bit-twiddle/twiddle.js"),o=n(/*! ./sort */"./node_modules/box-intersect/lib/sort.js"),a=1<<28,s=r.mallocInt32(1024),u=r.mallocInt32(1024),l=r.mallocInt32(1024),c=r.mallocInt32(1024),f=r.mallocInt32(1024),h=r.mallocInt32(1024),p=r.mallocDouble(8192);function d(t,e,n,r){var i=e[r],o=t[n-1];t[i]=o,e[o]=i}function m(t,e,n,r){t[n]=r,e[r]=n}},"./node_modules/buffer/index.js":
/*!**************************************!*\
  !*** ./node_modules/buffer/index.js ***!
  \**************************************/
/*! no static exports found */function(t,e,n){"use strict";(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
var r=n(/*! base64-js */"./node_modules/base64-js/index.js"),i=n(/*! ieee754 */"./node_modules/ieee754/index.js"),o=n(/*! isarray */"./node_modules/isarray/index.js");function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return l(this,t,e,n)}function l(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=s(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=s(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function f(t,e){if(c(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|p(e.length);t=s(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(r)return L(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(t,o)===l(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(t,o+h)!==l(e,h)){f=!1;break}if(f)return o}return-1}function y(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[n+a]=s}return a}function _(t,e,n,r){return U(L(e,t.length-n),t,n,r)}function b(t,e,n,r){return U(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return b(t,e,n,r)}function w(t,e,n,r){return U(q(e),t,n,r)}function j(t,e,n,r){return U(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function M(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function A(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,s,u,l=t[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=k));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return l(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return c(e),e<=0?s(t,e):void 0!==n?"string"==typeof r?s(t,e).fill(n,r):s(t,e).fill(n):s(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return f(null,t)},u.allocUnsafeSlow=function(t){return f(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?A(this,0,t):function(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,n);case"utf8":case"utf-8":return A(this,e,n);case"ascii":return z(this,e,n);case"latin1":case"binary":return E(this,e,n);case"base64":return M(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,s=Math.min(o,a),l=this.slice(r,i),c=t.slice(e,n),f=0;f<s;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return b(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function z(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function E(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function S(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=R(t[o]);return i}function N(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function T(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function O(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function P(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function I(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return o||I(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function D(t,e,n,r,o){return o||I(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||T(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||T(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||T(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||T(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||T(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||T(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||T(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||T(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||T(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||T(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=u.isBuffer(t)?t:L(new u(t,r).toString()),s=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function R(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(/*! ./../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"))},"./node_modules/cdt2d/cdt2d.js":
/*!*************************************!*\
  !*** ./node_modules/cdt2d/cdt2d.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/monotone */"./node_modules/cdt2d/lib/monotone.js"),i=n(/*! ./lib/triangulation */"./node_modules/cdt2d/lib/triangulation.js"),o=n(/*! ./lib/delaunay */"./node_modules/cdt2d/lib/delaunay.js"),a=n(/*! ./lib/filter */"./node_modules/cdt2d/lib/filter.js");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function u(t,e){return t[0]-e[0]||t[1]-e[1]}function l(t,e,n){return e in t?t[e]:n}t.exports=function(t,e,n){Array.isArray(e)?(n=n||{},e=e||[]):(n=e||{},e=[]);var c=!!l(n,"delaunay",!0),f=!!l(n,"interior",!0),h=!!l(n,"exterior",!0),p=!!l(n,"infinity",!1);if(!f&&!h||0===t.length)return[];var d=r(t,e);if(c||f!==h||p){for(var m=i(t.length,function(t){return t.map(s).sort(u)}(e)),g=0;g<d.length;++g){var v=d[g];m.addTriangle(v[0],v[1],v[2])}return c&&o(t,m),h?f?p?a(m,0,p):m.cells():a(m,1,p):a(m,-1)}return d}},"./node_modules/cdt2d/lib/delaunay.js":
/*!********************************************!*\
  !*** ./node_modules/cdt2d/lib/delaunay.js ***!
  \********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! robust-in-sphere */"./node_modules/robust-in-sphere/in-sphere.js")[4];n(/*! binary-search-bounds */"./node_modules/binary-search-bounds/search-bounds.js");function i(t,e,n,i,o,a){var s=e.opposite(i,o);if(!(s<0)){if(o<i){var u=i;i=o,o=u,u=a,a=s,s=u}e.isConstraint(i,o)||r(t[i],t[o],t[a],t[s])<0&&n.push(i,o)}}t.exports=function(t,e){for(var n=[],o=t.length,a=e.stars,s=0;s<o;++s)for(var u=a[s],l=1;l<u.length;l+=2){var c=u[l];if(!(c<s)&&!e.isConstraint(s,c)){for(var f=u[l-1],h=-1,p=1;p<u.length;p+=2)if(u[p-1]===c){h=u[p];break}h<0||r(t[s],t[c],t[f],t[h])<0&&n.push(s,c)}}for(;n.length>0;){for(var c=n.pop(),s=n.pop(),f=-1,h=-1,u=a[s],d=1;d<u.length;d+=2){var m=u[d-1],g=u[d];m===c?h=g:g===c&&(f=m)}f<0||h<0||(r(t[s],t[c],t[f],t[h])>=0||(e.flip(s,c),i(t,e,n,f,s,h),i(t,e,n,s,h,f),i(t,e,n,h,c,f),i(t,e,n,c,f,h)))}}},"./node_modules/cdt2d/lib/filter.js":
/*!******************************************!*\
  !*** ./node_modules/cdt2d/lib/filter.js ***!
  \******************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! binary-search-bounds */"./node_modules/binary-search-bounds/search-bounds.js");function i(t,e,n,r,i,o,a){this.cells=t,this.neighbor=e,this.flags=r,this.constraint=n,this.active=i,this.next=o,this.boundary=a}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,n){var r=function(t,e){for(var n=t.cells(),r=n.length,a=0;a<r;++a){var s=n[a],u=s[0],l=s[1],c=s[2];l<c?l<u&&(s[0]=l,s[1]=c,s[2]=u):c<u&&(s[0]=c,s[1]=u,s[2]=l)}n.sort(o);for(var f=new Array(r),a=0;a<f.length;++a)f[a]=0;var h=[],p=[],d=new Array(3*r),m=new Array(3*r),g=null;e&&(g=[]);for(var v=new i(n,d,m,f,h,p,g),a=0;a<r;++a)for(var s=n[a],y=0;y<3;++y){var u=s[y],l=s[(y+1)%3],_=d[3*a+y]=v.locate(l,u,t.opposite(l,u)),b=m[3*a+y]=t.isConstraint(u,l);_<0&&(b?p.push(a):(h.push(a),f[a]=1),e&&g.push([l,u,-1]))}return v}(t,n);if(0===e)return n?r.cells.concat(r.boundary):r.cells;var a=1,s=r.active,u=r.next,l=r.flags,c=r.cells,f=r.constraint,h=r.neighbor;for(;s.length>0||u.length>0;){for(;s.length>0;){var p=s.pop();if(l[p]!==-a){l[p]=a;c[p];for(var d=0;d<3;++d){var m=h[3*p+d];m>=0&&0===l[m]&&(f[3*p+d]?u.push(m):(s.push(m),l[m]=a))}}}var g=u;u=s,s=g,u.length=0,a=-a}var v=function(t,e,n){for(var r=0,i=0;i<t.length;++i)e[i]===n&&(t[r++]=t[i]);return t.length=r,t}(c,l,e);if(n)return v.concat(r.boundary);return v},i.prototype.locate=function(){var t=[0,0,0];return function(e,n,i){var a=e,s=n,u=i;return n<i?n<e&&(a=n,s=i,u=e):i<e&&(a=i,s=e,u=n),a<0?-1:(t[0]=a,t[1]=s,t[2]=u,r.eq(this.cells,t,o))}}()},"./node_modules/cdt2d/lib/monotone.js":
/*!********************************************!*\
  !*** ./node_modules/cdt2d/lib/monotone.js ***!
  \********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! binary-search-bounds */"./node_modules/binary-search-bounds/search-bounds.js"),i=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js")[3],o=0,a=1,s=2;function u(t,e,n,r,i){this.a=t,this.b=e,this.idx=n,this.lowerIds=r,this.upperIds=i}function l(t,e,n,r){this.a=t,this.b=e,this.type=n,this.idx=r}function c(t,e){var n=t.a[0]-e.a[0]||t.a[1]-e.a[1]||t.type-e.type;return n||(t.type!==o&&(n=i(t.a,t.b,e.b))?n:t.idx-e.idx)}function f(t,e){return i(t.a,t.b,e)}function h(t,e,n,o,a){for(var s=r.lt(e,o,f),u=r.gt(e,o,f),l=s;l<u;++l){for(var c=e[l],h=c.lowerIds,p=h.length;p>1&&i(n[h[p-2]],n[h[p-1]],o)>0;)t.push([h[p-1],h[p-2],a]),p-=1;h.length=p,h.push(a);var d=c.upperIds;for(p=d.length;p>1&&i(n[d[p-2]],n[d[p-1]],o)<0;)t.push([d[p-2],d[p-1],a]),p-=1;d.length=p,d.push(a)}}function p(t,e){var n;return(n=t.a[0]<e.a[0]?i(t.a,t.b,e.a):i(e.b,e.a,t.a))?n:(n=e.b[0]<t.b[0]?i(t.a,t.b,e.b):i(e.b,e.a,t.b))||t.idx-e.idx}function d(t,e,n){var i=r.le(t,n,p),o=t[i],a=o.upperIds,s=a[a.length-1];o.upperIds=[s],t.splice(i+1,0,new u(n.a,n.b,n.idx,[s],a))}function m(t,e,n){var i=n.a;n.a=n.b,n.b=i;var o=r.eq(t,n,p),a=t[o];t[o-1].upperIds=a.upperIds,t.splice(o,1)}t.exports=function(t,e){for(var n=t.length,r=e.length,i=[],f=0;f<n;++f)i.push(new l(t[f],null,o,f));for(var f=0;f<r;++f){var p=e[f],g=t[p[0]],v=t[p[1]];g[0]<v[0]?i.push(new l(g,v,s,f),new l(v,g,a,f)):g[0]>v[0]&&i.push(new l(v,g,s,f),new l(g,v,a,f))}i.sort(c);for(var y=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),_=[new u([y,1],[y,0],-1,[],[],[],[])],b=[],f=0,x=i.length;f<x;++f){var w=i[f],j=w.type;j===o?h(b,_,t,w.a,w.idx):j===s?d(_,t,w):m(_,t,w)}return b}},"./node_modules/cdt2d/lib/triangulation.js":
/*!*************************************************!*\
  !*** ./node_modules/cdt2d/lib/triangulation.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! binary-search-bounds */"./node_modules/binary-search-bounds/search-bounds.js");function i(t,e){this.stars=t,this.edges=e}t.exports=function(t,e){for(var n=new Array(t),r=0;r<t;++r)n[r]=[];return new i(n,e)};var o=i.prototype;function a(t,e,n){for(var r=1,i=t.length;r<i;r+=2)if(t[r-1]===e&&t[r]===n)return t[r-1]=t[i-2],t[r]=t[i-1],void(t.length=i-2)}o.isConstraint=function(){var t=[0,0];function e(t,e){return t[0]-e[0]||t[1]-e[1]}return function(n,i){return t[0]=Math.min(n,i),t[1]=Math.max(n,i),r.eq(this.edges,t,e)>=0}}(),o.removeTriangle=function(t,e,n){var r=this.stars;a(r[t],e,n),a(r[e],n,t),a(r[n],t,e)},o.addTriangle=function(t,e,n){var r=this.stars;r[t].push(e,n),r[e].push(n,t),r[n].push(t,e)},o.opposite=function(t,e){for(var n=this.stars[e],r=1,i=n.length;r<i;r+=2)if(n[r]===t)return n[r-1];return-1},o.flip=function(t,e){var n=this.opposite(t,e),r=this.opposite(e,t);this.removeTriangle(t,e,n),this.removeTriangle(e,t,r),this.addTriangle(t,r,n),this.addTriangle(e,n,r)},o.edges=function(){for(var t=this.stars,e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length;o<a;o+=2)e.push([i[o],i[o+1]]);return e},o.cells=function(){for(var t=this.stars,e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length;o<a;o+=2){var s=i[o],u=i[o+1];n<Math.min(s,u)&&e.push([n,s,u])}return e}},"./node_modules/clean-pslg/clean-pslg.js":
/*!***********************************************!*\
  !*** ./node_modules/clean-pslg/clean-pslg.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){var r;if(n){r=e;for(var i=new Array(e.length),o=0;o<e.length;++o){var a=e[o];i[o]=[a[0],a[1],n[o]]}e=i}var s=function(t,e,n){var r=d(t,[],p(t));return v(e,r,n),!!r}(t,e,!!n);for(;y(t,e,!!n);)s=!0;if(n&&s){r.length=0,n.length=0;for(var o=0;o<e.length;++o){var a=e[o];r.push([a[0],a[1]]),n.push(a[2])}}return s};var r=n(/*! union-find */"./node_modules/union-find/index.js"),i=n(/*! box-intersect */"./node_modules/box-intersect/index.js"),o=n(/*! robust-segment-intersect */"./node_modules/robust-segment-intersect/segseg.js"),a=n(/*! big-rat */"./node_modules/big-rat/index.js"),s=n(/*! big-rat/cmp */"./node_modules/big-rat/cmp.js"),u=n(/*! big-rat/to-float */"./node_modules/big-rat/to-float.js"),l=n(/*! rat-vec */"./node_modules/rat-vec/index.js"),c=n(/*! nextafter */"./node_modules/nextafter/nextafter.js"),f=n(/*! ./lib/rat-seg-intersect */"./node_modules/clean-pslg/lib/rat-seg-intersect.js");function h(t){var e=u(t);return[c(e,-1/0),c(e,1/0)]}function p(t){for(var e=new Array(t.length),n=0;n<t.length;++n){var r=t[n];e[n]=[c(r[0],-1/0),c(r[1],-1/0),c(r[0],1/0),c(r[1],1/0)]}return e}function d(t,e,n){for(var o=e.length,a=new r(o),s=[],u=0;u<e.length;++u){var l=e[u],f=h(l[0]),p=h(l[1]);s.push([c(f[0],-1/0),c(p[0],-1/0),c(f[1],1/0),c(p[1],1/0)])}i(s,function(t,e){a.link(t,e)});var d=!0,m=new Array(o);for(u=0;u<o;++u){(v=a.find(u))!==u&&(d=!1,t[v]=[Math.min(t[u][0],t[v][0]),Math.min(t[u][1],t[v][1])])}if(d)return null;var g=0;for(u=0;u<o;++u){var v;(v=a.find(u))===u?(m[u]=g,t[g++]=t[u]):m[u]=-1}t.length=g;for(u=0;u<o;++u)m[u]<0&&(m[u]=m[a.find(u)]);return m}function m(t,e){return t[0]-e[0]||t[1]-e[1]}function g(t,e){var n=t[0]-e[0]||t[1]-e[1];return n||(t[2]<e[2]?-1:t[2]>e[2]?1:0)}function v(t,e,n){if(0!==t.length){if(e)for(var r=0;r<t.length;++r){var i=e[(a=t[r])[0]],o=e[a[1]];a[0]=Math.min(i,o),a[1]=Math.max(i,o)}else for(r=0;r<t.length;++r){var a;i=(a=t[r])[0],o=a[1];a[0]=Math.min(i,o),a[1]=Math.max(i,o)}n?t.sort(g):t.sort(m);var s=1;for(r=1;r<t.length;++r){var u=t[r-1],l=t[r];(l[0]!==u[0]||l[1]!==u[1]||n&&l[2]!==u[2])&&(t[s++]=l)}t.length=s}}function y(t,e,n){var r=function(t,e){for(var n=new Array(e.length),r=0;r<e.length;++r){var i=e[r],o=t[i[0]],a=t[i[1]];n[r]=[c(Math.min(o[0],a[0]),-1/0),c(Math.min(o[1],a[1]),-1/0),c(Math.max(o[0],a[0]),1/0),c(Math.max(o[1],a[1]),1/0)]}return n}(t,e),h=function(t,e,n){var r=[];return i(n,function(n,i){var a=e[n],s=e[i];if(a[0]!==s[0]&&a[0]!==s[1]&&a[1]!==s[0]&&a[1]!==s[1]){var u=t[a[0]],l=t[a[1]],c=t[s[0]],f=t[s[1]];o(u,l,c,f)&&r.push([n,i])}}),r}(t,e,r),m=p(t),g=function(t,e,n,r){var a=[];return i(n,r,function(n,r){var i=e[n];if(i[0]!==r&&i[1]!==r){var s=t[r],u=t[i[0]],l=t[i[1]];o(u,l,s,s)&&a.push([n,r])}}),a}(t,e,r,m),y=d(t,function(t,e,n,r,i){var o,c,h=t.map(function(t){return[a(t[0]),a(t[1])]});for(o=0;o<n.length;++o){var p=n[o];c=p[0];var d=p[1],m=e[c],g=e[d],v=f(l(t[m[0]]),l(t[m[1]]),l(t[g[0]]),l(t[g[1]]));if(v){var y=t.length;t.push([u(v[0]),u(v[1])]),h.push(v),r.push([c,y],[d,y])}}for(r.sort(function(t,e){if(t[0]!==e[0])return t[0]-e[0];var n=h[t[1]],r=h[e[1]];return s(n[0],r[0])||s(n[1],r[1])}),o=r.length-1;o>=0;--o){var _=e[c=(z=r[o])[0]],b=_[0],x=_[1],w=t[b],j=t[x];if((w[0]-j[0]||w[1]-j[1])<0){var M=b;b=x,x=M}_[0]=b;var A,k=_[1]=z[1];for(i&&(A=_[2]);o>0&&r[o-1][0]===c;){var z,E=(z=r[--o])[1];i?e.push([k,E,A]):e.push([k,E]),k=E}i?e.push([k,x,A]):e.push([k,x])}return h}(t,e,h,g,n));return v(e,y,n),!!y||(h.length>0||g.length>0)}},"./node_modules/clean-pslg/lib/rat-seg-intersect.js":
/*!**********************************************************!*\
  !*** ./node_modules/clean-pslg/lib/rat-seg-intersect.js ***!
  \**********************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=s(e,t),f=s(r,n),h=c(o,f);if(0===a(h))return null;var p=s(t,n),d=c(f,p),m=i(d,h),g=l(o,m);return u(t,g)};var r=n(/*! big-rat/mul */"./node_modules/big-rat/mul.js"),i=n(/*! big-rat/div */"./node_modules/big-rat/div.js"),o=n(/*! big-rat/sub */"./node_modules/big-rat/sub.js"),a=n(/*! big-rat/sign */"./node_modules/big-rat/sign.js"),s=n(/*! rat-vec/sub */"./node_modules/rat-vec/sub.js"),u=n(/*! rat-vec/add */"./node_modules/rat-vec/add.js"),l=n(/*! rat-vec/muls */"./node_modules/rat-vec/muls.js");function c(t,e){return o(r(t[0],e[1]),r(t[1],e[0]))}},"./node_modules/compare-angle/cmpangle.js":
/*!************************************************!*\
  !*** ./node_modules/compare-angle/cmpangle.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n,o){var a=r(e,n,o);if(0===a){var s=i(r(t,e,n)),l=i(r(t,e,o));if(s===l){if(0===s){var c=u(t,e,n),f=u(t,e,o);return c===f?0:c?1:-1}return 0}return 0===l?s>0?-1:u(t,e,o)?-1:1:0===s?l>0?1:u(t,e,n)?1:-1:i(l-s)}var h=r(t,e,n);if(h>0)return a>0&&r(t,e,o)>0?1:-1;if(h<0)return a>0||r(t,e,o)>0?1:-1;var p=r(t,e,o);return p>0?1:u(t,e,n)?1:-1};var r=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js"),i=n(/*! signum */"./node_modules/compare-angle/node_modules/signum/sgn.js"),o=n(/*! two-sum */"./node_modules/two-sum/two-sum.js"),a=n(/*! robust-product */"./node_modules/robust-product/product.js"),s=n(/*! robust-sum */"./node_modules/robust-sum/robust-sum.js");function u(t,e,n){var r=o(t[0],-e[0]),i=o(t[1],-e[1]),u=o(n[0],-e[0]),l=o(n[1],-e[1]),c=s(a(r,u),a(i,l));return c[c.length-1]>=0}},"./node_modules/compare-angle/node_modules/signum/sgn.js":
/*!***************************************************************!*\
  !*** ./node_modules/compare-angle/node_modules/signum/sgn.js ***!
  \***************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},"./node_modules/cwise-compiler/compiler.js":
/*!*************************************************!*\
  !*** ./node_modules/cwise-compiler/compiler.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./lib/thunk.js */"./node_modules/cwise-compiler/lib/thunk.js");t.exports=function(t){var e=new function(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1};e.pre=t.pre,e.body=t.body,e.post=t.post;var n=t.args.slice(0);e.argTypes=n;for(var i=0;i<n.length;++i){var o=n[i];if("array"===o||"object"==typeof o&&o.blockIndices){if(e.argTypes[i]="array",e.arrayArgs.push(i),e.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),e.shimArgs.push("array"+i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array args");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===o){if(e.indexArgs.push(i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array index");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array index");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(i),i<e.pre.args.length&&e.pre.args[i].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array shape");if(i<e.post.args.length&&e.post.args[i].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof o||!o.offset)throw new Error("cwise: Unknown argument type "+n[i]);e.argTypes[i]="offset",e.offsetArgs.push({array:o.array,offset:o.offset}),e.offsetArgIndex.push(i)}}if(e.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(e.pre.args.length>n.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,r(e)}},"./node_modules/cwise-compiler/lib/compile.js":
/*!****************************************************!*\
  !*** ./node_modules/cwise-compiler/lib/compile.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! uniq */"./node_modules/uniq/uniq.js");function i(t,e,n){var r,i,o=t.length,a=e.arrayArgs.length,s=e.indexArgs.length>0,u=[],l=[],c=0,f=0;for(r=0;r<o;++r)l.push(["i",r,"=0"].join(""));for(i=0;i<a;++i)for(r=0;r<o;++r)f=c,c=t[r],0===r?l.push(["d",i,"s",r,"=t",i,"p",c].join("")):l.push(["d",i,"s",r,"=(t",i,"p",c,"-s",f,"*t",i,"p",f,")"].join(""));for(l.length>0&&u.push("var "+l.join(",")),r=o-1;r>=0;--r)c=t[r],u.push(["for(i",r,"=0;i",r,"<s",c,";++i",r,"){"].join(""));for(u.push(n),r=0;r<o;++r){for(f=c,c=t[r],i=0;i<a;++i)u.push(["p",i,"+=d",i,"s",r].join(""));s&&(r>0&&u.push(["index[",f,"]-=s",f].join("")),u.push(["++index[",c,"]"].join(""))),u.push("}")}return u.join("\n")}function o(t,e,n){for(var r=t.body,i=[],o=[],a=0;a<t.args.length;++a){var s=t.args[a];if(!(s.count<=0)){var u=new RegExp(s.name,"g"),l="",c=e.arrayArgs.indexOf(a);switch(e.argTypes[a]){case"offset":var f=e.offsetArgIndex.indexOf(a);c=e.offsetArgs[f].array,l="+q"+f;case"array":l="p"+c+l;var h="l"+a,p="a"+c;if(0===e.arrayBlockIndices[c])1===s.count?"generic"===n[c]?s.lvalue?(i.push(["var ",h,"=",p,".get(",l,")"].join("")),r=r.replace(u,h),o.push([p,".set(",l,",",h,")"].join(""))):r=r.replace(u,[p,".get(",l,")"].join("")):r=r.replace(u,[p,"[",l,"]"].join("")):"generic"===n[c]?(i.push(["var ",h,"=",p,".get(",l,")"].join("")),r=r.replace(u,h),s.lvalue&&o.push([p,".set(",l,",",h,")"].join(""))):(i.push(["var ",h,"=",p,"[",l,"]"].join("")),r=r.replace(u,h),s.lvalue&&o.push([p,"[",l,"]=",h].join("")));else{for(var d=[s.name],m=[l],g=0;g<Math.abs(e.arrayBlockIndices[c]);g++)d.push("\\s*\\[([^\\]]+)\\]"),m.push("$"+(g+1)+"*t"+c+"b"+g);if(u=new RegExp(d.join(""),"g"),l=m.join("+"),"generic"===n[c])throw new Error("cwise: Generic arrays not supported in combination with blocks!");r=r.replace(u,[p,"[",l,"]"].join(""))}break;case"scalar":r=r.replace(u,"Y"+e.scalarArgs.indexOf(a));break;case"index":r=r.replace(u,"index");break;case"shape":r=r.replace(u,"shape")}}}return[i.join("\n"),r,o.join("\n")].join("\n").trim()}t.exports=function(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,a=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),u=0;u<t.arrayArgs.length;++u)s[u]=e[2*u],a[u]=e[2*u+1];var l=[],c=[],f=[],h=[],p=[];for(u=0;u<t.arrayArgs.length;++u){t.arrayBlockIndices[u]<0?(f.push(0),h.push(n),l.push(n),c.push(n+t.arrayBlockIndices[u])):(f.push(t.arrayBlockIndices[u]),h.push(t.arrayBlockIndices[u]+n),l.push(0),c.push(t.arrayBlockIndices[u]));for(var d=[],m=0;m<a[u].length;m++)f[u]<=a[u][m]&&a[u][m]<h[u]&&d.push(a[u][m]-f[u]);p.push(d)}var g=["SS"],v=["'use strict'"],y=[];for(m=0;m<n;++m)y.push(["s",m,"=SS[",m,"]"].join(""));for(u=0;u<t.arrayArgs.length;++u){for(g.push("a"+u),g.push("t"+u),g.push("p"+u),m=0;m<n;++m)y.push(["t",u,"p",m,"=t",u,"[",f[u]+m,"]"].join(""));for(m=0;m<Math.abs(t.arrayBlockIndices[u]);++m)y.push(["t",u,"b",m,"=t",u,"[",l[u]+m,"]"].join(""))}for(u=0;u<t.scalarArgs.length;++u)g.push("Y"+u);if(t.shapeArgs.length>0&&y.push("shape=SS.slice(0)"),t.indexArgs.length>0){var _=new Array(n);for(u=0;u<n;++u)_[u]="0";y.push(["index=[",_.join(","),"]"].join(""))}for(u=0;u<t.offsetArgs.length;++u){var b=t.offsetArgs[u],x=[];for(m=0;m<b.offset.length;++m)0!==b.offset[m]&&(1===b.offset[m]?x.push(["t",b.array,"p",m].join("")):x.push([b.offset[m],"*t",b.array,"p",m].join("")));0===x.length?y.push("q"+u+"=0"):y.push(["q",u,"=",x.join("+")].join(""))}var w=r([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((y=y.concat(w)).length>0&&v.push("var "+y.join(",")),u=0;u<t.arrayArgs.length;++u)v.push("p"+u+"|=0");t.pre.body.length>3&&v.push(o(t.pre,t,s));var j=o(t.body,t,s),M=function(t){for(var e=0,n=t[0].length;e<n;){for(var r=1;r<t.length;++r)if(t[r][e]!==t[0][e])return e;++e}return e}(p);M<n?v.push(function(t,e,n,r){for(var o=e.length,a=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,l=[],c=0;c<a;++c)l.push(["var offset",c,"=p",c].join(""));for(c=t;c<o;++c)l.push(["for(var j"+c+"=SS[",e[c],"]|0;j",c,">0;){"].join("")),l.push(["if(j",c,"<",s,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",s].join("")),l.push(["j",c,"-=",s,"}"].join("")),u&&l.push(["index[",e[c],"]=j",c].join(""));for(c=0;c<a;++c){for(var f=["offset"+c],h=t;h<o;++h)f.push(["j",h,"*t",c,"p",e[h]].join(""));l.push(["p",c,"=(",f.join("+"),")"].join(""))}for(l.push(i(e,n,r)),c=t;c<o;++c)l.push("}");return l.join("\n")}(M,p[0],t,j)):v.push(i(p[0],t,j)),t.post.body.length>3&&v.push(o(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+v.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",a[0].join("s"),"m",M,function(t){for(var e=new Array(t.length),n=!0,r=0;r<t.length;++r){var i=t[r],o=i.match(/\d+/);o=o?o[0]:"",0===i.charAt(0)?e[r]="u"+i.charAt(1)+o:e[r]=i.charAt(0)+o,r>0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}(s)].join("");return new Function(["function ",A,"(",g.join(","),"){",v.join("\n"),"} return ",A].join(""))()}},"./node_modules/cwise-compiler/lib/thunk.js":
/*!**************************************************!*\
  !*** ./node_modules/cwise-compiler/lib/thunk.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./compile.js */"./node_modules/cwise-compiler/lib/compile.js");t.exports=function(t){var e=["'use strict'","var CACHED={}"],n=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var o=[],a=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],u=[],l=[],c=0;c<t.arrayArgs.length;++c){var f=t.arrayArgs[c];n.push(["t",f,"=array",f,".dtype,","r",f,"=array",f,".order"].join("")),o.push("t"+f),o.push("r"+f),a.push("t"+f),a.push("r"+f+".join()"),s.push("array"+f+".data"),s.push("array"+f+".stride"),s.push("array"+f+".offset|0"),c>0&&(u.push("array"+t.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),c=0;c<t.scalarArgs.length;++c)s.push("scalar"+t.scalarArgs[c]);return n.push(["type=[",a.join(","),"].join()"].join("")),n.push("proc=CACHED[type]"),e.push("var "+n.join(",")),e.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",s.join(","),")}"].join("")),t.debug&&console.log("-----Generated thunk:\n"+e.join("\n")+"\n----------"),new Function("compile",e.join("\n"))(r.bind(void 0,t))}},"./node_modules/d/index.js":
/*!*********************************!*\
  !*** ./node_modules/d/index.js ***!
  \*********************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! es5-ext/object/assign */"./node_modules/es5-ext/object/assign/index.js"),i=n(/*! es5-ext/object/normalize-options */"./node_modules/es5-ext/object/normalize-options.js"),o=n(/*! es5-ext/object/is-callable */"./node_modules/es5-ext/object/is-callable.js"),a=n(/*! es5-ext/string/#/contains */"./node_modules/es5-ext/string/#/contains/index.js");(t.exports=function(t,e){var n,o,s,u,l;return arguments.length<2||"string"!=typeof t?(u=e,e=t,t=null):u=arguments[2],null==t?(n=s=!0,o=!1):(n=a.call(t,"c"),o=a.call(t,"e"),s=a.call(t,"w")),l={value:e,configurable:n,enumerable:o,writable:s},u?r(i(u),l):l}).gs=function(t,e,n){var s,u,l,c;return"string"!=typeof t?(l=n,n=e,e=t,t=null):l=arguments[3],null==e?e=void 0:o(e)?null==n?n=void 0:o(n)||(l=n,n=void 0):(l=e,e=n=void 0),null==t?(s=!0,u=!1):(s=a.call(t,"c"),u=a.call(t,"e")),c={get:e,set:n,configurable:s,enumerable:u},l?r(i(l),c):c}},"./node_modules/double-bits/double.js":
/*!********************************************!*\
  !*** ./node_modules/double-bits/double.js ***!
  \********************************************/
/*! no static exports found */function(t,e,n){(function(e){var n=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);if(r[0]=1,n=!0,1072693248===i[1]){t.exports=function(t){return r[0]=t,[i[0],i[1]]},t.exports.pack=function(t,e){return i[0]=t,i[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,i[0]},t.exports.hi=function(t){return r[0]=t,i[1]}}else if(1072693248===i[0]){t.exports=function(t){return r[0]=t,[i[1],i[0]]},t.exports.pack=function(t,e){return i[1]=t,i[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,i[1]},t.exports.hi=function(t){return r[0]=t,i[0]}}else n=!1}if(!n){var o=new e(8);t.exports=function(t){return o.writeDoubleLE(t,0,!0),[o.readUInt32LE(0,!0),o.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return o.writeUInt32LE(t,0,!0),o.writeUInt32LE(e,4,!0),o.readDoubleLE(0,!0)},t.exports.lo=function(t){return o.writeDoubleLE(t,0,!0),o.readUInt32LE(0,!0)},t.exports.hi=function(t){return o.writeDoubleLE(t,0,!0),o.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var n=t.exports.lo(e),r=t.exports.hi(e),i=1048575&r;return 2146435072&r&&(i+=1<<20),[n,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}}).call(this,n(/*! ./../buffer/index.js */"./node_modules/buffer/index.js").Buffer)},"./node_modules/dup/dup.js":
/*!*********************************!*\
  !*** ./node_modules/dup/dup.js ***!
  \*********************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var n,r;for(n=new Array(t),r=0;r<t;++r)n[r]=e;return n}(0|t,e);break;case"object":if("number"==typeof t.length)return function t(e,n,r){var i=0|e[r];if(i<=0)return[];var o,a=new Array(i);if(r===e.length-1)for(o=0;o<i;++o)a[o]=n;else for(o=0;o<i;++o)a[o]=t(e,n,r+1);return a}(t,e,0)}return[]}},"./node_modules/eases/cubic-in-out.js":
/*!********************************************!*\
  !*** ./node_modules/eases/cubic-in-out.js ***!
  \********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}},"./node_modules/edges-to-adjacency-list/e2a.js":
/*!*****************************************************!*\
  !*** ./node_modules/edges-to-adjacency-list/e2a.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n=t.length;if("number"!=typeof e){e=0;for(var i=0;i<n;++i){var o=t[i];e=Math.max(e,o[0],o[1])}e=1+(0|e)}e|=0;for(var a=new Array(e),i=0;i<e;++i)a[i]=[];for(var i=0;i<n;++i){var o=t[i];a[o[0]].push(o[1]),a[o[1]].push(o[0])}for(var s=0;s<e;++s)r(a[s],function(t,e){return t-e});return a};var r=n(/*! uniq */"./node_modules/uniq/uniq.js")},"./node_modules/es5-ext/function/noop.js":
/*!***********************************************!*\
  !*** ./node_modules/es5-ext/function/noop.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(){}},"./node_modules/es5-ext/object/assign/index.js":
/*!*****************************************************!*\
  !*** ./node_modules/es5-ext/object/assign/index.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=n(/*! ./is-implemented */"./node_modules/es5-ext/object/assign/is-implemented.js")()?Object.assign:n(/*! ./shim */"./node_modules/es5-ext/object/assign/shim.js")},"./node_modules/es5-ext/object/assign/is-implemented.js":
/*!**************************************************************!*\
  !*** ./node_modules/es5-ext/object/assign/is-implemented.js ***!
  \**************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},"./node_modules/es5-ext/object/assign/shim.js":
/*!****************************************************!*\
  !*** ./node_modules/es5-ext/object/assign/shim.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../keys */"./node_modules/es5-ext/object/keys/index.js"),i=n(/*! ../valid-value */"./node_modules/es5-ext/object/valid-value.js"),o=Math.max;t.exports=function(t,e){var n,a,s,u=o(arguments.length,2);for(t=Object(i(t)),s=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},a=1;a<u;++a)e=arguments[a],r(e).forEach(s);if(void 0!==n)throw n;return t}},"./node_modules/es5-ext/object/is-callable.js":
/*!****************************************************!*\
  !*** ./node_modules/es5-ext/object/is-callable.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){return"function"==typeof t}},"./node_modules/es5-ext/object/is-value.js":
/*!*************************************************!*\
  !*** ./node_modules/es5-ext/object/is-value.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../function/noop */"./node_modules/es5-ext/function/noop.js")();t.exports=function(t){return t!==r&&null!==t}},"./node_modules/es5-ext/object/keys/index.js":
/*!***************************************************!*\
  !*** ./node_modules/es5-ext/object/keys/index.js ***!
  \***************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=n(/*! ./is-implemented */"./node_modules/es5-ext/object/keys/is-implemented.js")()?Object.keys:n(/*! ./shim */"./node_modules/es5-ext/object/keys/shim.js")},"./node_modules/es5-ext/object/keys/is-implemented.js":
/*!************************************************************!*\
  !*** ./node_modules/es5-ext/object/keys/is-implemented.js ***!
  \************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},"./node_modules/es5-ext/object/keys/shim.js":
/*!**************************************************!*\
  !*** ./node_modules/es5-ext/object/keys/shim.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../is-value */"./node_modules/es5-ext/object/is-value.js"),i=Object.keys;t.exports=function(t){return i(r(t)?Object(t):t)}},"./node_modules/es5-ext/object/normalize-options.js":
/*!**********************************************************!*\
  !*** ./node_modules/es5-ext/object/normalize-options.js ***!
  \**********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./is-value */"./node_modules/es5-ext/object/is-value.js"),i=Array.prototype.forEach,o=Object.create;t.exports=function(t){var e=o(null);return i.call(arguments,function(t){r(t)&&function(t,e){var n;for(n in t)e[n]=t[n]}(Object(t),e)}),e}},"./node_modules/es5-ext/object/valid-callable.js":
/*!*******************************************************!*\
  !*** ./node_modules/es5-ext/object/valid-callable.js ***!
  \*******************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},"./node_modules/es5-ext/object/valid-value.js":
/*!****************************************************!*\
  !*** ./node_modules/es5-ext/object/valid-value.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./is-value */"./node_modules/es5-ext/object/is-value.js");t.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},"./node_modules/es5-ext/string/#/contains/index.js":
/*!*********************************************************!*\
  !*** ./node_modules/es5-ext/string/#/contains/index.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=n(/*! ./is-implemented */"./node_modules/es5-ext/string/#/contains/is-implemented.js")()?String.prototype.contains:n(/*! ./shim */"./node_modules/es5-ext/string/#/contains/shim.js")},"./node_modules/es5-ext/string/#/contains/is-implemented.js":
/*!******************************************************************!*\
  !*** ./node_modules/es5-ext/string/#/contains/is-implemented.js ***!
  \******************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r="razdwatrzy";t.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},"./node_modules/es5-ext/string/#/contains/shim.js":
/*!********************************************************!*\
  !*** ./node_modules/es5-ext/string/#/contains/shim.js ***!
  \********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},"./node_modules/event-emitter/index.js":
/*!*********************************************!*\
  !*** ./node_modules/event-emitter/index.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r,i,o,a,s,u,l,c=n(/*! d */"./node_modules/d/index.js"),f=n(/*! es5-ext/object/valid-callable */"./node_modules/es5-ext/object/valid-callable.js"),h=Function.prototype.apply,p=Function.prototype.call,d=Object.create,m=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};s={on:r=function(t,e){var n;return f(e),v.call(this,"__ee__")?n=this.__ee__:(n=y.value=d(null),m(this,"__ee__",y),y.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),h.call(e,this,arguments)}),n.__eeOnceListener__=e,this},off:o=function(t,e){var n,r,i,o;if(f(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:a=function(t){var e,n,r,i,o;if(v.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;r=i[e];++e)h.call(r,this,o)}else switch(arguments.length){case 1:p.call(i,this);break;case 2:p.call(i,this,arguments[1]);break;case 3:p.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];h.call(i,this,o)}}},u={on:c(r),once:c(i),off:c(o),emit:c(a)},l=g({},u),t.exports=e=function(t){return null==t?d(l):g(Object(t),u)},e.methods=s},"./node_modules/functional-red-black-tree/rbtree.js":
/*!**********************************************************!*\
  !*** ./node_modules/functional-red-black-tree/rbtree.js ***!
  \**********************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){return new l(t||d,null)};var r=0,i=1;function o(t,e,n,r,i,o){this._color=t,this.key=e,this.value=n,this.left=r,this.right=i,this._count=o}function a(t){return new o(t._color,t.key,t.value,t.left,t.right,t._count)}function s(t,e){return new o(t,e.key,e.value,e.left,e.right,e._count)}function u(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function l(t,e){this._compare=t,this.root=e}var c=l.prototype;function f(t,e){this.tree=t,this._stack=e}Object.defineProperty(c,"keys",{get:function(){var t=[];return this.forEach(function(e,n){t.push(e)}),t}}),Object.defineProperty(c,"values",{get:function(){var t=[];return this.forEach(function(e,n){t.push(n)}),t}}),Object.defineProperty(c,"length",{get:function(){return this.root?this.root._count:0}}),c.insert=function(t,e){for(var n=this._compare,a=this.root,c=[],f=[];a;){var h=n(t,a.key);c.push(a),f.push(h),a=h<=0?a.left:a.right}c.push(new o(r,t,e,null,null,1));for(var p=c.length-2;p>=0;--p){a=c[p];f[p]<=0?c[p]=new o(a._color,a.key,a.value,c[p+1],a.right,a._count+1):c[p]=new o(a._color,a.key,a.value,a.left,c[p+1],a._count+1)}for(p=c.length-1;p>1;--p){var d=c[p-1];a=c[p];if(d._color===i||a._color===i)break;var m=c[p-2];if(m.left===d)if(d.left===a){if(!(g=m.right)||g._color!==r){if(m._color=r,m.left=d.right,d._color=i,d.right=m,c[p-2]=d,c[p-1]=a,u(m),u(d),p>=3)(v=c[p-3]).left===m?v.left=d:v.right=d;break}d._color=i,m.right=s(i,g),m._color=r,p-=1}else{if(!(g=m.right)||g._color!==r){if(d.right=a.left,m._color=r,m.left=a.right,a._color=i,a.left=d,a.right=m,c[p-2]=a,c[p-1]=d,u(m),u(d),u(a),p>=3)(v=c[p-3]).left===m?v.left=a:v.right=a;break}d._color=i,m.right=s(i,g),m._color=r,p-=1}else if(d.right===a){if(!(g=m.left)||g._color!==r){if(m._color=r,m.right=d.left,d._color=i,d.left=m,c[p-2]=d,c[p-1]=a,u(m),u(d),p>=3)(v=c[p-3]).right===m?v.right=d:v.left=d;break}d._color=i,m.left=s(i,g),m._color=r,p-=1}else{var g;if(!(g=m.left)||g._color!==r){var v;if(d.left=a.right,m._color=r,m.right=a.left,a._color=i,a.right=d,a.left=m,c[p-2]=a,c[p-1]=d,u(m),u(d),u(a),p>=3)(v=c[p-3]).right===m?v.right=a:v.left=a;break}d._color=i,m.left=s(i,g),m._color=r,p-=1}}return c[0]._color=i,new l(n,c[0])},c.forEach=function(t,e,n){if(this.root)switch(arguments.length){case 1:return function t(e,n){var r;if(n.left&&(r=t(e,n.left)))return r;return(r=e(n.key,n.value))||(n.right?t(e,n.right):void 0)}(t,this.root);case 2:return function t(e,n,r,i){if(n(e,i.key)<=0){var o;if(i.left&&(o=t(e,n,r,i.left)))return o;if(o=r(i.key,i.value))return o}if(i.right)return t(e,n,r,i.right)}(e,this._compare,t,this.root);case 3:if(this._compare(e,n)>=0)return;return function t(e,n,r,i,o){var a,s=r(e,o.key),u=r(n,o.key);if(s<=0){if(o.left&&(a=t(e,n,r,i,o.left)))return a;if(u>0&&(a=i(o.key,o.value)))return a}if(u>0&&o.right)return t(e,n,r,i,o.right)}(e,n,this._compare,t,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new f(this,t)}}),Object.defineProperty(c,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new f(this,t)}}),c.at=function(t){if(t<0)return new f(this,[]);for(var e=this.root,n=[];;){if(n.push(e),e.left){if(t<e.left._count){e=e.left;continue}t-=e.left._count}if(!t)return new f(this,n);if(t-=1,!e.right)break;if(t>=e.right._count)break;e=e.right}return new f(this,[])},c.ge=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o<=0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new f(this,r)},c.gt=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o<0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new f(this,r)},c.lt=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o>0&&(i=r.length),n=o<=0?n.left:n.right}return r.length=i,new f(this,r)},c.le=function(t){for(var e=this._compare,n=this.root,r=[],i=0;n;){var o=e(t,n.key);r.push(n),o>=0&&(i=r.length),n=o<0?n.left:n.right}return r.length=i,new f(this,r)},c.find=function(t){for(var e=this._compare,n=this.root,r=[];n;){var i=e(t,n.key);if(r.push(n),0===i)return new f(this,r);n=i<=0?n.left:n.right}return new f(this,[])},c.remove=function(t){var e=this.find(t);return e?e.remove():this},c.get=function(t){for(var e=this._compare,n=this.root;n;){var r=e(t,n.key);if(0===r)return n.value;n=r<=0?n.left:n.right}};var h=f.prototype;function p(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function d(t,e){return t<e?-1:t>e?1:0}Object.defineProperty(h,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(h,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),h.clone=function(){return new f(this.tree,this._stack.slice())},h.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),n=t[t.length-1];e[e.length-1]=new o(n._color,n.key,n.value,n.left,n.right,n._count);for(var c=t.length-2;c>=0;--c){(n=t[c]).left===t[c+1]?e[c]=new o(n._color,n.key,n.value,e[c+1],n.right,n._count):e[c]=new o(n._color,n.key,n.value,n.left,e[c+1],n._count)}if((n=e[e.length-1]).left&&n.right){var f=e.length;for(n=n.left;n.right;)e.push(n),n=n.right;var h=e[f-1];e.push(new o(n._color,h.key,h.value,n.left,n.right,n._count)),e[f-1].key=n.key,e[f-1].value=n.value;for(c=e.length-2;c>=f;--c)n=e[c],e[c]=new o(n._color,n.key,n.value,n.left,e[c+1],n._count);e[f-1].left=e[f]}if((n=e[e.length-1])._color===r){var d=e[e.length-2];d.left===n?d.left=null:d.right===n&&(d.right=null),e.pop();for(c=0;c<e.length;++c)e[c]._count--;return new l(this.tree._compare,e[0])}if(n.left||n.right){n.left?p(n,n.left):n.right&&p(n,n.right),n._color=i;for(c=0;c<e.length-1;++c)e[c]._count--;return new l(this.tree._compare,e[0])}if(1===e.length)return new l(this.tree._compare,null);for(c=0;c<e.length;++c)e[c]._count--;var m=e[e.length-2];return function(t){for(var e,n,o,l,c=t.length-1;c>=0;--c){if(e=t[c],0===c)return void(e._color=i);if((n=t[c-1]).left===e){if((o=n.right).right&&o.right._color===r)return l=(o=n.right=a(o)).right=a(o.right),n.right=o.left,o.left=n,o.right=l,o._color=n._color,e._color=i,n._color=i,l._color=i,u(n),u(o),c>1&&((f=t[c-2]).left===n?f.left=o:f.right=o),void(t[c-1]=o);if(o.left&&o.left._color===r)return l=(o=n.right=a(o)).left=a(o.left),n.right=l.left,o.left=l.right,l.left=n,l.right=o,l._color=n._color,n._color=i,o._color=i,e._color=i,u(n),u(o),u(l),c>1&&((f=t[c-2]).left===n?f.left=l:f.right=l),void(t[c-1]=l);if(o._color===i){if(n._color===r)return n._color=i,void(n.right=s(r,o));n.right=s(r,o);continue}o=a(o),n.right=o.left,o.left=n,o._color=n._color,n._color=r,u(n),u(o),c>1&&((f=t[c-2]).left===n?f.left=o:f.right=o),t[c-1]=o,t[c]=n,c+1<t.length?t[c+1]=e:t.push(e),c+=2}else{if((o=n.left).left&&o.left._color===r)return l=(o=n.left=a(o)).left=a(o.left),n.left=o.right,o.right=n,o.left=l,o._color=n._color,e._color=i,n._color=i,l._color=i,u(n),u(o),c>1&&((f=t[c-2]).right===n?f.right=o:f.left=o),void(t[c-1]=o);if(o.right&&o.right._color===r)return l=(o=n.left=a(o)).right=a(o.right),n.left=l.right,o.right=l.left,l.right=n,l.left=o,l._color=n._color,n._color=i,o._color=i,e._color=i,u(n),u(o),u(l),c>1&&((f=t[c-2]).right===n?f.right=l:f.left=l),void(t[c-1]=l);if(o._color===i){if(n._color===r)return n._color=i,void(n.left=s(r,o));n.left=s(r,o);continue}var f;o=a(o),n.left=o.right,o.right=n,o._color=n._color,n._color=r,u(n),u(o),c>1&&((f=t[c-2]).right===n?f.right=o:f.left=o),t[c-1]=o,t[c]=n,c+1<t.length?t[c+1]=e:t.push(e),c+=2}}}(e),m.left===n?m.left=null:m.right=null,new l(this.tree._compare,e[0])},Object.defineProperty(h,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(h,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(h,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var n=this.tree.root;return n?n._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var r=e.length-2;r>=0;--r)e[r+1]===e[r].right&&(++t,e[r].left&&(t+=e[r].left._count));return t},enumerable:!0}),h.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),h.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var n=new Array(e.length),r=e[e.length-1];n[n.length-1]=new o(r._color,r.key,t,r.left,r.right,r._count);for(var i=e.length-2;i>=0;--i)(r=e[i]).left===e[i+1]?n[i]=new o(r._color,r.key,r.value,n[i+1],r.right,r._count):n[i]=new o(r._color,r.key,r.value,r.left,n[i+1],r._count);return new l(this.tree._compare,n[0])},h.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(h,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},"./node_modules/gamma/index.js":
/*!*************************************!*\
  !*** ./node_modules/gamma/index.js ***!
  \*************************************/
/*! no static exports found */function(t,e){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],r=607/128,i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function o(t){if(t<0)return Number("0/0");for(var e=i[0],n=i.length-1;n>0;--n)e+=i[n]/(t+n);var o=t+r+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(o)-o+Math.log(e)-Math.log(t)}t.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(o(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var a=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(a,e+.5)*Math.exp(-a)*r},t.exports.log=o},"./node_modules/gl-mat4/adjoint.js":
/*!*****************************************!*\
  !*** ./node_modules/gl-mat4/adjoint.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],m=e[13],g=e[14],v=e[15];return t[0]=s*(h*v-p*g)-f*(u*v-l*g)+m*(u*p-l*h),t[1]=-(r*(h*v-p*g)-f*(i*v-o*g)+m*(i*p-o*h)),t[2]=r*(u*v-l*g)-s*(i*v-o*g)+m*(i*l-o*u),t[3]=-(r*(u*p-l*h)-s*(i*p-o*h)+f*(i*l-o*u)),t[4]=-(a*(h*v-p*g)-c*(u*v-l*g)+d*(u*p-l*h)),t[5]=n*(h*v-p*g)-c*(i*v-o*g)+d*(i*p-o*h),t[6]=-(n*(u*v-l*g)-a*(i*v-o*g)+d*(i*l-o*u)),t[7]=n*(u*p-l*h)-a*(i*p-o*h)+c*(i*l-o*u),t[8]=a*(f*v-p*m)-c*(s*v-l*m)+d*(s*p-l*f),t[9]=-(n*(f*v-p*m)-c*(r*v-o*m)+d*(r*p-o*f)),t[10]=n*(s*v-l*m)-a*(r*v-o*m)+d*(r*l-o*s),t[11]=-(n*(s*p-l*f)-a*(r*p-o*f)+c*(r*l-o*s)),t[12]=-(a*(f*g-h*m)-c*(s*g-u*m)+d*(s*h-u*f)),t[13]=n*(f*g-h*m)-c*(r*g-i*m)+d*(r*h-i*f),t[14]=-(n*(s*g-u*m)-a*(r*g-i*m)+d*(r*u-i*s)),t[15]=n*(s*h-u*f)-a*(r*h-i*f)+c*(r*u-i*s),t}},"./node_modules/gl-mat4/clone.js":
/*!***************************************!*\
  !*** ./node_modules/gl-mat4/clone.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},"./node_modules/gl-mat4/copy.js":
/*!**************************************!*\
  !*** ./node_modules/gl-mat4/copy.js ***!
  \**************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},"./node_modules/gl-mat4/create.js":
/*!****************************************!*\
  !*** ./node_modules/gl-mat4/create.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},"./node_modules/gl-mat4/determinant.js":
/*!*********************************************!*\
  !*** ./node_modules/gl-mat4/determinant.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],s=t[6],u=t[7],l=t[8],c=t[9],f=t[10],h=t[11],p=t[12],d=t[13],m=t[14],g=t[15];return(e*a-n*o)*(f*g-h*m)-(e*s-r*o)*(c*g-h*d)+(e*u-i*o)*(c*m-f*d)+(n*s-r*a)*(l*g-h*p)-(n*u-i*a)*(l*m-f*p)+(r*u-i*s)*(l*d-c*p)}},"./node_modules/gl-mat4/fromQuat.js":
/*!******************************************!*\
  !*** ./node_modules/gl-mat4/fromQuat.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,l=n*a,c=r*a,f=r*s,h=i*a,p=i*s,d=i*u,m=o*a,g=o*s,v=o*u;return t[0]=1-f-d,t[1]=c+v,t[2]=h-g,t[3]=0,t[4]=c-v,t[5]=1-l-d,t[6]=p+m,t[7]=0,t[8]=h+g,t[9]=p-m,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},"./node_modules/gl-mat4/fromRotationTranslation.js":
/*!*********************************************************!*\
  !*** ./node_modules/gl-mat4/fromRotationTranslation.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,u=i+i,l=o+o,c=r*s,f=r*u,h=r*l,p=i*u,d=i*l,m=o*l,g=a*s,v=a*u,y=a*l;return t[0]=1-(p+m),t[1]=f+y,t[2]=h-v,t[3]=0,t[4]=f-y,t[5]=1-(c+m),t[6]=d+g,t[7]=0,t[8]=h+v,t[9]=d-g,t[10]=1-(c+p),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}},"./node_modules/gl-mat4/frustum.js":
/*!*****************************************!*\
  !*** ./node_modules/gl-mat4/frustum.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t}},"./node_modules/gl-mat4/identity.js":
/*!******************************************!*\
  !*** ./node_modules/gl-mat4/identity.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},"./node_modules/gl-mat4/index.js":
/*!***************************************!*\
  !*** ./node_modules/gl-mat4/index.js ***!
  \***************************************/
/*! no static exports found */function(t,e,n){t.exports={create:n(/*! ./create */"./node_modules/gl-mat4/create.js"),clone:n(/*! ./clone */"./node_modules/gl-mat4/clone.js"),copy:n(/*! ./copy */"./node_modules/gl-mat4/copy.js"),identity:n(/*! ./identity */"./node_modules/gl-mat4/identity.js"),transpose:n(/*! ./transpose */"./node_modules/gl-mat4/transpose.js"),invert:n(/*! ./invert */"./node_modules/gl-mat4/invert.js"),adjoint:n(/*! ./adjoint */"./node_modules/gl-mat4/adjoint.js"),determinant:n(/*! ./determinant */"./node_modules/gl-mat4/determinant.js"),multiply:n(/*! ./multiply */"./node_modules/gl-mat4/multiply.js"),translate:n(/*! ./translate */"./node_modules/gl-mat4/translate.js"),scale:n(/*! ./scale */"./node_modules/gl-mat4/scale.js"),rotate:n(/*! ./rotate */"./node_modules/gl-mat4/rotate.js"),rotateX:n(/*! ./rotateX */"./node_modules/gl-mat4/rotateX.js"),rotateY:n(/*! ./rotateY */"./node_modules/gl-mat4/rotateY.js"),rotateZ:n(/*! ./rotateZ */"./node_modules/gl-mat4/rotateZ.js"),fromRotationTranslation:n(/*! ./fromRotationTranslation */"./node_modules/gl-mat4/fromRotationTranslation.js"),fromQuat:n(/*! ./fromQuat */"./node_modules/gl-mat4/fromQuat.js"),frustum:n(/*! ./frustum */"./node_modules/gl-mat4/frustum.js"),perspective:n(/*! ./perspective */"./node_modules/gl-mat4/perspective.js"),perspectiveFromFieldOfView:n(/*! ./perspectiveFromFieldOfView */"./node_modules/gl-mat4/perspectiveFromFieldOfView.js"),ortho:n(/*! ./ortho */"./node_modules/gl-mat4/ortho.js"),lookAt:n(/*! ./lookAt */"./node_modules/gl-mat4/lookAt.js"),str:n(/*! ./str */"./node_modules/gl-mat4/str.js")}},"./node_modules/gl-mat4/invert.js":
/*!****************************************!*\
  !*** ./node_modules/gl-mat4/invert.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,_=n*u-i*a,b=n*l-o*a,x=r*u-i*s,w=r*l-o*s,j=i*l-o*u,M=c*m-f*d,A=c*g-h*d,k=c*v-p*d,z=f*g-h*m,E=f*v-p*m,S=h*v-p*g,N=y*S-_*E+b*z+x*k-w*A+j*M;if(!N)return null;return N=1/N,t[0]=(s*S-u*E+l*z)*N,t[1]=(i*E-r*S-o*z)*N,t[2]=(m*j-g*w+v*x)*N,t[3]=(h*w-f*j-p*x)*N,t[4]=(u*k-a*S-l*A)*N,t[5]=(n*S-i*k+o*A)*N,t[6]=(g*b-d*j-v*_)*N,t[7]=(c*j-h*b+p*_)*N,t[8]=(a*E-s*k+l*M)*N,t[9]=(r*k-n*E-o*M)*N,t[10]=(d*w-m*b+v*y)*N,t[11]=(f*b-c*w-p*y)*N,t[12]=(s*A-a*z-u*M)*N,t[13]=(n*z-r*A+i*M)*N,t[14]=(m*_-d*x-g*y)*N,t[15]=(c*x-f*_+h*y)*N,t}},"./node_modules/gl-mat4/lookAt.js":
/*!****************************************!*\
  !*** ./node_modules/gl-mat4/lookAt.js ***!
  \****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./identity */"./node_modules/gl-mat4/identity.js");t.exports=function(t,e,n,i){var o,a,s,u,l,c,f,h,p,d,m=e[0],g=e[1],v=e[2],y=i[0],_=i[1],b=i[2],x=n[0],w=n[1],j=n[2];if(Math.abs(m-x)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(v-j)<1e-6)return r(t);f=m-x,h=g-w,p=v-j,d=1/Math.sqrt(f*f+h*h+p*p),o=_*(p*=d)-b*(h*=d),a=b*(f*=d)-y*p,s=y*h-_*f,(d=Math.sqrt(o*o+a*a+s*s))?(o*=d=1/d,a*=d,s*=d):(o=0,a=0,s=0);u=h*s-p*a,l=p*o-f*s,c=f*a-h*o,(d=Math.sqrt(u*u+l*l+c*c))?(u*=d=1/d,l*=d,c*=d):(u=0,l=0,c=0);return t[0]=o,t[1]=u,t[2]=f,t[3]=0,t[4]=a,t[5]=l,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(o*m+a*g+s*v),t[13]=-(u*m+l*g+c*v),t[14]=-(f*m+h*g+p*v),t[15]=1,t}},"./node_modules/gl-mat4/multiply.js":
/*!******************************************!*\
  !*** ./node_modules/gl-mat4/multiply.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],m=e[12],g=e[13],v=e[14],y=e[15],_=n[0],b=n[1],x=n[2],w=n[3];return t[0]=_*r+b*s+x*f+w*m,t[1]=_*i+b*u+x*h+w*g,t[2]=_*o+b*l+x*p+w*v,t[3]=_*a+b*c+x*d+w*y,_=n[4],b=n[5],x=n[6],w=n[7],t[4]=_*r+b*s+x*f+w*m,t[5]=_*i+b*u+x*h+w*g,t[6]=_*o+b*l+x*p+w*v,t[7]=_*a+b*c+x*d+w*y,_=n[8],b=n[9],x=n[10],w=n[11],t[8]=_*r+b*s+x*f+w*m,t[9]=_*i+b*u+x*h+w*g,t[10]=_*o+b*l+x*p+w*v,t[11]=_*a+b*c+x*d+w*y,_=n[12],b=n[13],x=n[14],w=n[15],t[12]=_*r+b*s+x*f+w*m,t[13]=_*i+b*u+x*h+w*g,t[14]=_*o+b*l+x*p+w*v,t[15]=_*a+b*c+x*d+w*y,t}},"./node_modules/gl-mat4/ortho.js":
/*!***************************************!*\
  !*** ./node_modules/gl-mat4/ortho.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*l,t[15]=1,t}},"./node_modules/gl-mat4/perspective.js":
/*!*********************************************!*\
  !*** ./node_modules/gl-mat4/perspective.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}},"./node_modules/gl-mat4/perspectiveFromFieldOfView.js":
/*!************************************************************!*\
  !*** ./node_modules/gl-mat4/perspectiveFromFieldOfView.js ***!
  \************************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),l=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}},"./node_modules/gl-mat4/rotate.js":
/*!****************************************!*\
  !*** ./node_modules/gl-mat4/rotate.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r){var i,o,a,s,u,l,c,f,h,p,d,m,g,v,y,_,b,x,w,j,M,A,k,z,E=r[0],S=r[1],N=r[2],T=Math.sqrt(E*E+S*S+N*N);if(Math.abs(T)<1e-6)return null;E*=T=1/T,S*=T,N*=T,i=Math.sin(n),o=Math.cos(n),a=1-o,s=e[0],u=e[1],l=e[2],c=e[3],f=e[4],h=e[5],p=e[6],d=e[7],m=e[8],g=e[9],v=e[10],y=e[11],_=E*E*a+o,b=S*E*a+N*i,x=N*E*a-S*i,w=E*S*a-N*i,j=S*S*a+o,M=N*S*a+E*i,A=E*N*a+S*i,k=S*N*a-E*i,z=N*N*a+o,t[0]=s*_+f*b+m*x,t[1]=u*_+h*b+g*x,t[2]=l*_+p*b+v*x,t[3]=c*_+d*b+y*x,t[4]=s*w+f*j+m*M,t[5]=u*w+h*j+g*M,t[6]=l*w+p*j+v*M,t[7]=c*w+d*j+y*M,t[8]=s*A+f*k+m*z,t[9]=u*A+h*k+g*z,t[10]=l*A+p*k+v*z,t[11]=c*A+d*k+y*z,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t}},"./node_modules/gl-mat4/rotateX.js":
/*!*****************************************!*\
  !*** ./node_modules/gl-mat4/rotateX.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],c=e[9],f=e[10],h=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[4]=o*i+l*r,t[5]=a*i+c*r,t[6]=s*i+f*r,t[7]=u*i+h*r,t[8]=l*i-o*r,t[9]=c*i-a*r,t[10]=f*i-s*r,t[11]=h*i-u*r,t}},"./node_modules/gl-mat4/rotateY.js":
/*!*****************************************!*\
  !*** ./node_modules/gl-mat4/rotateY.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[8],c=e[9],f=e[10],h=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i-l*r,t[1]=a*i-c*r,t[2]=s*i-f*r,t[3]=u*i-h*r,t[8]=o*r+l*i,t[9]=a*r+c*i,t[10]=s*r+f*i,t[11]=u*r+h*i,t}},"./node_modules/gl-mat4/rotateZ.js":
/*!*****************************************!*\
  !*** ./node_modules/gl-mat4/rotateZ.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],c=e[5],f=e[6],h=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]);return t[0]=o*i+l*r,t[1]=a*i+c*r,t[2]=s*i+f*r,t[3]=u*i+h*r,t[4]=l*i-o*r,t[5]=c*i-a*r,t[6]=f*i-s*r,t[7]=h*i-u*r,t}},"./node_modules/gl-mat4/scale.js":
/*!***************************************!*\
  !*** ./node_modules/gl-mat4/scale.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},"./node_modules/gl-mat4/str.js":
/*!*************************************!*\
  !*** ./node_modules/gl-mat4/str.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},"./node_modules/gl-mat4/translate.js":
/*!*******************************************!*\
  !*** ./node_modules/gl-mat4/translate.js ***!
  \*******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r,i,o,a,s,u,l,c,f,h,p,d,m=n[0],g=n[1],v=n[2];e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=f,t[9]=h,t[10]=p,t[11]=d,t[12]=r*m+s*g+f*v+e[12],t[13]=i*m+u*g+h*v+e[13],t[14]=o*m+l*g+p*v+e[14],t[15]=a*m+c*g+d*v+e[15]);return t}},"./node_modules/gl-mat4/transpose.js":
/*!*******************************************!*\
  !*** ./node_modules/gl-mat4/transpose.js ***!
  \*******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},"./node_modules/gl-vec4/add.js":
/*!*************************************!*\
  !*** ./node_modules/gl-vec4/add.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}},"./node_modules/gl-vec4/clone.js":
/*!***************************************!*\
  !*** ./node_modules/gl-vec4/clone.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},"./node_modules/gl-vec4/copy.js":
/*!**************************************!*\
  !*** ./node_modules/gl-vec4/copy.js ***!
  \**************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},"./node_modules/gl-vec4/create.js":
/*!****************************************!*\
  !*** ./node_modules/gl-vec4/create.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},"./node_modules/gl-vec4/distance.js":
/*!******************************************!*\
  !*** ./node_modules/gl-vec4/distance.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},"./node_modules/gl-vec4/divide.js":
/*!****************************************!*\
  !*** ./node_modules/gl-vec4/divide.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}},"./node_modules/gl-vec4/dot.js":
/*!*************************************!*\
  !*** ./node_modules/gl-vec4/dot.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},"./node_modules/gl-vec4/fromValues.js":
/*!********************************************!*\
  !*** ./node_modules/gl-vec4/fromValues.js ***!
  \********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}},"./node_modules/gl-vec4/index.js":
/*!***************************************!*\
  !*** ./node_modules/gl-vec4/index.js ***!
  \***************************************/
/*! no static exports found */function(t,e,n){t.exports={create:n(/*! ./create */"./node_modules/gl-vec4/create.js"),clone:n(/*! ./clone */"./node_modules/gl-vec4/clone.js"),fromValues:n(/*! ./fromValues */"./node_modules/gl-vec4/fromValues.js"),copy:n(/*! ./copy */"./node_modules/gl-vec4/copy.js"),set:n(/*! ./set */"./node_modules/gl-vec4/set.js"),add:n(/*! ./add */"./node_modules/gl-vec4/add.js"),subtract:n(/*! ./subtract */"./node_modules/gl-vec4/subtract.js"),multiply:n(/*! ./multiply */"./node_modules/gl-vec4/multiply.js"),divide:n(/*! ./divide */"./node_modules/gl-vec4/divide.js"),min:n(/*! ./min */"./node_modules/gl-vec4/min.js"),max:n(/*! ./max */"./node_modules/gl-vec4/max.js"),scale:n(/*! ./scale */"./node_modules/gl-vec4/scale.js"),scaleAndAdd:n(/*! ./scaleAndAdd */"./node_modules/gl-vec4/scaleAndAdd.js"),distance:n(/*! ./distance */"./node_modules/gl-vec4/distance.js"),squaredDistance:n(/*! ./squaredDistance */"./node_modules/gl-vec4/squaredDistance.js"),length:n(/*! ./length */"./node_modules/gl-vec4/length.js"),squaredLength:n(/*! ./squaredLength */"./node_modules/gl-vec4/squaredLength.js"),negate:n(/*! ./negate */"./node_modules/gl-vec4/negate.js"),inverse:n(/*! ./inverse */"./node_modules/gl-vec4/inverse.js"),normalize:n(/*! ./normalize */"./node_modules/gl-vec4/normalize.js"),dot:n(/*! ./dot */"./node_modules/gl-vec4/dot.js"),lerp:n(/*! ./lerp */"./node_modules/gl-vec4/lerp.js"),random:n(/*! ./random */"./node_modules/gl-vec4/random.js"),transformMat4:n(/*! ./transformMat4 */"./node_modules/gl-vec4/transformMat4.js"),transformQuat:n(/*! ./transformQuat */"./node_modules/gl-vec4/transformQuat.js")}},"./node_modules/gl-vec4/inverse.js":
/*!*****************************************!*\
  !*** ./node_modules/gl-vec4/inverse.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},"./node_modules/gl-vec4/length.js":
/*!****************************************!*\
  !*** ./node_modules/gl-vec4/length.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}},"./node_modules/gl-vec4/lerp.js":
/*!**************************************!*\
  !*** ./node_modules/gl-vec4/lerp.js ***!
  \**************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}},"./node_modules/gl-vec4/max.js":
/*!*************************************!*\
  !*** ./node_modules/gl-vec4/max.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}},"./node_modules/gl-vec4/min.js":
/*!*************************************!*\
  !*** ./node_modules/gl-vec4/min.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}},"./node_modules/gl-vec4/multiply.js":
/*!******************************************!*\
  !*** ./node_modules/gl-vec4/multiply.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}},"./node_modules/gl-vec4/negate.js":
/*!****************************************!*\
  !*** ./node_modules/gl-vec4/negate.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},"./node_modules/gl-vec4/normalize.js":
/*!*******************************************!*\
  !*** ./node_modules/gl-vec4/normalize.js ***!
  \*******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;a>0&&(a=1/Math.sqrt(a),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a);return t}},"./node_modules/gl-vec4/random.js":
/*!****************************************!*\
  !*** ./node_modules/gl-vec4/random.js ***!
  \****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./normalize */"./node_modules/gl-vec4/normalize.js"),i=n(/*! ./scale */"./node_modules/gl-vec4/scale.js");t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),r(t,t),i(t,t,e),t}},"./node_modules/gl-vec4/scale.js":
/*!***************************************!*\
  !*** ./node_modules/gl-vec4/scale.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}},"./node_modules/gl-vec4/scaleAndAdd.js":
/*!*********************************************!*\
  !*** ./node_modules/gl-vec4/scaleAndAdd.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}},"./node_modules/gl-vec4/set.js":
/*!*************************************!*\
  !*** ./node_modules/gl-vec4/set.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}},"./node_modules/gl-vec4/squaredDistance.js":
/*!*************************************************!*\
  !*** ./node_modules/gl-vec4/squaredDistance.js ***!
  \*************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}},"./node_modules/gl-vec4/squaredLength.js":
/*!***********************************************!*\
  !*** ./node_modules/gl-vec4/squaredLength.js ***!
  \***********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}},"./node_modules/gl-vec4/subtract.js":
/*!******************************************!*\
  !*** ./node_modules/gl-vec4/subtract.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}},"./node_modules/gl-vec4/transformMat4.js":
/*!***********************************************!*\
  !*** ./node_modules/gl-vec4/transformMat4.js ***!
  \***********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}},"./node_modules/gl-vec4/transformQuat.js":
/*!***********************************************!*\
  !*** ./node_modules/gl-vec4/transformQuat.js ***!
  \***********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],l=n[3],c=l*r+s*o-u*i,f=l*i+u*r-a*o,h=l*o+a*i-s*r,p=-a*r-s*i-u*o;return t[0]=c*l+p*-a+f*-u-h*-s,t[1]=f*l+p*-s+h*-a-c*-u,t[2]=h*l+p*-u+c*-s-f*-a,t[3]=e[3],t}},"./node_modules/ieee754/index.js":
/*!***************************************!*\
  !*** ./node_modules/ieee754/index.js ***!
  \***************************************/
/*! no static exports found */function(t,e){e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=l}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;t[n+p]=255&a,p+=d,a/=256,l-=8);t[n+p-d]|=128*m}},"./node_modules/interval-tree-1d/interval-tree.js":
/*!********************************************************!*\
  !*** ./node_modules/interval-tree-1d/interval-tree.js ***!
  \********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! binary-search-bounds */"./node_modules/interval-tree-1d/node_modules/binary-search-bounds/search-bounds.js"),i=0,o=1;function a(t,e,n,r,i){this.mid=t,this.left=e,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(e?e.count:0)+(n?n.count:0)+r.length}t.exports=function(t){if(!t||0===t.length)return new _(null);return new _(y(t))};var s=a.prototype;function u(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function l(t,e){var n=y(e);t.mid=n.mid,t.left=n.left,t.right=n.right,t.leftPoints=n.leftPoints,t.rightPoints=n.rightPoints,t.count=n.count}function c(t,e){var n=t.intervals([]);n.push(e),l(t,n)}function f(t,e){var n=t.intervals([]),r=n.indexOf(e);return r<0?i:(n.splice(r,1),l(t,n),o)}function h(t,e,n){for(var r=0;r<t.length&&t[r][0]<=e;++r){var i=n(t[r]);if(i)return i}}function p(t,e,n){for(var r=t.length-1;r>=0&&t[r][1]>=e;--r){var i=n(t[r]);if(i)return i}}function d(t,e){for(var n=0;n<t.length;++n){var r=e(t[n]);if(r)return r}}function m(t,e){return t-e}function g(t,e){var n=t[0]-e[0];return n||t[1]-e[1]}function v(t,e){var n=t[1]-e[1];return n||t[0]-e[0]}function y(t){if(0===t.length)return null;for(var e=[],n=0;n<t.length;++n)e.push(t[n][0],t[n][1]);e.sort(m);var r=e[e.length>>1],i=[],o=[],s=[];for(n=0;n<t.length;++n){var u=t[n];u[1]<r?i.push(u):r<u[0]?o.push(u):s.push(u)}var l=s,c=s.slice();return l.sort(g),c.sort(v),new a(r,y(i),y(o),l,c)}function _(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},s.insert=function(t){var e=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(e+1)?c(this,t):this.left.insert(t):this.left=y([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?c(this,t):this.right.insert(t):this.right=y([t]);else{var n=r.ge(this.leftPoints,t,g),i=r.ge(this.rightPoints,t,v);this.leftPoints.splice(n,0,t),this.rightPoints.splice(i,0,t)}},s.remove=function(t){var e=this.count-this.leftPoints;if(t[1]<this.mid){return this.left?4*(this.right?this.right.count:0)>3*(e-1)?f(this,t):2===(l=this.left.remove(t))?(this.left=null,this.count-=1,o):(l===o&&(this.count-=1),l):i}else{if(!(t[0]>this.mid)){if(1===this.count)return this.leftPoints[0]===t?2:i;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var s=this.left;l=this.right;n.count-=a.count,n.right=a.left,a.left=s,a.right=l}u(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?u(this,this.left):u(this,this.right);return o}for(s=r.ge(this.leftPoints,t,g);s<this.leftPoints.length&&this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(l=r.ge(this.rightPoints,t,v);l<this.rightPoints.length&&this.rightPoints[l][1]===t[1];++l)if(this.rightPoints[l]===t)return this.rightPoints.splice(l,1),o}return i}return this.right?4*(this.left?this.left.count:0)>3*(e-1)?f(this,t):2===(l=this.right.remove(t))?(this.right=null,this.count-=1,o):(l===o&&(this.count-=1),l):i;var l}},s.queryPoint=function(t,e){if(t<this.mid){if(this.left)if(n=this.left.queryPoint(t,e))return n;return h(this.leftPoints,t,e)}if(t>this.mid){var n;if(this.right)if(n=this.right.queryPoint(t,e))return n;return p(this.rightPoints,t,e)}return d(this.leftPoints,e)},s.queryInterval=function(t,e,n){var r;if(t<this.mid&&this.left&&(r=this.left.queryInterval(t,e,n)))return r;if(e>this.mid&&this.right&&(r=this.right.queryInterval(t,e,n)))return r;return e<this.mid?h(this.leftPoints,e,n):t>this.mid?p(this.rightPoints,t,n):d(this.leftPoints,n)};var b=_.prototype;b.insert=function(t){this.root?this.root.insert(t):this.root=new a(t[0],null,null,[t],[t])},b.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),e!==i}return!1},b.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},b.queryInterval=function(t,e,n){if(t<=e&&this.root)return this.root.queryInterval(t,e,n)},Object.defineProperty(b,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(b,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},"./node_modules/interval-tree-1d/node_modules/binary-search-bounds/search-bounds.js":
/*!******************************************************************************************!*\
  !*** ./node_modules/interval-tree-1d/node_modules/binary-search-bounds/search-bounds.js ***!
  \******************************************************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=["function ",t,"(a,l,h,",r.join(","),"){",o?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return o?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),n?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),o?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],!1,i),r("B","x"+t+"y",e,["y"],!0,i),r("P","c(x,y)"+t+"0",e,["y","c"],!1,i),r("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",n,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/invert-permutation/index.js":
/*!**************************************************!*\
  !*** ./node_modules/invert-permutation/index.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){e=e||new Array(t.length);for(var n=0;n<t.length;++n)e[t[n]]=n;return e}},"./node_modules/iota-array/iota.js":
/*!*****************************************!*\
  !*** ./node_modules/iota-array/iota.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){for(var e=new Array(t),n=0;n<t;++n)e[n]=n;return e}},"./node_modules/is-buffer/index.js":
/*!*****************************************!*\
  !*** ./node_modules/is-buffer/index.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},"./node_modules/isarray/index.js":
/*!***************************************!*\
  !*** ./node_modules/isarray/index.js ***!
  \***************************************/
/*! no static exports found */function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},"./node_modules/mathjs/core.js":
/*!*************************************!*\
  !*** ./node_modules/mathjs/core.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){t.exports=n(/*! ./lib/core/core */"./node_modules/mathjs/lib/core/core.js")},"./node_modules/mathjs/lib/core/core.js":
/*!**********************************************!*\
  !*** ./node_modules/mathjs/lib/core/core.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../utils/object */"./node_modules/mathjs/lib/utils/object.js").isFactory,i=n(/*! ./typed */"./node_modules/mathjs/lib/core/typed.js"),o=n(/*! ./../utils/emitter */"./node_modules/mathjs/lib/utils/emitter.js"),a=n(/*! ./function/import */"./node_modules/mathjs/lib/core/function/import.js"),s=n(/*! ./function/config */"./node_modules/mathjs/lib/core/function/config.js");e.create=function(t){if("function"!=typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var e=[],n=[],u=o.mixin({});u.type={},u.expression={transform:{},mathWithTransform:{}},u.typed=i.create(u.type);var l={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function c(t){if(!r(t))throw new Error("Factory object with properties `type`, `name`, and `factory` expected");var i,o=e.indexOf(t);return-1===o?(i=!0===t.math?t.factory(u.type,l,c,u.typed,u):t.factory(u.type,l,c,u.typed),e.push(t),n.push(i)):i=n[o],i}return u.import=c(a),u.config=c(s),u.expression.mathWithTransform.config=u.config,t&&u.config(t),u}},"./node_modules/mathjs/lib/core/function/config.js":
/*!*********************************************************!*\
  !*** ./node_modules/mathjs/lib/core/function/config.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/object */"./node_modules/mathjs/lib/utils/object.js");function i(t,e,n){if(void 0!==t[e]&&!function(t,e){return-1!==t.indexOf(e)}(n,t[e])){var r=function(t,e){return t.map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase())}(n,t[e]);-1!==r?(console.warn('Warning: Wrong casing for configuration option "'+e+'", should be "'+n[r]+'" instead of "'+t[e]+'".'),t[e]=n[r]):console.warn('Warning: Unknown value "'+t[e]+'" for configuration option "'+e+'". Available options: '+n.map(JSON.stringify).join(", ")+".")}}e.name="config",e.math=!0,e.factory=function(t,e,n,o,a){var s=["Matrix","Array"],u=["number","BigNumber","Fraction"];function l(t){if(t){var n=r.map(e,r.clone);i(t,"matrix",s),i(t,"number",u),r.deepExtend(e,t);var o=r.map(e,r.clone),l=r.map(t,r.clone);return a.emit("config",o,n,l),o}return r.map(e,r.clone)}return l.MATRIX=s,l.NUMBER=u,l}},"./node_modules/mathjs/lib/core/function/import.js":
/*!*********************************************************!*\
  !*** ./node_modules/mathjs/lib/core/function/import.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/object */"./node_modules/mathjs/lib/utils/object.js").lazy,i=n(/*! ../../utils/object */"./node_modules/mathjs/lib/utils/object.js").isFactory,o=n(/*! ../../utils/object */"./node_modules/mathjs/lib/utils/object.js").traverse,a=n(/*! ../../error/ArgumentsError */"./node_modules/mathjs/lib/error/ArgumentsError.js");e.math=!0,e.name="import",e.factory=function(t,e,n,s,u){function l(t,e,n){if(n.wrap&&"function"==typeof e&&(e=function(t){var e=function(){for(var e=[],n=0,r=arguments.length;n<r;n++){var i=arguments[n];e[n]=i&&i.valueOf()}return t.apply(u,e)};return t.transform&&(e.transform=t.transform),e}(e)),p(u[t])&&p(e))return e=n.override?s(t,e.signatures):s(u[t],e),u[t]=e,c(t,e),void u.emit("import",t,function(){return e});if(void 0===u[t]||n.override)return u[t]=e,c(t,e),void u.emit("import",t,function(){return e});if(!n.silent)throw new Error('Cannot import "'+t+'": already exists')}function c(t,e){e&&"function"==typeof e.transform?(u.expression.transform[t]=e.transform,d(t)&&(u.expression.mathWithTransform[t]=e.transform)):(delete u.expression.transform[t],d(t)&&(u.expression.mathWithTransform[t]=e))}function f(t,e){if("string"==typeof t.name){var i=t.name,a=i in u.expression.transform,l=t.path?o(u,t.path):u,c=l.hasOwnProperty(i)?l[i]:void 0,f=function(){var r=n(t);if(r&&"function"==typeof r.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(p(c)&&p(r))return e.override||(r=s(c,r)),r;if(void 0===c||e.override)return r;if(!e.silent)throw new Error('Cannot import "'+i+'": already exists')};!1!==t.lazy?(r(l,i,f),a||("expression.transform"===t.path||m(t))&&r(u.expression.mathWithTransform,i,f)):(l[i]=f(),a||("expression.transform"===t.path||m(t))&&(u.expression.mathWithTransform[i]=f())),u.emit("import",i,f,t.path)}else n(t)}function h(e){return"function"==typeof e||"number"==typeof e||"string"==typeof e||"boolean"==typeof e||null===e||e&&t.isUnit(e)||e&&t.isComplex(e)||e&&t.isBigNumber(e)||e&&t.isFraction(e)||e&&t.isMatrix(e)||e&&Array.isArray(e)}function p(t){return"function"==typeof t&&"object"==typeof t.signatures}function d(t){return!g.hasOwnProperty(t)}function m(t){return void 0===t.path&&!g.hasOwnProperty(t.name)}var g={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return function t(e,n){var r=arguments.length;if(1!==r&&2!==r)throw new a("import",r,1,2);if(n||(n={}),i(e))f(e,n);else if(Array.isArray(e))e.forEach(function(e){t(e,n)});else if("object"==typeof e){for(var o in e)if(e.hasOwnProperty(o)){var s=e[o];h(s)?l(o,s,n):i(e)?f(e,n):t(s,n)}}else if(!n.silent)throw new TypeError("Factory, Object, or Array expected")}},e.lazy=!0},"./node_modules/mathjs/lib/core/typed.js":
/*!***********************************************!*\
  !*** ./node_modules/mathjs/lib/core/typed.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! typed-function */"./node_modules/typed-function/typed-function.js"),i=n(/*! ./../utils/number */"./node_modules/mathjs/lib/utils/number.js").digits,o=n(/*! ./../utils/bignumber/isBigNumber */"./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js"),a=n(/*! ./../utils/collection/isMatrix */"./node_modules/mathjs/lib/utils/collection/isMatrix.js"),s=function(){return s=r.create,r};e.create=function(t){t.isNumber=function(t){return"number"==typeof t},t.isComplex=function(e){return t.Complex&&e instanceof t.Complex||!1},t.isBigNumber=o,t.isFraction=function(e){return t.Fraction&&e instanceof t.Fraction||!1},t.isUnit=function(t){return t&&t.constructor.prototype.isUnit||!1},t.isString=function(t){return"string"==typeof t},t.isArray=Array.isArray,t.isMatrix=a,t.isDenseMatrix=function(t){return t&&t.isDenseMatrix&&t.constructor.prototype.isMatrix||!1},t.isSparseMatrix=function(t){return t&&t.isSparseMatrix&&t.constructor.prototype.isMatrix||!1},t.isRange=function(t){return t&&t.constructor.prototype.isRange||!1},t.isIndex=function(t){return t&&t.constructor.prototype.isIndex||!1},t.isBoolean=function(t){return"boolean"==typeof t},t.isResultSet=function(t){return t&&t.constructor.prototype.isResultSet||!1},t.isHelp=function(t){return t&&t.constructor.prototype.isHelp||!1},t.isFunction=function(t){return"function"==typeof t},t.isDate=function(t){return t instanceof Date},t.isRegExp=function(t){return t instanceof RegExp},t.isObject=function(t){return"object"==typeof t},t.isNull=function(t){return null===t},t.isUndefined=function(t){return void 0===t},t.isAccessorNode=function(t){return t&&t.isAccessorNode&&t.constructor.prototype.isNode||!1},t.isArrayNode=function(t){return t&&t.isArrayNode&&t.constructor.prototype.isNode||!1},t.isAssignmentNode=function(t){return t&&t.isAssignmentNode&&t.constructor.prototype.isNode||!1},t.isBlockNode=function(t){return t&&t.isBlockNode&&t.constructor.prototype.isNode||!1},t.isConditionalNode=function(t){return t&&t.isConditionalNode&&t.constructor.prototype.isNode||!1},t.isConstantNode=function(t){return t&&t.isConstantNode&&t.constructor.prototype.isNode||!1},t.isFunctionAssignmentNode=function(t){return t&&t.isFunctionAssignmentNode&&t.constructor.prototype.isNode||!1},t.isFunctionNode=function(t){return t&&t.isFunctionNode&&t.constructor.prototype.isNode||!1},t.isIndexNode=function(t){return t&&t.isIndexNode&&t.constructor.prototype.isNode||!1},t.isNode=function(t){return t&&t.isNode&&t.constructor.prototype.isNode||!1},t.isObjectNode=function(t){return t&&t.isObjectNode&&t.constructor.prototype.isNode||!1},t.isOperatorNode=function(t){return t&&t.isOperatorNode&&t.constructor.prototype.isNode||!1},t.isParenthesisNode=function(t){return t&&t.isParenthesisNode&&t.constructor.prototype.isNode||!1},t.isRangeNode=function(t){return t&&t.isRangeNode&&t.constructor.prototype.isNode||!1},t.isSymbolNode=function(t){return t&&t.isSymbolNode&&t.constructor.prototype.isNode||!1},t.isChain=function(t){return t&&t.constructor.prototype.isChain||!1};var e=s();return e.types=[{name:"number",test:t.isNumber},{name:"Complex",test:t.isComplex},{name:"BigNumber",test:t.isBigNumber},{name:"Fraction",test:t.isFraction},{name:"Unit",test:t.isUnit},{name:"string",test:t.isString},{name:"Array",test:t.isArray},{name:"Matrix",test:t.isMatrix},{name:"DenseMatrix",test:t.isDenseMatrix},{name:"SparseMatrix",test:t.isSparseMatrix},{name:"Range",test:t.isRange},{name:"Index",test:t.isIndex},{name:"boolean",test:t.isBoolean},{name:"ResultSet",test:t.isResultSet},{name:"Help",test:t.isHelp},{name:"function",test:t.isFunction},{name:"Date",test:t.isDate},{name:"RegExp",test:t.isRegExp},{name:"Object",test:t.isObject},{name:"null",test:t.isNull},{name:"undefined",test:t.isUndefined},{name:"OperatorNode",test:t.isOperatorNode},{name:"ConstantNode",test:t.isConstantNode},{name:"SymbolNode",test:t.isSymbolNode},{name:"ParenthesisNode",test:t.isParenthesisNode},{name:"FunctionNode",test:t.isFunctionNode},{name:"FunctionAssignmentNode",test:t.isFunctionAssignmentNode},{name:"ArrayNode",test:t.isArrayNode},{name:"AssignmentNode",test:t.isAssignmentNode},{name:"BlockNode",test:t.isBlockNode},{name:"ConditionalNode",test:t.isConditionalNode},{name:"IndexNode",test:t.isIndexNode},{name:"RangeNode",test:t.isRangeNode},{name:"Node",test:t.isNode}],e.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(i(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t.BigNumber(e)}},{from:"number",to:"Complex",convert:function(e){return new t.Complex(e,0)}},{from:"number",to:"string",convert:function(t){return t+""}},{from:"BigNumber",to:"Complex",convert:function(e){return new t.Complex(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(t){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return new t.Complex(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){if(new t.Fraction(e).valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return new t.Fraction(e)}},{from:"string",to:"number",convert:function(t){var e=Number(t);if(isNaN(e))throw new Error('Cannot convert "'+t+'" to a number');return e}},{from:"string",to:"BigNumber",convert:function(e){try{return new t.BigNumber(e)}catch(t){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){try{return new t.Fraction(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){try{return new t.Complex(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(t){return+t}},{from:"boolean",to:"BigNumber",convert:function(e){return new t.BigNumber(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return new t.Fraction(+e)}},{from:"boolean",to:"string",convert:function(t){return+t}},{from:"null",to:"number",convert:function(){return 0}},{from:"null",to:"string",convert:function(){return"null"}},{from:"null",to:"BigNumber",convert:function(){return new t.BigNumber(0)}},{from:"null",to:"Fraction",convert:function(){return new t.Fraction(0)}},{from:"Array",to:"Matrix",convert:function(e){return new t.DenseMatrix(e)}},{from:"Matrix",to:"Array",convert:function(t){return t.valueOf()}}],e}},"./node_modules/mathjs/lib/error/ArgumentsError.js":
/*!*********************************************************!*\
  !*** ./node_modules/mathjs/lib/error/ArgumentsError.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.fn=t,this.count=e,this.min=n,this.max=i,this.message="Wrong number of arguments in function "+t+" ("+e+" provided, "+n+(void 0!=i?"-"+i:"")+" expected)",this.stack=(new Error).stack}r.prototype=new Error,r.prototype.constructor=Error,r.prototype.name="ArgumentsError",r.prototype.isArgumentsError=!0,t.exports=r},"./node_modules/mathjs/lib/error/DimensionError.js":
/*!*********************************************************!*\
  !*** ./node_modules/mathjs/lib/error/DimensionError.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.actual=t,this.expected=e,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(t)?"["+t.join(", ")+"]":t)+" "+(this.relation||"!=")+" "+(Array.isArray(e)?"["+e.join(", ")+"]":e)+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="DimensionError",r.prototype.isDimensionError=!0,t.exports=r},"./node_modules/mathjs/lib/error/IndexError.js":
/*!*****************************************************!*\
  !*** ./node_modules/mathjs/lib/error/IndexError.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.index=t,arguments.length<3?(this.min=0,this.max=e):(this.min=e,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}r.prototype=new RangeError,r.prototype.constructor=RangeError,r.prototype.name="IndexError",r.prototype.isIndexError=!0,t.exports=r},"./node_modules/mathjs/lib/function/arithmetic/addScalar.js":
/*!******************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/arithmetic/addScalar.js ***!
  \******************************************************************/
/*! no static exports found */function(t,e,n){"use strict";e.factory=function(t,e,n,r){var i=r("add",{"number, number":function(t,e){return t+e},"Complex, Complex":function(t,e){return t.add(e)},"BigNumber, BigNumber":function(t,e){return t.plus(e)},"Fraction, Fraction":function(t,e){return t.add(e)},"Unit, Unit":function(t,e){if(null==t.value)throw new Error("Parameter x contains a unit with undefined value");if(null==e.value)throw new Error("Parameter y contains a unit with undefined value");if(!t.equalBase(e))throw new Error("Units do not match");var n=t.clone();return n.value=i(n.value,e.value),n.fixPrefix=!1,n}});return i}},"./node_modules/mathjs/lib/function/arithmetic/multiply.js":
/*!*****************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/arithmetic/multiply.js ***!
  \*****************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/object */"./node_modules/mathjs/lib/utils/object.js").extend,i=n(/*! ../../utils/array */"./node_modules/mathjs/lib/utils/array.js");e.name="multiply",e.factory=function(t,e,o,a){var s=n(/*! ../../utils/latex */"./node_modules/mathjs/lib/utils/latex.js"),u=o(n(/*! ../../type/matrix/function/matrix */"./node_modules/mathjs/lib/type/matrix/function/matrix.js")),l=o(n(/*! ./addScalar */"./node_modules/mathjs/lib/function/arithmetic/addScalar.js")),c=o(n(/*! ./multiplyScalar */"./node_modules/mathjs/lib/function/arithmetic/multiplyScalar.js")),f=o(n(/*! ../relational/equalScalar */"./node_modules/mathjs/lib/function/relational/equalScalar.js")),h=o(n(/*! ../../type/matrix/utils/algorithm11 */"./node_modules/mathjs/lib/type/matrix/utils/algorithm11.js")),p=o(n(/*! ../../type/matrix/utils/algorithm14 */"./node_modules/mathjs/lib/type/matrix/utils/algorithm14.js")),d=t.DenseMatrix,m=t.SparseMatrix,g=a("multiply",r({"Array, Array":function(e,n){v(i.size(e),i.size(n));var r=g(u(e),u(n));return t.isMatrix(r)?r.valueOf():r},"Matrix, Matrix":function(t,e){var n=t.size(),r=e.size();return v(n,r),1===n.length?1===r.length?y(t,e,n[0]):_(t,e):1===r.length?x(t,e):w(t,e)},"Matrix, Array":function(t,e){return g(t,u(e))},"Array, Matrix":function(t,e){return g(u(t,e.storage()),e)},"Matrix, any":function(t,e){var n;switch(t.storage()){case"sparse":n=h(t,e,c,!1);break;case"dense":n=p(t,e,c,!1)}return n},"any, Matrix":function(t,e){var n;switch(e.storage()){case"sparse":n=h(e,t,c,!0);break;case"dense":n=p(e,t,c,!0)}return n},"Array, any":function(t,e){return p(u(t),e,c,!1).valueOf()},"any, Array":function(t,e){return p(u(e),t,c,!0).valueOf()},"any, any":c,"Array | Matrix | any, Array | Matrix | any, ...any":function(t,e,n){for(var r=g(t,e),i=0;i<n.length;i++)r=g(r,n[i]);return r}},c.signatures)),v=function(t,e){switch(t.length){case 1:switch(e.length){case 1:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(t[0]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+t[0]+") must match Matrix rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;case 2:switch(e.length){case 1:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+t[1]+") must match Vector length ("+e[0]+")");break;case 2:if(t[1]!==e[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+t[1]+") must match Matrix B rows ("+e[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+e.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+t.length+" dimensions)")}},y=function(t,e,n){if(0===n)throw new Error("Cannot multiply two empty vectors");var r,i=t._data,o=t._datatype,s=e._data,u=e._datatype,f=l,h=c;o&&u&&o===u&&"string"==typeof o&&(r=o,f=a.find(l,[r,r]),h=a.find(c,[r,r]));for(var p=h(i[0],s[0]),d=1;d<n;d++)p=f(p,h(i[d],s[d]));return p},_=function(t,e){switch(e.storage()){case"dense":return b(t,e)}throw new Error("Not implemented")},b=function(t,e){var n,r=t._data,i=t._size,o=t._datatype,s=e._data,u=e._size,f=e._datatype,h=i[0],p=u[1],m=l,g=c;o&&f&&o===f&&"string"==typeof o&&(n=o,m=a.find(l,[n,n]),g=a.find(c,[n,n]));for(var v=[],y=0;y<p;y++){for(var _=g(r[0],s[0][y]),b=1;b<h;b++)_=m(_,g(r[b],s[b][y]));v[y]=_}return new d({data:v,size:[p],datatype:n})},x=function(t,e){switch(t.storage()){case"dense":return j(t,e);case"sparse":return k(t,e)}},w=function(t,e){switch(t.storage()){case"dense":switch(e.storage()){case"dense":return M(t,e);case"sparse":return A(t,e)}break;case"sparse":switch(e.storage()){case"dense":return z(t,e);case"sparse":return E(t,e)}}},j=function(t,e){var n,r=t._data,i=t._size,o=t._datatype,s=e._data,u=e._datatype,f=i[0],h=i[1],p=l,m=c;o&&u&&o===u&&"string"==typeof o&&(n=o,p=a.find(l,[n,n]),m=a.find(c,[n,n]));for(var g=[],v=0;v<f;v++){for(var y=r[v],_=m(y[0],s[0]),b=1;b<h;b++)_=p(_,m(y[b],s[b]));g[v]=_}return new d({data:g,size:[f],datatype:n})},M=function(t,e){var n,r=t._data,i=t._size,o=t._datatype,s=e._data,u=e._size,f=e._datatype,h=i[0],p=i[1],m=u[1],g=l,v=c;o&&f&&o===f&&"string"==typeof o&&(n=o,g=a.find(l,[n,n]),v=a.find(c,[n,n]));for(var y=[],_=0;_<h;_++){var b=r[_];y[_]=[];for(var x=0;x<m;x++){for(var w=v(b[0],s[0][x]),j=1;j<p;j++)w=g(w,v(b[j],s[j][x]));y[_][x]=w}}return new d({data:y,size:[h,m],datatype:n})},A=function(t,e){var n=t._data,r=t._size,i=t._datatype,o=e._values,s=e._index,u=e._ptr,h=e._size,p=e._datatype;if(!o)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var d,g=r[0],v=h[1],y=l,_=c,b=f,x=0;i&&p&&i===p&&"string"==typeof i&&(d=i,y=a.find(l,[d,d]),_=a.find(c,[d,d]),b=a.find(f,[d,d]),x=a.convert(0,d));for(var w=[],j=[],M=[],A=new m({values:w,index:j,ptr:M,size:[g,v],datatype:d}),k=0;k<v;k++){M[k]=j.length;var z=u[k],E=u[k+1];if(E>z)for(var S=0,N=0;N<g;N++){for(var T,C=N+1,O=z;O<E;O++){var P=s[O];S!==C?(T=_(n[N][P],o[O]),S=C):T=y(T,_(n[N][P],o[O]))}S!==C||b(T,x)||(j.push(N),w.push(T))}}return M[v]=j.length,A},k=function(t,e){var n=t._values,r=t._index,i=t._ptr,o=t._datatype;if(!n)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s,u=e._data,h=e._datatype,p=t._size[0],d=e._size[0],g=[],v=[],y=[],_=l,b=c,x=f,w=0;o&&h&&o===h&&"string"==typeof o&&(s=o,_=a.find(l,[s,s]),b=a.find(c,[s,s]),x=a.find(f,[s,s]),w=a.convert(0,s));var j=[],M=[];y[0]=0;for(var A=0;A<d;A++){var k=u[A];if(!x(k,w))for(var z=i[A],E=i[A+1],S=z;S<E;S++){var N=r[S];M[N]?j[N]=_(j[N],b(k,n[S])):(M[N]=!0,v.push(N),j[N]=b(k,n[S]))}}for(var T=v.length,C=0;C<T;C++){var O=v[C];g[C]=j[O]}return y[1]=v.length,new m({values:g,index:v,ptr:y,size:[p,1],datatype:s})},z=function(t,e){var n=t._values,r=t._index,i=t._ptr,o=t._datatype;if(!n)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var s,u=e._data,h=e._datatype,p=t._size[0],d=e._size[0],g=e._size[1],v=l,y=c,_=f,b=0;o&&h&&o===h&&"string"==typeof o&&(s=o,v=a.find(l,[s,s]),y=a.find(c,[s,s]),_=a.find(f,[s,s]),b=a.convert(0,s));for(var x=[],w=[],j=[],M=new m({values:x,index:w,ptr:j,size:[p,g],datatype:s}),A=[],k=[],z=0;z<g;z++){j[z]=w.length;for(var E=z+1,S=0;S<d;S++){var N=u[S][z];if(!_(N,b))for(var T=i[S],C=i[S+1],O=T;O<C;O++){var P=r[O];k[P]!==E?(k[P]=E,w.push(P),A[P]=y(N,n[O])):A[P]=v(A[P],y(N,n[O]))}}for(var I=j[z],B=w.length,D=I;D<B;D++){var F=w[D];x[D]=A[F]}}return j[g]=w.length,M},E=function(t,e){var n,r=t._values,i=t._index,o=t._ptr,s=t._datatype,u=e._values,f=e._index,h=e._ptr,p=e._datatype,d=t._size[0],g=e._size[1],v=r&&u,y=l,_=c;s&&p&&s===p&&"string"==typeof s&&(n=s,y=a.find(l,[n,n]),_=a.find(c,[n,n]));for(var b,x,w,j,M,A,k,z,E=v?[]:void 0,S=[],N=[],T=new m({values:E,index:S,ptr:N,size:[d,g],datatype:n}),C=v?[]:void 0,O=[],P=0;P<g;P++){N[P]=S.length;var I=P+1;for(M=h[P],A=h[P+1],j=M;j<A;j++)if(z=f[j],v)for(x=o[z],w=o[z+1],b=x;b<w;b++)O[k=i[b]]!==I?(O[k]=I,S.push(k),C[k]=_(u[j],r[b])):C[k]=y(C[k],_(u[j],r[b]));else for(x=o[z],w=o[z+1],b=x;b<w;b++)O[k=i[b]]!==I&&(O[k]=I,S.push(k));if(v)for(var B=N[P],D=S.length,F=B;F<D;F++){var R=S[F];E[F]=C[R]}}return N[g]=S.length,T};return g.toTex={2:"\\left(${args[0]}"+s.operators.multiply+"${args[1]}\\right)"},g}},"./node_modules/mathjs/lib/function/arithmetic/multiplyScalar.js":
/*!***********************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/arithmetic/multiplyScalar.js ***!
  \***********************************************************************/
/*! no static exports found */function(t,e,n){"use strict";e.factory=function(t,e,n,r){var i=r("multiplyScalar",{"number, number":function(t,e){return t*e},"Complex, Complex":function(t,e){return t.mul(e)},"BigNumber, BigNumber":function(t,e){return t.times(e)},"Fraction, Fraction":function(t,e){return t.mul(e)},"number | Fraction | BigNumber | Complex, Unit":function(t,e){var n=e.clone();return n.value=null===n.value?n._normalize(t):i(n.value,t),n},"Unit, number | Fraction | BigNumber | Complex":function(t,e){var n=t.clone();return n.value=null===n.value?n._normalize(e):i(n.value,e),n},"Unit, Unit":function(t,e){return t.multiply(e)}});return i}},"./node_modules/mathjs/lib/function/arithmetic/pow.js":
/*!************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/arithmetic/pow.js ***!
  \************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/number */"./node_modules/mathjs/lib/utils/number.js").isInteger,i=n(/*! ../../utils/array */"./node_modules/mathjs/lib/utils/array.js").size;e.name="pow",e.factory=function(t,e,o,a){var s=n(/*! ../../utils/latex */"./node_modules/mathjs/lib/utils/latex.js"),u=o(n(/*! ../matrix/eye */"./node_modules/mathjs/lib/function/matrix/eye.js")),l=o(n(/*! ./multiply */"./node_modules/mathjs/lib/function/arithmetic/multiply.js")),c=o(n(/*! ../../type/matrix/function/matrix */"./node_modules/mathjs/lib/type/matrix/function/matrix.js")),f=o(n(/*! ../../type/fraction/function/fraction */"./node_modules/mathjs/lib/type/fraction/function/fraction.js")),h=o(n(/*! ../../type/number */"./node_modules/mathjs/lib/type/number.js")),p=a("pow",{"number, number":d,"Complex, Complex":function(t,e){return t.pow(e)},"BigNumber, BigNumber":function(n,r){return r.isInteger()||n>=0||e.predictable?n.pow(r):new t.Complex(n.toNumber(),0).pow(r.toNumber(),0)},"Fraction, Fraction":function(t,n){if(1!==n.d){if(e.predictable)throw new Error("Function pow does not support non-integer exponents for fractions.");return d(t.valueOf(),n.valueOf())}return t.pow(n)},"Array, number":m,"Array, BigNumber":function(t,e){return m(t,e.toNumber())},"Matrix, number":g,"Matrix, BigNumber":function(t,e){return g(t,e.toNumber())},"Unit, number":function(t,e){return t.pow(e)}});function d(n,i){if(e.predictable&&!r(i)&&n<0)try{var o=f(i),a=h(o);if((i===a||Math.abs((i-a)/i)<1e-14)&&o.d%2==1)return(o.n%2==0?1:-1)*Math.pow(-n,i)}catch(t){}return n*n<1&&i===1/0||n*n>1&&i===-1/0?0:e.predictable&&(n<-1&&i===1/0||n>-1&&n<0&&i===-1/0)?NaN:r(i)||n>=0||e.predictable?Math.pow(n,i):new t.Complex(n,0).pow(i,0)}function m(t,e){if(!r(e)||e<0)throw new TypeError("For A^b, b must be a positive integer (value is "+e+")");var n=i(t);if(2!=n.length)throw new Error("For A^b, A must be 2 dimensional (A has "+n.length+" dimensions)");if(n[0]!=n[1])throw new Error("For A^b, A must be square (size is "+n[0]+"x"+n[1]+")");for(var o=u(n[0]).valueOf(),a=t;e>=1;)1==(1&e)&&(o=l(a,o)),e>>=1,a=l(a,a);return o}function g(t,e){return c(m(t.valueOf(),e))}return p.toTex={2:"\\left(${args[0]}\\right)"+s.operators.pow+"{${args[1]}}"},p}},"./node_modules/mathjs/lib/function/matrix/eye.js":
/*!********************************************************!*\
  !*** ./node_modules/mathjs/lib/function/matrix/eye.js ***!
  \********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/array */"./node_modules/mathjs/lib/utils/array.js"),i=n(/*! ../../utils/number */"./node_modules/mathjs/lib/utils/number.js").isInteger;e.name="eye",e.factory=function(t,e,o,a){var s=o(n(/*! ../../type/matrix/function/matrix */"./node_modules/mathjs/lib/type/matrix/function/matrix.js")),u=a("eye",{"":function(){return"Matrix"===e.matrix?s([]):[]},string:function(t){return s(t)},"number | BigNumber":function(t){return c(t,t,"Matrix"===e.matrix?"default":void 0)},"number | BigNumber, string":function(t,e){return c(t,t,e)},"number | BigNumber, number | BigNumber":function(t,n){return c(t,n,"Matrix"===e.matrix?"default":void 0)},"number | BigNumber, number | BigNumber, string":function(t,e,n){return c(t,e,n)},Array:function(t){return l(t)},"Array, string":function(t,e){return l(t,e)},Matrix:function(t){return l(t.valueOf(),t.storage())},"Matrix, string":function(t,e){return l(t.valueOf(),e)}});return u.toTex=void 0,u;function l(t,e){switch(t.length){case 0:return e?s(e):[];case 1:return c(t[0],t[0],e);case 2:return c(t[0],t[1],e);default:throw new Error("Vector containing two values expected")}}function c(e,n,o){var a=t.isBigNumber(e)||t.isBigNumber(n)?t.BigNumber:null;if(t.isBigNumber(e)&&(e=e.toNumber()),t.isBigNumber(n)&&(n=n.toNumber()),!i(e)||e<1)throw new Error("Parameters in function eye must be positive integers");if(!i(n)||n<1)throw new Error("Parameters in function eye must be positive integers");var s=a?new t.BigNumber(1):1,u=a?new a(0):0,l=[e,n];if(o)return t.Matrix.storage(o).diagonal(l,s,0,u);for(var c=r.resize([],l,u),f=e<n?e:n,h=0;h<f;h++)c[h][h]=s;return c}}},"./node_modules/mathjs/lib/function/probability/factorial.js":
/*!*******************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/probability/factorial.js ***!
  \*******************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/collection/deepMap */"./node_modules/mathjs/lib/utils/collection/deepMap.js");e.name="factorial",e.factory=function(t,e,i,o){var a=i(n(/*! ./gamma */"./node_modules/mathjs/lib/function/probability/gamma.js")),s=n(/*! ../../utils/latex */"./node_modules/mathjs/lib/utils/latex.js"),u=o("factorial",{number:function(t){if(t<0)throw new Error("Value must be non-negative");return a(t+1)},BigNumber:function(t){if(t.isNegative())throw new Error("Value must be non-negative");return a(t.plus(1))},"Array | Matrix":function(t){return r(t,u)}});return u.toTex={1:"\\left(${args[0]}\\right)"+s.operators.factorial},u}},"./node_modules/mathjs/lib/function/probability/gamma.js":
/*!***************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/probability/gamma.js ***!
  \***************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/collection/deepMap */"./node_modules/mathjs/lib/utils/collection/deepMap.js"),i=n(/*! ../../utils/number */"./node_modules/mathjs/lib/utils/number.js").isInteger;var o=4.7421875,a=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];e.name="gamma",e.factory=function(t,e,s,u){var l=s(n(/*! ../arithmetic/multiply */"./node_modules/mathjs/lib/function/arithmetic/multiply.js")),c=s(n(/*! ../arithmetic/pow */"./node_modules/mathjs/lib/function/arithmetic/pow.js")),f=u("gamma",{number:function(t){var e,n;if(i(t)){if(t<=0)return isFinite(t)?1/0:NaN;if(t>171)return 1/0;for(var r=t-2,s=t-1;r>1;)s*=r,r--;return 0==s&&(s=1),s}if(t<.5)return Math.PI/(Math.sin(Math.PI*t)*f(1-t));if(t>=171.35)return 1/0;if(t>85){var u=t*t,l=u*t,c=l*t,h=c*t;return Math.sqrt(2*Math.PI/t)*Math.pow(t/Math.E,t)*(1+1/(12*t)+1/(288*u)-139/(51840*l)-571/(2488320*c)+163879/(209018880*h)+5246819/(75246796800*h*t))}--t,n=a[0];for(var p=1;p<a.length;++p)n+=a[p]/(t+p);return e=t+o+.5,Math.sqrt(2*Math.PI)*Math.pow(e,t+.5)*Math.exp(-e)*n},Complex:function(e){var n,r;if(0==e.im)return f(e.re);e=new t.Complex(e.re-1,e.im),r=new t.Complex(a[0],0);for(var i=1;i<a.length;++i){var s=e.re+i,u=s*s+e.im*e.im;0!=u?(r.re+=a[i]*s/u,r.im+=-a[i]*e.im/u):r.re=a[i]<0?-1/0:1/0}n=new t.Complex(e.re+o+.5,e.im);var h=Math.sqrt(2*Math.PI);e.re+=.5;var p=c(n,e);0==p.im?p.re*=h:0==p.re?p.im*=h:(p.re*=h,p.im*=h);var d=Math.exp(-n.re);return n.re=d*Math.cos(-n.im),n.im=d*Math.sin(-n.im),l(l(p,n),r)},BigNumber:function(n){if(n.isInteger())return n.isNegative()||n.isZero()?new t.BigNumber(1/0):function(n){if(n.isZero())return new t.BigNumber(1);for(var r=e.precision+(0|Math.log(n.toNumber())),i=new(t.BigNumber.clone({precision:r}))(n),o=n.toNumber()-1;o>1;)i=i.times(o),o--;return new t.BigNumber(i.toPrecision(t.BigNumber.precision))}(n.minus(1));if(!n.isFinite())return new t.BigNumber(n.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(t){return r(t,f)}});return f.toTex={1:"\\Gamma\\left(${args[0]}\\right)"},f}},"./node_modules/mathjs/lib/function/relational/equalScalar.js":
/*!********************************************************************!*\
  !*** ./node_modules/mathjs/lib/function/relational/equalScalar.js ***!
  \********************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../utils/number */"./node_modules/mathjs/lib/utils/number.js").nearlyEqual,i=n(/*! ../../utils/bignumber/nearlyEqual */"./node_modules/mathjs/lib/utils/bignumber/nearlyEqual.js");e.factory=function(t,e,n,o){var a=o("equalScalar",{"boolean, boolean":function(t,e){return t===e},"number, number":function(t,n){return t===n||r(t,n,e.epsilon)},"BigNumber, BigNumber":function(t,n){return t.eq(n)||i(t,n,e.epsilon)},"Fraction, Fraction":function(t,e){return t.equals(e)},"Complex, Complex":function(t,e){return t.equals(e)},"Unit, Unit":function(t,e){if(!t.equalBase(e))throw new Error("Cannot compare units with different base");return a(t.value,e.value)},"string, string":function(t,e){return t===e}});return a}},"./node_modules/mathjs/lib/type/fraction/function/fraction.js":
/*!********************************************************************!*\
  !*** ./node_modules/mathjs/lib/type/fraction/function/fraction.js ***!
  \********************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../../utils/collection/deepMap */"./node_modules/mathjs/lib/utils/collection/deepMap.js");e.name="fraction",e.factory=function(t,e,n,i){var o=i("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new t.Fraction(e)},string:function(e){return new t.Fraction(e)},"number, number":function(e,n){return new t.Fraction(e,n)},BigNumber:function(e){return new t.Fraction(e.toString())},Fraction:function(t){return t},Object:function(e){return new t.Fraction(e)},"Array | Matrix":function(t){return r(t,o)}});return o}},"./node_modules/mathjs/lib/type/matrix/function/matrix.js":
/*!****************************************************************!*\
  !*** ./node_modules/mathjs/lib/type/matrix/function/matrix.js ***!
  \****************************************************************/
/*! no static exports found */function(t,e,n){"use strict";e.name="matrix",e.factory=function(t,e,n,r){var i=r("matrix",{"":function(){return o([])},string:function(t){return o([],t)},"string, string":function(t,e){return o([],t,e)},Array:function(t){return o(t)},Matrix:function(t){return o(t,t.storage())},"Array | Matrix, string":o,"Array | Matrix, string, string":o});return i.toTex={0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},i;function o(e,n,r){return new(t.Matrix.storage(n||"default"))(e,r)}}},"./node_modules/mathjs/lib/type/matrix/utils/algorithm11.js":
/*!******************************************************************!*\
  !*** ./node_modules/mathjs/lib/type/matrix/utils/algorithm11.js ***!
  \******************************************************************/
/*! no static exports found */function(t,e,n){"use strict";e.name="algorithm11",e.factory=function(t,e,r,i){var o=r(n(/*! ../../../function/relational/equalScalar */"./node_modules/mathjs/lib/function/relational/equalScalar.js")),a=t.SparseMatrix;return function(t,e,n,r){var s=t._values,u=t._index,l=t._ptr,c=t._size,f=t._datatype;if(!s)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h,p=c[0],d=c[1],m=o,g=0,v=n;"string"==typeof f&&(h=f,m=i.find(o,[h,h]),g=i.convert(0,h),e=i.convert(e,h),v=i.find(n,[h,h]));for(var y=[],_=[],b=[],x=new a({values:y,index:_,ptr:b,size:[p,d],datatype:h}),w=0;w<d;w++){b[w]=_.length;for(var j=l[w],M=l[w+1],A=j;A<M;A++){var k=u[A],z=r?v(e,s[A]):v(s[A],e);m(z,g)||(_.push(k),y.push(z))}}return b[d]=_.length,x}}},"./node_modules/mathjs/lib/type/matrix/utils/algorithm14.js":
/*!******************************************************************!*\
  !*** ./node_modules/mathjs/lib/type/matrix/utils/algorithm14.js ***!
  \******************************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ../../../utils/object */"./node_modules/mathjs/lib/utils/object.js").clone;e.name="algorithm14",e.factory=function(t,e,n,i){var o=t.DenseMatrix,a=function(t,e,n,r,i,o,s){var u=[];if(e===n.length-1)for(var l=0;l<r;l++)u[l]=s?t(o,i[l]):t(i[l],o);else for(var c=0;c<r;c++)u[c]=a(t,e+1,n,n[e+1],i[c],o,s);return u};return function(t,e,n,s){var u,l=t._data,c=t._size,f=t._datatype,h=n;"string"==typeof f&&(u=f,e=i.convert(e,u),h=i.find(n,[u,u]));var p=c.length>0?a(h,0,c,c[0],l,e,s):[];return new o({data:p,size:r(c),datatype:u})}}},"./node_modules/mathjs/lib/type/number.js":
/*!************************************************!*\
  !*** ./node_modules/mathjs/lib/type/number.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./../utils/collection/deepMap */"./node_modules/mathjs/lib/utils/collection/deepMap.js");e.name="number",e.factory=function(t,e,n,i){var o=i("number",{"":function(){return 0},number:function(t){return t},string:function(t){var e=Number(t);if(isNaN(e))throw new SyntaxError('String "'+t+'" is no valid number');return e},BigNumber:function(t){return t.toNumber()},Fraction:function(t){return t.valueOf()},Unit:function(t){throw new Error("Second argument with valueless unit expected")},"Unit, string | Unit":function(t,e){return t.toNumber(e)},"Array | Matrix":function(t){return r(t,o)}});return o.toTex={0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},o}},"./node_modules/mathjs/lib/utils/array.js":
/*!************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/array.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./number */"./node_modules/mathjs/lib/utils/number.js"),i=n(/*! ./string */"./node_modules/mathjs/lib/utils/string.js"),o=(n(/*! ./object */"./node_modules/mathjs/lib/utils/object.js"),n(/*! ./types */"./node_modules/mathjs/lib/utils/types.js"),n(/*! ../error/DimensionError */"./node_modules/mathjs/lib/error/DimensionError.js")),a=n(/*! ../error/IndexError */"./node_modules/mathjs/lib/error/IndexError.js");e.size=function(t){for(var e=[];Array.isArray(t);)e.push(t.length),t=t[0];return e},e.validate=function(t,e){if(0==e.length){if(Array.isArray(t))throw new o(t.length,0)}else!function t(e,n,r){var i,a=e.length;if(a!=n[r])throw new o(a,n[r]);if(r<n.length-1){var s=r+1;for(i=0;i<a;i++){var u=e[i];if(!Array.isArray(u))throw new o(n.length-1,n.length,"<");t(e[i],n,s)}}else for(i=0;i<a;i++)if(Array.isArray(e[i]))throw new o(n.length+1,n.length,">")}(t,e,0)},e.validateIndex=function(t,e){if(!r.isNumber(t)||!r.isInteger(t))throw new TypeError("Index must be an integer (value: "+t+")");if(t<0||"number"==typeof e&&t>=e)throw new a(t,e)},e.UNINITIALIZED={},e.resize=function(t,n,o){if(!Array.isArray(t)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new Error("Resizing to scalar is not supported");return n.forEach(function(t){if(!r.isNumber(t)||!r.isInteger(t)||t<0)throw new TypeError("Invalid size, must contain positive integers (size: "+i.format(n)+")")}),function t(n,r,i,o){var a;var s;var u=n.length;var l=r[i];var c=Math.min(u,l);n.length=l;if(i<r.length-1){var f=i+1;for(a=0;a<c;a++)s=n[a],Array.isArray(s)||(s=[s],n[a]=s),t(s,r,f,o);for(a=c;a<l;a++)s=[],n[a]=s,t(s,r,f,o)}else{for(a=0;a<c;a++)for(;Array.isArray(n[a]);)n[a]=n[a][0];if(o!==e.UNINITIALIZED)for(a=c;a<l;a++)n[a]=o}}(t,n,0,void 0!==o?o:0),t},e.reshape=function(t,n){var r,i=e.flatten(t),a=function(t){return t.reduce(function(t,e){return t*e})};if(!Array.isArray(t)||!Array.isArray(n))throw new TypeError("Array expected");if(0===n.length)throw new o(0,a(e.size(t)),"!=");try{r=function t(e,n){var r=[];var i;if(0===n.length){if(0===e.length)throw new o(null,null,"!=");return e.shift()}for(i=0;i<n[0];i+=1)r.push(t(e,n.slice(1)));return r}(i,n)}catch(r){if(r instanceof o)throw new o(a(n),a(e.size(t)),"!=");throw r}if(i.length>0)throw new o(a(n),a(e.size(t)),"!=");return r},e.squeeze=function(t,n){for(var r=n||e.size(t);Array.isArray(t)&&1===t.length;)t=t[0],r.shift();for(var i=r.length;1===r[i-1];)i--;return i<r.length&&(t=function t(e,n,r){var i,o;if(r<n){var a=r+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],n,a)}else for(;Array.isArray(e);)e=e[0];return e}(t,i,0),r.length=i),t},e.unsqueeze=function(t,n,r,i){var o=i||e.size(t);if(r)for(var a=0;a<r;a++)t=[t],o.unshift(1);for(t=function t(e,n,r){var i,o;if(Array.isArray(e)){var a=r+1;for(i=0,o=e.length;i<o;i++)e[i]=t(e[i],n,a)}else for(var s=r;s<n;s++)e=[e];return e}(t,n,0);o.length<n;)o.push(1);return t},e.flatten=function(t){if(!Array.isArray(t))return t;var e=[];return t.forEach(function t(n){Array.isArray(n)?n.forEach(t):e.push(n)}),e},e.map=function(t,e){return Array.prototype.map.call(t,e)},e.forEach=function(t,e){Array.prototype.forEach.call(t,e)},e.filter=function(t,n){if(1!==e.size(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,n)},e.filterRegExp=function(t,n){if(1!==e.size(t).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(t,function(t){return n.test(t)})},e.join=function(t,e){return Array.prototype.join.call(t,e)},e.identify=function(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;var e=[],n=0;e[0]={value:t[0],identifier:0};for(var r=1;r<t.length;r++)t[r]===t[r-1]?n++:n=0,e.push({value:t[r],identifier:n});return e},e.generalize=function(t){if(!Array.isArray(t))throw new TypeError("Array input expected");if(0===t.length)return t;for(var e=[],n=0;n<t.length;n++)e.push(t[n].value);return e},e.isArray=Array.isArray},"./node_modules/mathjs/lib/utils/bignumber/formatter.js":
/*!**************************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/bignumber/formatter.js ***!
  \**************************************************************/
/*! no static exports found */function(t,e){e.format=function(t,n){if("function"==typeof n)return n(t);if(!t.isFinite())return t.isNaN()?"NaN":t.gt(0)?"Infinity":"-Infinity";var r="auto",i=void 0;switch(void 0!==n&&(n.notation&&(r=n.notation),"number"==typeof n?i=n:n.precision&&(i=n.precision)),r){case"fixed":return e.toFixed(t,i);case"exponential":return e.toExponential(t,i);case"auto":var o=.001,a=1e5;n&&n.exponential&&(void 0!==n.exponential.lower&&(o=n.exponential.lower),void 0!==n.exponential.upper&&(a=n.exponential.upper));t.constructor.toExpNeg,t.constructor.toExpPos;if(t.constructor.config({toExpNeg:Math.round(Math.log(o)/Math.LN10),toExpPos:Math.round(Math.log(a)/Math.LN10)}),t.isZero())return"0";var s=t.abs();return(s.gte(o)&&s.lt(a)?t.toSignificantDigits(i).toFixed():e.toExponential(t,i)).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}},e.toExponential=function(t,e){return void 0!==e?t.toExponential(e-1):t.toExponential()},e.toFixed=function(t,e){return t.toFixed(e||0)}},"./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js":
/*!****************************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js ***!
  \****************************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){return t&&t.constructor.prototype.isBigNumber||!1}},"./node_modules/mathjs/lib/utils/bignumber/nearlyEqual.js":
/*!****************************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/bignumber/nearlyEqual.js ***!
  \****************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){if(null==n)return t.eq(e);if(t.eq(e))return!0;if(t.isNaN()||e.isNaN())return!1;if(t.isFinite()&&e.isFinite()){var r=t.minus(e).abs();if(r.isZero())return!0;var i=t.constructor.max(t.abs(),e.abs());return r.lte(i.times(n))}return!1}},"./node_modules/mathjs/lib/utils/collection/deepMap.js":
/*!*************************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/collection/deepMap.js ***!
  \*************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function t(e,n,r){return e&&"function"==typeof e.map?e.map(function(e){return t(e,n,r)}):n(e)}},"./node_modules/mathjs/lib/utils/collection/isMatrix.js":
/*!**************************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/collection/isMatrix.js ***!
  \**************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){return t&&t.constructor.prototype.isMatrix||!1}},"./node_modules/mathjs/lib/utils/emitter.js":
/*!**************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/emitter.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! tiny-emitter */"./node_modules/tiny-emitter/index.js");e.mixin=function(t){var e=new r;return t.on=e.on.bind(e),t.off=e.off.bind(e),t.once=e.once.bind(e),t.emit=e.emit.bind(e),t}},"./node_modules/mathjs/lib/utils/latex.js":
/*!************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/latex.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";e.symbols={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},e.operators={transpose:"^\\top",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},e.defaultTemplate="\\mathrm{${name}}\\left(${args}\\right)";var r={deg:"^\\circ"};e.toSymbol=function(t,n){if(n=void 0!==n&&n)return r.hasOwnProperty(t)?r[t]:"\\mathrm{"+t+"}";if(e.symbols.hasOwnProperty(t))return e.symbols[t];if(-1!==t.indexOf("_")){var i=t.indexOf("_");return e.toSymbol(t.substring(0,i))+"_{"+e.toSymbol(t.substring(i+1))+"}"}return t}},"./node_modules/mathjs/lib/utils/number.js":
/*!*************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/number.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t){for(var e=[],n=0;n<t;n++)e.push(0);return e}e.isNumber=function(t){return"number"==typeof t},e.isInteger=function(t){return!!isFinite(t)&&t==Math.round(t)},e.sign=Math.sign||function(t){return t>0?1:t<0?-1:0},e.format=function(t,n){if("function"==typeof n)return n(t);if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(isNaN(t))return"NaN";var r="auto",i=void 0;switch(n&&(n.notation&&(r=n.notation),e.isNumber(n)?i=n:n.precision&&(i=n.precision)),r){case"fixed":return e.toFixed(t,i);case"exponential":return e.toExponential(t,i);case"engineering":return e.toEngineering(t,i);case"auto":return e.toPrecision(t,i,n&&n.exponential).replace(/((\.\d*?)(0+))($|e)/,function(){var t=arguments[2],e=arguments[4];return"."!==t?t+e:e});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", or "fixed".')}},e.splitNumber=function(t){var e=String(t).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!e)throw new SyntaxError("Invalid number "+t);var n=e[1],r=e[2],i=parseFloat(e[4]||"0"),o=r.indexOf(".");i+=-1!==o?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(t){return i-=t.length,""}).replace(/0*$/,"").split("").map(function(t){return parseInt(t)});return 0===a.length&&(a.push(0),i++),{sign:n,coefficients:a,exponent:i}},e.toEngineering=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var i=e.roundDigits(e.splitNumber(t),n),o=i.exponent,a=i.coefficients,s=o%3==0?o:o<0?o-3-o%3:o-o%3,u=o>=0?o:Math.abs(s);a.length-1<u&&(a=a.concat(r(u-(a.length-1))));for(var l=Math.abs(o-s),c=1;--l>=0;)c++;var f=a.slice(c).join(""),h=f.match(/[1-9]/)?"."+f:"",p=a.slice(0,c).join("")+h+"e"+(o>=0?"+":"")+s.toString();return i.sign+p},e.toFixed=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var i=e.splitNumber(t),o=e.roundDigits(i,i.exponent+1+(n||0)),a=o.coefficients,s=o.exponent+1,u=s+(n||0);return a.length<u&&(a=a.concat(r(u-a.length))),s<0&&(a=r(1-s).concat(a),s=1),n&&a.splice(s,0,0===s?"0.":"."),o.sign+a.join("")},e.toExponential=function(t,n){if(isNaN(t)||!isFinite(t))return String(t);var i=e.splitNumber(t),o=n?e.roundDigits(i,n):i,a=o.coefficients,s=o.exponent;a.length<n&&(a=a.concat(r(n-a.length)));var u=a.shift();return o.sign+u+(a.length>0?"."+a.join(""):"")+"e"+(s>=0?"+":"")+s},e.toPrecision=function(t,n,i){if(isNaN(t)||!isFinite(t))return String(t);var o=i&&void 0!==i.lower?i.lower:.001,a=i&&void 0!==i.upper?i.upper:1e5,s=e.splitNumber(t),u=Math.abs(Math.pow(10,s.exponent));if(u<o||u>=a)return e.toExponential(t,n);var l=n?e.roundDigits(s,n):s,c=l.coefficients,f=l.exponent;c.length<n&&(c=c.concat(r(n-c.length))),c=c.concat(r(f-c.length+1+(c.length<n?n-c.length:0))),c=r(-f).concat(c);var h=f>0?f:0;return h<c.length-1&&c.splice(h+1,0,"."),l.sign+c.join("")},e.roundDigits=function(t,e){for(var n={sign:t.sign,coefficients:t.coefficients,exponent:t.exponent},r=n.coefficients;e<=0;)r.unshift(0),n.exponent++,e++;if(r.length>e&&r.splice(e,r.length-e)[0]>=5){var i=e-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n},e.digits=function(t){return t.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length},e.DBL_EPSILON=Number.EPSILON||2.220446049250313e-16,e.nearlyEqual=function(t,n,r){if(null==r)return t==n;if(t==n)return!0;if(isNaN(t)||isNaN(n))return!1;if(isFinite(t)&&isFinite(n)){var i=Math.abs(t-n);return i<e.DBL_EPSILON||i<=Math.max(Math.abs(t),Math.abs(n))*r}return!1}},"./node_modules/mathjs/lib/utils/object.js":
/*!*************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/object.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./bignumber/isBigNumber */"./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js");e.clone=function t(n){var i=typeof n;if("number"===i||"string"===i||"boolean"===i||null===n||void 0===n)return n;if("function"==typeof n.clone)return n.clone();if(Array.isArray(n))return n.map(function(e){return t(e)});if(n instanceof Number)return new Number(n.valueOf());if(n instanceof String)return new String(n.valueOf());if(n instanceof Boolean)return new Boolean(n.valueOf());if(n instanceof Date)return new Date(n.valueOf());if(r(n))return n;if(n instanceof RegExp)throw new TypeError("Cannot clone "+n);return e.map(n,t)},e.map=function(t,n){var r={};for(var i in t)e.hasOwnProperty(t,i)&&(r[i]=n(t[i]));return r},e.extend=function(t,n){for(var r in n)e.hasOwnProperty(n,r)&&(t[r]=n[r]);return t},e.deepExtend=function t(n,r){if(Array.isArray(r))throw new TypeError("Arrays are not supported by deepExtend");for(var i in r)if(e.hasOwnProperty(r,i))if(r[i]&&r[i].constructor===Object)void 0===n[i]&&(n[i]={}),n[i].constructor===Object?t(n[i],r[i]):n[i]=r[i];else{if(Array.isArray(r[i]))throw new TypeError("Arrays are not supported by deepExtend");n[i]=r[i]}return n},e.deepEqual=function(t,n){var r,i,o;if(Array.isArray(t)){if(!Array.isArray(n))return!1;if(t.length!=n.length)return!1;for(i=0,o=t.length;i<o;i++)if(!e.deepEqual(t[i],n[i]))return!1;return!0}if(t instanceof Object){if(Array.isArray(n)||!(n instanceof Object))return!1;for(r in t)if(!e.deepEqual(t[r],n[r]))return!1;for(r in n)if(!e.deepEqual(t[r],n[r]))return!1;return!0}return typeof t==typeof n&&t==n},e.canDefineProperty=function(){try{if(Object.defineProperty)return Object.defineProperty({},"x",{get:function(){}}),!0}catch(t){}return!1},e.lazy=function(t,n,r){if(e.canDefineProperty()){var i,o=!0;Object.defineProperty(t,n,{get:function(){return o&&(i=r(),o=!1),i},set:function(t){i=t,o=!1},configurable:!0,enumerable:!0})}else t[n]=r()},e.traverse=function(t,e){var n=t;if(e)for(var r=e.split("."),i=0;i<r.length;i++){var o=r[i];o in n||(n[o]={}),n=n[o]}return n},e.hasOwnProperty=function(t,e){return t&&Object.hasOwnProperty.call(t,e)},e.isFactory=function(t){return t&&"function"==typeof t.factory}},"./node_modules/mathjs/lib/utils/string.js":
/*!*************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/string.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! ./number */"./node_modules/mathjs/lib/utils/number.js").format,i=n(/*! ./bignumber/formatter */"./node_modules/mathjs/lib/utils/bignumber/formatter.js").format,o=n(/*! ./bignumber/isBigNumber */"./node_modules/mathjs/lib/utils/bignumber/isBigNumber.js");e.isString=function(t){return"string"==typeof t},e.endsWith=function(t,e){var n=t.length-e.length,r=t.length;return t.substring(n,r)===e},e.format=function(t,n){if("number"==typeof t)return r(t,n);if(o(t))return i(t,n);if(function(t){return t&&"object"==typeof t&&"number"==typeof t.s&&"number"==typeof t.n&&"number"==typeof t.d||!1}(t))return n&&"decimal"===n.fraction?t.toString():t.s*t.n+"/"+t.d;if(Array.isArray(t))return function t(n,r){if(Array.isArray(n)){for(var i="[",o=n.length,a=0;a<o;a++)0!=a&&(i+=", "),i+=t(n[a],r);return i+="]"}return e.format(n,r)}(t,n);if(e.isString(t))return'"'+t+'"';if("function"==typeof t)return t.syntax?String(t.syntax):"function";if(t&&"object"==typeof t){if("function"==typeof t.format)return t.format(n);if(t&&t.toString()!=={}.toString())return t.toString();var a=[];for(var s in t)t.hasOwnProperty(s)&&a.push('"'+s+'": '+e.format(t[s],n));return"{"+a.join(", ")+"}"}return String(t)},e.stringify=function(t){for(var e=String(t),n="",r=0;r<e.length;){var i=e.charAt(r);"\\"===i?(n+=i,r++,""!==(i=e.charAt(r))&&-1!=='"\\/bfnrtu'.indexOf(i)||(n+="\\"),n+=i):n+='"'===i?'\\"':i,r++}return'"'+n+'"'},e.escape=function(t){var e=String(t);return e=e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}},"./node_modules/mathjs/lib/utils/types.js":
/*!************************************************!*\
  !*** ./node_modules/mathjs/lib/utils/types.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";e.type=function(t){var e=typeof t;return"object"===e?null===t?"null":Array.isArray(t)?"Array":t instanceof Date?"Date":t instanceof RegExp?"RegExp":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":"Object":"function"===e?"Function":e}},"./node_modules/mouse-change/mouse-listen.js":
/*!***************************************************!*\
  !*** ./node_modules/mouse-change/mouse-listen.js ***!
  \***************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){e||(e=t,t=window);var n=0,i=0,o=0,a={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function u(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==a.alt,a.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==a.shift,a.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==a.control,a.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==a.meta,a.meta=!!t.metaKey),e}function l(t,s){var l=r.x(s),c=r.y(s);"buttons"in s&&(t=0|s.buttons),(t!==n||l!==i||c!==o||u(s))&&(n=0|t,i=l||0,o=c||0,e&&e(n,i,o,a))}function c(t){l(0,t)}function f(){(n||i||o||a.shift||a.alt||a.meta||a.control)&&(i=o=0,n=0,a.shift=a.alt=a.control=a.meta=!1,e&&e(0,0,0,a))}function h(t){u(t)&&e&&e(n,i,o,a)}function p(t){0===r.buttons(t)?l(0,t):l(n,t)}function d(t){l(n|r.buttons(t),t)}function m(t){l(n&~r.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",c),t.addEventListener("mouseenter",c),t.addEventListener("mouseout",c),t.addEventListener("mouseover",c),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",c),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseout",c),t.removeEventListener("mouseover",c),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return n},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return o},enumerable:!0},mods:{get:function(){return a},enumerable:!0}}),v};var r=n(/*! mouse-event */"./node_modules/mouse-event/mouse.js")},"./node_modules/mouse-event-offset/index.js":
/*!**************************************************!*\
  !*** ./node_modules/mouse-event-offset/index.js ***!
  \**************************************************/
/*! no static exports found */function(t,e){var n={left:0,top:0};t.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,o=t.clientY||0,a=function(t){return t===window||t===document||t===document.body?n:t.getBoundingClientRect()}(e);return r[0]=i-a.left,r[1]=o-a.top,r}},"./node_modules/mouse-event/mouse.js":
/*!*******************************************!*\
  !*** ./node_modules/mouse-event/mouse.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<<e-1}else if("button"in t){var e;if(1===(e=t.button))return 4;if(2===e)return 2;if(e>=0)return 1<<e}}return 0},e.element=r,e.x=function(t){if("object"==typeof t){if("offsetX"in t)return t.offsetX;var e=r(t).getBoundingClientRect();return t.clientX-e.left}return 0},e.y=function(t){if("object"==typeof t){if("offsetY"in t)return t.offsetY;var e=r(t).getBoundingClientRect();return t.clientY-e.top}return 0}},"./node_modules/ndarray-extract-contour/contour.js":
/*!*********************************************************!*\
  !*** ./node_modules/ndarray-extract-contour/contour.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! typedarray-pool */"./node_modules/typedarray-pool/pool.js");function i(t){return"a"+t}function o(t){return"d"+t}function a(t,e){return"c"+t+"_"+e}function s(t){return"s"+t}function u(t,e){return"t"+t+"_"+e}function l(t){return"o"+t}function c(t){return"x"+t}function f(t){return"p"+t}function h(t,e){return"d"+t+"_"+e}function p(t){return"i"+t}function d(t,e){return"u"+t+"_"+e}function m(t){return"b"+t}function g(t){return"y"+t}function v(t){return"e"+t}function y(t){return"v"+t}t.exports=function(t){function e(t){throw new Error("ndarray-extract-contour: "+t)}"object"!=typeof t&&e("Must specify arguments");var n=t.order;Array.isArray(n)||e("Must specify order");var k=t.arrayArguments||1;k<1&&e("Must have at least one array argument");var z=t.scalarArguments||0;z<0&&e("Scalar arg count must be > 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var E=t.getters||[],S=new Array(k),N=0;N<k;++N)E.indexOf(N)>=0?S[N]=!0:S[N]=!1;return function(t,e,n,k,z,E){var S=E.length,N=z.length;if(N<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var T="extractContour"+z.join("_"),C=[],O=[],P=[],I=0;I<S;++I)P.push(i(I));for(var I=0;I<k;++I)P.push(c(I));for(var I=0;I<N;++I)O.push(s(I)+"="+i(0)+".shape["+I+"]|0");for(var I=0;I<S;++I){O.push(o(I)+"="+i(I)+".data",l(I)+"="+i(I)+".offset|0");for(var B=0;B<N;++B)O.push(u(I,B)+"="+i(I)+".stride["+B+"]|0")}for(var I=0;I<S;++I){O.push(f(I)+"="+l(I)),O.push(a(I,0));for(var B=1;B<1<<N;++B){for(var D=[],F=0;F<N;++F)B&1<<F&&D.push("-"+u(I,F));O.push(h(I,B)+"=("+D.join("")+")|0"),O.push(a(I,B)+"=0")}}for(var I=0;I<S;++I)for(var B=0;B<N;++B){var R=[u(I,z[B])];B>0&&R.push(u(I,z[B-1])+"*"+s(z[B-1])),O.push(d(I,z[B])+"=("+R.join("-")+")|0")}for(var I=0;I<N;++I)O.push(p(I)+"=0");O.push(x+"=0");for(var L=["2"],I=N-2;I>=0;--I)L.push(s(z[I]));O.push(w+"=("+L.join("*")+")|0",b+"=mallocUint32("+w+")",_+"=mallocUint32("+w+")",j+"=0"),O.push(m(0)+"=0");for(var B=1;B<1<<N;++B){for(var q=[],U=[],F=0;F<N;++F)B&1<<F&&(0===U.length?q.push("1"):q.unshift(U.join("*"))),U.push(s(z[F]));var H="";q[0].indexOf(s(z[N-2]))<0&&(H="-");var Y=A(N,B,z);O.push(v(Y)+"=(-"+q.join("-")+")|0",g(Y)+"=("+H+q.join("-")+")|0",m(Y)+"=0")}function V(t,e){C.push("for(",p(z[t]),"=",e,";",p(z[t]),"<",s(z[t]),";","++",p(z[t]),"){")}function Z(t){for(var e=0;e<S;++e)C.push(f(e),"+=",d(e,z[t]),";");C.push("}")}function W(){for(var t=1;t<1<<N;++t)C.push(M,"=",v(t),";",v(t),"=",g(t),";",g(t),"=",M,";")}O.push(y(0)+"=0",M+"=0"),function t(e,n){if(e<0)return void function(t){for(var e=0;e<S;++e)E[e]?C.push(a(e,0),"=",o(e),".get(",f(e),");"):C.push(a(e,0),"=",o(e),"[",f(e),"];");for(var n=[],e=0;e<S;++e)n.push(a(e,0));for(var e=0;e<k;++e)n.push(c(e));C.push(m(0),"=",b,"[",j,"]=phase(",n.join(),");");for(var r=1;r<1<<N;++r)C.push(m(r),"=",b,"[",j,"+",v(r),"];");for(var i=[],r=1;r<1<<N;++r)i.push("("+m(0)+"!=="+m(r)+")");C.push("if(",i.join("||"),"){");for(var s=[],e=0;e<N;++e)s.push(p(e));for(var e=0;e<S;++e){s.push(a(e,0));for(var r=1;r<1<<N;++r)E[e]?C.push(a(e,r),"=",o(e),".get(",f(e),"+",h(e,r),");"):C.push(a(e,r),"=",o(e),"[",f(e),"+",h(e,r),"];"),s.push(a(e,r))}for(var e=0;e<1<<N;++e)s.push(m(e));for(var e=0;e<k;++e)s.push(c(e));C.push("vertex(",s.join(),");",y(0),"=",_,"[",j,"]=",x,"++;");for(var u=(1<<N)-1,l=m(u),r=0;r<N;++r)if(0==(t&~(1<<r))){for(var d=u^1<<r,g=m(d),w=[],M=d;M>0;M=M-1&d)w.push(_+"["+j+"+"+v(M)+"]");w.push(y(0));for(var M=0;M<S;++M)1&r?w.push(a(M,u),a(M,d)):w.push(a(M,d),a(M,u));1&r?w.push(l,g):w.push(g,l);for(var M=0;M<k;++M)w.push(c(M));C.push("if(",l,"!==",g,"){","face(",w.join(),")}")}C.push("}",j,"+=1;")}(n);!function(t){for(var e=t-1;e>=0;--e)V(e,0);for(var n=[],e=0;e<S;++e)E[e]?n.push(o(e)+".get("+f(e)+")"):n.push(o(e)+"["+f(e)+"]");for(var e=0;e<k;++e)n.push(c(e));C.push(b,"[",j,"++]=phase(",n.join(),");");for(var e=0;e<t;++e)Z(e);for(var r=0;r<S;++r)C.push(f(r),"+=",d(r,z[t]),";")}(e);C.push("if(",s(z[e]),">0){",p(z[e]),"=1;");t(e-1,n|1<<z[e]);for(var r=0;r<S;++r)C.push(f(r),"+=",d(r,z[e]),";");e===N-1&&(C.push(j,"=0;"),W());V(e,2);t(e-1,n);e===N-1&&(C.push("if(",p(z[N-1]),"&1){",j,"=0;}"),W());Z(e);C.push("}")}(N-1,0),C.push("freeUint32(",_,");freeUint32(",b,");");var X=["'use strict';","function ",T,"(",P.join(),"){","var ",O.join(),";",C.join(""),"}","return ",T].join("");return new Function("vertex","face","phase","mallocUint32","freeUint32",X)(t,e,n,r.mallocUint32,r.freeUint32)}(t.vertex,t.cell,t.phase,z,n,S)};var _="V",b="P",x="N",w="Q",j="X",M="T";function A(t,e,n){for(var r=0,i=0;i<t;++i)e&1<<i&&(r|=1<<n[i]);return r}},"./node_modules/ndarray/ndarray.js":
/*!*****************************************!*\
  !*** ./node_modules/ndarray/ndarray.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! iota-array */"./node_modules/iota-array/iota.js"),i=n(/*! is-buffer */"./node_modules/is-buffer/index.js"),o="undefined"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,n=new Array(e.length);for(t=0;t<n.length;++t)n[t]=[Math.abs(e[t]),t];n.sort(a);var r=new Array(n.length);for(t=0;t<r.length;++t)r[t]=n[t][1];return r}function u(t,e){var n=["View",e,"d",t].join("");e<0&&(n="View_Nil"+t);var i="generic"===t;if(-1===e){var o="function "+n+"(a){this.data=a;};var proto="+n+".prototype;proto.dtype='"+t+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+n+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+n+"(a){return new "+n+"(a);}";return new Function(o)()}if(0===e){o="function "+n+"(a,d) {this.data = a;this.offset = d};var proto="+n+".prototype;proto.dtype='"+t+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+n+"_copy() {return new "+n+"(this.data,this.offset)};proto.pick=function "+n+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+n+"_get(){return "+(i?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+n+"_set(v){return "+(i?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+n+"(a,b,c,d){return new "+n+"(a,d)}";return new Function("TrivialArray",o)(l[t][0])}o=["'use strict'"];var a=r(e),u=a.map(function(t){return"i"+t}),c="this.offset+"+a.map(function(t){return"this.stride["+t+"]*i"+t}).join("+"),f=a.map(function(t){return"b"+t}).join(","),h=a.map(function(t){return"c"+t}).join(",");o.push("function "+n+"(a,"+f+","+h+",d){this.data=a","this.shape=["+f+"]","this.stride=["+h+"]","this.offset=d|0}","var proto="+n+".prototype","proto.dtype='"+t+"'","proto.dimension="+e),o.push("Object.defineProperty(proto,'size',{get:function "+n+"_size(){return "+a.map(function(t){return"this.shape["+t+"]"}).join("*"),"}})"),1===e?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),e<4?(o.push("function "+n+"_order(){"),2===e?o.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&o.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push("proto.set=function "+n+"_set("+u.join(",")+",v){"),i?o.push("return this.data.set("+c+",v)}"):o.push("return this.data["+c+"]=v}"),o.push("proto.get=function "+n+"_get("+u.join(",")+"){"),i?o.push("return this.data.get("+c+")}"):o.push("return this.data["+c+"]}"),o.push("proto.index=function "+n+"_index(",u.join(),"){return "+c+"}"),o.push("proto.hi=function "+n+"_hi("+u.join(",")+"){return new "+n+"(this.data,"+a.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+a.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=a.map(function(t){return"a"+t+"=this.shape["+t+"]"}),d=a.map(function(t){return"c"+t+"=this.stride["+t+"]"});o.push("proto.lo=function "+n+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var m=0;m<e;++m)o.push("if(typeof i"+m+"==='number'&&i"+m+">=0){d=i"+m+"|0;b+=c"+m+"*d;a"+m+"-=d}");o.push("return new "+n+"(this.data,"+a.map(function(t){return"a"+t}).join(",")+","+a.map(function(t){return"c"+t}).join(",")+",b)}"),o.push("proto.step=function "+n+"_step("+u.join(",")+"){var "+a.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+a.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(m=0;m<e;++m)o.push("if(typeof i"+m+"==='number'){d=i"+m+"|0;if(d<0){c+=b"+m+"*(a"+m+"-1);a"+m+"=ceil(-a"+m+"/d)}else{a"+m+"=ceil(a"+m+"/d)}b"+m+"*=d}");o.push("return new "+n+"(this.data,"+a.map(function(t){return"a"+t}).join(",")+","+a.map(function(t){return"b"+t}).join(",")+",c)}");var g=new Array(e),v=new Array(e);for(m=0;m<e;++m)g[m]="a[i"+m+"]",v[m]="b[i"+m+"]";o.push("proto.transpose=function "+n+"_transpose("+u+"){"+u.map(function(t,e){return t+"=("+t+"===undefined?"+e+":"+t+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+n+"(this.data,"+g.join(",")+","+v.join(",")+",this.offset)}"),o.push("proto.pick=function "+n+"_pick("+u+"){var a=[],b=[],c=this.offset");for(m=0;m<e;++m)o.push("if(typeof i"+m+"==='number'&&i"+m+">=0){c=(c+this.stride["+m+"]*i"+m+")|0}else{a.push(this.shape["+m+"]);b.push(this.stride["+m+"])}");return o.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),o.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+a.map(function(t){return"shape["+t+"]"}).join(",")+","+a.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",o.join("\n"))(l[t],s)}var l={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=function(t,e,n,r){if(void 0===t)return(0,l.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var a=e.length;if(void 0===n){n=new Array(a);for(var s=a-1,c=1;s>=0;--s)n[s]=c,c*=e[s]}if(void 0===r)for(r=0,s=0;s<a;++s)n[s]<0&&(r-=(e[s]-1)*n[s]);for(var f=function(t){if(i(t))return"buffer";if(o)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}(t),h=l[f];h.length<=a+1;)h.push(u(f,h.length-1));return(0,h[a+1])(t,e,n,r)}},"./node_modules/nextafter/nextafter.js":
/*!*********************************************!*\
  !*** ./node_modules/nextafter/nextafter.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! double-bits */"./node_modules/double-bits/double.js"),i=Math.pow(2,-1074),o=-1>>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var n=r.hi(t),a=r.lo(t);e>t==t>0?a===o?(n+=1,a=0):a+=1:0===a?(a=o,n-=1):a-=1;return r.pack(a,n)}},"./node_modules/permutation-parity/permutation-sign.js":
/*!*************************************************************!*\
  !*** ./node_modules/permutation-parity/permutation-sign.js ***!
  \*************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){var e=t.length;if(e<r){for(var n=1,o=0;o<e;++o)for(var a=0;a<o;++a)if(t[o]<t[a])n=-n;else if(t[o]===t[a])return 0;return n}for(var s=i.mallocUint8(e),o=0;o<e;++o)s[o]=0;for(var n=1,o=0;o<e;++o)if(!s[o]){var u=1;s[o]=1;for(var a=t[o];a!==o;a=t[a]){if(s[a])return i.freeUint8(s),0;u+=1,s[a]=1}1&u||(n=-n)}return i.freeUint8(s),n};var r=32,i=n(/*! typedarray-pool */"./node_modules/typedarray-pool/pool.js")},"./node_modules/permutation-rank/index.js":
/*!************************************************!*\
  !*** ./node_modules/permutation-rank/index.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! typedarray-pool */"./node_modules/typedarray-pool/pool.js"),i=n(/*! invert-permutation */"./node_modules/invert-permutation/index.js");e.rank=function(t){var e=t.length;switch(e){case 0:case 1:return 0;case 2:return t[1]}var n,o,a,s=r.mallocUint32(e),u=r.mallocUint32(e),l=0;for(i(t,u),a=0;a<e;++a)s[a]=t[a];for(a=e-1;a>0;--a)o=u[a],n=s[a],s[a]=s[o],s[o]=n,u[a]=u[n],u[n]=o,l=(l+n)*a;return r.freeUint32(u),r.freeUint32(s),l},e.unrank=function(t,e,n){switch(t){case 0:return n||[];case 1:return n?(n[0]=0,n):[0];case 2:return n?(e?(n[0]=0,n[1]=1):(n[0]=1,n[1]=0),n):e?[0,1]:[1,0]}var r,i,o,a=1;for((n=n||new Array(t))[0]=0,o=1;o<t;++o)n[o]=o,a=a*o|0;for(o=t-1;o>0;--o)e=e-(r=e/a|0)*a|0,a=a/o|0,i=0|n[o],n[o]=0|n[r],n[r]=0|i;return n}},"./node_modules/planar-dual/loops.js":
/*!*******************************************!*\
  !*** ./node_modules/planar-dual/loops.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){for(var n=0|e.length,i=t.length,o=[new Array(n),new Array(n)],a=0;a<n;++a)o[0][a]=[],o[1][a]=[];for(var a=0;a<i;++a){var s=t[a];o[0][s[0]].push(s),o[1][s[1]].push(s)}for(var u=[],a=0;a<n;++a)o[0][a].length+o[1][a].length===0&&u.push([a]);function l(t,e){var n=o[e][t[e]];n.splice(n.indexOf(t),1)}function c(t,n,i){for(var a,s,u,c=0;c<2;++c)if(o[c][n].length>0){a=o[c][n][0],u=c;break}s=a[1^u];for(var f=0;f<2;++f)for(var h=o[f][n],p=0;p<h.length;++p){var d=h[p],m=d[1^f],g=r(e[t],e[n],e[s],e[m]);g>0&&(a=d,s=m,u=f)}return i?s:(a&&l(a,u),s)}function f(t,n){var i=o[n][t][0],a=[t];l(i,n);for(var s=i[1^n];;){for(;s!==t;)a.push(s),s=c(a[a.length-2],s,!1);if(o[0][t].length+o[1][t].length===0)break;var u=a[a.length-1],f=t,h=a[1],p=c(u,f,!0);if(r(e[u],e[f],e[h],e[p])<0)break;a.push(t),s=c(u,f)}return a}function h(t,e){return e[1]===e[e.length-1]}for(var a=0;a<n;++a)for(var p=0;p<2;++p){for(var d=[];o[p][a].length>0;){o[0][a].length;var m=f(a,p);h(d,m)?d.push.apply(d,m):(d.length>0&&u.push(d),d=m)}d.length>0&&u.push(d)}return u};var r=n(/*! compare-angle */"./node_modules/compare-angle/cmpangle.js")},"./node_modules/planar-graph-to-polyline/lib/trim-leaves.js":
/*!******************************************************************!*\
  !*** ./node_modules/planar-graph-to-polyline/lib/trim-leaves.js ***!
  \******************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){for(var n=r(t,e.length),i=new Array(e.length),o=new Array(e.length),a=[],s=0;s<e.length;++s){var u=n[s].length;o[s]=u,i[s]=!0,u<=1&&a.push(s)}for(;a.length>0;){var l=a.pop();i[l]=!1;for(var c=n[l],s=0;s<c.length;++s){var f=c[s];0==--o[f]&&a.push(f)}}for(var h=new Array(e.length),p=[],s=0;s<e.length;++s)if(i[s]){var l=p.length;h[s]=l,p.push(e[s])}else h[s]=-1;for(var d=[],s=0;s<t.length;++s){var m=t[s];i[m[0]]&&i[m[1]]&&d.push([h[m[0]],h[m[1]]])}return[d,p]};var r=n(/*! edges-to-adjacency-list */"./node_modules/edges-to-adjacency-list/e2a.js")},"./node_modules/planar-graph-to-polyline/pg2pl.js":
/*!********************************************************!*\
  !*** ./node_modules/planar-graph-to-polyline/pg2pl.js ***!
  \********************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n=l(t,e);t=n[0];for(var f=(e=n[1]).length,h=(t.length,r(t,e.length)),p=0;p<f;++p)if(h[p].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var d=i(t,e);for(var m=(d=d.filter(function(t){for(var n=t.length,r=[0],i=0;i<n;++i){var o=e[t[i]],u=e[t[(i+1)%n]],l=a(-o[0],o[1]),c=a(-o[0],u[1]),f=a(u[0],o[1]),h=a(u[0],u[1]);r=s(r,s(s(l,c),s(f,h)))}return r[r.length-1]>0})).length,g=new Array(m),v=new Array(m),p=0;p<m;++p){g[p]=p;var y=new Array(m),_=d[p].map(function(t){return e[t]}),b=o([_]),x=0;t:for(var w=0;w<m;++w)if(y[w]=0,p!==w){for(var j=d[w],M=j.length,A=0;A<M;++A){var k=b(e[j[A]]);if(0!==k){k<0&&(y[w]=1,x+=1);continue t}}y[w]=1,x+=1}v[p]=[x,p,y]}v.sort(function(t,e){return e[0]-t[0]});for(var p=0;p<m;++p)for(var y=v[p],z=y[1],E=y[2],w=0;w<m;++w)E[w]&&(g[w]=z);for(var S=function(t){for(var e=new Array(t),n=0;n<t;++n)e[n]=[];return e}(m),p=0;p<m;++p)S[p].push(g[p]),S[g[p]].push(p);for(var N={},T=c(f,!1),p=0;p<m;++p)for(var j=d[p],M=j.length,w=0;w<M;++w){var C=j[w],O=j[(w+1)%M],P=Math.min(C,O)+":"+Math.max(C,O);if(P in N){var I=N[P];S[I].push(p),S[p].push(I),T[C]=T[O]=!0}else N[P]=p}function B(t){for(var e=t.length,n=0;n<e;++n)if(!T[t[n]])return!1;return!0}for(var D=[],F=c(m,-1),p=0;p<m;++p)g[p]!==p||B(d[p])?F[p]=-1:(D.push(p),F[p]=0);var n=[];for(;D.length>0;){var R=D.pop(),L=S[R];u(L,function(t,e){return t-e});var q,U=L.length,H=F[R];if(0===H){var j=d[R];q=[j]}for(var p=0;p<U;++p){var Y=L[p];if(!(F[Y]>=0)&&(F[Y]=1^H,D.push(Y),0===H)){var j=d[Y];B(j)||(j.reverse(),q.push(j))}}0===H&&n.push(q)}return n};var r=n(/*! edges-to-adjacency-list */"./node_modules/edges-to-adjacency-list/e2a.js"),i=n(/*! planar-dual */"./node_modules/planar-dual/loops.js"),o=n(/*! point-in-big-polygon */"./node_modules/point-in-big-polygon/pnp-big.js"),a=n(/*! two-product */"./node_modules/two-product/two-product.js"),s=n(/*! robust-sum */"./node_modules/robust-sum/robust-sum.js"),u=n(/*! uniq */"./node_modules/uniq/uniq.js"),l=n(/*! ./lib/trim-leaves */"./node_modules/planar-graph-to-polyline/lib/trim-leaves.js");function c(t,e){for(var n=new Array(t),r=0;r<t;++r)n[r]=e;return n}},"./node_modules/point-in-big-polygon/node_modules/binary-search-bounds/search-bounds.js":
/*!**********************************************************************************************!*\
  !*** ./node_modules/point-in-big-polygon/node_modules/binary-search-bounds/search-bounds.js ***!
  \**********************************************************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=["function ",t,"(a,l,h,",r.join(","),"){",o?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return o?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),n?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),o?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],!1,i),r("B","x"+t+"y",e,["y"],!0,i),r("P","c(x,y)"+t+"0",e,["y","c"],!1,i),r("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",n,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/point-in-big-polygon/pnp-big.js":
/*!******************************************************!*\
  !*** ./node_modules/point-in-big-polygon/pnp-big.js ***!
  \******************************************************/
/*! no static exports found */function(t,e,n){t.exports=function(t){for(var e=t.length,n=[],o=[],s=0;s<e;++s)for(var c=t[s],f=c.length,h=f-1,p=0;p<f;h=p++){var d=c[h],m=c[p];d[0]===m[0]?o.push([d,m]):n.push([d,m])}if(0===n.length)return 0===o.length?l:function(t){return function(e){return t(e[0],e[1])?0:1}}(u(o));var g=i(n),v=function(t,e){return function(n){var i=a.le(e,n[0]);if(i<0)return 1;var o=t[i];if(!o){if(!(i>0&&e[i]===n[0]))return 1;o=t[i-1]}for(var s=1;o;){var u=o.key,l=r(n,u[0],u[1]);if(u[0][0]<u[1][0])if(l<0)o=o.left;else{if(!(l>0))return 0;s=-1,o=o.right}else if(l>0)o=o.left;else{if(!(l<0))return 0;s=1,o=o.right}}return s}}(g.slabs,g.coordinates);return 0===o.length?v:function(t,e){return function(n){return t(n[0],n[1])?0:e(n)}}(u(o),v)};var r=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js")[3],i=n(/*! slab-decomposition */"./node_modules/slab-decomposition/slabs.js"),o=n(/*! interval-tree-1d */"./node_modules/interval-tree-1d/interval-tree.js"),a=n(/*! binary-search-bounds */"./node_modules/point-in-big-polygon/node_modules/binary-search-bounds/search-bounds.js");function s(){return!0}function u(t){for(var e={},n=0;n<t.length;++n){var r=t[n],i=r[0][0],a=r[0][1],u=r[1][1],l=[Math.min(a,u),Math.max(a,u)];i in e?e[i].push(l):e[i]=[l]}var c={},f=Object.keys(e);for(n=0;n<f.length;++n){var h=e[f[n]];c[f[n]]=o(h)}return function(t){return function(e,n){var r=t[e];return!!r&&!!r.queryPoint(n,s)}}(c)}function l(t){return 1}},"./node_modules/rat-vec/add.js":
/*!*************************************!*\
  !*** ./node_modules/rat-vec/add.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! big-rat/add */"./node_modules/big-rat/add.js");t.exports=function(t,e){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=r(t[o],e[o]);return i}},"./node_modules/rat-vec/index.js":
/*!***************************************!*\
  !*** ./node_modules/rat-vec/index.js ***!
  \***************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){for(var e=new Array(t.length),n=0;n<t.length;++n)e[n]=r(t[n]);return e};var r=n(/*! big-rat */"./node_modules/big-rat/index.js")},"./node_modules/rat-vec/muls.js":
/*!**************************************!*\
  !*** ./node_modules/rat-vec/muls.js ***!
  \**************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! big-rat */"./node_modules/big-rat/index.js"),i=n(/*! big-rat/mul */"./node_modules/big-rat/mul.js");t.exports=function(t,e){for(var n=r(e),o=t.length,a=new Array(o),s=0;s<o;++s)a[s]=i(t[s],n);return a}},"./node_modules/rat-vec/sub.js":
/*!*************************************!*\
  !*** ./node_modules/rat-vec/sub.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! big-rat/sub */"./node_modules/big-rat/sub.js");t.exports=function(t,e){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=r(t[o],e[o]);return i}},"./node_modules/regl/dist/regl.js":
/*!****************************************!*\
  !*** ./node_modules/regl/dist/regl.js ***!
  \****************************************/
/*! no static exports found */function(t,e,n){t.exports=function(){function t(t,e){this.id=q++,this.type=t,this.data=e}function e(t){return"["+function t(e){if(0===e.length)return[];var n=e.charAt(0),r=e.charAt(e.length-1);if(1<e.length&&n===r&&('"'===n||"'"===n))return['"'+e.substr(1,e.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(n=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(e))return t(e.substr(0,n.index)).concat(t(n[1])).concat(t(e.substr(n.index+n[0].length)));if(1===(n=e.split(".")).length)return['"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(e=[],r=0;r<n.length;++r)e=e.concat(t(n[r]));return e}(t).join("][")+"]"}function n(t){return"string"==typeof t?t.split():t}function r(t){return"string"==typeof t?document.querySelector(t):t}function i(t){var e,i,o,a,s=t||{};t={};var u=[],l=[],c="undefined"==typeof window?1:window.devicePixelRatio,f=!1,h=function(t){},p=function(){};if("string"==typeof s?e=document.querySelector(s):"object"==typeof s&&("string"==typeof s.nodeName&&"function"==typeof s.appendChild&&"function"==typeof s.getBoundingClientRect?e=s:"function"==typeof s.drawArrays||"function"==typeof s.drawElements?o=(a=s).canvas:("gl"in s?a=s.gl:"canvas"in s?o=r(s.canvas):"container"in s&&(i=r(s.container)),"attributes"in s&&(t=s.attributes),"extensions"in s&&(u=n(s.extensions)),"optionalExtensions"in s&&(l=n(s.optionalExtensions)),"onDone"in s&&(h=s.onDone),"profile"in s&&(f=!!s.profile),"pixelRatio"in s&&(c=+s.pixelRatio))),e&&("canvas"===e.nodeName.toLowerCase()?o=e:i=e),!a){if(!o){if(!(e=function(t,e,n){function r(){var e=window.innerWidth,r=window.innerHeight;t!==document.body&&(r=t.getBoundingClientRect(),e=r.right-r.left,r=r.bottom-r.top),i.width=n*e,i.height=n*r,L(i.style,{width:e+"px",height:r+"px"})}var i=document.createElement("canvas");return L(i.style,{border:0,margin:0,padding:0,top:0,left:0}),t.appendChild(i),t===document.body&&(i.style.position="absolute",L(t.style,{margin:0,padding:0})),window.addEventListener("resize",r,!1),r(),{canvas:i,onDestroy:function(){window.removeEventListener("resize",r),t.removeChild(i)}}}(i||document.body,0,c)))return null;o=e.canvas,p=e.onDestroy}a=function(t,e){function n(n){try{return t.getContext(n,e)}catch(t){return null}}return n("webgl")||n("experimental-webgl")||n("webgl-experimental")}(o,t)}return a?{gl:a,canvas:o,container:i,extensions:u,optionalExtensions:l,pixelRatio:c,profile:f,onDone:h,onDestroy:p}:(p(),h("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function o(t,e){for(var n=Array(t),r=0;r<t;++r)n[r]=e(r);return n}function a(t){var e,n;return e=(65535<t)<<4,e|=n=(255<(t>>>=e))<<3,(e|=n=(15<(t>>>=n))<<2)|(n=(3<(t>>>=n))<<1)|t>>>n>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=n[a(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){n[a(t.byteLength)>>2].push(t)}var n=o(8,function(){return[]});return{alloc:t,free:e,allocType:function(e,n){var r=null;switch(e){case 5120:r=new Int8Array(t(n),0,n);break;case 5121:r=new Uint8Array(t(n),0,n);break;case 5122:r=new Int16Array(t(2*n),0,n);break;case 5123:r=new Uint16Array(t(2*n),0,n);break;case 5124:r=new Int32Array(t(4*n),0,n);break;case 5125:r=new Uint32Array(t(4*n),0,n);break;case 5126:r=new Float32Array(t(4*n),0,n);break;default:return null}return r.length!==n?r.subarray(0,n):r},freeType:function(t){e(t.buffer)}}}function u(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||W(t.data))}function l(t,e,n,r,i,o){for(var a=0;a<e;++a)for(var s=t[a],u=0;u<n;++u)for(var l=s[u],c=0;c<r;++c)i[o++]=l[c]}function c(t){return 0|$[Object.prototype.toString.call(t)]}function f(t,e){for(var n=0;n<e.length;++n)t[n]=e[n]}function h(t,e,n,r,i,o,a){for(var s=0,u=0;u<n;++u)for(var l=0;l<r;++l)t[s++]=e[i*u+o*l+a]}function p(t,e,n,r){function i(e){this.id=l++,this.buffer=t.createBuffer(),this.type=e,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,n.profile&&(this.stats={size:0})}function o(e,n,r){e.byteLength=n.byteLength,t.bufferData(e.type,n,r)}function a(t,e,n,r,i,a){if(t.usage=n,Array.isArray(e)){if(t.dtype=r||5126,0<e.length)if(Array.isArray(e[0])){i=tt(e);for(var s=r=1;s<i.length;++s)r*=i[s];t.dimension=r,e=J(e,i,t.dtype),o(t,e,n),a?t.persistentData=e:V.freeType(e)}else"number"==typeof e[0]?(t.dimension=i,f(i=V.allocType(t.dtype,e.length),e),o(t,i,n),a?t.persistentData=i:V.freeType(i)):W(e[0])&&(t.dimension=e[0].length,t.dtype=r||c(e[0])||5126,e=J(e,[e.length,e[0].length],t.dtype),o(t,e,n),a?t.persistentData=e:V.freeType(e))}else if(W(e))t.dtype=r||c(e),t.dimension=i,o(t,e,n),a&&(t.persistentData=new Uint8Array(new Uint8Array(e.buffer)));else if(u(e)){i=e.shape;var l=e.stride,s=e.offset,p=0,d=0,m=0,g=0;1===i.length?(p=i[0],d=1,m=l[0],g=0):2===i.length&&(p=i[0],d=i[1],m=l[0],g=l[1]),t.dtype=r||c(e.data)||5126,t.dimension=d,h(i=V.allocType(t.dtype,p*d),e.data,p,d,m,g,s),o(t,i,n),a?t.persistentData=i:V.freeType(i)}}function s(n){e.bufferCount--;for(var i=0;i<r.state.length;++i){var o=r.state[i];o.buffer===n&&(t.disableVertexAttribArray(i),o.buffer=null)}t.deleteBuffer(n.buffer),n.buffer=null,delete p[n.id]}var l=0,p={};i.prototype.bind=function(){t.bindBuffer(this.type,this.buffer)},i.prototype.destroy=function(){s(this)};var d=[];return n.profile&&(e.getTotalBufferSize=function(){var t=0;return Object.keys(p).forEach(function(e){t+=p[e].stats.size}),t}),{create:function(r,o,l,d){function m(e){var r=35044,i=null,o=0,s=0,l=1;return Array.isArray(e)||W(e)||u(e)?i=e:"number"==typeof e?o=0|e:e&&("data"in e&&(i=e.data),"usage"in e&&(r=K[e.usage]),"type"in e&&(s=G[e.type]),"dimension"in e&&(l=0|e.dimension),"length"in e&&(o=0|e.length)),g.bind(),i?a(g,i,r,s,l,d):(o&&t.bufferData(g.type,o,r),g.dtype=s||5121,g.usage=r,g.dimension=l,g.byteLength=o),n.profile&&(g.stats.size=g.byteLength*et[g.dtype]),m}e.bufferCount++;var g=new i(o);return p[g.id]=g,l||m(r),m._reglType="buffer",m._buffer=g,m.subdata=function(e,n){var r,i=0|(n||0);if(g.bind(),W(e))t.bufferSubData(g.type,i,e);else if(Array.isArray(e)){if(0<e.length)if("number"==typeof e[0]){var o=V.allocType(g.dtype,e.length);f(o,e),t.bufferSubData(g.type,i,o),V.freeType(o)}else(Array.isArray(e[0])||W(e[0]))&&(r=tt(e),o=J(e,r,g.dtype),t.bufferSubData(g.type,i,o),V.freeType(o))}else if(u(e)){r=e.shape;var a=e.stride,s=o=0,l=0,p=0;1===r.length?(o=r[0],s=1,l=a[0],p=0):2===r.length&&(o=r[0],s=r[1],l=a[0],p=a[1]),r=Array.isArray(e.data)?g.dtype:c(e.data),h(r=V.allocType(r,o*s),e.data,o,s,l,p,e.offset),t.bufferSubData(g.type,i,r),V.freeType(r)}return m},n.profile&&(m.stats=g.stats),m.destroy=function(){s(g)},m},createStream:function(t,e){var n=d.pop();return n||(n=new i(t)),n.bind(),a(n,e,35040,0,1,!1),n},destroyStream:function(t){d.push(t)},clear:function(){X(p).forEach(s),d.forEach(s)},getBuffer:function(t){return t&&t._buffer instanceof i?t._buffer:null},restore:function(){X(p).forEach(function(e){e.buffer=t.createBuffer(),t.bindBuffer(e.type,e.buffer),t.bufferData(e.type,e.persistentData||e.byteLength,e.usage)})},_initBuffer:a}}function d(t,e,n,r){function i(t){this.id=l++,s[this.id]=this,this.buffer=t,this.primType=4,this.type=this.vertCount=0}function o(r,i,o,a,s,l,c){if(r.buffer.bind(),i){var f=c;c||W(i)&&(!u(i)||W(i.data))||(f=e.oes_element_index_uint?5125:5123),n._initBuffer(r.buffer,i,o,f,3)}else t.bufferData(34963,l,o),r.buffer.dtype=f||5121,r.buffer.usage=o,r.buffer.dimension=3,r.buffer.byteLength=l;if(f=c,!c){switch(r.buffer.dtype){case 5121:case 5120:f=5121;break;case 5123:case 5122:f=5123;break;case 5125:case 5124:f=5125}r.buffer.dtype=f}r.type=f,0>(i=s)&&(i=r.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),r.vertCount=i,i=a,0>a&&(i=4,1===(a=r.buffer.dimension)&&(i=0),2===a&&(i=1),3===a&&(i=4)),r.primType=i}function a(t){r.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,c={uint8:5121,uint16:5123};e.oes_element_index_uint&&(c.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,n=35044,r=-1,i=-1,a=0,h=0;Array.isArray(t)||W(t)||u(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(n=K[t.usage]),"primitive"in t&&(r=nt[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=c[t.type]),"length"in t?a=0|t.length:(a=i,5123===h||5122===h?a*=2:5125!==h&&5124!==h||(a*=4))),o(f,e,n,r,i,a,h)}else l(),f.primType=4,f.vertCount=0,f.type=5121;return s}var l=n.create(null,34963,!0),f=new i(l._buffer);return r.elementsCount++,s(t),s._reglType="elements",s._elements=f,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){a(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(n.create(null,34963,!0,!1)._buffer)),o(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){X(s).forEach(a)}}}function m(t){for(var e=V.allocType(5123,t.length),n=0;n<t.length;++n)if(isNaN(t[n]))e[n]=65535;else if(1/0===t[n])e[n]=31744;else if(-1/0===t[n])e[n]=64512;else{rt[0]=t[n];var r=it[0],i=r>>>31<<15,o=(r<<1>>>24)-127,r=r>>13&1023;e[n]=-24>o?i:-14>o?i+(r+1024>>-14-o):15<o?i+31744:i+(o+15<<10)+r}return e}function g(t){return Array.isArray(t)||W(t)}function v(t){return"[object "+t+"]"}function y(t){return Array.isArray(t)&&(0===t.length||"number"==typeof t[0])}function _(t){return!(!Array.isArray(t)||0===t.length||!g(t[0]))}function b(t){return Object.prototype.toString.call(t)}function x(t){if(!t)return!1;var e=b(t);return 0<=pt.indexOf(e)||y(t)||_(t)||u(t)}function w(t,e){36193===t.type?(t.data=m(e),V.freeType(e)):t.data=e}function j(t,e,n,r,i,o){if(t=void 0!==mt[t]?mt[t]:st[t]*dt[e],o&&(t*=6),i){for(r=0;1<=n;)r+=t*n*n,n/=2;return r}return t*n*r}function M(t,e,n,r,i,o,a){function s(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function l(t,e){t.internalformat=e.internalformat,t.format=e.format,t.type=e.type,t.compressed=e.compressed,t.premultiplyAlpha=e.premultiplyAlpha,t.flipY=e.flipY,t.unpackAlignment=e.unpackAlignment,t.colorSpace=e.colorSpace,t.width=e.width,t.height=e.height,t.channels=e.channels}function c(t,e){if("object"==typeof e&&e){"premultiplyAlpha"in e&&(t.premultiplyAlpha=e.premultiplyAlpha),"flipY"in e&&(t.flipY=e.flipY),"alignment"in e&&(t.unpackAlignment=e.alignment),"colorSpace"in e&&(t.colorSpace=U[e.colorSpace]),"type"in e&&(t.type=H[e.type]);var n=t.width,r=t.height,i=t.channels,o=!1;"shape"in e?(n=e.shape[0],r=e.shape[1],3===e.shape.length&&(i=e.shape[2],o=!0)):("radius"in e&&(n=r=e.radius),"width"in e&&(n=e.width),"height"in e&&(r=e.height),"channels"in e&&(i=e.channels,o=!0)),t.width=0|n,t.height=0|r,t.channels=0|i,n=!1,"format"in e&&(n=e.format,r=t.internalformat=Y[n],t.format=it[r],n in H&&!("type"in e)&&(t.type=H[n]),n in Z&&(t.compressed=!0),n=!0),!o&&n?t.channels=st[t.format]:o&&!n&&t.channels!==at[t.format]&&(t.format=t.internalformat=at[t.channels])}}function f(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function h(){s.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function p(t,e){var n=null;if(x(e)?n=e:e&&(c(t,e),"x"in e&&(t.xOffset=0|e.x),"y"in e&&(t.yOffset=0|e.y),x(e.data)&&(n=e.data)),e.copy){var r=i.viewportWidth,o=i.viewportHeight;t.width=t.width||r-t.xOffset,t.height=t.height||o-t.yOffset,t.needsCopy=!0}else if(n){if(W(n))t.channels=t.channels||4,t.data=n,"type"in e||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(n)]);else if(y(n)){switch(t.channels=t.channels||4,o=(r=n).length,t.type){case 5121:case 5123:case 5125:case 5126:(o=V.allocType(t.type,o)).set(r),t.data=o;break;case 36193:t.data=m(r)}t.alignment=1,t.needsFree=!0}else if(u(n)){r=n.data,Array.isArray(r)||5121!==t.type||(t.type=0|$[Object.prototype.toString.call(r)]);var a,s,l,f,o=n.shape,h=n.stride;3===o.length?(l=o[2],f=h[2]):f=l=1,a=o[0],s=o[1],o=h[0],h=h[1],t.alignment=1,t.width=a,t.height=s,t.channels=l,t.format=t.internalformat=at[l],t.needsFree=!0,a=f,n=n.offset,l=t.width,f=t.height,s=t.channels;for(var p=V.allocType(36193===t.type?5126:t.type,l*f*s),d=0,v=0;v<f;++v)for(var j=0;j<l;++j)for(var M=0;M<s;++M)p[d++]=r[o*j+h*v+a*M+n];w(t,p)}else if(b(n)===ut||b(n)===lt)b(n)===ut?t.element=n:t.element=n.canvas,t.width=t.element.width,t.height=t.element.height,t.channels=4;else if(b(n)===ct)t.element=n,t.width=n.width,t.height=n.height,t.channels=4;else if(b(n)===ft)t.element=n,t.width=n.naturalWidth,t.height=n.naturalHeight,t.channels=4;else if(b(n)===ht)t.element=n,t.width=n.videoWidth,t.height=n.videoHeight,t.channels=4;else if(_(n)){for(r=t.width||n[0].length,o=t.height||n.length,h=t.channels,h=g(n[0][0])?h||n[0][0].length:h||1,a=Q.shape(n),l=1,f=0;f<a.length;++f)l*=a[f];l=V.allocType(36193===t.type?5126:t.type,l),Q.flatten(n,a,"",l),w(t,l),t.alignment=1,t.width=r,t.height=o,t.channels=h,t.format=t.internalformat=at[h],t.needsFree=!0}}else t.width=t.width||1,t.height=t.height||1,t.channels=t.channels||4}function d(e,n,i,o,a){var s=e.element,u=e.data,l=e.internalformat,c=e.format,h=e.type,p=e.width,d=e.height;f(e),s?t.texSubImage2D(n,a,i,o,c,h,s):e.compressed?t.compressedTexSubImage2D(n,a,i,o,l,p,d,u):e.needsCopy?(r(),t.copyTexSubImage2D(n,a,i,o,e.xOffset,e.yOffset,p,d)):t.texSubImage2D(n,a,i,o,p,d,c,h,u)}function v(){return pt.pop()||new h}function M(t){t.needsFree&&V.freeType(t.data),h.call(t),pt.push(t)}function A(t,e,n){var r=t.images[0]=v();t.mipmask=1,r.width=t.width=e,r.height=t.height=n,r.channels=t.channels=4}function k(t,e){var n=null;if(x(e))l(n=t.images[0]=v(),t),p(n,e),t.mipmask=1;else if(c(t,e),Array.isArray(e.mipmap))for(var r=e.mipmap,i=0;i<r.length;++i)l(n=t.images[i]=v(),t),n.width>>=i,n.height>>=i,p(n,r[i]),t.mipmask|=1<<i;else l(n=t.images[0]=v(),t),p(n,e),t.mipmask=1;l(t,t.images[0])}function z(e,n){for(var i=e.images,o=0;o<i.length&&i[o];++o){var a=i[o],s=n,u=o,l=a.element,c=a.data,h=a.internalformat,p=a.format,d=a.type,m=a.width,g=a.height,v=a.channels;f(a),l?t.texImage2D(s,u,p,p,d,l):a.compressed?t.compressedTexImage2D(s,u,h,m,g,0,c):a.needsCopy?(r(),t.copyTexImage2D(s,u,p,a.xOffset,a.yOffset,m,g,0)):((a=!c)&&(c=V.zero.allocType(d,m*g*v)),t.texImage2D(s,u,p,m,g,0,p,d,c),a&&c&&V.zero.freeType(c))}}function E(){var t=dt.pop()||new function(){s.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)};s.call(t);for(var e=t.mipmask=0;16>e;++e)t.images[e]=null;return t}function S(t){for(var e=t.images,n=0;n<e.length;++n)e[n]&&M(e[n]),e[n]=null;dt.push(t)}function N(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function T(t,e){"min"in e&&(t.minFilter=q[e.min],0<=ot.indexOf(t.minFilter)&&!("faces"in e)&&(t.genMipmaps=!0)),"mag"in e&&(t.magFilter=R[e.mag]);var n=t.wrapS,r=t.wrapT;if("wrap"in e){var i=e.wrap;"string"==typeof i?n=r=F[i]:Array.isArray(i)&&(n=F[i[0]],r=F[i[1]])}else"wrapS"in e&&(n=F[e.wrapS]),"wrapT"in e&&(r=F[e.wrapT]);if(t.wrapS=n,t.wrapT=r,"anisotropic"in e&&(t.anisotropic=e.anisotropic),"mipmap"in e){switch(n=!1,typeof e.mipmap){case"string":t.mipmapHint=D[e.mipmap],n=t.genMipmaps=!0;break;case"boolean":n=t.genMipmaps=e.mipmap;break;case"object":t.genMipmaps=!1,n=!0}!n||"min"in e||(t.minFilter=9984)}}function C(n,r){t.texParameteri(r,10241,n.minFilter),t.texParameteri(r,10240,n.magFilter),t.texParameteri(r,10242,n.wrapS),t.texParameteri(r,10243,n.wrapT),e.ext_texture_filter_anisotropic&&t.texParameteri(r,34046,n.anisotropic),n.genMipmaps&&(t.hint(33170,n.mipmapHint),t.generateMipmap(r))}function O(e){s.call(this),this.mipmask=0,this.internalformat=6408,this.id=mt++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new N,a.profile&&(this.stats={size:0})}function P(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function I(){var e=yt[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function B(e){var n=e.texture,r=e.unit,i=e.target;0<=r&&(t.activeTexture(33984+r),t.bindTexture(i,null),yt[r]=null),t.deleteTexture(n),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete gt[e.id],o.textureCount--}var D={"don't care":4352,"dont care":4352,nice:4354,fast:4353},F={repeat:10497,clamp:33071,mirror:33648},R={nearest:9728,linear:9729},q=L({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},R),U={none:0,browser:37444},H={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},Y={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},Z={};e.ext_srgb&&(Y.srgb=35904,Y.srgba=35906),e.oes_texture_float&&(H.float32=H.float=5126),e.oes_texture_half_float&&(H.float16=H["half float"]=36193),e.webgl_depth_texture&&(L(Y,{depth:6402,"depth stencil":34041}),L(H,{uint16:5123,uint32:5125,"depth stencil":34042})),e.webgl_compressed_texture_s3tc&&L(Z,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),e.webgl_compressed_texture_atc&&L(Z,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),e.webgl_compressed_texture_pvrtc&&L(Z,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),e.webgl_compressed_texture_etc1&&(Z["rgb etc1"]=36196);var G=Array.prototype.slice.call(t.getParameter(34467));Object.keys(Z).forEach(function(t){var e=Z[t];0<=G.indexOf(e)&&(Y[t]=e)});var K=Object.keys(Y);n.textureFormats=K;var J=[];Object.keys(Y).forEach(function(t){J[Y[t]]=t});var tt=[];Object.keys(H).forEach(function(t){tt[H[t]]=t});var et=[];Object.keys(R).forEach(function(t){et[R[t]]=t});var nt=[];Object.keys(q).forEach(function(t){nt[q[t]]=t});var rt=[];Object.keys(F).forEach(function(t){rt[F[t]]=t});var it=K.reduce(function(t,e){var n=Y[e];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n?t[n]=n:32855===n||0<=e.indexOf("rgba")?t[n]=6408:t[n]=6407,t},{}),pt=[],dt=[],mt=0,gt={},vt=n.maxTextureUnits,yt=Array(vt).map(function(){return null});return L(O.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(0>e){for(var n=0;n<vt;++n){var r=yt[n];if(r){if(0<r.bindCount)continue;r.unit=-1}yt[n]=this,e=n;break}a.profile&&o.maxTextureUnits<e+1&&(o.maxTextureUnits=e+1),this.unit=e,t.activeTexture(33984+e),t.bindTexture(this.target,this.texture)}return e},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&B(this)}}),a.profile&&(o.getTotalTextureSize=function(){var t=0;return Object.keys(gt).forEach(function(e){t+=gt[e].stats.size}),t}),{create2D:function(e,n){function r(t,e){var n=i.texInfo;N.call(n);var o=E();return"number"==typeof t?A(o,0|t,"number"==typeof e?0|e:0|t):t?(T(n,t),k(o,t)):A(o,1,1),n.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,l(i,o),i.internalformat=o.internalformat,r.width=o.width,r.height=o.height,P(i),z(o,3553),C(n,3553),I(),S(o),a.profile&&(i.stats.size=j(i.internalformat,i.type,o.width,o.height,n.genMipmaps,!1)),r.format=J[i.internalformat],r.type=tt[i.type],r.mag=et[n.magFilter],r.min=nt[n.minFilter],r.wrapS=rt[n.wrapS],r.wrapT=rt[n.wrapT],r}var i=new O(3553);return gt[i.id]=i,o.textureCount++,r(e,n),r.subimage=function(t,e,n,o){e|=0,n|=0,o|=0;var a=v();return l(a,i),a.width=0,a.height=0,p(a,t),a.width=a.width||(i.width>>o)-e,a.height=a.height||(i.height>>o)-n,P(i),d(a,3553,e,n,o),I(),M(a),r},r.resize=function(e,n){var o=0|e,s=0|n||o;if(o===i.width&&s===i.height)return r;r.width=i.width=o,r.height=i.height=s,P(i);for(var u,l=i.channels,c=i.type,f=0;i.mipmask>>f;++f){var h=o>>f,p=s>>f;if(!h||!p)break;u=V.zero.allocType(c,h*p*l),t.texImage2D(3553,f,i.format,h,p,0,i.format,i.type,u),u&&V.zero.freeType(u)}return I(),a.profile&&(i.stats.size=j(i.internalformat,i.type,o,s,!1,!1)),r},r._reglType="texture2d",r._texture=i,a.profile&&(r.stats=i.stats),r.destroy=function(){i.decRef()},r},createCube:function(e,n,r,i,s,u){function f(t,e,n,r,i,o){var s,u=h.texInfo;for(N.call(u),s=0;6>s;++s)m[s]=E();if("number"!=typeof t&&t){if("object"==typeof t)if(e)k(m[0],t),k(m[1],e),k(m[2],n),k(m[3],r),k(m[4],i),k(m[5],o);else if(T(u,t),c(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(m[s],h),k(m[s],t[s]);else for(s=0;6>s;++s)k(m[s],t)}else for(t=0|t||1,s=0;6>s;++s)A(m[s],t,t);for(l(h,m[0]),h.mipmask=u.genMipmaps?(m[0].width<<1)-1:m[0].mipmask,h.internalformat=m[0].internalformat,f.width=m[0].width,f.height=m[0].height,P(h),s=0;6>s;++s)z(m[s],34069+s);for(C(u,34067),I(),a.profile&&(h.stats.size=j(h.internalformat,h.type,f.width,f.height,u.genMipmaps,!0)),f.format=J[h.internalformat],f.type=tt[h.type],f.mag=et[u.magFilter],f.min=nt[u.minFilter],f.wrapS=rt[u.wrapS],f.wrapT=rt[u.wrapT],s=0;6>s;++s)S(m[s]);return f}var h=new O(34067);gt[h.id]=h,o.cubeCount++;var m=Array(6);return f(e,n,r,i,s,u),f.subimage=function(t,e,n,r,i){n|=0,r|=0,i|=0;var o=v();return l(o,h),o.width=0,o.height=0,p(o,e),o.width=o.width||(h.width>>i)-n,o.height=o.height||(h.height>>i)-r,P(h),d(o,34069+t,n,r,i),I(),M(o),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,P(h);for(var n=0;6>n;++n)for(var r=0;h.mipmask>>r;++r)t.texImage2D(34069+n,r,h.format,e>>r,e>>r,0,h.format,h.type,null);return I(),a.profile&&(h.stats.size=j(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=h,a.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;e<vt;++e)t.activeTexture(33984+e),t.bindTexture(3553,null),yt[e]=null;X(gt).forEach(B),o.cubeCount=0,o.textureCount=0},getTexture:function(t){return null},restore:function(){X(gt).forEach(function(e){e.texture=t.createTexture(),t.bindTexture(e.target,e.texture);for(var n=0;32>n;++n)if(0!=(e.mipmask&1<<n))if(3553===e.target)t.texImage2D(3553,n,e.internalformat,e.width>>n,e.height>>n,0,e.internalformat,e.type,null);else for(var r=0;6>r;++r)t.texImage2D(34069+r,n,e.internalformat,e.width>>n,e.height>>n,0,e.internalformat,e.type,null);C(e.texInfo,e.target)})}}}function A(t,e,n,r,i,o){function a(t,e,n){this.target=t,this.texture=e,this.renderbuffer=n;var r=t=0;e?(t=e.width,r=e.height):n&&(t=n.width,r=n.height),this.width=t,this.height=r}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function u(t,e,n){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function l(e,n){n&&(n.texture?t.framebufferTexture2D(36160,e,n.target,n.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,n.renderbuffer._renderbuffer.renderbuffer))}function c(t){var e=3553,n=null,r=null,i=t;return"object"==typeof t&&(i=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=i._reglType)?n=i:"textureCube"===t?n=i:"renderbuffer"===t&&(r=i,e=36161),new a(e,n,r)}function f(t,e,n,o,s){return n?((t=r.create2D({width:t,height:e,format:o,type:s}))._texture.refCount=0,new a(3553,t,null)):((t=i.create({width:t,height:e,format:o}))._renderbuffer.refCount=0,new a(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,n){t&&(t.texture?t.texture.resize(e,n):t.renderbuffer&&t.renderbuffer.resize(e,n))}function d(){this.id=j++,M[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function m(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function g(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,o.framebufferCount--,delete M[e.id]}function v(e){var r;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(r=0;r<i.length;++r)l(36064+r,i[r]);for(r=i.length;r<n.maxColorAttachments;++r)t.framebufferTexture2D(36160,36064+r,3553,null,0);t.framebufferTexture2D(36160,33306,3553,null,0),t.framebufferTexture2D(36160,36096,3553,null,0),t.framebufferTexture2D(36160,36128,3553,null,0),l(36096,e.depthAttachment),l(36128,e.stencilAttachment),l(33306,e.depthStencilAttachment),t.checkFramebufferStatus(36160),t.bindFramebuffer(36160,_.next?_.next.framebuffer:null),_.cur=_.next,t.getError()}function y(t,e){function n(t,e){var i,o=0,a=0,s=!0,l=!0;i=null;var p=!0,d="rgba",g="uint8",y=1,_=null,w=null,j=null,M=!1;"number"==typeof t?(o=0|t,a=0|e||o):t?("shape"in t?(a=t.shape,o=a[0],a=a[1]):("radius"in t&&(o=a=t.radius),"width"in t&&(o=t.width),"height"in t&&(a=t.height)),("color"in t||"colors"in t)&&(i=t.color||t.colors,Array.isArray(i)),i||("colorCount"in t&&(y=0|t.colorCount),"colorTexture"in t&&(p=!!t.colorTexture,d="rgba4"),"colorType"in t&&(g=t.colorType,!p)&&("half float"===g||"float16"===g?d="rgba16f":"float"!==g&&"float32"!==g||(d="rgba32f")),"colorFormat"in t&&(d=t.colorFormat,0<=b.indexOf(d)?p=!0:0<=x.indexOf(d)&&(p=!1))),("depthTexture"in t||"depthStencilTexture"in t)&&(M=!(!t.depthTexture&&!t.depthStencilTexture)),"depth"in t&&("boolean"==typeof t.depth?s=t.depth:(_=t.depth,l=!1)),"stencil"in t&&("boolean"==typeof t.stencil?l=t.stencil:(w=t.stencil,s=!1)),"depthStencil"in t&&("boolean"==typeof t.depthStencil?s=l=t.depthStencil:(j=t.depthStencil,l=s=!1))):o=a=1;var A=null,k=null,z=null,E=null;if(Array.isArray(i))A=i.map(c);else if(i)A=[c(i)];else for(A=Array(y),i=0;i<y;++i)A[i]=f(o,a,p,d,g);for(o=o||A[0].width,a=a||A[0].height,_?k=c(_):s&&!l&&(k=f(o,a,M,"depth","uint32")),w?z=c(w):l&&!s&&(z=f(o,a,!1,"stencil","uint8")),j?E=c(j):!_&&!w&&l&&s&&(E=f(o,a,M,"depth stencil","depth stencil")),s=null,i=0;i<A.length;++i)u(A[i]),A[i]&&A[i].texture&&(l=yt[A[i].texture._texture.format]*_t[A[i].texture._texture.type],null===s&&(s=l));return u(k),u(z),u(E),m(r),r.width=o,r.height=a,r.colorAttachments=A,r.depthAttachment=k,r.stencilAttachment=z,r.depthStencilAttachment=E,n.color=A.map(h),n.depth=h(k),n.stencil=h(z),n.depthStencil=h(E),n.width=r.width,n.height=r.height,v(r),n}var r=new d;return o.framebufferCount++,n(t,e),L(n,{resize:function(t,e){var i=0|t,o=0|e||i;if(i===r.width&&o===r.height)return n;for(var a=r.colorAttachments,s=0;s<a.length;++s)p(a[s],i,o);return p(r.depthAttachment,i,o),p(r.stencilAttachment,i,o),p(r.depthStencilAttachment,i,o),r.width=n.width=i,r.height=n.height=o,v(r),n},_reglType:"framebuffer",_framebuffer:r,destroy:function(){g(r),m(r)},use:function(t){_.setFBO({framebuffer:n},t)}})}var _={cur:null,next:null,dirty:!1,setFBO:null},b=["rgba"],x=["rgba4","rgb565","rgb5 a1"];e.ext_srgb&&x.push("srgba"),e.ext_color_buffer_half_float&&x.push("rgba16f","rgb16f"),e.webgl_color_buffer_float&&x.push("rgba32f");var w=["uint8"];e.oes_texture_half_float&&w.push("half float","float16"),e.oes_texture_float&&w.push("float","float32");var j=0,M={};return L(_,{getFramebuffer:function(t){return"function"==typeof t&&"framebuffer"===t._reglType&&(t=t._framebuffer)instanceof d?t:null},create:y,createCube:function(t){function e(t){var i,o={color:null},a=0,s=null;i="rgba";var u="uint8",l=1;if("number"==typeof t?a=0|t:t?("shape"in t?a=t.shape[0]:("radius"in t&&(a=0|t.radius),"width"in t?a=0|t.width:"height"in t&&(a=0|t.height)),("color"in t||"colors"in t)&&(s=t.color||t.colors,Array.isArray(s)),s||("colorCount"in t&&(l=0|t.colorCount),"colorType"in t&&(u=t.colorType),"colorFormat"in t&&(i=t.colorFormat)),"depth"in t&&(o.depth=t.depth),"stencil"in t&&(o.stencil=t.stencil),"depthStencil"in t&&(o.depthStencil=t.depthStencil)):a=1,s)if(Array.isArray(s))for(t=[],i=0;i<s.length;++i)t[i]=s[i];else t=[s];else for(t=Array(l),s={radius:a,format:i,type:u},i=0;i<l;++i)t[i]=r.createCube(s);for(o.color=Array(t.length),i=0;i<t.length;++i)l=t[i],a=a||l.width,o.color[i]={target:34069,data:t[i]};for(i=0;6>i;++i){for(l=0;l<t.length;++l)o.color[l].target=34069+i;0<i&&(o.depth=n[0].depth,o.stencil=n[0].stencil,o.depthStencil=n[0].depthStencil),n[i]?n[i](o):n[i]=y(o)}return L(e,{width:a,height:a,color:t})}var n=Array(6);return e(t),L(e,{faces:n,resize:function(t){var r=0|t;if(r===e.width)return e;var i=e.color;for(t=0;t<i.length;++t)i[t].resize(r);for(t=0;6>t;++t)n[t].resize(r);return e.width=e.height=r,e},_reglType:"framebufferCube",destroy:function(){n.forEach(function(t){t.destroy()})}})},clear:function(){X(M).forEach(g)},restore:function(){X(M).forEach(function(e){e.framebuffer=t.createFramebuffer(),v(e)})}})}function k(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function z(t,e,n,r){function i(t,e,n,r){this.name=t,this.id=e,this.location=n,this.info=r}function o(t,e){for(var n=0;n<t.length;++n)if(t[n].id===e.id)return void(t[n].location=e.location);t.push(e)}function a(n,r,i){var o=(i=35632===n?l:c)[r];if(!o){var a=e.str(r),o=t.createShader(n);t.shaderSource(o,a),t.compileShader(o),i[r]=o}return o}function s(t,e){this.id=p++,this.fragId=t,this.vertId=e,this.program=null,this.uniforms=[],this.attributes=[],r.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function u(n,s){var u,l;u=a(35632,n.fragId),l=a(35633,n.vertId);var c=n.program=t.createProgram();t.attachShader(c,u),t.attachShader(c,l),t.linkProgram(c);var f=t.getProgramParameter(c,35718);r.profile&&(n.stats.uniformsCount=f);var h=n.uniforms;for(u=0;u<f;++u)if(l=t.getActiveUniform(c,u))if(1<l.size)for(var p=0;p<l.size;++p){var d=l.name.replace("[0]","["+p+"]");o(h,new i(d,e.id(d),t.getUniformLocation(c,d),l))}else o(h,new i(l.name,e.id(l.name),t.getUniformLocation(c,l.name),l));for(f=t.getProgramParameter(c,35721),r.profile&&(n.stats.attributesCount=f),h=n.attributes,u=0;u<f;++u)(l=t.getActiveAttrib(c,u))&&o(h,new i(l.name,e.id(l.name),t.getAttribLocation(c,l.name),l))}var l={},c={},f={},h=[],p=0;return r.profile&&(n.getMaxUniformsCount=function(){var t=0;return h.forEach(function(e){e.stats.uniformsCount>t&&(t=e.stats.uniformsCount)}),t},n.getMaxAttributesCount=function(){var t=0;return h.forEach(function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)}),t}),{clear:function(){var e=t.deleteShader.bind(t);X(l).forEach(e),l={},X(c).forEach(e),c={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,f={},n.shaderCount=0},program:function(t,e,r){var i=f[e];i||(i=f[e]={});var o=i[t];return o||(o=new s(e,t),n.shaderCount++,u(o),i[t]=o,h.push(o)),o},restore:function(){l={},c={};for(var t=0;t<h.length;++t)u(h[t])},shader:a,frag:-1,vert:-1}}function E(t,e,n,r,i,o,a){function s(i){var o;o=null===e.next?5121:e.next.colorAttachments[0].texture._texture.type;var a=0,s=0,u=r.framebufferWidth,l=r.framebufferHeight,c=null;return W(i)?c=i:i&&(a=0|i.x,s=0|i.y,u=0|(i.width||r.framebufferWidth-a),l=0|(i.height||r.framebufferHeight-s),c=i.data||null),n(),i=u*l*4,c||(5121===o?c=new Uint8Array(i):5126===o&&(c=c||new Float32Array(i))),t.pixelStorei(3333,4),t.readPixels(a,s,u,l,6408,o,c),c}return function(t){return t&&"framebuffer"in t?function(t){var n;return e.setFBO({framebuffer:t.framebuffer},function(){n=s(t)}),n}(t):s(t)}}function S(t){return Array.prototype.slice.call(t)}function N(t){return S(t).join("")}function T(){function t(){var t=[],e=[];return L(function(){t.push.apply(t,S(arguments))},{def:function(){var r="v"+n++;return e.push(r),0<arguments.length&&(t.push(r,"="),t.push.apply(t,S(arguments)),t.push(";")),r},toString:function(){return N([0<e.length?"var "+e+";":"",N(t)])}})}function e(){function e(t,e){r(t,e,"=",n.def(t,e),";")}var n=t(),r=t(),i=n.toString,o=r.toString;return L(function(){n.apply(n,S(arguments))},{def:n.def,entry:n,exit:r,save:e,set:function(t,r,i){e(t,r),n(t,r,"=",i,";")},toString:function(){return i()+o()}})}var n=0,r=[],i=[],o=t(),a={};return{global:o,link:function(t){for(var e=0;e<i.length;++e)if(i[e]===t)return r[e];return e="g"+n++,r.push(e),i.push(t),e},block:t,proc:function(t,n){function r(){var t="a"+i.length;return i.push(t),t}var i=[];n=n||0;for(var o=0;o<n;++o)r();var o=e(),s=o.toString;return a[t]=L(o,{arg:r,toString:function(){return N(["function(",i.join(),"){",s(),"}"])}})},scope:e,cond:function(){var t=N(arguments),n=e(),r=e(),i=n.toString,o=r.toString;return L(n,{then:function(){return n.apply(n,S(arguments)),this},else:function(){return r.apply(r,S(arguments)),this},toString:function(){var e=o();return e&&(e="else{"+e+"}"),N(["if(",t,"){",i(),"}",e])}})},compile:function(){var t=['"use strict";',o,"return {"];Object.keys(a).forEach(function(e){t.push('"',e,'":',a[e].toString(),",")}),t.push("}");var e=N(t).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return Function.apply(null,r.concat(e)).apply(null,i)}}}function C(t){return Array.isArray(t)||W(t)||u(t)}function O(t){return t.sort(function(t,e){return"viewport"===t?-1:"viewport"===e?1:t<e?-1:1})}function P(t,e,n,r){this.thisDep=t,this.contextDep=e,this.propDep=n,this.append=r}function I(t){return t&&!(t.thisDep||t.contextDep||t.propDep)}function B(t){return new P(!1,!1,!1,t)}function D(t,e){var n=t.type;return 0===n?new P(!0,1<=(n=t.data.length),2<=n,e):4===n?new P((n=t.data).thisDep,n.contextDep,n.propDep,e):new P(3===n,2===n,1===n,e)}function F(t,e,n,r,i,a,s,u,l,c,f,h,p,d,m){function v(t){return t.replace(".","_")}function y(t,e,n){var r=v(t);rt.push(t),et[r]=tt[r]=!!n,it[r]=e}function _(t,e,n){var r=v(t);rt.push(t),Array.isArray(n)?(tt[r]=n.slice(),et[r]=n.slice()):tt[r]=et[r]=n,ot[r]=e}function b(){var t=T(),n=t.link,r=t.global;t.id=ut++,t.batchId="0";var i=n(at),o=t.shared={props:"a0"};Object.keys(at).forEach(function(t){o[t]=r.def(i,".",t)});var a=t.next={},s=t.current={};Object.keys(ot).forEach(function(t){Array.isArray(tt[t])&&(a[t]=r.def(o.next,".",t),s[t]=r.def(o.current,".",t))});var u=t.constants={};Object.keys(st).forEach(function(t){u[t]=r.def(JSON.stringify(st[t]))}),t.invoke=function(e,r){switch(r.type){case 0:var i=["this",o.context,o.props,t.batchId];return e.def(n(r.data),".call(",i.slice(0,Math.max(r.data.length+1,4)),")");case 1:return e.def(o.props,r.data);case 2:return e.def(o.context,r.data);case 3:return e.def("this",r.data);case 4:return r.data.append(t,e),r.data.ref}},t.attribCache={};var l={};return t.scopeAttrib=function(t){if((t=e.id(t))in l)return l[t];var r=c.scope[t];return r||(r=c.scope[t]=new Q),l[t]=n(r)},t}function x(t,e){var n=t.static,r=t.dynamic;if("framebuffer"in n){var i=n.framebuffer;return i?(i=u.getFramebuffer(i),B(function(t,e){var n=t.link(i),r=t.shared;return e.set(r.framebuffer,".next",n),r=r.context,e.set(r,".framebufferWidth",n+".width"),e.set(r,".framebufferHeight",n+".height"),n})):B(function(t,e){var n=t.shared;return e.set(n.framebuffer,".next","null"),n=n.context,e.set(n,".framebufferWidth",n+".drawingBufferWidth"),e.set(n,".framebufferHeight",n+".drawingBufferHeight"),"null"})}if("framebuffer"in r){var o=r.framebuffer;return D(o,function(t,e){var n=t.invoke(e,o),r=t.shared,i=r.framebuffer,n=e.def(i,".getFramebuffer(",n,")");return e.set(i,".next",n),r=r.context,e.set(r,".framebufferWidth",n+"?"+n+".width:"+r+".drawingBufferWidth"),e.set(r,".framebufferHeight",n+"?"+n+".height:"+r+".drawingBufferHeight"),n})}return null}function w(t){function n(t){if(t in r){var n=e.id(r[t]);return(t=B(function(){return n})).id=n,t}if(t in i){var o=i[t];return D(o,function(t,e){var n=t.invoke(e,o);return e.def(t.shared.strings,".id(",n,")")})}return null}var r=t.static,i=t.dynamic,o=n("frag"),a=n("vert"),s=null;return I(o)&&I(a)?(s=f.program(a.id,o.id),t=B(function(t,e){return t.link(s)})):t=new P(o&&o.thisDep||a&&a.thisDep,o&&o.contextDep||a&&a.contextDep,o&&o.propDep||a&&a.propDep,function(t,e){var n,r,i=t.shared.shader;return n=o?o.append(t,e):e.def(i,".","frag"),r=a?a.append(t,e):e.def(i,".","vert"),e.def(i+".program("+r+","+n+")")}),{frag:o,vert:a,progVar:t,program:s}}function j(t,e){function n(t,e){if(t in r){var n=0|r[t];return B(function(t,r){return e&&(t.OFFSET=n),n})}if(t in i){var a=i[t];return D(a,function(t,n){var r=t.invoke(n,a);return e&&(t.OFFSET=r),r})}return e&&o?B(function(t,e){return t.OFFSET="0",0}):null}var r=t.static,i=t.dynamic,o=function(){if("elements"in r){var t=r.elements;C(t)?t=a.getElements(a.create(t,!0)):t&&(t=a.getElements(t));var e=B(function(e,n){if(t){var r=e.link(t);return e.ELEMENTS=r}return e.ELEMENTS=null});return e.value=t,e}if("elements"in i){var n=i.elements;return D(n,function(t,e){var r=t.shared,i=r.isBufferArgs,r=r.elements,o=t.invoke(e,n),a=e.def("null"),i=e.def(i,"(",o,")"),o=t.cond(i).then(a,"=",r,".createStream(",o,");").else(a,"=",r,".getElements(",o,");");return e.entry(o),e.exit(t.cond(i).then(r,".destroyStream(",a,");")),t.ELEMENTS=a})}return null}(),s=n("offset",!0);return{elements:o,primitive:function(){if("primitive"in r){var t=r.primitive;return B(function(e,n){return nt[t]})}if("primitive"in i){var e=i.primitive;return D(e,function(t,n){var r=t.constants.primTypes,i=t.invoke(n,e);return n.def(r,"[",i,"]")})}return o?I(o)?o.value?B(function(t,e){return e.def(t.ELEMENTS,".primType")}):B(function(){return 4}):new P(o.thisDep,o.contextDep,o.propDep,function(t,e){var n=t.ELEMENTS;return e.def(n,"?",n,".primType:",4)}):null}(),count:function(){if("count"in r){var t=0|r.count;return B(function(){return t})}if("count"in i){var e=i.count;return D(e,function(t,n){return t.invoke(n,e)})}return o?I(o)?o?s?new P(s.thisDep,s.contextDep,s.propDep,function(t,e){return e.def(t.ELEMENTS,".vertCount-",t.OFFSET)}):B(function(t,e){return e.def(t.ELEMENTS,".vertCount")}):B(function(){return-1}):new P(o.thisDep||s.thisDep,o.contextDep||s.contextDep,o.propDep||s.propDep,function(t,e){var n=t.ELEMENTS;return t.OFFSET?e.def(n,"?",n,".vertCount-",t.OFFSET,":-1"):e.def(n,"?",n,".vertCount:-1")}):null}(),instances:n("instances",!1),offset:s}}function M(t,n){var r=t.static,o=t.dynamic,a={};return Object.keys(r).forEach(function(t){var n=r[t],o=e.id(t),s=new Q;if(C(n))s.state=1,s.buffer=i.getBuffer(i.create(n,34962,!1,!0)),s.type=0;else{var u=i.getBuffer(n);if(u)s.state=1,s.buffer=u,s.type=0;else if("constant"in n){var l=n.constant;s.buffer="null",s.state=2,"number"==typeof l?s.x=l:bt.forEach(function(t,e){e<l.length&&(s[t]=l[e])})}else{var u=C(n.buffer)?i.getBuffer(i.create(n.buffer,34962,!1,!0)):i.getBuffer(n.buffer),c=0|n.offset,f=0|n.stride,h=0|n.size,p=!!n.normalized,d=0;"type"in n&&(d=G[n.type]),n=0|n.divisor,s.buffer=u,s.state=1,s.size=h,s.normalized=p,s.type=d||u.dtype,s.offset=c,s.stride=f,s.divisor=n}}a[t]=B(function(t,e){var n=t.attribCache;if(o in n)return n[o];var r={isStream:!1};return Object.keys(s).forEach(function(t){r[t]=s[t]}),s.buffer&&(r.buffer=t.link(s.buffer),r.type=r.type||r.buffer+".dtype"),n[o]=r})}),Object.keys(o).forEach(function(t){var e=o[t];a[t]=D(e,function(t,n){function r(t){n(u[t],"=",i,".",t,"|0;")}var i=t.invoke(n,e),o=t.shared,a=o.isBufferArgs,s=o.buffer,u={isStream:n.def(!1)},l=new Q;l.state=1,Object.keys(l).forEach(function(t){u[t]=n.def(""+l[t])});var c=u.buffer,f=u.type;return n("if(",a,"(",i,")){",u.isStream,"=true;",c,"=",s,".createStream(",34962,",",i,");",f,"=",c,".dtype;","}else{",c,"=",s,".getBuffer(",i,");","if(",c,"){",f,"=",c,".dtype;",'}else if("constant" in ',i,"){",u.state,"=",2,";","if(typeof "+i+'.constant === "number"){',u[bt[0]],"=",i,".constant;",bt.slice(1).map(function(t){return u[t]}).join("="),"=0;","}else{",bt.map(function(t,e){return u[t]+"="+i+".constant.length>"+e+"?"+i+".constant["+e+"]:0;"}).join(""),"}}else{","if(",a,"(",i,".buffer)){",c,"=",s,".createStream(",34962,",",i,".buffer);","}else{",c,"=",s,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",c,".dtype;",u.normalized,"=!!",i,".normalized;"),r("size"),r("offset"),r("stride"),r("divisor"),n("}}"),n.exit("if(",u.isStream,"){",s,".destroyStream(",c,");","}"),u})}),a}function A(t,e,n,r,i){var a=x(t),s=function(t,e,n){function r(t){if(t in i){var n=i[t];t=!0;var r,a,s=0|n.x,u=0|n.y;return"width"in n?r=0|n.width:t=!1,"height"in n?a=0|n.height:t=!1,new P(!t&&e&&e.thisDep,!t&&e&&e.contextDep,!t&&e&&e.propDep,function(t,e){var i=t.shared.context,o=r;"width"in n||(o=e.def(i,".","framebufferWidth","-",s));var l=a;return"height"in n||(l=e.def(i,".","framebufferHeight","-",u)),[s,u,o,l]})}if(t in o){var l=o[t];return t=D(l,function(t,e){var n=t.invoke(e,l),r=t.shared.context,i=e.def(n,".x|0"),o=e.def(n,".y|0"),a=e.def('"width" in ',n,"?",n,".width|0:","(",r,".","framebufferWidth","-",i,")"),n=e.def('"height" in ',n,"?",n,".height|0:","(",r,".","framebufferHeight","-",o,")");return[i,o,a,n]}),e&&(t.thisDep=t.thisDep||e.thisDep,t.contextDep=t.contextDep||e.contextDep,t.propDep=t.propDep||e.propDep),t}return e?new P(e.thisDep,e.contextDep,e.propDep,function(t,e){var n=t.shared.context;return[0,0,e.def(n,".","framebufferWidth"),e.def(n,".","framebufferHeight")]}):null}var i=t.static,o=t.dynamic;if(t=r("viewport")){var a=t;t=new P(t.thisDep,t.contextDep,t.propDep,function(t,e){var n=a.append(t,e),r=t.shared.context;return e.set(r,".viewportWidth",n[2]),e.set(r,".viewportHeight",n[3]),n})}return{viewport:t,scissor_box:r("scissor.box")}}(t,a),u=j(t),l=function(t,e){var n=t.static,r=t.dynamic,i={};return rt.forEach(function(t){function e(e,o){if(t in n){var s=e(n[t]);i[a]=B(function(){return s})}else if(t in r){var u=r[t];i[a]=D(u,function(t,e){return o(t,e,t.invoke(e,u))})}}var a=v(t);switch(t){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return e(function(t){return t},function(t,e,n){return n});case"depth.func":return e(function(t){return jt[t]},function(t,e,n){return e.def(t.constants.compareFuncs,"[",n,"]")});case"depth.range":return e(function(t){return t},function(t,e,n){return[e.def("+",n,"[0]"),e=e.def("+",n,"[1]")]});case"blend.func":return e(function(t){return[wt["srcRGB"in t?t.srcRGB:t.src],wt["dstRGB"in t?t.dstRGB:t.dst],wt["srcAlpha"in t?t.srcAlpha:t.src],wt["dstAlpha"in t?t.dstAlpha:t.dst]]},function(t,e,n){function r(t,r){return e.def('"',t,r,'" in ',n,"?",n,".",t,r,":",n,".",t)}t=t.constants.blendFuncs;var i=r("src","RGB"),o=r("dst","RGB"),a=(i=e.def(t,"[",i,"]"),e.def(t,"[",r("src","Alpha"),"]"));return[i,o=e.def(t,"[",o,"]"),a,t=e.def(t,"[",r("dst","Alpha"),"]")]});case"blend.equation":return e(function(t){return"string"==typeof t?[$[t],$[t]]:"object"==typeof t?[$[t.rgb],$[t.alpha]]:void 0},function(t,e,n){var r=t.constants.blendEquations,i=e.def(),o=e.def();return(t=t.cond("typeof ",n,'==="string"')).then(i,"=",o,"=",r,"[",n,"];"),t.else(i,"=",r,"[",n,".rgb];",o,"=",r,"[",n,".alpha];"),e(t),[i,o]});case"blend.color":return e(function(t){return o(4,function(e){return+t[e]})},function(t,e,n){return o(4,function(t){return e.def("+",n,"[",t,"]")})});case"stencil.mask":return e(function(t){return 0|t},function(t,e,n){return e.def(n,"|0")});case"stencil.func":return e(function(t){return[jt[t.cmp||"keep"],t.ref||0,"mask"in t?t.mask:-1]},function(t,e,n){return[t=e.def('"cmp" in ',n,"?",t.constants.compareFuncs,"[",n,".cmp]",":",7680),e.def(n,".ref|0"),e=e.def('"mask" in ',n,"?",n,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return e(function(e){return["stencil.opBack"===t?1029:1028,Mt[e.fail||"keep"],Mt[e.zfail||"keep"],Mt[e.zpass||"keep"]]},function(e,n,r){function i(t){return n.def('"',t,'" in ',r,"?",o,"[",r,".",t,"]:",7680)}var o=e.constants.stencilOps;return["stencil.opBack"===t?1029:1028,i("fail"),i("zfail"),i("zpass")]});case"polygonOffset.offset":return e(function(t){return[0|t.factor,0|t.units]},function(t,e,n){return[e.def(n,".factor|0"),e=e.def(n,".units|0")]});case"cull.face":return e(function(t){var e=0;return"front"===t?e=1028:"back"===t&&(e=1029),e},function(t,e,n){return e.def(n,'==="front"?',1028,":",1029)});case"lineWidth":return e(function(t){return t},function(t,e,n){return n});case"frontFace":return e(function(t){return At[t]},function(t,e,n){return e.def(n+'==="cw"?2304:2305')});case"colorMask":return e(function(t){return t.map(function(t){return!!t})},function(t,e,n){return o(4,function(t){return"!!"+n+"["+t+"]"})});case"sample.coverage":return e(function(t){return["value"in t?t.value:1,!!t.invert]},function(t,e,n){return[e.def('"value" in ',n,"?+",n,".value:1"),e=e.def("!!",n,".invert")]})}}),i}(t),c=w(t),f=s.viewport;return f&&(l.viewport=f),f=v("scissor.box"),(s=s[f])&&(l[f]=s),s=0<Object.keys(l).length,(a={framebuffer:a,draw:u,shader:c,state:l,dirty:s}).profile=function(t){var e,n=t.static;if(t=t.dynamic,"profile"in n){var r=!!n.profile;(e=B(function(t,e){return r})).enable=r}else if("profile"in t){var i=t.profile;e=D(i,function(t,e){return t.invoke(e,i)})}return e}(t),a.uniforms=function(t,e){var n=t.static,r=t.dynamic,i={};return Object.keys(n).forEach(function(t){var e,r=n[t];if("number"==typeof r||"boolean"==typeof r)e=B(function(){return r});else if("function"==typeof r){var a=r._reglType;"texture2d"===a||"textureCube"===a?e=B(function(t){return t.link(r)}):"framebuffer"!==a&&"framebufferCube"!==a||(e=B(function(t){return t.link(r.color[0])}))}else g(r)&&(e=B(function(t){return t.global.def("[",o(r.length,function(t){return r[t]}),"]")}));e.value=r,i[t]=e}),Object.keys(r).forEach(function(t){var e=r[t];i[t]=D(e,function(t,n){return t.invoke(n,e)})}),i}(n),a.attributes=M(e),a.context=function(t){var e=t.static,n=t.dynamic,r={};return Object.keys(e).forEach(function(t){var n=e[t];r[t]=B(function(t,e){return"number"==typeof n||"boolean"==typeof n?""+n:t.link(n)})}),Object.keys(n).forEach(function(t){var e=n[t];r[t]=D(e,function(t,n){return t.invoke(n,e)})}),r}(r),a}function k(t,e,n){var r=t.shared.context,i=t.scope();Object.keys(n).forEach(function(o){e.save(r,"."+o),i(r,".",o,"=",n[o].append(t,e),";")}),e(i)}function z(t,e,n,r){var i,o=t.shared,a=o.gl,s=o.framebuffer;J&&(i=e.def(o.extensions,".webgl_draw_buffers"));var u=t.constants,o=u.drawBuffer,u=u.backBuffer;t=n?n.append(t,e):e.def(s,".next"),r||e("if(",t,"!==",s,".cur){"),e("if(",t,"){",a,".bindFramebuffer(",36160,",",t,".framebuffer);"),J&&e(i,".drawBuffersWEBGL(",o,"[",t,".colorAttachments.length]);"),e("}else{",a,".bindFramebuffer(",36160,",null);"),J&&e(i,".drawBuffersWEBGL(",u,");"),e("}",s,".cur=",t,";"),r||e("}")}function E(t,e,n){var r=t.shared,i=r.gl,a=t.current,s=t.next,u=r.current,l=r.next,c=t.cond(u,".dirty");rt.forEach(function(e){var r,f;if(!((e=v(e))in n.state))if(e in s){r=s[e],f=a[e];var h=o(tt[e].length,function(t){return c.def(r,"[",t,"]")});c(t.cond(h.map(function(t,e){return t+"!=="+f+"["+e+"]"}).join("||")).then(i,".",ot[e],"(",h,");",h.map(function(t,e){return f+"["+e+"]="+t}).join(";"),";"))}else r=c.def(l,".",e),h=t.cond(r,"!==",u,".",e),c(h),e in it?h(t.cond(r).then(i,".enable(",it[e],");").else(i,".disable(",it[e],");"),u,".",e,"=",r,";"):h(i,".",ot[e],"(",r,");",u,".",e,"=",r,";")}),0===Object.keys(n.state).length&&c(u,".dirty=false;"),e(c)}function S(t,e,n,r){var i=t.shared,o=t.current,a=i.current,s=i.gl;O(Object.keys(n)).forEach(function(i){var u=n[i];if(!r||r(u)){var l=u.append(t,e);if(it[i]){var c=it[i];I(u)?e(s,l?".enable(":".disable(",c,");"):e(t.cond(l).then(s,".enable(",c,");").else(s,".disable(",c,");")),e(a,".",i,"=",l,";")}else if(g(l)){var f=o[i];e(s,".",ot[i],"(",l,");",l.map(function(t,e){return f+"["+e+"]="+t}).join(";"),";")}else e(s,".",ot[i],"(",l,");",a,".",i,"=",l,";")}})}function N(t,e){K&&(t.instancing=e.def(t.shared.extensions,".angle_instanced_arrays"))}function F(t,e,n,r,i){function o(){return"undefined"==typeof performance?"Date.now()":"performance.now()"}function a(t){l=e.def(),t(l,"=",o(),";"),"string"==typeof i?t(h,".count+=",i,";"):t(h,".count++;"),d&&(r?(c=e.def(),t(c,"=",m,".getNumPendingQueries();")):t(m,".beginQuery(",h,");"))}function s(t){t(h,".cpuTime+=",o(),"-",l,";"),d&&(r?t(m,".pushScopeStats(",c,",",m,".getNumPendingQueries(),",h,");"):t(m,".endQuery();"))}function u(t){var n=e.def(p,".profile");e(p,".profile=",t,";"),e.exit(p,".profile=",n,";")}var l,c,f=t.shared,h=t.stats,p=f.current,m=f.timer;if(n=n.profile){if(I(n))return void(n.enable?(a(e),s(e.exit),u("true")):u("false"));u(n=n.append(t,e))}else n=e.def(p,".profile");a(f=t.block()),e("if(",n,"){",f,"}"),s(t=t.block()),e.exit("if(",n,"){",t,"}")}function R(t,e,n,r,i){function o(n,r,i){function o(){e("if(!",c,".buffer){",u,".enableVertexAttribArray(",l,");}");var n,o=i.type;n=i.size?e.def(i.size,"||",r):r,e("if(",c,".type!==",o,"||",c,".size!==",n,"||",p.map(function(t){return c+"."+t+"!=="+i[t]}).join("||"),"){",u,".bindBuffer(",34962,",",f,".buffer);",u,".vertexAttribPointer(",[l,n,o,i.normalized,i.stride,i.offset],");",c,".type=",o,";",c,".size=",n,";",p.map(function(t){return c+"."+t+"="+i[t]+";"}).join(""),"}"),K&&(o=i.divisor,e("if(",c,".divisor!==",o,"){",t.instancing,".vertexAttribDivisorANGLE(",[l,o],");",c,".divisor=",o,";}"))}function s(){e("if(",c,".buffer){",u,".disableVertexAttribArray(",l,");","}if(",bt.map(function(t,e){return c+"."+t+"!=="+h[e]}).join("||"),"){",u,".vertexAttrib4f(",l,",",h,");",bt.map(function(t,e){return c+"."+t+"="+h[e]+";"}).join(""),"}")}var u=a.gl,l=e.def(n,".location"),c=e.def(a.attributes,"[",l,"]");n=i.state;var f=i.buffer,h=[i.x,i.y,i.z,i.w],p=["buffer","normalized","offset","stride"];1===n?o():2===n?s():(e("if(",n,"===",1,"){"),o(),e("}else{"),s(),e("}"))}var a=t.shared;r.forEach(function(r){var a,s=r.name,u=n.attributes[s];if(u){if(!i(u))return;a=u.append(t,e)}else{if(!i(kt))return;var l=t.scopeAttrib(s);a={},Object.keys(new Q).forEach(function(t){a[t]=e.def(l,".",t)})}o(t.link(r),function(t){switch(t){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(r.info.type),a)})}function L(t,n,r,i,a){for(var s,u=t.shared,l=u.gl,c=0;c<i.length;++c){var f,h=i[c],p=h.name,d=h.info.type,m=r.uniforms[p],h=t.link(h)+".location";if(m){if(!a(m))continue;if(I(m)){if(p=m.value,35678===d||35680===d)d=t.link(p._texture||p.color[0]._texture),n(l,".uniform1i(",h,",",d+".bind());"),n.exit(d,".unbind();");else if(35674===d||35675===d||35676===d)p=t.global.def("new Float32Array(["+Array.prototype.slice.call(p)+"])"),m=2,35675===d?m=3:35676===d&&(m=4),n(l,".uniformMatrix",m,"fv(",h,",false,",p,");");else{switch(d){case 5126:s="1f";break;case 35664:s="2f";break;case 35665:s="3f";break;case 35666:s="4f";break;case 35670:case 5124:s="1i";break;case 35671:case 35667:s="2i";break;case 35672:case 35668:s="3i";break;case 35673:s="4i";break;case 35669:s="4i"}n(l,".uniform",s,"(",h,",",g(p)?Array.prototype.slice.call(p):p,");")}continue}f=m.append(t,n)}else{if(!a(kt))continue;f=n.def(u.uniforms,"[",e.id(p),"]")}switch(35678===d?n("if(",f,"&&",f,'._reglType==="framebuffer"){',f,"=",f,".color[0];","}"):35680===d&&n("if(",f,"&&",f,'._reglType==="framebufferCube"){',f,"=",f,".color[0];","}"),p=1,d){case 35678:case 35680:d=n.def(f,"._texture"),n(l,".uniform1i(",h,",",d,".bind());"),n.exit(d,".unbind();");continue;case 5124:case 35670:s="1i";break;case 35667:case 35671:s="2i",p=2;break;case 35668:case 35672:s="3i",p=3;break;case 35669:case 35673:s="4i",p=4;break;case 5126:s="1f";break;case 35664:s="2f",p=2;break;case 35665:s="3f",p=3;break;case 35666:s="4f",p=4;break;case 35674:s="Matrix2fv";break;case 35675:s="Matrix3fv";break;case 35676:s="Matrix4fv"}if(n(l,".uniform",s,"(",h,","),"M"===s.charAt(0)){var h=Math.pow(d-35674+2,2),v=t.global.def("new Float32Array(",h,")");n("false,(Array.isArray(",f,")||",f," instanceof Float32Array)?",f,":(",o(h,function(t){return v+"["+t+"]="+f+"["+t+"]"}),",",v,")")}else n(1<p?o(p,function(t){return f+"["+t+"]"}):f);n(");")}}function q(t,e,n,r){function i(i){var o=h[i];return o?o.contextDep&&r.contextDynamic||o.propDep?o.append(t,n):o.append(t,e):e.def(f,".",i)}function o(){function t(){n(u,".drawElementsInstancedANGLE(",[d,g,v,m+"<<(("+v+"-5121)>>1)",s],");")}function e(){n(u,".drawArraysInstancedANGLE(",[d,m,g,s],");")}p?y?t():(n("if(",p,"){"),t(),n("}else{"),e(),n("}")):e()}function a(){function t(){n(c+".drawElements("+[d,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function e(){n(c+".drawArrays("+[d,m,g]+");")}p?y?t():(n("if(",p,"){"),t(),n("}else{"),e(),n("}")):e()}var s,u,l=t.shared,c=l.gl,f=l.draw,h=r.draw,p=function(){var i=h.elements,o=e;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(o=n),i=i.append(t,o)):i=o.def(f,".","elements"),i&&o("if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);"),i}(),d=i("primitive"),m=i("offset"),g=function(){var i=h.count,o=e;return i?((i.contextDep&&r.contextDynamic||i.propDep)&&(o=n),i=i.append(t,o)):i=o.def(f,".","count"),i}();if("number"==typeof g){if(0===g)return}else n("if(",g,"){"),n.exit("}");K&&(s=i("instances"),u=t.instancing);var v=p+".type",y=h.elements&&I(h.elements);K&&("number"!=typeof s||0<=s)?"string"==typeof s?(n("if(",s,">0){"),o(),n("}else if(",s,"<0){"),a(),n("}")):o():a()}function H(t,e,n,r,i){return e=b(),i=e.proc("body",i),K&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,n,r),e.compile().body}function Y(t,e,n,r){N(t,e),R(t,e,n,r.attributes,function(){return!0}),L(t,e,n,r.uniforms,function(){return!0}),q(t,e,e,n)}function V(t,e,n,r){function i(){return!0}t.batchId="a1",N(t,e),R(t,e,n,r.attributes,i),L(t,e,n,r.uniforms,i),q(t,e,e,n)}function Z(t,e,n,r){function i(t){return t.contextDep&&a||t.propDep}function o(t){return!i(t)}N(t,e);var a=n.contextDep,s=e.def(),u=e.def();t.shared.props=u,t.batchId=s;var l=t.scope(),c=t.scope();e(l.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",u,"=","a0","[",s,"];",c,"}",l.exit),n.needsContext&&k(t,c,n.context),n.needsFramebuffer&&z(t,c,n.framebuffer),S(t,c,n.state,i),n.profile&&i(n.profile)&&F(t,c,n,!1,!0),r?(R(t,l,n,r.attributes,o),R(t,c,n,r.attributes,i),L(t,l,n,r.uniforms,o),L(t,c,n,r.uniforms,i),q(t,l,c,n)):(e=t.global.def("{}"),r=n.shader.progVar.append(t,c),u=c.def(r,".id"),l=c.def(e,"[",u,"]"),c(t.shared.gl,".useProgram(",r,".program);","if(!",l,"){",l,"=",e,"[",u,"]=",t.link(function(e){return H(V,t,n,e,2)}),"(",r,");}",l,".call(this,a0[",s,"],",s,");"))}function W(t,n){function r(e){var r=n.shader[e];r&&i.set(o.shader,"."+e,r.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var o=t.shared,a=o.current;k(t,i,n.context),n.framebuffer&&n.framebuffer.append(t,i),O(Object.keys(n.state)).forEach(function(e){var r=n.state[e].append(t,i);g(r)?r.forEach(function(n,r){i.set(t.next[e],"["+r+"]",n)}):i.set(o.next,"."+e,r)}),F(t,i,n,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(e){var r=n.draw[e];r&&i.set(o.draw,"."+e,""+r.append(t,i))}),Object.keys(n.uniforms).forEach(function(r){i.set(o.uniforms,"["+e.id(r)+"]",n.uniforms[r].append(t,i))}),Object.keys(n.attributes).forEach(function(e){var r=n.attributes[e].append(t,i),o=t.scopeAttrib(e);Object.keys(new Q).forEach(function(t){i.set(o,"."+t,r[t])})}),r("vert"),r("frag"),0<Object.keys(n.state).length&&(i(a,".dirty=true;"),i.exit(a,".dirty=true;")),i("a1(",t.shared.context,",a0,",t.batchId,");")}function X(t,e,n){var r=e.static[n];if(r&&function(t){if("object"==typeof t&&!g(t)){for(var e=Object.keys(t),n=0;n<e.length;++n)if(U.isDynamic(t[e[n]]))return!0;return!1}}(r)){var i=t.global,o=Object.keys(r),a=!1,s=!1,u=!1,l=t.global.def("{}");o.forEach(function(e){var n=r[e];if(U.isDynamic(n))"function"==typeof n&&(n=r[e]=U.unbox(n)),e=D(n,null),a=a||e.thisDep,u=u||e.propDep,s=s||e.contextDep;else{switch(i(l,".",e,"="),typeof n){case"number":i(n);break;case"string":i('"',n,'"');break;case"object":Array.isArray(n)&&i("[",n.join(),"]");break;default:i(t.link(n))}i(";")}}),e.dynamic[n]=new U.DynamicVariable(4,{thisDep:a,contextDep:s,propDep:u,ref:l,append:function(t,e){o.forEach(function(n){var i=r[n];U.isDynamic(i)&&(i=t.invoke(e,i),e(l,".",n,"=",i,";"))})}}),delete e.static[n]}}var Q=c.Record,$={add:32774,subtract:32778,"reverse subtract":32779};n.ext_blend_minmax&&($.min=32775,$.max=32776);var K=n.angle_instanced_arrays,J=n.webgl_draw_buffers,tt={dirty:!0,profile:m.profile},et={},rt=[],it={},ot={};y("dither",3024),y("blend.enable",3042),_("blend.color","blendColor",[0,0,0,0]),_("blend.equation","blendEquationSeparate",[32774,32774]),_("blend.func","blendFuncSeparate",[1,0,1,0]),y("depth.enable",2929,!0),_("depth.func","depthFunc",513),_("depth.range","depthRange",[0,1]),_("depth.mask","depthMask",!0),_("colorMask","colorMask",[!0,!0,!0,!0]),y("cull.enable",2884),_("cull.face","cullFace",1029),_("frontFace","frontFace",2305),_("lineWidth","lineWidth",1),y("polygonOffset.enable",32823),_("polygonOffset.offset","polygonOffset",[0,0]),y("sample.alpha",32926),y("sample.enable",32928),_("sample.coverage","sampleCoverage",[1,!1]),y("stencil.enable",2960),_("stencil.mask","stencilMask",-1),_("stencil.func","stencilFunc",[519,0,-1]),_("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),_("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),y("scissor.enable",3089),_("scissor.box","scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),_("viewport","viewport",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var at={gl:t,context:p,strings:e,next:et,current:tt,draw:h,elements:a,buffer:i,shader:f,attributes:c.state,uniforms:l,framebuffer:u,extensions:n,timer:d,isBufferArgs:C},st={primTypes:nt,compareFuncs:jt,blendFuncs:wt,blendEquations:$,stencilOps:Mt,glTypes:G,orientationType:At};J&&(st.backBuffer=[1029],st.drawBuffer=o(r.maxDrawbuffers,function(t){return 0===t?[0]:o(t,function(t){return 36064+t})}));var ut=0;return{next:et,current:tt,procs:function(){var t=b(),e=t.proc("poll"),n=t.proc("refresh"),i=t.block();e(i),n(i);var a,s=t.shared,u=s.gl,l=s.next,c=s.current;i(c,".dirty=false;"),z(t,e),z(t,n,null,!0),K&&(a=t.link(K));for(var f=0;f<r.maxAttributes;++f){var h=n.def(s.attributes,"[",f,"]"),p=t.cond(h,".buffer");p.then(u,".enableVertexAttribArray(",f,");",u,".bindBuffer(",34962,",",h,".buffer.buffer);",u,".vertexAttribPointer(",f,",",h,".size,",h,".type,",h,".normalized,",h,".stride,",h,".offset);").else(u,".disableVertexAttribArray(",f,");",u,".vertexAttrib4f(",f,",",h,".x,",h,".y,",h,".z,",h,".w);",h,".buffer=null;"),n(p),K&&n(a,".vertexAttribDivisorANGLE(",f,",",h,".divisor);")}return Object.keys(it).forEach(function(r){var o=it[r],a=i.def(l,".",r),s=t.block();s("if(",a,"){",u,".enable(",o,")}else{",u,".disable(",o,")}",c,".",r,"=",a,";"),n(s),e("if(",a,"!==",c,".",r,"){",s,"}")}),Object.keys(ot).forEach(function(r){var a,s,f=ot[r],h=tt[r],p=t.block();p(u,".",f,"("),g(h)?(f=h.length,a=t.global.def(l,".",r),s=t.global.def(c,".",r),p(o(f,function(t){return a+"["+t+"]"}),");",o(f,function(t){return s+"["+t+"]="+a+"["+t+"];"}).join("")),e("if(",o(f,function(t){return a+"["+t+"]!=="+s+"["+t+"]"}).join("||"),"){",p,"}")):(a=i.def(l,".",r),s=i.def(c,".",r),p(a,");",c,".",r,"=",a,";"),e("if(",a,"!==",s,"){",p,"}")),n(p)}),t.compile()}(),compile:function(t,e,n,r,i){var o=b();return o.stats=o.link(i),Object.keys(e.static).forEach(function(t){X(o,e,t)}),xt.forEach(function(e){X(o,t,e)}),n=A(t,e,n,r),function(t,e){var n=t.proc("draw",1);N(t,n),k(t,n,e.context),z(t,n,e.framebuffer),E(t,n,e),S(t,n,e.state),F(t,n,e,!1,!0);var r=e.shader.progVar.append(t,n);if(n(t.shared.gl,".useProgram(",r,".program);"),e.shader.program)Y(t,n,e,e.shader.program);else{var i=t.global.def("{}"),o=n.def(r,".id"),a=n.def(i,"[",o,"]");n(t.cond(a).then(a,".call(this,a0);").else(a,"=",i,"[",o,"]=",t.link(function(n){return H(Y,t,e,n,1)}),"(",r,");",a,".call(this,a0);"))}0<Object.keys(e.state).length&&n(t.shared.current,".dirty=true;")}(o,n),W(o,n),function(t,e){function n(t){return t.contextDep&&i||t.propDep}var r=t.proc("batch",2);t.batchId="0",N(t,r);var i=!1,o=!0;Object.keys(e.context).forEach(function(t){i=i||e.context[t].propDep}),i||(k(t,r,e.context),o=!1);var a=!1;if((s=e.framebuffer)?(s.propDep?i=a=!0:s.contextDep&&i&&(a=!0),a||z(t,r,s)):z(t,r,null),e.state.viewport&&e.state.viewport.propDep&&(i=!0),E(t,r,e),S(t,r,e.state,function(t){return!n(t)}),e.profile&&n(e.profile)||F(t,r,e,!1,"a1"),e.contextDep=i,e.needsContext=o,e.needsFramebuffer=a,(o=e.shader.progVar).contextDep&&i||o.propDep)Z(t,r,e,null);else if(o=o.append(t,r),r(t.shared.gl,".useProgram(",o,".program);"),e.shader.program)Z(t,r,e,e.shader.program);else{var s=t.global.def("{}"),a=r.def(o,".id"),u=r.def(s,"[",a,"]");r(t.cond(u).then(u,".call(this,a0,a1);").else(u,"=",s,"[",a,"]=",t.link(function(n){return H(Z,t,e,n,2)}),"(",o,");",u,".call(this,a0,a1);"))}0<Object.keys(e.state).length&&r(t.shared.current,".dirty=true;")}(o,n),o.compile()}}}function R(t,e){for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}var L=function(t,e){for(var n=Object.keys(e),r=0;r<n.length;++r)t[n[r]]=e[n[r]];return t},q=0,U={DynamicVariable:t,define:function(n,r){return new t(n,e(r+""))},isDynamic:function(e){return"function"==typeof e&&!e._reglType||e instanceof t},unbox:function(e,n){return"function"==typeof e?new t(0,e):e},accessor:e},H={next:"function"==typeof requestAnimationFrame?function(t){return requestAnimationFrame(t)}:function(t){return setTimeout(t,16)},cancel:"function"==typeof cancelAnimationFrame?function(t){return cancelAnimationFrame(t)}:clearTimeout},Y="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date},V=s();V.zero=s();var Z=function(t,e){var n=1;e.ext_texture_filter_anisotropic&&(n=t.getParameter(34047));var r=1,i=1;e.webgl_draw_buffers&&(r=t.getParameter(34852),i=t.getParameter(36063));var o=!!e.oes_texture_float;if(o){o=t.createTexture(),t.bindTexture(3553,o),t.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var a=t.createFramebuffer();if(t.bindFramebuffer(36160,a),t.framebufferTexture2D(36160,36064,3553,o,0),t.bindTexture(3553,null),36053!==t.checkFramebufferStatus(36160))o=!1;else{t.viewport(0,0,1,1),t.clearColor(1,0,0,1),t.clear(16384);var s=V.allocType(5126,4);t.readPixels(0,0,1,1,6408,5126,s),t.getError()?o=!1:(t.deleteFramebuffer(a),t.deleteTexture(o),o=1===s[0]),V.freeType(s)}}return s=!0,s=t.createTexture(),a=V.allocType(5121,36),t.activeTexture(33984),t.bindTexture(34067,s),t.texImage2D(34069,0,6408,3,3,0,6408,5121,a),V.freeType(a),t.bindTexture(34067,null),t.deleteTexture(s),s=!t.getError(),{colorBits:[t.getParameter(3410),t.getParameter(3411),t.getParameter(3412),t.getParameter(3413)],depthBits:t.getParameter(3414),stencilBits:t.getParameter(3415),subpixelBits:t.getParameter(3408),extensions:Object.keys(e).filter(function(t){return!!e[t]}),maxAnisotropic:n,maxDrawbuffers:r,maxColorAttachments:i,pointSizeDims:t.getParameter(33901),lineWidthDims:t.getParameter(33902),maxViewportDims:t.getParameter(3386),maxCombinedTextureUnits:t.getParameter(35661),maxCubeMapSize:t.getParameter(34076),maxRenderbufferSize:t.getParameter(34024),maxTextureUnits:t.getParameter(34930),maxTextureSize:t.getParameter(3379),maxAttributes:t.getParameter(34921),maxVertexUniforms:t.getParameter(36347),maxVertexTextureUnits:t.getParameter(35660),maxVaryingVectors:t.getParameter(36348),maxFragmentUniforms:t.getParameter(36349),glsl:t.getParameter(35724),renderer:t.getParameter(7937),vendor:t.getParameter(7936),version:t.getParameter(7938),readFloat:o,npotTextureCube:s}},W=function(t){return t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Float32Array||t instanceof Float64Array||t instanceof Uint8ClampedArray},X=function(t){return Object.keys(t).map(function(e){return t[e]})},Q={shape:function(t){for(var e=[];t.length;t=t[0])e.push(t.length);return e},flatten:function(t,e,n,r){var i=1;if(e.length)for(var o=0;o<e.length;++o)i*=e[o];else i=0;switch(n=r||V.allocType(n,i),e.length){case 0:break;case 1:for(r=e[0],e=0;e<r;++e)n[e]=t[e];break;case 2:for(r=e[0],e=e[1],o=i=0;o<r;++o)for(var a=t[o],s=0;s<e;++s)n[i++]=a[s];break;case 3:l(t,e[0],e[1],e[2],n,0);break;default:!function t(e,n,r,i,o){for(var a=1,s=r+1;s<n.length;++s)a*=n[s];var u=n[r];if(4==n.length-r){var c=n[r+1],f=n[r+2];for(n=n[r+3],s=0;s<u;++s)l(e[s],c,f,n,i,o),o+=a}else for(s=0;s<u;++s)t(e[s],n,r+1,i,o),o+=a}(t,e,0,n,0)}return n}},$={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},G={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},K={dynamic:35048,stream:35040,static:35044},J=Q.flatten,tt=Q.shape,et=[];et[5120]=1,et[5122]=2,et[5124]=4,et[5121]=1,et[5123]=2,et[5125]=4,et[5126]=4;var nt={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},rt=new Float32Array(1),it=new Uint32Array(rt.buffer),ot=[9984,9986,9985,9987],at=[0,6409,6410,6407,6408],st={};st[6409]=st[6406]=st[6402]=1,st[34041]=st[6410]=2,st[6407]=st[35904]=3,st[6408]=st[35906]=4;var ut=v("HTMLCanvasElement"),lt=v("CanvasRenderingContext2D"),ct=v("ImageBitmap"),ft=v("HTMLImageElement"),ht=v("HTMLVideoElement"),pt=Object.keys($).concat([ut,lt,ct,ft,ht]),dt=[];dt[5121]=1,dt[5126]=4,dt[36193]=2,dt[5123]=2,dt[5125]=4;var mt=[];mt[32854]=2,mt[32855]=2,mt[36194]=2,mt[34041]=4,mt[33776]=.5,mt[33777]=.5,mt[33778]=1,mt[33779]=1,mt[35986]=.5,mt[35987]=1,mt[34798]=1,mt[35840]=.5,mt[35841]=.25,mt[35842]=.5,mt[35843]=.25,mt[36196]=.5;var gt=[];gt[32854]=2,gt[32855]=2,gt[36194]=2,gt[33189]=2,gt[36168]=1,gt[34041]=4,gt[35907]=4,gt[34836]=16,gt[34842]=8,gt[34843]=6;var vt=function(t,e,n,r,i){function o(t){this.id=l++,this.refCount=1,this.renderbuffer=t,this.format=32854,this.height=this.width=0,i.profile&&(this.stats={size:0})}function a(e){var n=e.renderbuffer;t.bindRenderbuffer(36161,null),t.deleteRenderbuffer(n),e.renderbuffer=null,e.refCount=0,delete c[e.id],r.renderbufferCount--}var s={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};e.ext_srgb&&(s.srgba=35907),e.ext_color_buffer_half_float&&(s.rgba16f=34842,s.rgb16f=34843),e.webgl_color_buffer_float&&(s.rgba32f=34836);var u=[];Object.keys(s).forEach(function(t){u[s[t]]=t});var l=0,c={};return o.prototype.decRef=function(){0>=--this.refCount&&a(this)},i.profile&&(r.getTotalRenderbufferSize=function(){var t=0;return Object.keys(c).forEach(function(e){t+=c[e].stats.size}),t}),{create:function(e,n){function a(e,n){var r=0,o=0,c=32854;if("object"==typeof e&&e?("shape"in e?(o=e.shape,r=0|o[0],o=0|o[1]):("radius"in e&&(r=o=0|e.radius),"width"in e&&(r=0|e.width),"height"in e&&(o=0|e.height)),"format"in e&&(c=s[e.format])):"number"==typeof e?(r=0|e,o="number"==typeof n?0|n:r):e||(r=o=1),r!==l.width||o!==l.height||c!==l.format)return a.width=l.width=r,a.height=l.height=o,l.format=c,t.bindRenderbuffer(36161,l.renderbuffer),t.renderbufferStorage(36161,c,r,o),i.profile&&(l.stats.size=gt[l.format]*l.width*l.height),a.format=u[l.format],a}var l=new o(t.createRenderbuffer());return c[l.id]=l,r.renderbufferCount++,a(e,n),a.resize=function(e,n){var r=0|e,o=0|n||r;return r===l.width&&o===l.height?a:(a.width=l.width=r,a.height=l.height=o,t.bindRenderbuffer(36161,l.renderbuffer),t.renderbufferStorage(36161,l.format,r,o),i.profile&&(l.stats.size=gt[l.format]*l.width*l.height),a)},a._reglType="renderbuffer",a._renderbuffer=l,i.profile&&(a.stats=l.stats),a.destroy=function(){l.decRef()},a},clear:function(){X(c).forEach(a)},restore:function(){X(c).forEach(function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)}),t.bindRenderbuffer(36161,null)}}},yt=[];yt[6408]=4,yt[6407]=3;var _t=[];_t[5121]=1,_t[5126]=4,_t[36193]=2;var bt=["x","y","z","w"],xt="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),wt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},jt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Mt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},At={cw:2304,ccw:2305},kt=new P(!1,!1,!1,function(){});return function(t){function e(){if(0===Q.length)w&&w.update(),J=null;else{J=H.next(e),f();for(var t=Q.length-1;0<=t;--t){var n=Q[t];n&&n(T,null,0)}g.flush(),w&&w.update()}}function n(){!J&&0<Q.length&&(J=H.next(e))}function r(){J&&(H.cancel(e),J=null)}function o(t){t.preventDefault(),r(),$.forEach(function(t){t()})}function a(t){g.getError(),y.restore(),I.restore(),O.restore(),B.restore(),D.restore(),q.restore(),w&&w.restore(),V.procs.refresh(),n(),G.forEach(function(t){t()})}function s(t){function e(t){var e={},n={};return Object.keys(t).forEach(function(r){var i=t[r];U.isDynamic(i)?n[r]=U.unbox(i,r):e[r]=i}),{dynamic:n,static:e}}var n=e(t.context||{}),r=e(t.uniforms||{}),i=e(t.attributes||{}),o=e(function(t){function e(t){if(t in n){var e=n[t];delete n[t],Object.keys(e).forEach(function(r){n[t+"."+r]=e[r]})}}var n=L({},t);return delete n.uniforms,delete n.attributes,delete n.context,"stencil"in n&&n.stencil.op&&(n.stencil.opBack=n.stencil.opFront=n.stencil.op,delete n.stencil.op),e("blend"),e("depth"),e("cull"),e("stencil"),e("polygonOffset"),e("scissor"),e("sample"),n}(t));t={gpuTime:0,cpuTime:0,count:0};var n=V.compile(o,i,r,n,t),a=n.draw,s=n.batch,u=n.scope,l=[];return L(function(t,e){var n;if("function"==typeof t)return u.call(this,null,t,0);if("function"==typeof e)if("number"==typeof t)for(n=0;n<t;++n)u.call(this,null,e,n);else{if(!Array.isArray(t))return u.call(this,t,e,0);for(n=0;n<t.length;++n)u.call(this,t[n],e,n)}else if("number"==typeof t){if(0<t)return s.call(this,function(t){for(;l.length<t;)l.push(null);return l}(0|t),0|t)}else{if(!Array.isArray(t))return a.call(this,t);if(t.length)return s.call(this,t,t.length)}},{stats:t})}function u(t,e){var n=0;V.procs.poll();var r=e.color;r&&(g.clearColor(+r[0]||0,+r[1]||0,+r[2]||0,+r[3]||0),n|=16384),"depth"in e&&(g.clearDepth(+e.depth),n|=256),"stencil"in e&&(g.clearStencil(0|e.stencil),n|=1024),g.clear(n)}function l(t){return Q.push(t),n(),{cancel:function(){var e=R(Q,t);Q[e]=function t(){var e=R(Q,t);Q[e]=Q[Q.length-1],--Q.length,0>=Q.length&&r()}}}}function c(){var t=W.viewport,e=W.scissor_box;t[0]=t[1]=e[0]=e[1]=0,T.viewportWidth=T.framebufferWidth=T.drawingBufferWidth=t[2]=e[2]=g.drawingBufferWidth,T.viewportHeight=T.framebufferHeight=T.drawingBufferHeight=t[3]=e[3]=g.drawingBufferHeight}function f(){T.tick+=1,T.time=m(),c(),V.procs.poll()}function h(){c(),V.procs.refresh(),w&&w.update()}function m(){return(Y()-j)/1e3}if(!(t=i(t)))return null;var g=t.gl,v=g.getContextAttributes();g.isContextLost();var y=function(t,e){function n(e){var n;e=e.toLowerCase();try{n=r[e]=t.getExtension(e)}catch(t){}return!!n}for(var r={},i=0;i<e.extensions.length;++i){var o=e.extensions[i];if(!n(o))return e.onDestroy(),e.onDone('"'+o+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return e.optionalExtensions.forEach(n),{extensions:r,restore:function(){Object.keys(r).forEach(function(t){if(!n(t))throw Error("(regl): error restoring extension "+t)})}}}(g,t);if(!y)return null;var _=function(){var t={"":0},e=[""];return{id:function(n){var r=t[n];return r||(r=t[n]=e.length,e.push(n),r)},str:function(t){return e[t]}}}(),b={bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},x=y.extensions,w=function(t,e){function n(t,e,n){var r=a.pop()||new function(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null};r.startQueryIndex=t,r.endQueryIndex=e,r.sum=0,r.stats=n,s.push(r)}var r=e.ext_disjoint_timer_query;if(!r)return null;var i=[],o=[],a=[],s=[],u=[],l=[];return{beginQuery:function(t){var e=i.pop()||r.createQueryEXT();r.beginQueryEXT(35007,e),o.push(e),n(o.length-1,o.length,t)},endQuery:function(){r.endQueryEXT(35007)},pushScopeStats:n,update:function(){var t,e;if(0!==(t=o.length)){l.length=Math.max(l.length,t+1),u.length=Math.max(u.length,t+1),u[0]=0;var n=l[0]=0;for(e=t=0;e<o.length;++e){var c=o[e];r.getQueryObjectEXT(c,34919)?(n+=r.getQueryObjectEXT(c,34918),i.push(c)):o[t++]=c,u[e+1]=n,l[e+1]=t}for(o.length=t,e=t=0;e<s.length;++e){var n=s[e],f=n.startQueryIndex,c=n.endQueryIndex;n.sum+=u[c]-u[f],f=l[f],(c=l[c])===f?(n.stats.gpuTime+=n.sum/1e6,a.push(n)):(n.startQueryIndex=f,n.endQueryIndex=c,s[t++]=n)}s.length=t}},getNumPendingQueries:function(){return o.length},clear:function(){i.push.apply(i,o);for(var t=0;t<i.length;t++)r.deleteQueryEXT(i[t]);o.length=0,i.length=0},restore:function(){o.length=0,i.length=0}}}(0,x),j=Y(),S=g.drawingBufferWidth,N=g.drawingBufferHeight,T={tick:0,time:0,viewportWidth:S,viewportHeight:N,framebufferWidth:S,framebufferHeight:N,drawingBufferWidth:S,drawingBufferHeight:N,pixelRatio:t.pixelRatio},C=Z(g,x),S=function(t,e,n,r){for(t=n.maxAttributes,e=Array(t),n=0;n<t;++n)e[n]=new k;return{Record:k,scope:{},state:e}}(g,x,C),O=p(g,b,t,S),P=d(g,x,O,b),I=z(g,_,b,t),B=M(g,x,C,function(){V.procs.poll()},T,b,t),D=vt(g,x,0,b,t),q=A(g,x,C,B,D,b),V=F(g,_,x,C,O,P,0,q,{},S,I,{elements:null,primitive:4,count:-1,offset:0,instances:-1},T,w,t),_=E(g,q,V.procs.poll,T),W=V.next,X=g.canvas,Q=[],$=[],G=[],K=[t.onDestroy],J=null;X&&(X.addEventListener("webglcontextlost",o,!1),X.addEventListener("webglcontextrestored",a,!1));var tt=q.setFBO=s({framebuffer:U.define.call(null,1,"framebuffer")});return h(),v=L(s,{clear:function(t){if("framebuffer"in t)if(t.framebuffer&&"framebufferCube"===t.framebuffer_reglType)for(var e=0;6>e;++e)tt(L({framebuffer:t.framebuffer.faces[e]},t),u);else tt(t,u);else u(0,t)},prop:U.define.bind(null,1),context:U.define.bind(null,2),this:U.define.bind(null,3),draw:s({}),buffer:function(t){return O.create(t,34962,!1,!1)},elements:function(t){return P.create(t,!1)},texture:B.create2D,cube:B.createCube,renderbuffer:D.create,framebuffer:q.create,framebufferCube:q.createCube,attributes:v,frame:l,on:function(t,e){var n;switch(t){case"frame":return l(e);case"lost":n=$;break;case"restore":n=G;break;case"destroy":n=K}return n.push(e),{cancel:function(){for(var t=0;t<n.length;++t)if(n[t]===e){n[t]=n[n.length-1],n.pop();break}}}},limits:C,hasExtension:function(t){return 0<=C.extensions.indexOf(t.toLowerCase())},read:_,destroy:function(){Q.length=0,r(),X&&(X.removeEventListener("webglcontextlost",o),X.removeEventListener("webglcontextrestored",a)),I.clear(),q.clear(),D.clear(),B.clear(),P.clear(),O.clear(),w&&w.clear(),K.forEach(function(t){t()})},_gl:g,_refresh:h,poll:function(){f(),w&&w.update()},now:m,stats:b}),t.onDone(null,v),v}}()},"./node_modules/robust-in-sphere/in-sphere.js":
/*!****************************************************!*\
  !*** ./node_modules/robust-in-sphere/in-sphere.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! two-product */"./node_modules/two-product/two-product.js"),i=n(/*! robust-sum */"./node_modules/robust-sum/robust-sum.js"),o=n(/*! robust-subtract */"./node_modules/robust-subtract/robust-diff.js"),a=n(/*! robust-scale */"./node_modules/robust-scale/robust-scale.js"),s=6;function u(t,e){for(var n=new Array(t.length-1),r=1;r<t.length;++r)for(var i=n[r-1]=new Array(t.length-1),o=0,a=0;o<t.length;++o)o!==e&&(i[a++]=t[r][o]);return n}function l(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var e=t.length>>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var n=t.split("[");return["w",e.substr(1),"m",n[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return c(e,t)}function f(t){return!0&t?"-":""}function h(t){if(2===t.length)return[["diff(",c(t[0][0],t[1][1]),",",c(t[1][0],t[0][1]),")"].join("")];for(var e=[],n=0;n<t.length;++n)e.push(["scale(",l(h(u(t,n))),",",f(n),t[0][n],")"].join(""));return e}function p(t,e){for(var n=[],r=0;r<e-2;++r)n.push(["prod(m",t,"[",r,"],m",t,"[",r,"])"].join(""));return l(n)}function d(t){for(var e=[],n=[],s=function(t){for(var e=new Array(t),n=0;n<t;++n){e[n]=new Array(t);for(var r=0;r<t;++r)e[n][r]=["m",r,"[",t-n-2,"]"].join("")}return e}(t),c=0;c<t;++c)s[0][c]="1",s[t-1][c]="w"+c;for(c=0;c<t;++c)0==(1&c)?e.push.apply(e,h(u(s,c))):n.push.apply(n,h(u(s,c)));var f=l(e),d=l(n),m="exactInSphere"+t,g=[];for(c=0;c<t;++c)g.push("m"+c);var v=["function ",m,"(",g.join(),"){"];for(c=0;c<t;++c){v.push("var w",c,"=",p(c,t),";");for(var y=0;y<t;++y)y!==c&&v.push("var w",c,"m",y,"=scale(w",c,",m",y,"[0]);")}return v.push("var p=",f,",n=",d,",d=diff(p,n);return d[d.length-1];}return ",m),new Function("sum","diff","prod","scale",v.join(""))(i,o,r,a)}var m=[function(){return 0},function(){return 0},function(){return 0}];!function(){for(;m.length<=s;)m.push(d(m.length));for(var e=[],n=["slow"],r=0;r<=s;++r)e.push("a"+r),n.push("o"+r);var i=["function testInSphere(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=s;++r)i.push("case ",r,":return o",r,"(",e.slice(0,r).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return testInSphere"),n.push(i.join(""));var o=Function.apply(void 0,n);for(t.exports=o.apply(void 0,[function(t){var e=m[t.length];return e||(e=m[t.length]=d(t.length)),e.apply(void 0,t)}].concat(m)),r=0;r<=s;++r)t.exports[r]=m[r]}()},"./node_modules/robust-orientation/orientation.js":
/*!********************************************************!*\
  !*** ./node_modules/robust-orientation/orientation.js ***!
  \********************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! two-product */"./node_modules/two-product/two-product.js"),i=n(/*! robust-sum */"./node_modules/robust-sum/robust-sum.js"),o=n(/*! robust-scale */"./node_modules/robust-scale/robust-scale.js"),a=n(/*! robust-subtract */"./node_modules/robust-subtract/robust-diff.js"),s=5;function u(t,e){for(var n=new Array(t.length-1),r=1;r<t.length;++r)for(var i=n[r-1]=new Array(t.length-1),o=0,a=0;o<t.length;++o)o!==e&&(i[a++]=t[r][o]);return n}function l(t){return 1&t?"-":""}function c(t){if(1===t.length)return t[0];if(2===t.length)return["sum(",t[0],",",t[1],")"].join("");var e=t.length>>1;return["sum(",c(t.slice(0,e)),",",c(t.slice(e)),")"].join("")}function f(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],n=0;n<t.length;++n)e.push(["scale(",c(f(u(t,n))),",",l(n),t[0][n],")"].join(""));return e}function h(t){for(var e=[],n=[],s=function(t){for(var e=new Array(t),n=0;n<t;++n){e[n]=new Array(t);for(var r=0;r<t;++r)e[n][r]=["m",r,"[",t-n-1,"]"].join("")}return e}(t),l=[],h=0;h<t;++h)0==(1&h)?e.push.apply(e,f(u(s,h))):n.push.apply(n,f(u(s,h))),l.push("m"+h);var p=c(e),d=c(n),m="orientation"+t+"Exact",g=["function ",m,"(",l.join(),"){var p=",p,",n=",d,",d=sub(p,n);return d[d.length-1];};return ",m].join("");return new Function("sum","prod","scale","sub",g)(i,r,o,a)}var p=h(3),d=h(4),m=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,n){var r,i=(t[1]-n[1])*(e[0]-n[0]),o=(t[0]-n[0])*(e[1]-n[1]),a=i-o;if(i>0){if(o<=0)return a;r=i+o}else{if(!(i<0))return a;if(o>=0)return a;r=-(i+o)}var s=3.3306690738754716e-16*r;return a>=s||a<=-s?a:p(t,e,n)},function(t,e,n,r){var i=t[0]-r[0],o=e[0]-r[0],a=n[0]-r[0],s=t[1]-r[1],u=e[1]-r[1],l=n[1]-r[1],c=t[2]-r[2],f=e[2]-r[2],h=n[2]-r[2],p=o*l,m=a*u,g=a*s,v=i*l,y=i*u,_=o*s,b=c*(p-m)+f*(g-v)+h*(y-_),x=7.771561172376103e-16*((Math.abs(p)+Math.abs(m))*Math.abs(c)+(Math.abs(g)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(_))*Math.abs(h));return b>x||-b>x?b:d(t,e,n,r)}];!function(){for(;m.length<=s;)m.push(h(m.length));for(var e=[],n=["slow"],r=0;r<=s;++r)e.push("a"+r),n.push("o"+r);var i=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=s;++r)i.push("case ",r,":return o",r,"(",e.slice(0,r).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),n.push(i.join(""));var o=Function.apply(void 0,n);for(t.exports=o.apply(void 0,[function(t){var e=m[t.length];return e||(e=m[t.length]=h(t.length)),e.apply(void 0,t)}].concat(m)),r=0;r<=s;++r)t.exports[r]=m[r]}()},"./node_modules/robust-product/product.js":
/*!************************************************!*\
  !*** ./node_modules/robust-product/product.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! robust-sum */"./node_modules/robust-sum/robust-sum.js"),i=n(/*! robust-scale */"./node_modules/robust-scale/robust-scale.js");t.exports=function(t,e){if(1===t.length)return i(e,t[0]);if(1===e.length)return i(t,e[0]);if(0===t.length||0===e.length)return[0];var n=[0];if(t.length<e.length)for(var o=0;o<t.length;++o)n=r(n,i(e,t[o]));else for(var o=0;o<e.length;++o)n=r(n,i(t,e[o]));return n}},"./node_modules/robust-scale/robust-scale.js":
/*!***************************************************!*\
  !*** ./node_modules/robust-scale/robust-scale.js ***!
  \***************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r=n(/*! two-product */"./node_modules/two-product/two-product.js"),i=n(/*! two-sum */"./node_modules/two-sum/two-sum.js");t.exports=function(t,e){var n=t.length;if(1===n){var o=r(t[0],e);return o[0]?o:[o[1]]}var a=new Array(2*n),s=[.1,.1],u=[.1,.1],l=0;r(t[0],e,s),s[0]&&(a[l++]=s[0]);for(var c=1;c<n;++c){r(t[c],e,u);var f=s[1];i(f,u[0],s),s[0]&&(a[l++]=s[0]);var h=u[1],p=s[1],d=h+p,m=d-h,g=p-m;s[1]=d,g&&(a[l++]=g)}s[1]&&(a[l++]=s[1]);0===l&&(a[l++]=0);return a.length=l,a}},"./node_modules/robust-segment-intersect/segseg.js":
/*!*********************************************************!*\
  !*** ./node_modules/robust-segment-intersect/segseg.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n,i){var o=r(t,n,i),a=r(e,n,i);if(o>0&&a>0||o<0&&a<0)return!1;var s=r(n,t,e),u=r(i,t,e);if(s>0&&u>0||s<0&&u<0)return!1;if(0===o&&0===a&&0===s&&0===u)return function(t,e,n,r){for(var i=0;i<2;++i){var o=t[i],a=e[i],s=Math.min(o,a),u=Math.max(o,a),l=n[i],c=r[i],f=Math.min(l,c),h=Math.max(l,c);if(h<s||u<f)return!1}return!0}(t,e,n,i);return!0};var r=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js")[3]},"./node_modules/robust-subtract/robust-diff.js":
/*!*****************************************************!*\
  !*** ./node_modules/robust-subtract/robust-diff.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);if(i)return[i,n];return[n]}(t[0],-e[0]);var i,o,a=new Array(n+r),s=0,u=0,l=0,c=Math.abs,f=t[u],h=c(f),p=-e[l],d=c(p);h<d?(o=f,(u+=1)<n&&(f=t[u],h=c(f))):(o=p,(l+=1)<r&&(p=-e[l],d=c(p)));u<n&&h<d||l>=r?(i=f,(u+=1)<n&&(f=t[u],h=c(f))):(i=p,(l+=1)<r&&(p=-e[l],d=c(p)));var m,g,v=i+o,y=v-i,_=o-y,b=_,x=v;for(;u<n&&l<r;)h<d?(i=f,(u+=1)<n&&(f=t[u],h=c(f))):(i=p,(l+=1)<r&&(p=-e[l],d=c(p))),(_=(o=b)-(y=(v=i+o)-i))&&(a[s++]=_),b=x-((m=x+v)-(g=m-x))+(v-g),x=m;for(;u<n;)(_=(o=b)-(y=(v=(i=f)+o)-i))&&(a[s++]=_),b=x-((m=x+v)-(g=m-x))+(v-g),x=m,(u+=1)<n&&(f=t[u]);for(;l<r;)(_=(o=b)-(y=(v=(i=p)+o)-i))&&(a[s++]=_),b=x-((m=x+v)-(g=m-x))+(v-g),x=m,(l+=1)<r&&(p=-e[l]);b&&(a[s++]=b);x&&(a[s++]=x);s||(a[s++]=0);return a.length=s,a}},"./node_modules/robust-sum/robust-sum.js":
/*!***********************************************!*\
  !*** ./node_modules/robust-sum/robust-sum.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);if(i)return[i,n];return[n]}(t[0],e[0]);var i,o,a=new Array(n+r),s=0,u=0,l=0,c=Math.abs,f=t[u],h=c(f),p=e[l],d=c(p);h<d?(o=f,(u+=1)<n&&(f=t[u],h=c(f))):(o=p,(l+=1)<r&&(p=e[l],d=c(p)));u<n&&h<d||l>=r?(i=f,(u+=1)<n&&(f=t[u],h=c(f))):(i=p,(l+=1)<r&&(p=e[l],d=c(p)));var m,g,v=i+o,y=v-i,_=o-y,b=_,x=v;for(;u<n&&l<r;)h<d?(i=f,(u+=1)<n&&(f=t[u],h=c(f))):(i=p,(l+=1)<r&&(p=e[l],d=c(p))),(_=(o=b)-(y=(v=i+o)-i))&&(a[s++]=_),b=x-((m=x+v)-(g=m-x))+(v-g),x=m;for(;u<n;)(_=(o=b)-(y=(v=(i=f)+o)-i))&&(a[s++]=_),b=x-((m=x+v)-(g=m-x))+(v-g),x=m,(u+=1)<n&&(f=t[u]);for(;l<r;)(_=(o=b)-(y=(v=(i=p)+o)-i))&&(a[s++]=_),b=x-((m=x+v)-(g=m-x))+(v-g),x=m,(l+=1)<r&&(p=e[l]);b&&(a[s++]=b);x&&(a[s++]=x);s||(a[s++]=0);return a.length=s,a}},"./node_modules/simplicial-complex/node_modules/bit-twiddle/twiddle.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/simplicial-complex/node_modules/bit-twiddle/twiddle.js ***!
  \*****************************************************************************/
/*! no static exports found */function(t,e,n){"use strict";"use restrict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t<e)},e.max=function(t,e){return t^(t^e)&-(t<e)},e.isPow2=function(t){return!(t&t-1||!t)},e.log2=function(t){var e,n;return e=(t>65535)<<4,e|=n=((t>>>=e)>255)<<3,e|=n=((t>>>=n)>15)<<2,(e|=n=((t>>>=n)>3)<<1)|(t>>>=n)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),e.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,n){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},"./node_modules/simplicial-complex/node_modules/union-find/index.js":
/*!**************************************************************************!*\
  !*** ./node_modules/simplicial-complex/node_modules/union-find/index.js ***!
  \**************************************************************************/
/*! no static exports found */function(t,e,n){"use strict";"use restrict";function r(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}t.exports=r,r.prototype.length=function(){return this.roots.length},r.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},r.prototype.find=function(t){for(var e=this.roots;e[t]!==t;){var n=e[t];e[t]=e[n],t=n}return t},r.prototype.link=function(t,e){var n=this.find(t),r=this.find(e);if(n!==r){var i=this.ranks,o=this.roots,a=i[n],s=i[r];a<s?o[n]=r:s<a?o[r]=n:(o[r]=n,++i[n])}}},"./node_modules/simplicial-complex/topology.js":
/*!*****************************************************!*\
  !*** ./node_modules/simplicial-complex/topology.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){"use strict";"use restrict";var r=n(/*! bit-twiddle */"./node_modules/simplicial-complex/node_modules/bit-twiddle/twiddle.js"),i=n(/*! union-find */"./node_modules/simplicial-complex/node_modules/union-find/index.js");function o(t,e){var n=t.length,r=t.length-e.length,i=Math.min;if(r)return r;switch(n){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var o=t[0]+t[1],a=e[0]+e[1];if(s=o+t[2]-(a+e[2]))return s;var s,u=i(t[0],t[1]),l=i(e[0],e[1]);return(s=i(u,t[2])-i(l,e[2]))||i(u+t[2],o)-i(l+e[2],a);default:var c=t.slice(0);c.sort();var f=e.slice(0);f.sort();for(var h=0;h<n;++h)if(r=c[h]-f[h])return r;return 0}}function a(t,e){return o(t[0],e[0])}function s(t,e){if(e){for(var n=t.length,r=new Array(n),i=0;i<n;++i)r[i]=[t[i],e[i]];r.sort(a);for(i=0;i<n;++i)t[i]=r[i][0],e[i]=r[i][1];return t}return t.sort(o),t}function u(t){if(0===t.length)return[];for(var e=1,n=t.length,r=1;r<n;++r){var i=t[r];if(o(i,t[r-1])){if(r===e){e++;continue}t[e++]=i}}return t.length=e,t}function l(t,e){for(var n=0,r=t.length-1,i=-1;n<=r;){var a=n+r>>1,s=o(t[a],e);s<=0?(0===s&&(i=a),n=a+1):s>0&&(r=a-1)}return i}function c(t,e){for(var n=new Array(t.length),i=0,a=n.length;i<a;++i)n[i]=[];for(var s=[],u=(i=0,e.length);i<u;++i)for(var c=e[i],f=c.length,h=1,p=1<<f;h<p;++h){s.length=r.popCount(h);for(var d=0,m=0;m<f;++m)h&1<<m&&(s[d++]=c[m]);var g=l(t,s);if(!(g<0))for(;n[g++].push(i),!(g>=t.length||0!==o(t[g],s)););}return n}function f(t,e){if(e<0)return[];for(var n=[],i=(1<<e+1)-1,o=0;o<t.length;++o)for(var a=t[o],u=i;u<1<<a.length;u=r.nextCombination(u)){for(var l=new Array(e+1),c=0,f=0;f<a.length;++f)u&1<<f&&(l[c++]=a[f]);n.push(l)}return s(n)}e.dimension=function(t){for(var e=0,n=Math.max,r=0,i=t.length;r<i;++r)e=n(e,t[r].length);return e-1},e.countVertices=function(t){for(var e=-1,n=Math.max,r=0,i=t.length;r<i;++r)for(var o=t[r],a=0,s=o.length;a<s;++a)e=n(e,o[a]);return e+1},e.cloneCells=function(t){for(var e=new Array(t.length),n=0,r=t.length;n<r;++n)e[n]=t[n].slice(0);return e},e.compareCells=o,e.normalize=s,e.unique=u,e.findCell=l,e.incidence=c,e.dual=function(t,e){if(!e)return c(u(f(t,0)),t);for(var n=new Array(e),r=0;r<e;++r)n[r]=[];r=0;for(var i=t.length;r<i;++r)for(var o=t[r],a=0,s=o.length;a<s;++a)n[o[a]].push(r);return n},e.explode=function(t){for(var e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0|i.length,a=1,u=1<<o;a<u;++a){for(var l=[],c=0;c<o;++c)a>>>c&1&&l.push(i[c]);e.push(l)}return s(e)},e.skeleton=f,e.boundary=function(t){for(var e=[],n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length;o<a;++o){for(var u=new Array(i.length-1),l=0,c=0;l<a;++l)l!==o&&(u[c++]=i[l]);e.push(u)}return s(e)},e.connectedComponents=function(t,e){return e?function(t,e){for(var n=new i(e),r=0;r<t.length;++r)for(var o=t[r],a=0;a<o.length;++a)for(var s=a+1;s<o.length;++s)n.link(o[a],o[s]);var u=[],l=n.ranks;for(r=0;r<l.length;++r)l[r]=-1;for(r=0;r<t.length;++r){var c=n.find(t[r][0]);l[c]<0?(l[c]=u.length,u.push([t[r].slice(0)])):u[l[c]].push(t[r].slice(0))}return u}(t,e):function(t){for(var e=u(s(f(t,0))),n=new i(e.length),r=0;r<t.length;++r)for(var o=t[r],a=0;a<o.length;++a)for(var c=l(e,[o[a]]),h=a+1;h<o.length;++h)n.link(c,l(e,[o[h]]));var p=[],d=n.ranks;for(r=0;r<d.length;++r)d[r]=-1;for(r=0;r<t.length;++r){var m=n.find(l(e,[t[r][0]]));d[m]<0?(d[m]=p.length,p.push([t[r].slice(0)])):p[d[m]].push(t[r].slice(0))}return p}(t)}},"./node_modules/simplify-planar-graph/simplify.js":
/*!********************************************************!*\
  !*** ./node_modules/simplify-planar-graph/simplify.js ***!
  \********************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){for(var o=e.length,a=t.length,s=new Array(o),u=new Array(o),l=new Array(o),c=new Array(o),f=0;f<o;++f)s[f]=u[f]=-1,l[f]=1/0,c[f]=!1;for(var f=0;f<a;++f){var h=t[f];if(2!==h.length)throw new Error("Input must be a graph");var p=h[1],d=h[0];-1!==u[d]?u[d]=-2:u[d]=p,-1!==s[p]?s[p]=-2:s[p]=d}function m(t){if(c[t])return 1/0;var n=s[t],i=u[t];return n<0||i<0?1/0:function(t,e,n){var i=Math.abs(r(t,e,n)),o=Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2));return i/o}(e[t],e[n],e[i])}function g(t,e){var n=M[t],r=M[e];M[t]=r,M[e]=n,A[n]=e,A[r]=t}function v(t){return l[M[t]]}function y(t){return 1&t?t-1>>1:(t>>1)-1}function _(t){for(var e=v(t);;){var n=e,r=2*t+1,i=2*(t+1),o=t;if(r<z){var a=v(r);a<n&&(o=r,n=a)}if(i<z){var s=v(i);s<n&&(o=i)}if(o===t)return t;g(t,o),t=o}}function b(t){for(var e=v(t);t>0;){var n=y(t);if(n>=0){var r=v(n);if(e<r){g(t,n),t=n;continue}}return t}}function x(){if(z>0){var t=M[0];return g(0,z-1),z-=1,_(0),t}return-1}function w(t,e){var n=M[t];return l[n]===e?t:(l[n]=-1/0,b(t),x(),l[n]=e,b((z+=1)-1))}function j(t){if(!c[t]){c[t]=!0;var e=s[t],n=u[t];s[n]>=0&&(s[n]=e),u[e]>=0&&(u[e]=n),A[e]>=0&&w(A[e],m(e)),A[n]>=0&&w(A[n],m(n))}}for(var M=[],A=new Array(o),f=0;f<o;++f){var k=l[f]=m(f);k<1/0?(A[f]=M.length,M.push(f)):A[f]=-1}for(var z=M.length,f=z>>1;f>=0;--f)_(f);for(;;){var E=x();if(E<0||l[E]>n)break;j(E)}for(var S=[],f=0;f<o;++f)c[f]||(A[f]=S.length,S.push(e[f].slice()));S.length;function N(t,e){if(t[e]<0)return e;var n=e,r=e;do{var i=t[r];if(!c[r]||i<0||i===r)break;if(i=t[r=i],!c[r]||i<0||i===r)break;r=i,n=t[n]}while(n!==r);for(var o=e;o!==r;o=t[o])t[o]=r;return r}var T=[];return t.forEach(function(t){var e=N(s,t[0]),n=N(u,t[1]);if(e>=0&&n>=0&&e!==n){var r=A[e],i=A[n];r!==i&&T.push([r,i])}}),i.unique(i.normalize(T)),{positions:S,edges:T}};var r=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js"),i=n(/*! simplicial-complex */"./node_modules/simplicial-complex/topology.js")},"./node_modules/slab-decomposition/lib/order-segments.js":
/*!***************************************************************!*\
  !*** ./node_modules/slab-decomposition/lib/order-segments.js ***!
  \***************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n,o,a,s;if(e[0][0]<e[1][0])n=e[0],o=e[1];else{if(!(e[0][0]>e[1][0]))return i(e,t);n=e[1],o=e[0]}if(t[0][0]<t[1][0])a=t[0],s=t[1];else{if(!(t[0][0]>t[1][0]))return-i(t,e);a=t[1],s=t[0]}var u=r(n,o,s),l=r(n,o,a);if(u<0){if(l<=0)return u}else if(u>0){if(l>=0)return u}else if(l)return l;if(u=r(s,a,o),l=r(s,a,n),u<0){if(l<=0)return u}else if(u>0){if(l>=0)return u}else if(l)return l;return o[0]-s[0]};var r=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js");function i(t,e){var n,i,o,a;if(e[0][0]<e[1][0])n=e[0],i=e[1];else{if(!(e[0][0]>e[1][0])){var s=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]),l=Math.min(e[0][1],e[1][1]),c=Math.max(e[0][1],e[1][1]);return u<l?u-l:s>c?s-c:u-c}n=e[1],i=e[0]}t[0][1]<t[1][1]?(o=t[0],a=t[1]):(o=t[1],a=t[0]);var f=r(i,n,o);return f||((f=r(i,n,a))||a-i)}},"./node_modules/slab-decomposition/node_modules/binary-search-bounds/search-bounds.js":
/*!********************************************************************************************!*\
  !*** ./node_modules/slab-decomposition/node_modules/binary-search-bounds/search-bounds.js ***!
  \********************************************************************************************/
/*! no static exports found */function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=["function ",t,"(a,l,h,",r.join(","),"){",o?"":"var i=",n?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return o?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),n?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),o?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,n,i){return new Function([r("A","x"+t+"y",e,["y"],!1,i),r("B","x"+t+"y",e,["y"],!0,i),r("P","c(x,y)"+t+"0",e,["y","c"],!1,i),r("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",n,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",n].join(""))()}t.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},"./node_modules/slab-decomposition/slabs.js":
/*!**************************************************!*\
  !*** ./node_modules/slab-decomposition/slabs.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){for(var e=t.length,n=2*e,r=new Array(n),o=0;o<e;++o){var u=t[o],l=u[0][0]<u[1][0];r[2*o]=new f(u[0][0],u,l,o),r[2*o+1]=new f(u[1][0],u,!l,o)}r.sort(function(t,e){var n=t.x-e.x;return n||((n=t.create-e.create)||Math.min(t.segment[0][1],t.segment[1][1])-Math.min(e.segment[0][1],e.segment[1][1]))});for(var h=i(a),p=[],d=[],m=[],o=0;o<n;){for(var g=r[o].x,v=[];o<n;){var y=r[o];if(y.x!==g)break;o+=1,y.segment[0][0]===y.x&&y.segment[1][0]===y.x?y.create&&(y.segment[0][1]<y.segment[1][1]?(v.push(new c(y.segment[0][1],y.index,!0,!0)),v.push(new c(y.segment[1][1],y.index,!1,!1))):(v.push(new c(y.segment[1][1],y.index,!0,!1)),v.push(new c(y.segment[0][1],y.index,!1,!0)))):h=y.create?h.insert(y.segment,y.index):h.remove(y.segment)}p.push(h.root),d.push(g),m.push(v)}return new s(p,d,m)};var r=n(/*! binary-search-bounds */"./node_modules/slab-decomposition/node_modules/binary-search-bounds/search-bounds.js"),i=n(/*! functional-red-black-tree */"./node_modules/functional-red-black-tree/rbtree.js"),o=n(/*! robust-orientation */"./node_modules/robust-orientation/orientation.js"),a=n(/*! ./lib/order-segments */"./node_modules/slab-decomposition/lib/order-segments.js");function s(t,e,n){this.slabs=t,this.coordinates=e,this.horizontal=n}function u(t,e){return t.y-e}function l(t,e){for(var n=null;t;){var r,i,a=t.key;a[0][0]<a[1][0]?(r=a[0],i=a[1]):(r=a[1],i=a[0]);var s=o(r,i,e);if(s<0)t=t.left;else if(s>0)if(e[0]!==a[1][0])n=t,t=t.right;else{if(u=l(t.right,e))return u;t=t.left}else{if(e[0]!==a[1][0])return t;var u;if(u=l(t.right,e))return u;t=t.left}}return n}function c(t,e,n,r){this.y=t,this.index=e,this.start=n,this.closed=r}function f(t,e,n,r){this.x=t,this.segment=e,this.create=n,this.index=r}s.prototype.castUp=function(t){var e=r.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var n=l(this.slabs[e],t),i=-1;if(n&&(i=n.value),this.coordinates[e]===t[0]){var s=null;if(n&&(s=n.key),e>0){var c=l(this.slabs[e-1],t);c&&(s?a(c.key,s)>0&&(s=c.key,i=c.value):(i=c.value,s=c.key))}var f=this.horizontal[e];if(f.length>0){var h=r.ge(f,t[1],u);if(h<f.length){var p=f[h];if(t[1]===p.y){if(p.closed)return p.index;for(;h<f.length-1&&f[h+1].y===t[1];)if((p=f[h+=1]).closed)return p.index;if(p.y===t[1]&&!p.start){if((h+=1)>=f.length)return i;p=f[h]}}if(p.start)if(s){var d=o(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},"./node_modules/surface-nets/surfacenets.js":
/*!**************************************************!*\
  !*** ./node_modules/surface-nets/surfacenets.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var n=o(t,e),r=n.length,i=new Array(r),a=new Array(r),s=0;s<r;++s)i[s]=[n[s]],a[s]=[s];return{positions:i,cells:a}}(t,e);var n=t.order.join()+"-"+t.dtype,s=a[n],e=+e||0;s||(s=a[n]=function(t,e){var n=t.length,o=["'use strict';"],a="surfaceNets"+t.join("_")+"d"+e;o.push("var contour=genContour({","order:[",t.join(),"],","scalarArguments: 3,","phase:function phaseFunc(p,a,b,c) { return (p > c)|0 },"),"generic"===e&&o.push("getters:[0],");for(var s=[],u=[],l=0;l<n;++l)s.push("d"+l),u.push("d"+l);for(var l=0;l<1<<n;++l)s.push("v"+l),u.push("v"+l);for(var l=0;l<1<<n;++l)s.push("p"+l),u.push("p"+l);s.push("a","b","c"),u.push("a","c"),o.push("vertex:function vertexFunc(",s.join(),"){");for(var c=[],l=0;l<1<<n;++l)c.push("(p"+l+"<<"+l+")");o.push("var m=(",c.join("+"),")|0;if(m===0||m===",(1<<(1<<n))-1,"){return}");var f=[],h=[];1<<(1<<n)<=128?(o.push("switch(m){"),h=o):o.push("switch(m>>>7){");for(var l=0;l<1<<(1<<n);++l){if(1<<(1<<n)>128&&l%128==0){f.length>0&&h.push("}}");var p="vExtra"+f.length;o.push("case ",l>>>7,":",p,"(m&0x7f,",u.join(),");break;"),h=["function ",p,"(m,",u.join(),"){switch(m){"],f.push(h)}h.push("case ",127&l,":");for(var d=new Array(n),m=new Array(n),g=new Array(n),v=new Array(n),y=0,_=0;_<n;++_)d[_]=[],m[_]=[],g[_]=0,v[_]=0;for(var _=0;_<1<<n;++_)for(var b=0;b<n;++b){var x=_^1<<b;if(!(x>_)&&!(l&1<<x)!=!(l&1<<_)){var w=1;l&1<<x?m[b].push("v"+x+"-v"+_):(m[b].push("v"+_+"-v"+x),w=-w),w<0?(d[b].push("-v"+_+"-v"+x),g[b]+=2):(d[b].push("v"+_+"+v"+x),g[b]-=2),y+=1;for(var j=0;j<n;++j)j!==b&&(x&1<<j?v[j]+=1:v[j]-=1)}}for(var M=[],b=0;b<n;++b)if(0===d[b].length)M.push("d"+b+"-0.5");else{var A="";g[b]<0?A=g[b]+"*c":g[b]>0&&(A="+"+g[b]+"*c");var k=d[b].length/y*.5,z=.5+v[b]/y*.5;M.push("d"+b+"-"+z+"-"+k+"*("+d[b].join("+")+A+")/("+m[b].join("+")+")")}h.push("a.push([",M.join(),"]);","break;")}o.push("}},"),f.length>0&&h.push("}}");for(var E=[],l=0;l<1<<n-1;++l)E.push("v"+l);E.push("c0","c1","p0","p1","a","b","c"),o.push("cell:function cellFunc(",E.join(),"){");var S=i(n-1);o.push("if(p0){b.push(",S.map(function(t){return"["+t.map(function(t){return"v"+t})+"]"}).join(),")}else{b.push(",S.map(function(t){var e=t.slice();return e.reverse(),"["+e.map(function(t){return"v"+t})+"]"}).join(),")}}});function ",a,"(array,level){var verts=[],cells=[];contour(array,verts,cells,level);return {positions:verts,cells:cells};} return ",a,";");for(var l=0;l<f.length;++l)o.push(f[l].join(""));return new Function("genContour",o.join(""))(r)}(t.order,t.dtype));return s(t,e)};var r=n(/*! ndarray-extract-contour */"./node_modules/ndarray-extract-contour/contour.js"),i=n(/*! triangulate-hypercube */"./node_modules/triangulate-hypercube/triangulate-cube.js"),o=n(/*! zero-crossings */"./node_modules/zero-crossings/zc.js");var a={}},"./node_modules/tiny-emitter/index.js":
/*!********************************************!*\
  !*** ./node_modules/tiny-emitter/index.js ***!
  \********************************************/
/*! no static exports found */function(t,e){function n(){}n.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var o=0,a=r.length;o<a;o++)r[o].fn!==e&&r[o].fn._!==e&&i.push(r[o]);return i.length?n[t]=i:delete n[t],this}},t.exports=n},"./node_modules/triangulate-hypercube/triangulate-cube.js":
/*!****************************************************************!*\
  !*** ./node_modules/triangulate-hypercube/triangulate-cube.js ***!
  \****************************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t){if(t<0)return[];if(0===t)return[[0]];for(var e=0|Math.round(o(t+1)),n=[],a=0;a<e;++a){for(var s=r.unrank(t,a),u=[0],l=0,c=0;c<s.length;++c)l+=1<<s[c],u.push(l);i(s)<1&&(u[0]=l,u[t]=0),n.push(u)}return n};var r=n(/*! permutation-rank */"./node_modules/permutation-rank/index.js"),i=n(/*! permutation-parity */"./node_modules/permutation-parity/permutation-sign.js"),o=n(/*! gamma */"./node_modules/gamma/index.js")},"./node_modules/two-product/two-product.js":
/*!*************************************************!*\
  !*** ./node_modules/two-product/two-product.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){var i=t*e,o=r*t,a=o-(o-t),s=t-a,u=r*e,l=u-(u-e),c=e-l,f=s*c-(i-a*l-s*l-a*c);if(n)return n[0]=f,n[1]=i,n;return[f,i]};var r=+(Math.pow(2,27)+1)},"./node_modules/two-sum/two-sum.js":
/*!*****************************************!*\
  !*** ./node_modules/two-sum/two-sum.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){var r=t+e,i=r-t,o=e-i,a=t-(r-i);if(n)return n[0]=a+o,n[1]=r,n;return[a+o,r]}},"./node_modules/typed-function/typed-function.js":
/*!*******************************************************!*\
  !*** ./node_modules/typed-function/typed-function.js ***!
  \*******************************************************/
/*! no static exports found */function(t,e,n){"use strict";var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function t(){function e(t){for(var e,n=0;n<g.types.length;n++){var r=g.types[n];if(r.name===t){e=r.test;break}}if(!e){var i;for(n=0;n<g.types.length;n++)if((r=g.types[n]).name.toLowerCase()==t.toLowerCase()){i=r.name;break}throw new Error('Unknown type "'+t+'"'+(i?'. Did you mean "'+i+'"?':""))}return e}function n(t){for(var e="",n=0;n<t.length;n++){var r=t[n];if(r.signatures&&""!=r.name)if(""==e)e=r.name;else if(e!=r.name){var i=new Error("Function names do not match (expected: "+e+", actual: "+r.name+")");throw i.data={actual:r.name,expected:e},i}}return e}function r(t,e,n,r,i){var o,a=l(r),s=i?i.split(","):null,u=t||"unnamed",f=s&&c(s,"any"),h={fn:t,index:n,actual:r,expected:s};o=s?e>n&&!f?"Unexpected type of argument in function "+u+" (expected: "+s.join(" or ")+", actual: "+a+", index: "+n+")":"Too few arguments in function "+u+" (expected: "+s.join(" or ")+", index: "+n+")":"Too many arguments in function "+u+" (expected: "+n+", actual: "+e+")";var p=new TypeError(o);return p.data=h,p}function i(t){this.name=t||"refs",this.categories={}}function o(t,e){if("string"==typeof t){var n=t.trim(),r="..."===n.substr(0,3);if(r&&(n=n.substr(3)),""===n)this.types=["any"];else{this.types=n.split("|");for(var i=0;i<this.types.length;i++)this.types[i]=this.types[i].trim()}}else{if(!Array.isArray(t)){if(t instanceof o)return t.clone();throw new Error("String or Array expected")}this.types=t}this.conversions=[],this.varArgs=r||e||!1,this.anyType=-1!==this.types.indexOf("any")}function a(t,e){var n;if("string"==typeof t)n=""!==t?t.split(","):[];else{if(!Array.isArray(t))throw new Error("string or Array expected");n=t}this.params=new Array(n.length),this.anyType=!1,this.varArgs=!1;for(var r=0;r<n.length;r++){var i=new o(n[r]);if(this.params[r]=i,i.anyType&&(this.anyType=!0),r===n.length-1)this.varArgs=i.varArgs;else if(i.varArgs)throw new SyntaxError('Unexpected variable arguments operator "..."')}this.fn=e}function s(t,e,n,r){this.path=t||[],this.param=t[t.length-1]||null,this.signature=e||null,this.childs=n||[],this.fallThrough=r||!1}function u(t,e){var n=new i,u=function(t){var e,n,r={},i=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];if((e=new a(o,s)).ignore())continue;var u=e.expand();for(n=0;n<u.length;n++){var l=u[n],f=l.toString(),h=r[f];if(h){var p=a.compare(l,h);if(p<0)r[f]=l;else if(0===p)throw new Error('Signature "'+f+'" is defined twice')}else r[f]=l}}for(f in r)r.hasOwnProperty(f)&&i.push(r[f]);for(i.sort(function(t,e){return a.compare(t,e)}),n=0;n<i.length;n++)if((e=i[n]).varArgs)for(var d=e.params.length-1,m=e.params[d],g=0;g<m.types.length;){if(m.conversions[g])for(var v=m.types[g],y=0;y<i.length;y++){var _=i[y],b=_.params[d];if(_!==e&&b&&c(b.types,v)&&!b.conversions[d]){m.types.splice(g,1),m.conversions.splice(g,1),g--;break}}g++}return i}(e);if(0==u.length)throw new Error("No signatures provided");var l=function(t){for(var e=[],n=0;n<t.length;n++)t[n].anyType&&e.push(t[n]);return e}(u),f=function t(e,n,r){var i,a,u,l=n.length,f=[];for(i=0;i<e.length;i++)(a=e[i]).params.length!==l||u||(u=a),void 0!=a.params[l]&&f.push(a);f.sort(function(t,e){return o.compare(t.params[l],e.params[l])});var h=[];for(i=0;i<f.length;i++){var p=(a=f[i]).params[l],d=h.filter(function(t){return t.param.overlapping(p)})[0];if(d){if(d.param.varArgs)throw new Error('Conflicting types "'+d.param+'" and "'+p+'"');d.signatures.push(a)}else h.push({param:p,signatures:[a]})}var m=[];for(i=0;i<r.length;i++)r[i].paramsStartWith(n)&&m.push(r[i]);var g=!1;for(i=0;i<m.length;i++)if(!c(e,m[i])){g=!0;break}var v=new Array(h.length);for(i=0;i<h.length;i++){var y=h[i];v[i]=t(y.signatures,n.concat(y.param),m)}return new s(n,u,v,g)}(u,[],l),h=[],p=(t||"").replace(/[^a-zA-Z0-9_$]/g,"_"),d=function(t){for(var e=[],n=0;n<t;n++)e[n]="arg"+n;return e}(function(t){for(var e=0,n=0;n<t.length;n++){var r=t[n].params.length;r>e&&(e=r)}return e}(u));h.push("function "+p+"("+d.join(", ")+") {"),h.push('  "use strict";'),h.push("  var name = "+JSON.stringify(t||"")+";"),h.push(f.toCode(n,"  ",!1)),h.push("}");var m=[n.toCode(),"return "+h.join("\n")].join("\n"),g=new Function(n.name,"createError",m),v=g(n,r);return v.signatures=function(t){for(var e={},n=0;n<t.length;n++){var r=t[n];if(r.fn&&!r.hasConversions()){var i=r.params.join(",");e[i]=r.fn}}return e}(u),v}function l(t){for(var e,n=0;n<g.types.length;n++){var r=g.types[n];if("Object"===r.name)e=r;else if(r.test(t))return r.name}return e&&e.test(t)?e.name:"unknown"}function c(t,e){return-1!==t.indexOf(e)}function f(t){return t[t.length-1]}i.prototype.add=function(t,e){var n=e||"fn";this.categories[n]||(this.categories[n]=[]);var r=this.categories[n].indexOf(t);return-1==r&&(r=this.categories[n].length,this.categories[n].push(t)),n+r},i.prototype.toCode=function(){var t=[],e=this.name+".categories",n=this.categories;for(var r in n)if(n.hasOwnProperty(r))for(var i=n[r],o=0;o<i.length;o++)t.push("var "+r+o+" = "+e+"['"+r+"']["+o+"];");return t.join("\n")},o.compare=function(t,e){if(t.anyType)return 1;if(e.anyType)return-1;if(c(t.types,"Object"))return 1;if(c(e.types,"Object"))return-1;if(t.hasConversions()){if(e.hasConversions()){var n,r,i;for(n=0;n<t.conversions.length;n++)if(void 0!==t.conversions[n]){r=t.conversions[n];break}for(n=0;n<e.conversions.length;n++)if(void 0!==e.conversions[n]){i=e.conversions[n];break}return g.conversions.indexOf(r)-g.conversions.indexOf(i)}return 1}if(e.hasConversions())return-1;var o,a;for(n=0;n<g.types.length;n++)if(g.types[n].name===t.types[0]){o=n;break}for(n=0;n<g.types.length;n++)if(g.types[n].name===e.types[0]){a=n;break}return o-a},o.prototype.overlapping=function(t){for(var e=0;e<this.types.length;e++)if(c(t.types,this.types[e]))return!0;return!1},o.prototype.matches=function(t){return this.anyType||t.anyType||this.overlapping(t)},o.prototype.clone=function(){var t=new o(this.types.slice(),this.varArgs);return t.conversions=this.conversions.slice(),t},o.prototype.hasConversions=function(){return this.conversions.length>0},o.prototype.contains=function(t){for(var e=0;e<this.types.length;e++)if(t[this.types[e]])return!0;return!1},o.prototype.toString=function(t){for(var e=[],n={},r=0;r<this.types.length;r++){var i=this.conversions[r],o=t&&i?i.to:this.types[r];o in n||(n[o]=!0,e.push(o))}return(this.varArgs?"...":"")+e.join("|")},a.prototype.clone=function(){return new a(this.params.slice(),this.fn)},a.prototype.expand=function(){var t=[];return function e(n,r){if(r.length<n.params.length){var i,s,u,l=n.params[r.length];if(l.varArgs){for(s=l.clone(),i=0;i<g.conversions.length;i++)if(u=g.conversions[i],!c(l.types,u.from)&&c(l.types,u.to)){var f=s.types.length;s.types[f]=u.from,s.conversions[f]=u}e(n,r.concat(s))}else{for(i=0;i<l.types.length;i++)e(n,r.concat(new o(l.types[i])));for(i=0;i<g.conversions.length;i++)u=g.conversions[i],!c(l.types,u.from)&&c(l.types,u.to)&&((s=new o(u.from)).conversions[0]=u,e(n,r.concat(s)))}}else t.push(new a(r,n.fn))}(this,[]),t},a.compare=function(t,e){if(t.params.length>e.params.length)return 1;if(t.params.length<e.params.length)return-1;var n,r=t.params.length,i=0,a=0;for(n=0;n<r;n++)t.params[n].hasConversions()&&i++,e.params[n].hasConversions()&&a++;if(i>a)return 1;if(i<a)return-1;for(n=0;n<t.params.length;n++){var s=o.compare(t.params[n],e.params[n]);if(0!==s)return s}return 0},a.prototype.hasConversions=function(){for(var t=0;t<this.params.length;t++)if(this.params[t].hasConversions())return!0;return!1},a.prototype.ignore=function(){for(var t={},e=0;e<g.ignore.length;e++)t[g.ignore[e]]=!0;for(e=0;e<this.params.length;e++)if(this.params[e].contains(t))return!0;return!1},a.prototype.paramsStartWith=function(t){if(0===t.length)return!0;for(var e=f(this.params),n=f(t),r=0;r<t.length;r++){var i=this.params[r]||(e.varArgs?e:null),o=t[r]||(n.varArgs?n:null);if(!i||!o||!i.matches(o))return!1}return!0},a.prototype.toCode=function(t,e){for(var n=new Array(this.params.length),r=0;r<this.params.length;r++){var i=this.params[r],o=i.conversions[0];i.varArgs?n[r]="varArgs":n[r]=o?t.add(o.convert,"convert")+"(arg"+r+")":"arg"+r}var a=this.fn?t.add(this.fn,"signature"):void 0;return a?e+"return "+a+"("+n.join(", ")+"); // signature: "+this.params.join(", "):[].join("\n")},a.prototype.toString=function(){return this.params.join(", ")},s.prototype.toCode=function(t,n){var r=[];if(this.param){var i=this.path.length-1,o=this.param.conversions[0],a="// type: "+(o?o.from+" (convert to "+o.to+")":this.param);if(this.param.varArgs)if(this.param.anyType)r.push(n+"if (arguments.length > "+i+") {"),r.push(n+"  var varArgs = [];"),r.push(n+"  for (var i = "+i+"; i < arguments.length; i++) {"),r.push(n+"    varArgs.push(arguments[i]);"),r.push(n+"  }"),r.push(this.signature.toCode(t,n+"  ")),r.push(n+"}");else{for(var s=function(n,r){for(var i=[],o=0;o<n.length;o++)i[o]=t.add(e(n[o]),"test")+"("+r+")";return i.join(" || ")}.bind(this),u=this.param.types,l=[],c=0;c<u.length;c++)void 0===this.param.conversions[c]&&l.push(u[c]);r.push(n+"if ("+s(u,"arg"+i)+") { "+a),r.push(n+"  var varArgs = [arg"+i+"];"),r.push(n+"  for (var i = "+(i+1)+"; i < arguments.length; i++) {"),r.push(n+"    if ("+s(l,"arguments[i]")+") {"),r.push(n+"      varArgs.push(arguments[i]);");for(var c=0;c<u.length;c++){var f=this.param.conversions[c];if(f){var h=t.add(e(u[c]),"test"),p=t.add(f.convert,"convert");r.push(n+"    }"),r.push(n+"    else if ("+h+"(arguments[i])) {"),r.push(n+"      varArgs.push("+p+"(arguments[i]));")}}r.push(n+"    } else {"),r.push(n+"      throw createError(name, arguments.length, i, arguments[i], '"+l.join(",")+"');"),r.push(n+"    }"),r.push(n+"  }"),r.push(this.signature.toCode(t,n+"  ")),r.push(n+"}")}else if(this.param.anyType)r.push(n+"// type: any"),r.push(this._innerCode(t,n));else{var d=this.param.types[0],h="any"!==d?t.add(e(d),"test"):null;r.push(n+"if ("+h+"(arg"+i+")) { "+a),r.push(this._innerCode(t,n+"  ")),r.push(n+"}")}}else r.push(this._innerCode(t,n));return r.join("\n")},s.prototype._innerCode=function(t,e){var n,r=[];for(this.signature&&(r.push(e+"if (arguments.length === "+this.path.length+") {"),r.push(this.signature.toCode(t,e+"  ")),r.push(e+"}")),n=0;n<this.childs.length;n++)r.push(this.childs[n].toCode(t,e));if(!this.fallThrough||this.param&&this.param.anyType){var i=this._exceptions(t,e);i&&r.push(i)}return r.join("\n")},s.prototype._exceptions=function(t,e){var n=this.path.length;if(0===this.childs.length)return[e+"if (arguments.length > "+n+") {",e+"  throw createError(name, arguments.length, "+n+", arguments["+n+"]);",e+"}"].join("\n");for(var r={},i=[],o=0;o<this.childs.length;o++){var a=this.childs[o];if(a.param)for(var s=0;s<a.param.types.length;s++){var u=a.param.types[s];u in r||a.param.conversions[s]||(r[u]=!0,i.push(u))}}return e+"throw createError(name, arguments.length, "+n+", arguments["+n+"], '"+i.join(",")+"');"};var h=[{name:"number",test:function(t){return"number"==typeof t}},{name:"string",test:function(t){return"string"==typeof t}},{name:"boolean",test:function(t){return"boolean"==typeof t}},{name:"Function",test:function(t){return"function"==typeof t}},{name:"Array",test:Array.isArray},{name:"Date",test:function(t){return t instanceof Date}},{name:"RegExp",test:function(t){return t instanceof RegExp}},{name:"Object",test:function(t){return"object"==typeof t}},{name:"null",test:function(t){return null===t}},{name:"undefined",test:function(t){return void 0===t}}],p={},d=[],m=[],g={config:p,types:h,conversions:d,ignore:m};return(g=u("typed",{Object:function(t){var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(t[r]);var i=n(e);return u(i,t)},"string, Object":u,"...Function":function(t){for(var e,r=n(t),i={},o=0;o<t.length;o++){var a=t[o];if("object"!=typeof a.signatures)throw(e=new TypeError("Function is no typed-function (index: "+o+")")).data={index:o},e;for(var s in a.signatures)if(a.signatures.hasOwnProperty(s))if(i.hasOwnProperty(s)){if(a.signatures[s]!==i[s])throw(e=new Error('Signature "'+s+'" is defined twice')).data={signature:s},e}else i[s]=a.signatures[s]}return u(r,i)}})).config=p,g.types=h,g.conversions=d,g.ignore=m,g.create=t,g.find=function(t,e){if(!t.signatures)throw new TypeError("Function is no typed-function");var n;if("string"==typeof e){n=e.split(",");for(var r=0;r<n.length;r++)n[r]=n[r].trim()}else{if(!Array.isArray(e))throw new TypeError("String array or a comma separated string expected");n=e}var i=n.join(","),o=t.signatures[i];if(o)return o;throw new TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+n.join(", ")+"))")},g.convert=function(t,e){var n=l(t);if(e===n)return t;for(var r=0;r<g.conversions.length;r++){var i=g.conversions[r];if(i.from===n&&i.to===e)return i.convert(t)}throw new Error("Cannot convert from "+n+" to "+e)},g.addType=function(t){if(!t||"string"!=typeof t.name||"function"!=typeof t.test)throw new TypeError("Object with properties {name: string, test: function} expected");g.types.push(t)},g.addConversion=function(t){if(!t||"string"!=typeof t.from||"string"!=typeof t.to||"function"!=typeof t.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");g.conversions.push(t)},g}()})?r.apply(e,i):r)||(t.exports=o)},"./node_modules/typedarray-pool/pool.js":
/*!**********************************************!*\
  !*** ./node_modules/typedarray-pool/pool.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){"use strict";(function(t,r){var i=n(/*! bit-twiddle */"./node_modules/bit-twiddle/twiddle.js"),o=n(/*! dup */"./node_modules/dup/dup.js");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:o([32,0]),UINT16:o([32,0]),UINT32:o([32,0]),INT8:o([32,0]),INT16:o([32,0]),INT32:o([32,0]),FLOAT:o([32,0]),DOUBLE:o([32,0]),DATA:o([32,0]),UINT8C:o([32,0]),BUFFER:o([32,0])});var a="undefined"!=typeof Uint8ClampedArray,s=t.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=o([32,0])),s.BUFFER||(s.BUFFER=o([32,0]));var u=s.DATA,l=s.BUFFER;function c(t){if(t){var e=t.length||t.byteLength,n=i.log2(e);u[n].push(t)}}function f(t){t=i.nextPow2(t);var e=i.log2(t),n=u[e];return n.length>0?n.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(f(t),0,t)}function p(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function m(t){return new Int8Array(f(t),0,t)}function g(t){return new Int16Array(f(2*t),0,t)}function v(t){return new Int32Array(f(4*t),0,t)}function y(t){return new Float32Array(f(4*t),0,t)}function _(t){return new Float64Array(f(8*t),0,t)}function b(t){return a?new Uint8ClampedArray(f(t),0,t):h(t)}function x(t){return new DataView(f(t),0,t)}function w(t){t=i.nextPow2(t);var e=i.log2(t),n=l[e];return n.length>0?n.pop():new r(t)}e.free=function(t){if(r.isBuffer(t))l[i.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,n=0|i.log2(e);u[n].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeInt8=e.freeInt16=e.freeInt32=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){c(t.buffer)},e.freeArrayBuffer=c,e.freeBuffer=function(t){l[i.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return h(t);case"uint16":return p(t);case"uint32":return d(t);case"int8":return m(t);case"int16":return g(t);case"int32":return v(t);case"float":case"float32":return y(t);case"double":case"float64":return _(t);case"uint8_clamped":return b(t);case"buffer":return w(t);case"data":case"dataview":return x(t);default:return null}return null},e.mallocArrayBuffer=f,e.mallocUint8=h,e.mallocUint16=p,e.mallocUint32=d,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=v,e.mallocFloat32=e.mallocFloat=y,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=b,e.mallocDataView=x,e.mallocBuffer=w,e.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,u[t].length=0,l[t].length=0}}).call(this,n(/*! ./../webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),n(/*! ./../buffer/index.js */"./node_modules/buffer/index.js").Buffer)},"./node_modules/underscore/underscore.js":
/*!***********************************************!*\
  !*** ./node_modules/underscore/underscore.js ***!
  \***********************************************/
/*! no static exports found */function(t,e,n){var r;(function(){var n=this,i=n._,o=Array.prototype,a=Object.prototype,s=Function.prototype,u=o.push,l=o.slice,c=a.toString,f=a.hasOwnProperty,h=Array.isArray,p=Object.keys,d=s.bind,m=Object.create,g=function(){},v=function(t){return t instanceof v?t:this instanceof v?void(this._wrapped=t):new v(t)};void 0!==t&&t.exports&&(e=t.exports=v),e._=v,v.VERSION="1.8.3";var y=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},_=function(t,e,n){return null==t?v.identity:v.isFunction(t)?y(t,e,n):v.isObject(t)?v.matcher(t):v.property(t)};v.iteratee=function(t,e){return _(t,e,1/0)};var b=function(t,e){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=t(o),s=a.length,u=0;u<s;u++){var l=a[u];e&&void 0!==n[l]||(n[l]=o[l])}return n}},x=function(t){if(!v.isObject(t))return{};if(m)return m(t);g.prototype=t;var e=new g;return g.prototype=null,e},w=function(t){return function(e){return null==e?void 0:e[t]}},j=Math.pow(2,53)-1,M=w("length"),A=function(t){var e=M(t);return"number"==typeof e&&e>=0&&e<=j};function k(t){return function(e,n,r,i){n=y(n,i,4);var o=!A(e)&&v.keys(e),a=(o||e).length,s=t>0?0:a-1;return arguments.length<3&&(r=e[o?o[s]:s],s+=t),function(e,n,r,i,o,a){for(;o>=0&&o<a;o+=t){var s=i?i[o]:o;r=n(r,e[s],s,e)}return r}(e,n,r,o,s,a)}}v.each=v.forEach=function(t,e,n){var r,i;if(e=y(e,n),A(t))for(r=0,i=t.length;r<i;r++)e(t[r],r,t);else{var o=v.keys(t);for(r=0,i=o.length;r<i;r++)e(t[o[r]],o[r],t)}return t},v.map=v.collect=function(t,e,n){e=_(e,n);for(var r=!A(t)&&v.keys(t),i=(r||t).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=e(t[s],s,t)}return o},v.reduce=v.foldl=v.inject=k(1),v.reduceRight=v.foldr=k(-1),v.find=v.detect=function(t,e,n){var r;if(void 0!==(r=A(t)?v.findIndex(t,e,n):v.findKey(t,e,n))&&-1!==r)return t[r]},v.filter=v.select=function(t,e,n){var r=[];return e=_(e,n),v.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},v.reject=function(t,e,n){return v.filter(t,v.negate(_(e)),n)},v.every=v.all=function(t,e,n){e=_(e,n);for(var r=!A(t)&&v.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},v.some=v.any=function(t,e,n){e=_(e,n);for(var r=!A(t)&&v.keys(t),i=(r||t).length,o=0;o<i;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},v.contains=v.includes=v.include=function(t,e,n,r){return A(t)||(t=v.values(t)),("number"!=typeof n||r)&&(n=0),v.indexOf(t,e,n)>=0},v.invoke=function(t,e){var n=l.call(arguments,2),r=v.isFunction(e);return v.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},v.pluck=function(t,e){return v.map(t,v.property(e))},v.where=function(t,e){return v.filter(t,v.matcher(e))},v.findWhere=function(t,e){return v.find(t,v.matcher(e))},v.max=function(t,e,n){var r,i,o=-1/0,a=-1/0;if(null==e&&null!=t)for(var s=0,u=(t=A(t)?t:v.values(t)).length;s<u;s++)(r=t[s])>o&&(o=r);else e=_(e,n),v.each(t,function(t,n,r){((i=e(t,n,r))>a||i===-1/0&&o===-1/0)&&(o=t,a=i)});return o},v.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t)for(var s=0,u=(t=A(t)?t:v.values(t)).length;s<u;s++)(r=t[s])<o&&(o=r);else e=_(e,n),v.each(t,function(t,n,r){((i=e(t,n,r))<a||i===1/0&&o===1/0)&&(o=t,a=i)});return o},v.shuffle=function(t){for(var e,n=A(t)?t:v.values(t),r=n.length,i=Array(r),o=0;o<r;o++)(e=v.random(0,o))!==o&&(i[o]=i[e]),i[e]=n[o];return i},v.sample=function(t,e,n){return null==e||n?(A(t)||(t=v.values(t)),t[v.random(t.length-1)]):v.shuffle(t).slice(0,Math.max(0,e))},v.sortBy=function(t,e,n){return e=_(e,n),v.pluck(v.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return t.index-e.index}),"value")};var z=function(t){return function(e,n,r){var i={};return n=_(n,r),v.each(e,function(r,o){var a=n(r,o,e);t(i,r,a)}),i}};v.groupBy=z(function(t,e,n){v.has(t,n)?t[n].push(e):t[n]=[e]}),v.indexBy=z(function(t,e,n){t[n]=e}),v.countBy=z(function(t,e,n){v.has(t,n)?t[n]++:t[n]=1}),v.toArray=function(t){return t?v.isArray(t)?l.call(t):A(t)?v.map(t,v.identity):v.values(t):[]},v.size=function(t){return null==t?0:A(t)?t.length:v.keys(t).length},v.partition=function(t,e,n){e=_(e,n);var r=[],i=[];return v.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},v.first=v.head=v.take=function(t,e,n){if(null!=t)return null==e||n?t[0]:v.initial(t,t.length-e)},v.initial=function(t,e,n){return l.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},v.last=function(t,e,n){if(null!=t)return null==e||n?t[t.length-1]:v.rest(t,Math.max(0,t.length-e))},v.rest=v.tail=v.drop=function(t,e,n){return l.call(t,null==e||n?1:e)},v.compact=function(t){return v.filter(t,v.identity)};var E=function(t,e,n,r){for(var i=[],o=0,a=r||0,s=M(t);a<s;a++){var u=t[a];if(A(u)&&(v.isArray(u)||v.isArguments(u))){e||(u=E(u,e,n));var l=0,c=u.length;for(i.length+=c;l<c;)i[o++]=u[l++]}else n||(i[o++]=u)}return i};function S(t){return function(e,n,r){n=_(n,r);for(var i=M(e),o=t>0?0:i-1;o>=0&&o<i;o+=t)if(n(e[o],o,e))return o;return-1}}function N(t,e,n){return function(r,i,o){var a=0,s=M(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1;else if(n&&o&&s)return r[o=n(r,i)]===i?o:-1;if(i!=i)return(o=e(l.call(r,a,s),v.isNaN))>=0?o+a:-1;for(o=t>0?a:s-1;o>=0&&o<s;o+=t)if(r[o]===i)return o;return-1}}v.flatten=function(t,e){return E(t,e,!1)},v.without=function(t){return v.difference(t,l.call(arguments,1))},v.uniq=v.unique=function(t,e,n,r){v.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=_(n,r));for(var i=[],o=[],a=0,s=M(t);a<s;a++){var u=t[a],l=n?n(u,a,t):u;e?(a&&o===l||i.push(u),o=l):n?v.contains(o,l)||(o.push(l),i.push(u)):v.contains(i,u)||i.push(u)}return i},v.union=function(){return v.uniq(E(arguments,!0,!0))},v.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=M(t);r<i;r++){var o=t[r];if(!v.contains(e,o)){for(var a=1;a<n&&v.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},v.difference=function(t){var e=E(arguments,!0,!0,1);return v.filter(t,function(t){return!v.contains(e,t)})},v.zip=function(){return v.unzip(arguments)},v.unzip=function(t){for(var e=t&&v.max(t,M).length||0,n=Array(e),r=0;r<e;r++)n[r]=v.pluck(t,r);return n},v.object=function(t,e){for(var n={},r=0,i=M(t);r<i;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},v.findIndex=S(1),v.findLastIndex=S(-1),v.sortedIndex=function(t,e,n,r){for(var i=(n=_(n,r,1))(e),o=0,a=M(t);o<a;){var s=Math.floor((o+a)/2);n(t[s])<i?o=s+1:a=s}return o},v.indexOf=N(1,v.findIndex,v.sortedIndex),v.lastIndexOf=N(-1,v.findLastIndex),v.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;o<r;o++,t+=n)i[o]=t;return i};var T=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=x(t.prototype),a=t.apply(o,i);return v.isObject(a)?a:o};v.bind=function(t,e){if(d&&t.bind===d)return d.apply(t,l.call(arguments,1));if(!v.isFunction(t))throw new TypeError("Bind must be called on a function");var n=l.call(arguments,2),r=function(){return T(t,r,e,this,n.concat(l.call(arguments)))};return r},v.partial=function(t){var e=l.call(arguments,1),n=function(){for(var r=0,i=e.length,o=Array(i),a=0;a<i;a++)o[a]=e[a]===v?arguments[r++]:e[a];for(;r<arguments.length;)o.push(arguments[r++]);return T(t,n,this,this,o)};return n},v.bindAll=function(t){var e,n,r=arguments.length;if(r<=1)throw new Error("bindAll must be passed function names");for(e=1;e<r;e++)t[n=arguments[e]]=v.bind(t[n],t);return t},v.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return v.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},v.delay=function(t,e){var n=l.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},v.defer=v.partial(v.delay,v,1),v.throttle=function(t,e,n){var r,i,o,a=null,s=0;n||(n={});var u=function(){s=!1===n.leading?0:v.now(),a=null,o=t.apply(r,i),a||(r=i=null)};return function(){var l=v.now();s||!1!==n.leading||(s=l);var c=e-(l-s);return r=this,i=arguments,c<=0||c>e?(a&&(clearTimeout(a),a=null),s=l,o=t.apply(r,i),a||(r=i=null)):a||!1===n.trailing||(a=setTimeout(u,c)),o}},v.debounce=function(t,e,n){var r,i,o,a,s,u=function(){var l=v.now()-a;l<e&&l>=0?r=setTimeout(u,e-l):(r=null,n||(s=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=v.now();var l=n&&!r;return r||(r=setTimeout(u,e)),l&&(s=t.apply(o,i),o=i=null),s}},v.wrap=function(t,e){return v.partial(e,t)},v.negate=function(t){return function(){return!t.apply(this,arguments)}},v.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},v.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},v.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}},v.once=v.partial(v.before,2);var C=!{toString:null}.propertyIsEnumerable("toString"),O=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function P(t,e){var n=O.length,r=t.constructor,i=v.isFunction(r)&&r.prototype||a,o="constructor";for(v.has(t,o)&&!v.contains(e,o)&&e.push(o);n--;)(o=O[n])in t&&t[o]!==i[o]&&!v.contains(e,o)&&e.push(o)}v.keys=function(t){if(!v.isObject(t))return[];if(p)return p(t);var e=[];for(var n in t)v.has(t,n)&&e.push(n);return C&&P(t,e),e},v.allKeys=function(t){if(!v.isObject(t))return[];var e=[];for(var n in t)e.push(n);return C&&P(t,e),e},v.values=function(t){for(var e=v.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=t[e[i]];return r},v.mapObject=function(t,e,n){e=_(e,n);for(var r,i=v.keys(t),o=i.length,a={},s=0;s<o;s++)a[r=i[s]]=e(t[r],r,t);return a},v.pairs=function(t){for(var e=v.keys(t),n=e.length,r=Array(n),i=0;i<n;i++)r[i]=[e[i],t[e[i]]];return r},v.invert=function(t){for(var e={},n=v.keys(t),r=0,i=n.length;r<i;r++)e[t[n[r]]]=n[r];return e},v.functions=v.methods=function(t){var e=[];for(var n in t)v.isFunction(t[n])&&e.push(n);return e.sort()},v.extend=b(v.allKeys),v.extendOwn=v.assign=b(v.keys),v.findKey=function(t,e,n){e=_(e,n);for(var r,i=v.keys(t),o=0,a=i.length;o<a;o++)if(e(t[r=i[o]],r,t))return r},v.pick=function(t,e,n){var r,i,o={},a=t;if(null==a)return o;v.isFunction(e)?(i=v.allKeys(a),r=y(e,n)):(i=E(arguments,!1,!1,1),r=function(t,e,n){return e in n},a=Object(a));for(var s=0,u=i.length;s<u;s++){var l=i[s],c=a[l];r(c,l,a)&&(o[l]=c)}return o},v.omit=function(t,e,n){if(v.isFunction(e))e=v.negate(e);else{var r=v.map(E(arguments,!1,!1,1),String);e=function(t,e){return!v.contains(r,e)}}return v.pick(t,e,n)},v.defaults=b(v.allKeys,!0),v.create=function(t,e){var n=x(t);return e&&v.extendOwn(n,e),n},v.clone=function(t){return v.isObject(t)?v.isArray(t)?t.slice():v.extend({},t):t},v.tap=function(t,e){return e(t),t},v.isMatch=function(t,e){var n=v.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;o<r;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};var I=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof v&&(t=t._wrapped),e instanceof v&&(e=e._wrapped);var i=c.call(t);if(i!==c.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,s=e.constructor;if(a!==s&&!(v.isFunction(a)&&a instanceof a&&v.isFunction(s)&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===t)return r[u]===e;if(n.push(t),r.push(e),o){if((u=t.length)!==e.length)return!1;for(;u--;)if(!I(t[u],e[u],n,r))return!1}else{var l,f=v.keys(t);if(u=f.length,v.keys(e).length!==u)return!1;for(;u--;)if(l=f[u],!v.has(e,l)||!I(t[l],e[l],n,r))return!1}return n.pop(),r.pop(),!0};v.isEqual=function(t,e){return I(t,e)},v.isEmpty=function(t){return null==t||(A(t)&&(v.isArray(t)||v.isString(t)||v.isArguments(t))?0===t.length:0===v.keys(t).length)},v.isElement=function(t){return!(!t||1!==t.nodeType)},v.isArray=h||function(t){return"[object Array]"===c.call(t)},v.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},v.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){v["is"+t]=function(e){return c.call(e)==="[object "+t+"]"}}),v.isArguments(arguments)||(v.isArguments=function(t){return v.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(v.isFunction=function(t){return"function"==typeof t||!1}),v.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},v.isNaN=function(t){return v.isNumber(t)&&t!==+t},v.isBoolean=function(t){return!0===t||!1===t||"[object Boolean]"===c.call(t)},v.isNull=function(t){return null===t},v.isUndefined=function(t){return void 0===t},v.has=function(t,e){return null!=t&&f.call(t,e)},v.noConflict=function(){return n._=i,this},v.identity=function(t){return t},v.constant=function(t){return function(){return t}},v.noop=function(){},v.property=w,v.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},v.matcher=v.matches=function(t){return t=v.extendOwn({},t),function(e){return v.isMatch(e,t)}},v.times=function(t,e,n){var r=Array(Math.max(0,t));e=y(e,n,1);for(var i=0;i<t;i++)r[i]=e(i);return r},v.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},v.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},D=v.invert(B),F=function(t){var e=function(e){return t[e]},n="(?:"+v.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};v.escape=F(B),v.unescape=F(D),v.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),v.isFunction(r)?r.call(t):r};var R=0;v.uniqueId=function(t){var e=++R+"";return t?t+e:e},v.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var L=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},U=/\\|'|\r|\n|\u2028|\u2029/g,H=function(t){return"\\"+q[t]};v.template=function(t,e,n){!e&&n&&(e=n),e=v.defaults({},e,v.templateSettings);var r=RegExp([(e.escape||L).source,(e.interpolate||L).source,(e.evaluate||L).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,s){return o+=t.slice(i,s).replace(U,H),i=s+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var s=function(t){return a.call(this,t,v)},u=e.variable||"obj";return s.source="function("+u+"){\n"+o+"}",s},v.chain=function(t){var e=v(t);return e._chain=!0,e};var Y=function(t,e){return t._chain?v(e).chain():e};v.mixin=function(t){v.each(v.functions(t),function(e){var n=v[e]=t[e];v.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),Y(this,n.apply(v,t))}})},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];v.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],Y(this,n)}}),v.each(["concat","join","slice"],function(t){var e=o[t];v.prototype[t]=function(){return Y(this,e.apply(this._wrapped,arguments))}}),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return""+this._wrapped},void 0===(r=function(){return v}.apply(e,[]))||(t.exports=r)}).call(this)},"./node_modules/union-find/index.js":
/*!******************************************!*\
  !*** ./node_modules/union-find/index.js ***!
  \******************************************/
/*! no static exports found */function(t,e,n){"use strict";"use restrict";function r(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e<t;++e)this.roots[e]=e,this.ranks[e]=0}t.exports=r;var i=r.prototype;Object.defineProperty(i,"length",{get:function(){return this.roots.length}}),i.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},i.find=function(t){for(var e=t,n=this.roots;n[t]!==t;)t=n[t];for(;n[e]!==t;){var r=n[e];n[e]=t,e=r}return t},i.link=function(t,e){var n=this.find(t),r=this.find(e);if(n!==r){var i=this.ranks,o=this.roots,a=i[n],s=i[r];a<s?o[n]=r:s<a?o[r]=n:(o[r]=n,++i[n])}}},"./node_modules/uniq/uniq.js":
/*!***********************************!*\
  !*** ./node_modules/uniq/uniq.js ***!
  \***********************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n){return 0===t.length?t:e?(n||t.sort(e),function(t,e){for(var n=1,r=t.length,i=t[0],o=t[0],a=1;a<r;++a)if(o=i,e(i=t[a],o)){if(a===n){n++;continue}t[n++]=i}return t.length=n,t}(t,e)):(n||t.sort(),function(t){for(var e=1,n=t.length,r=t[0],i=t[0],o=1;o<n;++o,i=r)if(i=r,(r=t[o])!==i){if(o===e){e++;continue}t[e++]=r}return t.length=e,t}(t))}},"./node_modules/util-extend/extend.js":
/*!********************************************!*\
  !*** ./node_modules/util-extend/extend.js ***!
  \********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){if(!e||"object"!=typeof e)return t;var n=Object.keys(e),r=n.length;for(;r--;)t[n[r]]=e[n[r]];return t}},"./node_modules/vectorize-text/index.js":
/*!**********************************************!*\
  !*** ./node_modules/vectorize-text/index.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){"object"==typeof e&&null!==e||(e={});return r(t,e.canvas||i,e.context||o,e)};var r=n(/*! ./lib/vtext */"./node_modules/vectorize-text/lib/vtext.js"),i=null,o=null;"undefined"!=typeof document&&((i=document.createElement("canvas")).width=8192,i.height=1024,o=i.getContext("2d"))},"./node_modules/vectorize-text/lib/vtext.js":
/*!**************************************************!*\
  !*** ./node_modules/vectorize-text/lib/vtext.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e,n,r){var o=r.size||64,a=r.font||"normal";return n.font=o+"px "+a,n.textAlign="start",n.textBaseline="alphabetic",n.direction="ltr",f(function(t,e,n,r){var o=0|Math.ceil(e.measureText(n).width+2*r);if(o>8192)throw new Error("vectorize-text: String too long (sorry, this will get fixed later)");var a=3*r;t.height<a&&(t.height=a),e.fillStyle="#000",e.fillRect(0,0,t.width,t.height),e.fillStyle="#fff",e.fillText(n,r,2*r);var s=e.getImageData(0,0,o,a);return i(s.data,[a,o,4]).pick(-1,-1,0).transpose(1,0)}(e,n,t,o),r,o)},t.exports.processPixels=f;var r=n(/*! surface-nets */"./node_modules/surface-nets/surfacenets.js"),i=n(/*! ndarray */"./node_modules/ndarray/ndarray.js"),o=n(/*! simplify-planar-graph */"./node_modules/simplify-planar-graph/simplify.js"),a=n(/*! clean-pslg */"./node_modules/clean-pslg/clean-pslg.js"),s=n(/*! cdt2d */"./node_modules/cdt2d/cdt2d.js"),u=n(/*! planar-graph-to-polyline */"./node_modules/planar-graph-to-polyline/pg2pl.js");function l(t,e){var n=r(t,128);return e?o(n.cells,n.positions,.25):{edges:n.cells,positions:n.positions}}function c(t,e,n,r){var i=l(t,r),o=function(t,e,n){for(var r=e.textAlign||"start",i=e.textBaseline||"alphabetic",o=[1<<30,1<<30],a=[0,0],s=t.length,u=0;u<s;++u)for(var l=t[u],c=0;c<2;++c)o[c]=0|Math.min(o[c],l[c]),a[c]=0|Math.max(a[c],l[c]);var f=0;switch(r){case"center":f=-.5*(o[0]+a[0]);break;case"right":case"end":f=-a[0];break;case"left":case"start":f=-o[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+r+"'")}var h=0;switch(i){case"hanging":case"top":h=-o[1];break;case"middle":h=-.5*(o[1]+a[1]);break;case"alphabetic":case"ideographic":h=-3*n;break;case"bottom":h=-a[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+i+"'")}var p=1/n;return"lineHeight"in e?p*=+e.lineHeight:"width"in e?p=e.width/(a[0]-o[0]):"height"in e&&(p=e.height/(a[1]-o[1])),t.map(function(t){return[p*(t[0]+f),p*(t[1]+h)]})}(i.positions,e,n),c=i.edges,f="ccw"===e.orientation;if(a(o,c),e.polygons||e.polygon||e.polyline){for(var h=u(c,o),p=new Array(h.length),d=0;d<h.length;++d){for(var m=h[d],g=new Array(m.length),v=0;v<m.length;++v){for(var y=m[v],_=new Array(y.length),b=0;b<y.length;++b)_[b]=o[y[b]].slice();f&&_.reverse(),g[v]=_}p[d]=g}return p}return e.triangles||e.triangulate||e.triangle?{cells:s(o,c,{delaunay:!1,exterior:!1,interior:!0}),positions:o}:{edges:c,positions:o}}function f(t,e,n){try{return c(t,e,n,!0)}catch(t){}try{return c(t,e,n,!1)}catch(t){}return e.polygons||e.polyline||e.polygon?[]:e.triangles||e.triangulate||e.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},"./node_modules/webpack/buildin/global.js":
/*!***********************************!*\
  !*** (webpack)/buildin/global.js ***!
  \***********************************/
/*! no static exports found */function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./node_modules/xtend/mutable.js":
/*!***************************************!*\
  !*** ./node_modules/xtend/mutable.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},"./node_modules/zero-crossings/lib/zc-core.js":
/*!****************************************************!*\
  !*** ./node_modules/zero-crossings/lib/zc-core.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){t.exports=n(/*! cwise-compiler */"./node_modules/cwise-compiler/compiler.js")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n        var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n        var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n        if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n          _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n        }\n      }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},"./node_modules/zero-crossings/zc.js":
/*!*******************************************!*\
  !*** ./node_modules/zero-crossings/zc.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){"use strict";t.exports=function(t,e){var n=[];return e=+e||0,r(t.hi(t.shape[0]-1),n,e),n};var r=n(/*! ./lib/zc-core */"./node_modules/zero-crossings/lib/zc-core.js")},"./src/cameras/camera_interaction.js":
/*!*******************************************!*\
  !*** ./src/cameras/camera_interaction.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! gl-vec4 */"./node_modules/gl-vec4/index.js");t.exports=function(t,e,n,i,o,a,s,u,l){switch(e.type){case"wheel":e.dsx=e.dsy=Math.exp(-e.dy/100),e.dx=e.dy=0}if(e.buttons||-1!==["wheel","touch","pinch"].indexOf(e.type)){var c=t.x.inst_zoom,f=t.x.pan_by_zoom,h=t.x.pan_by_drag,p=t.y.inst_zoom,d=t.y.pan_by_zoom,m=t.y.pan_by_drag;"row-labels"===n&&(c=1,h=0,f=0),"col-labels"===n&&(p=1,m=0,d=0),"static"===n&&(c=1,h=0,f=0,p=1,m=0,d=0),e.preventDefault(),u[0]=c,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=p,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=f+h,u[13]=d+m,u[14]=0,u[15]=1,o.multiply(u,u,l),o.multiply(u,i,u),o.multiply(a,u,a)}var g=r.transformMat4([],r.transformMat4([],[e.x0,e.y0,0,1],i),o.invert([],a));e.x=g[0],e.y=g[1],s.emit("move",e)}},"./src/cameras/custom_camera_2d.js":
/*!*****************************************!*\
  !*** ./src/cameras/custom_camera_2d.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../interactions/interaction-events */"./src/interactions/interaction-events.js"),i=n(/*! xtend/mutable */"./node_modules/xtend/mutable.js"),o=n(/*! gl-mat4 */"./node_modules/gl-mat4/index.js"),a=n(/*! event-emitter */"./node_modules/event-emitter/index.js"),s=n(/*! ./camera_interaction */"./src/cameras/camera_interaction.js");o.viewport=function(t,e,n,r,i,o,a){return t[0]=.5*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=.5*i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=.5*(a-o),t[11]=0,t[12]=e+.5*r,t[13]=n+.5*i,t[14]=.5*(a+o),t[15]=1,t},t.exports=function(t,e,n,u,l){var c=i({element:(n=n||{}).element||t._gl.canvas},n||{}).element,f=!0,h=c===window?function(){return c.innerWidth}:function(){return c.offsetWidth},p=c===window?function(){return c.innerHeight}:function(){return c.offsetHeight},d=void 0===n.xrange?[-1,1]:n.xrange,m=void 0===n.yrange?[-1,1]:n.yrange,g=void 0===n.aspectRatio?1:n.aspectRatio,v=h(),y=p(),_=.5*(d[1]+d[0])+e.viz_dim.shift_camera.x,b=.5*(m[1]+m[0])+e.viz_dim.shift_camera.y,x=.5*(d[1]-d[0]),w=x/g/v*y,j=o.identity([]);j[0]=1/x,j[5]=1/w,j[12]=-_/x,j[13]=-b/w;var M=o.identity([]),A=o.identity([]);function k(){v=h(),y=p(),o.viewport(M,0,y,v,-y,0,1),o.invert(A,M)}k();var z=[],E=new a;r({element:c}).on("interactionstart",function(t){t.preventDefault()}).on("interactionend",function(t){t.preventDefault()}).on("interaction",function(t){e.interact.enable_viz_interact&&s(u,t,l,A,o,j,E,z,M)});var S=t({context:{view:t.prop("view")}});return{draw:function(t){S({view:j},function(){t({dirty:f})}),f=!1},on:function(t,e){E.on(t,e)},off:function(t,e){E.off(t,e)},taint:function(){f=!0},resize:function(){k(),j[5]=j[0]*g*v/y,f=!0}}}},"./src/cameras/make_cameras.js":
/*!*************************************!*\
  !*** ./src/cameras/make_cameras.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./custom_camera_2d */"./src/cameras/custom_camera_2d.js");t.exports=function(t,e){var n=e.zoom_data;const i={};var o={xrange:[-1,1],yrange:[-1,1]};i.mat=r(t,e,o,n,"matrix"),i["row-labels"]=r(t,e,o,n,"row-labels"),i["col-labels"]=r(t,e,o,n,"col-labels"),i.static=r(t,e,o,n,"static"),e.cameras=i}},"./src/cameras/reset_cameras.js":
/*!**************************************!*\
  !*** ./src/cameras/reset_cameras.js ***!
  \**************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../zoom/ini_zoom_data */"./src/zoom/ini_zoom_data.js"),i=n(/*! ./make_cameras */"./src/cameras/make_cameras.js");t.exports=function(t,e){e.reset_cameras=!1,e.zoom_data=r(),i(t,e),e.labels.draw_labels=!1,e.animation.initialize_viz=!0,e.interact.total=0}},"./src/cats/binom_prop_pval_lookup.js":
/*!********************************************!*\
  !*** ./src/cats/binom_prop_pval_lookup.js ***!
  \********************************************/
/*! no static exports found */function(t,e){t.exports={p:[.5,.4800611941616275,.460172162722971,.4403823076297575,.42074029056089696,.4012936743170763,.3820885778110473,.3631693488243809,.3445782583896758,.32635522028791997,.3085375387259869,.29115968678834636,.27425311775007355,.2578461108058647,.24196365222307303,.2266273523768682,.2118553985833967,.19766254312269238,.18406012534675947,.17105612630848183,.15865525393145707,.1468590563758959,.13566606094638267,.12507193563715024,.11506967022170828,.10564977366685535,.09680048458561036,.08850799143740196,.08075665923377107,.0735292596096483,.06680720126885807,.06057075800205901,.054799291699557974,.049471468033648075,.044565462758543006,.040059156863817086,.03593031911292579,.03215677479561371,.028716559816001783,.02558805952163861,.022750131948179195,.020182215405704383,.017864420562816542,.0157776073910905,.013903447513498595,.012224472655044696,.010724110021675795,.009386705534838566,.008197535924596114,.007142810735271415,.006209665325776132,.005386145954066684,.004661188023718747,.004024588542758303,.0034669738030406647,.002979763235054555,.002555130330427929,.0021859614549132405,.0018658133003840339,.0015888696473648667,.0013498980316300933,.0011442068310226977,.0009676032132183563,.0008163523128285604,.0006871379379158471,.0005770250423907659,.00048342414238377663,.0004040578018640207,.0003369292656768799,.00028029327681617744,.00023262907903552502,.00019261557563563279,.00015910859015753364,.00013112015442048433,.00010779973347738823,8841728520080377e-20,7234804392511979e-20,59058912418922374e-21,48096344017602614e-21,39075596597787456e-21,3167124183311986e-20,2560881647404149e-20,20657506912546683e-21,16623763729652213e-21,1334574901590631e-20,10688525774934402e-21,8539905470991794e-21,6806876599334031e-21,5412543907703841e-21,4293514469971858e-21,33976731247300535e-22,26822957796388472e-22,2112454702502842e-21,16596751443714555e-22,13008074539172771e-22,10170832425687032e-22,7.933281519755892e-7,6.173073720091925e-7,4.791832765903185e-7,3.710674079633327e-7,2.8665157187919333e-7,2.2090503226954194e-7,1.6982674071475937e-7,1.3024322953320117e-7,9.96442631693347e-8,7.6049605164887e-8,5.790134039964557e-8,4.397711594005869e-8,3.332044848542845e-8,2.518491005446105e-8,1.898956246588768e-8,1.4283479893922661e-8,1.0717590258310852e-8,8.022391850663474e-9,5.99037140106353e-9,4.462172453901611e-9,3.3157459783261365e-9,2.4578650618080152e-9,1.8175078630994235e-9,1.3407124440918662e-9,9.865876450376946e-10,7.242291705137605e-10,5.303423262948808e-10,3.8741473466756636e-10,2.823158037043268e-10,2.0522634252189396e-10,1.4882282217622966e-10,1.0765746385121517e-10,7.768847581709776e-11,5.592507575942645e-11,4.016000583859088e-11,2.876854173604311e-11,2.055788909399508e-11,1.4654650977302715e-11,1.0420976987965154e-11,7.392257778017794e-12,5.230957544144525e-12,3.692499427235561e-12,2.600126965638173e-12,1.826431061976961e-12,1.279812543885835e-12,8.945889558769844e-13,6.23784446333152e-13,4.3388950271780343e-13,3.010627981117422e-13,2.0838581586720548e-13,1.4388386381575764e-13,9.910342749547509e-14,6.809224890620016e-14,4.6670115887190274e-14,3.1908916729108844e-14,2.1762912097085575e-14,1.4806537490047908e-14,1.0048965656526223e-14,6.803311540773901e-15,4.594627435778562e-15,3.095358771958668e-15,2.0801863521393674e-15,1.394517146659261e-15,9.325575771681205e-16,6.22096057427174e-16,4.139701816273122e-16,2.747959392398221e-16,1.8196213635266084e-16,1.2019351542735647e-16,7.919726314642476e-17,5.2055697448902465e-17,3.413148326458146e-17,2.232393197288031e-17,1.456514112590909e-17,9.47953482220325e-18,6.154425590850395e-18,3.985804962848151e-18,2.5749715380118873e-18,1.6594208699647519e-18,1.0667637375474856e-18,6.840807685935497e-19,4.375964799309017e-19,2.7923343749396233e-19,1.7774117841455144e-19,1.1285884059538324e-19,7.148417011269684e-20,4.516591491435403e-20,2.846677408460209e-20,1.7897488120140146e-20,1.1224633591327901e-20,7.022284240441541e-21,4.38238629906646e-21,2.7281535713460872e-21,1.6941535024881097e-21,1.0494515075362604e-21,6.484814453077208e-22,3.9972212057261192e-22,2.4577864834723153e-22,1.507493168810159e-22,9.223413524939353e-23,5.629282311376514e-23,3.4271987941135974e-23,2.0813752194932085e-23,1.2609160670206559e-23],z:[0,.05,.1,.15000000000000002,.2,.25,.30000000000000004,.35000000000000003,.4,.45,.5,.55,.6000000000000001,.65,.7000000000000001,.75,.8,.8500000000000001,.9,.9500000000000001,1,1.05,1.1,1.1500000000000001,1.2000000000000002,1.25,1.3,1.35,1.4000000000000001,1.4500000000000002,1.5,1.55,1.6,1.6500000000000001,1.7000000000000002,1.75,1.8,1.85,1.9000000000000001,1.9500000000000002,2,2.0500000000000003,2.1,2.15,2.2,2.25,2.3000000000000003,2.35,2.4000000000000004,2.45,2.5,2.5500000000000003,2.6,2.6500000000000004,2.7,2.75,2.8000000000000003,2.85,2.9000000000000004,2.95,3,3.0500000000000003,3.1,3.1500000000000004,3.2,3.25,3.3000000000000003,3.35,3.4000000000000004,3.45,3.5,3.5500000000000003,3.6,3.6500000000000004,3.7,3.75,3.8000000000000003,3.85,3.9000000000000004,3.95,4,4.05,4.1000000000000005,4.15,4.2,4.25,4.3,4.3500000000000005,4.4,4.45,4.5,4.55,4.6000000000000005,4.65,4.7,4.75,4.800000000000001,4.8500000000000005,4.9,4.95,5,5.050000000000001,5.1000000000000005,5.15,5.2,5.25,5.300000000000001,5.3500000000000005,5.4,5.45,5.5,5.550000000000001,5.6000000000000005,5.65,5.7,5.75,5.800000000000001,5.8500000000000005,5.9,5.95,6,6.050000000000001,6.1000000000000005,6.15,6.2,6.25,6.300000000000001,6.3500000000000005,6.4,6.45,6.5,6.550000000000001,6.6000000000000005,6.65,6.7,6.75,6.800000000000001,6.8500000000000005,6.9,6.95,7,7.050000000000001,7.1000000000000005,7.15,7.2,7.25,7.300000000000001,7.3500000000000005,7.4,7.45,7.5,7.550000000000001,7.6000000000000005,7.65,7.7,7.75,7.800000000000001,7.8500000000000005,7.9,7.95,8,8.05,8.1,8.15,8.200000000000001,8.25,8.3,8.35,8.4,8.450000000000001,8.5,8.55,8.6,8.65,8.700000000000001,8.75,8.8,8.85,8.9,8.950000000000001,9,9.05,9.1,9.15,9.200000000000001,9.25,9.3,9.35,9.4,9.450000000000001,9.5,9.55,9.600000000000001,9.65,9.700000000000001,9.75,9.8,9.850000000000001,9.9,9.950000000000001]}},"./src/cats/binom_test.js":
/*!********************************!*\
  !*** ./src/cats/binom_test.js ***!
  \********************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./binom_prop_pval_lookup */"./src/cats/binom_prop_pval_lookup.js"),i=n(/*! mathjs/core */"./node_modules/mathjs/core.js").create();i.import(n(/*! mathjs/lib/function/probability/factorial */"./node_modules/mathjs/lib/function/probability/factorial.js")),t.exports=function(t,e,n){var o,a=i.factorial;function s(t,e,n){return n=a(e)/(a(t)*a(e-t))*(Math.pow(n,t)*Math.pow(1-n,e-t))}return o=function(t,e,n){for(var r=0,i=t;i<e+1;i++)r+=s(i,e,n);return r}(t,e,n),isNaN(o)&&(o=function(t,e,n){for(var i=(t-e*n)/Math.sqrt(e*n*(1-n)),a=r.z,s=r.p,u=-1,l=!1,c=0;c<a.length;c++)i<a[c]&&!1===l&&(u=c,l=!0);return-1===u&&(u=a.length-1),o=s[u]}(t,e,n)),o}},"./src/cats/calc_cat_cluster_breakdown.js":
/*!************************************************!*\
  !*** ./src/cats/calc_cat_cluster_breakdown.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./binom_test */"./src/cats/binom_test.js");t.exports=function(t,e,n){"both"===n&&(n="row");var i,o=e.all_names,a=[],s=t.network[n+"_nodes"],u=null,l=!1;_.each(s,function(t){(i=t.name).indexOf(": ")>=0&&(i=i.split(": ")[1]),o.indexOf(i)>=0&&a.push(t)});var c=[];if(null!==t.viz.cat_info[n]){for(var f,h,p,d=t.viz.cat_info[n],m=_.keys(d),g=[],v=[],y=0;y<m.length;y++)p="cat-"+String(y),"cat_strings"===t.viz.cat_info[n][p].type?(f=t.viz.cat_names[n][p],v.push(f),g.push(p)):"number in clust"===t.viz.cat_names[n][p]&&(u=p,l=!0);var b,x,w={},j={},M=4;if(l&&(M=5),x=f===p,v.length>0){var A,k=o.length;_.each(g,function(e){if(h=e.split("-")[1],f=v[h],x)if(e.indexOf("-")>=0){var i=parseInt(e.split("-")[1],10)+1;f="Category "+String(i)}else f="Category";var o,s;w[f]={},_.each(a,function(t){(A=t[e]).indexOf(": ")>=0&&(A=A.split(": ")[1]),A in w[f]?(w[f][A].num_nodes=w[f][A].num_nodes+1,null!==u&&(w[f][A].num_nodes_ds=w[f][A].num_nodes_ds+parseInt(t[u].split(": ")[1],10))):(w[f][A]={},w[f][A].num_nodes=1,null!==u&&(w[f][A].num_nodes_ds=parseInt(t[u].split(": ")[1],10)))}),(j={}).type_name=f,j.num_in_clust=k,b=[];var l=w[f];for(var p in l){var d=t.viz.cat_info[n][e].cat_hist[p]/t.network[n+"_nodes"].length;s=x?p:f+": "+p;var m=l[p].num_nodes,g=r(m,k,d);if(_.has(l[p],"num_nodes_ds"))var y=l[p].num_nodes_ds;else y=null;o=t.viz.cat_colors[n][e][s],b.push([e,s,l[p],o,m,y,g])}b.sort(function(t,e){return e[M]-t[M]}),j.bar_data=b,c.push(j)})}}return c}},"./src/cats/cat_breakdown_bars.js":
/*!****************************************!*\
  !*** ./src/cats/cat_breakdown_bars.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i,o,a){var s=t.viz.cat_bar_width,u=t.viz.cat_bar_height,l=e.bar_data[0][i];e.bar_data=e.bar_data.slice(0,o);var c=e.type_name;c.length>=25&&(c=c.slice(0,25)+".."),n.append("text").classed("cat_graph_title",!0).text(c).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);n.append("line").attr("x1",0).attr("x2",s).attr("y1",4).attr("y2",4).attr("stroke","blue").attr("stroke-width",1).attr("opacity",1);var f=d3.scale.linear().domain([0,l]).range([0,s]);a.append("rect").attr("height",u+"px").attr("width",function(t){return f(t[i])+"px"}).attr("fill",function(t){return t[3]}).attr("opacity",t.viz.cat_colors.opacity).attr("stroke","grey").attr("stroke-width","0.5px"),a.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(": ")>0&&(e=e.split(": ")[1]),e.indexOf("<p>")>0&&(e=e.split("<p>")[0]),e.length>=25&&(e=e.slice(0,25)+".."),e}).attr("transform",function(){return"translate(5, "+.75*u+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","right")}},"./src/cats/cat_breakdown_values.js":
/*!******************************************!*\
  !*** ./src/cats/cat_breakdown_values.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i,o,a,s){var u=t.viz.cat_bar_width,l=t.viz.cat_bar_height;e.append("text").text("Count").attr("transform",function(){return"translate("+(u+o)+", 0)"}),e.append("text").text("Pct").attr("transform",function(){return"translate("+(u+o+60)+", 0)"}),e.append("text").text("P-val").attr("transform",function(){return"translate("+(u+o+115)+", 0)"}),i&&e.append("text").text("Clusters").attr("transform",function(){return"translate("+(u+150)+", 0)"});n.append("text").classed("count_labels",!0).text(function(t){var e=t[a];return e=e.toLocaleString(),String(e)}).attr("transform",function(){return"translate("+(u+o+35)+", "+.75*l+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),n.append("text").classed("count_labels",!0).text(function(t){var e=t[a]/s*100;return e=(e=Math.round(10*e)/10).toLocaleString(),String(e)}).attr("transform",function(){return"translate("+(u+o+35+47)+", "+.75*l+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),n.append("text").classed("count_labels",!0).text(function(t){var e=t[6];return e=e<.001?(e=parseFloat(e.toPrecision(3))).toExponential():parseFloat(e.toPrecision(2))}).attr("transform",function(){return"translate("+(u+o+35+112)+", "+.75*l+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),i&&n.append("text").classed("count_labels",!0).text(function(t){return String(t[r].toLocaleString())}).attr("transform",function(){return"translate("+(u+35+150+20)+", "+.75*l+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end")}},"./src/cats/check_if_value_cats.js":
/*!*****************************************!*\
  !*** ./src/cats/check_if_value_cats.js ***!
  \*****************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t[0],n=!1,r=!1,i="cat_strings",o=NaN,a=[],s=null;if("string"==typeof e&&e.indexOf(": ")>-1&&(n=!0,e=e.split(": ")[1]),0==isNaN(e)&&(r=!0),r&&(i="cat_values",_.each(t,function(t){n&&(t=t.split(": ")[1]),!0===isNaN(t)?i="cat_strings":(t=parseFloat(t),a.push(t))})),"cat_values"===i){var u=_.max(a,function(t){return Math.abs(t)});o=Math.abs(u),s=d3.scale.linear().domain([0,o]).range([0,1])}var l={};return l.type=i,l.max_abs_val=o,l.cat_scale=s,l}},"./src/cats/generate_cat_array.js":
/*!****************************************!*\
  !*** ./src/cats/generate_cat_array.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){u={};var n,r,i,o=[],a=t.network[e+"_nodes"][0],s=_.keys(a),u={};_.each(s,function(t){t.indexOf("cat-")>=0&&(n=a[t],i=parseInt(t.split("cat-")[1],10),r=n.indexOf(": ")>=0?n.split(": ")[0]:t,u[i]=r)});var l,c=_.keys(u).sort();return _.each(c,function(t){(l={}).cat_title=u[t],l.cats=[],o.push(l)}),o}},"./src/cats/generate_cat_info.js":
/*!***************************************!*\
  !*** ./src/cats/generate_cat_info.js ***!
  \***************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./check_if_value_cats */"./src/cats/check_if_value_cats.js");t.exports=function(t){var e,n,i={};i.show_categories={},i.all_cats={},i.cat_names={},i.cat_info={},i.cat_bar_width=180,i.cat_bar_height=20;var o={row:null,col:null};i.cat_colors={},i.cat_colors.value_opacity=o,_.each(["row","col"],function(o){i.show_categories[o]=!1,i.all_cats[o]=[];var a=_.keys(t.network[o+"_nodes"][0]);a=a.sort(),_.each(a,function(t){t.indexOf("cat-")>=0&&(i.show_categories[o]=!0,i.all_cats[o].push(t))}),i.cat_info[o]=null,i.cat_colors[o]={},i.cat_info[o]={},i.cat_names[o]={},_.each(i.all_cats[o],function(a){var s=t.network[o+"_nodes"][0];"string"==typeof s[a]&&s[a].indexOf(": ")>0?(e=s[a].split(": ")[0],i.cat_names[o][a]=e):i.cat_names[o][a]=a;var u=_.pluck(t.network[o+"_nodes"],a),l=[];_.each(u,function(t){var e;e=t.indexOf(": ")>0?t.split(": ")[1]:t,l.push(e)});var c=_.uniq(u).sort();if("cat_strings"===(n=r(c)).type){var f=_.countBy(l);n.cat_hist=f}else n.cat_hist=null;i.cat_info[o][a]=n,i.cat_colors[o][a]={}}),i.cat_colors[o]=t.network.cat_colors[o]}),i.cat_colors.opacity=.6,i.cat_colors.active_opacity=.9,t.viz=i}},"./src/cats/make_cat_args.js":
/*!***********************************!*\
  !*** ./src/cats/make_cat_args.js ***!
  \***********************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../draws/mat3_transform */"./src/draws/mat3_transform.js"),i=n(/*! ./../colors/color_to_rgba */"./src/colors/color_to_rgba.js");t.exports=function(t,e,n,o){var a,s,u,l="cat-"+String(o),c=i("purple",.95),f=e.labels["num_"+n];"col"===n?(s=e.viz_dim.heat_size.x,u=e.viz_dim.mat_size.y,a=s/.5/f):(s=e.viz_dim.heat_size.y,u=e.viz_dim.mat_size.x,a=e.viz_dim.heat_size.y/.5/f);for(var h=-u-.04+.025*(o+1),p=[],d=0;d<f;d++){var m,g=e.network[n+"_nodes"][d][l];if("cat_colors"in e.network)if(l in e.network.cat_colors[n])try{m=e.network.cat_colors[n][l][g]}catch(t){m="white"}else m="white";else m="white";p[d]=i(m,1)}const v=t.buffer({length:f,usage:"dynamic"});v(p),e.color_arr=p;var y,_=r.scaling(2,1);"row"===n?y=0:"col"===n&&(y=Math.PI/2);var b=r.rotation(y);return{vert:"\n      precision highp float;\n      attribute vec2 ini_position;\n      attribute vec2 cat_pos_att_inst;\n      attribute vec2 cat_pos_att_new;\n      attribute vec4 color_att;\n      uniform float interp_uni;\n      uniform bool run_animation;\n\n\n      uniform mat3 mat_rotate;\n      uniform mat3 scale_y;\n      uniform mat4 zoom;\n      uniform float top_offset;\n\n      varying vec3 new_position;\n      varying vec3 vec_translate;\n      varying vec2 cat_pos;\n\n      // pass varying variable to fragment from vector\n      varying vec4 color_vary;\n\n      void main () {\n\n        new_position = vec3(ini_position, 0);\n\n        // interpolate between the two positions using the interpolate uniform\n        if (run_animation == true){\n          cat_pos = mix(cat_pos_att_inst, cat_pos_att_new, interp_uni);\n        } else {\n          cat_pos = cat_pos_att_inst;\n        }\n\n        vec_translate = vec3(top_offset, cat_pos[0], 0);\n\n        // rotate translated triangles\n        new_position = mat_rotate * ( new_position + vec_translate ) ;\n\n        // depth is being set to 0.45\n        gl_Position = zoom * vec4( vec2(new_position), 0.45, 1);\n\n        // pass attribute (in vert) to varying in frag\n        color_vary = color_att;\n\n      }\n    ",frag:"\n\n      precision mediump float;\n      uniform vec4 triangle_color;\n\n      // use the varying being passed from the vertex shader\n      varying vec4 color_vary;\n\n      // color triangle red\n      void main () {\n\n        // gl_FragColor = vec4(0.6, 0.6, 0.6, opacity_vary);\n\n        // defining the triangle color using a uniform\n        // gl_FragColor = triangle_color;\n\n        // define the triangle color using a varying\n        gl_FragColor = color_vary;\n      }\n\n    ",attributes:{ini_position:[[.04,a/2],[.02,a/2],[.04,-a/2],[.02,-a/2],[.04,-a/2],[.02,a/2]],cat_pos_att_inst:{buffer:t.buffer(e.cat_arrs.inst[n][o]),divisor:1},cat_pos_att_new:{buffer:t.buffer(e.cat_arrs.new[n][o]),divisor:1},color_att:{buffer:v,divisor:1}},uniforms:{zoom:function(t){return t.view},mat_rotate:b,scale_y:_,top_offset:h,triangle_color:c,interp_uni:(t,e)=>Math.max(0,Math.min(1,e.interp_prop)),run_animation:t.prop("run_animation")},count:6,instances:f,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/cats/make_cat_breakdown_graph.js":
/*!**********************************************!*\
  !*** ./src/cats/make_cat_breakdown_graph.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./cat_breakdown_bars */"./src/cats/cat_breakdown_bars.js"),i=n(/*! ./cat_breakdown_values */"./src/cats/cat_breakdown_values.js");t.exports=function(t,e,n,o,a){if(n.length>0){var s=370,u=!1;null!==n[0].bar_data[0][5]&&(s+=100,u=!0);var l=e.all_names.length,c=4;if(u){c=5;var f=n[0].bar_data;l=0,_.each(f,function(t){l+=t[5]})}var h=20;_.each(n.slice(0,3),function(t){var e=t.bar_data.length;e>25&&(e=25),h+=27*(e+1)});var p=a.append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",h+"px").style("width",s+"px");a.style("margin-bottom","5px"),p.append("rect").classed("cat_background",!0).attr("height",h+"px").attr("width",s+"px").attr("fill","white").attr("opacity",1),n=n.slice(0,3);var d=d3.scale.linear().domain([0,1e5]).range([20,30]),m=27;_.each(n,function(e){var n=e.bar_data[0][c],o=d(n),f=p.append("g").classed("cat_graph_group",!0).attr("transform","translate(10, "+m+")"),g=f.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)").selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){return"translate(0,"+23*e+")"});r(t,e,f,27,c,25,g),i(t,f,g,4,u,o,c,l),m+=27*(e.bar_data.length+1);var v=t.zoom_data.x.cursor_position-s,y=t.zoom_data.y.cursor_position-h;a.style("top",y+"px").style("left",v+"px")})}}},"./src/cats/make_cat_position_array.js":
/*!*********************************************!*\
  !*** ./src/cats/make_cat_position_array.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r){var i,o,a=t.labels["num_"+e];"col"===e?i=(o=t.viz_dim.heat_size.x)/.5/a:(o=t.viz_dim.heat_size.y,i=t.viz_dim.heat_size.y/.5/a);var s,u=[];for(s=0;s<a;s++){var l,c;"row"==e?(l=a-t.network[e+"_nodes"][s][r]-1,c=-(t.viz_dim.mat_size.y-t.viz_dim.heat_size.y)):(l=t.network[e+"_nodes"][s][r],c=t.viz_dim.mat_size.x-t.viz_dim.heat_size.x),u[s]=[o-i/2-l*i+c,0]}return u}},"./src/colors/color_table.js":
/*!***********************************!*\
  !*** ./src/colors/color_table.js ***!
  \***********************************/
/*! no static exports found */function(t,e){t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50],rebeccapurple:[102,51,153,1]}},"./src/colors/color_to_rgba.js":
/*!*************************************!*\
  !*** ./src/colors/color_to_rgba.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./color_table.js */"./src/colors/color_table.js");t.exports=function(t,e=1){var n;if(t in r){var i=r[t];i.push(e),n=[i[0],i[1],i[2],e]}else{var o;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(t))3==(o=t.substring(1).split("")).length&&(o=[o[0],o[0],o[1],o[1],o[2],o[2]]),n=[((o="0x"+o.join(""))>>16&255)/256,(o>>8&255)/256,(255&o)/256,e];else n=[0,0,0,e]}return n}},"./src/control_panel/build_control_panel.js":
/*!**************************************************!*\
  !*** ./src/control_panel/build_control_panel.js ***!
  \**************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../reorders/run_reorder */"./src/reorders/run_reorder.js");t.exports=function(t,e){var n=d3.select(e.params.root+" .control-container")[0][0],i=e.params.viz_width,o=d3.select(n).style("height","135px").style("width",i+"px").append("svg").style("height","135px").style("width",i+"px");o.append("rect").style("height","135px").style("width",i+"px").style("position","absolute").style("fill","white").attr("class","control-panel-background");o.append("rect").style("height","1px").style("width",i+"px").style("position","absolute").style("stroke","#eee").style("stroke-width",3).attr("transform",function(){return"translate( 0, 134)"});var a={height:32,width:63,buffer:12};a.x_trans=a.width+a.buffer,a.fs=12;var s={row:{},col:{}};s.row.x_trans=65,s.col.x_trans=65;s.col.y_trans=47,s.row.y_trans=s.col.y_trans+a.height+a.buffer;var u=["clust","sum","var","disp","alpha"];o.append("text").classed("reorder_title",!0).text("reorder".toUpperCase()).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("font-size",a.fs).style("text-anchor","middle").style("stroke","#47515b").style("alignment-baseline","middle").style("letter-spacing","2px").style("cursor","default").style("-webkit-user-select","none").attr("transform",function(){return"translate( 247, "+(47-2*a.buffer+2)+")"}),o.append("rect").style("height","1px").style("width",function(){return(u.length+1)*a.width-a.buffer}).style("position","absolute").style("stroke","#eee").style("stroke-width",2).attr("transform",function(){return"translate( "+(a.x_trans-a.buffer+1)+", "+(47-a.buffer+2)+")"}),_.each(["row","col"],function(n){o.append("g").attr("transform",function(){return"translate(0, "+s[n].y_trans+")"}).append("text").classed("reorder_title",!0).text(n.toUpperCase()).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("font-size",a.fs).style("text-anchor","middle").style("stroke","#47515b").style("alignment-baseline","middle").style("letter-spacing","2px").style("cursor","default").style("-webkit-user-select","none").attr("transform","translate(30, "+a.height/2+")");var i=o.append("g");i.classed(n+"-reorder-buttons",!0);var l=i.selectAll("g").data(u).enter().append("g").attr("transform",function(t,e){return"translate("+(a.x_trans*e+s[n].x_trans)+", "+s[n].y_trans+")"}).on("click",function(i){var o=i.replace("sum","rank").replace("var","rankvar");e.params.order.inst[n]!=o&&"disp"!=o&&(r(t,e,n,i),d3.select(e.params.root+" ."+n+"-reorder-buttons").selectAll("rect").style("stroke","#eee"),d3.select(this).select("rect").style("stroke","#0000FF75"))});l.append("rect").style("height",a.height).style("width",a.width).style("fill","white").style("rx",10).style("ry",10).style("stroke",function(t){return e.params.order.inst[n]==t?"#0000FF75":"#eee"}).style("stroke-width",2.5),l.append("text").classed("button-name",!0).text(function(t){return t.toUpperCase()}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("font-size",a.fs).style("text-anchor","middle").style("stroke","#47515b").style("alignment-baseline","middle").style("letter-spacing","2px").style("cursor","default").style("-webkit-user-select","none").attr("transform","translate("+a.width/2+", "+a.height/2+")")});var l=e.params,c=d3.select(l.root+" .canvas-container").append("g").style("position","absolute").style("top","125px").style("left","845px").classed("col-cat-title-group",!0).append("svg").style("height",function(){return 10*l.cat_data.col.length+5+"px"}).style("width","55px").classed("col-cat-title-svg",!0).append("g").classed("col-cat-reorder-group",!0);c.selectAll("rect").data(l.cat_data.col).enter().append("text").text(function(t){return t.cat_title}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800).style("font-size",12).attr("transform",function(t,e){return"translate( 0, "+(11*e+10)+")"}),c.selectAll("rect").data(l.cat_data.col).enter().append("rect").style("width","55px").style("height",function(){return"12px"}).style("fill","white").style("opacity",0).on("dblclick",function(n,i){r(t,e,"col","cat_"+String(i)+"_index"),e.params.order.inst.col="cat_"+String(i)+"_index",d3.select(e.params.root+" .col-reorder-buttons").selectAll("rect").style("stroke","#eee")}).attr("transform",function(t,e){return"translate( 0, "+12*e+")"}).style("user-select","none")}},"./src/dendrogram/build_dendrogram_sliders.js":
/*!****************************************************!*\
  !*** ./src/dendrogram/build_dendrogram_sliders.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./build_single_dendro_slider */"./src/dendrogram/build_single_dendro_slider.js");t.exports=function(t,e){var n,i;_.each(["row","col"],function(o){"row"===o?(n=150,i=e.params.viz_width-25):(n=e.params.viz_height-100,i=50),d3.select(e.params.root+" .canvas-container").append("svg").style("height","130px").style("width","40px").style("position","absolute").style("top",n+"px").style("left",i+"px").attr("class",o+"_dendro_slider_svg").attr("transform",function(){return"rotate("+("row"===o?0:-90)+")"}).append("rect").style("height","130px").style("width","25px").style("fill","white"),r(t,e,o)})}},"./src/dendrogram/build_single_dendro_slider.js":
/*!******************************************************!*\
  !*** ./src/dendrogram/build_single_dendro_slider.js ***!
  \******************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./change_groups */"./src/dendrogram/change_groups.js");t.exports=function(t,e,n){var i=100,o=i+20,a=d3.behavior.drag().on("drag",function(){e.params.is_slider_drag=!0;var o=d3.event.y;o<0&&(o=0);o>i&&(o=i);this.nextSibling&&this.parentNode.appendChild(this);var a=10-(o=d3.round(o,-1))/10;d3.select(this).attr("transform","translate(0, "+o+")"),r(t,e.params,n,a)}).on("dragend",function(){e.params.is_slider_drag=!1}),s=d3.select(e.params.root+" ."+n+"_dendro_slider_svg").append("g").classed(n+"_slider_group",!0).attr("transform",function(){return"translate(10, "+o/10+")"});s.append("rect").classed(n+"_slider_background",!0).attr("height",o+"px").attr("width","20px").attr("fill","red").attr("transform",function(){return"translate(-10, -5)"}).style("opacity",0),s.append("line").style("stroke-width",i/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return i-2}).on("click",l);var u=-i/40;s.append("path").style("fill","black").attr("transform","translate("+u+", 0)").attr("d",function(){return"M0,0 L0, "+i+" L"+i/10+",0 Z"}).style("opacity",.35).on("click",l);function l(){var i=d3.mouse(this),o=d3.round(i[1],-1);d3.select(e.params.root+" ."+n+"_group_circle").attr("transform","translate(0, "+o+")");var a=10-o/10;r(t,e.params,n,a)}s.append("circle").classed(n+"_group_circle",!0).attr("r",.08*i).attr("transform",function(){return"translate(0, "+i/2+")"}).style("fill","blue").style("opacity",.35).on("mouseover",function(){d3.select(this).style("opacity",.6)}).on("mouseout",function(){d3.select(this).style("opacity",.35)}).call(a)}},"./src/dendrogram/calc_dendro_triangles.js":
/*!*************************************************!*\
  !*** ./src/dendrogram/calc_dendro_triangles.js ***!
  \*************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n,r,i,o={},a=t.dendro.group_level[e],s=t.network[e+"_nodes"],u=t.labels["num_"+e];"row"===e?(r=t.viz_dim.heat_size.y,i=r/u):(r=t.viz_dim.heat_size.x,i=r/u);var l=t.order.inst[e];_.each(s,function(r){var s,u=r[l],c=r.group[a];"row"===e?(n=t.viz_dim.mat_size.y-t.viz_dim.heat_size.y,s=-t.node_canvas_pos.y_arr[u]-2*i-2*n):(n=t.viz_dim.mat_size.x-t.viz_dim.heat_size.x,s=-t.node_canvas_pos.x_arr[u]-2*i+2*n);var f=s+i,h=r.name;h.indexOf(": ")>=0&&(h=h.split(": ")[1]),!1===_.has(o,c)&&(o[c]={},o[c].name_top=h,o[c].name_bot=h,o[c].pos_top=s,o[c].pos_bot=f,o[c].pos_mid=(s+f)/2,o[c].name=c,o[c].all_names=[],o[c].inst_axis=e),o[c].all_names.push(h),s<o[c].pos_top&&(o[c].name_top=h,o[c].pos_top=s,o[c].pos_mid=(s+o[c].pos_bot)/2),f>o[c].pos_bot&&(o[c].name_bot=h,o[c].pos_bot=f,o[c].pos_mid=(o[c].pos_top+f)/2)});var c=[];return _.each(o,function(t){c.push(t)}),c}},"./src/dendrogram/change_groups.js":
/*!*****************************************!*\
  !*** ./src/dendrogram/change_groups.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../dendrogram/calc_dendro_triangles */"./src/dendrogram/calc_dendro_triangles.js"),i=n(/*! ./../dendrogram/make_dendro_args */"./src/dendrogram/make_dendro_args.js");t.exports=function(t,e,n,o){"row"===n?e.dendro.group_level.row=o:"col"===n&&(e.dendro.group_level.col=o),e.dendro.update_dendro=!0,e.dendro.group_level[n]=o,e.dendro.group_info[n]=r(e,n),e.dendro.dendro_args[n]=i(t,e,n)}},"./src/dendrogram/make_dendro_args.js":
/*!********************************************!*\
  !*** ./src/dendrogram/make_dendro_args.js ***!
  \********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../draws/mat3_transform */"./src/draws/mat3_transform.js"),i=n(/*! ./../colors/color_to_rgba */"./src/colors/color_to_rgba.js"),o=n(/*! ./make_dendro_arr */"./src/dendrogram/make_dendro_arr.js");t.exports=function(t,e,n){var a,s,u;"row"===n?(a=0,s=e.viz_dim.heat_size.y,u=e.viz_dim.mat_size.x):"col"===n&&(a=Math.PI/2,s=e.viz_dim.heat_size.x,u=e.viz_dim.mat_size.y);var l=e.labels["num_"+n],c=e.dendro.tri_height,f=s/l,h=o(e,n);const p=t.buffer({length:h.length,type:"float",usage:"dynamic"});p(h);var d=r.scaling(1,1),m=r.rotation(a),g=i("black",.35);return{vert:"\n      precision highp float;\n      attribute vec2 position;\n      attribute vec2 dendro_att;\n\n      uniform mat3 mat_rotate;\n      uniform mat3 mat_scale;\n      uniform mat4 zoom;\n      uniform float mat_size_offset;\n\n      varying vec3 new_position;\n      varying vec3 vec_translate;\n\n      void main () {\n\n        // offset[1] will contain dendro width\n        new_position = vec3(position[0], position[1]  * dendro_att[1], 0);\n\n        // offset[0] contains the actual offset\n        vec_translate = vec3(mat_size_offset, dendro_att[0], 0);\n\n        new_position = mat_rotate * ( mat_scale * new_position + vec_translate ) ;\n\n        // depth is being set to 0.40\n        gl_Position = zoom * vec4(new_position[0], new_position[1], 0.40, 1);\n\n      }\n    ",frag:"\n\n      precision highp float;\n      uniform vec4 triangle_color;\n\n      // color triangle red\n      void main () {\n        gl_FragColor = triangle_color;\n      }\n\n    ",attributes:{position:[[e.dendro.trap_float,2*f],[c,f],[e.dendro.trap_float,0]],dendro_att:{buffer:p,divisor:1}},uniforms:{zoom:function(t){return t.view},mat_rotate:m,mat_scale:d,mat_size_offset:u,triangle_color:g},count:3,instances:h.length,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/dendrogram/make_dendro_arr.js":
/*!*******************************************!*\
  !*** ./src/dendrogram/make_dendro_arr.js ***!
  \*******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n,r;r="row"===e?t.dendro.group_info.row:t.dendro.group_info.col;var i,o=[];return _.each(r,function(t){i=t.all_names.length,n=[t.pos_top,i],o.push(n)}),o}},"./src/draws/draw_axis_components.js":
/*!*******************************************!*\
  !*** ./src/draws/draw_axis_components.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../matrix_labels/make_col_text_args */"./src/matrix_labels/make_col_text_args.js"),i=n(/*! ./../matrix_labels/make_row_text_args */"./src/matrix_labels/make_row_text_args.js"),o=n(/*! ./../params/calc_viz_area */"./src/params/calc_viz_area.js"),a=n(/*! ./../matrix_labels/gather_text_triangles */"./src/matrix_labels/gather_text_triangles.js"),s=n(/*! ./../matrix_labels/make_viz_aid_tri_args */"./src/matrix_labels/make_viz_aid_tri_args.js"),u=n(/*! ./interp_fun */"./src/draws/interp_fun.js");t.exports=function(t,e,n,l=!1){var c;c="col"===n?"x":"y",e.cameras[n+"-labels"].draw(()=>{var f;(e.viz_aid_tri_args[n]=s(t,e,n),t(e.viz_aid_tri_args[n])(),_.each(e.cat_args[n],function(n){t(n)({interp_prop:u(e),run_animation:e.animation.running})}),"clust"===e.order.inst[n]&&"clust"===e.order.new[n]&&t(e.dendro.dendro_args[n])(),f="col"===n?r(t,e,e.zoom_data.zoom_function):i(t,e,e.zoom_data.zoom_function),l)?e.labels["num_"+n]/e.zoom_data[c].total_zoom<e.max_num_text&&(o(e),e.labels["num_"+n]>e.max_num_text&&a(e,n),t(f)(e.text_triangles.draw[n])):0!=e.text_triangles.draw[n]&&t(f)(e.text_triangles.draw[n])})}},"./src/draws/draw_background_calculations.js":
/*!***************************************************!*\
  !*** ./src/draws/draw_background_calculations.js ***!
  \***************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../matrix_labels/vectorize_label */"./src/matrix_labels/vectorize_label.js"),i=n(/*! ./../matrix_labels/drop_label_from_queue */"./src/matrix_labels/drop_label_from_queue.js");t.exports=function(t,e){_.each(["row","col"],function(t){if(e.labels.queue.low[t].length>0){var n=e.labels.queue.low[t][0],o=r(e,t,n);e.text_triangles[t][n]=o,i(e.labels.queue.low[t],t,n)}})}},"./src/draws/draw_commands.js":
/*!************************************!*\
  !*** ./src/draws/draw_commands.js ***!
  \************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./draw_matrix_components */"./src/draws/draw_matrix_components.js"),i=n(/*! ./draw_axis_components */"./src/draws/draw_axis_components.js"),o=n(/*! ./draw_tooltip_components */"./src/draws/draw_tooltip_components.js"),a=n(/*! ./draw_spillover_components */"./src/draws/draw_spillover_components.js");t.exports=function(t,e){r(t,e),i(t,e,"row",e.labels.draw_labels),i(t,e,"col",e.labels.draw_labels),a(t,e),e.tooltip.show_tooltip&&e.tooltip.in_bounds_tooltip&&o(t,e),e.labels.draw_labels&&(e.labels.draw_labels=!1)}},"./src/draws/draw_interacting.js":
/*!***************************************!*\
  !*** ./src/draws/draw_interacting.js ***!
  \***************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./draw_commands */"./src/draws/draw_commands.js"),i=n(/*! ./../interactions/final_interaction_frame */"./src/interactions/final_interaction_frame.js");t.exports=function(t,e){e.interact.total=e.interact.total+1,r(t,e),setTimeout(i,50,t,e),e.animation.initialize_viz=!1,e.animation.time_remain>0&&(e.animation.time_remain=e.animation.time_remain-1)}},"./src/draws/draw_labels_tooltips_or_dendro.js":
/*!*****************************************************!*\
  !*** ./src/draws/draw_labels_tooltips_or_dendro.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./draw_commands */"./src/draws/draw_commands.js");t.exports=function(t,e){r(t,e),e.tooltip.remove_tooltip_frame=!0,e.tooltip.show_tooltip&&(e.tooltip.show_tooltip=!1),e.dendro.update_dendro&&(e.dendro.update_dendro=!1)}},"./src/draws/draw_matrix_components.js":
/*!*********************************************!*\
  !*** ./src/draws/draw_matrix_components.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./interp_fun */"./src/draws/interp_fun.js");t.exports=function(t,e){e.cameras.mat.draw(()=>{t(e.matrix_args.regl_props.rects)({interp_prop:r(e),run_animation:e.animation.running})})}},"./src/draws/draw_mouseover.js":
/*!*************************************!*\
  !*** ./src/draws/draw_mouseover.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../interactions/final_mouseover_frame */"./src/interactions/final_mouseover_frame.js");t.exports=function(t,e){d3.selectAll(e.root+" .group-svg-tooltip").remove(),e.zoom_data.x.total_mouseover=e.zoom_data.x.total_mouseover+1,e.tooltip.remove_tooltip_frame&&(e.tooltip.remove_tooltip_frame=!1),setTimeout(r,50,t,e)}},"./src/draws/draw_spillover_components.js":
/*!************************************************!*\
  !*** ./src/draws/draw_spillover_components.js ***!
  \************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){e.cameras.static.draw(()=>{var n=e.spillover_args,r=e.spillover_triangles;t(n.mat_sides)(r.mat_sides),t(n.cats)(r.cats),t(n.mat_corners)(r.mat_corners),t(n.label_corners)(r.label_corners)})}},"./src/draws/draw_tooltip_components.js":
/*!**********************************************!*\
  !*** ./src/draws/draw_tooltip_components.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../tooltip/make_matrix_cell_tooltip */"./src/tooltip/make_matrix_cell_tooltip.js");t.exports=function(t,e){r(e)}},"./src/draws/end_animation.js":
/*!************************************!*\
  !*** ./src/draws/end_animation.js ***!
  \************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../matrix_labels/update_text_triangle_order */"./src/matrix_labels/update_text_triangle_order.js"),i=n(/*! ./../matrix_labels/calc_text_offsets */"./src/matrix_labels/calc_text_offsets.js"),o=n(/*! ./../matrix_labels/generate_ordered_labels */"./src/matrix_labels/generate_ordered_labels.js");t.exports=function(t,e){e.animation.running=!1,e.animation.run_animation=!1,e.matrix_args.regl_props.rects.attributes.pos_att_ini={buffer:t.buffer(e.arrs.position_arr.new),divisor:1},_.each(["row","col"],function(n){for(var r=0;r<e.cat_data.cat_num[n];r++)e.cat_args[n][r].attributes.cat_pos_att_inst={buffer:t.buffer(e.cat_arrs.new[n][r]),divisor:1};e.order.inst[n]=e.order.new[n],"clust"===e.order.inst[n]&&d3.select("."+n+"_dendro_slider_svg").style("display","block")}),_.each(["row","col"],function(t){e.text_triangles.draw[t]=r(e,t),i(e,t)}),o(e)}},"./src/draws/interp_fun.js":
/*!*********************************!*\
  !*** ./src/draws/interp_fun.js ***!
  \*********************************/
/*! no static exports found */function(t,e,n){const r=n(/*! eases/cubic-in-out */"./node_modules/eases/cubic-in-out.js");t.exports=function(t){return r((t.animation.time-t.animation.last_switch_time)/t.animation.ani_duration)}},"./src/draws/mat3_transform.js":
/*!*************************************!*\
  !*** ./src/draws/mat3_transform.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports={translation:function(t,e){return[1,0,0,0,1,0,t,e,1]},rotation:function(t){var e=Math.cos(t),n=Math.sin(t);return[e,-n,0,n,e,0,0,0,1]},scaling:function(t,e){return[t,0,0,0,e,0,0,0,1]}}},"./src/draws/run_viz.js":
/*!******************************!*\
  !*** ./src/draws/run_viz.js ***!
  \******************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../params/initialize_params */"./src/params/initialize_params.js");_=n(/*! underscore */"./node_modules/underscore/underscore.js");var i=n(/*! ./../cameras/reset_cameras */"./src/cameras/reset_cameras.js"),o=n(/*! ./start_animation */"./src/draws/start_animation.js"),a=n(/*! ./end_animation */"./src/draws/end_animation.js"),s=n(/*! ./draw_interacting */"./src/draws/draw_interacting.js"),u=n(/*! ./draw_mouseover */"./src/draws/draw_mouseover.js"),l=n(/*! ./draw_labels_tooltips_or_dendro */"./src/draws/draw_labels_tooltips_or_dendro.js"),c=n(/*! ./draw_background_calculations */"./src/draws/draw_background_calculations.js");t.exports=function(t,e){var n=r(t,e);return n.animation.first_frame=!0,t.frame(function({time:e}){n.animation.time=e,n.interact.total>1&&d3.selectAll(n.root+" .group-svg-tooltip").remove(),n.interact.total<0&&(n.interact.total=0),n.reset_cameras&&i(t,n),n.animation.run_animation?o(n):n.animation.time>n.animation.duration_end&&!0===n.animation.running&&a(t,n),1==n.interact.still_interacting||1==n.animation.initialize_viz||n.animation.running?s(t,n):1==n.interact.still_mouseover?(u(t,n),c(t,n)):n.labels.draw_labels||n.tooltip.show_tooltip||n.dendro.update_dendro?l(t,n):c(t,n)}),n}},"./src/draws/start_animation.js":
/*!**************************************!*\
  !*** ./src/draws/start_animation.js ***!
  \**************************************/
/*! no static exports found */function(t,e){t.exports=function(t){t.animation.run_animation=!1,t.animation.last_switch_time=t.animation.time,t.animation.running=!0,t.animation.duration_end=t.animation.last_switch_time+t.animation.ani_duration}},"./src/interactions/final_interaction_frame.js":
/*!*****************************************************!*\
  !*** ./src/interactions/final_interaction_frame.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){e.interact.total=e.interact.total-1,0==e.interact.total&&0==e.animation.initialize_viz&&(0==e.animation.first_frame?(e.labels.draw_labels=!0,e.zoom_data.x.total_mouseover):e.animation.first_frame=!1)}},"./src/interactions/final_mouseover_frame.js":
/*!***************************************************!*\
  !*** ./src/interactions/final_mouseover_frame.js ***!
  \***************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){e.zoom_data.x.total_mouseover=e.zoom_data.x.total_mouseover-1,0==e.zoom_data.x.total_mouseover&&0==e.interact.still_mouseover&&(e.tooltip.show_tooltip=!0)}},"./src/interactions/find_mouseover_element.js":
/*!****************************************************!*\
  !*** ./src/interactions/find_mouseover_element.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./get_mouseover_type */"./src/interactions/get_mouseover_type.js");t.exports=function(t,e,n){var i=e.viz_dim.heat,o=e.interact.mouseover;_.each(["row","col"],function(t){e.interact.mouseover[t]={},e.interact.mouseover[t].name=null,e.interact.mouseover[t].cats=[]}),e.interact.mouseover.value=null;var a,s={},u={},l={x:"width",y:"height"};_.each(["x","y"],function(t){e.zoom_data[t].cursor_position=n[t+"0"],s[t]=e.viz_dim.canvas[l[t]]*e.viz_dim.offcenter[t]/2,u[t]=e.zoom_data[t].cursor_position-i[t].min-s[t],u[t]=u[t]/e.zoom_data[t].total_zoom-e.zoom_data[t].total_pan_min}),r(e);var c={};if(e.tooltip.in_bounds_tooltip){var f,h=[];if("matrix-cell"===e.tooltip.tooltip_type)h=["row","col"];else if(e.tooltip.tooltip_type.indexOf("row")>=0)h=["row"];else if(e.tooltip.tooltip_type.indexOf("col")>=0){h=["col"];var p=126-e.zoom_data.y.cursor_position;p>0&&(u.x=u.x-p/e.zoom_data.x.total_zoom)}_.each(h,function(t){"row"===t?(f=Math.floor(u.y/e.tile_pix_height),c[t]=e.labels.ordered_labels[t+"_indices"][f]):(f=Math.floor(u.x/e.tile_pix_width),c[t]=e.labels.ordered_labels[t+"_indices"][f]),o[t].name=e.labels.ordered_labels[t+"s"][f],o[t].name.includes(": ")&&(o[t].name=o[t].name.split(": ")[1]),o[t].cats=[],_.each(e.cat_data[t],function(n,r){a=e.labels.ordered_labels[t+"_cats-"+r][f],o[t].cats[r]=a})}),"matrix-cell"===e.tooltip.tooltip_type&&(e.interact.mouseover.value=e.mat_data[c.row][c.col])}e.tooltip.tooltip_type.indexOf("dendro")>=0&&("row-dendro"===e.tooltip.tooltip_type&&_.each(e.dendro.group_info.row,function(t){t.all_names.includes(o.row.name)&&(o.row.dendro=t)}),"col-dendro"===e.tooltip.tooltip_type&&_.each(e.dendro.group_info.col,function(t){t.all_names.includes(o.col.name)&&(o.col.dendro=t)}))}},"./src/interactions/get_mouseover_type.js":
/*!************************************************!*\
  !*** ./src/interactions/get_mouseover_type.js ***!
  \************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e={x:{}};e.x.heat_min=125+12*t.cat_data.row.length,e.x.dendro_start=845,e.x.dendro_end=860,e.y={},e.y.heat_min=126+12*t.cat_data.col.length,e.y.dendro_start=845,e.y.dendro_end=860;var n,r={};r.x=t.zoom_data.x.cursor_position,r.y=t.zoom_data.y.cursor_position,t.tooltip.in_bounds_tooltip=!1,t.tooltip.tooltip_type=null,r.x>e.x.heat_min&&r.x<e.x.dendro_start&&r.y>e.y.heat_min&&r.y<e.y.dendro_start?(t.tooltip.in_bounds_tooltip=!0,t.tooltip.tooltip_type="matrix-cell"):r.x<=e.x.heat_min&&r.y>e.y.heat_min&&r.y<e.y.dendro_start?(t.tooltip.in_bounds_tooltip=!0,t.cat_data.row.length>0&&(n=Math.floor((e.x.heat_min-r.x)/12))+1<=t.cat_data.row.length?t.tooltip.tooltip_type="row-cat-"+String(t.cat_data.row.length-n-1):t.tooltip.tooltip_type="row-label"):r.y<=e.y.heat_min&&r.x>e.x.heat_min&&r.x<e.x.dendro_start?(t.tooltip.in_bounds_tooltip=!0,t.cat_data.col.length>0&&(n=Math.floor((e.y.heat_min-r.y)/12))+1<=t.cat_data.col.length?t.tooltip.tooltip_type="col-cat-"+String(t.cat_data.col.length-n-1):t.tooltip.tooltip_type="col-label"):r.x>=e.x.dendro_start&&r.x<e.x.dendro_end&&r.y>e.y.heat_min&&r.y<e.y.dendro_start?"clust"==t.order.inst.row&&(t.tooltip.tooltip_type="row-dendro",t.tooltip.in_bounds_tooltip=!0):r.y>=e.y.dendro_start&&r.y<e.y.dendro_end&&r.x>e.x.heat_min&&r.x<e.x.dendro_start&&"clust"==t.order.inst.col&&(t.tooltip.tooltip_type="col-dendro",t.tooltip.in_bounds_tooltip=!0)}},"./src/interactions/interaction-events.js":
/*!************************************************!*\
  !*** ./src/interactions/interaction-events.js ***!
  \************************************************/
/*! no static exports found */function(t,e,n){t.exports=function(t){var e,n,l=r({element:window,constrainZoom:!1},t||{}),c=s({}),f=l.element,h=!1,p=[null,null],d=[null,null],m=!1,g=0,v={},y=0,_={},b=o(f,function(t,e,n,r){y=t,_=r});function x(t,e){return t.preventDefault=e.preventDefault.bind(e),t.stopPropagation=e.stopPropagation.bind(e),t}function w(t){var e=this.getBoundingClientRect();v.type="wheel",v.buttons=y,v.mods=_,v.x0=t.x-e.left,v.y0=t.y-e.top,v.dx=t.deltaX,v.dy=t.deltaY,v.dz=t.deltaZ,v.dsx=1,v.dsy=1,v.dsz=1,v.theta=0,v.dtheta=0,c.emit("interaction",x(v,t))}function j(t){e=i.x(t),n=i.y(t),v.type="mousedown",v.buttons=y,v.mods=_,v.x0=e,v.y0=n,v.dx=0,v.dy=0,v.dz=0,v.dsx=1,v.dsy=1,v.dsz=1,v.theta=0,v.dtheta=0,c.emit("interactionend",x(v,t))}function M(t){var r=i.x(t),o=i.y(t);v.type="mousemove",v.buttons=y,v.mods=_,v.x0=r,v.y0=o,v.dx=r-e,v.dy=o-n,v.dz=0,v.dsx=1,v.dsy=1,v.dsz=1,v.theta=0,v.dtheta=0,e=r,n=o,c.emit("interaction",x(v,t))}function A(t){for(var e=t.identifier,n=0;n<d.length;n++)if(d[n]&&d[n].touch&&d[n].touch.identifier===e)return n;return-1}function k(t){p=[null,null];for(var e=0;e<t.changedTouches.length;e++){var n=t.changedTouches[e],r=n.identifier,i=A(r);if(-1===i&&g<2){var o=0===g,s=d[0]?1:0,l=new u;d[s]=l,g+=1,l.touch=n,a(n,f,l.position),o||(m=!1)}}g>0&&(v.type=1===g?"touchstart":"pinchstart",v.buttons=0,v.mods={},v.x0=0,v.y0=0,v.dx=0,v.dy=0,v.dz=0,v.dsx=1,v.dsy=1,v.dsz=1,v.theta=0,v.dtheta=0,c.emit("interactionstart",x(v,t)))}function z(t){for(var e,n=!1,r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];-1!==(e=A(i))&&(n=!0,d[e].touch=i,a(i,f,d[e].position))}if(n)if(1===g){for(e=0;e<d.length&&!d[e];e++);if(d[e]&&p[e]){var o=d[e].position[0],s=d[e].position[1],u=o-p[e][0],l=s-p[e][1];v.type="touch",v.buttons=0,v.mods={},v.x0=o,v.y0=s,v.dx=u,v.dy=l,v.dz=0,v.dsx=1,v.dsy=1,v.dsz=1,v.theta=0,v.dtheta=0,c.emit("interaction",x(v,t))}}else if(2===g&&p[0]&&p[1]){var h=p[0],m=p[1],y=m[0]-h[0],_=m[1]-h[1],b=d[0].position,w=d[1].position,j=w[0]-b[0],M=w[1]-b[1],k=Math.sqrt(y*y+_*_),z=Math.atan2(_,y),E=Math.sqrt(j*j+M*M),S=Math.atan2(M,j),N=.5*(m[0]+h[0]),T=.5*(m[1]+h[1]);u=.5*(w[0]+b[0]-h[0]-m[0]),l=.5*(w[1]+b[1]-h[1]-m[1]);var C=E/k,O=S-z;v.type="pinch",v.buttons=0,v.mods={},v.x0=N,v.y0=T,v.dx=u,v.dy=l,v.dz=0,v.dsx=C,v.dsy=C,v.dsz=1,v.theta=S,v.dtheta=O,c.emit("interaction",x(v,t))}d[0]&&(p[0]=d[0].position.slice()),d[1]&&(p[1]=d[1].position.slice())}function E(t){for(var e=0;e<t.changedTouches.length;e++){var n=t.changedTouches[e],r=A(n);-1!==r&&(d[r]=null,g-=1)}m||2===g||(m=!0),g<2&&(v.type=0===g?"touchend":"pinchend",v.buttons=0,v.mods={},v.x0=0,v.y0=0,v.dx=0,v.dy=0,v.dz=0,v.dsx=1,v.dsy=1,v.dsz=1,v.theta=0,v.dtheta=0,c.emit("interactionend",x(v,t)))}function S(){h||(h=!0,b.enabled=!0,f.addEventListener("wheel",w,!1),f.addEventListener("mousedown",j,!1),f.addEventListener("mousemove",M,!1),f.addEventListener("touchstart",k,!1),f.addEventListener("touchmove",z,!1),f.addEventListener("touchend",E,!1),f.addEventListener("touchcancel",E,!1))}return S(),c.enable=S,c.disable=function(){h&&(h=!1,b.enabled=!1,f.removeEventListener("wheel",w,!1),f.removeEventListener("mousedown",j,!1),f.removeEventListener("mousemove",M,!1),f.removeEventListener("touchstart",k,!1),f.removeEventListener("touchmove",z,!1),f.removeEventListener("touchend",E,!1),f.removeEventListener("touchcancel",E,!1))},c};var r=n(/*! util-extend */"./node_modules/util-extend/extend.js"),i=n(/*! mouse-event */"./node_modules/mouse-event/mouse.js"),o=n(/*! mouse-change */"./node_modules/mouse-change/mouse-listen.js"),a=n(/*! mouse-event-offset */"./node_modules/mouse-event-offset/index.js"),s=n(/*! event-emitter */"./node_modules/event-emitter/index.js");function u(){this.position=[0,0],this.touch=null}},"./src/interactions/keep_track_of_interactions.js":
/*!********************************************************!*\
  !*** ./src/interactions/keep_track_of_interactions.js ***!
  \********************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){0==t.interact.still_interacting&&(t.interact.still_interacting=!0,setTimeout(function(){t.interact.still_interacting=!1},100))}},"./src/interactions/keep_track_of_mouseovers.js":
/*!******************************************************!*\
  !*** ./src/interactions/keep_track_of_mouseovers.js ***!
  \******************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){0==t.interact.still_mouseover&&(t.interact.still_mouseover=!0,setTimeout(function(){t.interact.still_mouseover=!1},1e3))}},"./src/interactions/track_interaction_zoom_data.js":
/*!*********************************************************!*\
  !*** ./src/interactions/track_interaction_zoom_data.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../zoom/zoom_rules_low_mat */"./src/zoom/zoom_rules_low_mat.js"),i=n(/*! ./find_mouseover_element */"./src/interactions/find_mouseover_element.js"),o=n(/*! ./keep_track_of_interactions */"./src/interactions/keep_track_of_interactions.js"),a=n(/*! ./keep_track_of_mouseovers */"./src/interactions/keep_track_of_mouseovers.js");t.exports=function(t,e,n){var s=e.zoom_data,u=e.zoom_restrict,l=e.viz_dim;if(n.buttons||-1!==["wheel","touch","pinch"].indexOf(n.type)){switch(n.type){case"wheel":n.dsx=n.dsy=Math.exp(-n.dy/100),n.dx=n.dy=0}var c;s.x.inst_zoom=n.dsx,s.x.pan_by_drag=n.dx,s.x.cursor_position=n.x0,s.y.inst_zoom=n.dsy,s.y.pan_by_drag=n.dy,s.y.cursor_position=n.y0,s.y.total_zoom<u.y.ratio?(s.x.inst_zoom=1,(c=s.y.total_zoom*s.y.inst_zoom)>u.y.ratio&&(s.x.inst_zoom=c/u.y.ratio)):s.x.total_zoom<u.x.ratio&&(s.y.inst_zoom=1,(c=s.x.total_zoom*s.x.inst_zoom)>u.x.ratio&&(s.y.inst_zoom=c/u.x.ratio)),s.x=r(e,u.x,s.x,l.heat.x,l.mat.x,"x"),s.y=r(e,u.y,s.y,l.heat.y,l.mat.y,"y"),o(e)}else"mousemove"===n.type&&(a(e),i(t,e,n))}},"./src/main.js":
/*!*********************!*\
  !*** ./src/main.js ***!
  \*********************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./draws/run_viz */"./src/draws/run_viz.js"),i=n(/*! ./control_panel/build_control_panel */"./src/control_panel/build_control_panel.js"),o=n(/*! ./dendrogram/build_dendrogram_sliders */"./src/dendrogram/build_dendrogram_sliders.js");t.exports=function(t){var e=t.network,a=t.container;d3.select(a).append("div").attr("class","control-container").style("cursor","default"),d3.select(a).append("div").attr("class","canvas-container").style("position","absolute").style("cursor","default");var s=d3.select(a).select(".canvas-container")[0][0],u=t.viz_height,l=t.viz_width;d3.select(s).style("height",u+"px").style("width",l+"px");var c=n(/*! regl */"./node_modules/regl/dist/regl.js")({extensions:["angle_instanced_arrays"],container:s}),f=r(c,e),h={};return h.params=f,h.params.viz_height=u,h.params.viz_width=l,h.params.root="#"+t.container.id,h.params.canvas_root=h.params.root+" .canvas-container",h.params.container=t.container,h.params.canvas_container=s,o(c,h),i(c,h),h}},"./src/matrix_cells/calc_row_downsampled_mat.js":
/*!******************************************************!*\
  !*** ./src/matrix_cells/calc_row_downsampled_mat.js ***!
  \******************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e=!1){var n=t.mat_data;if(e){n=(n=t.mat_data).slice(0,5);var r=[];_.each(n,function(t){t=t.slice(0,3),r.push(t)}),t.mat_data=r,t.is_downsampled=!0}}},"./src/matrix_cells/make_matrix_args.js":
/*!**********************************************!*\
  !*** ./src/matrix_cells/make_matrix_args.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./make_position_arr */"./src/matrix_cells/make_position_arr.js"),i=n(/*! ./make_opacity_arr */"./src/matrix_cells/make_opacity_arr.js");t.exports=function(t,e){e.arrs={},e.arrs.opacity_arr=i(e),e.arrs.position_arr={},e.arrs.position_arr.ini=r(e,e.order.inst.row,e.order.inst.col),e.arrs.position_arr.new=r(e,e.order.new.row,e.order.new.col);var n=t.buffer({type:"float",usage:"dynamic"})(e.arrs.opacity_arr),o=e.viz_dim.tile_width,a=e.viz_dim.tile_height,s=[[o,0],[o,a],[0,a],[o,0],[0,0],[0,a]],u=e.arrs.position_arr.ini.length,l=e.zoom_data.zoom_function,c={vert:"\n    precision highp float;\n    attribute vec2 position;\n    attribute vec2 pos_att_ini, pos_att_new;\n    attribute float opacity_att;\n    uniform mat4 zoom;\n    uniform bool run_animation;\n    uniform float interp_uni;\n    varying vec2 pos;\n\n    // pass varying variables to fragment from vector\n    varying float opacity_vary;\n\n    void main() {\n\n      // interpolate between the two positions using the interpolate uniform\n      if (run_animation == true){\n        pos = mix(pos_att_ini, pos_att_new, interp_uni);\n      } else {\n        pos = pos_att_ini;\n      }\n\n      gl_Position = zoom *\n                    vec4( position.x + pos.x,\n                          position.y + pos.y,\n                          0.75,\n                          1\n                        );\n\n      // pass attribute (in vert) to varying in frag\n      opacity_vary = opacity_att;\n\n    }",frag:"\n    precision highp float;\n\n    // use the varying being passed from the vertex shader\n    varying float opacity_vary;\n\n    void main() {\n\n      if (opacity_vary > 0.0){\n        gl_FragColor = vec4(1, 0, 0, abs(opacity_vary));\n      } else {\n        gl_FragColor = vec4(0, 0, 1, abs(opacity_vary));\n      }\n\n    }",attributes:{position:s,pos_att_ini:{buffer:t.buffer(e.arrs.position_arr.ini),divisor:1},pos_att_new:{buffer:t.buffer(e.arrs.position_arr.new),divisor:1},opacity_att:{buffer:n,divisor:1}},blend:{enable:!0,func:{srcRGB:"src alpha",srcAlpha:1,dstRGB:"one minus src alpha",dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},count:6,uniforms:{zoom:l,interp_uni:(t,e)=>Math.max(0,Math.min(1,e.interp_prop)),run_animation:t.prop("run_animation")},instances:u,depth:{enable:!1}},f={regl_props:{}};return f.regl_props.rects=c,f}},"./src/matrix_cells/make_opacity_arr.js":
/*!**********************************************!*\
  !*** ./src/matrix_cells/make_opacity_arr.js ***!
  \**********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t.mat_data,n=[].concat.apply([],e),r=_.max(n,function(t){return Math.abs(t)}),i=d3.scale.linear(),o=r;return i.domain([-o,o]).range([-1,1]).clamp(!0),n=n.map(function(t){return i(t)})}},"./src/matrix_cells/make_position_arr.js":
/*!***********************************************!*\
  !*** ./src/matrix_cells/make_position_arr.js ***!
  \***********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r,i,o=t.labels.num_row,a=t.labels.num_col,s=t.network.row_nodes,u=t.network.col_nodes;return t.row_positions=_.range(o),Array(o*a).fill().map(function(l,c){var f=c%a,h=Math.floor(c/a);t.is_downsampled?(r=h,i=f):(r=o-1-s[h][e],i=a-1-u[f][n]);var p=t.node_canvas_pos.y_arr[r],d=t.node_canvas_pos.x_arr[i];return t.row_positions[h]=p,[d,p]})}},"./src/matrix_labels/calc_text_offsets.js":
/*!************************************************!*\
  !*** ./src/matrix_labels/calc_text_offsets.js ***!
  \************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){t.labels.offset_dict[e]={},_.each(t.network[e+"_nodes"],function(n,r){var i,o,a,s={};a="col"===e?"x":"y";var u=t.canvas_pos[a+"_arr"],l=t.order.inst[e],c=t.order.new[e],f=t.labels["num_"+e];_.each(["inst","new"],function(n){o="inst"===n?l:c,"col"===e?(i=t.network[e+"_nodes"][r][o],s[n]=u[f-1-i]+.5/f):(i=f-1-t.network[e+"_nodes"][r][o],s[n]=u[i]+.5/f)}),n.offsets=s;var h=n.name;h.indexOf(": ")>=0&&(h=n.name.split(": ")[1]),t.labels.offset_dict[e][h]=s})}},"./src/matrix_labels/drop_label_from_queue.js":
/*!****************************************************!*\
  !*** ./src/matrix_labels/drop_label_from_queue.js ***!
  \****************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r=t.indexOf(n);r>-1&&t.splice(r,1)}},"./src/matrix_labels/gather_text_triangles.js":
/*!****************************************************!*\
  !*** ./src/matrix_labels/gather_text_triangles.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./vectorize_label */"./src/matrix_labels/vectorize_label.js");t.exports=function(t,e){var n;n="col"===e?"x":"y",t.text_triangles.draw[e]=[];var i=t.viz_area,o=i[n+"_min"],a=i[n+"_max"];_.each(t.network[e+"_nodes"],function(n){if(n.offsets.inst>o&&n.offsets.inst<a){var i,s=n.name;s.indexOf(": ")>=0&&(s=n.name.split(": ")[1]),s in t.text_triangles[e]?((i=t.text_triangles[e][s]).inst_offset=[0,n.offsets.inst],i.new_offset=[0,n.offsets.new],t.text_triangles.draw[e].push(i)):(i=r(t,e,s),t.text_triangles[e][s]=i,i.inst_offset=[0,n.offsets.inst],i.new_offset=[0,n.offsets.new],t.text_triangles.draw[e].push(i))}})}},"./src/matrix_labels/generate_ordered_labels.js":
/*!******************************************************!*\
  !*** ./src/matrix_labels/generate_ordered_labels.js ***!
  \******************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e,n,r,i={};_.each(["row","col"],function(o){i[o+"s"]=[],i[o+"_indices"]=[],n=t.network[o+"_nodes"];var a=!1;for(r=0;r<t.cat_data.cat_num[o];r++)i[o+"_cats-"+String(r)]=[];t.cat_data.cat_num[o]>0&&(a=!0),_.each(n,function(n,s){if(e=t.labels["num_"+o]-1-n[t.order.inst[o]],i[o+"s"][e]=n.name,i[o+"_indices"][e]=s,a)for(r=0;r<t.cat_data.cat_num[o];r++)i[o+"_cats-"+String(r)][e]=n["cat-"+String(r)]})}),t.labels.ordered_labels=i}},"./src/matrix_labels/make_col_text_args.js":
/*!*************************************************!*\
  !*** ./src/matrix_labels/make_col_text_args.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../draws/mat3_transform */"./src/draws/mat3_transform.js"),i=n(/*! ./../draws/interp_fun */"./src/draws/interp_fun.js");t.exports=function(t,e,n){var o=e.labels.num_col,a=e.viz_dim.heat_size.x/o;e.text_scale.col=d3.scale.linear().domain([1,10]).range([1,10/e.allowable_zoom_factor.col]);var s=o/5;e.text_scale.col=d3.scale.linear().domain([1,e.max_zoom]).range([1,s]);var u=o,l=1/o*e.zoom_data.x.total_zoom,c=e.text_zoom.col.max_webgl_fs;l>c&&(u*=l/c);var f=r.rotation(Math.PI/4),h=r.scaling(1,e.zoom_data.x.total_zoom),p=a,d=-.5*(a/Math.sqrt(2));return{vert:"\n      precision mediump float;\n      attribute vec2 position;\n      uniform mat4 zoom;\n      uniform vec2 inst_offset;\n      uniform vec2 new_offset;\n      uniform float y_offset;\n      uniform float scale_text;\n      uniform mat3 mat_rotate;\n      uniform mat3 text_y_scale;\n      uniform float total_zoom;\n      uniform float col_width;\n      varying vec3 rotated_text;\n      varying vec3 position_cols;\n      uniform float heat_size;\n      varying vec3 xy_positions;\n      varying float x_position;\n      varying float y_position;\n      uniform float shift_text_out;\n      uniform float shift_text_right;\n      uniform float shift_text_up;\n      uniform float shift_heat;\n      uniform float interp_uni;\n      uniform bool run_animation;\n      varying vec2 mixed_offset;\n\n      // last value is a sort-of zoom\n      void main () {\n\n        // rotate, reduce size, stretch in y, and give text triangles positions\n        // shifting text up in the original text triangle units\n        rotated_text = text_y_scale *\n                       mat_rotate *\n                       vec3(position.y/scale_text, position.x/scale_text, 0.0);\n\n        // the y position is constant for all column labels\n        //---------------------------------------------------------------\n        // working on shifting text up\n        //---------------------------------------------------------------\n        y_position = y_offset;\n\n        // the x position varies for all column labelss\n        //---------------------------------------------------------------\n        // interpolate between the two positions using the interpolate uniform\n        if (run_animation){\n          mixed_offset = mix(inst_offset, new_offset , interp_uni);\n        } else {\n          mixed_offset = inst_offset;\n        }\n\n        // mixed_offset = inst_offset;\n\n        x_position = (mixed_offset[1] * 2.0 * heat_size + shift_heat + shift_text_right);\n\n        position_cols = vec3( x_position, y_position, 0.10);\n\n        xy_positions = rotated_text + position_cols;\n\n        // reverse y position to get words to be upright\n        ////////////////////////////\n        // vec4: x, y, depth, zoom\n        ////////////////////////////\n        gl_Position = zoom * vec4( xy_positions, 1.0);\n\n      }",frag:"\n      precision mediump float;\n      void main () {\n        gl_FragColor = vec4(0.2, 0.2, 0.2, 1.0);\n      }",attributes:{position:t.prop("positions")},elements:t.prop("cells"),uniforms:{zoom:n,inst_offset:t.prop("inst_offset"),new_offset:t.prop("new_offset"),scale_text:u,y_offset:e.viz_dim.mat_size.y,heat_size:e.viz_dim.heat_size.x,shift_heat:e.viz_dim.mat_size.x-e.viz_dim.heat_size.x,shift_text_right:p,shift_text_out:0,shift_text_up:d,mat_rotate:f,text_y_scale:h,total_zoom:e.zoom_data.x.total_zoom,col_width:a,interp_uni:()=>Math.max(0,Math.min(1,i(e))),run_animation:e.animation.running},depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/matrix_labels/make_label_queue.js":
/*!***********************************************!*\
  !*** ./src/matrix_labels/make_label_queue.js ***!
  \***********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e;t.labels.queue={},t.labels.queue.low={},t.labels.queue.high={},_.each(["row","col"],function(n){t.labels.queue.high[n]=[],e=[];var r=t.labels.ordered_labels[n+"s"];_.each(r,function(t){t.indexOf(": ")>=0&&(t=t.split(": ")[1]),e.push(t)}),t.labels.queue.low[n]=e})}},"./src/matrix_labels/make_row_text_args.js":
/*!*************************************************!*\
  !*** ./src/matrix_labels/make_row_text_args.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../draws/mat3_transform */"./src/draws/mat3_transform.js"),i=n(/*! ./../draws/interp_fun */"./src/draws/interp_fun.js");t.exports=function(t,e,n){var o=e.labels.num_row,a=o,s=1/o*e.zoom_data.y.total_zoom,u=e.text_zoom.row.max_webgl_fs;s>u&&(a*=s/u);var l=r.rotation(Math.PI/2),c=e.viz_dim.mat_size.x+.02;return{vert:"\n      precision mediump float;\n      attribute vec2 position;\n      uniform mat4 zoom;\n      uniform vec2 inst_offset;\n      uniform vec2 new_offset;\n      uniform float x_offset;\n      uniform float scale_text;\n      uniform float total_zoom;\n      uniform mat3 mat_rotate;\n      uniform float heat_size;\n      varying float x_position;\n      varying float y_position;\n      uniform float shift_heat;\n      uniform float interp_uni;\n      uniform bool run_animation;\n      varying vec2 mixed_offset;\n\n      // vec3 tmp = vec3(1,1,1);\n\n      // last value is a sort-of zoom\n      void main () {\n\n        // reverse y position to get words to be upright\n\n        // the x position is constant for all row labels\n        //------------------------------------------------------\n        // total_zoom stretches out row labels horizontally\n        // then text is offset to the left side of the heatmap\n        //------------------------------------------------------\n        x_position = position.x/scale_text * total_zoom - x_offset;\n\n        // the y position varies for all row labels\n        //------------------------------------------------------\n        // shift by offset and then uniformly shift down by s\n        // shift_heat\n        //------------------------------------------------------\n        // interpolate between the two positions using the interpolate uniform\n        if (run_animation){\n          mixed_offset = mix(inst_offset, new_offset , interp_uni);\n        } else {\n          mixed_offset = inst_offset;\n        }\n\n        // mixed_offset = inst_offset;\n\n        y_position = -position.y/scale_text + 2.0 * heat_size * mixed_offset[1] - shift_heat ;\n\n        gl_Position = zoom *\n                      vec4(x_position,\n                           y_position,\n                           0.50,\n                           1.0);\n      }",frag:"\n      precision mediump float;\n      void main () {\n        gl_FragColor = vec4(0.2, 0.2, 0.2, 1.0);\n      }",attributes:{position:t.prop("positions")},elements:t.prop("cells"),uniforms:{zoom:n,inst_offset:t.prop("inst_offset"),new_offset:t.prop("new_offset"),scale_text:a,x_offset:c,heat_size:e.viz_dim.heat_size.y,shift_heat:e.viz_dim.mat_size.y-e.viz_dim.heat_size.y,total_zoom:e.zoom_data.y.total_zoom,mat_rotate:l,interp_uni:()=>Math.max(0,Math.min(1,i(e))),run_animation:e.animation.running},depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/matrix_labels/make_viz_aid_tri_args.js":
/*!****************************************************!*\
  !*** ./src/matrix_labels/make_viz_aid_tri_args.js ***!
  \****************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../draws/mat3_transform */"./src/draws/mat3_transform.js"),i=n(/*! ./../colors/color_to_rgba */"./src/colors/color_to_rgba.js"),o=n(/*! ./make_viz_aid_tri_pos_arr */"./src/matrix_labels/make_viz_aid_tri_pos_arr.js"),a=n(/*! ./../draws/interp_fun */"./src/draws/interp_fun.js");t.exports=function(t,e,n){var s,u,l,c,f=i("#eee",1),h=e.labels["num_"+n];"col"===n?(s=(l=e.viz_dim.heat_size.x)/h*e.zoom_data.x.total_zoom,u=l/h,c=-e.viz_dim.mat_size.y-s):(s=.0125,u=(l=e.viz_dim.heat_size.y)/h,c=-e.viz_dim.mat_size.x-s);var p,d=o(e,n,e.order.inst[n]),m=o(e,n,e.order.new[n]),g=r.scaling(2,1);"row"===n?p=0:"col"===n&&(p=Math.PI/2);var v=r.rotation(p),y=e.zoom_data.x.total_zoom;return{vert:"\n      precision highp float;\n      attribute vec2 ini_position;\n      attribute float tri_offset_att_inst;\n      attribute float tri_offset_att_new;\n\n      uniform mat3 mat_rotate;\n      uniform mat3 scale_y;\n      uniform mat4 zoom;\n      uniform float top_offset;\n      uniform float total_zoom;\n      uniform float interp_uni;\n      uniform bool run_animation;\n\n      varying vec3 new_position;\n      varying vec3 vec_translate;\n      varying vec2 viz_aid_pos;\n\n      void main () {\n\n        new_position = vec3(ini_position, 0);\n\n        // interpolate between the two positions using the interpolate uniform\n        if (run_animation){\n          viz_aid_pos = mix(vec2(tri_offset_att_inst, 0), vec2(tri_offset_att_new, 0), interp_uni);\n        } else{\n          viz_aid_pos = vec2(tri_offset_att_inst, 0);\n        }\n\n        vec_translate = vec3(top_offset, viz_aid_pos);\n\n        // rotate translated triangles\n        new_position = mat_rotate * ( new_position + vec_translate );\n\n        // depth is being set to 0.45\n        gl_Position = zoom * vec4( vec2(new_position), 0.45, 1);\n\n      }\n    ",frag:"\n\n      precision highp float;\n      uniform vec4 triangle_color;\n\n      // color triangle red\n      void main () {\n\n        // defining the triangle color using a uniform\n        gl_FragColor = triangle_color;\n\n      }\n\n    ",attributes:{ini_position:[[s,0],[0,-u],[s,-2*u]],tri_offset_att_inst:{buffer:t.buffer(d),divisor:1},tri_offset_att_new:{buffer:t.buffer(m),divisor:1}},uniforms:{zoom:function(t){return t.view},mat_rotate:v,scale_y:g,top_offset:c,triangle_color:f,total_zoom:y,interp_uni:()=>Math.max(0,Math.min(1,a(e))),run_animation:e.animation.running},count:3,instances:h,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/matrix_labels/make_viz_aid_tri_pos_arr.js":
/*!*******************************************************!*\
  !*** ./src/matrix_labels/make_viz_aid_tri_pos_arr.js ***!
  \*******************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n){var r,i,o,a=t.labels["num_"+e];"row"===e?(i=(r=t.viz_dim.heat_size.y)/a,o=t.viz_dim.mat_size.y-t.viz_dim.heat_size.y):(i=(r=t.viz_dim.heat_size.x)/a,o=-(t.viz_dim.mat_size.x-t.viz_dim.heat_size.x));var s,u,l,c=[];for(s=0;s<a;s++)l=t.network[e+"_nodes"][s][n],u="row"==e?a-l-1:l,c[s]=r-o-2*i*u;return c}},"./src/matrix_labels/update_text_triangle_order.js":
/*!*********************************************************!*\
  !*** ./src/matrix_labels/update_text_triangle_order.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n,r,i,o=t.order.inst[e],a=t.order.new[e],s=t.text_triangles.draw[e],u=t.labels["num_"+e];n="col"===e?"x":"y";var l={},c=t.canvas_pos[n+"_arr"];return _.each(s,function(n,s){_.each(["inst","new"],function(n){i="inst"===n?o:a,"col"===e?(r=t.network[e+"_nodes"][s][i],l[n]=c[u-1-r]+.5/u):(r=u-1-t.network[e+"_nodes"][s][i],l[n]=c[r]+.5/u)}),n.inst_offset=[0,l.inst],n.new_offset=[0,l.new]}),s}},"./src/matrix_labels/vectorize_label.js":
/*!**********************************************!*\
  !*** ./src/matrix_labels/vectorize_label.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){const r=n(/*! vectorize-text */"./node_modules/vectorize-text/index.js");var i=n(/*! ./drop_label_from_queue */"./src/matrix_labels/drop_label_from_queue.js");t.exports=function(t,e,n){var o={textAlign:"left",triangles:!0,size:t.labels.font_detail,font:'"Open Sans", verdana, arial, sans-serif'};return"col"===e?(o.textAlign="left",o.textBaseline="bottom"):(o.textAlign="right",o.textBaseline="middle"),i(t.labels.queue.low[e],e,n),r(n,o)}},"./src/params/calc_alpha_order.js":
/*!****************************************!*\
  !*** ./src/params/calc_alpha_order.js ***!
  \****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../utils/utils_clust */"./src/utils/utils_clust.js");t.exports=function(t){var e,n,i=t.network;_.each(["row","col"],function(t){var o=i[t+"_nodes"];e=r.pluck(o,"name"),i[t+"_node_names"]=e,n=e.sort(),_.map(o,function(t){var r=e.length-n.indexOf(t.name)-1;t.alpha=r})})}},"./src/params/calc_mat_arr.js":
/*!************************************!*\
  !*** ./src/params/calc_mat_arr.js ***!
  \************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e,n,r,i,o,a,s=t.labels.num_row,u=t.labels.num_col;t.node_canvas_pos={},_.each(["x","y"],function(l){n="x"==l?u:s,a=t.viz_dim.mat_size[l]-t.viz_dim.heat_size[l],e=t.viz_dim.heat_size[l],o=e/n,t.node_canvas_pos[l+"_arr"]=Array(n).fill().map(function(t,c){return"x"===l?(r=c,i=-1,n=u):(r=c+1,i=1,n=s),(e-a-2*o*r)*i})})}},"./src/params/calc_row_and_col_canvas_positions.js":
/*!*********************************************************!*\
  !*** ./src/params/calc_row_and_col_canvas_positions.js ***!
  \*********************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e="row",n=t.labels["num_"+e];e="col";var r=t.labels["num_"+e],i={};i.x=t.viz_dim.center.x,i.y=t.viz_dim.center.y;var o=Array(r).fill().map(function(t,e){return e/r-i.x}),a=Array(n).fill().map(function(t,e){return-e/n+i.y-1/n}),s={};return s.x_arr=o,s.y_arr=a,s}},"./src/params/calc_viz_area.js":
/*!*************************************!*\
  !*** ./src/params/calc_viz_area.js ***!
  \*************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t.zoom_data,n=t.viz_dim.heat.width,r=t.viz_dim.heat.height,i=t.pix_to_webgl,o={};o.x_min=-e.x.total_pan_min,o.x_max=n+e.x.total_pan_max,o.y_min=-e.y.total_pan_min,o.y_max=r+e.y.total_pan_max;var a={};a.x_min=i.x(o.x_min)-0,a.x_max=i.x(o.x_max)+0,a.y_max=i.y(o.y_min)-0,a.y_min=i.y(o.y_max)+0,t.viz_area=a}},"./src/params/calc_viz_dim.js":
/*!************************************!*\
  !*** ./src/params/calc_viz_dim.js ***!
  \************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! xtend/mutable */"./node_modules/xtend/mutable.js");t.exports=function(t,e){var n={mat_size:{}};n.mat_size.x=.8,n.mat_size.y=.8,n.heat_size={},n.heat_size.x=n.mat_size.x-e.cat_data.cat_room.x*e.cat_data.cat_num.row,n.heat_size.y=n.mat_size.y-e.cat_data.cat_room.y*e.cat_data.cat_num.col;var i=i||{},o=r({element:i.element||t._gl.canvas},i||{}).element;n.canvas={},_.each(["width","height"],function(t){n.canvas[t]=Number.parseFloat(d3.select(o).style(t).replace("px",""))}),n.mat={},n.mat.width=n.mat_size.x*n.canvas.width,n.mat.height=n.mat_size.y*n.canvas.height,n.mat.x={},n.mat.x.min=n.canvas.width/2-n.mat.width/2,n.mat.x.max=n.canvas.width/2+n.mat.width/2,n.mat.y={},n.mat.y.min=n.canvas.height/2-n.mat.height/2,n.mat.y.max=n.canvas.height/2+n.mat.height/2,n.heat={},n.heat.width=n.heat_size.x*n.canvas.width,n.heat.height=n.heat_size.y*n.canvas.height;var a={};a.x=(n.mat.width-n.heat.width)/2,n.heat.x={},n.heat.x.min=n.canvas.width/2-n.heat.width/2+a.x,n.heat.x.max=n.canvas.width/2+n.heat.width/2,a.y=(n.mat.height-n.heat.height)/2,n.heat.y={},n.heat.y.min=n.canvas.height/2-n.heat.height/2+a.y,n.heat.y.max=n.canvas.height/2+n.heat.height/2+a.y,n.center={},n.center.x=.5,n.center.y=.5,e.viz_dim=n,e.viz_dim.tile_width=e.viz_dim.heat_size.x/.5/e.labels.num_col,e.viz_dim.tile_height=e.viz_dim.heat_size.y/.5/e.labels.num_row,e.viz_dim.offcenter={};e.viz_dim.offcenter.x=.075,e.viz_dim.offcenter.y=.075,e.viz_dim.shift_camera={},e.viz_dim.shift_camera.x=-.075,e.viz_dim.shift_camera.y=.075}},"./src/params/generate_animation_params.js":
/*!*************************************************!*\
  !*** ./src/params/generate_animation_params.js ***!
  \*************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){t.animation={},t.animation.time_remain=0,t.animation.running=!1,t.animation.run_animation=!1,t.animation.last_switch_time=0,t.animation.ani_duration=3,t.animation.duration_end=0,t.animation.time=0,t.animation.first_frame=!0,t.animation.initialize_viz=!0}},"./src/params/generate_cat_args_arrs.js":
/*!**********************************************!*\
  !*** ./src/params/generate_cat_args_arrs.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../cats/make_cat_position_array */"./src/cats/make_cat_position_array.js"),i=n(/*! ./../cats/make_cat_args */"./src/cats/make_cat_args.js");t.exports=function(t,e){e.cat_args={},e.cat_args.row=[],e.cat_args.col=[],e.cat_arrs={},_.each(["inst","new"],function(t){e.cat_arrs[t]={},e.cat_arrs[t].row={},e.cat_arrs[t].col={}}),_.each(["row","col"],function(n){for(var o=0;o<e.cat_data.cat_num[n];o++)_.each(["inst","new"],function(t){e.cat_arrs[t][n][o]=r(e,n,o,e.order[t][n])}),e.cat_args[n][o]=i(t,e,n,o)})}},"./src/params/generate_cat_params.js":
/*!*******************************************!*\
  !*** ./src/params/generate_cat_params.js ***!
  \*******************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../cats/generate_cat_array */"./src/cats/generate_cat_array.js"),i=n(/*! ./../cats/generate_cat_info */"./src/cats/generate_cat_info.js");t.exports=function(t){t.cat_data={},t.cat_data.row=r(t,"row"),t.cat_data.col=r(t,"col"),t.cat_data.cat_num={},t.cat_data.cat_num.row=t.cat_data.row.length,t.cat_data.cat_num.col=t.cat_data.col.length,t.cat_data.cat_room={},t.cat_data.cat_room.x=.015,t.cat_data.cat_room.y=.015,i(t)}},"./src/params/generate_dendro_params.js":
/*!**********************************************!*\
  !*** ./src/params/generate_dendro_params.js ***!
  \**********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../dendrogram/calc_dendro_triangles */"./src/dendrogram/calc_dendro_triangles.js"),i=n(/*! ./../dendrogram/make_dendro_args */"./src/dendrogram/make_dendro_args.js");t.exports=function(t,e){e.dendro={},e.dendro.default_level=5,e.dendro.tri_height=.1,e.dendro.trap_height=.03,e.dendro.trap_float=.005,e.dendro.dendro_args={},e.dendro.group_level={},e.dendro.update_dendro=!1,e.dendro.group_info={},_.each(["row","col"],function(n){e.dendro.group_level[n]=e.dendro.default_level,e.dendro.group_info[n]=r(e,n),e.dendro.dendro_args[n]=i(t,e,n)})}},"./src/params/generate_interact_params.js":
/*!************************************************!*\
  !*** ./src/params/generate_interact_params.js ***!
  \************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){t.interact={},t.interact.total=0,t.interact.still_interacting=!1,t.interact.still_mouseover=!1,t.interact.mouseover={},_.each(["row","col"],function(e){t.interact.mouseover[e]={},t.interact.mouseover[e].name=null,t.interact.mouseover[e].cats=[]}),t.interact.mouseover.value=null,t.interact.enable_viz_interact=!0}},"./src/params/generate_label_params.js":
/*!*********************************************!*\
  !*** ./src/params/generate_label_params.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../matrix_labels/generate_ordered_labels */"./src/matrix_labels/generate_ordered_labels.js");t.exports=function(t){t.labels={},t.labels.num_row=t.mat_data.length,t.labels.num_col=t.mat_data[0].length,t.labels.offset_dict={},t.labels.draw_labels=!1,t.labels.font_detail=20,r(t)}},"./src/params/generate_order_params.js":
/*!*********************************************!*\
  !*** ./src/params/generate_order_params.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){t.order={},_.each(["inst","new"],function(e){t.order[e]={},t.order[e].row="clust",t.order[e].col="clust"})}},"./src/params/generate_pix_to_webgl.js":
/*!*********************************************!*\
  !*** ./src/params/generate_pix_to_webgl.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e={};e.x=d3.scale.linear(),e.x.domain([0,t.viz_dim.heat.width]).range([-.5,.5]),e.y=d3.scale.linear(),e.y.domain([0,t.viz_dim.heat.height]).range([.5,-.5]),t.pix_to_webgl=e}},"./src/params/generate_spillover_params.js":
/*!*************************************************!*\
  !*** ./src/params/generate_spillover_params.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../spillover/make_spillover_args */"./src/spillover/make_spillover_args.js"),i=n(/*! ./../spillover/calc_spillover_triangles */"./src/spillover/calc_spillover_triangles.js");t.exports=function(t,e){var n={},o=[1,1,1,1];e.spill_depth={},e.spill_depth.mat_sides=.5,e.spill_depth.cats=.5,e.spill_depth.mat_corners=.2,e.spill_depth.label_corners=.001;_.each(["mat_sides","cats","mat_corners","label_corners"],function(i){n[i]=r(t,e.spill_depth[i],o)}),e.spillover_args=n,e.spillover_triangles=i(e)}},"./src/params/generate_text_triangle_params.js":
/*!*****************************************************!*\
  !*** ./src/params/generate_text_triangle_params.js ***!
  \*****************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../matrix_labels/gather_text_triangles */"./src/matrix_labels/gather_text_triangles.js");t.exports=function(t){t.text_triangles={},t.text_triangles.row={},t.text_triangles.col={},t.max_num_text=200,t.text_triangles.draw={},_.each(["row","col"],function(e){t.labels["num_"+e]>t.max_num_text?t.text_triangles.draw[e]=!1:r(t,e)})}},"./src/params/generate_text_zoom_params.js":
/*!*************************************************!*\
  !*** ./src/params/generate_text_zoom_params.js ***!
  \*************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){t.text_zoom={},t.text_zoom.row={},t.text_zoom.row.scaled_num=t.labels.num_row,t.text_zoom.row.reference=t.text_zoom.row.scaled_num,t.text_zoom.row.factor=1,t.text_zoom.row.max_webgl_fs=.05,t.text_zoom.col={},t.text_zoom.col.scaled_num=t.labels.num_col,t.text_zoom.col.reference=t.text_zoom.col.scaled_num,t.text_zoom.col.factor=1,t.text_zoom.col.max_webgl_fs=.06}},"./src/params/generate_tooltip_params.js":
/*!***********************************************!*\
  !*** ./src/params/generate_tooltip_params.js ***!
  \***********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){e.tooltip={},e.tooltip.show_tooltip=!1,e.tooltip.remove_tooltip_frame=!0,e.tooltip.in_bounds_tooltip=!1,e.tooltip.background_opacity=.75,e.tooltip.tooltip_type=null}},"./src/params/generate_webgl_to_pix.js":
/*!*********************************************!*\
  !*** ./src/params/generate_webgl_to_pix.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e={};e.x=d3.scale.linear(),e.x.domain([-.5,.5]).range([0,t.viz_dim.heat.width]).clamp(!0),e.y=d3.scale.linear(),e.y.domain([.5,-.5]).range([0,t.viz_dim.heat.height]).clamp(!0),t.webgl_to_pix=e}},"./src/params/initialize_params.js":
/*!*****************************************!*\
  !*** ./src/params/initialize_params.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./calc_row_and_col_canvas_positions */"./src/params/calc_row_and_col_canvas_positions.js"),i=n(/*! ./calc_viz_dim */"./src/params/calc_viz_dim.js"),o=n(/*! ./../zoom/ini_zoom_data */"./src/zoom/ini_zoom_data.js"),a=n(/*! ./../zoom/ini_zoom_restrict */"./src/zoom/ini_zoom_restrict.js"),s=n(/*! ./../zoom/zoom_rules_high_mat */"./src/zoom/zoom_rules_high_mat.js"),u=n(/*! ./../cameras/make_cameras */"./src/cameras/make_cameras.js"),l=n(/*! ./../matrix_cells/make_matrix_args */"./src/matrix_cells/make_matrix_args.js"),c=n(/*! ./calc_viz_area */"./src/params/calc_viz_area.js"),f=n(/*! ./../matrix_cells/calc_row_downsampled_mat */"./src/matrix_cells/calc_row_downsampled_mat.js"),h=n(/*! ./calc_alpha_order */"./src/params/calc_alpha_order.js"),p=n(/*! ./../matrix_labels/make_label_queue */"./src/matrix_labels/make_label_queue.js"),d=n(/*! ./../matrix_labels/calc_text_offsets */"./src/matrix_labels/calc_text_offsets.js"),m=n(/*! ./generate_animation_params */"./src/params/generate_animation_params.js"),g=n(/*! ./generate_cat_params */"./src/params/generate_cat_params.js"),v=n(/*! ./generate_label_params */"./src/params/generate_label_params.js"),y=n(/*! ./generate_interact_params */"./src/params/generate_interact_params.js"),b=n(/*! ./generate_order_params */"./src/params/generate_order_params.js"),x=n(/*! ./generate_spillover_params */"./src/params/generate_spillover_params.js"),w=n(/*! ./generate_text_triangle_params */"./src/params/generate_text_triangle_params.js"),j=n(/*! ./generate_pix_to_webgl */"./src/params/generate_pix_to_webgl.js"),M=n(/*! ./generate_webgl_to_pix */"./src/params/generate_webgl_to_pix.js"),A=n(/*! ./generate_text_zoom_params */"./src/params/generate_text_zoom_params.js"),k=n(/*! ./generate_cat_args_arrs */"./src/params/generate_cat_args_arrs.js"),z=n(/*! ./generate_tooltip_params */"./src/params/generate_tooltip_params.js"),E=n(/*! ./generate_dendro_params */"./src/params/generate_dendro_params.js"),S=n(/*! ./../params/calc_mat_arr */"./src/params/calc_mat_arr.js");t.exports=function(t,e){var n={};n.network=e,m(n),h(n),y(n),n.mat_data=n.network.mat,g(n),b(n),v(n),i(t,n),k(t,n),n.zoom_data=o(),n.canvas_pos=r(n);var N;n.is_downsampled=!1,f(n,!1),n.viz_aid_tri_args={},_.each(["row","col"],function(t){d(n,t)}),z(t,n),n.tile_pix_width=n.viz_dim.heat.width/n.labels.num_col,n.tile_pix_height=n.viz_dim.heat.height/n.labels.num_row,j(n),M(n),p(n),A(n),c(n),w(n),N=n.labels.num_col<n.labels.num_row?n.labels.num_col:n.labels.num_row,n.max_zoom=N/4,n.zoom_restrict=a(n),s(t,n),u(t,n),S(n),n.matrix_args=l(t,n),E(t,n),x(t,n);var T=d3.scale.linear().domain([10,1e3]).range([2,30]);return n.allowable_zoom_factor={},n.allowable_zoom_factor.col=T(n.labels.num_col),n.allowable_zoom_factor.row=T(n.labels.num_col),n.text_scale={},n.cat_colors=n.network.cat_colors,n}},"./src/reorders/reorder_cat_args.js":
/*!******************************************!*\
  !*** ./src/reorders/reorder_cat_args.js ***!
  \******************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../cats/make_cat_position_array */"./src/cats/make_cat_position_array.js");t.exports=function(t,e){var n=e.params;_.each(["row","col"],function(e){for(var i=0;i<n.cat_data.cat_num[e];i++)n.cat_arrs.new[e][i]=r(n,e,i,n.order.new[e]),n.cat_args[e][i].attributes.cat_pos_att_new={buffer:t.buffer(n.cat_arrs.new[e][i]),divisor:1}})}},"./src/reorders/reorder_matrix_args.js":
/*!*********************************************!*\
  !*** ./src/reorders/reorder_matrix_args.js ***!
  \*********************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../matrix_cells/make_position_arr */"./src/matrix_cells/make_position_arr.js");t.exports=function(t,e){var n=e.params;n.arrs.position_arr.new=r(n,n.order.new.row,n.order.new.col),n.matrix_args.regl_props.rects.attributes.pos_att_new={buffer:t.buffer(n.arrs.position_arr.new),divisor:1}}},"./src/reorders/run_reorder.js":
/*!*************************************!*\
  !*** ./src/reorders/run_reorder.js ***!
  \*************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./reorder_cat_args */"./src/reorders/reorder_cat_args.js"),i=n(/*! ./reorder_matrix_args */"./src/reorders/reorder_matrix_args.js"),o=n(/*! ./../matrix_labels/update_text_triangle_order */"./src/matrix_labels/update_text_triangle_order.js");t.exports=function(t,e,n,a){var s=e.params,u=a.replace("sum","rank").replace("var","rankvar");"clust"!=u&&d3.select("."+n+"_dendro_slider_svg").style("display","none"),s.animation.run_animation=!0,s.order.new[n]=u,i(t,e),r(t,e),0!=e.params.text_triangles.draw[n]&&s.labels["num_"+n]<=s.max_num_text?s.text_triangles.draw[n]=o(s,n):s.text_triangles.draw[n]=!1}},"./src/spillover/calc_spillover_triangles.js":
/*!***************************************************!*\
  !*** ./src/spillover/calc_spillover_triangles.js ***!
  \***************************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e=t.viz_dim,n=e.offcenter,r=e.mat_size,i=e.heat_size,o=e.canvas.height/e.canvas.width,a={};a.x=r.x/o,a.y=r.y/o;var s={};s.x=i.x/o,s.y=i.y/o;var u={},l=t.dendro.trap_height+t.dendro.trap_float,c={};return c.x=e.mat_size.x-e.heat_size.x,c.y=e.mat_size.y-e.heat_size.y,u.mat_sides=[{pos:[[-1,1],[-r.x+n.x,-1],[-1,-1]]},{pos:[[-1,1],[-r.x+n.x,1],[-r.x+n.x,-1]]},{pos:[[1,1],[r.x+n.x,-1],[1,-1]]},{pos:[[1,1],[r.x+n.x,1],[r.x+n.x,-1]]},{pos:[[-r.x+n.x,1],[-r.x+n.x,a.y-n.y],[r.x+n.x,1]]},{pos:[[r.x+n.x,1],[r.x+n.x,a.y-n.y],[-r.x+n.x,a.y-n.y]]},{pos:[[-r.x+n.x,-1],[-r.x+n.x,-a.y-n.y],[r.x+n.x,-1]]},{pos:[[r.x+n.x,-1],[r.x+n.x,-a.y-n.y],[-r.x+n.x,-a.y-n.y]]}],u.cats=[{pos:[[i.x+c.x+n.x,a.y-n.y],[-i.x+c.x+n.x,s.y-c.y-n.y],[i.x+c.x+n.x,s.y-c.y-n.y]]},{pos:[[-i.x+c.x+n.x,a.y-n.y],[r.x+n.x,a.y-n.y],[-i.x+c.x+n.x,s.y-c.y-n.y]]},{pos:[[-r.x+n.x,-a.y-n.y],[-r.x+n.x,s.y-c.y-n.y],[-i.x+c.x+n.x,s.y-c.y-n.y]]},{pos:[[-r.x+n.x,-a.y-n.y],[-i.x+c.x+n.x,-a.y-n.y],[-i.x+c.x+n.x,s.y-c.y-n.y]]}],u.mat_corners=[{pos:[[-1,1],[-i.x+c.x+n.x,s.y-c.y-n.y],[-1,s.y-c.y-n.y]]},{pos:[[-1,1],[-i.x+c.x+n.x,1],[-i.x+c.x+n.x,s.y-c.y-n.y]]},{pos:[[-1,-1],[-r.x+n.x,-a.y-n.y],[-1,-a.y-n.y]]},{pos:[[-1,-1],[-r.x+n.x,-1],[-r.x+n.x,-a.y-n.y]]},{pos:[[1,1],[r.x+n.x,a.y-n.y],[1,a.y-n.y]]},{pos:[[1,1],[r.x+n.x,1],[r.x+n.x,a.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-a.y-n.y],[1,-a.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-1],[r.x+n.x,-a.y-n.y]]}],u.label_corners=[{pos:[[-1,1],[-i.x+c.x+n.x,s.y-c.y-n.y],[-1,s.y-c.y-n.y]]},{pos:[[-1,1],[-i.x+c.x+n.x,1],[-i.x+c.x+n.x,s.y-c.y-n.y]]},{pos:[[-1,-1],[-i.x+c.x+n.x,-a.y-n.y],[-1,-a.y-n.y]]},{pos:[[-1,-1],[-i.x+c.x+n.x,-1],[-i.x+c.x+n.x,-a.y-n.y]]},{pos:[[1,a.y+1-r.y-2*n.x],[r.x+n.x,a.y-n.y],[1,a.y-n.y]]},{pos:[[1,a.y-n.y],[r.x+n.x,s.y-c.y-n.y],[1,s.y-c.y-n.y]]},{pos:[[r.x+n.x,a.y-n.y],[1,a.y-n.y],[r.x+n.x,s.y-c.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-a.y-n.y],[1,-a.y-n.y]]},{pos:[[1,-1],[r.x+n.x,-1],[r.x+n.x,-a.y-n.y]]},{pos:[[1,s.y-c.y-n.y],[r.x+n.x+l,-a.y-n.y],[1,-a.y-n.y]]},{pos:[[1,s.y-c.y-n.y],[r.x+n.x+l,s.y-c.y-n.y],[r.x+n.x+l,-a.y-n.y]]},{pos:[[-i.x+c.x+n.x,-1],[-i.x+c.x+n.x,-a.y-n.y-l],[r.x+n.x,-1]]},{pos:[[r.x+n.x,-1],[r.x+n.x,-a.y-n.y-l],[-i.x+c.x+n.x,-a.y-n.y-l]]}],u}},"./src/spillover/make_spillover_args.js":
/*!**********************************************!*\
  !*** ./src/spillover/make_spillover_args.js ***!
  \**********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n=[1,1,1,1]){return{frag:"\n    precision mediump float;\n    uniform vec4 color;\n    void main () {\n      gl_FragColor = color;\n    }",vert:"\n    precision mediump float;\n    attribute vec2 position;\n    uniform float inst_depth;\n    void main () {\n      // positioned further up (matrix is lower at 0.)\n      gl_Position = vec4(position, inst_depth, 1);\n    }",attributes:{position:t.prop("pos")},uniforms:{color:n,inst_depth:e},count:3,depth:{enable:!0,mask:!0,func:"less",range:[0,1]}}}},"./src/tooltip/make_matrix_cell_tooltip.js":
/*!*************************************************!*\
  !*** ./src/tooltip/make_matrix_cell_tooltip.js ***!
  \*************************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../cats/calc_cat_cluster_breakdown */"./src/cats/calc_cat_cluster_breakdown.js"),i=n(/*! ./../cats/make_cat_breakdown_graph */"./src/cats/make_cat_breakdown_graph.js");t.exports=function(t){var e,n,o,a,s={height:25,width:150},u={x:2,y:2},l={x:10,y:20},c=t.interact.mouseover,f=[];if("matrix-cell"===t.tooltip.tooltip_type?(f[0]=c.row.name+" and "+c.col.name,f[1]="value: "+c.value.toFixed(3)):t.tooltip.tooltip_type.indexOf("row")>=0&&"row-dendro"!=t.tooltip.tooltip_type?(f[0]=c.row.name,_.each(c.row.cats,function(t){f.push(t)})):t.tooltip.tooltip_type.indexOf("col")>=0&&"col-dendro"!=t.tooltip.tooltip_type?(f[0]=c.col.name,_.each(c.col.cats,function(t){f.push(t)})):"row-dendro"===t.tooltip.tooltip_type?_.each(c.row.dendro.all_names,function(t){f.push(t)}):"col-dendro"===t.tooltip.tooltip_type&&(f[0]="col-dendro",_.each(c.col.dendro.all_names,function(t){f.push(t)}),e=r(t,c.col.dendro,"col")),t.tooltip.tooltip_type.indexOf("dendro")<0){n=t.zoom_data.x.cursor_position-s.width-u.x,o=t.zoom_data.y.cursor_position-f.length*s.height-u.y;var h,p=(a=d3.select(t.root+" .canvas-container").append("g").style("position","absolute").style("top",o+"px").style("left",n+"px").classed("group-svg-tooltip",!0)).append("svg").style("height",function(){return f.length*s.height+u.y+"px"}).style("width",s.width+"px").classed("svg-tooltip",!0).append("g").classed("tooltip-group",!0);p.append("rect").style("height",function(){return f.length*s.height+u.y+"px"}).style("width",s.width+"px").style("fill","black").classed("tooltip-background",!0).style("opacity",.85),p.selectAll("text").data(f).enter().append("text").style("fill","white").attr("transform",function(t,e){return"translate("+l.x+", "+(e+1)*l.y+")"}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800).style("font-size",15).classed("tooltip-text",!0).text(function(t,e){return d3.select(this).classed("tooltip-text-line-"+String(e),!0),t});var d=d3.select(".tooltip-text").node().getBBox().width;_.each(f,function(t,e){(h=d3.select(".tooltip-text-line-"+String(e)).node().getBBox().width)>d&&(d=h)});(d>s.width||"row-label"===t.tooltip.tooltip_type)&&(d3.select(t.root+" .svg-tooltip").style("width",function(){return(h=d+4*l.x)+"px"}).style("left",function(){return t.zoom_data.x.cursor_position-d-4*l.x}),d3.select(t.root+" .tooltip-background").style("width",function(){return(h=d+4*l.x)+"px"}))}else a=d3.select(t.root+" .canvas-container").append("g").style("position","absolute").style("margin-top","-10px").classed("group-svg-tooltip",!0),"row-dendro"===t.tooltip.tooltip_type?(e=r(t,c.row.dendro,"row"),i(t,c.row.dendro,e,"row",a)):"col-dendro"===t.tooltip.tooltip_type&&(a.style("margin-left",String(185)+"px"),e=r(t,c.col.dendro,"col"),i(t,c.col.dendro,e,"col",a))}},"./src/utils/utils_clust.js":
/*!**********************************!*\
  !*** ./src/utils/utils_clust.js ***!
  \**********************************/
/*! no static exports found */function(t,e,n){var r=n(/*! underscore */"./node_modules/underscore/underscore.js");t.exports={normal_name:function(t){return t.name.replace(/_/g," ").split("#")[0]},is_supported_order:function(t){return"ini"===t||"clust"===t||"rank_var"===t||"rank"===t||"class"===t||"alpha"==t},has:function(t,e){return null!=t&&hasOwnProperty.call(t,e)},property:function(t){return function(e){return null==e?void 0:e[t]}},pluck:function(t,e){if(window._){if("function"==typeof r.pluck)return r.pluck(t,e);if("function"==typeof r.map)return r.map(t,this.property(e))}else if(t.map&&"function"==typeof t.map)return t.map(this.property(e))},is_undefined:function(t){return void 0===t},extend:function(t,e){for(var n in t=t||{},e)"object"==typeof e[n]?t[n]=this.extend(t[n],e[n]):t[n]=e[n];return t}}},"./src/zoom/calc_cursor_relative.js":
/*!******************************************!*\
  !*** ./src/zoom/calc_cursor_relative.js ***!
  \******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n={};return n.min=t.cursor_position-e.min-t.viz_offcenter,n.min<0?n.min=0:n.min>e.max&&(n.min=e.max),n.max=e.max+t.heat_offset-t.cursor_position+t.viz_offcenter,n.max<0?n.max=0:n.max>e.max+t.heat_offset&&(n.max=e.max+t.heat_offset),n}},"./src/zoom/calc_pan_by_zoom.js":
/*!**************************************!*\
  !*** ./src/zoom/calc_pan_by_zoom.js ***!
  \**************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){t.inst_eff_zoom=t.inst_zoom-1,t.pbz_relative_min=-t.inst_eff_zoom*e.min,t.pbz_relative_max=-t.inst_eff_zoom*e.max}},"./src/zoom/calc_potential_total_pan.js":
/*!**********************************************!*\
  !*** ./src/zoom/calc_potential_total_pan.js ***!
  \**********************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e={};return e.min=t.total_pan_min+t.pan_by_drag/t.total_zoom+t.pbz_relative_min/t.total_zoom,e.max=t.total_pan_max+-t.pan_by_drag/t.total_zoom+t.pbz_relative_max/t.total_zoom,e}},"./src/zoom/ini_zoom_data.js":
/*!***********************************!*\
  !*** ./src/zoom/ini_zoom_data.js ***!
  \***********************************/
/*! no static exports found */function(t,e){t.exports=function(){var t={zoom_function:function(t){return t.view}};return _.each(["x","y"],function(e){var n={total_zoom:1,cursor_position:0,total_pan_min:0,total_pan_max:0,pan_room:0,pan_by_zoom:0,pan_by_drag:0,inst_zoom:1,filter_zoom:1,prev_restrict:!1,zoom_step:10,show_text:!1,still_zooming:!1,total_mouseover:0};t[e]=n}),t}},"./src/zoom/ini_zoom_restrict.js":
/*!***************************************!*\
  !*** ./src/zoom/ini_zoom_restrict.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t){var e="row",n=t.labels["num_"+e];e="col";var r=t.labels["num_"+e],i=t.max_zoom,o={x:{}};o.x.max=i,o.x.min=1,o.x.ratio=1,o.y={},o.y.max=i,o.y.min=1,o.y.ratio=1;var a=r/t.viz_dim.heat.width/(n/t.viz_dim.heat.height);return n>r?(o.y.max=o.y.max*(1/a),o.y.ratio=1/a):(o.x.max=o.x.max*a,o.x.ratio=a),o}},"./src/zoom/pan_by_drag_rules.js":
/*!***************************************!*\
  !*** ./src/zoom/pan_by_drag_rules.js ***!
  \***************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){t.inst_zoom>1&&(t.pan_by_drag=0),t.pan_by_drag>0&&t.total_pan_min+t.pan_by_drag>=0&&(t.pan_by_drag=-t.total_pan_min),t.pan_by_drag<0&&t.total_pan_max-t.pan_by_drag>=0&&(t.pan_by_drag=t.total_pan_max),t.cursor_position<e.min+t.viz_offcenter?t.cursor_position=e.min+t.viz_offcenter:t.cursor_position>e.max+t.heat_offset+t.viz_offcenter&&(t.cursor_position=e.max+t.heat_offset+t.viz_offcenter)}},"./src/zoom/run_zoom_restrictions.js":
/*!*******************************************!*\
  !*** ./src/zoom/run_zoom_restrictions.js ***!
  \*******************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e,n,r,i){t.fully_zoomed_out=!1,t.total_pan_min>=0&&t.total_pan_max>=0&&(t.fully_zoomed_out=!0);var o=!1;if(e.min>1e-4&&e.max>1e-4&&(o=!0),e.min<=1e-4&&e.max<=1e-4&&(t.pan_by_zoom=-t.inst_eff_zoom*t.cursor_position,t.total_pan_min=e.min,t.total_pan_max=e.max,t.prev_restrict=!1),e.min>1e-4){t.pan_by_zoom=-t.inst_eff_zoom*(n.min+t.viz_offcenter)-t.total_pan_min*t.total_zoom,t.total_pan_min=0;var a=n.max-n.min+t.viz_offcenter,s=-t.inst_eff_zoom*a;t.total_pan_max=t.total_pan_max+s/t.total_zoom,1==t.fully_zoomed_out&&(t.pan_by_zoom=0,t.total_pan_max=0),t.prev_restrict="min"}if(e.max>1e-4){t.pan_by_zoom=-t.inst_eff_zoom*(n.max+t.heat_offset+t.viz_offcenter)+t.total_pan_max*t.total_zoom,t.total_pan_max=0;var u=n.max+t.heat_offset-n.min+t.viz_offcenter,l=-t.inst_eff_zoom*u;t.total_pan_min=t.total_pan_min+l/t.total_zoom,1==t.fully_zoomed_out&&(t.pan_by_zoom=0,t.total_pan_min=0),t.prev_restrict="max"}o&&("min"===i.prev_restrict?t.pan_by_zoom=-t.inst_eff_zoom*(n.min+t.viz_offcenter):"max"===i.prev_restrict&&(t.pan_by_zoom=-t.inst_eff_zoom*(n.max+t.heat_offset+t.viz_offcenter)))}},"./src/zoom/sanitize_inst_zoom.js":
/*!****************************************!*\
  !*** ./src/zoom/sanitize_inst_zoom.js ***!
  \****************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){1==e.total_zoom&&e.inst_zoom<1&&(e.inst_zoom=1,t.reset_cameras=!0)}},"./src/zoom/sanitize_potential_zoom.js":
/*!*********************************************!*\
  !*** ./src/zoom/sanitize_potential_zoom.js ***!
  \*********************************************/
/*! no static exports found */function(t,e){t.exports=function(t,e){var n=e.max,r=e.min,i=t.total_zoom*t.inst_zoom;i<n&&i>r?t.total_zoom=i:i>=n?t.inst_zoom<1?t.total_zoom=t.total_zoom*t.inst_zoom:(t.inst_zoom=n/t.total_zoom,t.total_zoom=n):i<=r&&(t.inst_zoom>1?t.total_zoom=t.total_zoom*t.inst_zoom:(t.inst_zoom=r/t.total_zoom,t.total_zoom=r))}},"./src/zoom/zoom_rules_high_mat.js":
/*!*****************************************!*\
  !*** ./src/zoom/zoom_rules_high_mat.js ***!
  \*****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./../interactions/interaction-events */"./src/interactions/interaction-events.js"),i=n(/*! xtend/mutable */"./node_modules/xtend/mutable.js"),o=n(/*! ./../interactions/track_interaction_zoom_data */"./src/interactions/track_interaction_zoom_data.js");t.exports=function(t,e){var n=n||{},a=i({element:n.element||t._gl.canvas},n||{}).element;r({element:a}).on("interaction",function(n){e.interact.enable_viz_interact?o(t,e,n):n.buttons}).on("interactionend",function(){})}},"./src/zoom/zoom_rules_low_mat.js":
/*!****************************************!*\
  !*** ./src/zoom/zoom_rules_low_mat.js ***!
  \****************************************/
/*! no static exports found */function(t,e,n){var r=n(/*! ./sanitize_inst_zoom */"./src/zoom/sanitize_inst_zoom.js"),i=n(/*! ./sanitize_potential_zoom */"./src/zoom/sanitize_potential_zoom.js"),o=n(/*! ./pan_by_drag_rules */"./src/zoom/pan_by_drag_rules.js"),a=n(/*! ./calc_cursor_relative */"./src/zoom/calc_cursor_relative.js"),s=n(/*! ./calc_pan_by_zoom */"./src/zoom/calc_pan_by_zoom.js"),u=n(/*! ./calc_potential_total_pan */"./src/zoom/calc_potential_total_pan.js"),l=n(/*! ./run_zoom_restrictions */"./src/zoom/run_zoom_restrictions.js");t.exports=function(t,e,n,c,f,h){var p;p="x"===h?"width":"height",n.viz_offcenter=t.viz_dim.canvas[p]*t.viz_dim.offcenter[h]/2;var d=_.clone(n);r(t,n),i(n,e),n.heat_offset=f.max-c.max,o(n,c);var m=a(n,c);s(n,m);var g=u(n);return l(n,g,c,h,d),n}},0:
/*!************************!*\
  !*** buffer (ignored) ***!
  \************************/
/*! no static exports found */function(t,e){}})},function(t,e,n){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,s=function(t){return a.call(t)},u=this.document;function l(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(u)try{s(u.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),u)try{u.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var f=this.Element.prototype,h=f.setAttribute,p=f.setAttributeNS,d=this.CSSStyleDeclaration.prototype,m=d.setProperty;f.setAttribute=function(t,e){h.call(this,t,e+"")},f.setAttributeNS=function(t,e,n){p.call(this,t,e,n+"")},d.setProperty=function(t,e,n){m.call(this,t,e+"",n)}}function g(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function v(t){return null===t?NaN:+t}function y(t){return!isNaN(t)}function _(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}o.ascending=g,o.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},o.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},o.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},o.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=e.call(t,t[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e.call(t,t[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(t,e){var n,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)y(n=+t[o])&&(r+=n);else for(;++o<i;)y(n=+e.call(t,t[o],o))&&(r+=n);return r},o.mean=function(t,e){var n,r=0,i=t.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)y(n=v(t[o]))?r+=n:--a;else for(;++o<i;)y(n=v(e.call(t,t[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},o.median=function(t,e){var n,r=[],i=t.length,a=-1;if(1===arguments.length)for(;++a<i;)y(n=v(t[a]))&&r.push(n);else for(;++a<i;)y(n=v(e.call(t,t[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(g),.5)},o.variance=function(t,e){var n,r,i=t.length,o=0,a=0,s=-1,u=0;if(1===arguments.length)for(;++s<i;)y(n=v(t[s]))&&(a+=(r=n-o)*(n-(o+=r/++u)));else for(;++s<i;)y(n=v(e.call(t,t[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++u)));if(u>1)return a/(u-1)},o.deviation=function(){var t=o.variance.apply(this,arguments);return t?Math.sqrt(t):t};var b=_(g);function x(t){return t.length}o.bisectLeft=b.left,o.bisect=o.bisectRight=b.right,o.bisector=function(t){return _(1===t.length?function(e,n){return g(t(e),n)}:t)},o.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,o<2&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},o.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},o.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(n<0?0:n);e<n;)i[e]=[r,r=t[++e]];return i},o.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=o.min(t,x),r=new Array(n);++e<n;)for(var i,a=-1,s=r[e]=new Array(i);++a<i;)s[a]=t[a][e];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(t){var e=[];for(var n in t)e.push(n);return e},o.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},o.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},o.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n};var w=Math.abs;function j(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function M(){this._=Object.create(null)}o.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,i=[],o=function(t){var e=1;for(;t*e%1;)e*=10;return e}(w(n)),a=-1;if(t*=o,e*=o,(n*=o)<0)for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)<e;)i.push(r/o);return i},o.map=function(t,e){var n=new M;if(t instanceof M)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var A="__proto__",k="\0";function z(t){return(t+="")===A||t[0]===k?k+t:t}function E(t){return(t+="")[0]===k?t.slice(1):t}function S(t){return z(t)in this._}function N(t){return(t=z(t))in this._&&delete this._[t]}function T(){var t=[];for(var e in this._)t.push(E(e));return t}function C(){var t=0;for(var e in this._)++t;return t}function O(){for(var t in this._)return!1;return!0}function P(){this._=Object.create(null)}function I(t){return t}function B(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function D(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=F.length;n<r;++n){var i=F[n]+e;if(i in t)return i}}j(M,{has:S,get:function(t){return this._[z(t)]},set:function(t,e){return this._[z(t)]=e},remove:N,keys:T,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:E(e),value:this._[e]});return t},size:C,empty:O,forEach:function(t){for(var e in this._)t.call(this,E(e),this._[e])}}),o.nest=function(){var t,e,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return e?e.call(n,o):t?o.sort(t):o;for(var u,l,c,f,h=-1,p=o.length,d=r[s++],m=new M;++h<p;)(f=m.get(u=d(l=o[h])))?f.push(l):m.set(u,[l]);return i?(l=i(),c=function(t,e){l.set(t,a(i,e,s))}):(l={},c=function(t,e){l[t]=a(i,e,s)}),m.forEach(c),l}return n.map=function(t,e){return a(e,t,0)},n.entries=function(t){return function t(e,n){if(n>=r.length)return e;var o=[],a=i[n++];return e.forEach(function(e,r){o.push({key:e,values:t(r,n)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}(a(o.map,t,0),0)},n.key=function(t){return r.push(t),n},n.sortKeys=function(t){return i[r.length-1]=t,n},n.sortValues=function(e){return t=e,n},n.rollup=function(t){return e=t,n},n},o.set=function(t){var e=new P;if(t)for(var n=0,r=t.length;n<r;++n)e.add(t[n]);return e},j(P,{has:S,add:function(t){return this._[z(t+="")]=!0,t},remove:N,values:T,size:C,empty:O,forEach:function(t){for(var e in this._)t.call(this,E(e))}}),o.behavior={},o.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=B(t,e,e[n]);return t};var F=["webkit","ms","moz","Moz","o","O"];function R(){}function L(){}function q(t){var e=[],n=new M;function r(){for(var n,r=e,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return t}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,e=e.slice(0,o=e.indexOf(a)).concat(e.slice(o+1)),n.remove(r)),i&&e.push(n.set(r,{on:i})),t)},r}function U(){o.event.preventDefault()}function H(){for(var t,e=o.event;t=e.sourceEvent;)e=t;return e}function Y(t){for(var e=new L,n=0,r=arguments.length;++n<r;)e[arguments[n]]=q(e);return e.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=t,o.event=i,e[i.type].apply(n,r)}finally{o.event=a}}},e}o.dispatch=function(){for(var t=new L,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=q(t);return t},L.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},o.event=null,o.requote=function(t){return t.replace(V,"\\$&")};var V=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Z={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]};function W(t){return Z(t,G),t}var X=function(t,e){return e.querySelector(t)},Q=function(t,e){return e.querySelectorAll(t)},$=function(t,e){var n=t.matches||t[D(t,"matchesSelector")];return($=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(X=function(t,e){return Sizzle(t,e)[0]||null},Q=Sizzle,$=Sizzle.matchesSelector),o.selection=function(){return o.select(u.documentElement)};var G=o.selection.prototype=[];function K(t){return"function"==typeof t?t:function(){return X(t,this)}}function J(t){return"function"==typeof t?t:function(){return Q(t,this)}}G.select=function(t){var e,n,r,i,o=[];t=K(t);for(var a=-1,s=this.length;++a<s;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var u=-1,l=r.length;++u<l;)(i=r[u])?(e.push(n=t.call(i,i.__data__,u,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return W(o)},G.selectAll=function(t){var e,n,r=[];t=J(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,l=a.length;++u<l;)(n=a[u])&&(r.push(e=s(t.call(n,n.__data__,u,i))),e.parentNode=n);return W(r)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nt(t,e){return t=o.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function rt(t){return t.trim().replace(/\s+/g," ")}function it(t){return new RegExp("(?:^|\\s+)"+o.requote(t)+"(?:\\s+|$)","g")}function ot(t){return(t+"").trim().split(/^|\s+/)}function at(t,e){var n=(t=ot(t).map(st)).length;return"function"==typeof e?function(){for(var r=-1,i=e.apply(this,arguments);++r<n;)t[r](this,i)}:function(){for(var r=-1;++r<n;)t[r](this,e)}}function st(t){var e=it(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",rt(i+" "+t))):n.setAttribute("class",rt(i.replace(e," ")))}}function ut(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}:function(){this.style.setProperty(t,e,n)}}function lt(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function ct(t){return"function"==typeof t?t:(t=o.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(n,t)}}function ft(){var t=this.parentNode;t&&t.removeChild(this)}function ht(t){return{__data__:t}}function pt(t){return function(){return $(this,t)}}function dt(t,e){for(var n=0,r=t.length;n<r;n++)for(var i,o=t[n],a=0,s=o.length;a<s;a++)(i=o[a])&&e(i,a,n);return t}function mt(t){return Z(t,gt),t}o.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(n)?{space:et[n],local:t}:t}},G.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=o.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(nt(e,t[e]));return this}return this.each(nt(t,e))},G.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=ot(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!it(t[i]).test(e))return!1;return!0}for(e in t)this.each(at(e,t[e]));return this}return this.each(at(t,e))},G.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.each(ut(n,t[n],e));return this}if(r<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(t)}n=""}return this.each(ut(t,e,n))},G.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(lt(e,t[e]));return this}return this.each(lt(t,e))},G.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},G.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},G.append=function(t){return t=ct(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},G.insert=function(t,e){return t=ct(t),e=K(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},G.remove=function(){return this.each(ft)},G.data=function(t,e){var n,r,i=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(t[i]=r.__data__);return t}function a(t,n){var r,i,o,a=t.length,c=n.length,f=Math.min(a,c),h=new Array(c),p=new Array(c),d=new Array(a);if(e){var m,g=new M,v=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(g.has(m=e.call(i,i.__data__,r))?d[r]=i:g.set(m,i),v[r]=m);for(r=-1;++r<c;)(i=g.get(m=e.call(n,o=n[r],r)))?!0!==i&&(h[r]=i,i.__data__=o):p[r]=ht(o),g.set(m,!0);for(r=-1;++r<a;)r in v&&!0!==g.get(v[r])&&(d[r]=t[r])}else{for(r=-1;++r<f;)i=t[r],o=n[r],i?(i.__data__=o,h[r]=i):p[r]=ht(o);for(;r<c;++r)p[r]=ht(n[r]);for(;r<a;++r)d[r]=t[r]}p.update=h,p.parentNode=h.parentNode=d.parentNode=t.parentNode,s.push(p),u.push(h),l.push(d)}var s=mt([]),u=W([]),l=W([]);if("function"==typeof t)for(;++i<o;)a(n=this[i],t.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],t);return u.enter=function(){return s},u.exit=function(){return l},u},G.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},G.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=pt(t));for(var o=0,a=this.length;o<a;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var s=0,u=n.length;s<u;s++)(r=n[s])&&t.call(r,r.__data__,s,o)&&e.push(r)}return W(i)},G.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},G.sort=function(t){t=function(t){arguments.length||(t=g);return function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},G.each=function(t){return dt(this,function(e,n,r){t.call(e,e.__data__,n,r)})},G.call=function(t){var e=s(arguments);return t.apply(e[0]=this,e),this},G.empty=function(){return!this.node()},G.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},G.size=function(){var t=0;return dt(this,function(){++t}),t};var gt=[];function vt(t,e,n){var r="__on"+t,i=t.indexOf("."),a=_t;i>0&&(t=t.slice(0,i));var u=yt.get(t);function l(){var e=this[r];e&&(this.removeEventListener(t,e,e.$),delete this[r])}return u&&(t=u,a=bt),i?e?function(){var i=a(e,s(arguments));l.call(this),this.addEventListener(t,this[r]=i,i.$=n),i._=e}:l:e?R:function(){var e,n=new RegExp("^__on([^.]+)"+o.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}}o.selection.enter=mt,o.selection.enter.prototype=gt,gt.append=G.append,gt.empty=G.empty,gt.node=G.node,gt.call=G.call,gt.size=G.size,gt.select=function(t){for(var e,n,r,i,o,a=[],s=-1,u=this.length;++s<u;){r=(i=this[s]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(e.push(r[l]=n=t.call(i.parentNode,o.__data__,l,s)),n.__data__=o.__data__):e.push(null)}return W(a)},gt.insert=function(t,e){return arguments.length<2&&(e=function(t){var e,n;return function(r,i,o){var a,s=t[o].update,u=s.length;for(o!=n&&(n=o,e=0),i>=e&&(e=i+1);!(a=s[e])&&++e<u;);return a}}(this)),G.insert.call(this,t,e)},o.select=function(t){var e;return"string"==typeof t?(e=[X(t,u)]).parentNode=u.documentElement:(e=[t]).parentNode=l(t),W([e])},o.selectAll=function(t){var e;return"string"==typeof t?(e=s(Q(t,u))).parentNode=u.documentElement:(e=s(t)).parentNode=null,W([e])},G.on=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=!1),t)this.each(vt(n,t[n],e));return this}if(r<2)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(vt(t,e,n))};var yt=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function _t(t,e){return function(n){var r=o.event;o.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{o.event=r}}}function bt(t,e){var n=_t(t,e);return function(t){var e=t.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||n.call(this,t)}}u&&yt.forEach(function(t){"on"+t in u&&yt.remove(t)});var xt,wt=0;function jt(t){var e=".dragsuppress-"+ ++wt,n="click"+e,r=o.select(c(t)).on("touchmove"+e,U).on("dragstart"+e,U).on("selectstart"+e,U);if(null==xt&&(xt=!("onselectstart"in t)&&D(t.style,"userSelect")),xt){var i=l(t).style,a=i[xt];i[xt]="none"}return function(t){if(r.on(e,null),xt&&(i[xt]=a),t){var o=function(){r.on(n,null)};r.on(n,function(){U(),o()},!0),setTimeout(o,0)}}}o.mouse=function(t){return At(t,H())};var Mt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function At(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(Mt<0){var i=c(t);if(i.scrollX||i.scrollY){var a=(n=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();Mt=!(a.f||a.e),n.remove()}}return Mt?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}function kt(){return o.event.changedTouches[0].identifier}o.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=H().changedTouches),e)for(var r,i=0,o=e.length;i<o;++i)if((r=e[i]).identifier===n)return At(t,r)},o.behavior.drag=function(){var t=Y(i,"drag","dragstart","dragend"),e=null,n=a(R,o.mouse,c,"mousemove","mouseup"),r=a(kt,o.touch,I,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var u,l=o.event.target.correspondingElement||o.event.target,c=this.parentNode,f=t.of(this,arguments),h=0,p=n(),d=".drag"+(null==p?"":"-"+p),m=o.select(i(l)).on(a+d,function(){var t,e,n=r(c,p);if(!n)return;t=n[0]-v[0],e=n[1]-v[1],h|=t|e,v=n,f({type:"drag",x:n[0]+u[0],y:n[1]+u[1],dx:t,dy:e})}).on(s+d,function(){if(!r(c,p))return;m.on(a+d,null).on(s+d,null),g(h),f({type:"dragend"})}),g=jt(l),v=r(c,p);u=e?[(u=e.apply(this,arguments)).x-v[0],u.y-v[1]]:[0,0],f({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(e=t,i):e},o.rebind(i,t,"on")},o.touches=function(t,e){return arguments.length<2&&(e=H().touches),e?s(e).map(function(e){var n=At(t,e);return n.identifier=e.identifier,n}):[]};var zt=1e-6,Et=zt*zt,St=Math.PI,Nt=2*St,Tt=Nt-zt,Ct=St/2,Ot=St/180,Pt=180/St;function It(t){return t>0?1:t<0?-1:0}function Bt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Dt(t){return t>1?0:t<-1?St:Math.acos(t)}function Ft(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Rt(t){return((t=Math.exp(t))+1/t)/2}function Lt(t){return(t=Math.sin(t/2))*t}var qt=Math.SQRT2;o.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],s=e[0],u=e[1],l=e[2],c=s-i,f=u-o,h=c*c+f*f;if(h<Et)r=Math.log(l/a)/qt,n=function(t){return[i+t*c,o+t*f,a*Math.exp(qt*t*r)]};else{var p=Math.sqrt(h),d=(l*l-a*a+4*h)/(2*a*2*p),m=(l*l-a*a-4*h)/(2*l*2*p),g=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/qt,n=function(t){var e=t*r,n=Rt(g),s=a/(2*p)*(n*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(qt*e+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+s*c,o+s*f,a*n/Rt(qt*e+g)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var t,e,n,r,i,a,s,l,f,h={x:0,y:0,k:1},p=[960,500],d=Yt,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",_="mouseup.zoom",b="touchstart.zoom",x=Y(w,"zoomstart","zoom","zoomend");function w(t){t.on(v,T).on(Ht+".zoom",O).on("dblclick.zoom",P).on(b,C)}function j(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function M(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function k(t,n,r,i){t.__chart__={x:h.x,y:h.y,k:h.k},M(Math.pow(2,i)),A(e=n,r),t=o.select(t),m>0&&(t=t.transition().duration(m)),t.call(w.event)}function z(){s&&s.domain(a.range().map(function(t){return(t-h.x)/h.k}).map(a.invert)),f&&f.domain(l.range().map(function(t){return(t-h.y)/h.k}).map(l.invert))}function E(t){g++||t({type:"zoomstart"})}function S(t){z(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function N(t){--g||(t({type:"zoomend"}),e=null)}function T(){var t=this,e=x.of(t,arguments),n=0,r=o.select(c(t)).on(y,function(){n=1,A(o.mouse(t),i),S(e)}).on(_,function(){r.on(y,null).on(_,null),a(n),N(e)}),i=j(o.mouse(t)),a=jt(t);ps.call(t),E(e)}function C(){var t,e=this,n=x.of(e,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,u="touchmove"+s,l="touchend"+s,c=[],f=o.select(e),p=jt(e);function d(){var n=o.touches(e);return t=h.k,n.forEach(function(t){t.identifier in r&&(r[t.identifier]=j(t))}),n}function m(){var t=o.event.target;o.select(t).on(u,g).on(l,y),c.push(t);for(var n=o.event.changedTouches,s=0,f=n.length;s<f;++s)r[n[s].identifier]=null;var p=d(),m=Date.now();if(1===p.length){if(m-i<500){var v=p[0];k(e,v,r[v.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),U()}i=m}else if(p.length>1){v=p[0];var _=p[1],b=v[0]-_[0],x=v[1]-_[1];a=b*b+x*x}}function g(){var s,u,l,c,f=o.touches(e);ps.call(e);for(var h=0,p=f.length;h<p;++h,c=null)if(l=f[h],c=r[l.identifier]){if(u)break;s=l,u=c}if(c){var d=(d=l[0]-s[0])*d+(d=l[1]-s[1])*d,m=a&&Math.sqrt(d/a);s=[(s[0]+l[0])/2,(s[1]+l[1])/2],u=[(u[0]+c[0])/2,(u[1]+c[1])/2],M(m*t)}i=null,A(s,u),S(n)}function y(){if(o.event.touches.length){for(var t=o.event.changedTouches,e=0,i=t.length;e<i;++e)delete r[t[e].identifier];for(var a in r)return void d()}o.selectAll(c).on(s,null),f.on(v,T).on(b,C),p(),N(n)}m(),E(n),f.on(v,null).on(b,m)}function O(){var i=x.of(this,arguments);r?clearTimeout(r):(ps.call(this),t=j(e=n||o.mouse(this)),E(i)),r=setTimeout(function(){r=null,N(i)},50),U(),M(Math.pow(2,.002*Ut())*h.k),A(e,t),S(i)}function P(){var t=o.mouse(this),e=Math.log(h.k)/Math.LN2;k(this,t,j(t),o.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return Ht||(Ht="onwheel"in u?(Ut=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in u?(Ut=function(){return o.event.wheelDelta},"mousewheel"):(Ut=function(){return-o.event.detail},"MozMousePixelScroll")),w.event=function(t){t.each(function(){var t=x.of(this,arguments),n=h;gs?o.select(this).transition().each("start.zoom",function(){h=this.__chart__||{x:0,y:0,k:1},E(t)}).tween("zoom:zoom",function(){var r=p[0],i=p[1],a=e?e[0]:r/2,s=e?e[1]:i/2,u=o.interpolateZoom([(a-h.x)/h.k,(s-h.y)/h.k,r/h.k],[(a-n.x)/n.k,(s-n.y)/n.k,r/n.k]);return function(e){var n=u(e),i=r/n[2];this.__chart__=h={x:a-n[0]*i,y:s-n[1]*i,k:i},S(t)}}).each("interrupt.zoom",function(){N(t)}).each("end.zoom",function(){N(t)}):(this.__chart__=h,E(t),S(t),N(t))})},w.translate=function(t){return arguments.length?(h={x:+t[0],y:+t[1],k:h.k},z(),w):[h.x,h.y]},w.scale=function(t){return arguments.length?(h={x:h.x,y:h.y,k:null},M(+t),z(),w):h.k},w.scaleExtent=function(t){return arguments.length?(d=null==t?Yt:[+t[0],+t[1]],w):d},w.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],w):n},w.size=function(t){return arguments.length?(p=t&&[+t[0],+t[1]],w):p},w.duration=function(t){return arguments.length?(m=+t,w):m},w.x=function(t){return arguments.length?(s=t,a=t.copy(),h={x:0,y:0,k:1},w):s},w.y=function(t){return arguments.length?(f=t,l=t.copy(),h={x:0,y:0,k:1},w):f},o.rebind(w,x,"on")};var Ut,Ht,Yt=[0,1/0];function Vt(){}function Zt(t,e,n){return this instanceof Zt?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof Zt?new Zt(t.h,t.s,t.l):de(""+t,me,Zt):new Zt(t,e,n)}o.color=Vt,Vt.prototype.toString=function(){return this.rgb()+""},o.hsl=Zt;var Wt=Zt.prototype=new Vt;function Xt(t,e,n){var r,i;function o(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:e<0?0:e>1?1:e,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+e):n+e-n*e),new le(o(t+120),o(t),o(t-120))}function Qt(t,e,n){return this instanceof Qt?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof Qt?new Qt(t.h,t.c,t.l):oe(t instanceof Kt?t.l:(t=ge((t=o.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Qt(t,e,n)}Wt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,this.l/t)},Wt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Zt(this.h,this.s,t*this.l)},Wt.rgb=function(){return Xt(this.h,this.s,this.l)},o.hcl=Qt;var $t=Qt.prototype=new Vt;function Gt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Kt(n,Math.cos(t*=Ot)*e,Math.sin(t)*e)}function Kt(t,e,n){return this instanceof Kt?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof Kt?new Kt(t.l,t.a,t.b):t instanceof Qt?Gt(t.h,t.c,t.l):ge((t=le(t)).r,t.g,t.b):new Kt(t,e,n)}$t.brighter=function(t){return new Qt(this.h,this.c,Math.min(100,this.l+Jt*(arguments.length?t:1)))},$t.darker=function(t){return new Qt(this.h,this.c,Math.max(0,this.l-Jt*(arguments.length?t:1)))},$t.rgb=function(){return Gt(this.h,this.c,this.l).rgb()},o.lab=Kt;var Jt=18,te=.95047,ee=1,ne=1.08883,re=Kt.prototype=new Vt;function ie(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return new le(ue(3.2404542*(i=ae(i)*te)-1.5371385*(r=ae(r)*ee)-.4985314*(o=ae(o)*ne)),ue(-.969266*i+1.8760108*r+.041556*o),ue(.0556434*i-.2040259*r+1.0572252*o))}function oe(t,e,n){return t>0?new Qt(Math.atan2(n,e)*Pt,Math.sqrt(e*e+n*n),t):new Qt(NaN,NaN,t)}function ae(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function se(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ue(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function le(t,e,n){return this instanceof le?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof le?new le(t.r,t.g,t.b):de(""+t,le,Xt):new le(t,e,n)}function ce(t){return new le(t>>16,t>>8&255,255&t)}function fe(t){return ce(t)+""}re.brighter=function(t){return new Kt(Math.min(100,this.l+Jt*(arguments.length?t:1)),this.a,this.b)},re.darker=function(t){return new Kt(Math.max(0,this.l-Jt*(arguments.length?t:1)),this.a,this.b)},re.rgb=function(){return ie(this.l,this.a,this.b)},o.rgb=le;var he=le.prototype=new Vt;function pe(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function de(t,e,n){var r,i,o,a=0,s=0,u=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(ye(i[0]),ye(i[1]),ye(i[2]))}return(o=_e.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,u=15&o,u|=u<<4):7===t.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,u=255&o)),e(a,s,u))}function me(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),s=a-o,u=(a+o)/2;return s?(i=u<.5?s/(a+o):s/(2-a-o),r=t==a?(e-n)/s+(e<n?6:0):e==a?(n-t)/s+2:(t-e)/s+4,r*=60):(r=NaN,i=u>0&&u<1?0:r),new Zt(r,i,u)}function ge(t,e,n){var r=se((.4124564*(t=ve(t))+.3575761*(e=ve(e))+.1804375*(n=ve(n)))/te),i=se((.2126729*t+.7151522*e+.072175*n)/ee);return Kt(116*i-16,500*(r-i),200*(i-se((.0193339*t+.119192*e+.9503041*n)/ne)))}function ve(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ye(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}he.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&e<i&&(e=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new le(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new le(i,i,i)},he.darker=function(t){return new le((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},he.hsl=function(){return me(this.r,this.g,this.b)},he.toString=function(){return"#"+pe(this.r)+pe(this.g)+pe(this.b)};var _e=o.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function be(t){return"function"==typeof t?t:function(){return t}}function xe(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),we(e,n,t,r)}}function we(t,e,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),u={},l=new XMLHttpRequest,c=null;function f(){var t,e=l.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(l)||e>=200&&e<300||304===e){try{t=n.call(i,l)}catch(t){return void a.error.call(i,t)}a.load.call(i,t)}else a.error.call(i,l)}return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=f:l.onreadystatechange=function(){l.readyState>3&&f()},l.onprogress=function(t){var e=o.event;o.event=t;try{a.progress.call(i,l)}finally{o.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return n=t,i},["get","post"].forEach(function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}}),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),l.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),l.setRequestHeader)for(var s in u)l.setRequestHeader(s,u[s]);return null!=e&&l.overrideMimeType&&l.overrideMimeType(e),null!=c&&(l.responseType=c),null!=o&&i.on("error",o).on("load",function(t){o(null,t)}),a.beforesend.call(i,l),l.send(null==r?null:r),i},i.abort=function(){return l.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(r))}_e.forEach(function(t,e){_e.set(t,ce(e))}),o.functor=be,o.xhr=xe(I),o.dsv=function(t,e){var n=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function i(t,n,r){arguments.length<3&&(r=n,n=null);var i=we(t,e,null==n?o:a(n),r);return i.row=function(t){return arguments.length?i.response(null==(n=t)?o:a(t)):n},i}function o(t){return i.parse(t.responseText)}function a(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(u).join(t)}function u(t){return n.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var n;return i.parseRows(t,function(t,r){if(n)return n(t,r-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");n=e?function(t,n){return e(i(t),n)}:i})},i.parseRows=function(t,e){var n,i,o={},a={},s=[],u=t.length,l=0,c=0;function f(){if(l>=u)return a;if(i)return i=!1,o;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++<u;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}return l=n+2,13===(s=t.charCodeAt(n+1))?(i=!0,10===t.charCodeAt(n+2)&&++l):10===s&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;l<u;){var s,c=1;if(10===(s=t.charCodeAt(l++)))i=!0;else if(13===s)i=!0,10===t.charCodeAt(l)&&(++l,++c);else if(s!==r)continue;return t.slice(e,l-c)}return t.slice(e)}for(;(n=f())!==a;){for(var h=[];n!==o&&n!==a;)h.push(n),n=f();e&&null==(h=e(h,c++))||s.push(h)}return s},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var n=new P,r=[];return e.forEach(function(t){for(var e in t)n.has(e)||r.push(n.add(e))}),[r.map(u).join(t)].concat(e.map(function(e){return r.map(function(t){return u(e[t])}).join(t)})).join("\n")},i.formatRows=function(t){return t.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var je,Me,Ae,ke,ze=this[D(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Ee(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var i={c:t,t:n+e,n:null};return Me?Me.n=i:je=i,Me=i,Ae||(ke=clearTimeout(ke),Ae=1,ze(Se)),i}function Se(){var t=Ne(),e=Te()-t;e>24?(isFinite(e)&&(clearTimeout(ke),ke=setTimeout(Se,e)),Ae=0):(Ae=1,ze(Se))}function Ne(){for(var t=Date.now(),e=je;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Te(){for(var t,e=je,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:je=e.n;return Me=t,n}function Ce(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}o.timer=function(){Ee.apply(this,arguments)},o.timer.flush=function(){Ne(),Te()},o.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Oe=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(function(t,e){var n=Math.pow(10,3*w(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}});o.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=o.round(t,Ce(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Oe[8+n/3]};var Pe=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ie=o.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=o.round(t,Ce(t,e))).toFixed(Math.max(0,Math.min(20,Ce(t*(1+1e-15),e))))}});function Be(t){return t+""}var De=o.time={},Fe=Date;function Re(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Re.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Le.setUTCDate.apply(this._,arguments)},setDay:function(){Le.setUTCDay.apply(this._,arguments)},setFullYear:function(){Le.setUTCFullYear.apply(this._,arguments)},setHours:function(){Le.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Le.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Le.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Le.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Le.setUTCSeconds.apply(this._,arguments)},setTime:function(){Le.setTime.apply(this._,arguments)}};var Le=Date.prototype;function qe(t,e,n){function r(e){var n=t(e),r=o(n,1);return e-n<r-e?n:r}function i(n){return e(n=t(new Fe(n-1)),1),n}function o(t,n){return e(t=new Fe(+t),n),t}function a(t,r,o){var a=i(t),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),e(a,1);else for(;a<r;)s.push(new Date(+a)),e(a,1);return s}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=Ue(t);return s.floor=s,s.round=Ue(r),s.ceil=Ue(i),s.offset=Ue(o),s.range=function(t,e,n){try{Fe=Re;var r=new Re;return r._=t,a(r,e,n)}finally{Fe=Date}},t}function Ue(t){return function(e,n){try{Fe=Re;var r=new Re;return r._=e,t(r,n)._}finally{Fe=Date}}}De.year=qe(function(t){return(t=De.day(t)).setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),De.years=De.year.range,De.years.utc=De.year.utc.range,De.day=qe(function(t){var e=new Fe(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),De.days=De.day.range,De.days.utc=De.day.utc.range,De.dayOfYear=function(t){var e=De.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=De[t]=qe(function(t){return(t=De.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=De.year(t).getDay();return Math.floor((De.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});De[t+"s"]=n.range,De[t+"s"].utc=n.utc.range,De[t+"OfYear"]=function(t){var n=De.year(t).getDay();return Math.floor((De.dayOfYear(t)+(n+e)%7)/7)}}),De.week=De.sunday,De.weeks=De.sunday.range,De.weeks.utc=De.sunday.utc.range,De.weekOfYear=De.sundayOfYear;var He={"-":"",_:" ",0:"0"},Ye=/^\s*\d+/,Ve=/^%/;function Ze(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function We(t){return new RegExp("^(?:"+t.map(o.requote).join("|")+")","i")}function Xe(t){for(var e=new M,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Qe(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function $e(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function Ge(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function Ke(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Je(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+2));return r?(t.y=function(t){return t+(t>68?1900:2e3)}(+r[0]),n+r[0].length):-1}function tn(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function en(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function nn(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function rn(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function on(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function an(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function sn(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function un(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ln(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=w(e)/60|0,i=w(e)%60;return n+Ze(r,"0",2)+Ze(i,"0",2)}function cn(t,e,n){Ve.lastIndex=0;var r=Ve.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function fn(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}o.locale=function(t){return{numberFormat:function(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,o=[],a=0,s=r[0],u=0;i>0&&s>0&&(u+s+1>e&&(s=Math.max(1,e-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>e));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:I;return function(t){var n=Pe.exec(t),r=n[1]||" ",s=n[2]||">",u=n[3]||"-",l=n[4]||"",c=n[5],f=+n[6],h=n[7],p=n[8],d=n[9],m=1,g="",v="",y=!1,_=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===s)&&(c=r="0",s="="),d){case"n":h=!0,d="g";break;case"%":m=100,v="%",d="f";break;case"p":m=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+d.toLowerCase());case"c":_=!1;case"d":y=!0,p=0;break;case"s":m=-1,d="r"}"$"===l&&(g=i[0],v=i[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Ie.get(d)||Be;var b=c&&h;return function(t){var n=v;if(y&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===u?"":u;if(m<0){var l=o.formatPrefix(t,p);t=l.scale(t),n=l.symbol+v}else t*=m;var x,w,j=(t=d(t,p)).lastIndexOf(".");if(j<0){var M=_?t.lastIndexOf("e"):-1;M<0?(x=t,w=""):(x=t.substring(0,M),w=t.substring(M))}else x=t.substring(0,j),w=e+t.substring(j+1);!c&&h&&(x=a(x,1/0));var A=g.length+x.length+w.length+(b?0:i.length),k=A<f?new Array(A=f-A+1).join(r):"";return b&&(x=a(k+x,k.length?f-w.length:1/0)),i+=g,t=x+w,("<"===s?i+t+k:">"===s?k+i+t:"^"===s?k.substring(0,A>>=1)+i+t+k.substring(A):i+(b?t:k+t))+n}}}(t),timeFormat:function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,s=t.shortDays,u=t.months,l=t.shortMonths;function c(t){var e=t.length;function n(n){for(var r,i,o,a=[],s=-1,u=0;++s<e;)37===t.charCodeAt(s)&&(a.push(t.slice(u,s)),null!=(i=He[r=t.charAt(++s)])&&(r=t.charAt(++s)),(o=x[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),u=s+1);return a.push(t.slice(u,s)),a.join("")}return n.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(f(n,t,e,0)!=e.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Fe!==Re,i=new(r?Re:Fe);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return t},n}function f(t,e,n,r){for(var i,o,a,s=0,u=e.length,l=n.length;s<u;){if(r>=l)return-1;if(37===(i=e.charCodeAt(s++))){if(a=e.charAt(s++),!(o=w[a in He?e.charAt(s++):a])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}c.utc=function(t){var e=c(t);function n(t){try{var n=new(Fe=Re);return n._=t,e(n)}finally{Fe=Date}}return n.parse=function(t){try{Fe=Re;var n=e.parse(t);return n&&n._}finally{Fe=Date}},n.toString=e.toString,n},c.multi=c.utc.multi=fn;var h=o.map(),p=We(a),d=Xe(a),m=We(s),g=Xe(s),v=We(u),y=Xe(u),_=We(l),b=Xe(l);i.forEach(function(t,e){h.set(t.toLowerCase(),e)});var x={a:function(t){return s[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:c(e),d:function(t,e){return Ze(t.getDate(),e,2)},e:function(t,e){return Ze(t.getDate(),e,2)},H:function(t,e){return Ze(t.getHours(),e,2)},I:function(t,e){return Ze(t.getHours()%12||12,e,2)},j:function(t,e){return Ze(1+De.dayOfYear(t),e,3)},L:function(t,e){return Ze(t.getMilliseconds(),e,3)},m:function(t,e){return Ze(t.getMonth()+1,e,2)},M:function(t,e){return Ze(t.getMinutes(),e,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,e){return Ze(t.getSeconds(),e,2)},U:function(t,e){return Ze(De.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ze(De.mondayOfYear(t),e,2)},x:c(n),X:c(r),y:function(t,e){return Ze(t.getFullYear()%100,e,2)},Y:function(t,e){return Ze(t.getFullYear()%1e4,e,4)},Z:ln,"%":function(){return"%"}},w={a:function(t,e,n){m.lastIndex=0;var r=m.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){p.lastIndex=0;var r=p.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){v.lastIndex=0;var r=v.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return f(t,x.c.toString(),e,n)},d:nn,e:nn,H:on,I:on,j:rn,L:un,m:en,M:an,p:function(t,e,n){var r=h.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)},S:sn,U:$e,w:Qe,W:Ge,x:function(t,e,n){return f(t,x.x.toString(),e,n)},X:function(t,e,n){return f(t,x.X.toString(),e,n)},y:Je,Y:Ke,Z:tn,"%":cn};return c}(t)}};var hn=o.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]});function pn(){}o.format=hn.numberFormat,o.geo={},pn.prototype={s:0,t:0,add:function(t){mn(t,this.t,dn),mn(dn.s,this.s,this),this.s?this.t+=dn.t:this.s=dn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var dn=new pn;function mn(t,e,n){var r=n.s=t+e,i=r-t,o=r-i;n.t=t-o+(e-i)}function gn(t,e){t&&yn.hasOwnProperty(t.type)&&yn[t.type](t,e)}o.geo.stream=function(t,e){t&&vn.hasOwnProperty(t.type)?vn[t.type](t,e):gn(t,e)};var vn={Feature:function(t,e){gn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)gn(n[r].geometry,e)}},yn={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){_n(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_n(n[r],e,0)},Polygon:function(t,e){bn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)bn(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)gn(n[r],e)}};function _n(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function bn(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)_n(t[n],e,1);e.polygonEnd()}o.geo.area=function(t){return xn=0,o.geo.stream(t,Pn),xn};var xn,wn,jn,Mn,An,kn,zn,En,Sn,Nn,Tn,Cn,On=new pn,Pn={sphere:function(){xn+=4*St},point:R,lineStart:R,lineEnd:R,polygonStart:function(){On.reset(),Pn.lineStart=In},polygonEnd:function(){var t=2*On;xn+=t<0?4*St+t:t,Pn.lineStart=Pn.lineEnd=Pn.point=R}};function In(){var t,e,n,r,i;function o(t,e){e=e*Ot/2+St/4;var o=(t*=Ot)-n,a=o>=0?1:-1,s=a*o,u=Math.cos(e),l=Math.sin(e),c=i*l,f=r*u+c*Math.cos(s),h=c*a*Math.sin(s);On.add(Math.atan2(h,f)),n=t,r=u,i=l}Pn.point=function(a,s){Pn.point=o,n=(t=a)*Ot,r=Math.cos(s=(e=s)*Ot/2+St/4),i=Math.sin(s)},Pn.lineEnd=function(){o(t,e)}}function Bn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function Dn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Fn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Rn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ln(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function qn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Un(t){return[Math.atan2(t[1],t[0]),Ft(t[2])]}function Hn(t,e){return w(t[0]-e[0])<zt&&w(t[1]-e[1])<zt}o.geo.bounds=function(){var t,e,n,r,i,a,s,u,l,c,f,h={point:p,lineStart:m,lineEnd:g,polygonStart:function(){h.point=v,h.lineStart=y,h.lineEnd=_,l=0,Pn.polygonStart()},polygonEnd:function(){Pn.polygonEnd(),h.point=p,h.lineStart=m,h.lineEnd=g,On<0?(t=-(n=180),e=-(r=90)):l>zt?r=90:l<-zt&&(e=-90),f[0]=t,f[1]=n}};function p(i,o){c.push(f=[t=i,n=i]),o<e&&(e=o),o>r&&(r=o)}function d(o,a){var s=Bn([o*Ot,a*Ot]);if(u){var l=Fn(u,s),c=Fn([l[1],-l[0],0],l);qn(c),c=Un(c);var f=o-i,h=f>0?1:-1,d=c[0]*Pt*h,m=w(f)>180;if(m^(h*i<d&&d<h*o))(g=c[1]*Pt)>r&&(r=g);else if(m^(h*i<(d=(d+360)%360-180)&&d<h*o)){var g;(g=-c[1]*Pt)<e&&(e=g)}else a<e&&(e=a),a>r&&(r=a);m?o<i?b(t,o)>b(t,n)&&(n=o):b(o,n)>b(t,n)&&(t=o):n>=t?(o<t&&(t=o),o>n&&(n=o)):o>i?b(t,o)>b(t,n)&&(n=o):b(o,n)>b(t,n)&&(t=o)}else p(o,a);u=s,i=o}function m(){h.point=d}function g(){f[0]=t,f[1]=n,h.point=p,u=null}function v(t,e){if(u){var n=t-i;l+=w(n)>180?n+(n>0?360:-360):n}else a=t,s=e;Pn.point(t,e),d(t,e)}function y(){Pn.lineStart()}function _(){v(a,s),Pn.lineEnd(),w(l)>zt&&(t=-(n=180)),f[0]=t,f[1]=n,u=null}function b(t,e){return(e-=t)<0?e+360:e}function x(t,e){return t[0]-e[0]}function j(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(i){if(r=n=-(t=e=1/0),c=[],o.geo.stream(i,h),l=c.length){c.sort(x);for(var a=1,s=[m=c[0]];a<l;++a)j((p=c[a])[0],m)||j(p[1],m)?(b(m[0],p[1])>b(m[0],m[1])&&(m[1]=p[1]),b(p[0],m[1])>b(m[0],m[1])&&(m[0]=p[0])):s.push(m=p);for(var u,l,p,d=-1/0,m=(a=0,s[l=s.length-1]);a<=l;m=p,++a)p=s[a],(u=b(m[1],p[0]))>d&&(d=u,t=p[0],n=m[1])}return c=f=null,t===1/0||e===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,e],[n,r]]}}(),o.geo.centroid=function(t){wn=jn=Mn=An=kn=zn=En=Sn=Nn=Tn=Cn=0,o.geo.stream(t,Yn);var e=Nn,n=Tn,r=Cn,i=e*e+n*n+r*r;return i<Et&&(e=zn,n=En,r=Sn,jn<zt&&(e=Mn,n=An,r=kn),(i=e*e+n*n+r*r)<Et)?[NaN,NaN]:[Math.atan2(n,e)*Pt,Ft(r/Math.sqrt(i))*Pt]};var Yn={sphere:R,point:Vn,lineStart:Wn,lineEnd:Xn,polygonStart:function(){Yn.lineStart=Qn},polygonEnd:function(){Yn.lineStart=Wn}};function Vn(t,e){t*=Ot;var n=Math.cos(e*=Ot);Zn(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Zn(t,e,n){Mn+=(t-Mn)/++wn,An+=(e-An)/wn,kn+=(n-kn)/wn}function Wn(){var t,e,n;function r(r,i){r*=Ot;var o=Math.cos(i*=Ot),a=o*Math.cos(r),s=o*Math.sin(r),u=Math.sin(i),l=Math.atan2(Math.sqrt((l=e*u-n*s)*l+(l=n*a-t*u)*l+(l=t*s-e*a)*l),t*a+e*s+n*u);jn+=l,zn+=l*(t+(t=a)),En+=l*(e+(e=s)),Sn+=l*(n+(n=u)),Zn(t,e,n)}Yn.point=function(i,o){i*=Ot;var a=Math.cos(o*=Ot);t=a*Math.cos(i),e=a*Math.sin(i),n=Math.sin(o),Yn.point=r,Zn(t,e,n)}}function Xn(){Yn.point=Vn}function Qn(){var t,e,n,r,i;function o(t,e){t*=Ot;var o=Math.cos(e*=Ot),a=o*Math.cos(t),s=o*Math.sin(t),u=Math.sin(e),l=r*u-i*s,c=i*a-n*u,f=n*s-r*a,h=Math.sqrt(l*l+c*c+f*f),p=n*a+r*s+i*u,d=h&&-Dt(p)/h,m=Math.atan2(h,p);Nn+=d*l,Tn+=d*c,Cn+=d*f,jn+=m,zn+=m*(n+(n=a)),En+=m*(r+(r=s)),Sn+=m*(i+(i=u)),Zn(n,r,i)}Yn.point=function(a,s){t=a,e=s,Yn.point=o,a*=Ot;var u=Math.cos(s*=Ot);n=u*Math.cos(a),r=u*Math.sin(a),i=Math.sin(s),Zn(n,r,i)},Yn.lineEnd=function(){o(t,e),Yn.lineEnd=Xn,Yn.point=Vn}}function $n(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Gn(){return!0}function Kn(t,e,n,r,i){var o=[],a=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(Hn(n,r)){i.lineStart();for(var s=0;s<e;++s)i.point((n=t[s])[0],n[1]);i.lineEnd()}else{var u=new tr(n,t,null,!0),l=new tr(n,null,u,!1);u.o=l,o.push(u),a.push(l),l=new tr(r,null,u=new tr(r,t,null,!1),!0),u.o=l,o.push(u),a.push(l)}}}),a.sort(e),Jn(o),Jn(a),o.length){for(var s=0,u=n,l=a.length;s<l;++s)a[s].e=u=!u;for(var c,f,h=o[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(s=0,l=c.length;s<l;++s)i.point((f=c[s])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(d)for(s=(c=p.p.z).length-1;s>=0;--s)i.point((f=c[s])[0],f[1]);else r(p.x,p.p.x,-1,i);p=p.p}c=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Jn(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function tr(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function er(t,e,n,r){return function(i,a){var s,u=e(a),l=i.invert(r[0],r[1]),c={point:f,lineStart:p,lineEnd:d,polygonStart:function(){c.point=b,c.lineStart=x,c.lineEnd=w,s=[],m=[]},polygonEnd:function(){c.point=f,c.lineStart=p,c.lineEnd=d,s=o.merge(s);var t=function(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;On.reset();for(var s=0,u=e.length;s<u;++s){var l=e[s],c=l.length;if(c)for(var f=l[0],h=f[0],p=f[1]/2+St/4,d=Math.sin(p),m=Math.cos(p),g=1;;){g===c&&(g=0);var v=(t=l[g])[0],y=t[1]/2+St/4,_=Math.sin(y),b=Math.cos(y),x=v-h,w=x>=0?1:-1,j=w*x,M=j>St,A=d*_;if(On.add(Math.atan2(A*w*Math.sin(j),m*b+A*Math.cos(j))),o+=M?x+w*Nt:x,M^h>=n^v>=n){var k=Fn(Bn(f),Bn(t));qn(k);var z=Fn(i,k);qn(z);var E=(M^x>=0?-1:1)*Ft(z[2]);(r>E||r===E&&(k[0]||k[1]))&&(a+=M^x>=0?1:-1)}if(!g++)break;h=v,d=_,m=b,f=t}}return(o<-zt||o<zt&&On<-zt)^1&a}(l,m);s.length?(_||(a.polygonStart(),_=!0),Kn(s,ir,t,n,a)):t&&(_||(a.polygonStart(),_=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),_&&(a.polygonEnd(),_=!1),s=m=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function f(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&a.point(e,n)}function h(t,e){var n=i(t,e);u.point(n[0],n[1])}function p(){c.point=h,u.lineStart()}function d(){c.point=f,u.lineEnd()}var m,g,v=rr(),y=e(v),_=!1;function b(t,e){g.push([t,e]);var n=i(t,e);y.point(n[0],n[1])}function x(){y.lineStart(),g=[]}function w(){b(g[0][0],g[0][1]),y.lineEnd();var t,e=y.clean(),n=v.buffer(),r=n.length;if(g.pop(),m.push(g),g=null,r)if(1&e){var i,o=-1;if((r=(t=n[0]).length-1)>0){for(_||(a.polygonStart(),_=!0),a.lineStart();++o<r;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),s.push(n.filter(nr))}return c}}function nr(t){return t.length>1}function rr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:R,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function ir(t,e){return((t=t.x)[0]<0?t[1]-Ct-zt:Ct-t[1])-((e=e.x)[0]<0?e[1]-Ct-zt:Ct-e[1])}var or=er(Gn,function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?St:-St,u=w(o-n);w(u-St)<zt?(t.point(n,r=(r+a)/2>0?Ct:-Ct),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&u>=St&&(w(n-i)<zt&&(n-=i*zt),w(o-s)<zt&&(o-=s*zt),r=function(t,e,n,r){var i,o,a=Math.sin(t-n);return w(a)>zt?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=a),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*Ct,r.point(-St,i),r.point(0,i),r.point(St,i),r.point(St,0),r.point(St,-i),r.point(0,-i),r.point(-St,-i),r.point(-St,0),r.point(-St,i);else if(w(t[0]-e[0])>zt){var o=t[0]<e[0]?St:-St;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-St,-St/2]);function ar(t,e,n,r){return function(i){var o,a=i.a,s=i.b,u=a.x,l=a.y,c=0,f=1,h=s.x-u,p=s.y-l;if(o=t-u,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=n-u,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>c&&(c=o)}if(o=r-l,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<f&&(f=o)}return c>0&&(i.a={x:u+c*h,y:l+c*p}),f<1&&(i.b={x:u+f*h,y:l+f*p}),i}}}}}}var sr=1e9;function ur(t,e,n,r){return function(u){var l,c,f,h,p,d,m,g,v,y,_,b=u,x=rr(),w=ar(t,e,n,r),j={point:k,lineStart:function(){j.point=z,c&&c.push(f=[]);y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(z(h,p),d&&v&&x.rejoin(),l.push(x.buffer()));j.point=k,v&&u.lineEnd()},polygonStart:function(){u=x,l=[],c=[],_=!0},polygonEnd:function(){u=b,l=o.merge(l);var e=function(t){for(var e=0,n=c.length,r=t[1],i=0;i<n;++i)for(var o,a=1,s=c[i],u=s.length,l=s[0];a<u;++a)o=s[a],l[1]<=r?o[1]>r&&Bt(l,o,t)>0&&++e:o[1]<=r&&Bt(l,o,t)<0&&--e,l=o;return 0!==e}([t,r]),n=_&&e,i=l.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),M(null,null,1,u),u.lineEnd()),i&&Kn(l,a,e,M,u),u.polygonEnd()),l=c=f=null}};function M(o,a,u,l){var c=0,f=0;if(null==o||(c=i(o,u))!==(f=i(a,u))||s(o,a)<0^u>0)do{l.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+u+4)%4)!==f);else l.point(a[0],a[1])}function A(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function k(t,e){A(t,e)&&u.point(t,e)}function z(t,e){var n=A(t=Math.max(-sr,Math.min(sr,t)),e=Math.max(-sr,Math.min(sr,e)));if(c&&f.push([t,e]),y)h=t,p=e,d=n,y=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&v)u.point(t,e);else{var r={a:{x:m,y:g},b:{x:t,y:e}};w(r)?(v||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),_=!1):n&&(u.lineStart(),u.point(t,e),_=!1)}m=t,g=e,v=n}return j};function i(r,i){return w(r[0]-t)<zt?i>0?0:3:w(r[0]-n)<zt?i>0?2:1:w(r[1]-e)<zt?i>0?1:0:i>0?3:2}function a(t,e){return s(t.x,e.x)}function s(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}}function lr(t){var e=0,n=St/3,r=Tr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*St/180,n=t[1]*St/180):[e/St*180,n/St*180]},i}function cr(t,e){var n=Math.sin(t),r=(n+Math.sin(e))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function a(t,e){var n=Math.sqrt(i-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),o-n*Math.cos(t)]}return a.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/r,Ft((i-(t*t+n*n)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),(i=o(t)).valid=!0,i},extent:function(s){return arguments.length?(o=ur(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return lr(cr)}).raw=cr,o.geo.albers=function(){return o.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},o.geo.albersUsa=function(){var t,e,n,r,i=o.geo.albers(),a=o.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=o.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(e,n){t=[e,n]}};function l(i){var o=i[0],a=i[1];return t=null,e(o,a),t||(n(o,a),t)||r(o,a),t}return l.invert=function(t){var e=i.scale(),n=i.translate(),r=(t[0]-n[0])/e,o=(t[1]-n[1])/e;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(t)},l.stream=function(t){var e=i.stream(t),n=a.stream(t),r=s.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},l.precision=function(t){return arguments.length?(i.precision(t),a.precision(t),s.precision(t),l):i.precision()},l.scale=function(t){return arguments.length?(i.scale(t),a.scale(.35*t),s.scale(t),l.translate(i.translate())):i.scale()},l.translate=function(t){if(!arguments.length)return i.translate();var o=i.scale(),c=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[c-.455*o,f-.238*o],[c+.455*o,f+.238*o]]).stream(u).point,n=a.translate([c-.307*o,f+.201*o]).clipExtent([[c-.425*o+zt,f+.12*o+zt],[c-.214*o-zt,f+.234*o-zt]]).stream(u).point,r=s.translate([c-.205*o,f+.212*o]).clipExtent([[c-.214*o+zt,f+.166*o+zt],[c-.115*o-zt,f+.234*o-zt]]).stream(u).point,l},l.scale(1070)};var fr,hr,pr,dr,mr,gr,vr={point:R,lineStart:R,lineEnd:R,polygonStart:function(){hr=0,vr.lineStart=yr},polygonEnd:function(){vr.lineStart=vr.lineEnd=vr.point=R,fr+=w(hr/2)}};function yr(){var t,e,n,r;function i(t,e){hr+=r*t-n*e,n=t,r=e}vr.point=function(o,a){vr.point=i,t=n=o,e=r=a},vr.lineEnd=function(){i(t,e)}}var _r={point:function(t,e){t<pr&&(pr=t);t>mr&&(mr=t);e<dr&&(dr=e);e>gr&&(gr=e)},lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R};function br(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var xr,wr={point:jr,lineStart:Mr,lineEnd:Ar,polygonStart:function(){wr.lineStart=kr},polygonEnd:function(){wr.point=jr,wr.lineStart=Mr,wr.lineEnd=Ar}};function jr(t,e){Mn+=t,An+=e,++kn}function Mr(){var t,e;function n(n,r){var i=n-t,o=r-e,a=Math.sqrt(i*i+o*o);zn+=a*(t+n)/2,En+=a*(e+r)/2,Sn+=a,jr(t=n,e=r)}wr.point=function(r,i){wr.point=n,jr(t=r,e=i)}}function Ar(){wr.point=jr}function kr(){var t,e,n,r;function i(t,e){var i=t-n,o=e-r,a=Math.sqrt(i*i+o*o);zn+=a*(n+t)/2,En+=a*(r+e)/2,Sn+=a,Nn+=(a=r*t-n*e)*(n+t),Tn+=a*(r+e),Cn+=3*a,jr(n=t,r=e)}wr.point=function(o,a){wr.point=i,jr(t=n=o,e=r=a)},wr.lineEnd=function(){i(t,e)}}function zr(t){var e=.5,n=Math.cos(30*Ot),r=16;function i(e){return(r?function(e){var n,i,a,s,u,l,c,f,h,p,d,m,g={point:v,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function v(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){f=NaN,g.point=_,e.lineStart()}function _(n,i){var a=Bn([n,i]),s=t(n,i);o(f,h,c,p,d,m,f=s[0],h=s[1],c=n,p=a[0],d=a[1],m=a[2],r,e),e.point(f,h)}function b(){g.point=v,e.lineEnd()}function x(){y(),g.point=w,g.lineEnd=j}function w(t,e){_(n=t,e),i=f,a=h,s=p,u=d,l=m,g.point=_}function j(){o(f,h,c,p,d,m,i,a,n,s,u,l,r,e),g.lineEnd=b,b()}return g}:function(e){return Sr(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})})(e)}function o(r,i,a,s,u,l,c,f,h,p,d,m,g,v){var y=c-r,_=f-i,b=y*y+_*_;if(b>4*e&&g--){var x=s+p,j=u+d,M=l+m,A=Math.sqrt(x*x+j*j+M*M),k=Math.asin(M/=A),z=w(w(M)-1)<zt||w(a-h)<zt?(a+h)/2:Math.atan2(j,x),E=t(z,k),S=E[0],N=E[1],T=S-r,C=N-i,O=_*T-y*C;(O*O/b>e||w((y*T+_*C)/b-.5)>.3||s*p+u*d+l*m<n)&&(o(r,i,a,s,u,l,S,N,z,x/=A,j/=A,M,g,v),v.point(S,N),o(S,N,z,x,j,M,c,f,h,p,d,m,g,v))}}return i.precision=function(t){return arguments.length?(r=(e=t*t)>0&&16,i):Math.sqrt(e)},i}function Er(t){this.stream=t}function Sr(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Nr(t){return Tr(function(){return t})()}function Tr(t){var e,n,r,i,a,s,u=zr(function(t,n){return[(t=e(t,n))[0]*l+i,a-t[1]*l]}),l=150,c=480,f=250,h=0,p=0,d=0,m=0,g=0,v=or,y=I,_=null,b=null;function x(t){return[(t=r(t[0]*Ot,t[1]*Ot))[0]*l+i,a-t[1]*l]}function j(t){return(t=r.invert((t[0]-i)/l,(a-t[1])/l))&&[t[0]*Pt,t[1]*Pt]}function M(){r=$n(n=Ir(d,m,g),e);var t=e(h,p);return i=c-t[0]*l,a=f+t[1]*l,A()}function A(){return s&&(s.valid=!1,s=null),x}return x.stream=function(t){return s&&(s.valid=!1),(s=Cr(v(n,u(y(t))))).valid=!0,s},x.clipAngle=function(t){return arguments.length?(v=null==t?(_=t,or):function(t){var e=Math.cos(t),n=e>0,r=w(e)>zt;return er(i,function(t){var e,s,u,l,c;return{lineStart:function(){l=u=!1,c=1},point:function(f,h){var p,d=[f,h],m=i(f,h),g=n?m?0:a(f,h):m?a(f+(f<0?St:-St),h):0;if(!e&&(l=u=m)&&t.lineStart(),m!==u&&(p=o(e,d),(Hn(e,p)||Hn(d,p))&&(d[0]+=zt,d[1]+=zt,m=i(d[0],d[1]))),m!==u)c=0,m?(t.lineStart(),p=o(d,e),t.point(p[0],p[1])):(p=o(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(r&&e&&n^m){var v;g&s||!(v=o(d,e,!0))||(c=0,n?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!m||e&&Hn(e,d)||t.point(d[0],d[1]),e=d,u=m,s=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return c|(l&&u)<<1}}},Rr(t,6*Ot),n?[0,-t]:[-St,t-St]);function i(t,n){return Math.cos(t)*Math.cos(n)>e}function o(t,n,r){var i=[1,0,0],o=Fn(Bn(t),Bn(n)),a=Dn(o,o),s=o[0],u=a-s*s;if(!u)return!r&&t;var l=e*a/u,c=-e*s/u,f=Fn(i,o),h=Ln(i,l);Rn(h,Ln(o,c));var p=f,d=Dn(h,p),m=Dn(p,p),g=d*d-m*(Dn(h,h)-1);if(!(g<0)){var v=Math.sqrt(g),y=Ln(p,(-d-v)/m);if(Rn(y,h),y=Un(y),!r)return y;var _,b=t[0],x=n[0],j=t[1],M=n[1];x<b&&(_=b,b=x,x=_);var A=x-b,k=w(A-St)<zt;if(!k&&M<j&&(_=j,j=M,M=_),k||A<zt?k?j+M>0^y[1]<(w(y[0]-b)<zt?j:M):j<=y[1]&&y[1]<=M:A>St^(b<=y[0]&&y[0]<=x)){var z=Ln(p,(-d+v)/m);return Rn(z,h),[y,Un(z)]}}}function a(e,r){var i=n?t:St-t,o=0;return e<-i?o|=1:e>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}((_=+t)*Ot),A()):_},x.clipExtent=function(t){return arguments.length?(b=t,y=t?ur(t[0][0],t[0][1],t[1][0],t[1][1]):I,A()):b},x.scale=function(t){return arguments.length?(l=+t,M()):l},x.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],M()):[c,f]},x.center=function(t){return arguments.length?(h=t[0]%360*Ot,p=t[1]%360*Ot,M()):[h*Pt,p*Pt]},x.rotate=function(t){return arguments.length?(d=t[0]%360*Ot,m=t[1]%360*Ot,g=t.length>2?t[2]%360*Ot:0,M()):[d*Pt,m*Pt,g*Pt]},o.rebind(x,u,"precision"),function(){return e=t.apply(this,arguments),x.invert=e.invert&&j,M()}}function Cr(t){return Sr(t,function(e,n){t.point(e*Ot,n*Ot)})}function Or(t,e){return[t,e]}function Pr(t,e){return[t>St?t-Nt:t<-St?t+Nt:t,e]}function Ir(t,e,n){return t?e||n?$n(Dr(t),Fr(e,n)):Dr(t):e||n?Fr(e,n):Pr}function Br(t){return function(e,n){return[(e+=t)>St?e-Nt:e<-St?e+Nt:e,n]}}function Dr(t){var e=Br(t);return e.invert=Br(-t),e}function Fr(t,e){var n=Math.cos(t),r=Math.sin(t),i=Math.cos(e),o=Math.sin(e);function a(t,e){var a=Math.cos(e),s=Math.cos(t)*a,u=Math.sin(t)*a,l=Math.sin(e),c=l*n+s*r;return[Math.atan2(u*i-c*o,s*n-l*r),Ft(c*i+u*o)]}return a.invert=function(t,e){var a=Math.cos(e),s=Math.cos(t)*a,u=Math.sin(t)*a,l=Math.sin(e),c=l*i-u*o;return[Math.atan2(u*i+l*o,s*n+c*r),Ft(c*n-s*r)]},a}function Rr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,s){var u=a*e;null!=i?(i=Lr(n,i),o=Lr(n,o),(a>0?i<o:i>o)&&(i+=a*Nt)):(i=t+a*Nt,o=t-.5*u);for(var l,c=i;a>0?c>o:c<o;c-=u)s.point((l=Un([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function Lr(t,e){var n=Bn(e);n[0]-=t,qn(n);var r=Dt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-zt)%(2*Math.PI)}function qr(t,e,n){var r=o.range(t,e-zt,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function Ur(t,e,n){var r=o.range(t,e-zt,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function Hr(t){return t.source}function Yr(t){return t.target}o.geo.path=function(){var t,e,n,r,i,a=4.5;function s(t){return t&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(t,i)),r.result()}function u(){return i=null,s}return s.area=function(t){return fr=0,o.geo.stream(t,n(vr)),fr},s.centroid=function(t){return Mn=An=kn=zn=En=Sn=Nn=Tn=Cn=0,o.geo.stream(t,n(wr)),Cn?[Nn/Cn,Tn/Cn]:Sn?[zn/Sn,En/Sn]:kn?[Mn/kn,An/kn]:[NaN,NaN]},s.bounds=function(t){return mr=gr=-(pr=dr=1/0),o.geo.stream(t,n(_r)),[[pr,dr],[mr,gr]]},s.projection=function(e){return arguments.length?(n=(t=e)?e.stream||function(t){var e=zr(function(e,n){return t([e*Pt,n*Pt])});return function(t){return Cr(e(t))}}(e):I,u()):t},s.context=function(t){return arguments.length?(r=null==(e=t)?new function(){var t=br(4.5),e=[],n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(e){return t=br(e),n},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function r(n,r){e.push("M",n,",",r,t)}function i(t,r){e.push("M",t,",",r),n.point=o}function o(t,n){e.push("L",t,",",n)}function a(){n.point=r}function s(){e.push("Z")}return n}:new function(t){var e=4.5,n={point:r,lineStart:function(){n.point=i},lineEnd:a,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=a,n.point=r},pointRadius:function(t){return e=t,n},result:R};function r(n,r){t.moveTo(n+e,r),t.arc(n,r,e,0,Nt)}function i(e,r){t.moveTo(e,r),n.point=o}function o(e,n){t.lineTo(e,n)}function a(){n.point=r}function s(){t.closePath()}return n}(t),"function"!=typeof a&&r.pointRadius(a),u()):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(r.pointRadius(+t),+t),s):a},s.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(t){return{stream:function(e){var n=new Er(e);for(var r in t)n[r]=t[r];return n}}},Er.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},o.geo.projection=Nr,o.geo.projectionMutator=Tr,(o.geo.equirectangular=function(){return Nr(Or)}).raw=Or.invert=Or,o.geo.rotation=function(t){function e(e){return(e=t(e[0]*Ot,e[1]*Ot))[0]*=Pt,e[1]*=Pt,e}return t=Ir(t[0]%360*Ot,t[1]*Ot,t.length>2?t[2]*Ot:0),e.invert=function(e){return(e=t.invert(e[0]*Ot,e[1]*Ot))[0]*=Pt,e[1]*=Pt,e},e},Pr.invert=Or,o.geo.circle=function(){var t,e,n=[0,0],r=6;function i(){var t="function"==typeof n?n.apply(this,arguments):n,r=Ir(-t[0]*Ot,-t[1]*Ot,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=r(t,e)),t[0]*=Pt,t[1]*=Pt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(n=t,i):n},i.angle=function(n){return arguments.length?(e=Rr((t=+n)*Ot,r*Ot),i):t},i.precision=function(n){return arguments.length?(e=Rr(t*Ot,(r=+n)*Ot),i):r},i.angle(90)},o.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Ot,i=t[1]*Ot,o=e[1]*Ot,a=Math.sin(r),s=Math.cos(r),u=Math.sin(i),l=Math.cos(i),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=l*c-u*f*s)*n),u*c+l*f*s)},o.geo.graticule=function(){var t,e,n,r,i,a,s,u,l,c,f,h,p=10,d=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:_()}}function _(){return o.range(Math.ceil(r/m)*m,n,m).map(f).concat(o.range(Math.ceil(u/g)*g,s,g).map(h)).concat(o.range(Math.ceil(e/p)*p,t,p).filter(function(t){return w(t%m)>zt}).map(l)).concat(o.range(Math.ceil(a/d)*d,i,d).filter(function(t){return w(t%g)>zt}).map(c))}return y.lines=function(){return _().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(h(s).slice(1),f(n).reverse().slice(1),h(u).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.majorExtent(t).minorExtent(t):y.minorExtent()},y.majorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],s=+t[1][1],r>n&&(t=r,r=n,n=t),u>s&&(t=u,u=s,s=t),y.precision(v)):[[r,u],[n,s]]},y.minorExtent=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(v)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.majorStep(t).minorStep(t):y.minorStep()},y.majorStep=function(t){return arguments.length?(m=+t[0],g=+t[1],y):[m,g]},y.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],y):[p,d]},y.precision=function(o){return arguments.length?(v=+o,l=qr(a,i,90),c=Ur(e,t,v),f=qr(u,s,90),h=Ur(r,n,v),y):v},y.majorExtent([[-180,-90+zt],[180,90-zt]]).minorExtent([[-180,-80-zt],[180,80+zt]])},o.geo.greatArc=function(){var t,e,n=Hr,r=Yr;function i(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),e||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(t||n.apply(this,arguments),e||r.apply(this,arguments))},i.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,i):n},i.target=function(t){return arguments.length?(r=t,e="function"==typeof t?null:t,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(t,e){return function(t,e,n,r){var i=Math.cos(e),o=Math.sin(e),a=Math.cos(r),s=Math.sin(r),u=i*Math.cos(t),l=i*Math.sin(t),c=a*Math.cos(n),f=a*Math.sin(n),h=2*Math.asin(Math.sqrt(Lt(r-e)+i*a*Lt(n-t))),p=1/Math.sin(h),d=h?function(t){var e=Math.sin(t*=h)*p,n=Math.sin(h-t)*p,r=n*u+e*c,i=n*l+e*f,a=n*o+e*s;return[Math.atan2(i,r)*Pt,Math.atan2(a,Math.sqrt(r*r+i*i))*Pt]}:function(){return[t*Pt,e*Pt]};return d.distance=h,d}(t[0]*Ot,t[1]*Ot,e[0]*Ot,e[1]*Ot)},o.geo.length=function(t){return xr=0,o.geo.stream(t,Vr),xr};var Vr={sphere:R,point:R,lineStart:function(){var t,e,n;function r(r,i){var o=Math.sin(i*=Ot),a=Math.cos(i),s=w((r*=Ot)-t),u=Math.cos(s);xr+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*o-e*a*u)*s),e*o+n*a*u),t=r,e=o,n=a}Vr.point=function(i,o){t=i*Ot,e=Math.sin(o*=Ot),n=Math.cos(o),Vr.point=r},Vr.lineEnd=function(){Vr.point=Vr.lineEnd=R}},lineEnd:R,polygonStart:R,polygonEnd:R};function Zr(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}var Wr=Zr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(o.geo.azimuthalEqualArea=function(){return Nr(Wr)}).raw=Wr;var Xr=Zr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},I);function Qr(t,e){var n=Math.cos(t),r=function(t){return Math.tan(St/4+t/2)},i=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(r(e)/r(t)),o=n*Math.pow(r(t),i)/i;if(!i)return Kr;function a(t,e){o>0?e<-Ct+zt&&(e=-Ct+zt):e>Ct-zt&&(e=Ct-zt);var n=o/Math.pow(r(e),i);return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}return a.invert=function(t,e){var n=o-e,r=It(i)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/i,2*Math.atan(Math.pow(o/r,1/i))-Ct]},a}function $r(t,e){var n=Math.cos(t),r=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),i=n/r+t;if(w(r)<zt)return Or;function o(t,e){var n=i-e;return[n*Math.sin(r*t),i-n*Math.cos(r*t)]}return o.invert=function(t,e){var n=i-e;return[Math.atan2(t,n)/r,i-It(r)*Math.sqrt(t*t+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return Nr(Xr)}).raw=Xr,(o.geo.conicConformal=function(){return lr(Qr)}).raw=Qr,(o.geo.conicEquidistant=function(){return lr($r)}).raw=$r;var Gr=Zr(function(t){return 1/t},Math.atan);function Kr(t,e){return[t,Math.log(Math.tan(St/4+e/2))]}function Jr(t){var e,n=Nr(t),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var s=St*r(),u=i();o([[u[0]-s,u[1]-s],[u[0]+s,u[1]+s]])}}else e&&(a=null);return a},n.clipExtent(null)}(o.geo.gnomonic=function(){return Nr(Gr)}).raw=Gr,Kr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ct]},(o.geo.mercator=function(){return Jr(Kr)}).raw=Kr;var ti=Zr(function(){return 1},Math.asin);(o.geo.orthographic=function(){return Nr(ti)}).raw=ti;var ei=Zr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});function ni(t,e){return[Math.log(Math.tan(St/4+e/2)),-t]}function ri(t){return t[0]}function ii(t){return t[1]}function oi(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;i++){for(;r>1&&Bt(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function ai(t,e){return t[0]-e[0]||t[1]-e[1]}(o.geo.stereographic=function(){return Nr(ei)}).raw=ei,ni.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ct]},(o.geo.transverseMercator=function(){var t=Jr(ni),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90])}).raw=ni,o.geom={},o.geom.hull=function(t){var e=ri,n=ii;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,i=be(e),o=be(n),a=t.length,s=[],u=[];for(r=0;r<a;r++)s.push([+i.call(this,t[r],r),+o.call(this,t[r],r),r]);for(s.sort(ai),r=0;r<a;r++)u.push([s[r][0],-s[r][1]]);var l=oi(s),c=oi(u),f=c[0]===l[0],h=c[c.length-1]===l[l.length-1],p=[];for(r=l.length-1;r>=0;--r)p.push(t[s[l[r]][2]]);for(r=+f;r<c.length-h;++r)p.push(t[s[c[r]][2]]);return p}return r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r},o.geom.polygon=function(t){return Z(t,si),t};var si=o.geom.polygon.prototype=[];function ui(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function li(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,s=r[0]-o,u=t[1],l=n[1],c=e[1]-u,f=r[1]-l,h=(s*(u-l)-f*(i-o))/(f*a-s*c);return[i+h*a,u+h*c]}function ci(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}si.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},si.centroid=function(t){var e,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=s,s=this[r],n=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*n,a+=(e[1]+s[1])*n;return[o*t,a*t]},si.clip=function(t){for(var e,n,r,i,o,a,s=ci(t),u=-1,l=this.length-ci(this),c=this[l-1];++u<l;){for(e=t.slice(),t.length=0,i=this[u],o=e[(r=e.length-s)-1],n=-1;++n<r;)ui(a=e[n],c,i)?(ui(o,c,i)||t.push(li(o,a,c,i)),t.push(a)):ui(o,c,i)&&t.push(li(o,a,c,i)),o=a;s&&t.push(t[0]),c=i}return t};var fi,hi,pi,di,mi,gi=[],vi=[];function yi(t){var e=gi.pop()||new function(){Ii(this),this.edge=this.site=this.circle=null};return e.site=t,e}function _i(t){zi(t),pi.remove(t),gi.push(t),Ii(t)}function bi(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,s=[t];_i(t);for(var u=o;u.circle&&w(n-u.circle.x)<zt&&w(r-u.circle.cy)<zt;)o=u.P,s.unshift(u),_i(u),u=o;s.unshift(u),zi(u);for(var l=a;l.circle&&w(n-l.circle.x)<zt&&w(r-l.circle.cy)<zt;)a=l.N,s.push(l),_i(l),l=a;s.push(l),zi(l);var c,f=s.length;for(c=1;c<f;++c)l=s[c],u=s[c-1],Ci(l.edge,u.site,l.site,i);u=s[0],(l=s[f-1]).edge=Ni(u.site,l.site,null,i),ki(u),ki(l)}function xi(t){for(var e,n,r,i,o=t.x,a=t.y,s=pi._;s;)if((r=wi(s,a)-o)>zt)s=s.L;else{if(!((i=o-ji(s,a))>zt)){r>-zt?(e=s.P,n=s):i>-zt?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}var u=yi(t);if(pi.insert(e,u),e||n){if(e===n)return zi(e),n=yi(e.site),pi.insert(u,n),u.edge=n.edge=Ni(e.site,u.site),ki(e),void ki(n);if(n){zi(e),zi(n);var l=e.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=n.site,m=d.x-c,g=d.y-f,v=2*(h*g-p*m),y=h*h+p*p,_=m*m+g*g,b={x:(g*y-p*_)/v+c,y:(h*_-m*y)/v+f};Ci(n.edge,l,d,b),u.edge=Ni(l,t,null,b),n.edge=Ni(t,d,null,b),ki(e),ki(n)}else u.edge=Ni(e.site,u.site)}}function wi(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var s=(n=a.site).x,u=n.y,l=u-e;if(!l)return s;var c=s-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-u+l/2+i-o/2)))/f+r:(r+s)/2}function ji(t,e){var n=t.N;if(n)return wi(n,e);var r=t.site;return r.y===e?r.x:1/0}function Mi(t){this.site=t,this.edges=[]}function Ai(t,e){return e.angle-t.angle}function ki(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,s=i.y,u=r.x-a,l=r.y-s,c=o.x-a,f=2*(u*(g=o.y-s)-l*c);if(!(f>=-Et)){var h=u*u+l*l,p=c*c+g*g,d=(g*h-l*p)/f,m=(u*p-c*h)/f,g=m+s,v=vi.pop()||new function(){Ii(this),this.x=this.y=this.arc=this.site=this.cy=null};v.arc=t,v.site=i,v.x=d+a,v.y=g+Math.sqrt(d*d+m*m),v.cy=g,t.circle=v;for(var y=null,_=mi._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){y=_.P;break}_=_.L}else{if(!_.R){y=_;break}_=_.R}mi.insert(y,v),y||(di=v)}}}}function zi(t){var e=t.circle;e&&(e.P||(di=e.N),mi.remove(e),vi.push(e),Ii(e),t.circle=null)}function Ei(t,e){var n=t.b;if(n)return!0;var r,i,o=t.a,a=e[0][0],s=e[1][0],u=e[0][1],l=e[1][1],c=t.l,f=t.r,h=c.x,p=c.y,d=f.x,m=f.y,g=(h+d)/2,v=(p+m)/2;if(m===p){if(g<a||g>=s)return;if(h>d){if(o){if(o.y>=l)return}else o={x:g,y:u};n={x:g,y:l}}else{if(o){if(o.y<u)return}else o={x:g,y:l};n={x:g,y:u}}}else if(i=v-(r=(h-d)/(m-p))*g,r<-1||r>1)if(h>d){if(o){if(o.y>=l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else{if(o){if(o.y<u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else if(p<m){if(o){if(o.x>=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.x<a)return}else o={x:s,y:r*s+i};n={x:a,y:r*a+i}}return t.a=o,t.b=n,!0}function Si(t,e){this.l=t,this.r=e,this.a=this.b=null}function Ni(t,e,n,r){var i=new Si(t,e);return fi.push(i),n&&Ci(i,t,e,n),r&&Ci(i,e,t,r),hi[t.i].edges.push(new Oi(i,t,e)),hi[e.i].edges.push(new Oi(i,e,t)),i}function Ti(t,e,n){var r=new Si(t,null);return r.a=e,r.b=n,fi.push(r),r}function Ci(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function Oi(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Pi(){this._=null}function Ii(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Bi(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Di(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Fi(t){for(;t.L;)t=t.L;return t}function Ri(t,e){var n,r,i,o=t.sort(Li).pop();for(fi=[],hi=new Array(t.length),pi=new Pi,mi=new Pi;;)if(i=di,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(hi[o.i]=new Mi(o),xi(o),n=o.x,r=o.y),o=t.pop();else{if(!i)break;bi(i.arc)}e&&(function(t){for(var e,n=fi,r=ar(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)(!Ei(e=n[i],t)||!r(e)||w(e.a.x-e.b.x)<zt&&w(e.a.y-e.b.y)<zt)&&(e.a=e.b=null,n.splice(i,1))}(e),function(t){for(var e,n,r,i,o,a,s,u,l,c,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],m=hi,g=m.length;g--;)if((o=m[g])&&o.prepare())for(u=(s=o.edges).length,a=0;a<u;)r=(c=s[a].end()).x,i=c.y,e=(l=s[++a%u].start()).x,n=l.y,(w(r-e)>zt||w(i-n)>zt)&&(s.splice(a,0,new Oi(Ti(o.site,c,w(r-f)<zt&&d-i>zt?{x:f,y:w(e-f)<zt?n:d}:w(i-d)<zt&&h-r>zt?{x:w(n-d)<zt?e:h,y:d}:w(r-h)<zt&&i-p>zt?{x:h,y:w(e-h)<zt?n:p}:w(i-p)<zt&&r-f>zt?{x:w(n-p)<zt?e:f,y:p}:null),o.site,null)),++u)}(e));var a={cells:hi,edges:fi};return pi=mi=fi=hi=null,a}function Li(t,e){return e.y-t.y||e.x-t.x}Mi.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(Ai),e.length},Oi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},Pi.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Fi(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Bi(this,n),n=(t=n).U),n.C=!1,r.C=!0,Di(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Di(this,n),n=(t=n).U),n.C=!1,r.C=!0,Bi(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Fi(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Bi(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Di(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Bi(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Di(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Bi(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Di(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},o.geom.voronoi=function(t){var e=ri,n=ii,r=e,i=n,o=qi;if(t)return a(t);function a(t){var e=new Array(t.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return Ri(s(t),o).cells.forEach(function(o,s){var u=o.edges,l=o.site;(e[s]=u.length?u.map(function(t){var e=t.start();return[e.x,e.y]}):l.x>=n&&l.x<=i&&l.y>=r&&l.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=t[s]}),e}function s(t){return t.map(function(t,e){return{x:Math.round(r(t,e)/zt)*zt,y:Math.round(i(t,e)/zt)*zt,i:e}})}return a.links=function(t){return Ri(s(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},a.triangles=function(t){var e=[];return Ri(s(t)).cells.forEach(function(n,r){for(var i,o=n.site,a=n.edges.sort(Ai),s=-1,u=a.length,l=a[u-1].edge,c=l.l===o?l.r:l.l;++s<u;)l,i=c,c=(l=a[s].edge).l===o?l.r:l.l,r<i.i&&r<c.i&&Ui(o,i,c)<0&&e.push([t[r],t[i.i],t[c.i]])}),e},a.x=function(t){return arguments.length?(r=be(e=t),a):e},a.y=function(t){return arguments.length?(i=be(n=t),a):n},a.clipExtent=function(t){return arguments.length?(o=null==t?qi:t,a):o===qi?null:o},a.size=function(t){return arguments.length?a.clipExtent(t&&[[0,0],t]):o===qi?null:o&&o[1]},a};var qi=[[-1e6,-1e6],[1e6,1e6]];function Ui(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function Hi(t){return t.x}function Yi(t){return t.y}function Vi(t,e){t=o.rgb(t),e=o.rgb(e);var n=t.r,r=t.g,i=t.b,a=e.r-n,s=e.g-r,u=e.b-i;return function(t){return"#"+pe(Math.round(n+a*t))+pe(Math.round(r+s*t))+pe(Math.round(i+u*t))}}function Zi(t,e){var n,r={},i={};for(n in t)n in e?r[n]=Gi(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function Wi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Xi(t,e){var n,r,i,o=Qi.lastIndex=$i.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Qi.exec(t))&&(r=$i.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:Wi(n,r)})),o=$i.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?(e=u[0].x,function(t){return e(t)+""}):function(){return e}:(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}o.geom.delaunay=function(t){return o.geom.voronoi().triangles(t)},o.geom.quadtree=function(t,e,n,r,i){var o,a=ri,s=ii;if(o=arguments.length)return a=Hi,s=Yi,3===o&&(i=n,r=e,n=e=0),u(t);function u(t){var u,l,c,f,h,p,d,m,g,v=be(a),y=be(s);if(null!=e)p=e,d=n,m=r,g=i;else if(m=g=-(p=d=1/0),l=[],c=[],h=t.length,o)for(f=0;f<h;++f)(u=t[f]).x<p&&(p=u.x),u.y<d&&(d=u.y),u.x>m&&(m=u.x),u.y>g&&(g=u.y),l.push(u.x),c.push(u.y);else for(f=0;f<h;++f){var _=+v(u=t[f],f),b=+y(u,f);_<p&&(p=_),b<d&&(d=b),_>m&&(m=_),b>g&&(g=b),l.push(_),c.push(b)}var x=m-p,j=g-d;function M(t,e,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var u=t.x,l=t.y;if(null!=u)if(w(u-n)+w(l-r)<.01)A(t,e,n,r,i,o,a,s);else{var c=t.point;t.x=t.y=t.point=null,A(t,c,u,l,i,o,a,s),A(t,e,n,r,i,o,a,s)}else t.x=n,t.y=r,t.point=e}else A(t,e,n,r,i,o,a,s)}function A(t,e,n,r,i,o,a,s){var u=.5*(i+a),l=.5*(o+s),c=n>=u,f=r>=l,h=f<<1|c;t.leaf=!1,t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(k,t,+v(t,++f),+y(t,f),p,d,m,g)}}),c?i=u:a=u,f?o=l:s=l,M(t,e,n,r,i,o,a,s)}x>j?g=d+x:m=p+j;var k={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){M(k,t,+v(t,++f),+y(t,f),p,d,m,g)}};if(k.visit=function(t){!function t(e,n,r,i,o,a){if(!e(n,r,i,o,a)){var s=.5*(r+o),u=.5*(i+a),l=n.nodes;l[0]&&t(e,l[0],r,i,s,u),l[1]&&t(e,l[1],s,i,o,u),l[2]&&t(e,l[2],r,u,s,a),l[3]&&t(e,l[3],s,u,o,a)}}(t,k,p,d,m,g)},k.find=function(t){return function(t,e,n,r,i,o,a){var s,u=1/0;return function t(l,c,f,h,p){if(!(c>o||f>a||h<r||p<i)){if(d=l.point){var d,m=e-l.x,g=n-l.y,v=m*m+g*g;if(v<u){var y=Math.sqrt(u=v);r=e-y,i=n-y,o=e+y,a=n+y,s=d}}for(var _=l.nodes,b=.5*(c+h),x=.5*(f+p),w=(n>=x)<<1|e>=b,j=w+4;w<j;++w)if(l=_[3&w])switch(3&w){case 0:t(l,c,f,b,x);break;case 1:t(l,b,f,h,x);break;case 2:t(l,c,x,b,p);break;case 3:t(l,b,x,h,p)}}}(t,r,i,o,a),s}(k,t[0],t[1],p,d,m,g)},f=-1,null==e){for(;++f<h;)M(k,t[f],l[f],c[f],p,d,m,g);--f}else t.forEach(k.add);return l=c=t=u=null,k}return u.x=function(t){return arguments.length?(a=t,u):a},u.y=function(t){return arguments.length?(s=t,u):s},u.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),u):null==e?null:[[e,n],[r,i]]},u.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),u):null==e?null:[r-e,i-n]},u},o.interpolateRgb=Vi,o.interpolateObject=Zi,o.interpolateNumber=Wi,o.interpolateString=Xi;var Qi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$i=new RegExp(Qi.source,"g");function Gi(t,e){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](t,e)););return n}function Ki(t,e){var n,r=[],i=[],o=t.length,a=e.length,s=Math.min(t.length,e.length);for(n=0;n<s;++n)r.push(Gi(t[n],e[n]));for(;n<o;++n)i[n]=t[n];for(;n<a;++n)i[n]=e[n];return function(t){for(n=0;n<s;++n)i[n]=r[n](t);return i}}o.interpolate=Gi,o.interpolators=[function(t,e){var n=typeof e;return("string"===n?_e.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?Vi:Xi:e instanceof Vt?Vi:Array.isArray(e)?Ki:"object"===n&&isNaN(e)?Zi:Wi)(t,e)}],o.interpolateArray=Ki;var Ji=function(){return I},to=o.map({linear:Ji,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return io},cubic:function(){return oo},sin:function(){return so},exp:function(){return uo},circle:function(){return lo},elastic:function(t,e){var n;arguments.length<2&&(e=.45);arguments.length?n=e/Nt*Math.asin(1/t):(t=1,n=e/4);return function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Nt/e)}},back:function(t){t||(t=1.70158);return function(e){return e*e*((t+1)*e-t)}},bounce:function(){return co}}),eo=o.map({in:I,out:no,"in-out":ro,"out-in":function(t){return ro(no(t))}});function no(t){return function(e){return 1-t(1-e)}}function ro(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function io(t){return t*t}function oo(t){return t*t*t}function ao(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function so(t){return 1-Math.cos(t*Ct)}function uo(t){return Math.pow(2,10*(t-1))}function lo(t){return 1-Math.sqrt(1-t*t)}function co(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function fo(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function ho(t){var e=[t.a,t.b],n=[t.c,t.d],r=mo(e),i=po(e,n),o=mo(function(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}(n,e,-i))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Pt,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Pt:0}function po(t,e){return t[0]*e[0]+t[1]*e[1]}function mo(t){var e=Math.sqrt(po(t,t));return e&&(t[0]/=e,t[1]/=e),e}o.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=to.get(n)||Ji,function(t){return function(e){return e<=0?0:e>=1?1:t(e)}}((r=eo.get(r)||I)(n.apply(null,a.call(arguments,1))))},o.interpolateHcl=function(t,e){t=o.hcl(t),e=o.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,s=e.c-r,u=e.l-i;isNaN(s)&&(s=0,r=isNaN(r)?e.c:r);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Gt(n+a*t,r+s*t,i+u*t)+""}},o.interpolateHsl=function(t,e){t=o.hsl(t),e=o.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,s=e.s-r,u=e.l-i;isNaN(s)&&(s=0,r=isNaN(r)?e.s:r);isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:a<-180&&(a+=360);return function(t){return Xt(n+a*t,r+s*t,i+u*t)+""}},o.interpolateLab=function(t,e){t=o.lab(t),e=o.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,s=e.a-r,u=e.b-i;return function(t){return ie(n+a*t,r+s*t,i+u*t)+""}},o.interpolateRound=fo,o.transform=function(t){var e=u.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new ho(n?n.matrix:go)})(t)},ho.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var go={a:1,b:0,c:0,d:1,e:0,f:0};function vo(t){return t.length?t.pop()+",":""}function yo(t,e){var n=[],r=[];return t=o.transform(t),e=o.transform(e),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:Wi(t[0],e[0])},{i:i-2,x:Wi(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,r),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(vo(n)+"rotate(",null,")")-2,x:Wi(t,e)})):e&&n.push(vo(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,r),function(t,e,n,r){t!==e?r.push({i:n.push(vo(n)+"skewX(",null,")")-2,x:Wi(t,e)}):e&&n.push(vo(n)+"skewX("+e+")")}(t.skew,e.skew,n,r),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(vo(n)+"scale(",null,",",null,")");r.push({i:i-4,x:Wi(t[0],e[0])},{i:i-2,x:Wi(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(vo(n)+"scale("+e+")")}(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i<o;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function _o(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function bo(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function xo(t){for(var e=t.source,n=t.target,r=function(t,e){if(t===e)return t;var n=wo(t),r=wo(e),i=n.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=n.pop(),o=r.pop();return a}(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function wo(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function jo(t){t.fixed|=2}function Mo(t){t.fixed&=-7}function Ao(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ko(t){t.fixed&=-5}o.interpolateTransform=yo,o.layout={},o.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(xo(t[n]));return e}},o.layout.chord=function(){var t,e,n,r,i,a,s,u={},l=0;function c(){var u,c,h,p,d,m={},g=[],v=o.range(r),y=[];for(t=[],e=[],u=0,p=-1;++p<r;){for(c=0,d=-1;++d<r;)c+=n[p][d];g.push(c),y.push(o.range(r)),u+=c}for(i&&v.sort(function(t,e){return i(g[t],g[e])}),a&&y.forEach(function(t,e){t.sort(function(t,r){return a(n[e][t],n[e][r])})}),u=(Nt-l*r)/u,c=0,p=-1;++p<r;){for(h=c,d=-1;++d<r;){var _=v[p],b=y[_][d],x=n[_][b],w=c,j=c+=x*u;m[_+"-"+b]={index:_,subindex:b,startAngle:w,endAngle:j,value:x}}e[_]={index:_,startAngle:h,endAngle:c,value:g[_]},c+=l}for(p=-1;++p<r;)for(d=p-1;++d<r;){var M=m[p+"-"+d],A=m[d+"-"+p];(M.value||A.value)&&t.push(M.value<A.value?{source:A,target:M}:{source:M,target:A})}s&&f()}function f(){t.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}return u.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,t=e=null,u):n},u.padding=function(n){return arguments.length?(l=n,t=e=null,u):l},u.sortGroups=function(n){return arguments.length?(i=n,t=e=null,u):i},u.sortSubgroups=function(e){return arguments.length?(a=e,t=null,u):a},u.sortChords=function(e){return arguments.length?(s=e,t&&f(),u):s},u.chords=function(){return t||c(),t},u.groups=function(){return e||c(),e},u},o.layout.force=function(){var t,e,n,r,i,a,s={},u=o.dispatch("start","tick","end"),l=[1,1],c=.9,f=zo,h=Eo,p=-30,d=So,m=.1,g=.64,v=[],y=[];function _(t){return function(e,n,r,i){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,s=i-n,u=o*o+a*a;if(s*s/g<u){if(u<d){var l=e.charge/u;t.px-=o*l,t.py-=a*l}return!0}if(e.point&&u&&u<d){l=e.pointCharge/u;t.px-=o*l,t.py-=a*l}}return!e.charge}}function b(t){t.px=o.event.x,t.py=o.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return t=null,u.end({type:"end",alpha:n=0}),!0;var e,s,f,h,d,g,b,x,w,j=v.length,M=y.length;for(s=0;s<M;++s)h=(f=y[s]).source,(g=(x=(d=f.target).x-h.x)*x+(w=d.y-h.y)*w)&&(x*=g=n*i[s]*((g=Math.sqrt(g))-r[s])/g,w*=g,d.x-=x*(b=h.weight+d.weight?h.weight/(h.weight+d.weight):.5),d.y-=w*b,h.x+=x*(b=1-b),h.y+=w*b);if((b=n*m)&&(x=l[0]/2,w=l[1]/2,s=-1,b))for(;++s<j;)(f=v[s]).x+=(x-f.x)*b,f.y+=(w-f.y)*b;if(p)for(!function t(e,n,r){var i=0,o=0;e.charge=0;if(!e.leaf)for(var a,s=e.nodes,u=s.length,l=-1;++l<u;)null!=(a=s[l])&&(t(a,n,r),e.charge+=a.charge,i+=a.charge*a.cx,o+=a.charge*a.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var c=n*r[e.point.index];e.charge+=e.pointCharge=c,i+=c*e.point.x,o+=c*e.point.y}e.cx=i/e.charge;e.cy=o/e.charge}(e=o.geom.quadtree(v),n,a),s=-1;++s<j;)(f=v[s]).fixed||e.visit(_(f));for(s=-1;++s<j;)(f=v[s]).fixed?(f.x=f.px,f.y=f.py):(f.x-=(f.px-(f.px=f.x))*c,f.y-=(f.py-(f.py=f.y))*c);u.tick({type:"tick",alpha:n})},s.nodes=function(t){return arguments.length?(v=t,s):v},s.links=function(t){return arguments.length?(y=t,s):y},s.size=function(t){return arguments.length?(l=t,s):l},s.linkDistance=function(t){return arguments.length?(f="function"==typeof t?t:+t,s):f},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.friction=function(t){return arguments.length?(c=+t,s):c},s.charge=function(t){return arguments.length?(p="function"==typeof t?t:+t,s):p},s.chargeDistance=function(t){return arguments.length?(d=t*t,s):Math.sqrt(d)},s.gravity=function(t){return arguments.length?(m=+t,s):m},s.theta=function(t){return arguments.length?(g=t*t,s):Math.sqrt(g)},s.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,u.end({type:"end",alpha:n=0})):e>0&&(u.start({type:"start",alpha:n=e}),t=Ee(s.tick)),s):n},s.start=function(){var t,e,n,o=v.length,u=y.length,c=l[0],d=l[1];for(t=0;t<o;++t)(n=v[t]).index=t,n.weight=0;for(t=0;t<u;++t)"number"==typeof(n=y[t]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(t=0;t<o;++t)n=v[t],isNaN(n.x)&&(n.x=m("x",c)),isNaN(n.y)&&(n.y=m("y",d)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof f)for(t=0;t<u;++t)r[t]=+f.call(this,y[t],t);else for(t=0;t<u;++t)r[t]=f;if(i=[],"function"==typeof h)for(t=0;t<u;++t)i[t]=+h.call(this,y[t],t);else for(t=0;t<u;++t)i[t]=h;if(a=[],"function"==typeof p)for(t=0;t<o;++t)a[t]=+p.call(this,v[t],t);else for(t=0;t<o;++t)a[t]=p;function m(n,r){if(!e){for(e=new Array(o),l=0;l<o;++l)e[l]=[];for(l=0;l<u;++l){var i=y[l];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,s=e[t],l=-1,c=s.length;++l<c;)if(!isNaN(a=s[l][n]))return a;return Math.random()*r}return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){if(e||(e=o.behavior.drag().origin(I).on("dragstart.force",jo).on("drag.force",b).on("dragend.force",Mo)),!arguments.length)return e;this.on("mouseover.force",Ao).on("mouseout.force",ko).call(e)},o.rebind(s,u,"on")};var zo=20,Eo=1,So=1/0;function No(t,e){return o.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Bo,t}function To(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Co(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(t=r.pop());)e(t)}function Oo(t){return t.children}function Po(t){return t.value}function Io(t,e){return e.value-t.value}function Bo(t){return o.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}o.layout.hierarchy=function(){var t=Io,e=Oo,n=Po;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(l=e.call(r,o,o.depth))&&(u=l.length)){for(var u,l,c;--u>=0;)a.push(c=l[u]),c.parent=o,c.depth=o.depth+1;n&&(o.value=0),o.children=l}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return Co(i,function(e){var r,i;t&&(r=e.children)&&r.sort(t),n&&(i=e.parent)&&(i.value+=e.value)}),s}return r.sort=function(e){return arguments.length?(t=e,r):t},r.children=function(t){return arguments.length?(e=t,r):e},r.value=function(t){return arguments.length?(n=t,r):n},r.revalue=function(t){return n&&(To(t,function(t){t.children&&(t.value=0)}),Co(t,function(t){var e;t.children||(t.value=+n.call(r,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},r},o.layout.partition=function(){var t=o.layout.hierarchy(),e=[1,1];function n(n,r){var i=t.call(this,n,r);return function t(e,n,r,i){var o=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,s,u,l=-1;for(r=e.value?r/e.value:0;++l<a;)t(s=o[l],n,u=s.value*r,i),n+=u}}(i[0],0,e[0],e[1]/function t(e){var n=e.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,t(n[o]));return 1+r}(i[0])),i}return n.size=function(t){return arguments.length?(e=t,n):e},No(n,t)},o.layout.pie=function(){var t=Number,e=Do,n=0,r=Nt,i=0;function a(s){var u,l=s.length,c=s.map(function(e,n){return+t.call(a,e,n)}),f=+("function"==typeof n?n.apply(this,arguments):n),h=("function"==typeof r?r.apply(this,arguments):r)-f,p=Math.min(Math.abs(h)/l,+("function"==typeof i?i.apply(this,arguments):i)),d=p*(h<0?-1:1),m=o.sum(c),g=m?(h-l*d)/m:0,v=o.range(l),y=[];return null!=e&&v.sort(e===Do?function(t,e){return c[e]-c[t]}:function(t,n){return e(s[t],s[n])}),v.forEach(function(t){y[t]={data:s[t],value:u=c[t],startAngle:f,endAngle:f+=u*g+d,padAngle:p}}),y}return a.value=function(e){return arguments.length?(t=e,a):t},a.sort=function(t){return arguments.length?(e=t,a):e},a.startAngle=function(t){return arguments.length?(n=t,a):n},a.endAngle=function(t){return arguments.length?(r=t,a):r},a.padAngle=function(t){return arguments.length?(i=t,a):i},a};var Do={};function Fo(t){return t.x}function Ro(t){return t.y}function Lo(t,e,n){t.y0=e,t.y=n}o.layout.stack=function(){var t=I,e=Ho,n=Yo,r=Lo,i=Fo,a=Ro;function s(u,l){if(!(p=u.length))return u;var c=u.map(function(e,n){return t.call(s,e,n)}),f=c.map(function(t){return t.map(function(t,e){return[i.call(s,t,e),a.call(s,t,e)]})}),h=e.call(s,f,l);c=o.permute(c,h),f=o.permute(f,h);var p,d,m,g,v=n.call(s,f,l),y=c[0].length;for(m=0;m<y;++m)for(r.call(s,c[0][m],g=v[m],f[0][m][1]),d=1;d<p;++d)r.call(s,c[d][m],g+=f[d-1][m][1],f[d][m][1]);return u}return s.values=function(e){return arguments.length?(t=e,s):t},s.order=function(t){return arguments.length?(e="function"==typeof t?t:qo.get(t)||Ho,s):e},s.offset=function(t){return arguments.length?(n="function"==typeof t?t:Uo.get(t)||Yo,s):n},s.x=function(t){return arguments.length?(i=t,s):i},s.y=function(t){return arguments.length?(a=t,s):a},s.out=function(t){return arguments.length?(r=t,s):r},s};var qo=o.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(Vo),a=t.map(Zo),s=o.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,l=0,c=[],f=[];for(e=0;e<r;++e)n=s[e],u<l?(u+=a[n],c.push(n)):(l+=a[n],f.push(n));return f.reverse().concat(c)},reverse:function(t){return o.range(t.length).reverse()},default:Ho}),Uo=o.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],s=0,u=[];for(n=0;n<o;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)u[n]=(s-a[n])/2;return u},wiggle:function(t){var e,n,r,i,o,a,s,u,l,c=t.length,f=t[0],h=f.length,p=[];for(p[0]=u=l=0,n=1;n<h;++n){for(e=0,i=0;e<c;++e)i+=t[e][n][1];for(e=0,o=0,s=f[n][0]-f[n-1][0];e<c;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*s);r<e;++r)a+=(t[r][n][1]-t[r][n-1][1])/s;o+=a*t[e][n][1]}p[n]=u-=i?o/i*s:0,u<l&&(l=u)}for(n=0;n<h;++n)p[n]-=l;return p},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];if(r)for(e=0;e<i;e++)t[e][n][1]/=r;else for(e=0;e<i;e++)t[e][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:Yo});function Ho(t){return o.range(t.length)}function Yo(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function Vo(t){for(var e,n=1,r=0,i=t[0][1],o=t.length;n<o;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function Zo(t){return t.reduce(Wo,0)}function Wo(t,e){return t+e[1]}function Xo(t,e){return Qo(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Qo(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function $o(t){return[o.min(t),o.max(t)]}function Go(t,e){return t.value-e.value}function Ko(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Jo(t,e){t._pack_next=e,e._pack_prev=t}function ta(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function ea(t){if((e=t.children)&&(u=e.length)){var e,n,r,i,o,a,s,u,l=1/0,c=-1/0,f=1/0,h=-1/0;if(e.forEach(na),(n=e[0]).x=-n.r,n.y=0,_(n),u>1&&((r=e[1]).x=r.r,r.y=0,_(r),u>2))for(ia(n,r,i=e[2]),_(i),Ko(n,i),n._pack_prev=i,Ko(i,r),r=n._pack_next,o=3;o<u;o++){ia(n,r,i=e[o]);var p=0,d=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,d++)if(ta(a,i)){p=1;break}if(1==p)for(s=n._pack_prev;s!==a._pack_prev&&!ta(s,i);s=s._pack_prev,m++);p?(d<m||d==m&&r.r<n.r?Jo(n,r=a):Jo(n=s,r),o--):(Ko(n,i),r=i,_(i))}var g=(l+c)/2,v=(f+h)/2,y=0;for(o=0;o<u;o++)(i=e[o]).x-=g,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=y,e.forEach(ra)}function _(t){l=Math.min(t.x-t.r,l),c=Math.max(t.x+t.r,c),f=Math.min(t.y-t.r,f),h=Math.max(t.y+t.r,h)}}function na(t){t._pack_next=t._pack_prev=t}function ra(t){delete t._pack_next,delete t._pack_prev}function ia(t,e,n){var r=t.r+n.r,i=e.x-t.x,o=e.y-t.y;if(r&&(i||o)){var a=e.r+n.r,s=i*i+o*o,u=.5+((r*=r)-(a*=a))/(2*s),l=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=t.x+u*i+l*o,n.y=t.y+u*o-l*i}else n.x=t.x+r,n.y=t.y}function oa(t,e){return t.parent==e.parent?1:2}function aa(t){var e=t.children;return e.length?e[0]:t.t}function sa(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function ua(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function la(t,e,n){return t.a.parent===e.parent?t.a:n}function ca(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function fa(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function ha(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function pa(t){return t.rangeExtent?t.rangeExtent():ha(t.range())}function da(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}}function ma(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function ga(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:va}o.layout.histogram=function(){var t=!0,e=Number,n=$o,r=Xo;function i(i,a){for(var s,u,l=[],c=i.map(e,this),f=n.call(this,c,a),h=r.call(this,f,c,a),p=(a=-1,c.length),d=h.length-1,m=t?1:1/p;++a<d;)(s=l[a]=[]).dx=h[a+1]-(s.x=h[a]),s.y=0;if(d>0)for(a=-1;++a<p;)(u=c[a])>=f[0]&&u<=f[1]&&((s=l[o.bisect(h,u,1,d)-1]).y+=m,s.push(i[a]));return l}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(n=be(t),i):n},i.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return Qo(e,t)}:be(t),i):r},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},o.layout.pack=function(){var t,e=o.layout.hierarchy().sort(Go),n=0,r=[1,1];function i(i,o){var a=e.call(this,i,o),s=a[0],u=r[0],l=r[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,Co(s,function(t){t.r=+c(t.value)}),Co(s,ea),n){var f=n*(t?1:Math.max(2*s.r/u,2*s.r/l))/2;Co(s,function(t){t.r+=f}),Co(s,ea),Co(s,function(t){t.r-=f})}return function t(e,n,r,i){var o=e.children;e.x=n+=i*e.x;e.y=r+=i*e.y;e.r*=i;if(o)for(var a=-1,s=o.length;++a<s;)t(o[a],n,r,i)}(s,u/2,l/2,t?1:1/Math.max(2*s.r/u,2*s.r/l)),a}return i.size=function(t){return arguments.length?(r=t,i):r},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(n=+t,i):n},No(i,e)},o.layout.tree=function(){var t=o.layout.hierarchy().sort(null).value(null),e=oa,n=[1,1],r=null;function i(i,o){var l=t.call(this,i,o),c=l[0],f=function(t){var e,n={A:null,children:[t]},r=[n];for(;null!=(e=r.pop());)for(var i,o=e.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}(c);if(Co(f,a),f.parent.m=-f.z,To(f,s),r)To(c,u);else{var h=c,p=c,d=c;To(c,function(t){t.x<h.x&&(h=t),t.x>p.x&&(p=t),t.depth>d.depth&&(d=t)});var m=e(h,p)/2-h.x,g=n[0]/(p.x+e(p,h)/2+m),v=n[1]/(d.depth||1);To(c,function(t){t.x=(t.x+m)*g,t.y=t.depth*v})}return l}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n.length){!function(t){var e,n=0,r=0,i=t.children,o=i.length;for(;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,s=n,u=o.parent.children[0],l=o.m,c=a.m,f=s.m,h=u.m;s=sa(s),o=aa(o),s&&o;)u=aa(u),(a=sa(a)).a=t,(i=s.z+f-o.z-l+e(s._,o._))>0&&(ua(la(s,t,r),t,i),l+=i,c+=i),f+=s.m,l+=o.m,h+=u.m,c+=a.m;s&&!sa(a)&&(a.t=s,a.m+=f-c),o&&!aa(u)&&(u.t=o,u.m+=l-h,r=t)}return r}(t,i,t.parent.A||r[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n[0],t.y=t.depth*n[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t)?u:null,i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null==(n=t)?null:u,i):r?n:null},No(i,t)},o.layout.cluster=function(){var t=o.layout.hierarchy().sort(null).value(null),e=oa,n=[1,1],r=!1;function i(i,a){var s,u=t.call(this,i,a),l=u[0],c=0;Co(l,function(t){var n=t.children;n&&n.length?(t.x=function(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}(n),t.y=function(t){return 1+o.max(t,function(t){return t.y})}(n)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)});var f=function t(e){var n=e.children;return n&&n.length?t(n[0]):e}(l),h=function t(e){var n,r=e.children;return r&&(n=r.length)?t(r[n-1]):e}(l),p=f.x-e(f,h)/2,d=h.x+e(h,f)/2;return Co(l,r?function(t){t.x=(t.x-l.x)*n[0],t.y=(l.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(l.y?t.y/l.y:1))*n[1]}),u}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t),i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null!=(n=t),i):r?n:null},No(i,t)},o.layout.treemap=function(){var t,e=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=ca,s=!1,u="squarify",l=.5*(1+Math.sqrt(5));function c(t,e){for(var n,r,i=-1,o=t.length;++i<o;)r=(n=t[i]).value*(e<0?0:e),n.area=isNaN(r)||r<=0?0:r}function f(t){var e=t.children;if(e&&e.length){var n,r,i,o=a(t),s=[],l=e.slice(),h=1/0,m="slice"===u?o.dx:"dice"===u?o.dy:"slice-dice"===u?1&t.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(c(l,o.dx*o.dy/t.value),s.area=0;(i=l.length)>0;)s.push(n=l[i-1]),s.area+=n.area,"squarify"!==u||(r=p(s,m))<=h?(l.pop(),h=r):(s.area-=s.pop().area,d(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,m,o,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var n,r=a(t),i=e.slice(),o=[];for(c(i,r.dx*r.dy/t.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(d(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);e.forEach(h)}}function p(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,s=t.length;++a<s;)(n=t[a].area)&&(n<o&&(o=n),n>i&&(i=n));return e*=e,(r*=r)?Math.max(e*i*l/r,r/(e*o*l)):1/0}function d(t,e,r,i){var o,a=-1,s=t.length,u=r.x,l=r.y,c=e?n(t.area/e):0;if(e==r.dx){for((i||c>r.dy)&&(c=r.dy);++a<s;)(o=t[a]).x=u,o.y=l,o.dy=c,u+=o.dx=Math.min(r.x+r.dx-u,c?n(o.area/c):0);o.z=!0,o.dx+=r.x+r.dx-u,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++a<s;)(o=t[a]).x=u,o.y=l,o.dx=c,l+=o.dy=Math.min(r.y+r.dy-l,c?n(o.area/c):0);o.z=!1,o.dy+=r.y+r.dy-l,r.x+=c,r.dx-=c}}function m(n){var i=t||e(n),o=i[0];return o.x=o.y=0,o.value?(o.dx=r[0],o.dy=r[1]):o.dx=o.dy=0,t&&e.revalue(o),c([o],o.dx*o.dy/o.value),(t?h:f)(o),s&&(t=i),i}return m.size=function(t){return arguments.length?(r=t,m):r},m.padding=function(t){if(!arguments.length)return i;function e(e){return fa(e,t)}var n;return a=null==(i=t)?ca:"function"==(n=typeof t)?function(e){var n=t.call(m,e,e.depth);return null==n?ca(e):fa(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,m},m.round=function(t){return arguments.length?(n=t?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(s=e,t=null,m):s},m.ratio=function(t){return arguments.length?(l=t,m):l},m.mode=function(t){return arguments.length?(u=t+"",m):u},No(m,e)},o.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(t=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=o.random.normal.apply(o,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=o.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},o.scale={};var va={floor:I,ceil:I};function ya(t,e,n,r){var i=[],a=[],s=0,u=Math.min(t.length,e.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=u;)i.push(n(t[s-1],t[s])),a.push(r(e[s-1],e[s]));return function(e){var n=o.bisect(t,e,1,u)-1;return a[n](i[n](e))}}function _a(t,e){return o.rebind(t,e,"range","rangeRound","interpolate","clamp")}function ba(t,e){return ma(t,ga(xa(t,e)[2])),ma(t,ga(xa(t,e)[2])),t}function xa(t,e){null==e&&(e=10);var n=ha(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function wa(t,e){return o.range.apply(o,xa(t,e))}function ja(t,e,n){var r=xa(t,e);if(n){var i=Pe.exec(n);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(w(r[0]),w(r[1])));return i[7]||(i[7]="."+Aa(a.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+function(t,e){var n=Aa(e[2]);return t in Ma?Math.abs(n-Aa(Math.max(w(e[0]),w(e[1]))))+ +("e"!==t):n-2*("%"===t)}(i[8],r)),n=i.join("")}else n=",."+Aa(r[2])+"f";return o.format(n)}o.scale.linear=function(){return function t(e,n,r,i){var o,a;function s(){var t=Math.min(e.length,n.length)>2?ya:da,s=i?bo:_o;return o=t(e,n,s,r),a=t(n,e,s,Gi),u}function u(t){return o(t)}u.invert=function(t){return a(t)};u.domain=function(t){return arguments.length?(e=t.map(Number),s()):e};u.range=function(t){return arguments.length?(n=t,s()):n};u.rangeRound=function(t){return u.range(t).interpolate(fo)};u.clamp=function(t){return arguments.length?(i=t,s()):i};u.interpolate=function(t){return arguments.length?(r=t,s()):r};u.ticks=function(t){return wa(e,t)};u.tickFormat=function(t,n){return ja(e,t,n)};u.nice=function(t){return ba(e,t),s()};u.copy=function(){return t(e,n,r,i)};return s()}([0,1],[0,1],Gi,!1)};var Ma={s:1,g:1,p:1,r:1,e:1};function Aa(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}o.scale.log=function(){return function t(e,n,r,i){function a(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return r?Math.pow(n,t):-Math.pow(n,-t)}function u(t){return e(a(t))}u.invert=function(t){return s(e.invert(t))};u.domain=function(t){return arguments.length?(r=t[0]>=0,e.domain((i=t.map(Number)).map(a)),u):i};u.base=function(t){return arguments.length?(n=+t,e.domain(i.map(a)),u):n};u.nice=function(){var t=ma(i.map(a),r?Math:za);return e.domain(t),i=t.map(s),u};u.ticks=function(){var t=ha(i),e=[],o=t[0],u=t[1],l=Math.floor(a(o)),c=Math.ceil(a(u)),f=n%1?2:n;if(isFinite(c-l)){if(r){for(;l<c;l++)for(var h=1;h<f;h++)e.push(s(l)*h);e.push(s(l))}else for(e.push(s(l));l++<c;)for(var h=f-1;h>0;h--)e.push(s(l)*h);for(l=0;e[l]<o;l++);for(c=e.length;e[c-1]>u;c--);e=e.slice(l,c)}return e};u.tickFormat=function(t,e){if(!arguments.length)return ka;arguments.length<2?e=ka:"function"!=typeof e&&(e=o.format(e));var r=Math.max(1,n*t/u.ticks().length);return function(t){var i=t/s(Math.round(a(t)));return i*n<n-.5&&(i*=n),i<=r?e(t):""}};u.copy=function(){return t(e.copy(),n,r,i)};return _a(u,e)}(o.scale.linear().domain([0,1]),10,!0,[1,10])};var ka=o.format(".0e"),za={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function Ea(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}o.scale.pow=function(){return function t(e,n,r){var i=Ea(n),o=Ea(1/n);function a(t){return e(i(t))}a.invert=function(t){return o(e.invert(t))};a.domain=function(t){return arguments.length?(e.domain((r=t.map(Number)).map(i)),a):r};a.ticks=function(t){return wa(r,t)};a.tickFormat=function(t,e){return ja(r,t,e)};a.nice=function(t){return a.domain(ba(r,t))};a.exponent=function(t){return arguments.length?(i=Ea(n=t),o=Ea(1/n),e.domain(r.map(i)),a):n};a.copy=function(){return t(e.copy(),n,r)};return _a(a,e)}(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return function t(e,n){var r,i,a;function s(t){return i[((r.get(t)||("range"===n.t?r.set(t,e.push(t)):NaN))-1)%i.length]}function u(t,n){return o.range(e.length).map(function(e){return t+n*e})}s.domain=function(t){if(!arguments.length)return e;e=[],r=new M;for(var i,o=-1,a=t.length;++o<a;)r.has(i=t[o])||r.set(i,e.push(i));return s[n.t].apply(s,n.a)};s.range=function(t){return arguments.length?(i=t,a=0,n={t:"range",a:arguments},s):i};s.rangePoints=function(t,r){arguments.length<2&&(r=0);var o=t[0],l=t[1],c=e.length<2?(o=(o+l)/2,0):(l-o)/(e.length-1+r);return i=u(o+c*r/2,c),a=0,n={t:"rangePoints",a:arguments},s};s.rangeRoundPoints=function(t,r){arguments.length<2&&(r=0);var o=t[0],l=t[1],c=e.length<2?(o=l=Math.round((o+l)/2),0):(l-o)/(e.length-1+r)|0;return i=u(o+Math.round(c*r/2+(l-o-(e.length-1+r)*c)/2),c),a=0,n={t:"rangeRoundPoints",a:arguments},s};s.rangeBands=function(t,r,o){arguments.length<2&&(r=0),arguments.length<3&&(o=r);var l=t[1]<t[0],c=t[l-0],f=t[1-l],h=(f-c)/(e.length-r+2*o);return i=u(c+h*o,h),l&&i.reverse(),a=h*(1-r),n={t:"rangeBands",a:arguments},s};s.rangeRoundBands=function(t,r,o){arguments.length<2&&(r=0),arguments.length<3&&(o=r);var l=t[1]<t[0],c=t[l-0],f=t[1-l],h=Math.floor((f-c)/(e.length-r+2*o));return i=u(c+Math.round((f-c-(e.length-r)*h)/2),h),l&&i.reverse(),a=Math.round(h*(1-r)),n={t:"rangeRoundBands",a:arguments},s};s.rangeBand=function(){return a};s.rangeExtent=function(){return ha(n.a[0])};s.copy=function(){return t(e,n)};return s.domain(e)}([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Sa)},o.scale.category20=function(){return o.scale.ordinal().range(Na)},o.scale.category20b=function(){return o.scale.ordinal().range(Ta)},o.scale.category20c=function(){return o.scale.ordinal().range(Ca)};var Sa=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(fe),Na=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(fe),Ta=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(fe),Ca=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(fe);function Oa(){return 0}o.scale.quantile=function(){return function t(e,n){var r;function i(){var t=0,i=n.length;for(r=[];++t<i;)r[t-1]=o.quantile(e,t/i);return a}function a(t){if(!isNaN(t=+t))return n[o.bisect(r,t)]}a.domain=function(t){return arguments.length?(e=t.map(v).filter(y).sort(g),i()):e};a.range=function(t){return arguments.length?(n=t,i()):n};a.quantiles=function(){return r};a.invertExtent=function(t){return(t=n.indexOf(t))<0?[NaN,NaN]:[t>0?r[t-1]:e[0],t<r.length?r[t]:e[e.length-1]]};a.copy=function(){return t(e,n)};return i()}([],[])},o.scale.quantize=function(){return function t(e,n,r){var i,o;function a(t){return r[Math.max(0,Math.min(o,Math.floor(i*(t-e))))]}function s(){return i=r.length/(n-e),o=r.length-1,a}a.domain=function(t){return arguments.length?(e=+t[0],n=+t[t.length-1],s()):[e,n]};a.range=function(t){return arguments.length?(r=t,s()):r};a.invertExtent=function(t){return[t=(t=r.indexOf(t))<0?NaN:t/i+e,t+1/i]};a.copy=function(){return t(e,n,r)};return s()}(0,1,[0,1])},o.scale.threshold=function(){return function t(e,n){function r(t){if(t<=t)return n[o.bisect(e,t)]}r.domain=function(t){return arguments.length?(e=t,r):e};r.range=function(t){return arguments.length?(n=t,r):n};r.invertExtent=function(t){return t=n.indexOf(t),[e[t-1],e[t]]};r.copy=function(){return t(e,n)};return r}([.5],[0,1])},o.scale.identity=function(){return function t(e){function n(t){return+t}n.invert=n;n.domain=n.range=function(t){return arguments.length?(e=t.map(n),n):e};n.ticks=function(t){return wa(e,t)};n.tickFormat=function(t,n){return ja(e,t,n)};n.copy=function(){return t(e)};return n}([0,1])},o.svg={},o.svg.arc=function(){var t=Ia,e=Ba,n=Oa,r=Pa,i=Da,o=Fa,a=Ra;function s(){var s=Math.max(0,+t.apply(this,arguments)),l=Math.max(0,+e.apply(this,arguments)),c=i.apply(this,arguments)-Ct,f=o.apply(this,arguments)-Ct,h=Math.abs(f-c),p=c>f?0:1;if(l<s&&(d=l,l=s,s=d),h>=Tt)return u(l,p)+(s?u(s,1-p):"")+"Z";var d,m,g,v,y,_,b,x,w,j,M,A,k=0,z=0,E=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=r===Pa?Math.sqrt(s*s+l*l):+r.apply(this,arguments),p||(z*=-1),l&&(z=Ft(g/l*Math.sin(v))),s&&(k=Ft(g/s*Math.sin(v)))),l){y=l*Math.cos(c+z),_=l*Math.sin(c+z),b=l*Math.cos(f-z),x=l*Math.sin(f-z);var S=Math.abs(f-c-2*z)<=St?0:1;if(z&&La(y,_,b,x)===p^S){var N=(c+f)/2;y=l*Math.cos(N),_=l*Math.sin(N),b=x=null}}else y=_=0;if(s){w=s*Math.cos(f-k),j=s*Math.sin(f-k),M=s*Math.cos(c+k),A=s*Math.sin(c+k);var T=Math.abs(c-f+2*k)<=St?0:1;if(k&&La(w,j,M,A)===1-p^T){var C=(c+f)/2;w=s*Math.cos(C),j=s*Math.sin(C),M=A=null}}else w=j=0;if(h>zt&&(d=Math.min(Math.abs(l-s)/2,+n.apply(this,arguments)))>.001){m=s<l^p?0:1;var O=d,P=d;if(h<St){var I=null==M?[w,j]:null==b?[y,_]:li([y,_],[M,A],[b,x],[w,j]),B=y-I[0],D=_-I[1],F=b-I[0],R=x-I[1],L=1/Math.sin(Math.acos((B*F+D*R)/(Math.sqrt(B*B+D*D)*Math.sqrt(F*F+R*R)))/2),q=Math.sqrt(I[0]*I[0]+I[1]*I[1]);P=Math.min(d,(s-q)/(L-1)),O=Math.min(d,(l-q)/(L+1))}if(null!=b){var U=qa(null==M?[w,j]:[M,A],[y,_],l,O,p),H=qa([b,x],[w,j],l,O,p);d===O?E.push("M",U[0],"A",O,",",O," 0 0,",m," ",U[1],"A",l,",",l," 0 ",1-p^La(U[1][0],U[1][1],H[1][0],H[1][1]),",",p," ",H[1],"A",O,",",O," 0 0,",m," ",H[0]):E.push("M",U[0],"A",O,",",O," 0 1,",m," ",H[0])}else E.push("M",y,",",_);if(null!=M){var Y=qa([y,_],[M,A],s,-P,p),V=qa([w,j],null==b?[y,_]:[b,x],s,-P,p);d===P?E.push("L",V[0],"A",P,",",P," 0 0,",m," ",V[1],"A",s,",",s," 0 ",p^La(V[1][0],V[1][1],Y[1][0],Y[1][1]),",",1-p," ",Y[1],"A",P,",",P," 0 0,",m," ",Y[0]):E.push("L",V[0],"A",P,",",P," 0 0,",m," ",Y[0])}else E.push("L",w,",",j)}else E.push("M",y,",",_),null!=b&&E.push("A",l,",",l," 0 ",S,",",p," ",b,",",x),E.push("L",w,",",j),null!=M&&E.push("A",s,",",s," 0 ",T,",",1-p," ",M,",",A);return E.push("Z"),E.join("")}function u(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return s.innerRadius=function(e){return arguments.length?(t=be(e),s):t},s.outerRadius=function(t){return arguments.length?(e=be(t),s):e},s.cornerRadius=function(t){return arguments.length?(n=be(t),s):n},s.padRadius=function(t){return arguments.length?(r=t==Pa?Pa:be(t),s):r},s.startAngle=function(t){return arguments.length?(i=be(t),s):i},s.endAngle=function(t){return arguments.length?(o=be(t),s):o},s.padAngle=function(t){return arguments.length?(a=be(t),s):a},s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ct;return[Math.cos(r)*n,Math.sin(r)*n]},s};var Pa="auto";function Ia(t){return t.innerRadius}function Ba(t){return t.outerRadius}function Da(t){return t.startAngle}function Fa(t){return t.endAngle}function Ra(t){return t&&t.padAngle}function La(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function qa(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),u=s*a,l=-s*o,c=t[0]+u,f=t[1]+l,h=e[0]+u,p=e[1]+l,d=(c+h)/2,m=(f+p)/2,g=h-c,v=p-f,y=g*g+v*v,_=n-r,b=c*p-h*f,x=(v<0?-1:1)*Math.sqrt(Math.max(0,_*_*y-b*b)),w=(b*v-g*x)/y,j=(-b*g-v*x)/y,M=(b*v+g*x)/y,A=(-b*g+v*x)/y,k=w-d,z=j-m,E=M-d,S=A-m;return k*k+z*z>E*E+S*S&&(w=M,j=A),[[w-u,j-l],[w*n/_,j*n/_]]}function Ua(t){var e=ri,n=ii,r=Gn,i=Ya,o=i.key,a=.7;function s(o){var s,u=[],l=[],c=-1,f=o.length,h=be(e),p=be(n);function d(){u.push("M",i(t(l),a))}for(;++c<f;)r.call(this,s=o[c],c)?l.push([+h.call(this,s,c),+p.call(this,s,c)]):l.length&&(d(),l=[]);return l.length&&d(),u.length?u.join(""):null}return s.x=function(t){return arguments.length?(e=t,s):e},s.y=function(t){return arguments.length?(n=t,s):n},s.defined=function(t){return arguments.length?(r=t,s):r},s.interpolate=function(t){return arguments.length?(o="function"==typeof t?i=t:(i=Ha.get(t)||Ya).key,s):o},s.tension=function(t){return arguments.length?(a=t,s):a},s}o.svg.line=function(){return Ua(I)};var Ha=o.map({linear:Ya,"linear-closed":Va,step:function(t){var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];for(;++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":Za,"step-after":Wa,basis:$a,"basis-open":function(t){if(t.length<4)return Ya(t);var e,n=[],r=-1,i=t.length,o=[0],a=[0];for(;++r<3;)e=t[r],o.push(e[0]),a.push(e[1]);n.push(Ga(ts,o)+","+Ga(ts,a)),--r;for(;++r<i;)e=t[r],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),es(n,o,a);return n.join("")},"basis-closed":function(t){var e,n,r=-1,i=t.length,o=i+4,a=[],s=[];for(;++r<4;)n=t[r%i],a.push(n[0]),s.push(n[1]);e=[Ga(ts,a),",",Ga(ts,s)],--r;for(;++r<o;)n=t[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),es(e,a,s);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var r,i,o=t[0][0],a=t[0][1],s=t[n][0]-o,u=t[n][1]-a,l=-1;++l<=n;)r=t[l],i=l/n,r[0]=e*r[0]+(1-e)*(o+i*s),r[1]=e*r[1]+(1-e)*(a+i*u);return $a(t)},cardinal:function(t,e){return t.length<3?Ya(t):t[0]+Xa(t,Qa(t,e))},"cardinal-open":function(t,e){return t.length<4?Ya(t):t[1]+Xa(t.slice(1,-1),Qa(t,e))},"cardinal-closed":function(t,e){return t.length<3?Va(t):t[0]+Xa((t.push(t[0]),t),Qa([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?Ya(t):t[0]+Xa(t,function(t){var e,n,r,i,o=[],a=function(t){var e=0,n=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=ns(i,o);for(;++e<n;)r[e]=(a+(a=ns(i=o,o=t[e+1])))/2;return r[e]=a,r}(t),s=-1,u=t.length-1;for(;++s<u;)e=ns(t[s],t[s+1]),w(e)<zt?a[s]=a[s+1]=0:(n=a[s]/e,r=a[s+1]/e,(i=n*n+r*r)>9&&(i=3*e/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));s=-1;for(;++s<=u;)i=(t[Math.min(u,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(t))}});function Ya(t){return t.length>1?t.join("L"):t+"Z"}function Va(t){return t.join("L")+"Z"}function Za(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function Wa(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function Xa(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ya(t);var n=t.length!=e.length,r="",i=t[0],o=t[1],a=e[0],s=a,u=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],u=2),e.length>1){s=e[1],o=t[u],u++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var l=2;l<e.length;l++,u++)o=t[u],s=e[l],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=t[u];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function Qa(t,e){for(var n,r=[],i=(1-e)/2,o=t[0],a=t[1],s=1,u=t.length;++s<u;)n=o,o=a,a=t[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function $a(t){if(t.length<3)return Ya(t);var e=1,n=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],s=[o,o,o,r[1]],u=[i,",",o,"L",Ga(ts,a),",",Ga(ts,s)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),es(u,a,s);return t.pop(),u.push("L",r),u.join("")}function Ga(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}Ha.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Ka=[0,2/3,1/3,0],Ja=[0,1/3,2/3,0],ts=[0,1/6,2/3,1/6];function es(t,e,n){t.push("C",Ga(Ka,e),",",Ga(Ka,n),",",Ga(Ja,e),",",Ga(Ja,n),",",Ga(ts,e),",",Ga(ts,n))}function ns(t,e){return(e[1]-t[1])/(e[0]-t[0])}function rs(t){for(var e,n,r,i=-1,o=t.length;++i<o;)n=(e=t[i])[0],r=e[1]-Ct,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function is(t){var e=ri,n=ri,r=0,i=ii,o=Gn,a=Ya,s=a.key,u=a,l="L",c=.7;function f(s){var f,h,p,d=[],m=[],g=[],v=-1,y=s.length,_=be(e),b=be(r),x=e===n?function(){return h}:be(n),w=r===i?function(){return p}:be(i);function j(){d.push("M",a(t(g),c),l,u(t(m.reverse()),c),"Z")}for(;++v<y;)o.call(this,f=s[v],v)?(m.push([h=+_.call(this,f,v),p=+b.call(this,f,v)]),g.push([+x.call(this,f,v),+w.call(this,f,v)])):m.length&&(j(),m=[],g=[]);return m.length&&j(),d.length?d.join(""):null}return f.x=function(t){return arguments.length?(e=n=t,f):n},f.x0=function(t){return arguments.length?(e=t,f):e},f.x1=function(t){return arguments.length?(n=t,f):n},f.y=function(t){return arguments.length?(r=i=t,f):i},f.y0=function(t){return arguments.length?(r=t,f):r},f.y1=function(t){return arguments.length?(i=t,f):i},f.defined=function(t){return arguments.length?(o=t,f):o},f.interpolate=function(t){return arguments.length?(s="function"==typeof t?a=t:(a=Ha.get(t)||Ya).key,u=a.reverse||a,l=a.closed?"M":"L",f):s},f.tension=function(t){return arguments.length?(c=t,f):c},f}function os(t){return t.radius}function as(t){return[t.x,t.y]}function ss(){return 64}function us(){return"circle"}function ls(t){var e=Math.sqrt(t/St);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}o.svg.line.radial=function(){var t=Ua(rs);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Za.reverse=Wa,Wa.reverse=Za,o.svg.area=function(){return is(I)},o.svg.area.radial=function(){var t=is(rs);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},o.svg.chord=function(){var t=Hr,e=Yr,n=os,r=Da,i=Fa;function o(n,r){var i=a(this,t,n,r),o=a(this,e,n,r);return"M"+i.p0+s(i.r,i.p1,i.a1-i.a0)+(function(t,e){return t.a0==e.a0&&t.a1==e.a1}(i,o)?u(i.r,i.p1,i.r,i.p0):u(i.r,i.p1,o.r,o.p0)+s(o.r,o.p1,o.a1-o.a0)+u(o.r,o.p1,i.r,i.p0))+"Z"}function a(t,e,o,a){var s=e.call(t,o,a),u=n.call(t,s,a),l=r.call(t,s,a)-Ct,c=i.call(t,s,a)-Ct;return{r:u,a0:l,a1:c,p0:[u*Math.cos(l),u*Math.sin(l)],p1:[u*Math.cos(c),u*Math.sin(c)]}}function s(t,e,n){return"A"+t+","+t+" 0 "+ +(n>St)+",1 "+e}function u(t,e,n,r){return"Q 0,0 "+r}return o.radius=function(t){return arguments.length?(n=be(t),o):n},o.source=function(e){return arguments.length?(t=be(e),o):t},o.target=function(t){return arguments.length?(e=be(t),o):e},o.startAngle=function(t){return arguments.length?(r=be(t),o):r},o.endAngle=function(t){return arguments.length?(i=be(t),o):i},o},o.svg.diagonal=function(){var t=Hr,e=Yr,n=as;function r(r,i){var o=t.call(this,r,i),a=e.call(this,r,i),s=(o.y+a.y)/2,u=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(u=u.map(n))[0]+"C"+u[1]+" "+u[2]+" "+u[3]}return r.source=function(e){return arguments.length?(t=be(e),r):t},r.target=function(t){return arguments.length?(e=be(t),r):e},r.projection=function(t){return arguments.length?(n=t,r):n},r},o.svg.diagonal.radial=function(){var t=o.svg.diagonal(),e=as,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-Ct;return[n*Math.cos(r),n*Math.sin(r)]}}(e=t)):e},t},o.svg.symbol=function(){var t=us,e=ss;function n(n,r){return(cs.get(t.call(this,n,r))||ls)(e.call(this,n,r))}return n.type=function(e){return arguments.length?(t=be(e),n):t},n.size=function(t){return arguments.length?(e=be(t),n):e},n};var cs=o.map({circle:ls,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*hs)),n=e*hs;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/fs),n=e*fs/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/fs),n=e*fs/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});o.svg.symbolTypes=cs.keys();var fs=Math.sqrt(3),hs=Math.tan(30*Ot);G.transition=function(t){for(var e,n,r=gs||++_s,i=ws(t),o=[],a=vs||{time:Date.now(),ease:ao,delay:0,duration:250},s=-1,u=this.length;++s<u;){o.push(e=[]);for(var l=this[s],c=-1,f=l.length;++c<f;)(n=l[c])&&js(n,c,i,r,a),e.push(n)}return ms(o,i,r)},G.interrupt=function(t){return this.each(null==t?ps:ds(ws(t)))};var ps=ds(ws());function ds(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function ms(t,e,n){return Z(t,ys),t.namespace=e,t.id=n,t}var gs,vs,ys=[],_s=0;function bs(t,e,n,r){var i=t.id,o=t.namespace;return dt(t,"function"==typeof n?function(t,a,s){t[o][i].tween.set(e,r(n.call(t,t.__data__,a,s)))}:(n=r(n),function(t){t[o][i].tween.set(e,n)}))}function xs(t){return null==t&&(t=""),function(){this.textContent=t}}function ws(t){return null==t?"__transition__":"__transition_"+t+"__"}function js(t,e,n,r,i){var o,a,s,u,l,c=t[n]||(t[n]={active:0,count:0}),f=c[r];function h(n){var i=c.active,h=c[i];for(var d in h&&(h.timer.c=null,h.timer.t=NaN,--c.count,delete c[i],h.event&&h.event.interrupt.call(t,t.__data__,h.index)),c)if(+d<r){var m=c[d];m.timer.c=null,m.timer.t=NaN,--c.count,delete c[d]}a.c=p,Ee(function(){return a.c&&p(n||1)&&(a.c=null,a.t=NaN),1},0,o),c.active=r,f.event&&f.event.start.call(t,t.__data__,e),l=[],f.tween.forEach(function(n,r){(r=r.call(t,t.__data__,e))&&l.push(r)}),u=f.ease,s=f.duration}function p(i){for(var o=i/s,a=u(o),h=l.length;h>0;)l[--h].call(t,a);if(o>=1)return f.event&&f.event.end.call(t,t.__data__,e),--c.count?delete c[r]:delete t[n],1}f||(o=i.time,a=Ee(function(t){var e=f.delay;if(a.t=e+o,e<=t)return h(t-e);a.c=h},0,o),f=c[r]={tween:new M,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}ys.call=G.call,ys.empty=G.empty,ys.node=G.node,ys.size=G.size,o.transition=function(t,e){return t&&t.transition?gs?t.transition(e):t:o.selection().transition(t)},o.transition.prototype=ys,ys.select=function(t){var e,n,r,i=this.id,o=this.namespace,a=[];t=K(t);for(var s=-1,u=this.length;++s<u;){a.push(e=[]);for(var l=this[s],c=-1,f=l.length;++c<f;)(r=l[c])&&(n=t.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),js(n,c,o,i,r[o][i]),e.push(n)):e.push(null)}return ms(a,o,i)},ys.selectAll=function(t){var e,n,r,i,o,a=this.id,s=this.namespace,u=[];t=J(t);for(var l=-1,c=this.length;++l<c;)for(var f=this[l],h=-1,p=f.length;++h<p;)if(r=f[h]){o=r[s][a],n=t.call(r,r.__data__,h,l),u.push(e=[]);for(var d=-1,m=n.length;++d<m;)(i=n[d])&&js(i,d,s,a,o),e.push(i)}return ms(u,s,a)},ys.filter=function(t){var e,n,r=[];"function"!=typeof t&&(t=pt(t));for(var i=0,o=this.length;i<o;i++){r.push(e=[]);for(var a,s=0,u=(a=this[i]).length;s<u;s++)(n=a[s])&&t.call(n,n.__data__,s,i)&&e.push(n)}return ms(r,this.namespace,this.id)},ys.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):dt(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},ys.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n="transform"==t?yo:Gi,r=o.ns.qualify(t);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}return bs(this,"attr."+t,e,r.local?function(t){return null==t?a:(t+="",function(){var e,i=this.getAttributeNS(r.space,r.local);return i!==t&&(e=n(i,t),function(t){this.setAttributeNS(r.space,r.local,e(t))})})}:function(t){return null==t?i:(t+="",function(){var e,i=this.getAttribute(r);return i!==t&&(e=n(i,t),function(t){this.setAttribute(r,e(t))})})})},ys.attrTween=function(t,e){var n=o.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,r){var i=e.call(this,t,r,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,r){var i=e.call(this,t,r,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},ys.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.style(n,t[n],e);return this}n=""}function i(){this.style.removeProperty(t)}return bs(this,"style."+t,e,function(e){return null==e?i:(e+="",function(){var r,i=c(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=Gi(i,e),function(e){this.style.setProperty(t,r(e),n)})})})},ys.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,function(r,i){var o=e.call(this,r,i,c(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),n)}})},ys.text=function(t){return bs(this,"text",t,xs)},ys.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},ys.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=o.ease.apply(o,arguments)),dt(this,function(r){r[n][e].ease=t}))},ys.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:dt(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},ys.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:dt(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},ys.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=vs,a=gs;try{gs=n,dt(this,function(e,i,o){vs=e[r][n],t.call(e,e.__data__,i,o)})}finally{vs=i,gs=a}}else dt(this,function(i){var a=i[r][n];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e)});return this},ys.transition=function(){for(var t,e,n,r=this.id,i=++_s,o=this.namespace,a=[],s=0,u=this.length;s<u;s++){a.push(t=[]);for(var l,c=0,f=(l=this[s]).length;c<f;c++)(e=l[c])&&js(e,c,o,i,{time:(n=e[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),t.push(e)}return ms(a,o,i)},o.svg.axis=function(){var t,e=o.scale.linear(),n=Ms,r=6,i=6,a=3,u=[10],l=null;function c(s){s.each(function(){var s,c=o.select(this),f=this.__chart__||e,h=this.__chart__=e.copy(),p=null==l?h.ticks?h.ticks.apply(h,u):h.domain():l,d=null==t?h.tickFormat?h.tickFormat.apply(h,u):I:t,m=c.selectAll(".tick").data(p,h),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",zt),v=o.transition(m.exit()).style("opacity",zt).remove(),y=o.transition(m.order()).style("opacity",1),_=Math.max(r,0)+a,b=pa(h),x=c.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),o.transition(x));g.append("line"),g.append("text");var j,M,A,k,z=g.select("line"),E=y.select("line"),S=m.select("text").text(d),N=g.select("text"),T=y.select("text"),C="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=ks,j="x",A="y",M="x2",k="y2",S.attr("dy",C<0?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+C*i+"V0H"+b[1]+"V"+C*i)):(s=zs,j="y",A="x",M="y2",k="x2",S.attr("dy",".32em").style("text-anchor",C<0?"end":"start"),w.attr("d","M"+C*i+","+b[0]+"H0V"+b[1]+"H"+C*i)),z.attr(k,C*r),N.attr(A,C*_),E.attr(M,0).attr(k,C*r),T.attr(j,0).attr(A,C*_),h.rangeBand){var O=h,P=O.rangeBand()/2;f=h=function(t){return O(t)+P}}else f.rangeBand?f=h:v.call(s,h,f);g.call(s,f,h),y.call(s,h,h)})}return c.scale=function(t){return arguments.length?(e=t,c):e},c.orient=function(t){return arguments.length?(n=t in As?t+"":Ms,c):n},c.ticks=function(){return arguments.length?(u=s(arguments),c):u},c.tickValues=function(t){return arguments.length?(l=t,c):l},c.tickFormat=function(e){return arguments.length?(t=e,c):t},c.tickSize=function(t){var e=arguments.length;return e?(r=+t,i=+arguments[e-1],c):r},c.innerTickSize=function(t){return arguments.length?(r=+t,c):r},c.outerTickSize=function(t){return arguments.length?(i=+t,c):i},c.tickPadding=function(t){return arguments.length?(a=+t,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Ms="bottom",As={top:1,right:1,bottom:1,left:1};function ks(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function zs(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}o.svg.brush=function(){var t,e,n=Y(h,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],s=[0,0],u=!0,l=!0,f=Ss[0];function h(t){t.each(function(){var t=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",g).on("touchstart.brush",g),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=t.selectAll(".resize").data(f,I);n.exit().remove(),n.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Es[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",h.empty()?"none":null);var a,s=o.transition(t),u=o.transition(e);r&&(a=pa(r),u.attr("x",a[0]).attr("width",a[1]-a[0]),d(s)),i&&(a=pa(i),u.attr("y",a[0]).attr("height",a[1]-a[0]),m(s)),p(s)})}function p(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+a[+/e$/.test(t)]+","+s[+/^s/.test(t)]+")"})}function d(t){t.select(".extent").attr("x",a[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function m(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var f,g,v=this,y=o.select(o.event.target),_=n.of(v,arguments),b=o.select(v),x=y.datum(),w=!/^(n|s)$/.test(x)&&r,j=!/^(e|w)$/.test(x)&&i,M=y.classed("extent"),A=jt(v),k=o.mouse(v),z=o.select(c(v)).on("keydown.brush",function(){32==o.event.keyCode&&(M||(f=null,k[0]-=a[1],k[1]-=s[1],M=2),U())}).on("keyup.brush",function(){32==o.event.keyCode&&2==M&&(k[0]+=a[1],k[1]+=s[1],M=0,U())});if(o.event.changedTouches?z.on("touchmove.brush",N).on("touchend.brush",C):z.on("mousemove.brush",N).on("mouseup.brush",C),b.interrupt().selectAll("*").interrupt(),M)k[0]=a[0]-k[0],k[1]=s[0]-k[1];else if(x){var E=+/w$/.test(x),S=+/^n/.test(x);g=[a[1-E]-k[0],s[1-S]-k[1]],k[0]=a[E],k[1]=s[S]}else o.event.altKey&&(f=k.slice());function N(){var t=o.mouse(v),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(o.event.altKey?(f||(f=[(a[0]+a[1])/2,(s[0]+s[1])/2]),k[0]=a[+(t[0]<f[0])],k[1]=s[+(t[1]<f[1])]):f=null),w&&T(t,r,0)&&(d(b),e=!0),j&&T(t,i,1)&&(m(b),e=!0),e&&(p(b),_({type:"brush",mode:M?"move":"resize"}))}function T(n,r,i){var o,c,h=pa(r),p=h[0],d=h[1],m=k[i],g=i?s:a,v=g[1]-g[0];if(M&&(p-=m,d-=v+m),o=(i?l:u)?Math.max(p,Math.min(d,n[i])):n[i],M?c=(o+=m)+v:(f&&(m=Math.max(p,Math.min(d,2*f[i]-o))),m<o?(c=o,o=m):c=m),g[0]!=o||g[1]!=c)return i?e=null:t=null,g[0]=o,g[1]=c,!0}function C(){N(),b.style("pointer-events","all").selectAll(".resize").style("display",h.empty()?"none":null),o.select("body").style("cursor",null),z.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),A(),_({type:"brushend"})}b.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",y.style("cursor")),_({type:"brushstart"}),N()}return h.event=function(r){r.each(function(){var r=n.of(this,arguments),i={x:a,y:s,i:t,j:e},u=this.__chart__||i;this.__chart__=i,gs?o.select(this).transition().each("start.brush",function(){t=u.i,e=u.j,a=u.x,s=u.y,r({type:"brushstart"})}).tween("brush:brush",function(){var n=Ki(a,i.x),o=Ki(s,i.y);return t=e=null,function(t){a=i.x=n(t),s=i.y=o(t),r({type:"brush",mode:"resize"})}}).each("end.brush",function(){t=i.i,e=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})}):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))})},h.x=function(t){return arguments.length?(f=Ss[!(r=t)<<1|!i],h):r},h.y=function(t){return arguments.length?(f=Ss[!r<<1|!(i=t)],h):i},h.clamp=function(t){return arguments.length?(r&&i?(u=!!t[0],l=!!t[1]):r?u=!!t:i&&(l=!!t),h):r&&i?[u,l]:r?u:i?l:null},h.extent=function(n){var o,u,l,c,f;return arguments.length?(r&&(o=n[0],u=n[1],i&&(o=o[0],u=u[0]),t=[o,u],r.invert&&(o=r(o),u=r(u)),u<o&&(f=o,o=u,u=f),o==a[0]&&u==a[1]||(a=[o,u])),i&&(l=n[0],c=n[1],r&&(l=l[1],c=c[1]),e=[l,c],i.invert&&(l=i(l),c=i(c)),c<l&&(f=l,l=c,c=f),l==s[0]&&c==s[1]||(s=[l,c])),h):(r&&(t?(o=t[0],u=t[1]):(o=a[0],u=a[1],r.invert&&(o=r.invert(o),u=r.invert(u)),u<o&&(f=o,o=u,u=f))),i&&(e?(l=e[0],c=e[1]):(l=s[0],c=s[1],i.invert&&(l=i.invert(l),c=i.invert(c)),c<l&&(f=l,l=c,c=f))),r&&i?[[o,l],[u,c]]:r?[o,u]:i&&[l,c])},h.clear=function(){return h.empty()||(a=[0,0],s=[0,0],t=e=null),h},h.empty=function(){return!!r&&a[0]==a[1]||!!i&&s[0]==s[1]},o.rebind(h,n,"on")};var Es={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ss=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ns=De.format=hn.timeFormat,Ts=Ns.utc,Cs=Ts("%Y-%m-%dT%H:%M:%S.%LZ");function Os(t){return t.toISOString()}function Ps(t,e,n){function r(e){return t(e)}function i(t,n){var r=(t[1]-t[0])/n,i=o.bisect(Bs,r);return i==Bs.length?[e.year,xa(t.map(function(t){return t/31536e6}),n)[2]]:i?e[r/Bs[i-1]<Bs[i]/r?i-1:i]:[Rs,xa(t,n)[2]]}return r.invert=function(e){return Is(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(Is)},r.nice=function(t,e){var n=r.domain(),o=ha(n),a=null==t?i(o,10):"number"==typeof t&&i(o,t);function s(n){return!isNaN(n)&&!t.range(n,Is(+n+1),e).length}return a&&(t=a[0],e=a[1]),r.domain(ma(n,e>1?{floor:function(e){for(;s(e=t.floor(e));)e=Is(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Is(+e+1);return e}}:t))},r.ticks=function(t,e){var n=ha(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],Is(+n[1]+1),e<1?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Ps(t.copy(),e,n)},_a(r,t)}function Is(t){return new Date(t)}Ns.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Os:Cs,Os.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Os.toString=Cs.toString,De.second=qe(function(t){return new Fe(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),De.seconds=De.second.range,De.seconds.utc=De.second.utc.range,De.minute=qe(function(t){return new Fe(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),De.minutes=De.minute.range,De.minutes.utc=De.minute.utc.range,De.hour=qe(function(t){var e=t.getTimezoneOffset()/60;return new Fe(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),De.hours=De.hour.range,De.hours.utc=De.hour.utc.range,De.month=qe(function(t){return(t=De.day(t)).setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),De.months=De.month.range,De.months.utc=De.month.utc.range;var Bs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Ds=[[De.second,1],[De.second,5],[De.second,15],[De.second,30],[De.minute,1],[De.minute,5],[De.minute,15],[De.minute,30],[De.hour,1],[De.hour,3],[De.hour,6],[De.hour,12],[De.day,1],[De.day,2],[De.week,1],[De.month,1],[De.month,3],[De.year,1]],Fs=Ns.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Gn]]),Rs={range:function(t,e,n){return o.range(Math.ceil(t/n)*n,+e,n).map(Is)},floor:I,ceil:I};Ds.year=De.year,De.scale=function(){return Ps(o.scale.linear(),Ds,Fs)};var Ls=Ds.map(function(t){return[t[0].utc,t[1]]}),qs=Ts.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Gn]]);function Us(t){return JSON.parse(t.responseText)}function Hs(t){var e=u.createRange();return e.selectNode(u.body),e.createContextualFragment(t.responseText)}Ls.year=De.year.utc,De.scale.utc=function(){return Ps(o.scale.linear(),Ls,qs)},o.text=xe(function(t){return t.responseText}),o.json=function(t,e){return we(t,"application/json",Us,e)},o.html=function(t,e){return we(t,"text/html",Hs,e)},o.xml=xe(function(t){return t.responseXML}),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(e,n,e,t):r)||(t.exports=i)}()}])});
//# sourceMappingURL=embed-bundle.js.map