-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3plus.min.js
18 lines (18 loc) · 552 KB
/
d3plus.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
!function e(t,r,n){function a(o,s){if(!r[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(i)return i(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[o]={exports:{}};t[o][0].call(c.exports,function(e){var r=t[o][1][e];return a(r||e)},c,c.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function a(e){return 3*e.length/4-n(e)}function i(e){var t,r,a,i,o,s=e.length;i=n(e),o=new d(3*s/4-i),r=i>0?s-4:s;var l=0;for(t=0;t<r;t+=4)a=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],o[l++]=a>>16&255,o[l++]=a>>8&255,o[l++]=255&a;return 2===i?(a=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&a):1===i&&(a=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=a>>8&255,o[l++]=255&a),o}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,r){for(var n,a=[],i=t;i<r;i+=3)n=(e[i]<<16)+(e[i+1]<<8)+e[i+2],a.push(o(n));return a.join("")}function l(e){for(var t,r=e.length,n=r%3,a="",i=[],o=0,l=r-n;o<l;o+=16383)i.push(s(e,o,o+16383>l?l:o+16383));return 1===n?(t=e[r-1],a+=u[t>>2],a+=u[t<<4&63],a+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],a+=u[t>>10],a+=u[t>>4&63],a+=u[t<<2&63],a+="="),i.push(a),i.join("")}r.byteLength=a,r.toByteArray=i,r.fromByteArray=l;for(var u=[],c=[],d="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=f.length;p<h;++p)u[p]=f[p],c[f.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},{}],2:[function(e,t,r){"use strict";"use restrict";function n(e){var t=32;return e&=-e,e&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(e){return(e>0)-(e<0)},r.abs=function(e){var t=e>>31;return(e^t)-t},r.min=function(e,t){return t^(e^t)&-(e<t)},r.max=function(e,t){return e^(e^t)&-(e<t)},r.isPow2=function(e){return!(e&e-1||!e)},r.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},r.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},r.popCount=function(e){return e-=e>>>1&1431655765,16843009*((e=(858993459&e)+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},r.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},r.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var a=new Array(256);!function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--a;e[t]=n<<a&255}}(a),r.reverse=function(e){return a[255&e]<<24|a[e>>>8&255]<<16|a[e>>>16&255]<<8|a[e>>>24&255]},r.interleave2=function(e,t){return e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e|t<<1},r.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=858993459&(e|e>>>1),e=252645135&(e|e>>>2),e=16711935&(e|e>>>4),(e=65535&(e|e>>>16))<<16>>16},r.interleave3=function(e,t,r){return e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e|=t<<1,r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),e|r<<2},r.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=3272356035&(e|e>>>2),e=251719695&(e|e>>>4),e=4278190335&(e|e>>>8),(e=1023&(e|e>>>16))<<22>>22},r.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>n(e)+1}},{}],3:[function(e,t,r){(function(t){"use strict";function n(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return i.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=i.prototype):(null===e&&(e=new i(t)),e.length=t),e}function i(e,t,r){if(!(i.TYPED_ARRAY_SUPPORT||this instanceof i))return new i(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(this,e)}return o(this,e,t,r)}function o(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?f(e,t,r,n):"string"==typeof t?c(e,t,r):p(e,t)}function s(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t,r,n){return s(t),t<=0?a(e,t):void 0!==r?"string"==typeof n?a(e,t).fill(r,n):a(e,t).fill(r):a(e,t)}function u(e,t){if(s(t),e=a(e,t<0?0:0|h(t)),!i.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function c(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!i.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|g(t,r);e=a(e,n);var o=e.write(t,r);return o!==n&&(e=e.slice(0,o)),e}function d(e,t){var r=t.length<0?0:0|h(t.length);e=a(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function f(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),i.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=i.prototype):e=d(e,t),e}function p(e,t){if(i.isBuffer(t)){var r=0|h(t.length);return e=a(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||W(t.length)?a(e,0):d(e,t);if("Buffer"===t.type&&Z(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),i.alloc(+e)}function g(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return Y(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function x(e,t,r,n,a){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,a);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,a){function i(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,r/=2}var u;if(a){var c=-1;for(u=r;u<s;u++)if(i(e,u)===i(t,-1===c?0:u-c)){if(-1===c&&(c=u),u-c+1===l)return c*o}else-1!==c&&(u-=u-c),c=-1}else for(r+l>s&&(r=s-l),u=r;u>=0;u--){for(var d=!0,f=0;f<l;f++)if(i(e,u+f)!==i(t,f)){d=!1;break}if(d)return u}return-1}function w(e,t,r,n){r=Number(r)||0;var a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function _(e,t,r,n){return J(Y(t,e.length-r),e,r,n)}function k(e,t,r,n){return J(H(t),e,r,n)}function z(e,t,r,n){return k(e,t,r,n)}function A(e,t,r,n){return J(X(t),e,r,n)}function j(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],a=t;a<r;){var i=e[a],o=null,s=i>239?4:i>223?3:i>191?2:1;if(a+s<=r){var l,u,c,d;switch(s){case 1:i<128&&(o=i);break;case 2:l=e[a+1],128==(192&l)&&(d=(31&i)<<6|63&l)>127&&(o=d);break;case 3:l=e[a+1],u=e[a+2],128==(192&l)&&128==(192&u)&&(d=(15&i)<<12|(63&l)<<6|63&u)>2047&&(d<55296||d>57343)&&(o=d);break;case 4:l=e[a+1],u=e[a+2],c=e[a+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(d=(15&i)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&d<1114112&&(o=d)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),a+=s}return E(n)}function E(e){var t=e.length;if(t<=$)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=$));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function S(e,t,r){var n="";r=Math.min(e.length,r);for(var a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function T(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var a="",i=t;i<r;++i)a+=L(e[i]);return a}function C(e,t,r){for(var n=e.slice(t,r),a="",i=0;i<n.length;i+=2)a+=String.fromCharCode(n[i]+256*n[i+1]);return a}function B(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,r,n,a,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n){t<0&&(t=65535+t+1);for(var a=0,i=Math.min(e.length-r,2);a<i;++a)e[r+a]=(t&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function P(e,t,r,n){t<0&&(t=4294967295+t+1);for(var a=0,i=Math.min(e.length-r,4);a<i;++a)e[r+a]=t>>>8*(n?a:3-a)&255}function I(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,a){return a||I(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,a){return a||I(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(e,t,r,n,52,8),r+8}function V(e){if(e=U(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function L(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){t=t||1/0;for(var r,n=e.length,a=null,i=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function H(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function G(e,t){for(var r,n,a,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,a=r%256,i.push(a),i.push(n);return i}function X(e){return Q.toByteArray(V(e))}function J(e,t,r,n){for(var a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function W(e){return e!==e}var Q=e("base64-js"),K=e("ieee754"),Z=e("isarray");r.Buffer=i,r.SlowBuffer=v,r.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,r){return o(null,e,t,r)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,r){return l(null,e,t,r)},i.allocUnsafe=function(e){return u(null,e)},i.allocUnsafeSlow=function(e){return u(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,a=0,o=Math.min(r,n);a<o;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},i.isEncoding=function(e){switch(String(e).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}},i.concat=function(e,t){if(!Z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return i.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=i.allocUnsafe(t),a=0;for(r=0;r<e.length;++r){var o=e[r];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,a),a+=o.length}return n},i.byteLength=g,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},i.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},i.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},i.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):m.apply(this,arguments)},i.prototype.equals=function(e){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===i.compare(this,e)},i.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},i.prototype.compare=function(e,t,r,n,a){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,a>>>=0,this===e)return 0;for(var o=a-n,s=r-t,l=Math.min(o,s),u=this.slice(n,a),c=e.slice(t,r),d=0;d<l;++d)if(u[d]!==c[d]){o=u[d],s=c[d];break}return o<s?-1:s<o?1:0},i.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},i.prototype.indexOf=function(e,t,r){return x(this,e,t,r,!0)},i.prototype.lastIndexOf=function(e,t,r){return x(this,e,t,r,!1)},i.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return z(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n;if(i.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=i.prototype;else{var a=t-e;n=new i(a,void 0);for(var o=0;o<a;++o)n[o]=this[o+e]}return n},i.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||B(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return n},i.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||B(e,t,this.length);for(var n=this[e+--t],a=1;t>0&&(a*=256);)n+=this[e+--t]*a;return n},i.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||B(e,t,this.length);for(var n=this[e],a=1,i=0;++i<t&&(a*=256);)n+=this[e+i]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||B(e,t,this.length);for(var n=t,a=1,i=this[e+--n];n>0&&(a*=256);)i+=this[e+--n]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),K.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),K.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),K.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),K.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){q(this,e,t,r,Math.pow(2,8*r)-1,0)}var a=1,i=0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=e/a&255;return t+r},i.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){q(this,e,t,r,Math.pow(2,8*r)-1,0)}var a=r-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):P(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);q(this,e,t,r,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var a=Math.pow(2,8*r-1);q(this,e,t,r,a-1,-a)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):P(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var a,o=n-r;if(this===e&&r<t&&t<n)for(a=o-1;a>=0;--a)e[a+t]=this[a+r];else if(o<1e3||!i.TYPED_ARRAY_SUPPORT)for(a=0;a<o;++a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},i.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var s=i.isBuffer(e)?e:Y(new i(e,n).toString()),l=s.length;for(o=0;o<r-t;++o)this[o+t]=s[o%l]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:11,isarray:4}],4:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],5:[function(e,t,r){"use strict";function n(){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}function a(e){var t=new n;t.pre=e.pre,t.body=e.body,t.post=e.post;var r=e.args.slice(0);t.argTypes=r;for(var a=0;a<r.length;++a){var o=r[a];if("array"===o||"object"==typeof o&&o.blockIndices){if(t.argTypes[a]="array",t.arrayArgs.push(a),t.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),t.shimArgs.push("array"+a),a<t.pre.args.length&&t.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array args");if(a<t.post.args.length&&t.post.args[a].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)t.scalarArgs.push(a),t.shimArgs.push("scalar"+a);else if("index"===o){if(t.indexArgs.push(a),a<t.pre.args.length&&t.pre.args[a].count>0)throw new Error("cwise: pre() block may not reference array index");if(a<t.body.args.length&&t.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array index");if(a<t.post.args.length&&t.post.args[a].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(t.shapeArgs.push(a),a<t.pre.args.length&&t.pre.args[a].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(a<t.body.args.length&&t.body.args[a].lvalue)throw new Error("cwise: body() block may not write to array shape");if(a<t.post.args.length&&t.post.args[a].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 "+r[a]);t.argTypes[a]="offset",t.offsetArgs.push({array:o.array,offset:o.offset}),t.offsetArgIndex.push(a)}}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,i(t)}var i=e("./lib/thunk.js");t.exports=a},{"./lib/thunk.js":7}],6:[function(e,t,r){"use strict";function n(e,t,r){var n,a,i=e.length,o=t.arrayArgs.length,s=t.indexArgs.length>0,l=[],u=[],c=0,d=0;for(n=0;n<i;++n)u.push(["i",n,"=0"].join(""));for(a=0;a<o;++a)for(n=0;n<i;++n)d=c,c=e[n],0===n?u.push(["d",a,"s",n,"=t",a,"p",c].join("")):u.push(["d",a,"s",n,"=(t",a,"p",c,"-s",d,"*t",a,"p",d,")"].join(""));for(u.length>0&&l.push("var "+u.join(",")),n=i-1;n>=0;--n)c=e[n],l.push(["for(i",n,"=0;i",n,"<s",c,";++i",n,"){"].join(""));for(l.push(r),n=0;n<i;++n){for(d=c,c=e[n],a=0;a<o;++a)l.push(["p",a,"+=d",a,"s",n].join(""));s&&(n>0&&l.push(["index[",d,"]-=s",d].join("")),l.push(["++index[",c,"]"].join(""))),l.push("}")}return l.join("\n")}function a(e,t,r,a){for(var i=t.length,o=r.arrayArgs.length,s=r.blockSize,l=r.indexArgs.length>0,u=[],c=0;c<o;++c)u.push(["var offset",c,"=p",c].join(""));for(var c=e;c<i;++c)u.push(["for(var j"+c+"=SS[",t[c],"]|0;j",c,">0;){"].join("")),u.push(["if(j",c,"<",s,"){"].join("")),u.push(["s",t[c],"=j",c].join("")),u.push(["j",c,"=0"].join("")),u.push(["}else{s",t[c],"=",s].join("")),u.push(["j",c,"-=",s,"}"].join("")),l&&u.push(["index[",t[c],"]=j",c].join(""));for(var c=0;c<o;++c){for(var d=["offset"+c],f=e;f<i;++f)d.push(["j",f,"*t",c,"p",t[f]].join(""));u.push(["p",c,"=(",d.join("+"),")"].join(""))}u.push(n(t,r,a));for(var c=e;c<i;++c)u.push("}");return u.join("\n")}function i(e){for(var t=0,r=e[0].length;t<r;){for(var n=1;n<e.length;++n)if(e[n][t]!==e[0][t])return t;++t}return t}function o(e,t,r){for(var n=e.body,a=[],i=[],o=0;o<e.args.length;++o){var s=e.args[o];if(!(s.count<=0)){var l=new RegExp(s.name,"g"),u="",c=t.arrayArgs.indexOf(o);switch(t.argTypes[o]){case"offset":var d=t.offsetArgIndex.indexOf(o);c=t.offsetArgs[d].array,u="+q"+d;case"array":u="p"+c+u;var f="l"+o,p="a"+c;if(0===t.arrayBlockIndices[c])1===s.count?"generic"===r[c]?s.lvalue?(a.push(["var ",f,"=",p,".get(",u,")"].join("")),n=n.replace(l,f),i.push([p,".set(",u,",",f,")"].join(""))):n=n.replace(l,[p,".get(",u,")"].join("")):n=n.replace(l,[p,"[",u,"]"].join("")):"generic"===r[c]?(a.push(["var ",f,"=",p,".get(",u,")"].join("")),n=n.replace(l,f),s.lvalue&&i.push([p,".set(",u,",",f,")"].join(""))):(a.push(["var ",f,"=",p,"[",u,"]"].join("")),n=n.replace(l,f),s.lvalue&&i.push([p,"[",u,"]=",f].join("")));else{for(var h=[s.name],v=[u],g=0;g<Math.abs(t.arrayBlockIndices[c]);g++)h.push("\\s*\\[([^\\]]+)\\]"),v.push("$"+(g+1)+"*t"+c+"b"+g);if(l=new RegExp(h.join(""),"g"),u=v.join("+"),"generic"===r[c])throw new Error("cwise: Generic arrays not supported in combination with blocks!");n=n.replace(l,[p,"[",u,"]"].join(""))}break;case"scalar":n=n.replace(l,"Y"+t.scalarArgs.indexOf(o));break;case"index":n=n.replace(l,"index");break;case"shape":n=n.replace(l,"shape")}}}return[a.join("\n"),n,i.join("\n")].join("\n").trim()}function s(e){for(var t=new Array(e.length),r=!0,n=0;n<e.length;++n){var a=e[n],i=a.match(/\d+/);i=i?i[0]:"",0===a.charAt(0)?t[n]="u"+a.charAt(1)+i:t[n]=a.charAt(0)+i,n>0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}function l(e,t){for(var r=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,l=new Array(e.arrayArgs.length),c=new Array(e.arrayArgs.length),d=0;d<e.arrayArgs.length;++d)c[d]=t[2*d],l[d]=t[2*d+1];for(var f=[],p=[],h=[],v=[],g=[],d=0;d<e.arrayArgs.length;++d){e.arrayBlockIndices[d]<0?(h.push(0),v.push(r),f.push(r),p.push(r+e.arrayBlockIndices[d])):(h.push(e.arrayBlockIndices[d]),v.push(e.arrayBlockIndices[d]+r),f.push(0),p.push(e.arrayBlockIndices[d]));for(var m=[],y=0;y<l[d].length;y++)h[d]<=l[d][y]&&l[d][y]<v[d]&&m.push(l[d][y]-h[d]);g.push(m)}for(var x=["SS"],b=["'use strict'"],w=[],y=0;y<r;++y)w.push(["s",y,"=SS[",y,"]"].join(""));for(var d=0;d<e.arrayArgs.length;++d){x.push("a"+d),x.push("t"+d),x.push("p"+d);for(var y=0;y<r;++y)w.push(["t",d,"p",y,"=t",d,"[",h[d]+y,"]"].join(""));for(var y=0;y<Math.abs(e.arrayBlockIndices[d]);++y)w.push(["t",d,"b",y,"=t",d,"[",f[d]+y,"]"].join(""))}for(var d=0;d<e.scalarArgs.length;++d)x.push("Y"+d);if(e.shapeArgs.length>0&&w.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var _=new Array(r),d=0;d<r;++d)_[d]="0";w.push(["index=[",_.join(","),"]"].join(""))}for(var d=0;d<e.offsetArgs.length;++d){for(var k=e.offsetArgs[d],z=[],y=0;y<k.offset.length;++y)0!==k.offset[y]&&(1===k.offset[y]?z.push(["t",k.array,"p",y].join("")):z.push([k.offset[y],"*t",k.array,"p",y].join("")));0===z.length?w.push("q"+d+"=0"):w.push(["q",d,"=",z.join("+")].join(""))}var A=u([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));w=w.concat(A),w.length>0&&b.push("var "+w.join(","));for(var d=0;d<e.arrayArgs.length;++d)b.push("p"+d+"|=0");e.pre.body.length>3&&b.push(o(e.pre,e,c));var j=o(e.body,e,c),M=i(g);M<r?b.push(a(M,g[0],e,j)):b.push(n(g[0],e,j)),e.post.body.length>3&&b.push(o(e.post,e,c)),e.debug&&console.log("-----Generated cwise routine for ",t,":\n"+b.join("\n")+"\n----------");var O=[e.funcName||"unnamed","_cwise_loop_",l[0].join("s"),"m",M,s(c)].join("");return new Function(["function ",O,"(",x.join(","),"){",b.join("\n"),"} return ",O].join(""))()}var u=e("uniq");t.exports=l},{uniq:27}],7:[function(e,t,r){"use strict";function n(e){var t=["'use strict'","var CACHED={}"],r=[],n=e.funcName+"_cwise_thunk";t.push(["return function ",n,"(",e.shimArgs.join(","),"){"].join(""))
;for(var i=[],o=[],s=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],l=[],u=[],c=0;c<e.arrayArgs.length;++c){var d=e.arrayArgs[c];r.push(["t",d,"=array",d,".dtype,","r",d,"=array",d,".order"].join("")),i.push("t"+d),i.push("r"+d),o.push("t"+d),o.push("r"+d+".join()"),s.push("array"+d+".data"),s.push("array"+d+".stride"),s.push("array"+d+".offset|0"),c>0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+d+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[c]))),u.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+d+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[c])+"]"))}e.arrayArgs.length>1&&(t.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),t.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),t.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}"));for(var c=0;c<e.scalarArgs.length;++c)s.push("scalar"+e.scalarArgs[c]);return r.push(["type=[",o.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",i.join(","),"])}","return proc(",s.join(","),")}"].join("")),e.debug&&console.log("-----Generated thunk:\n"+t.join("\n")+"\n----------"),new Function("compile",t.join("\n"))(a.bind(void 0,e))}var a=e("./compile.js");t.exports=n},{"./compile.js":6}],8:[function(e,t,r){"use strict";function n(e,t,r){var a=0|e[r];if(a<=0)return[];var i,o=new Array(a);if(r===e.length-1)for(i=0;i<a;++i)o[i]=t;else for(i=0;i<a;++i)o[i]=n(e,t,r+1);return o}function a(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function i(e,t){switch(void 0===t&&(t=0),typeof e){case"number":if(e>0)return a(0|e,t);break;case"object":if("number"==typeof e.length)return n(e,t,0)}return[]}t.exports=i},{}],9:[function(e,t,r){t.exports=e("./lib/heap")},{"./lib/heap":10}],10:[function(e,t,r){(function(){var e,n,a,i,o,s,l,u,c,d,f,p,h,v,g;a=Math.floor,d=Math.min,n=function(e,t){return e<t?-1:e>t?1:0},c=function(e,t,r,i,o){var s;if(null==r&&(r=0),null==o&&(o=n),r<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);r<i;)s=a((r+i)/2),o(t,e[s])<0?i=s:r=s+1;return[].splice.apply(e,[r,r-r].concat(t)),t},s=function(e,t,r){return null==r&&(r=n),e.push(t),v(e,0,e.length-1,r)},o=function(e,t){var r,a;return null==t&&(t=n),r=e.pop(),e.length?(a=e[0],e[0]=r,g(e,0,t)):a=r,a},u=function(e,t,r){var a;return null==r&&(r=n),a=e[0],e[0]=t,g(e,0,r),a},l=function(e,t,r){var a;return null==r&&(r=n),e.length&&r(e[0],t)<0&&(a=[e[0],t],t=a[0],e[0]=a[1],g(e,0,r)),t},i=function(e,t){var r,i,o,s,l,u;for(null==t&&(t=n),s=function(){u=[];for(var t=0,r=a(e.length/2);0<=r?t<r:t>r;0<=r?t++:t--)u.push(t);return u}.apply(this).reverse(),l=[],i=0,o=s.length;i<o;i++)r=s[i],l.push(g(e,r,t));return l},h=function(e,t,r){var a;if(null==r&&(r=n),-1!==(a=e.indexOf(t)))return v(e,0,a,r),g(e,a,r)},f=function(e,t,r){var a,o,s,u,c;if(null==r&&(r=n),o=e.slice(0,t),!o.length)return o;for(i(o,r),c=e.slice(t),s=0,u=c.length;s<u;s++)a=c[s],l(o,a,r);return o.sort(r).reverse()},p=function(e,t,r){var a,s,l,u,f,p,h,v,g;if(null==r&&(r=n),10*t<=e.length){if(l=e.slice(0,t).sort(r),!l.length)return l;for(s=l[l.length-1],h=e.slice(t),u=0,p=h.length;u<p;u++)a=h[u],r(a,s)<0&&(c(l,a,0,null,r),l.pop(),s=l[l.length-1]);return l}for(i(e,r),g=[],f=0,v=d(t,e.length);0<=v?f<v:f>v;0<=v?++f:--f)g.push(o(e,r));return g},v=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&(s=r-1>>1,o=e[s],a(i,o)<0);)e[r]=o,r=s;return e[r]=i},g=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a<i;)s=a+1,s<i&&!(r(e[a],e[s])<0)&&(a=s),e[t]=e[a],t=a,a=2*t+1;return e[t]=o,v(e,l,t,r)},e=function(){function e(e){this.cmp=null!=e?e:n,this.nodes=[]}return e.push=s,e.pop=o,e.replace=u,e.pushpop=l,e.heapify=i,e.updateItem=h,e.nlargest=f,e.nsmallest=p,e.prototype.push=function(e){return s(this.nodes,e,this.cmp)},e.prototype.pop=function(){return o(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return-1!==this.nodes.indexOf(e)},e.prototype.replace=function(e){return u(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return l(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return h(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return 0===this.nodes.length},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),function(e,n){"function"==typeof define&&define.amd?define([],n):"object"==typeof r?t.exports=n():e.Heap=n()}(this,function(){return e})}).call(this)},{}],11:[function(e,t,r){r.read=function(e,t,r,n,a){var i,o,s=8*a-n-1,l=(1<<s)-1,u=l>>1,c=-7,d=r?a-1:0,f=r?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+e[t+d],d+=f,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=f,c-=8);if(0===i)i=1-u;else{if(i===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),i-=u}return(p?-1:1)*o*Math.pow(2,i-n)},r.write=function(e,t,r,n,a,i){var o,s,l,u=8*i-a-1,c=(1<<u)-1,d=c>>1,f=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+d>=1?f/l:f*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,a),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,a),o=0));a>=8;e[r+p]=255&s,p+=h,s/=256,a-=8);for(o=o<<a|s,u+=a;u>0;e[r+p]=255&o,p+=h,o/=256,u-=8);e[r+p-h]|=128*v}},{}],12:[function(e,t,r){"use strict";function n(e){var t=(v.nextPow2(e+1)>>>1)-1,r=e-t;return v.nextPow2(r)-1>=t?t:(t>>>1)+r}function a(e){return 0}function i(e){return e-1}function o(e,t){if(e<=0)return 0;var r=n(e);return t>r?o(e-r-1,t-r-1):t===r?v.log2(e):o(r,t)}function s(e,t){return Math.max(t-1,0)}function l(e,t){return Math.min(t+1,e-1)}function u(e,t){if(e<=0)return-1;var r=n(e);if(t>r){var a=u(e-r-1,t-r-1);return a<0?r:a+r+1}if(t===r)return-1;var a=u(r,t);return a<0?r:a}function c(e,t){if(e<=0)return 0;var r=n(e);return t>r?c(e-r-1,t-r-1)+r+1:t===r?n(t):c(r,t)}function d(e,t){if(e<=0)return 0;var r=n(e);return t>r?d(e-r-1,t-r-1)+r+1:t===r?n(e-r-1)+r+1:d(r,t)}function f(e,t){return 0===o(e,t)}function p(e,t){e|=0,t|=0;for(var r=0;e>1;){var a=n(e);if(t>a)r+=a+1,e-=a+1,t-=a+1;else{if(t===a)break;e=a}}return r}function h(e,t){e|=0,t|=0;for(var r=0;e>1;){var a=n(e);if(t>a)r+=a+1,e-=a+1,t-=a+1;else{if(t===a){r+=e-1;break}e=a}}return r}var v=e("bit-twiddle");r.root=n,r.begin=a,r.end=i,r.height=o,r.prev=s,r.next=l,r.parent=u,r.left=c,r.right=d,r.leaf=f,r.lo=p,r.hi=h},{"bit-twiddle":13}],13:[function(e,t,r){arguments[4][2][0].apply(r,arguments)},{dup:2}],14:[function(e,t,r){"use strict";function n(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=r;return t}t.exports=n},{}],15:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function a(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}t.exports=function(e){return null!=e&&(n(e)||a(e)||!!e._isBuffer)}},{}],16:[function(e,t,r){"use strict";function n(e){if(!e)return s;for(var t=0;t<e.args.length;++t){var r=e.args[t];e.args[t]=0===t?{name:r,lvalue:!0,rvalue:!!e.rvalue,count:e.count||1}:{name:r,lvalue:!1,rvalue:!0,count:1}}return e.thisVars||(e.thisVars=[]),e.localVars||(e.localVars=[]),e}function a(e){return o({args:e.args,pre:n(e.pre),body:n(e.body),post:n(e.proc),funcName:e.funcName})}function i(e){for(var t=[],r=0;r<e.args.length;++r)t.push("a"+r);return new Function("P",["return function ",e.funcName,"_ndarrayops(",t.join(","),") {P(",t.join(","),");return a0}"].join(""))(a(e))}var o=e("cwise-compiler"),s={body:"",args:[],thisVars:[],localVars:[]},l={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var e in l){var t=l[e];r[e]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),r[e+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),r[e+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),r[e+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var e in u){var t=u[e];r[e]=i({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),r[e+"eq"]=i({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var e in c){var t=c[e];r[e]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),r[e+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),r[e+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),r[e+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}}();var d=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var e=0;e<d.length;++e){var t=d[e];r[t]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:t}),r[t+"eq"]=i({args:["array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"})}}();var f=["max","min","atan2","pow"];!function(){for(var e=0;e<f.length;++e){var t=f[e];r[t]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t}),r[t+"s"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t+"s"}),r[t+"eq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"seq"})}}();var p=["atan2","pow"];!function(){for(var e=0;e<p.length;++e){var t=p[e];r[t+"op"]=i({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"op"}),r[t+"ops"]=i({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"ops"}),r[t+"opeq"]=i({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opeq"}),r[t+"opseq"]=i({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opseq"})}}(),r.any=o({args:["array"],pre:s,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),r.all=o({args:["array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),r.sum=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),r.prod=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),r.norm2squared=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),r.norm2=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),r.norminf=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=o({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=o({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=o({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.argmin=o({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.argmax=o({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=i({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=i({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=i({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=o({args:["array","array"],pre:s,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":5}],17:[function(e,t,r){"use strict";var n=e("ndarray"),a=e("./doConvert.js");t.exports=function(e,t){for(var r=[],i=e,o=1;Array.isArray(i);)r.push(i.length),o*=i.length,i=i[0];return 0===r.length?n():(t||(t=n(new Float64Array(o),r)),a(t,e),t)}},{"./doConvert.js":18,ndarray:21}],18:[function(e,t,r){t.exports=e("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":5}],19:[function(e,t,r){"use strict";function n(e){var t=e.dtype;"generic"!==t&&"array"!==t||(t="double");var r=d.malloc(e.size,t),n=u(r,e.shape);return c.assign(n,e),n}function a(e,t){t||(t="double");for(var r=1,n=new Array(e.length),a=e.length-1;a>=0;--a)n[a]=r,r*=e[a];return u(d.malloc(r,t),e,n,0)}function i(e){"generic"!==e.dtype&&"array"!==e.dtype&&d.free(e.data)}function o(e,t){t||(t="double");for(var r=1,n=new Array(e.length),a=e.length-1;a>=0;--a)n[a]=r,r*=e[a];for(var i=d.malloc(r,t),a=0;a<r;++a)i[a]=0;return u(i,e,n,0)}function s(e,t){t||(t="double");for(var r=1,n=new Array(e.length),a=e.length-1;a>=0;--a)n[a]=r,r*=e[a];for(var i=d.malloc(r,t),a=0;a<r;++a)i[a]=1;return u(i,e,n,0)}function l(e,t){var r,n;t||(t="double");var a=1,i=new Array(e.length);for(r=e.length-1;r>=0;--r)i[r]=a,a*=e[r];var o=d.malloc(a,t);for(r=0;r<a;++r)o[r]=0;var s=1/0,l=0;for(r=e.length-1;r>=0;r--)l+=i[r],s=Math.min(s,e[r]);for(r=0,n=0;r<s;r++,n+=l)o[n]=1;return u(o,e,i,0)}var u=e("ndarray"),c=e("ndarray-ops"),d=e("typedarray-pool");r.clone=n,r.malloc=a,r.free=i,r.zeros=o,r.ones=s,r.eye=l},{ndarray:21,"ndarray-ops":16,"typedarray-pool":26}],20:[function(e,t,r){"use strict";function n(e){return"s"+e}function a(e){return"t"+e}function i(e){return"u"+e}function o(e){return"v"+e}function s(e){return"i"+e}function l(e){return"p"+e}function u(e){return"x"+e}function c(e){var t=e.slice();return t.splice(e.indexOf(0),1),t.unshift(0),t}function d(e,t,r){function d(t,r){A.push(u(0),"=",y,"+",a(e[0]),"*(",t,");",u(1),"=",y,"+",a(e[0]),"*(",r,");");for(var o=f-1;o>0;--o)A.push("for(",s(e[o]),"=0;",s(e[o]),"<",n(e[o]),";",s(e[o]),"++){");p?A.push(b,"=",m,".get(",u(0),");",m,".set(",u(0),",",m,".get(",u(1),"));",m,".set(",u(1),",",b,");"):A.push(b,"=",m,"[",u(0),"];",m,"[",u(0),"]=",m,"[",u(1),"];",m,"[",u(1),"]=",b,";");for(var o=1;o<f;++o)A.push(u(0),"+=",i(e[o]),";",u(1),"+=",i(e[o]),"}")}e=c(e);var f=e.length,p="generic"===r,z="ndSelect"+r+e.join("_")+"_"+(t?"cmp":"lex"),A=[],j=[h,v];t&&j.push(g);for(var M=[m+"="+h+".data",y+"="+h+".offset|0",x+"=Math.random",b],O=0;O<2;++O)M.push(u(O)+"=0");for(var O=0;O<f;++O)M.push(n(O)+"="+h+".shape["+O+"]|0",a(O)+"="+h+".stride["+O+"]|0",s(O)+"=0");for(var O=1;O<f;++O)O>1?M.push(o(O)+"=("+a(O)+"-"+n(O-1)+"*"+a(O-1)+")|0",i(e[O])+"=("+a(e[O])+"-"+n(e[O-1])+"*"+a(e[O-1])+")|0"):M.push(o(O)+"="+a(O),i(e[O])+"="+a(e[O]));if(t)for(var O=0;O<2;++O)M.push(l(O)+"="+h+".pick(0)");M.push(k+"=0",w+"=0",_+"="+n(e[0])+"-1"),A.push("while(",w,"<",_,"){",k,"=(",x,"()*(",_,"-",w,"+1)+",w,")|0;"),d(k,_),A.push(k,"=",w,";","for(",s(0),"=",w,";",s(0),"<",_,";",s(0),"++){"),function(r,i,c){if(t)A.push(l(0),".offset=",y,"+",a(e[0]),"*(",i,");",l(1),".offset=",y,"+",a(e[0]),"*(",c,");",r,"=",g,"(",l(0),",",l(1),");");else{A.push(u(0),"=",y,"+",a(0),"*(",i,");",u(1),"=",y,"+",a(0),"*(",c,");"),f>1&&A.push("_cmp:");for(var d=f-1;d>0;--d)A.push("for(",s(d),"=0;",s(d),"<",n(d),";",s(d),"++){");p?A.push(r,"=",m,".get(",u(0),")-",m,".get(",u(1),");"):A.push(r,"=",m,"[",u(0),"]-",m,"[",u(1),"];"),f>1&&A.push("if(",r,")break _cmp;");for(var d=1;d<f;++d)A.push(u(0),"+=",o(d),";",u(1),"+=",o(d),"}")}}(b,s(0),_),A.push("if(",b,"<0){"),d(k,s(0)),A.push(k,"++;"),A.push("}}"),d(k,_),A.push("if(",k,"===",v,"){",w,"=",k,";","break;","}else if(",v,"<",k,"){",_,"=",k,"-1;","}else{",w,"=",k,"+1;","}","}"),t?A.push(l(0),".offset=",y,"+",w,"*",a(0),";","return ",l(0),";"):A.push("return ",h,".pick(",w,");");var E=["'use strict';function ",z,"(",j,"){","var ",M.join(),";",A.join(""),"};return ",z].join("");return new Function(E)()}function f(e,t,r){var n=e.join()+t+r,a=z[n];return a||(z[n]=d(e,t,r))}function p(e,t,r){if(t|=0,0===e.dimension||e.shape[0]<=t||t<0)return null;var n=!!r,a=f(e.order,n,e.dtype);return n?a(e,t,r):a(e,t)}t.exports=p,t.exports.compile=f;var h="a",v="K",g="C",m="d",y="o",x="R",b="T",w="L",_="H",k="X",z={}},{}],21:[function(e,t,r){function n(e,t){return e[0]-t[0]}function a(){var e,t=this.stride,r=new Array(t.length);for(e=0;e<r.length;++e)r[e]=[Math.abs(t[e]),e];r.sort(n);var a=new Array(r.length);for(e=0;e<a.length;++e)a[e]=r[e][1];return a}function i(e,t){var r=["View",t,"d",e].join("");t<0&&(r="View_Nil"+e);var n="generic"===e;if(-1===t){var i="function "+r+"(a){this.data=a;};var proto="+r+".prototype;proto.dtype='"+e+"';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 "+r+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+r+"(a){return new "+r+"(a);}",o=new Function(i);return o()}if(0===t){var i="function "+r+"(a,d) {this.data = a;this.offset = d};var proto="+r+".prototype;proto.dtype='"+e+"';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 "+r+"_copy() {return new "+r+"(this.data,this.offset)};proto.pick=function "+r+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+r+"_get(){return "+(n?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+r+"_set(v){return "+(n?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+r+"(a,b,c,d){return new "+r+"(a,d)}",o=new Function("TrivialArray",i);return o(d[e][0])}var i=["'use strict'"],s=l(t),u=s.map(function(e){return"i"+e}),c="this.offset+"+s.map(function(e){return"this.stride["+e+"]*i"+e}).join("+"),f=s.map(function(e){return"b"+e}).join(","),p=s.map(function(e){return"c"+e}).join(",");i.push("function "+r+"(a,"+f+","+p+",d){this.data=a","this.shape=["+f+"]","this.stride=["+p+"]","this.offset=d|0}","var proto="+r+".prototype","proto.dtype='"+e+"'","proto.dimension="+t),i.push("Object.defineProperty(proto,'size',{get:function "+r+"_size(){return "+s.map(function(e){return"this.shape["+e+"]"}).join("*"),"}})"),1===t?i.push("proto.order=[0]"):(i.push("Object.defineProperty(proto,'order',{get:"),t<4?(i.push("function "+r+"_order(){"),2===t?i.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&i.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];}}})")):i.push("ORDER})")),i.push("proto.set=function "+r+"_set("+u.join(",")+",v){"),n?i.push("return this.data.set("+c+",v)}"):i.push("return this.data["+c+"]=v}"),i.push("proto.get=function "+r+"_get("+u.join(",")+"){"),n?i.push("return this.data.get("+c+")}"):i.push("return this.data["+c+"]}"),i.push("proto.index=function "+r+"_index(",u.join(),"){return "+c+"}"),i.push("proto.hi=function "+r+"_hi("+u.join(",")+"){return new "+r+"(this.data,"+s.map(function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")}).join(",")+","+s.map(function(e){return"this.stride["+e+"]"}).join(",")+",this.offset)}");var h=s.map(function(e){return"a"+e+"=this.shape["+e+"]"}),v=s.map(function(e){return"c"+e+"=this.stride["+e+"]"});i.push("proto.lo=function "+r+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+h.join(",")+","+v.join(","));for(var g=0;g<t;++g)i.push("if(typeof i"+g+"==='number'&&i"+g+">=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");i.push("return new "+r+"(this.data,"+s.map(function(e){return"a"+e}).join(",")+","+s.map(function(e){return"c"+e}).join(",")+",b)}"),i.push("proto.step=function "+r+"_step("+u.join(",")+"){var "+s.map(function(e){return"a"+e+"=this.shape["+e+"]"}).join(",")+","+s.map(function(e){return"b"+e+"=this.stride["+e+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var g=0;g<t;++g)i.push("if(typeof i"+g+"==='number'){d=i"+g+"|0;if(d<0){c+=b"+g+"*(a"+g+"-1);a"+g+"=ceil(-a"+g+"/d)}else{a"+g+"=ceil(a"+g+"/d)}b"+g+"*=d}");i.push("return new "+r+"(this.data,"+s.map(function(e){return"a"+e}).join(",")+","+s.map(function(e){return"b"+e}).join(",")+",c)}");for(var m=new Array(t),y=new Array(t),g=0;g<t;++g)m[g]="a[i"+g+"]",y[g]="b[i"+g+"]";i.push("proto.transpose=function "+r+"_transpose("+u+"){"+u.map(function(e,t){return e+"=("+e+"===undefined?"+t+":"+e+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+r+"(this.data,"+m.join(",")+","+y.join(",")+",this.offset)}"),i.push("proto.pick=function "+r+"_pick("+u+"){var a=[],b=[],c=this.offset");for(var g=0;g<t;++g)i.push("if(typeof i"+g+"==='number'&&i"+g+">=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+s.map(function(e){return"shape["+e+"]"}).join(",")+","+s.map(function(e){return"stride["+e+"]"}).join(",")+",offset)}");var o=new Function("CTOR_LIST","ORDER",i.join("\n"));return o(d[e],a)}function o(e){if(u(e))return"buffer";if(c)switch(Object.prototype.toString.call(e)){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(e)?"array":"generic"}function s(e,t,r,n){if(void 0===e){var a=d.array[0];return a([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var s=t.length;if(void 0===r){r=new Array(s);for(var l=s-1,u=1;l>=0;--l)r[l]=u,u*=t[l]}if(void 0===n){n=0;for(var l=0;l<s;++l)r[l]<0&&(n-=(t[l]-1)*r[l])}for(var c=o(e),f=d[c];f.length<=s+1;)f.push(i(c,f.length-1));var a=f[s+1];return a(e,t,r,n)}var l=e("iota-array"),u=e("is-buffer"),c="undefined"!=typeof Float64Array,d={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};t.exports=s},{"iota-array":14,"is-buffer":15}],22:[function(require,module,exports){(function(global){"use strict";var numeric=void 0===exports?function(){}:exports;void 0!==global&&(global.numeric=numeric),numeric.version="1.2.6",numeric.bench=function(e,t){var r,n,a,i;for(void 0===t&&(t=15),a=.5,r=new Date;;){for(a*=2,i=a;i>3;i-=4)e(),e(),e(),e();for(;i>0;)e(),i--;if((n=new Date)-r>t)break}for(i=a;i>3;i-=4)e(),e(),e(),e();for(;i>0;)e(),i--;return n=new Date,1e3*(3*a-1)/(n-r)},numeric._myIndexOf=function(e){var t,r=this.length;for(t=0;t<r;++t)if(this[t]===e)return t;return-1},numeric.myIndexOf=Array.prototype.indexOf?Array.prototype.indexOf:numeric._myIndexOf,numeric.Function=Function,numeric.precision=4,numeric.largeArray=50,numeric.prettyPrint=function(e){function t(e){if(0===e)return"0";if(isNaN(e))return"NaN";if(e<0)return"-"+t(-e);if(isFinite(e)){var r=Math.floor(Math.log(e)/Math.log(10)),n=e/Math.pow(10,r),a=n.toPrecision(numeric.precision);return 10===parseFloat(a)&&(r++,n=1,a=n.toPrecision(numeric.precision)),parseFloat(a).toString()+"e"+r.toString()}return"Infinity"}function r(e){var a;if(void 0===e)return n.push(Array(numeric.precision+8).join(" ")),!1;if("string"==typeof e)return n.push('"'+e+'"'),!1;if("boolean"==typeof e)return n.push(e.toString()),!1;if("number"==typeof e){var i=t(e),o=e.toPrecision(numeric.precision),s=parseFloat(e.toString()).toString(),l=[i,o,s,parseFloat(o).toString(),parseFloat(s).toString()];for(a=1;a<l.length;a++)l[a].length<i.length&&(i=l[a]);return n.push(Array(numeric.precision+8-i.length).join(" ")+i),!1}if(null===e)return n.push("null"),!1;if("function"==typeof e){n.push(e.toString());var u=!1;for(a in e)e.hasOwnProperty(a)&&(u?n.push(",\n"):n.push("\n{"),u=!0,n.push(a),n.push(": \n"),r(e[a]));return u&&n.push("}\n"),!0}if(e instanceof Array){if(e.length>numeric.largeArray)return n.push("...Large Array..."),!0;var u=!1;for(n.push("["),a=0;a<e.length;a++)a>0&&(n.push(","),u&&n.push("\n ")),u=r(e[a]);return n.push("]"),!0}n.push("{");var u=!1;for(a in e)e.hasOwnProperty(a)&&(u&&n.push(",\n"),u=!0,n.push(a),n.push(": \n"),r(e[a]));return n.push("}"),!0}var n=[];return r(e),n.join("")},numeric.parseDate=function(e){function t(e){if("string"==typeof e)return Date.parse(e.replace(/-/g,"/"));if(!(e instanceof Array))throw new Error("parseDate: parameter must be arrays of strings");var r,n=[];for(r=0;r<e.length;r++)n[r]=t(e[r]);return n}return t(e)},numeric.parseFloat=function(e){function t(e){if("string"==typeof e)return parseFloat(e);if(!(e instanceof Array))throw new Error("parseFloat: parameter must be arrays of strings");var r,n=[];for(r=0;r<e.length;r++)n[r]=t(e[r]);return n}return t(e)},numeric.parseCSV=function(e){var t,r,n=e.split("\n"),a=[],i=/(([^'",]*)|('[^']*')|("[^"]*")),/g,o=/^\s*(([+-]?[0-9]+(\.[0-9]*)?(e[+-]?[0-9]+)?)|([+-]?[0-9]*(\.[0-9]+)?(e[+-]?[0-9]+)?))\s*$/,s=0;for(r=0;r<n.length;r++){var l,u=(n[r]+",").match(i);if(u.length>0){for(a[s]=[],t=0;t<u.length;t++)l=function(e){return e.substr(0,e.length-1)}(u[t]),o.test(l)?a[s][t]=parseFloat(l):a[s][t]=l;s++}}return a},numeric.toCSV=function(e){var t,r,n,a,i,o=numeric.dim(e);for(n=o[0],o[1],i=[],t=0;t<n;t++){for(a=[],r=0;r<n;r++)a[r]=e[t][r].toString();i[t]=a.join(", ")}return i.join("\n")+"\n"},numeric.getURL=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(),t},numeric.imageURL=function(e){function t(e,t,r){void 0===t&&(t=0),void 0===r&&(r=e.length)
;var n,a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],i=-1,o=0;e.length;for(n=t;n<r;n++)o=255&(i^e[n]),i=i>>>8^a[o];return-1^i}var r,n,a,i,o,s,l,u,c,d,f=e[0].length,p=e[0][0].length,h=[137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,p>>24&255,p>>16&255,p>>8&255,255&p,f>>24&255,f>>16&255,f>>8&255,255&f,8,2,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,73,68,65,84,8,29];for(d=t(h,12,29),h[29]=d>>24&255,h[30]=d>>16&255,h[31]=d>>8&255,h[32]=255&d,r=1,n=0,l=0;l<f;l++){for(l<f-1?h.push(0):h.push(1),o=3*p+1+(0===l)&255,s=3*p+1+(0===l)>>8&255,h.push(o),h.push(s),h.push(255&~o),h.push(255&~s),0===l&&h.push(0),u=0;u<p;u++)for(a=0;a<3;a++)o=e[a][l][u],o=o>255?255:o<0?0:Math.round(o),r=(r+o)%65521,n=(n+r)%65521,h.push(o);h.push(0)}return c=(n<<16)+r,h.push(c>>24&255),h.push(c>>16&255),h.push(c>>8&255),h.push(255&c),i=h.length-41,h[33]=i>>24&255,h[34]=i>>16&255,h[35]=i>>8&255,h[36]=255&i,d=t(h,37),h.push(d>>24&255),h.push(d>>16&255),h.push(d>>8&255),h.push(255&d),h.push(0),h.push(0),h.push(0),h.push(0),h.push(73),h.push(69),h.push(78),h.push(68),h.push(174),h.push(66),h.push(96),h.push(130),"data:image/png;base64,"+function(e){var t,r,n,a,i,o,s,l,u=e.length,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="";for(t=0;t<u;t+=3)r=e[t],n=e[t+1],a=e[t+2],i=r>>2,o=((3&r)<<4)+(n>>4),s=((15&n)<<2)+(a>>6),l=63&a,t+1>=u?s=l=64:t+2>=u&&(l=64),d+=c.charAt(i)+c.charAt(o)+c.charAt(s)+c.charAt(l);return d}(h)},numeric._dim=function(e){for(var t=[];"object"==typeof e;)t.push(e.length),e=e[0];return t},numeric.dim=function(e){var t,r;return"object"==typeof e?(t=e[0],"object"==typeof t?(r=t[0],"object"==typeof r?numeric._dim(e):[e.length,t.length]):[e.length]):[]},numeric.mapreduce=function(e,t){return Function("x","accum","_s","_k",'if(typeof accum === "undefined") accum = '+t+';\nif(typeof x === "number") { var xi = x; '+e+'; return accum; }\nif(typeof _s === "undefined") _s = numeric.dim(x);\nif(typeof _k === "undefined") _k = 0;\nvar _n = _s[_k];\nvar i,xi;\nif(_k < _s.length-1) {\n for(i=_n-1;i>=0;i--) {\n accum = arguments.callee(x[i],accum,_s,_k+1);\n } return accum;\n}\nfor(i=_n-1;i>=1;i-=2) { \n xi = x[i];\n '+e+";\n xi = x[i-1];\n "+e+";\n}\nif(i === 0) {\n xi = x[i];\n "+e+"\n}\nreturn accum;")},numeric.mapreduce2=function(e,t){return Function("x","var n = x.length;\nvar i,xi;\n"+t+";\nfor(i=n-1;i!==-1;--i) { \n xi = x[i];\n "+e+";\n}\nreturn accum;")},numeric.same=function e(t,r){var n,a;if(!(t instanceof Array&&r instanceof Array))return!1;if((a=t.length)!==r.length)return!1;for(n=0;n<a;n++)if(t[n]!==r[n]){if("object"!=typeof t[n])return!1;if(!e(t[n],r[n]))return!1}return!0},numeric.rep=function(e,t,r){void 0===r&&(r=0);var n,a=e[r],i=Array(a);if(r===e.length-1){for(n=a-2;n>=0;n-=2)i[n+1]=t,i[n]=t;return-1===n&&(i[0]=t),i}for(n=a-1;n>=0;n--)i[n]=numeric.rep(e,t,r+1);return i},numeric.dotMMsmall=function(e,t){var r,n,a,i,o,s,l,u,c,d,f;for(i=e.length,o=t.length,s=t[0].length,l=Array(i),r=i-1;r>=0;r--){for(u=Array(s),c=e[r],a=s-1;a>=0;a--){for(d=c[o-1]*t[o-1][a],n=o-2;n>=1;n-=2)f=n-1,d+=c[n]*t[n][a]+c[f]*t[f][a];0===n&&(d+=c[0]*t[0][a]),u[a]=d}l[r]=u}return l},numeric._getCol=function(e,t,r){var n,a=e.length;for(n=a-1;n>0;--n)r[n]=e[n][t],--n,r[n]=e[n][t];0===n&&(r[0]=e[0][t])},numeric.dotMMbig=function(e,t){var r,n,a,i=numeric._getCol,o=t.length,s=Array(o),l=e.length,u=t[0].length,c=new Array(l),d=numeric.dotVV;for(--o,--l,n=l;-1!==n;--n)c[n]=Array(u);for(--u,n=u;-1!==n;--n)for(i(t,n,s),a=l;-1!==a;--a)0,r=e[a],c[a][n]=d(r,s);return c},numeric.dotMV=function(e,t){var r,n=e.length,a=(t.length,Array(n)),i=numeric.dotVV;for(r=n-1;r>=0;r--)a[r]=i(e[r],t);return a},numeric.dotVM=function(e,t){var r,n,a,i,o,s,l;for(a=e.length,i=t[0].length,o=Array(i),n=i-1;n>=0;n--){for(s=e[a-1]*t[a-1][n],r=a-2;r>=1;r-=2)l=r-1,s+=e[r]*t[r][n]+e[l]*t[l][n];0===r&&(s+=e[0]*t[0][n]),o[n]=s}return o},numeric.dotVV=function(e,t){var r,n,a=e.length,i=e[a-1]*t[a-1];for(r=a-2;r>=1;r-=2)n=r-1,i+=e[r]*t[r]+e[n]*t[n];return 0===r&&(i+=e[0]*t[0]),i},numeric.dot=function(e,t){var r=numeric.dim;switch(1e3*r(e).length+r(t).length){case 2002:return t.length<10?numeric.dotMMsmall(e,t):numeric.dotMMbig(e,t);case 2001:return numeric.dotMV(e,t);case 1002:return numeric.dotVM(e,t);case 1001:return numeric.dotVV(e,t);case 1e3:return numeric.mulVS(e,t);case 1:return numeric.mulSV(e,t);case 0:return e*t;default:throw new Error("numeric.dot only works on vectors and matrices")}},numeric.diag=function(e){var t,r,n,a,i=e.length,o=Array(i);for(t=i-1;t>=0;t--){for(a=Array(i),r=t+2,n=i-1;n>=r;n-=2)a[n]=0,a[n-1]=0;for(n>t&&(a[n]=0),a[t]=e[t],n=t-1;n>=1;n-=2)a[n]=0,a[n-1]=0;0===n&&(a[0]=0),o[t]=a}return o},numeric.getDiag=function(e){var t,r=Math.min(e.length,e[0].length),n=Array(r);for(t=r-1;t>=1;--t)n[t]=e[t][t],--t,n[t]=e[t][t];return 0===t&&(n[0]=e[0][0]),n},numeric.identity=function(e){return numeric.diag(numeric.rep([e],1))},numeric.pointwise=function(e,t,r){void 0===r&&(r="");var n,a,i=[],o=/\[i\]$/,s="",l=!1;for(n=0;n<e.length;n++)o.test(e[n])?(a=e[n].substring(0,e[n].length-3),s=a):a=e[n],"ret"===a&&(l=!0),i.push(a);return i[e.length]="_s",i[e.length+1]="_k",i[e.length+2]='if(typeof _s === "undefined") _s = numeric.dim('+s+');\nif(typeof _k === "undefined") _k = 0;\nvar _n = _s[_k];\nvar i'+(l?"":", ret = Array(_n)")+";\nif(_k < _s.length-1) {\n for(i=_n-1;i>=0;i--) ret[i] = arguments.callee("+e.join(",")+",_s,_k+1);\n return ret;\n}\n"+r+"\nfor(i=_n-1;i!==-1;--i) {\n "+t+"\n}\nreturn ret;",Function.apply(null,i)},numeric.pointwise2=function(e,t,r){void 0===r&&(r="");var n,a,i=[],o=/\[i\]$/,s="",l=!1;for(n=0;n<e.length;n++)o.test(e[n])?(a=e[n].substring(0,e[n].length-3),s=a):a=e[n],"ret"===a&&(l=!0),i.push(a);return i[e.length]="var _n = "+s+".length;\nvar i"+(l?"":", ret = Array(_n)")+";\n"+r+"\nfor(i=_n-1;i!==-1;--i) {\n"+t+"\n}\nreturn ret;",Function.apply(null,i)},numeric._biforeach=function e(t,r,n,a,i){if(a===n.length-1)return void i(t,r);var o,s=n[a];for(o=s-1;o>=0;o--)e("object"==typeof t?t[o]:t,"object"==typeof r?r[o]:r,n,a+1,i)},numeric._biforeach2=function e(t,r,n,a,i){if(a===n.length-1)return i(t,r);var o,s=n[a],l=Array(s);for(o=s-1;o>=0;--o)l[o]=e("object"==typeof t?t[o]:t,"object"==typeof r?r[o]:r,n,a+1,i);return l},numeric._foreach=function e(t,r,n,a){if(n===r.length-1)return void a(t);var i,o=r[n];for(i=o-1;i>=0;i--)e(t[i],r,n+1,a)},numeric._foreach2=function e(t,r,n,a){if(n===r.length-1)return a(t);var i,o=r[n],s=Array(o);for(i=o-1;i>=0;i--)s[i]=e(t[i],r,n+1,a);return s},numeric.ops2={add:"+",sub:"-",mul:"*",div:"/",mod:"%",and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">=",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"},numeric.opseq={addeq:"+=",subeq:"-=",muleq:"*=",diveq:"/=",modeq:"%=",lshifteq:"<<=",rshifteq:">>=",rrshifteq:">>>=",bandeq:"&=",boreq:"|=",bxoreq:"^="},numeric.mathfuns=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan","isNaN","isFinite"],numeric.mathfuns2=["atan2","pow","max","min"],numeric.ops1={neg:"-",not:"!",bnot:"~",clone:""},numeric.mapreducers={any:["if(xi) return true;","var accum = false;"],all:["if(!xi) return false;","var accum = true;"],sum:["accum += xi;","var accum = 0;"],prod:["accum *= xi;","var accum = 1;"],norm2Squared:["accum += xi*xi;","var accum = 0;"],norminf:["accum = max(accum,abs(xi));","var accum = 0, max = Math.max, abs = Math.abs;"],norm1:["accum += abs(xi)","var accum = 0, abs = Math.abs;"],sup:["accum = max(accum,xi);","var accum = -Infinity, max = Math.max;"],inf:["accum = min(accum,xi);","var accum = Infinity, min = Math.min;"]},function(){var e,t;for(e=0;e<numeric.mathfuns2.length;++e)t=numeric.mathfuns2[e],numeric.ops2[t]=t;for(e in numeric.ops2)if(numeric.ops2.hasOwnProperty(e)){t=numeric.ops2[e];var r,n,a="";-1!==numeric.myIndexOf.call(numeric.mathfuns2,e)?(a="var "+t+" = Math."+t+";\n",r=function(e,r,n){return e+" = "+t+"("+r+","+n+")"},n=function(e,r){return e+" = "+t+"("+e+","+r+")"}):(r=function(e,r,n){return e+" = "+r+" "+t+" "+n},n=numeric.opseq.hasOwnProperty(e+"eq")?function(e,r){return e+" "+t+"= "+r}:function(e,r){return e+" = "+e+" "+t+" "+r}),numeric[e+"VV"]=numeric.pointwise2(["x[i]","y[i]"],r("ret[i]","x[i]","y[i]"),a),numeric[e+"SV"]=numeric.pointwise2(["x","y[i]"],r("ret[i]","x","y[i]"),a),numeric[e+"VS"]=numeric.pointwise2(["x[i]","y"],r("ret[i]","x[i]","y"),a),numeric[e]=Function("var n = arguments.length, i, x = arguments[0], y;\nvar VV = numeric."+e+"VV, VS = numeric."+e+"VS, SV = numeric."+e+'SV;\nvar dim = numeric.dim;\nfor(i=1;i!==n;++i) { \n y = arguments[i];\n if(typeof x === "object") {\n if(typeof y === "object") x = numeric._biforeach2(x,y,dim(x),0,VV);\n else x = numeric._biforeach2(x,y,dim(x),0,VS);\n } else if(typeof y === "object") x = numeric._biforeach2(x,y,dim(y),0,SV);\n else '+n("x","y")+"\n}\nreturn x;\n"),numeric[t]=numeric[e],numeric[e+"eqV"]=numeric.pointwise2(["ret[i]","x[i]"],n("ret[i]","x[i]"),a),numeric[e+"eqS"]=numeric.pointwise2(["ret[i]","x"],n("ret[i]","x"),a),numeric[e+"eq"]=Function("var n = arguments.length, i, x = arguments[0], y;\nvar V = numeric."+e+"eqV, S = numeric."+e+'eqS\nvar s = numeric.dim(x);\nfor(i=1;i!==n;++i) { \n y = arguments[i];\n if(typeof y === "object") numeric._biforeach(x,y,s,0,V);\n else numeric._biforeach(x,y,s,0,S);\n}\nreturn x;\n')}for(e=0;e<numeric.mathfuns2.length;++e)t=numeric.mathfuns2[e],delete numeric.ops2[t];for(e=0;e<numeric.mathfuns.length;++e)t=numeric.mathfuns[e],numeric.ops1[t]=t;for(e in numeric.ops1)numeric.ops1.hasOwnProperty(e)&&(a="",t=numeric.ops1[e],-1!==numeric.myIndexOf.call(numeric.mathfuns,e)&&Math.hasOwnProperty(t)&&(a="var "+t+" = Math."+t+";\n"),numeric[e+"eqV"]=numeric.pointwise2(["ret[i]"],"ret[i] = "+t+"(ret[i]);",a),numeric[e+"eq"]=Function("x",'if(typeof x !== "object") return '+t+"x\nvar i;\nvar V = numeric."+e+"eqV;\nvar s = numeric.dim(x);\nnumeric._foreach(x,s,0,V);\nreturn x;\n"),numeric[e+"V"]=numeric.pointwise2(["x[i]"],"ret[i] = "+t+"(x[i]);",a),numeric[e]=Function("x",'if(typeof x !== "object") return '+t+"(x)\nvar i;\nvar V = numeric."+e+"V;\nvar s = numeric.dim(x);\nreturn numeric._foreach2(x,s,0,V);\n"));for(e=0;e<numeric.mathfuns.length;++e)t=numeric.mathfuns[e],delete numeric.ops1[t];for(e in numeric.mapreducers)numeric.mapreducers.hasOwnProperty(e)&&(t=numeric.mapreducers[e],numeric[e+"V"]=numeric.mapreduce2(t[0],t[1]),numeric[e]=Function("x","s","k",t[1]+'if(typeof x !== "object") { xi = x;\n'+t[0]+';\n return accum;\n}if(typeof s === "undefined") s = numeric.dim(x);\nif(typeof k === "undefined") k = 0;\nif(k === s.length-1) return numeric.'+e+"V(x);\nvar xi;\nvar n = x.length, i;\nfor(i=n-1;i!==-1;--i) {\n xi = arguments.callee(x[i]);\n"+t[0]+";\n}\nreturn accum;\n"))}(),numeric.truncVV=numeric.pointwise(["x[i]","y[i]"],"ret[i] = round(x[i]/y[i])*y[i];","var round = Math.round;"),numeric.truncVS=numeric.pointwise(["x[i]","y"],"ret[i] = round(x[i]/y)*y;","var round = Math.round;"),numeric.truncSV=numeric.pointwise(["x","y[i]"],"ret[i] = round(x/y[i])*y[i];","var round = Math.round;"),numeric.trunc=function(e,t){return"object"==typeof e?"object"==typeof t?numeric.truncVV(e,t):numeric.truncVS(e,t):"object"==typeof t?numeric.truncSV(e,t):Math.round(e/t)*t},numeric.inv=function(e){var t,r,n,a,i,o,s,e,l=numeric.dim(e),u=Math.abs,c=l[0],d=l[1],f=numeric.clone(e),p=numeric.identity(c);for(o=0;o<d;++o){var h=-1,v=-1;for(i=o;i!==c;++i)(s=u(f[i][o]))>v&&(h=i,v=s);for(r=f[h],f[h]=f[o],f[o]=r,a=p[h],p[h]=p[o],p[o]=a,e=r[o],s=o;s!==d;++s)r[s]/=e;for(s=d-1;-1!==s;--s)a[s]/=e;for(i=c-1;-1!==i;--i)if(i!==o){for(t=f[i],n=p[i],e=t[o],s=o+1;s!==d;++s)t[s]-=r[s]*e;for(s=d-1;s>0;--s)n[s]-=a[s]*e,--s,n[s]-=a[s]*e;0===s&&(n[0]-=a[0]*e)}}return p},numeric.det=function(e){var t=numeric.dim(e);if(2!==t.length||t[0]!==t[1])throw new Error("numeric: det() only works on square matrices");var r,n,a,i,o,s,l,u,c=t[0],d=1,f=numeric.clone(e);for(n=0;n<c-1;n++){for(a=n,r=n+1;r<c;r++)Math.abs(f[r][n])>Math.abs(f[a][n])&&(a=r);for(a!==n&&(l=f[a],f[a]=f[n],f[n]=l,d*=-1),i=f[n],r=n+1;r<c;r++){for(o=f[r],s=o[n]/i[n],a=n+1;a<c-1;a+=2)u=a+1,o[a]-=i[a]*s,o[u]-=i[u]*s;a!==c&&(o[a]-=i[a]*s)}if(0===i[n])return 0;d*=i[n]}return d*f[n][n]},numeric.transpose=function(e){var t,r,n,a,i,o=e.length,s=e[0].length,l=Array(s);for(r=0;r<s;r++)l[r]=Array(o);for(t=o-1;t>=1;t-=2){for(a=e[t],n=e[t-1],r=s-1;r>=1;--r)i=l[r],i[t]=a[r],i[t-1]=n[r],--r,i=l[r],i[t]=a[r],i[t-1]=n[r];0===r&&(i=l[0],i[t]=a[0],i[t-1]=n[0])}if(0===t){for(n=e[0],r=s-1;r>=1;--r)l[r][0]=n[r],--r,l[r][0]=n[r];0===r&&(l[0][0]=n[0])}return l},numeric.negtranspose=function(e){var t,r,n,a,i,o=e.length,s=e[0].length,l=Array(s);for(r=0;r<s;r++)l[r]=Array(o);for(t=o-1;t>=1;t-=2){for(a=e[t],n=e[t-1],r=s-1;r>=1;--r)i=l[r],i[t]=-a[r],i[t-1]=-n[r],--r,i=l[r],i[t]=-a[r],i[t-1]=-n[r];0===r&&(i=l[0],i[t]=-a[0],i[t-1]=-n[0])}if(0===t){for(n=e[0],r=s-1;r>=1;--r)l[r][0]=-n[r],--r,l[r][0]=-n[r];0===r&&(l[0][0]=-n[0])}return l},numeric._random=function e(t,r){var n,a,i=t[r],o=Array(i);if(r===t.length-1){for(a=Math.random,n=i-1;n>=1;n-=2)o[n]=a(),o[n-1]=a();return 0===n&&(o[0]=a()),o}for(n=i-1;n>=0;n--)o[n]=e(t,r+1);return o},numeric.random=function(e){return numeric._random(e,0)},numeric.norm2=function(e){return Math.sqrt(numeric.norm2Squared(e))},numeric.linspace=function(e,t,r){if(void 0===r&&(r=Math.max(Math.round(t-e)+1,1)),r<2)return 1===r?[e]:[];var n,a=Array(r);for(r--,n=r;n>=0;n--)a[n]=(n*t+(r-n)*e)/r;return a},numeric.getBlock=function(e,t,r){function n(e,i){var o,s=t[i],l=r[i]-s,u=Array(l);if(i===a.length-1){for(o=l;o>=0;o--)u[o]=e[o+s];return u}for(o=l;o>=0;o--)u[o]=n(e[o+s],i+1);return u}var a=numeric.dim(e);return n(e,0)},numeric.setBlock=function(e,t,r,n){function a(e,n,o){var s,l=t[o],u=r[o]-l;if(o===i.length-1)for(s=u;s>=0;s--)e[s+l]=n[s];for(s=u;s>=0;s--)a(e[s+l],n[s],o+1)}var i=numeric.dim(e);return a(e,n,0),e},numeric.getRange=function(e,t,r){var n,a,i,o,s=t.length,l=r.length,u=Array(s);for(n=s-1;-1!==n;--n)for(u[n]=Array(l),i=u[n],o=e[t[n]],a=l-1;-1!==a;--a)i[a]=o[r[a]];return u},numeric.blockMatrix=function(e){var t=numeric.dim(e);if(t.length<4)return numeric.blockMatrix([e]);var r,n,a,i,o,s=t[0],l=t[1];for(r=0,n=0,a=0;a<s;++a)r+=e[a][0].length;for(i=0;i<l;++i)n+=e[0][i][0].length;var u=Array(r);for(a=0;a<r;++a)u[a]=Array(n);var c,d,f,p,h,v=0;for(a=0;a<s;++a){for(c=n,i=l-1;-1!==i;--i)for(o=e[a][i],c-=o[0].length,f=o.length-1;-1!==f;--f)for(h=o[f],d=u[v+f],p=h.length-1;-1!==p;--p)d[c+p]=h[p];v+=e[a][0].length}return u},numeric.tensor=function(e,t){if("number"==typeof e||"number"==typeof t)return numeric.mul(e,t);var r=numeric.dim(e),n=numeric.dim(t);if(1!==r.length||1!==n.length)throw new Error("numeric: tensor product is only defined for vectors");var a,i,o,s,l=r[0],u=n[0],c=Array(l);for(i=l-1;i>=0;i--){for(a=Array(u),s=e[i],o=u-1;o>=3;--o)a[o]=s*t[o],--o,a[o]=s*t[o],--o,a[o]=s*t[o],--o,a[o]=s*t[o];for(;o>=0;)a[o]=s*t[o],--o;c[i]=a}return c},numeric.T=function(e,t){this.x=e,this.y=t},numeric.t=function(e,t){return new numeric.T(e,t)},numeric.Tbinop=function(e,t,r,n,a){numeric.indexOf;if("string"!=typeof a){var i;a="";for(i in numeric)numeric.hasOwnProperty(i)&&(e.indexOf(i)>=0||t.indexOf(i)>=0||r.indexOf(i)>=0||n.indexOf(i)>=0)&&i.length>1&&(a+="var "+i+" = numeric."+i+";\n")}return Function(["y"],"var x = this;\nif(!(y instanceof numeric.T)) { y = new numeric.T(y); }\n"+a+"\nif(x.y) { if(y.y) { return new numeric.T("+n+");\n }\n return new numeric.T("+r+");\n}\nif(y.y) {\n return new numeric.T("+t+");\n}\nreturn new numeric.T("+e+");\n")},numeric.T.prototype.add=numeric.Tbinop("add(x.x,y.x)","add(x.x,y.x),y.y","add(x.x,y.x),x.y","add(x.x,y.x),add(x.y,y.y)"),numeric.T.prototype.sub=numeric.Tbinop("sub(x.x,y.x)","sub(x.x,y.x),neg(y.y)","sub(x.x,y.x),x.y","sub(x.x,y.x),sub(x.y,y.y)"),numeric.T.prototype.mul=numeric.Tbinop("mul(x.x,y.x)","mul(x.x,y.x),mul(x.x,y.y)","mul(x.x,y.x),mul(x.y,y.x)","sub(mul(x.x,y.x),mul(x.y,y.y)),add(mul(x.x,y.y),mul(x.y,y.x))"),numeric.T.prototype.reciprocal=function(){var e=numeric.mul,t=numeric.div;if(this.y){var r=numeric.add(e(this.x,this.x),e(this.y,this.y));return new numeric.T(t(this.x,r),t(numeric.neg(this.y),r))}return new T(t(1,this.x))},numeric.T.prototype.div=function(e){if(e instanceof numeric.T||(e=new numeric.T(e)),e.y)return this.mul(e.reciprocal());var t=numeric.div;return this.y?new numeric.T(t(this.x,e.x),t(this.y,e.x)):new numeric.T(t(this.x,e.x))},numeric.T.prototype.dot=numeric.Tbinop("dot(x.x,y.x)","dot(x.x,y.x),dot(x.x,y.y)","dot(x.x,y.x),dot(x.y,y.x)","sub(dot(x.x,y.x),dot(x.y,y.y)),add(dot(x.x,y.y),dot(x.y,y.x))"),numeric.T.prototype.transpose=function(){var e=numeric.transpose,t=this.x,r=this.y;return r?new numeric.T(e(t),e(r)):new numeric.T(e(t))},numeric.T.prototype.transjugate=function(){var e=numeric.transpose,t=this.x,r=this.y;return r?new numeric.T(e(t),numeric.negtranspose(r)):new numeric.T(e(t))},numeric.Tunop=function(e,t,r){return"string"!=typeof r&&(r=""),Function("var x = this;\n"+r+"\nif(x.y) { "+t+";\n}\n"+e+";\n")},numeric.T.prototype.exp=numeric.Tunop("return new numeric.T(ex)","return new numeric.T(mul(cos(x.y),ex),mul(sin(x.y),ex))","var ex = numeric.exp(x.x), cos = numeric.cos, sin = numeric.sin, mul = numeric.mul;"),numeric.T.prototype.conj=numeric.Tunop("return new numeric.T(x.x);","return new numeric.T(x.x,numeric.neg(x.y));"),numeric.T.prototype.neg=numeric.Tunop("return new numeric.T(neg(x.x));","return new numeric.T(neg(x.x),neg(x.y));","var neg = numeric.neg;"),numeric.T.prototype.sin=numeric.Tunop("return new numeric.T(numeric.sin(x.x))","return x.exp().sub(x.neg().exp()).div(new numeric.T(0,2));"),numeric.T.prototype.cos=numeric.Tunop("return new numeric.T(numeric.cos(x.x))","return x.exp().add(x.neg().exp()).div(2);"),numeric.T.prototype.abs=numeric.Tunop("return new numeric.T(numeric.abs(x.x));","return new numeric.T(numeric.sqrt(numeric.add(mul(x.x,x.x),mul(x.y,x.y))));","var mul = numeric.mul;"),numeric.T.prototype.log=numeric.Tunop("return new numeric.T(numeric.log(x.x));","var theta = new numeric.T(numeric.atan2(x.y,x.x)), r = x.abs();\nreturn new numeric.T(numeric.log(r.x),theta.x);"),numeric.T.prototype.norm2=numeric.Tunop("return numeric.norm2(x.x);","var f = numeric.norm2Squared;\nreturn Math.sqrt(f(x.x)+f(x.y));"),numeric.T.prototype.inv=function(){var e=this;if(void 0===e.y)return new numeric.T(numeric.inv(e.x));var t,r,n,a,i,o,s,l,u,c,d,t,r,n,f,p,h,v,g,m,y,x=e.x.length,b=numeric.identity(x),w=numeric.rep([x,x],0),_=numeric.clone(e.x),k=numeric.clone(e.y);for(t=0;t<x;t++){for(h=_[t][t],v=k[t][t],f=h*h+v*v,n=t,r=t+1;r<x;r++)h=_[r][t],v=k[r][t],(p=h*h+v*v)>f&&(n=r,f=p);for(n!==t&&(y=_[t],_[t]=_[n],_[n]=y,y=k[t],k[t]=k[n],k[n]=y,y=b[t],b[t]=b[n],b[n]=y,y=w[t],w[t]=w[n],w[n]=y),a=_[t],i=k[t],l=b[t],u=w[t],h=a[t],v=i[t],r=t+1;r<x;r++)g=a[r],m=i[r],a[r]=(g*h+m*v)/f,i[r]=(m*h-g*v)/f;for(r=0;r<x;r++)g=l[r],m=u[r],l[r]=(g*h+m*v)/f,u[r]=(m*h-g*v)/f;for(r=t+1;r<x;r++){for(o=_[r],s=k[r],c=b[r],d=w[r],h=o[t],v=s[t],n=t+1;n<x;n++)g=a[n],m=i[n],o[n]-=g*h-m*v,s[n]-=m*h+g*v;for(n=0;n<x;n++)g=l[n],m=u[n],c[n]-=g*h-m*v,d[n]-=m*h+g*v}}for(t=x-1;t>0;t--)for(l=b[t],u=w[t],r=t-1;r>=0;r--)for(c=b[r],d=w[r],h=_[r][t],v=k[r][t],n=x-1;n>=0;n--)g=l[n],m=u[n],c[n]-=h*g-v*m,d[n]-=h*m+v*g;return new numeric.T(b,w)},numeric.T.prototype.get=function(e){var t,r=this.x,n=this.y,a=0,i=e.length;if(n){for(;a<i;)t=e[a],r=r[t],n=n[t],a++;return new numeric.T(r,n)}for(;a<i;)t=e[a],r=r[t],a++;return new numeric.T(r)},numeric.T.prototype.set=function(e,t){var r,n=this.x,a=this.y,i=0,o=e.length,s=t.x,l=t.y;if(0===o)return l?this.y=l:a&&(this.y=void 0),this.x=n,this;if(l){for(a||(a=numeric.rep(numeric.dim(n),0),this.y=a);i<o-1;)r=e[i],n=n[r],a=a[r],i++;return r=e[i],n[r]=s,a[r]=l,this}if(a){for(;i<o-1;)r=e[i],n=n[r],a=a[r],i++;return r=e[i],n[r]=s,s instanceof Array?a[r]=numeric.rep(numeric.dim(s),0):a[r]=0,this}for(;i<o-1;)r=e[i],n=n[r],i++;return r=e[i],n[r]=s,this},numeric.T.prototype.getRows=function(e,t){var r,n,a=t-e+1,i=Array(a),o=this.x,s=this.y;for(r=e;r<=t;r++)i[r-e]=o[r];if(s){for(n=Array(a),r=e;r<=t;r++)n[r-e]=s[r];return new numeric.T(i,n)}return new numeric.T(i)},numeric.T.prototype.setRows=function(e,t,r){var n,a=this.x,i=this.y,o=r.x,s=r.y;for(n=e;n<=t;n++)a[n]=o[n-e];if(s)for(i||(i=numeric.rep(numeric.dim(a),0),this.y=i),n=e;n<=t;n++)i[n]=s[n-e];else if(i)for(n=e;n<=t;n++)i[n]=numeric.rep([o[n-e].length],0);return this},numeric.T.prototype.getRow=function(e){var t=this.x,r=this.y;return r?new numeric.T(t[e],r[e]):new numeric.T(t[e])},numeric.T.prototype.setRow=function(e,t){var r=this.x,n=this.y,a=t.x,i=t.y;return r[e]=a,i?(n||(n=numeric.rep(numeric.dim(r),0),this.y=n),n[e]=i):n&&(n=numeric.rep([a.length],0)),this},numeric.T.prototype.getBlock=function(e,t){var r=this.x,n=this.y,a=numeric.getBlock;return n?new numeric.T(a(r,e,t),a(n,e,t)):new numeric.T(a(r,e,t))},numeric.T.prototype.setBlock=function(e,t,r){r instanceof numeric.T||(r=new numeric.T(r));var n=this.x,a=this.y,i=numeric.setBlock,o=r.x,s=r.y;if(s)return a||(this.y=numeric.rep(numeric.dim(this),0),a=this.y),i(n,e,t,o),i(a,e,t,s),this;i(n,e,t,o),a&&i(a,e,t,numeric.rep(numeric.dim(o),0))},numeric.T.rep=function(e,t){var r=numeric.T;t instanceof r||(t=new r(t));var n=t.x,a=t.y,i=numeric.rep;return a?new r(i(e,n),i(e,a)):new r(i(e,n))},numeric.T.diag=function(e){e instanceof numeric.T||(e=new numeric.T(e));var t=e.x,r=e.y,n=numeric.diag;return r?new numeric.T(n(t),n(r)):new numeric.T(n(t))},numeric.T.eig=function(){if(this.y)throw new Error("eig: not implemented for complex matrices.");return numeric.eig(this.x)},numeric.T.identity=function(e){return new numeric.T(numeric.identity(e))},numeric.T.prototype.getDiag=function(){var e=numeric,t=this.x,r=this.y;return r?new e.T(e.getDiag(t),e.getDiag(r)):new e.T(e.getDiag(t))},numeric.house=function(e){var t=numeric.clone(e),r=e[0]>=0?1:-1,n=r*numeric.norm2(e);t[0]+=n;var a=numeric.norm2(t);if(0===a)throw new Error("eig: internal error");return numeric.div(t,a)},numeric.toUpperHessenberg=function(e){var t=numeric.dim(e);if(2!==t.length||t[0]!==t[1])throw new Error("numeric: toUpperHessenberg() only works on square matrices");var r,n,a,i,o,s,l,u,c,d,f=t[0],p=numeric.clone(e),h=numeric.identity(f);for(n=0;n<f-2;n++){for(i=Array(f-n-1),r=n+1;r<f;r++)i[r-n-1]=p[r][n];if(numeric.norm2(i)>0){for(o=numeric.house(i),s=numeric.getBlock(p,[n+1,n],[f-1,f-1]),l=numeric.tensor(o,numeric.dot(o,s)),r=n+1;r<f;r++)for(u=p[r],c=l[r-n-1],a=n;a<f;a++)u[a]-=2*c[a-n];for(s=numeric.getBlock(p,[0,n+1],[f-1,f-1]),l=numeric.tensor(numeric.dot(s,o),o),r=0;r<f;r++)for(u=p[r],c=l[r],a=n+1;a<f;a++)u[a]-=2*c[a-n-1];for(s=Array(f-n-1),r=n+1;r<f;r++)s[r-n-1]=h[r];for(l=numeric.tensor(o,numeric.dot(o,s)),r=n+1;r<f;r++)for(d=h[r],c=l[r-n-1],a=0;a<f;a++)d[a]-=2*c[a]}}return{H:p,Q:h}},numeric.epsilon=2.220446049250313e-16,numeric.QRFrancis=function(e,t){void 0===t&&(t=1e4),e=numeric.clone(e);var r,n,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b=(numeric.clone(e),numeric.dim(e)),w=b[0],_=numeric.identity(w);if(w<3)return{Q:_,B:[[0,w-1]]};var k=numeric.epsilon;for(x=0;x<t;x++){for(m=0;m<w-1;m++)if(Math.abs(e[m+1][m])<k*(Math.abs(e[m][m])+Math.abs(e[m+1][m+1]))){var z=numeric.QRFrancis(numeric.getBlock(e,[0,0],[m,m]),t),A=numeric.QRFrancis(numeric.getBlock(e,[m+1,m+1],[w-1,w-1]),t);for(p=Array(m+1),g=0;g<=m;g++)p[g]=_[g];for(h=numeric.dot(z.Q,p),g=0;g<=m;g++)_[g]=h[g];for(p=Array(w-m-1),g=m+1;g<w;g++)p[g-m-1]=_[g];for(h=numeric.dot(A.Q,p),g=m+1;g<w;g++)_[g]=h[g-m-1];return{Q:_,B:z.B.concat(numeric.add(A.B,m+1))}}if(a=e[w-2][w-2],i=e[w-2][w-1],o=e[w-1][w-2],s=e[w-1][w-1],u=a+s,l=a*s-i*o,c=numeric.getBlock(e,[0,0],[2,2]),u*u>=4*l){var j,M;j=.5*(u+Math.sqrt(u*u-4*l)),M=.5*(u-Math.sqrt(u*u-4*l)),c=numeric.add(numeric.sub(numeric.dot(c,c),numeric.mul(c,j+M)),numeric.diag(numeric.rep([3],j*M)))}else c=numeric.add(numeric.sub(numeric.dot(c,c),numeric.mul(c,u)),numeric.diag(numeric.rep([3],l)));for(r=[c[0][0],c[1][0],c[2][0]],n=numeric.house(r),p=[e[0],e[1],e[2]],h=numeric.tensor(n,numeric.dot(n,p)),g=0;g<3;g++)for(f=e[g],v=h[g],y=0;y<w;y++)f[y]-=2*v[y];for(p=numeric.getBlock(e,[0,0],[w-1,2]),h=numeric.tensor(numeric.dot(p,n),n),g=0;g<w;g++)for(f=e[g],v=h[g],y=0;y<3;y++)f[y]-=2*v[y];for(p=[_[0],_[1],_[2]],h=numeric.tensor(n,numeric.dot(n,p)),g=0;g<3;g++)for(d=_[g],v=h[g],y=0;y<w;y++)d[y]-=2*v[y];var O;for(m=0;m<w-2;m++){for(y=m;y<=m+1;y++)if(Math.abs(e[y+1][y])<k*(Math.abs(e[y][y])+Math.abs(e[y+1][y+1]))){var z=numeric.QRFrancis(numeric.getBlock(e,[0,0],[y,y]),t),A=numeric.QRFrancis(numeric.getBlock(e,[y+1,y+1],[w-1,w-1]),t);for(p=Array(y+1),g=0;g<=y;g++)p[g]=_[g];for(h=numeric.dot(z.Q,p),g=0;g<=y;g++)_[g]=h[g];for(p=Array(w-y-1),g=y+1;g<w;g++)p[g-y-1]=_[g];for(h=numeric.dot(A.Q,p),g=y+1;g<w;g++)_[g]=h[g-y-1];return{Q:_,B:z.B.concat(numeric.add(A.B,y+1))}}for(O=Math.min(w-1,m+3),r=Array(O-m),g=m+1;g<=O;g++)r[g-m-1]=e[g][m];for(n=numeric.house(r),p=numeric.getBlock(e,[m+1,m],[O,w-1]),h=numeric.tensor(n,numeric.dot(n,p)),g=m+1;g<=O;g++)for(f=e[g],v=h[g-m-1],y=m;y<w;y++)f[y]-=2*v[y-m];for(p=numeric.getBlock(e,[0,m+1],[w-1,O]),h=numeric.tensor(numeric.dot(p,n),n),g=0;g<w;g++)for(f=e[g],v=h[g],y=m+1;y<=O;y++)f[y]-=2*v[y-m-1];for(p=Array(O-m),g=m+1;g<=O;g++)p[g-m-1]=_[g];for(h=numeric.tensor(n,numeric.dot(n,p)),g=m+1;g<=O;g++)for(d=_[g],v=h[g-m-1],y=0;y<w;y++)d[y]-=2*v[y]}}throw new Error("numeric: eigenvalue iteration does not converge -- increase maxiter?")},numeric.eig=function(e,t){var r,n,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x=numeric.toUpperHessenberg(e),b=numeric.QRFrancis(x.H,t),w=numeric.T,_=e.length,k=b.B,z=numeric.dot(b.Q,numeric.dot(x.H,numeric.transpose(b.Q))),A=new w(numeric.dot(b.Q,x.Q)),j=k.length,M=Math.sqrt;for(n=0;n<j;n++)if((r=k[n][0])===k[n][1]);else{if(i=r+1,o=z[r][r],s=z[r][i],l=z[i][r],u=z[i][i],0===s&&0===l)continue;c=-o-u,d=o*u-s*l,f=c*c-4*d,f>=0?(p=c<0?-.5*(c-M(f)):-.5*(c+M(f)),m=(o-p)*(o-p)+s*s,y=l*l+(u-p)*(u-p),m>y?(m=M(m),v=(o-p)/m,g=s/m):(y=M(y),v=l/y,g=(u-p)/y),a=new w([[g,-v],[v,g]]),A.setRows(r,i,a.dot(A.getRows(r,i)))):(p=-.5*c,h=.5*M(-f),m=(o-p)*(o-p)+s*s,y=l*l+(u-p)*(u-p),m>y?(m=M(m+h*h),v=(o-p)/m,g=s/m,p=0,h/=m):(y=M(y+h*h),v=l/y,g=(u-p)/y,p=h/y,h=0),a=new w([[g,-v],[v,g]],[[p,h],[h,-p]]),A.setRows(r,i,a.dot(A.getRows(r,i))))}var O=A.dot(e).dot(A.transjugate()),_=e.length,E=numeric.T.identity(_);for(i=0;i<_;i++)if(i>0)for(n=i-1;n>=0;n--){var F=O.get([n,n]),S=O.get([i,i]);numeric.neq(F.x,S.x)||numeric.neq(F.y,S.y)?(p=O.getRow(n).getBlock([n],[i-1]),h=E.getRow(i).getBlock([n],[i-1]),E.set([i,n],O.get([n,i]).neg().sub(p.dot(h)).div(F.sub(S)))):E.setRow(i,E.getRow(n))}for(i=0;i<_;i++)p=E.getRow(i),E.setRow(i,p.div(p.norm2()));return E=E.transpose(),E=A.transjugate().dot(E),{lambda:O.getDiag(),E:E}},numeric.ccsSparse=function(e){var t,r,n,a,i=e.length,o=[];for(n=i-1;-1!==n;--n){r=e[n];for(a in r){for(a=parseInt(a);a>=o.length;)o[o.length]=0;0!==r[a]&&o[a]++}}var t=o.length,s=Array(t+1);for(s[0]=0,n=0;n<t;++n)s[n+1]=s[n]+o[n];var l=Array(s[t]),u=Array(s[t]);for(n=i-1;-1!==n;--n){r=e[n];for(a in r)0!==r[a]&&(o[a]--,l[s[a]+o[a]]=n,u[s[a]+o[a]]=r[a])}return[s,l,u]},numeric.ccsFull=function(e){var t,r,n,a,i=e[0],o=e[1],s=e[2],l=numeric.ccsDim(e),u=l[0],c=l[1],d=numeric.rep([u,c],0);for(t=0;t<c;t++)for(n=i[t],a=i[t+1],r=n;r<a;++r)d[o[r]][t]=s[r];return d},numeric.ccsTSolve=function(e,t,r,n,a){function i(e){var t;if(0===r[e]){for(r[e]=1,t=o[e];t<o[e+1];++t)i(s[t]);a[d]=e,++d}}var o=e[0],s=e[1],l=e[2],u=o.length-1,c=Math.max,d=0;void 0===n&&(r=numeric.rep([u],0)),void 0===n&&(n=numeric.linspace(0,r.length-1)),void 0===a&&(a=[]);var f,p,h,v,g,m,y;for(f=n.length-1;-1!==f;--f)i(n[f]);for(a.length=d,f=a.length-1;-1!==f;--f)r[a[f]]=0;for(f=n.length-1;-1!==f;--f)p=n[f],r[p]=t[p];for(f=a.length-1;-1!==f;--f){for(p=a[f],h=o[p],v=c(o[p+1],h),g=h;g!==v;++g)if(s[g]===p){r[p]/=l[g];break}for(y=r[p],g=h;g!==v;++g)(m=s[g])!==p&&(r[m]-=y*l[g])}return r},numeric.ccsDFS=function(e){this.k=Array(e),this.k1=Array(e),this.j=Array(e)},numeric.ccsDFS.prototype.dfs=function(e,t,r,n,a,i){var o,s,l,u=0,c=a.length,d=this.k,f=this.k1,p=this.j;if(0===n[e])for(n[e]=1,p[0]=e,d[0]=s=t[e],f[0]=l=t[e+1];;)if(s>=l){if(a[c]=p[u],0===u)return;++c,--u,s=d[u],l=f[u]}else o=i[r[s]],0===n[o]?(n[o]=1,d[u]=s,++u,p[u]=o,s=t[o],f[u]=l=t[o+1]):++s},numeric.ccsLPSolve=function(e,t,r,n,a,i,o){var s,l,u,c,d,f,p,h,v,g=e[0],m=e[1],y=e[2],x=(g.length,t[0]),b=t[1],w=t[2];for(l=x[a],u=x[a+1],n.length=0,s=l;s<u;++s)o.dfs(i[b[s]],g,m,r,n,i);for(s=n.length-1;-1!==s;--s)r[n[s]]=0;for(s=l;s!==u;++s)c=i[b[s]],r[c]=w[s];for(s=n.length-1;-1!==s;--s){for(c=n[s],d=g[c],f=g[c+1],p=d;p<f;++p)if(i[m[p]]===c){r[c]/=y[p];break}for(v=r[c],p=d;p<f;++p)(h=i[m[p]])!==c&&(r[h]-=v*y[p])}return r},numeric.ccsLUP1=function(e,t){var r,n,a,i,o,s,l,u=e[0].length-1,c=[numeric.rep([u+1],0),[],[]],d=[numeric.rep([u+1],0),[],[]],f=c[0],p=c[1],h=c[2],v=d[0],g=d[1],m=d[2],y=numeric.rep([u],0),x=numeric.rep([u],0),b=numeric.ccsLPSolve,w=(Math.max,Math.abs),_=numeric.linspace(0,u-1),k=numeric.linspace(0,u-1),z=new numeric.ccsDFS(u);for(void 0===t&&(t=1),r=0;r<u;++r){for(b(c,e,y,x,r,k,z),i=-1,o=-1,n=x.length-1;-1!==n;--n)(a=x[n])<=r||(s=w(y[a]))>i&&(o=a,i=s);for(w(y[r])<t*i&&(n=_[r],i=_[o],_[r]=i,k[i]=r,_[o]=n,k[n]=o,i=y[r],y[r]=y[o],y[o]=i),i=f[r],o=v[r],l=y[r],p[i]=_[r],h[i]=1,++i,n=x.length-1;-1!==n;--n)a=x[n],s=y[a],x[n]=0,y[a]=0,a<=r?(g[o]=a,m[o]=s,++o):(p[i]=_[a],h[i]=s/l,++i);f[r+1]=i,v[r+1]=o}
for(n=p.length-1;-1!==n;--n)p[n]=k[p[n]];return{L:c,U:d,P:_,Pinv:k}},numeric.ccsDFS0=function(e){this.k=Array(e),this.k1=Array(e),this.j=Array(e)},numeric.ccsDFS0.prototype.dfs=function(e,t,r,n,a,i,o){var s,l,u,c=0,d=a.length,f=this.k,p=this.k1,h=this.j;if(0===n[e])for(n[e]=1,h[0]=e,f[0]=l=t[i[e]],p[0]=u=t[i[e]+1];;){if(isNaN(l))throw new Error("Ow!");if(l>=u){if(a[d]=i[h[c]],0===c)return;++d,--c,l=f[c],u=p[c]}else s=r[l],0===n[s]?(n[s]=1,f[c]=l,++c,h[c]=s,s=i[s],l=t[s],p[c]=u=t[s+1]):++l}},numeric.ccsLPSolve0=function(e,t,r,n,a,i,o,s){var l,u,c,d,f,p,h,v,g,m=e[0],y=e[1],x=e[2],b=(m.length,t[0]),w=t[1],_=t[2];for(u=b[a],c=b[a+1],n.length=0,l=u;l<c;++l)s.dfs(w[l],m,y,r,n,i,o);for(l=n.length-1;-1!==l;--l)d=n[l],r[o[d]]=0;for(l=u;l!==c;++l)d=w[l],r[d]=_[l];for(l=n.length-1;-1!==l;--l){for(d=n[l],v=o[d],f=m[d],p=m[d+1],h=f;h<p;++h)if(y[h]===v){r[v]/=x[h];break}for(g=r[v],h=f;h<p;++h)r[y[h]]-=g*x[h];r[v]=g}},numeric.ccsLUP0=function(e,t){var r,n,a,i,o,s,l,u=e[0].length-1,c=[numeric.rep([u+1],0),[],[]],d=[numeric.rep([u+1],0),[],[]],f=c[0],p=c[1],h=c[2],v=d[0],g=d[1],m=d[2],y=numeric.rep([u],0),x=numeric.rep([u],0),b=numeric.ccsLPSolve0,w=(Math.max,Math.abs),_=numeric.linspace(0,u-1),k=numeric.linspace(0,u-1),z=new numeric.ccsDFS0(u);for(void 0===t&&(t=1),r=0;r<u;++r){for(b(c,e,y,x,r,k,_,z),i=-1,o=-1,n=x.length-1;-1!==n;--n)(a=x[n])<=r||(s=w(y[_[a]]))>i&&(o=a,i=s);for(w(y[_[r]])<t*i&&(n=_[r],i=_[o],_[r]=i,k[i]=r,_[o]=n,k[n]=o),i=f[r],o=v[r],l=y[_[r]],p[i]=_[r],h[i]=1,++i,n=x.length-1;-1!==n;--n)a=x[n],s=y[_[a]],x[n]=0,y[_[a]]=0,a<=r?(g[o]=a,m[o]=s,++o):(p[i]=_[a],h[i]=s/l,++i);f[r+1]=i,v[r+1]=o}for(n=p.length-1;-1!==n;--n)p[n]=k[p[n]];return{L:c,U:d,P:_,Pinv:k}},numeric.ccsLUP=numeric.ccsLUP0,numeric.ccsDim=function(e){return[numeric.sup(e[1])+1,e[0].length-1]},numeric.ccsGetBlock=function(e,t,r){var n=numeric.ccsDim(e),a=n[0],i=n[1];void 0===t?t=numeric.linspace(0,a-1):"number"==typeof t&&(t=[t]),void 0===r?r=numeric.linspace(0,i-1):"number"==typeof r&&(r=[r]);var o,s,l,u,c,d=t.length,f=r.length,p=numeric.rep([i],0),h=[],v=[],g=[p,h,v],m=e[0],y=e[1],x=e[2],b=numeric.rep([a],0),w=0,_=numeric.rep([a],0);for(s=0;s<f;++s){u=r[s];var k=m[u],z=m[u+1];for(o=k;o<z;++o)l=y[o],_[l]=1,b[l]=x[o];for(o=0;o<d;++o)c=t[o],_[c]&&(h[w]=o,v[w]=b[t[o]],++w);for(o=k;o<z;++o)l=y[o],_[l]=0;p[s+1]=w}return g},numeric.ccsDot=function(e,t){var r,n,a,i,o,s,l,u,c,d,f,p=e[0],h=e[1],v=e[2],g=t[0],m=t[1],y=t[2],x=numeric.ccsDim(e),b=numeric.ccsDim(t),w=x[0],_=(x[1],b[1]),k=numeric.rep([w],0),z=numeric.rep([w],0),A=Array(w),j=numeric.rep([_],0),M=[],O=[],E=[j,M,O];for(a=0;a!==_;++a){for(i=g[a],o=g[a+1],c=0,n=i;n<o;++n)for(d=m[n],f=y[n],s=p[d],l=p[d+1],r=s;r<l;++r)u=h[r],0===z[u]&&(A[c]=u,z[u]=1,c+=1),k[u]=k[u]+v[r]*f;for(i=j[a],o=i+c,j[a+1]=o,n=c-1;-1!==n;--n)f=i+n,r=A[n],M[f]=r,O[f]=k[r],z[r]=0,k[r]=0;j[a+1]=j[a]+c}return E},numeric.ccsLUPSolve=function(e,t){var r=e.L,n=e.U,a=(e.P,t[0]),i=!1;"object"!=typeof a&&(t=[[0,t.length],numeric.linspace(0,t.length-1),t],a=t[0],i=!0);var o,s,l,u,c,d,f=t[1],p=t[2],h=r[0].length-1,v=a.length-1,g=numeric.rep([h],0),m=Array(h),y=numeric.rep([h],0),x=Array(h),b=numeric.rep([v+1],0),w=[],_=[],k=numeric.ccsTSolve,z=0;for(o=0;o<v;++o){for(c=0,l=a[o],u=a[o+1],s=l;s<u;++s)d=e.Pinv[f[s]],x[c]=d,y[d]=p[s],++c;for(x.length=c,k(r,y,g,x,m),s=x.length-1;-1!==s;--s)y[x[s]]=0;if(k(n,g,y,m,x),i)return y;for(s=m.length-1;-1!==s;--s)g[m[s]]=0;for(s=x.length-1;-1!==s;--s)d=x[s],w[z]=d,_[z]=y[d],y[d]=0,++z;b[o+1]=z}return[b,w,_]},numeric.ccsbinop=function(e,t){return void 0===t&&(t=""),Function("X","Y","var Xi = X[0], Xj = X[1], Xv = X[2];\nvar Yi = Y[0], Yj = Y[1], Yv = Y[2];\nvar n = Xi.length-1,m = Math.max(numeric.sup(Xj),numeric.sup(Yj))+1;\nvar Zi = numeric.rep([n+1],0), Zj = [], Zv = [];\nvar x = numeric.rep([m],0),y = numeric.rep([m],0);\nvar xk,yk,zk;\nvar i,j,j0,j1,k,p=0;\n"+t+"for(i=0;i<n;++i) {\n j0 = Xi[i]; j1 = Xi[i+1];\n for(j=j0;j!==j1;++j) {\n k = Xj[j];\n x[k] = 1;\n Zj[p] = k;\n ++p;\n }\n j0 = Yi[i]; j1 = Yi[i+1];\n for(j=j0;j!==j1;++j) {\n k = Yj[j];\n y[k] = Yv[j];\n if(x[k] === 0) {\n Zj[p] = k;\n ++p;\n }\n }\n Zi[i+1] = p;\n j0 = Xi[i]; j1 = Xi[i+1];\n for(j=j0;j!==j1;++j) x[Xj[j]] = Xv[j];\n j0 = Zi[i]; j1 = Zi[i+1];\n for(j=j0;j!==j1;++j) {\n k = Zj[j];\n xk = x[k];\n yk = y[k];\n"+e+"\n Zv[j] = zk;\n }\n j0 = Xi[i]; j1 = Xi[i+1];\n for(j=j0;j!==j1;++j) x[Xj[j]] = 0;\n j0 = Yi[i]; j1 = Yi[i+1];\n for(j=j0;j!==j1;++j) y[Yj[j]] = 0;\n}\nreturn [Zi,Zj,Zv];")},function(){var k,A,B,C;for(k in numeric.ops2)A=isFinite(eval("1"+numeric.ops2[k]+"0"))?"[Y[0],Y[1],numeric."+k+"(X,Y[2])]":"NaN",B=isFinite(eval("0"+numeric.ops2[k]+"1"))?"[X[0],X[1],numeric."+k+"(X[2],Y)]":"NaN",C=isFinite(eval("1"+numeric.ops2[k]+"0"))&&isFinite(eval("0"+numeric.ops2[k]+"1"))?"numeric.ccs"+k+"MM(X,Y)":"NaN",numeric["ccs"+k+"MM"]=numeric.ccsbinop("zk = xk "+numeric.ops2[k]+"yk;"),numeric["ccs"+k]=Function("X","Y",'if(typeof X === "number") return '+A+';\nif(typeof Y === "number") return '+B+";\nreturn "+C+";\n")}(),numeric.ccsScatter=function(e){var t,r=e[0],n=e[1],a=e[2],i=numeric.sup(n)+1,o=r.length,s=numeric.rep([i],0),l=Array(o),u=Array(o),c=numeric.rep([i],0);for(t=0;t<o;++t)c[n[t]]++;for(t=0;t<i;++t)s[t+1]=s[t]+c[t];var d,f,p=s.slice(0);for(t=0;t<o;++t)f=n[t],d=p[f],l[d]=r[t],u[d]=a[t],p[f]=p[f]+1;return[s,l,u]},numeric.ccsGather=function(e){var t,r,n,a,i,o=e[0],s=e[1],l=e[2],u=o.length-1,c=s.length,d=Array(c),f=Array(c),p=Array(c);for(i=0,t=0;t<u;++t)for(n=o[t],a=o[t+1],r=n;r!==a;++r)f[i]=t,d[i]=s[r],p[i]=l[r],++i;return[d,f,p]},numeric.sdim=function e(t,r,n){if(void 0===r&&(r=[]),"object"!=typeof t)return r;void 0===n&&(n=0),n in r||(r[n]=0),t.length>r[n]&&(r[n]=t.length);var a;for(a in t)t.hasOwnProperty(a)&&e(t[a],r,n+1);return r},numeric.sclone=function e(t,r,n){void 0===r&&(r=0),void 0===n&&(n=numeric.sdim(t).length);var a,i=Array(t.length);if(r===n-1){for(a in t)t.hasOwnProperty(a)&&(i[a]=t[a]);return i}for(a in t)t.hasOwnProperty(a)&&(i[a]=e(t[a],r+1,n));return i},numeric.sdiag=function(e){var t,r,n=e.length,a=Array(n);for(t=n-1;t>=1;t-=2)r=t-1,a[t]=[],a[t][t]=e[t],a[r]=[],a[r][r]=e[r];return 0===t&&(a[0]=[],a[0][0]=e[t]),a},numeric.sidentity=function(e){return numeric.sdiag(numeric.rep([e],1))},numeric.stranspose=function(e){var t,r,n,a=[];e.length;for(t in e)if(e.hasOwnProperty(t)){n=e[t];for(r in n)n.hasOwnProperty(r)&&("object"!=typeof a[r]&&(a[r]=[]),a[r][t]=n[r])}return a},numeric.sLUP=function(e,t){throw new Error("The function numeric.sLUP had a bug in it and has been removed. Please use the new numeric.ccsLUP function instead.")},numeric.sdotMM=function(e,t){var r,n,a,i,o,s,l,u=e.length,c=(t.length,numeric.stranspose(t)),d=c.length,f=Array(u);for(a=u-1;a>=0;a--){for(l=[],r=e[a],o=d-1;o>=0;o--){s=0,n=c[o];for(i in r)r.hasOwnProperty(i)&&i in n&&(s+=r[i]*n[i]);s&&(l[o]=s)}f[a]=l}return f},numeric.sdotMV=function(e,t){var r,n,a,i,o=e.length,s=Array(o);for(n=o-1;n>=0;n--){r=e[n],i=0;for(a in r)r.hasOwnProperty(a)&&t[a]&&(i+=r[a]*t[a]);i&&(s[n]=i)}return s},numeric.sdotVM=function(e,t){var r,n,a,i,o=[];for(r in e)if(e.hasOwnProperty(r)){a=t[r],i=e[r];for(n in a)a.hasOwnProperty(n)&&(o[n]||(o[n]=0),o[n]+=i*a[n])}return o},numeric.sdotVV=function(e,t){var r,n=0;for(r in e)e[r]&&t[r]&&(n+=e[r]*t[r]);return n},numeric.sdot=function(e,t){var r=numeric.sdim(e).length,n=numeric.sdim(t).length;switch(1e3*r+n){case 0:return e*t;case 1001:return numeric.sdotVV(e,t);case 2001:return numeric.sdotMV(e,t);case 1002:return numeric.sdotVM(e,t);case 2002:return numeric.sdotMM(e,t);default:throw new Error("numeric.sdot not implemented for tensors of order "+r+" and "+n)}},numeric.sscatter=function(e){var t,r,n,a,i=e[0].length,o=e.length,s=[];for(r=i-1;r>=0;--r)if(e[o-1][r]){for(a=s,n=0;n<o-2;n++)t=e[n][r],a[t]||(a[t]=[]),a=a[t];a[e[n][r]]=e[n+1][r]}return s},numeric.sgather=function e(t,r,n){void 0===r&&(r=[]),void 0===n&&(n=[]);var a,i,o;a=n.length;for(i in t)if(t.hasOwnProperty(i))if(n[a]=parseInt(i),"number"==typeof(o=t[i])){if(o){if(0===r.length)for(i=a+1;i>=0;--i)r[i]=[];for(i=a;i>=0;--i)r[i].push(n[i]);r[a+1].push(o)}}else e(o,r,n);return n.length>a&&n.pop(),r},numeric.cLU=function(e){var t,r,n,a,i,o,s=e[0],l=e[1],u=e[2],c=s.length,d=0;for(t=0;t<c;t++)s[t]>d&&(d=s[t]);d++;var f,p,h,v=Array(d),g=Array(d),m=numeric.rep([d],1/0),y=numeric.rep([d],-1/0);for(n=0;n<c;n++)t=s[n],r=l[n],r<m[t]&&(m[t]=r),r>y[t]&&(y[t]=r);for(t=0;t<d-1;t++)y[t]>y[t+1]&&(y[t+1]=y[t]);for(t=d-1;t>=1;t--)m[t]<m[t-1]&&(m[t-1]=m[t]);var x=0,b=0;for(t=0;t<d;t++)g[t]=numeric.rep([y[t]-m[t]+1],0),v[t]=numeric.rep([t-m[t]],0),x+=t-m[t]+1,b+=y[t]-t+1;for(n=0;n<c;n++)t=s[n],g[t][l[n]-m[t]]=u[n];for(t=0;t<d-1;t++)for(a=t-m[t],f=g[t],r=t+1;m[r]<=t&&r<d;r++)if(i=t-m[r],o=y[t]-t,p=g[r],h=p[i]/f[a]){for(n=1;n<=o;n++)p[n+i]-=h*f[n+a];v[r][t-m[r]]=h}var c,w,_,f=[],p=[],k=[],z=[],A=[],j=[];for(c=0,w=0,t=0;t<d;t++){for(a=m[t],i=y[t],_=g[t],r=t;r<=i;r++)_[r-a]&&(f[c]=t,p[c]=r,k[c]=_[r-a],c++);for(_=v[t],r=a;r<t;r++)_[r-a]&&(z[w]=t,A[w]=r,j[w]=_[r-a],w++);z[w]=t,A[w]=t,j[w]=1,w++}return{U:[f,p,k],L:[z,A,j]}},numeric.cLUsolve=function(e,t){var r,n,a=e.L,i=e.U,o=numeric.clone(t),s=a[0],l=a[1],u=a[2],c=i[0],d=i[1],f=i[2],p=c.length,h=(s.length,o.length);for(n=0,r=0;r<h;r++){for(;l[n]<r;)o[r]-=u[n]*o[l[n]],n++;n++}for(n=p-1,r=h-1;r>=0;r--){for(;d[n]>r;)o[r]-=f[n]*o[d[n]],n--;o[r]/=f[n],n--}return o},numeric.cgrid=function(e,t){"number"==typeof e&&(e=[e,e]);var r,n,a,i=numeric.rep(e,-1);if("function"!=typeof t)switch(t){case"L":t=function(t,r){return t>=e[0]/2||r<e[1]/2};break;default:t=function(e,t){return!0}}for(a=0,r=1;r<e[0]-1;r++)for(n=1;n<e[1]-1;n++)t(r,n)&&(i[r][n]=a,a++);return i},numeric.cdelsq=function(e){var t,r,n,a,i,o=[[-1,0],[0,-1],[0,1],[1,0]],s=numeric.dim(e),l=s[0],u=s[1],c=[],d=[],f=[];for(t=1;t<l-1;t++)for(r=1;r<u-1;r++)if(!(e[t][r]<0)){for(n=0;n<4;n++)a=t+o[n][0],i=r+o[n][1],e[a][i]<0||(c.push(e[t][r]),d.push(e[a][i]),f.push(-1));c.push(e[t][r]),d.push(e[t][r]),f.push(4)}return[c,d,f]},numeric.cdotMV=function(e,t){var r,n,a,i=e[0],o=e[1],s=e[2],l=i.length;for(a=0,n=0;n<l;n++)i[n]>a&&(a=i[n]);for(a++,r=numeric.rep([a],0),n=0;n<l;n++)r[i[n]]+=s[n]*t[o[n]];return r},numeric.Spline=function(e,t,r,n,a){this.x=e,this.yl=t,this.yr=r,this.kl=n,this.kr=a},numeric.Spline.prototype._at=function(e,t){var e,r,n,a,i=this.x,o=this.yl,s=this.yr,l=this.kl,u=this.kr,c=numeric.add,d=numeric.sub,f=numeric.mul;r=d(f(l[t],i[t+1]-i[t]),d(s[t+1],o[t])),n=c(f(u[t+1],i[t]-i[t+1]),d(s[t+1],o[t])),a=(e-i[t])/(i[t+1]-i[t]);var p=a*(1-a);return c(c(c(f(1-a,o[t]),f(a,s[t+1])),f(r,p*(1-a))),f(n,p*a))},numeric.Spline.prototype.at=function(e){if("number"==typeof e){var t,r,n,a=this.x,i=a.length,o=Math.floor;for(t=0,r=i-1;r-t>1;)n=o((t+r)/2),a[n]<=e?t=n:r=n;return this._at(e,t)}var s,i=e.length,l=Array(i);for(s=i-1;-1!==s;--s)l[s]=this.at(e[s]);return l},numeric.Spline.prototype.diff=function(){var e,t,r,n=this.x,a=this.yl,i=this.yr,o=this.kl,s=this.kr,l=a.length,u=o,c=s,d=Array(l),f=Array(l),p=numeric.add,h=numeric.mul,v=numeric.div,g=numeric.sub;for(e=l-1;-1!==e;--e)t=n[e+1]-n[e],r=g(i[e+1],a[e]),d[e]=v(p(h(r,6),h(o[e],-4*t),h(s[e+1],-2*t)),t*t),f[e+1]=v(p(h(r,-6),h(o[e],2*t),h(s[e+1],4*t)),t*t);return new numeric.Spline(n,u,c,d,f)},numeric.Spline.prototype.roots=function(){var e=[],t=this.x,r=this.yl,n=this.yr,a=this.kl,i=this.kr;"number"==typeof r[0]&&(r=[r],n=[n],a=[a],i=[i]);var o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E=r.length,F=t.length-1,e=Array(E),S=Math.sqrt;for(o=0;o!==E;++o){for(u=r[o],c=n[o],d=a[o],f=i[o],p=[],s=0;s!==F;s++){for(s>0&&c[s]*u[s]<0&&p.push(t[s]),w=t[s+1]-t[s],t[s],g=u[s],m=c[s+1],h=d[s]/w,v=f[s+1]/w,b=function(e){return e*e}(h-v+3*(g-m))+12*v*g,y=v+3*g+2*h-3*m,x=3*(v+h+2*(g-m)),b<=0?(k=y/x,_=k>t[s]&&k<t[s+1]?[t[s],k,t[s+1]]:[t[s],t[s+1]]):(k=(y-S(b))/x,z=(y+S(b))/x,_=[t[s]],k>t[s]&&k<t[s+1]&&_.push(k),z>t[s]&&z<t[s+1]&&_.push(z),_.push(t[s+1])),j=_[0],k=this._at(j,s),l=0;l<_.length-1;l++)if(M=_[l+1],z=this._at(M,s),0!==k)if(0===z||k*z>0)j=M,k=z;else{for(var T=0;;){if((O=(k*M-z*j)/(k-z))<=j||O>=M)break;if((A=this._at(O,s))*z>0)M=O,z=A,-1===T&&(k*=.5),T=-1;else{if(!(A*k>0))break;j=O,k=A,1===T&&(z*=.5),T=1}}p.push(O),j=_[l+1],k=this._at(j,s)}else p.push(j),j=M,k=z;0===z&&p.push(M)}e[o]=p}return"number"==typeof this.yl[0]?e[0]:e},numeric.spline=function(e,t,r,n){var a,i=e.length,o=[],s=[],l=[],u=numeric.sub,c=numeric.mul,d=numeric.add;for(a=i-2;a>=0;a--)s[a]=e[a+1]-e[a],l[a]=u(t[a+1],t[a]);"string"!=typeof r&&"string"!=typeof n||(r=n="periodic");var f=[[],[],[]];switch(typeof r){case"undefined":o[0]=c(3/(s[0]*s[0]),l[0]),f[0].push(0,0),f[1].push(0,1),f[2].push(2/s[0],1/s[0]);break;case"string":o[0]=d(c(3/(s[i-2]*s[i-2]),l[i-2]),c(3/(s[0]*s[0]),l[0])),f[0].push(0,0,0),f[1].push(i-2,0,1),f[2].push(1/s[i-2],2/s[i-2]+2/s[0],1/s[0]);break;default:o[0]=r,f[0].push(0),f[1].push(0),f[2].push(1)}for(a=1;a<i-1;a++)o[a]=d(c(3/(s[a-1]*s[a-1]),l[a-1]),c(3/(s[a]*s[a]),l[a])),f[0].push(a,a,a),f[1].push(a-1,a,a+1),f[2].push(1/s[a-1],2/s[a-1]+2/s[a],1/s[a]);switch(typeof n){case"undefined":o[i-1]=c(3/(s[i-2]*s[i-2]),l[i-2]),f[0].push(i-1,i-1),f[1].push(i-2,i-1),f[2].push(1/s[i-2],2/s[i-2]);break;case"string":f[1][f[1].length-1]=0;break;default:o[i-1]=n,f[0].push(i-1),f[1].push(i-1),f[2].push(1)}o="number"!=typeof o[0]?numeric.transpose(o):[o];var p=Array(o.length);if("string"==typeof r)for(a=p.length-1;-1!==a;--a)p[a]=numeric.ccsLUPSolve(numeric.ccsLUP(numeric.ccsScatter(f)),o[a]),p[a][i-1]=p[a][0];else for(a=p.length-1;-1!==a;--a)p[a]=numeric.cLUsolve(numeric.cLU(f),o[a]);return p="number"==typeof t[0]?p[0]:numeric.transpose(p),new numeric.Spline(e,t,t,p,p)},numeric.fftpow2=function e(t,r){var n=t.length;if(1!==n){var a,i,o=Math.cos,s=Math.sin,l=Array(n/2),u=Array(n/2),c=Array(n/2),d=Array(n/2);for(i=n/2,a=n-1;-1!==a;--a)--i,c[i]=t[a],d[i]=r[a],--a,l[i]=t[a],u[i]=r[a];e(l,u),e(c,d),i=n/2;var f,p,h,v=-6.283185307179586/n;for(a=n-1;-1!==a;--a)--i,-1===i&&(i=n/2-1),f=v*a,p=o(f),h=s(f),t[a]=l[i]+p*c[i]-h*d[i],r[a]=u[i]+p*d[i]+h*c[i]}},numeric._ifftpow2=function e(t,r){var n=t.length;if(1!==n){var a,i,o=Math.cos,s=Math.sin,l=Array(n/2),u=Array(n/2),c=Array(n/2),d=Array(n/2);for(i=n/2,a=n-1;-1!==a;--a)--i,c[i]=t[a],d[i]=r[a],--a,l[i]=t[a],u[i]=r[a];e(l,u),e(c,d),i=n/2;var f,p,h,v=6.283185307179586/n;for(a=n-1;-1!==a;--a)--i,-1===i&&(i=n/2-1),f=v*a,p=o(f),h=s(f),t[a]=l[i]+p*c[i]-h*d[i],r[a]=u[i]+p*d[i]+h*c[i]}},numeric.ifftpow2=function(e,t){numeric._ifftpow2(e,t),numeric.diveq(e,e.length),numeric.diveq(t,t.length)},numeric.convpow2=function(e,t,r,n){numeric.fftpow2(e,t),numeric.fftpow2(r,n);var a,i,o,s,l,u=e.length;for(a=u-1;-1!==a;--a)i=e[a],s=t[a],o=r[a],l=n[a],e[a]=i*o-s*l,t[a]=i*l+s*o;numeric.ifftpow2(e,t)},numeric.T.prototype.fft=function(){var e,t,r=this.x,n=this.y,a=r.length,i=Math.log,o=i(2),s=Math.ceil(i(2*a-1)/o),l=Math.pow(2,s),u=numeric.rep([l],0),c=numeric.rep([l],0),d=Math.cos,f=Math.sin,p=-3.141592653589793/a,h=numeric.rep([l],0),v=numeric.rep([l],0);Math.floor(a/2);for(e=0;e<a;e++)h[e]=r[e];if(void 0!==n)for(e=0;e<a;e++)v[e]=n[e];for(u[0]=1,e=1;e<=l/2;e++)t=p*e*e,u[e]=d(t),c[e]=f(t),u[l-e]=d(t),c[l-e]=f(t);var g=new numeric.T(h,v),m=new numeric.T(u,c);return g=g.mul(m),numeric.convpow2(g.x,g.y,numeric.clone(m.x),numeric.neg(m.y)),g=g.mul(m),g.x.length=a,g.y.length=a,g},numeric.T.prototype.ifft=function(){var e,t,r=this.x,n=this.y,a=r.length,i=Math.log,o=i(2),s=Math.ceil(i(2*a-1)/o),l=Math.pow(2,s),u=numeric.rep([l],0),c=numeric.rep([l],0),d=Math.cos,f=Math.sin,p=3.141592653589793/a,h=numeric.rep([l],0),v=numeric.rep([l],0);Math.floor(a/2);for(e=0;e<a;e++)h[e]=r[e];if(void 0!==n)for(e=0;e<a;e++)v[e]=n[e];for(u[0]=1,e=1;e<=l/2;e++)t=p*e*e,u[e]=d(t),c[e]=f(t),u[l-e]=d(t),c[l-e]=f(t);var g=new numeric.T(h,v),m=new numeric.T(u,c);return g=g.mul(m),numeric.convpow2(g.x,g.y,numeric.clone(m.x),numeric.neg(m.y)),g=g.mul(m),g.x.length=a,g.y.length=a,g.div(a)},numeric.gradient=function(e,t){var r=t.length,n=e(t);if(isNaN(n))throw new Error("gradient: f(x) is a NaN!");var a,i,o,s,l,u,c,d,f,p=Math.max,h=numeric.clone(t),v=Array(r),p=(numeric.div,numeric.sub,Math.max),g=Math.abs,m=Math.min,y=0;for(a=0;a<r;a++)for(var x=p(1e-6*n,1e-8);;){if(++y>20)throw new Error("Numerical gradient fails");if(h[a]=t[a]+x,i=e(h),h[a]=t[a]-x,o=e(h),h[a]=t[a],isNaN(i)||isNaN(o))x/=16;else{if(v[a]=(i-o)/(2*x),s=t[a]-x,l=t[a],u=t[a]+x,c=(i-n)/x,d=(n-o)/x,f=p(g(v[a]),g(n),g(i),g(o),g(s),g(l),g(u),1e-8),!(m(p(g(c-v[a]),g(d-v[a]),g(c-d))/f,x/f)>.001))break;x/=16}}return v},numeric.uncmin=function(e,t,r,n,a,i,o){var s=numeric.gradient;void 0===o&&(o={}),void 0===r&&(r=1e-8),void 0===n&&(n=function(t){return s(e,t)}),void 0===a&&(a=1e3),t=numeric.clone(t);var l,u,c=t.length,d=e(t);if(isNaN(d))throw new Error("uncmin: f(x0) is a NaN!");var f=Math.max,p=numeric.norm2;r=f(r,numeric.epsilon);var h,v,g,m,y,x,b,w,_,k,z=o.Hinv||numeric.identity(c),A=numeric.dot,j=(numeric.inv,numeric.sub),M=numeric.add,O=numeric.tensor,E=numeric.div,F=numeric.mul,S=numeric.all,T=numeric.isFinite,C=numeric.neg,B=0,q="";for(v=n(t);B<a;){if("function"==typeof i&&i(B,t,d,v,z)){q="Callback returned true";break}if(!S(T(v))){q="Gradient has Infinity or NaN";break}if(h=C(A(z,v)),!S(T(h))){q="Search direction has Infinity or NaN";break}if((k=p(h))<r){q="Newton step smaller than tol";break}for(_=1,u=A(v,h),y=t;B<a&&!(_*k<r)&&(m=F(h,_),y=M(t,m),(l=e(y))-d>=.1*_*u||isNaN(l));)_*=.5,++B;if(_*k<r){q="Line search step size smaller than tol";break}if(B===a){q="maxit reached during line search";break}g=n(y),x=j(g,v),w=A(x,m),b=A(z,x),z=j(M(z,F((w+A(x,b))/(w*w),O(m,m))),E(M(O(b,m),O(m,b)),w)),t=y,d=l,v=g,++B}return{solution:t,f:d,gradient:v,invHessian:z,iterations:B,message:q}},numeric.Dopri=function(e,t,r,n,a,i,o){this.x=e,this.y=t,this.f=r,this.ymid=n,this.iterations=a,this.events=o,this.message=i},numeric.Dopri.prototype._at=function(e,t){function r(e){return e*e}var n,a,i,o,s,l,e,u,c,d,f,p=this,h=p.x,v=p.y,g=p.f,m=p.ymid,y=(h.length,Math.floor,numeric.add),x=numeric.mul,b=numeric.sub;return n=h[t],a=h[t+1],o=v[t],s=v[t+1],u=a-n,i=n+.5*u,l=m[t],c=b(g[t],x(o,1/(n-i)+2/(n-a))),d=b(g[t+1],x(s,1/(a-i)+2/(a-n))),f=[r(e-a)*(e-i)/r(n-a)/(n-i),r(e-n)*r(e-a)/r(n-i)/r(a-i),r(e-n)*(e-i)/r(a-n)/(a-i),(e-n)*r(e-a)*(e-i)/r(n-a)/(n-i),(e-a)*r(e-n)*(e-i)/r(n-a)/(a-i)],y(y(y(y(x(o,f[0]),x(l,f[1])),x(s,f[2])),x(c,f[3])),x(d,f[4]))},numeric.Dopri.prototype.at=function(e){var t,r,n,a=Math.floor;if("number"!=typeof e){var i=e.length,o=Array(i);for(t=i-1;-1!==t;--t)o[t]=this.at(e[t]);return o}var s=this.x;for(t=0,r=s.length-1;r-t>1;)n=a(.5*(t+r)),s[n]<=e?t=n:r=n;return this._at(e,t)},numeric.dopri=function(e,t,r,n,a,i,o){void 0===a&&(a=1e-6),void 0===i&&(i=1e3);var s,l,u,c,d,f,p,h,v,g,m,y,x,b=[e],w=[r],_=[n(e,r)],k=[],z=[.075,.225],A=[44/45,-56/15,32/9],j=[19372/6561,-25360/2187,64448/6561,-212/729],M=[9017/3168,-355/33,46732/5247,49/176,-5103/18656],O=[35/384,0,500/1113,125/192,-2187/6784,11/84],E=[.10013431883002395,0,.3918321794184259,-.02982460176594817,.05893268337240795,-.04497888809104361,.023904308236133973],F=[.2,.3,.8,8/9,1,1],S=[-71/57600,0,71/16695,-71/1920,17253/339200,-22/525,.025],T=0,C=(t-e)/10,B=0,q=numeric.add,N=numeric.mul,P=(Math.max,Math.min),I=Math.abs,D=numeric.norminf,R=Math.pow,V=numeric.any,U=numeric.lt,L=numeric.and,Y=(numeric.sub,new numeric.Dopri(b,w,_,k,-1,""));for("function"==typeof o&&(m=o(e,r));e<t&&B<i;)if(++B,e+C>t&&(C=t-e),s=n(e+F[0]*C,q(r,N(.2*C,_[T]))),l=n(e+F[1]*C,q(q(r,N(z[0]*C,_[T])),N(z[1]*C,s))),u=n(e+F[2]*C,q(q(q(r,N(A[0]*C,_[T])),N(A[1]*C,s)),N(A[2]*C,l))),c=n(e+F[3]*C,q(q(q(q(r,N(j[0]*C,_[T])),N(j[1]*C,s)),N(j[2]*C,l)),N(j[3]*C,u))),d=n(e+F[4]*C,q(q(q(q(q(r,N(M[0]*C,_[T])),N(M[1]*C,s)),N(M[2]*C,l)),N(M[3]*C,u)),N(M[4]*C,c))),v=q(q(q(q(q(r,N(_[T],C*O[0])),N(l,C*O[2])),N(u,C*O[3])),N(c,C*O[4])),N(d,C*O[5])),f=n(e+C,v),p=q(q(q(q(q(N(_[T],C*S[0]),N(l,C*S[2])),N(u,C*S[3])),N(c,C*S[4])),N(d,C*S[5])),N(f,C*S[6])),(g="number"==typeof p?I(p):D(p))>a){if(C=.2*C*R(a/g,.25),e+C===e){Y.msg="Step size became too small";break}}else{if(k[T]=q(q(q(q(q(q(r,N(_[T],C*E[0])),N(l,C*E[2])),N(u,C*E[3])),N(c,C*E[4])),N(d,C*E[5])),N(f,C*E[6])),++T,b[T]=e+C,w[T]=v,_[T]=f,"function"==typeof o){var H,G,X=e,J=e+.5*C;if(y=o(J,k[T-1]),x=L(U(m,0),U(0,y)),V(x)||(X=J,J=e+C,m=y,y=o(J,v),x=L(U(m,0),U(0,y))),V(x)){for(var W,Q,K=0,Z=1,$=1;;){if("number"==typeof m)G=($*y*X-Z*m*J)/($*y-Z*m);else for(G=J,h=m.length-1;-1!==h;--h)m[h]<0&&y[h]>0&&(G=P(G,($*y[h]*X-Z*m[h]*J)/($*y[h]-Z*m[h])));if(G<=X||G>=J)break;H=Y._at(G,T-1),Q=o(G,H),W=L(U(m,0),U(0,Q)),V(W)?(J=G,y=Q,x=W,$=1,-1===K?Z*=.5:Z=1,K=-1):(X=G,m=Q,Z=1,1===K?$*=.5:$=1,K=1)}return v=Y._at(.5*(e+G),T-1),Y.f[T]=n(G,H),Y.x[T]=G,Y.y[T]=H,Y.ymid[T-1]=v,Y.events=x,Y.iterations=B,Y}}e+=C,r=v,m=y,C=P(.8*C*R(a/g,.25),4*C)}return Y.iterations=B,Y},numeric.LU=function(e,t){t=t||!1;var r,n,a,i,o,s,l,u,c,d=Math.abs,f=e.length,p=f-1,h=new Array(f);for(t||(e=numeric.clone(e)),a=0;a<f;++a){for(l=a,s=e[a],c=d(s[a]),n=a+1;n<f;++n)i=d(e[n][a]),c<i&&(c=i,l=n);for(h[a]=l,l!=a&&(e[a]=e[l],e[l]=s,s=e[a]),o=s[a],r=a+1;r<f;++r)e[r][a]/=o;for(r=a+1;r<f;++r){for(u=e[r],n=a+1;n<p;++n)u[n]-=u[a]*s[n],++n,u[n]-=u[a]*s[n];n===p&&(u[n]-=u[a]*s[n])}}return{LU:e,P:h}},numeric.LUsolve=function(e,t){var r,n,a,i,o,s=e.LU,l=s.length,u=numeric.clone(t),c=e.P;for(r=l-1;-1!==r;--r)u[r]=t[r];for(r=0;r<l;++r)for(a=c[r],c[r]!==r&&(o=u[r],u[r]=u[a],u[a]=o),i=s[r],n=0;n<r;++n)u[r]-=u[n]*i[n];for(r=l-1;r>=0;--r){for(i=s[r],n=r+1;n<l;++n)u[r]-=u[n]*i[n];u[r]/=i[r]}return u},numeric.solve=function(e,t,r){return numeric.LUsolve(numeric.LU(e,r),t)},numeric.echelonize=function(e){var t,r,n,a,i,o,s,l,u=numeric.dim(e),c=u[0],d=u[1],f=numeric.identity(c),p=Array(c),h=Math.abs,v=numeric.diveq;for(e=numeric.clone(e),t=0;t<c;++t){for(n=0,i=e[t],o=f[t],r=1;r<d;++r)h(i[n])<h(i[r])&&(n=r);for(p[t]=n,v(o,i[n]),v(i,i[n]),r=0;r<c;++r)if(r!==t){for(s=e[r],l=s[n],a=d-1;-1!==a;--a)s[a]-=i[a]*l;for(s=f[r],a=c-1;-1!==a;--a)s[a]-=o[a]*l}}return{I:f,A:e,P:p}},numeric.__solveLP=function(e,t,r,n,a,i,o){var s,l,u,c,d=numeric.sum,f=(numeric.log,numeric.mul),p=numeric.sub,h=numeric.dot,v=numeric.div,g=numeric.add,m=e.length,y=r.length,x=!1,b=1,w=(numeric.transpose(t),numeric.svd,numeric.transpose),_=(numeric.leq,Math.sqrt),k=Math.abs,z=(numeric.muleq,numeric.norminf,numeric.any,Math.min),A=numeric.all,j=numeric.gt,M=Array(m),O=Array(y),E=(numeric.rep([y],1),numeric.solve),F=p(r,h(t,i)),S=h(e,e);for(u=0;u<a;++u){var T,C;for(T=y-1;-1!==T;--T)O[T]=v(t[T],F[T]);var B=w(O);for(T=m-1;-1!==T;--T)M[T]=d(B[T]);b=.25*k(S/h(e,M));var q=100*_(S/h(M,M));for((!isFinite(b)||b>q)&&(b=q),c=g(e,f(b,M)),l=h(B,O),T=m-1;-1!==T;--T)l[T][T]+=1;C=E(l,v(c,b),!0);var N=v(F,h(t,C)),P=1;for(T=y-1;-1!==T;--T)N[T]<0&&(P=z(P,-.999*N[T]));if(s=p(i,f(C,P)),F=p(r,h(t,s)),!A(j(F,0)))return{solution:i,message:"",iterations:u};if(i=s,b<n)return{solution:s,message:"",iterations:u};if(o){var I=h(e,c),D=h(t,c);for(x=!0,T=y-1;-1!==T;--T)if(I*D[T]<0){x=!1;break}}else x=!(i[m-1]>=0);if(x)return{solution:s,message:"Unbounded",iterations:u}}return{solution:i,message:"maximum iteration count exceeded",iterations:u}},numeric._solveLP=function(e,t,r,n,a){var i,o=e.length,s=r.length,l=(numeric.sum,numeric.log,numeric.mul,numeric.sub),u=numeric.dot,c=(numeric.div,numeric.add,numeric.rep([o],0).concat([1])),d=numeric.rep([s,1],-1),f=numeric.blockMatrix([[t,d]]),p=r,i=numeric.rep([o],0).concat(Math.max(0,numeric.sup(numeric.neg(r)))+1),h=numeric.__solveLP(c,f,p,n,a,i,!1),v=numeric.clone(h.solution);if(v.length=o,numeric.inf(l(r,u(t,v)))<0)return{solution:NaN,message:"Infeasible",iterations:h.iterations};var g=numeric.__solveLP(e,t,r,n,a-h.iterations,v,!0);return g.iterations+=h.iterations,g},numeric.solveLP=function(e,t,r,n,a,i,o){if(void 0===o&&(o=1e3),void 0===i&&(i=numeric.epsilon),void 0===n)return numeric._solveLP(e,t,r,i,o);var s,l=n.length,u=n[0].length,c=t.length,d=numeric.echelonize(n),f=numeric.rep([u],0),p=d.P,h=[];for(s=p.length-1;-1!==s;--s)f[p[s]]=1;for(s=u-1;-1!==s;--s)0===f[s]&&h.push(s);var v=numeric.getRange,g=numeric.linspace(0,l-1),m=numeric.linspace(0,c-1),y=v(n,g,h),x=v(t,m,p),b=v(t,m,h),w=numeric.dot,_=numeric.sub,k=w(x,d.I),z=_(b,w(k,y)),A=_(r,w(k,a)),j=Array(p.length),M=Array(h.length);for(s=p.length-1;-1!==s;--s)j[s]=e[p[s]];for(s=h.length-1;-1!==s;--s)M[s]=e[h[s]];var O=_(M,w(j,w(d.I,y))),E=numeric._solveLP(O,z,A,i,o),F=E.solution;if(F!==F)return E;var S=w(d.I,_(a,w(y,F))),T=Array(e.length);for(s=p.length-1;-1!==s;--s)T[p[s]]=S[s];for(s=h.length-1;-1!==s;--s)T[h[s]]=F[s];return{solution:T,message:E.message,iterations:E.iterations}},numeric.MPStoLP=function(e){function t(t){throw new Error("MPStoLP: "+t+"\nLine "+r+": "+e[r]+"\nCurrent state: "+s[o]+"\n")}e instanceof String&&e.split("\n");var r,n,a,i,o=0,s=["Initial state","NAME","ROWS","COLUMNS","RHS","BOUNDS","ENDATA"],l=e.length,u=0,c={},d=[],f=0,p={},h=0,v=[],g=[],m=[];for(r=0;r<l;++r){a=e[r];var y=a.match(/\S*/g),x=[];for(n=0;n<y.length;++n)""!==y[n]&&x.push(y[n]);if(0!==x.length){for(n=0;n<s.length&&a.substr(0,s[n].length)!==s[n];++n);if(n<s.length){if(o=n,1===n&&(i=x[1]),6===n)return{name:i,c:v,A:numeric.transpose(g),b:m,rows:c,vars:p}}else switch(o){case 0:case 1:t("Unexpected line");case 2:switch(x[0]){case"N":0===u?u=x[1]:t("Two or more N rows");break;case"L":c[x[1]]=f,d[f]=1,m[f]=0,++f;break;case"G":c[x[1]]=f,d[f]=-1,m[f]=0,++f;break;case"E":c[x[1]]=f,d[f]=0,m[f]=0,++f;break;default:t("Parse error "+numeric.prettyPrint(x))}break;case 3:p.hasOwnProperty(x[0])||(p[x[0]]=h,v[h]=0,g[h]=numeric.rep([f],0),++h);var b=p[x[0]];for(n=1;n<x.length;n+=2)if(x[n]!==u){var w=c[x[n]];g[b][w]=(d[w]<0?-1:1)*parseFloat(x[n+1])}else v[b]=parseFloat(x[n+1]);break;case 4:for(n=1;n<x.length;n+=2)m[c[x[n]]]=(d[c[x[n]]]<0?-1:1)*parseFloat(x[n+1]);break;case 5:break;case 6:t("Internal error")}}}t("Reached end of file without ENDATA")},numeric.seedrandom={pow:Math.pow,random:Math.random},function(e,t,r,n,a,i,o){function s(e){var t,n,a=this,i=e.length,o=0,s=a.i=a.j=a.m=0;for(a.S=[],a.c=[],i||(e=[i++]);o<r;)a.S[o]=o++;for(o=0;o<r;o++)t=a.S[o],s=c(s+t+e[o%i]),n=a.S[s],a.S[o]=n,a.S[s]=t;a.g=function(e){var t=a.S,n=c(a.i+1),i=t[n],o=c(a.j+i),s=t[o];t[n]=s,t[o]=i;for(var l=t[c(i+s)];--e;)n=c(n+1),i=t[n],o=c(o+i),s=t[o],t[n]=s,t[o]=i,l=l*r+t[c(i+s)];return a.i=n,a.j=o,l},a.g(r)}function l(e,t,r,n,a){if(r=[],a=typeof e,t&&"object"==a)for(n in e)if(n.indexOf("S")<5)try{r.push(l(e[n],t-1))}catch(e){}return r.length?r:e+("string"!=a?"\0":"")}function u(e,t,r,n){for(e+="",r=0,n=0;n<e.length;n++)t[c(n)]=c((r^=19*t[c(n)])+e.charCodeAt(n));e="";for(n in t)e+=String.fromCharCode(t[n]);return e}function c(e){return e&r-1}t.seedrandom=function(n,c){var d,f=[];return n=u(l(c?[n,e]:arguments.length?n:[(new Date).getTime(),e,window],3),f),d=new s(f),u(d.S,e),t.random=function(){for(var e=d.g(6),t=o,n=0;e<a;)e=(e+n)*r,t*=r,n=d.g(1);for(;e>=i;)e/=2,t/=2,n>>>=1;return(e+n)/t},n},o=t.pow(r,6),a=t.pow(2,a),i=2*a,u(t.random(),e)}([],numeric.seedrandom,256,0,52),function(e){function t(e){if("object"!=typeof e)return e;var r,n=[],a=e.length;for(r=0;r<a;r++)n[r+1]=t(e[r]);return n}function r(e){if("object"!=typeof e)return e;var t,n=[],a=e.length;for(t=1;t<a;t++)n[t-1]=r(e[t]);return n}function n(e,t,r){var n,a,i,o,s;for(i=1;i<=r;i+=1){for(e[i][i]=1/e[i][i],s=-e[i][i],n=1;n<i;n+=1)e[n][i]=s*e[n][i];if(o=i+1,r<o)break;for(a=o;a<=r;a+=1)for(s=e[i][a],e[i][a]=0,n=1;n<=i;n+=1)e[n][a]=e[n][a]+s*e[n][i]}}function a(e,t,r,n){var a,i,o,s;for(i=1;i<=r;i+=1){for(s=0,a=1;a<i;a+=1)s+=e[a][i]*n[a];n[i]=(n[i]-s)/e[i][i]}for(o=1;o<=r;o+=1)for(i=r+1-o,n[i]=n[i]/e[i][i],s=-n[i],a=1;a<i;a+=1)n[a]=n[a]+s*e[a][i]}function i(e,t,r,n){var a,i,o,s,l,u;for(i=1;i<=r;i+=1){if(n[1]=i,u=0,(o=i-1)<1){if((u=e[i][i]-u)<=0)break;e[i][i]=Math.sqrt(u)}else{for(s=1;s<=o;s+=1){for(l=e[s][i],a=1;a<s;a+=1)l-=e[a][i]*e[a][s];l/=e[s][s],e[s][i]=l,u+=l*l}if((u=e[i][i]-u)<=0)break;e[i][i]=Math.sqrt(u)}n[1]=0}}function o(e,t,r,o,s,l,u,c,d,f,p,h,v,g,m,y){function x(){return m[F+v]=m[F+v+1],m[F+v+1]=0,h[v]=0,v-=1,g[2]=g[2]+1,0}var b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G;T=Math.min(o,f),_=2*o+T*(T+5)/2+2*f+1,L=1e-60;do{L+=L,Y=1+.1*L,H=1+.2*L}while(Y<=1||H<=1);for(b=1;b<=o;b+=1)m[b]=t[b];for(b=o+1;b<=_;b+=1)m[b]=0;for(b=1;b<=f;b+=1)h[b]=0;if(z=[],0===y[1]){if(i(e,r,o,z),0!==z[1])return void(y[1]=2);a(e,r,o,t),n(e,r,o)}else{for(w=1;w<=o;w+=1)for(s[w]=0,b=1;b<=w;b+=1)s[w]=s[w]+e[b][w]*t[b];for(w=1;w<=o;w+=1)for(t[w]=0,b=w;b<=o;b+=1)t[w]=t[w]+e[w][b]*s[b]}for(l[1]=0,w=1;w<=o;w+=1)for(s[w]=t[w],l[1]=l[1]+m[w]*s[w],m[w]=0,b=w+1;b<=o;b+=1)e[b][w]=0;for(l[1]=-l[1]/2,y[1]=0,j=o,M=j+o,F=M+T,O=F+T+1,E=O+T*(T+1)/2,C=E+f,b=1;b<=f;b+=1){for(q=0,w=1;w<=o;w+=1)q+=u[w][b]*u[w][b];m[C+b]=Math.sqrt(q)}for(v=0,g[1]=0,g[2]=0,G=0;;){if(999===(G=function(){for(g[1]=g[1]+1,_=E,b=1;b<=f;b+=1){for(_+=1,q=-c[b],w=1;w<=o;w+=1)q+=u[w][b]*s[w];if(Math.abs(q)<L&&(q=0),b>p)m[_]=q;else if(m[_]=-Math.abs(q),q>0){for(w=1;w<=o;w+=1)u[w][b]=-u[w][b];c[b]=-c[b]}}for(b=1;b<=v;b+=1)m[E+h[b]]=0;for(S=0,B=0,b=1;b<=f;b+=1)m[E+b]<B*m[C+b]&&(S=b,B=m[E+b]/m[C+b]);return 0===S?999:0}()))return;for(;;){if(0===(G=function(){for(b=1;b<=o;b+=1){for(q=0,w=1;w<=o;w+=1)q+=e[w][b]*u[w][S];m[b]=q}for(k=j,b=1;b<=o;b+=1)m[k+b]=0;for(w=v+1;w<=o;w+=1)for(b=1;b<=o;b+=1)m[k+b]=m[k+b]+e[b][w]*m[w];for(V=!0,b=v;b>=1;b-=1){for(q=m[b],_=O+b*(b+3)/2,k=_-b,w=b+1;w<=v;w+=1)q-=m[_]*m[M+w],_+=w;if(q/=m[k],m[M+b]=q,h[b]<p)break;if(q<0)break;V=!1,A=b}if(!V)for(N=m[F+A]/m[M+A],b=1;b<=v&&!(h[b]<p)&&!(m[M+b]<0);b+=1)(B=m[F+b]/m[M+b])<N&&(N=B,A=b);for(q=0,b=j+1;b<=j+o;b+=1)q+=m[b]*m[b];if(Math.abs(q)<=L){if(V)return y[1]=1,999;for(b=1;b<=v;b+=1)m[F+b]=m[F+b]-N*m[M+b];return m[F+v+1]=m[F+v+1]+N,700}for(q=0,b=1;b<=o;b+=1)q+=m[j+b]*u[b][S];for(P=-m[E+S]/q,U=!0,V||N<P&&(P=N,U=!1),b=1;b<=o;b+=1)s[b]=s[b]+P*m[j+b],Math.abs(s[b])<L&&(s[b]=0);for(l[1]=l[1]+P*q*(P/2+m[F+v+1]),b=1;b<=v;b+=1)m[F+b]=m[F+b]-P*m[M+b];if(m[F+v+1]=m[F+v+1]+P,!U){for(q=-c[S],w=1;w<=o;w+=1)q+=s[w]*u[w][S];if(S>p)m[E+S]=q;else if(m[E+S]=-Math.abs(q),q>0){for(w=1;w<=o;w+=1)u[w][S]=-u[w][S];c[S]=-c[S]}return 700}for(v+=1,h[v]=S,_=O+(v-1)*v/2+1,b=1;b<=v-1;b+=1)m[_]=m[b],_+=1;if(v===o)m[_]=m[o];else{for(b=o;b>=v+1&&0!==m[b]&&(I=Math.max(Math.abs(m[b-1]),Math.abs(m[b])),D=Math.min(Math.abs(m[b-1]),Math.abs(m[b])),B=m[b-1]>=0?Math.abs(I*Math.sqrt(1+D*D/(I*I))):-Math.abs(I*Math.sqrt(1+D*D/(I*I))),I=m[b-1]/B,D=m[b]/B,1!==I);b-=1)if(0===I)for(m[b-1]=D*B,w=1;w<=o;w+=1)B=e[w][b-1],e[w][b-1]=e[w][b],e[w][b]=B;else for(m[b-1]=B,R=D/(1+I),w=1;w<=o;w+=1)B=I*e[w][b-1]+D*e[w][b],e[w][b]=R*(e[w][b-1]+B)-e[w][b],e[w][b-1]=B;m[_]=m[v]}return 0}()))break;if(999===G)return;if(700===G)if(A===v)x();else{for(;;)if(function(){if(_=O+A*(A+1)/2+1,k=_+A,0===m[k])return 798;if(I=Math.max(Math.abs(m[k-1]),Math.abs(m[k])),D=Math.min(Math.abs(m[k-1]),Math.abs(m[k])),B=m[k-1]>=0?Math.abs(I*Math.sqrt(1+D*D/(I*I))):-Math.abs(I*Math.sqrt(1+D*D/(I*I))),I=m[k-1]/B,D=m[k]/B,1===I)return 798;if(0===I){for(b=A+1;b<=v;b+=1)B=m[k-1],m[k-1]=m[k],m[k]=B,k+=b;for(b=1;b<=o;b+=1)B=e[b][A],e[b][A]=e[b][A+1],e[b][A+1]=B}else{for(R=D/(1+I),b=A+1;b<=v;b+=1)B=I*m[k-1]+D*m[k],m[k]=R*(m[k-1]+B)-m[k],m[k-1]=B,k+=b;for(b=1;b<=o;b+=1)B=I*e[b][A]+D*e[b][A+1],e[b][A+1]=R*(e[b][A]+B)-e[b][A+1],e[b][A]=B}}(),797!==(G=function(){for(k=_-A,b=1;b<=A;b+=1)m[k]=m[_],_+=1,k+=1;return m[F+A]=m[F+A+1],h[A]=h[A+1],A+=1,A<v?797:0}()))break;x()}}}}function s(e,n,a,i,s,l){e=t(e),n=t(n),a=t(a);var u,c,d,f,p,h,v=[],g=[],m=[],y=[],x=[];if(s=s||0,l=l?t(l):[void 0,0],i=i?t(i):[],c=e.length-1,d=a[1].length-1,!i)for(u=1;u<=d;u+=1)i[u]=0;for(u=1;u<=d;u+=1)g[u]=0;for(f=0,p=Math.min(c,d),u=1;u<=c;u+=1)m[u]=0;for(v[1]=0,u=1;u<=2*c+p*(p+5)/2+2*d+1;u+=1)y[u]=0;for(u=1;u<=2;u+=1)x[u]=0;return o(e,n,c,c,m,v,a,i,c,d,s,g,f,x,y,l),h="",1===l[1]&&(h="constraints are inconsistent, no solution!"),2===l[1]&&(h="matrix D in quadratic function is not positive definite!"),{solution:r(m),value:r(v),unconstrained_solution:r(n),iterations:r(x),iact:r(g),message:h}}e.solveQP=s}(numeric),numeric.svd=function(e){function t(e,t){return e=Math.abs(e),t=Math.abs(t),e>t?e*Math.sqrt(1+t*t/e/e):0==t?e:t*Math.sqrt(1+e*e/t/t)}
var r,n=numeric.epsilon,a=1e-64/n,i=0,o=0,s=0,l=0,u=0,c=numeric.clone(e),d=c.length,f=c[0].length;if(d<f)throw"Need more rows than columns";var p=new Array(f),h=new Array(f);for(o=0;o<f;o++)p[o]=h[o]=0;var v=numeric.rep([f,f],0),g=0,m=0,y=0,x=0,b=0,w=0,_=0;for(o=0;o<f;o++){for(p[o]=m,_=0,u=o+1,s=o;s<d;s++)_+=c[s][o]*c[s][o];if(_<=a)m=0;else for(g=c[o][o],m=Math.sqrt(_),g>=0&&(m=-m),y=g*m-_,c[o][o]=g-m,s=u;s<f;s++){for(_=0,l=o;l<d;l++)_+=c[l][o]*c[l][s];for(g=_/y,l=o;l<d;l++)c[l][s]+=g*c[l][o]}for(h[o]=m,_=0,s=u;s<f;s++)_+=c[o][s]*c[o][s];if(_<=a)m=0;else{for(g=c[o][o+1],m=Math.sqrt(_),g>=0&&(m=-m),y=g*m-_,c[o][o+1]=g-m,s=u;s<f;s++)p[s]=c[o][s]/y;for(s=u;s<d;s++){for(_=0,l=u;l<f;l++)_+=c[s][l]*c[o][l];for(l=u;l<f;l++)c[s][l]+=_*p[l]}}b=Math.abs(h[o])+Math.abs(p[o]),b>x&&(x=b)}for(o=f-1;-1!=o;o+=-1){if(0!=m){for(y=m*c[o][o+1],s=u;s<f;s++)v[s][o]=c[o][s]/y;for(s=u;s<f;s++){for(_=0,l=u;l<f;l++)_+=c[o][l]*v[l][s];for(l=u;l<f;l++)v[l][s]+=_*v[l][o]}}for(s=u;s<f;s++)v[o][s]=0,v[s][o]=0;v[o][o]=1,m=p[o],u=o}for(o=f-1;-1!=o;o+=-1){for(u=o+1,m=h[o],s=u;s<f;s++)c[o][s]=0;if(0!=m){for(y=c[o][o]*m,s=u;s<f;s++){for(_=0,l=u;l<d;l++)_+=c[l][o]*c[l][s];for(g=_/y,l=o;l<d;l++)c[l][s]+=g*c[l][o]}for(s=o;s<d;s++)c[s][o]=c[s][o]/m}else for(s=o;s<d;s++)c[s][o]=0;c[o][o]+=1}for(n*=x,l=f-1;-1!=l;l+=-1)for(var k=0;k<50;k++){var z=!1;for(u=l;-1!=u;u+=-1){if(Math.abs(p[u])<=n){z=!0;break}if(Math.abs(h[u-1])<=n)break}if(!z){i=0,_=1;var A=u-1;for(o=u;o<l+1&&(g=_*p[o],p[o]=i*p[o],!(Math.abs(g)<=n));o++)for(m=h[o],y=t(g,m),h[o]=y,i=m/y,_=-g/y,s=0;s<d;s++)b=c[s][A],w=c[s][o],c[s][A]=b*i+w*_,c[s][o]=-b*_+w*i}if(w=h[l],u==l){if(w<0)for(h[l]=-w,s=0;s<f;s++)v[s][l]=-v[s][l];break}if(k>=49)throw"Error: no convergence.";for(x=h[u],b=h[l-1],m=p[l-1],y=p[l],g=((b-w)*(b+w)+(m-y)*(m+y))/(2*y*b),m=t(g,1),g=g<0?((x-w)*(x+w)+y*(b/(g-m)-y))/x:((x-w)*(x+w)+y*(b/(g+m)-y))/x,i=1,_=1,o=u+1;o<l+1;o++){for(m=p[o],b=h[o],y=_*m,m*=i,w=t(g,y),p[o-1]=w,i=g/w,_=y/w,g=x*i+m*_,m=-x*_+m*i,y=b*_,b*=i,s=0;s<f;s++)x=v[s][o-1],w=v[s][o],v[s][o-1]=x*i+w*_,v[s][o]=-x*_+w*i;for(w=t(g,y),h[o-1]=w,i=g/w,_=y/w,g=i*m+_*b,x=-_*m+i*b,s=0;s<d;s++)b=c[s][o-1],w=c[s][o],c[s][o-1]=b*i+w*_,c[s][o]=-b*_+w*i}p[u]=0,p[l]=g,h[l]=x}for(o=0;o<h.length;o++)h[o]<n&&(h[o]=0);for(o=0;o<f;o++)for(s=o-1;s>=0;s--)if(h[s]<h[o]){for(i=h[s],h[s]=h[o],h[o]=i,l=0;l<c.length;l++)r=c[l][o],c[l][o]=c[l][s],c[l][s]=r;for(l=0;l<v.length;l++)r=v[l][o],v[l][o]=v[l][s],v[l][s]=r;o=s}return{U:c,S:h,V:v}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t,r){!function(){"use strict";function e(e,t){var r=e.x-t.x,n=e.y-t.y;return r*r+n*n}function r(e,t,r){var n=t.x,a=t.y,i=r.x-n,o=r.y-a;if(0!==i||0!==o){var s=((e.x-n)*i+(e.y-a)*o)/(i*i+o*o);s>1?(n=r.x,a=r.y):s>0&&(n+=i*s,a+=o*s)}return i=e.x-n,o=e.y-a,i*i+o*o}function n(t,r){for(var n,a=t[0],i=[a],o=1,s=t.length;o<s;o++)n=t[o],e(n,a)>r&&(i.push(n),a=n);return a!==n&&i.push(n),i}function a(e,t){var n,a,i,o,s=e.length,l="undefined"!=typeof Uint8Array?Uint8Array:Array,u=new l(s),c=0,d=s-1,f=[],p=[];for(u[c]=u[d]=1;d;){for(a=0,n=c+1;n<d;n++)(i=r(e[n],e[c],e[d]))>a&&(o=n,a=i);a>t&&(u[o]=1,f.push(c,o,o,d)),d=f.pop(),c=f.pop()}for(n=0;n<s;n++)u[n]&&p.push(e[n]);return p}function i(e,t,r){var i=void 0!==t?t*t:1;return e=r?e:n(e,i),e=a(e,i)}"function"==typeof define&&define.amd?define(function(){return i}):void 0!==t?t.exports=i:"undefined"!=typeof self?self.simplify=i:window.simplify=i}()},{}],24:[function(e,t,r){"use strict";function n(e,t,r,n){this.points=e,this.ids=t,this.dimension=n,this.length=r}function a(e){var t,r,a;if(Array.isArray(e)){if(0===(t=e.length))return new n(null,null,0,0);r=e[0].length,a=o(d.mallocDouble(t*(r+1)),[t,r+1]),l(e,a.hi(t,r))}else{t=e.shape[0],r=e.shape[1];var i=e.dtype;i="int8"===i||"int16"===i||"int32"===i?"int32":"uint8"===i||"uint8_clamped"===i||"buffer"===i||"uint16"===i||"uint32"===i?"uint32":"float32"===i?"float32":"float64",a=o(d.malloc(t*(r+1)),[t,r+1]),u.assign(a.hi(t,r),e)}for(var h=0;h<t;++h)a.set(h,r,h);for(var v=c.malloc([t,r],e.dtype),g=d.mallocInt32(t),m=0,y=v.data,x=a.data,b=(p.log2(p.nextPow2(t)),s.compile(a.order,!0,a.dtype)),w=[a];m<t;){var _=w.shift(),k=_,z=0|k.shape[0];if(z>1){var A,j=p.log2(m+1)%r,M=f.root(z);A=b(k,M,function(e,t){return e.get(j)-t.get(j)});for(var O=v.index(m,0),E=A.offset,h=0;h<r;++h)y[O++]=x[E++];g[m]=x[E],m+=1,w.push(k.hi(M)),z>2&&w.push(k.lo(M+1))}else{for(var E=k.offset,O=v.index(m,0),h=0;h<r;++h)y[O+h]=x[E++];g[m]=x[E],m+=1}}return d.free(a.data),new n(v,g,t,r)}function i(e){var t=e.p,r=e.i;if(t){for(var a=t.length,i=d.mallocFloat64(a),s=0;s<a;++s)i[s]=t[s];for(var l=r.length,u=d.mallocInt32(l),s=0;s<l;++s)u[s]=r[s];var c=a/l|0;return new n(o(i,[l,c]),u,l,c)}return new n(null,null,0,e.d)}t.exports=a,t.exports.deserialize=i;var o=e("ndarray"),s=e("ndarray-select"),l=e("ndarray-pack"),u=e("ndarray-ops"),c=e("ndarray-scratch"),d=e("typedarray-pool"),f=e("inorder-tree-layout"),p=e("bit-twiddle"),h=e("./lib/heap.js"),v=n.prototype;v.serialize=function(){return this.length>0?{p:Array.prototype.slice.call(this.points.data,0,this.length*this.dimension),i:Array.prototype.slice.call(this.ids,0,this.length)}:{d:this.dimension}},v.range=function(e,t,r){var n=this.length;if(!(n<1)){for(var a=this.dimension,i=0;i<a;++i)if(t[i]<e[i])return;var o,s=this.points,u=this.ids,f=c.malloc([n,2,a]),h=d.mallocInt32(n),v=f.data,g=s.data,m=1,y=0;for(h[0]=0,l(e,f.pick(0,0)),l(t,f.pick(0,1));y<m;){for(var x=h[y],b=p.log2(x+1)%a,w=f.index(y,0,0),_=f.index(y,1,0),k=s.index(x,0),z=!0,i=0;i<a;++i){var A=g[k+i];if(A<v[w+i]||v[_+i]<A){z=!1;break}}if(z&&void 0!==(o=r(u[x])))break;var j=g[k+b],M=v[_+b],O=v[w+b];if(O<=j){var E=2*x+1;if(E<n){h[m]=E;for(var F=f.index(m,0,0),i=0;i<a;++i)v[F+i]=v[w+i];for(var S=f.index(m,1,0),i=0;i<a;++i)v[S+i]=v[_+i];v[S+b]=Math.min(M,j),m+=1}}if(j<=M){var T=2*(x+1);if(T<n){h[m]=T;for(var F=f.index(m,0,0),i=0;i<a;++i)v[F+i]=v[w+i];for(var S=f.index(m,1,0),i=0;i<a;++i)v[S+i]=v[_+i];v[F+b]=Math.max(O,j),m+=1}}y+=1}return c.free(f),d.free(h),o}},v.rnn=function(e,t,r){if(!(t<0)){var n=this.length;if(!(n<1)){var a,i=this.dimension,o=this.points,s=this.ids,l=c.malloc([n,i]),u=d.mallocInt32(n),f=l.data,h=o.data,v=1,g=0,m=t*t;u[0]=0;for(var y=0;y<i;++y)l.set(0,y,0);for(;g<v;){for(var x=u[g],b=o.index(x,0),w=0,y=0;y<i;++y)w+=Math.pow(e[y]-h[b+y],2);if(w<=m&&void 0!==(a=r(s[x])))break;for(var _=p.log2(x+1)%i,k=0,z=l.index(g,0),y=0;y<i;++y)y!==_&&(k+=f[z+y]);var A=e[_],j=h[b+_],M=f[z+_],O=M,E=M;A<j?E=Math.max(M,Math.pow(j-A,2)):O=Math.max(M,Math.pow(j-A,2));var F=O+k,S=E+k;if(F<=m){var T=2*x+1;if(T<n){u[v]=T;for(var C=l.index(v,0),y=0;y<i;++y)f[C+y]=f[z+y];f[C+_]=O,v+=1}}if(S<=m){var B=2*(x+1);if(B<n){u[v]=B;for(var C=l.index(v,0),y=0;y<i;++y)f[C+y]=f[z+y];f[C+_]=E,v+=1}}g+=1}return c.free(l),d.free(u),a}}},v.nn=function(e,t){var r=this.length;if(r<1)return-1;if("number"==typeof t){if(t<0)return-1}else t=1/0;var n=this.dimension,a=this.points,i=a.data,o=d.mallocFloat64(n),s=new h(r,n+1),l=s.index,u=s.data;l[0]=0;for(var c=0;c<=n;++c)u[c]=0;s.count+=1;for(var f=-1,v=t;s.count>0&&!(u[0]>=v);){for(var g=l[0],m=a.index(g,0),y=0,c=0;c<n;++c)y+=Math.pow(e[c]-i[m+c],2);y<v&&(v=y,f=g);for(var x=p.log2(g+1)%n,b=0,c=0;c<n;++c){var w=u[c+1];c!==x&&(b+=w),o[c]=w}var _=e[x],k=i[m+x],z=o[x],A=z,j=z;_<k?j=Math.max(z,Math.pow(k-_,2)):A=Math.max(z,Math.pow(k-_,2));var M=A+b,O=j+b;if(s.pop(),M<v){var E=2*g+1;if(E<r){var F=s.count;l[F]=E;var S=F*(n+1);u[S]=M;for(var c=1;c<=n;++c)u[S+c]=o[c-1];u[S+x+1]=A,s.push()}}if(O<v){var T=2*(g+1);if(T<r){var F=s.count;l[F]=T;var S=F*(n+1);u[S]=O;for(var c=1;c<=n;++c)u[S+c]=o[c-1];u[S+x+1]=j,s.push()}}}return d.freeFloat64(o),s.dispose(),f<0?-1:this.ids[f]},v.knn=function(e,t,r){if("number"==typeof r){if(r<0)return[]}else r=1/0;var n=this.length;if(n<1)return[];if("number"==typeof t){if(t<=0)return[];t=0|Math.min(t,n)}else t=n;var a=this.ids,i=this.dimension,o=this.points,s=o.data,l=d.mallocFloat64(i),u=new h(t,1),c=u.index,f=u.data,v=new h(n,i+1),g=v.index,m=v.data;g[0]=0;for(var y=0;y<=i;++y)m[y]=0;v.count+=1;for(var x=r;v.count>0&&!(m[0]>=x);){for(var b=g[0],w=o.index(b,0),_=0,y=0;y<i;++y)_+=Math.pow(e[y]-s[w+y],2);if(_<x){u.count>=t&&u.pop();var k=u.count;c[k]=b,f[k]=-_,u.push(),u.count>=t&&(x=-f[0])}for(var z=p.log2(b+1)%i,A=0,y=0;y<i;++y){var j=m[y+1];y!==z&&(A+=j),l[y]=j}var M=e[z],O=s[w+z],E=l[z],F=E,S=E;M<O?S=Math.max(E,Math.pow(O-M,2)):F=Math.max(E,Math.pow(O-M,2));var T=F+A,C=S+A;if(v.pop(),T<x){var B=2*b+1;if(B<n){var q=v.count;g[q]=B;var N=q*(i+1);m[N]=T;for(var y=1;y<=i;++y)m[N+y]=l[y-1];m[N+z+1]=F,v.push()}}if(C<x){var P=2*(b+1);if(P<n){var q=v.count;g[q]=P;var N=q*(i+1);m[N]=C;for(var y=1;y<=i;++y)m[N+y]=l[y-1];m[N+z+1]=S,v.push()}}}d.freeFloat64(l),v.dispose();for(var I=new Array(u.count),a=this.ids,y=u.count-1;y>=0;--y)I[y]=a[c[0]],u.pop();return u.dispose(),I},v.dispose=function(){d.free(this.points.data),d.freeInt32(this.ids),this.points=null,this.ids=null,this.length=0}},{"./lib/heap.js":25,"bit-twiddle":2,"inorder-tree-layout":12,ndarray:21,"ndarray-ops":16,"ndarray-pack":17,"ndarray-scratch":19,"ndarray-select":20,"typedarray-pool":26}],25:[function(e,t,r){"use strict";function n(e){return 1&e?e-1>>1:(e>>1)-1}function a(e,t){this.count=0,this.dataSize=t,this.index=i.mallocInt32(e),this.data=i.mallocFloat64(e*t)}t.exports=a;var i=e("typedarray-pool"),o=a.prototype;o.heapSwap=function(e,t){var r=this.data,n=this.index,a=this.dataSize,i=n[e];n[e]=n[t],n[t]=i;for(var o=a*e,s=a*t,l=0;l<a;++l){var u=r[o];r[o]=r[s],r[s]=u,o+=1,s+=1}},o.heapUp=function(e){for(var t=this.dataSize,r=(this.index,this.data),a=r[t*e];e>0;){var i=n(e);if(i>=0){if(a<r[t*i]){this.heapSwap(e,i),e=i;continue}}break}},o.heapDown=function(e){for(var t=this.dataSize,r=(this.index,this.data),n=this.count,a=r[t*e];;){var i=a,o=2*e+1,s=2*(e+1),l=e;if(o<n){var u=r[t*o];u<i&&(l=o,i=u)}if(s<n){r[t*s]<i&&(l=s)}if(l===e)break;this.heapSwap(e,l),e=l}},o.pop=function(){this.count-=1,this.heapSwap(0,this.count),this.heapDown(0)},o.push=function(){this.heapUp(this.count),this.count+=1},o.dispose=function(){i.freeInt32(this.index),i.freeFloat64(this.data)}},{"typedarray-pool":26}],26:[function(e,t,r){(function(t,n){"use strict";function a(e){if(e){var t=e.length||e.byteLength,r=y.log2(t);_[r].push(e)}}function i(e){a(e.buffer)}function o(e){var e=y.nextPow2(e),t=y.log2(e),r=_[t];return r.length>0?r.pop():new ArrayBuffer(e)}function s(e){return new Uint8Array(o(e),0,e)}function l(e){return new Uint16Array(o(2*e),0,e)}function u(e){return new Uint32Array(o(4*e),0,e)}function c(e){return new Int8Array(o(e),0,e)}function d(e){return new Int16Array(o(2*e),0,e)}function f(e){return new Int32Array(o(4*e),0,e)}function p(e){return new Float32Array(o(4*e),0,e)}function h(e){return new Float64Array(o(8*e),0,e)}function v(e){return b?new Uint8ClampedArray(o(e),0,e):s(e)}function g(e){return new DataView(o(e),0,e)}function m(e){e=y.nextPow2(e);var t=y.log2(e),r=k[t];return r.length>0?r.pop():new n(e)}var y=e("bit-twiddle"),x=e("dup");t.__TYPEDARRAY_POOL||(t.__TYPEDARRAY_POOL={UINT8:x([32,0]),UINT16:x([32,0]),UINT32:x([32,0]),INT8:x([32,0]),INT16:x([32,0]),INT32:x([32,0]),FLOAT:x([32,0]),DOUBLE:x([32,0]),DATA:x([32,0]),UINT8C:x([32,0]),BUFFER:x([32,0])});var b="undefined"!=typeof Uint8ClampedArray,w=t.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=x([32,0])),w.BUFFER||(w.BUFFER=x([32,0]));var _=w.DATA,k=w.BUFFER;r.free=function(e){if(n.isBuffer(e))k[y.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,r=0|y.log2(t);_[r].push(e)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeInt8=r.freeInt16=r.freeInt32=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=i,r.freeArrayBuffer=a,r.freeBuffer=function(e){k[y.log2(e.length)].push(e)},r.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return o(e);switch(t){case"uint8":return s(e);case"uint16":return l(e);case"uint32":return u(e);case"int8":return c(e);case"int16":return d(e);case"int32":return f(e);case"float":case"float32":return p(e);case"double":case"float64":return h(e);case"uint8_clamped":return v(e);case"buffer":return m(e);case"data":case"dataview":return g(e);default:return null}return null},r.mallocArrayBuffer=o,r.mallocUint8=s,r.mallocUint16=l,r.mallocUint32=u,r.mallocInt8=c,r.mallocInt16=d,r.mallocInt32=f,r.mallocFloat32=r.mallocFloat=p,r.mallocFloat64=r.mallocDouble=h,r.mallocUint8Clamped=v,r.mallocDataView=g,r.mallocBuffer=m,r.clearCache=function(){for(var e=0;e<32;++e)w.UINT8[e].length=0,w.UINT16[e].length=0,w.UINT32[e].length=0,w.INT8[e].length=0,w.INT16[e].length=0,w.INT32[e].length=0,w.FLOAT[e].length=0,w.DOUBLE[e].length=0,w.UINT8C[e].length=0,_[e].length=0,k[e].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"bit-twiddle":2,buffer:3,dup:8}],27:[function(e,t,r){"use strict";function n(e,t){for(var r=1,n=e.length,a=e[0],i=e[0],o=1;o<n;++o)if(i=a,a=e[o],t(a,i)){if(o===r){r++;continue}e[r++]=a}return e.length=r,e}function a(e){for(var t=1,r=e.length,n=e[0],a=e[0],i=1;i<r;++i,a=n)if(a=n,(n=e[i])!==a){if(i===t){t++;continue}e[t++]=n}return e.length=t,e}function i(e,t,r){return 0===e.length?e:t?(r||e.sort(t),n(e,t)):(r||e.sort(),a(e))}t.exports=i},{}],28:[function(e,t,r){var n;n=e("../color/sort.coffee"),t.exports=function(e,t,r,a,i,o,s){var l,u,c;for(a||(a="asc"),i instanceof Array||(i=[i]),r instanceof Array||(r=[r]),o&&void 0!==s&&"number"!=typeof s&&(s=o.id.nesting.indexOf(s)),c=0,l=0;l<r.length&&(u=r[l],e=o&&e.d3plus&&e.d3plus.sortKeys?e.d3plus.sortKeys[u]:e[u],t=o&&t.d3plus&&t.d3plus.sortKeys?t.d3plus.sortKeys[u]:t[u],0===(c=o&&i.indexOf(u)>=0?n(e,t):e<t?-1:1)&&l!==r.length-1);)l++;return"asc"===a?c:-c}},{"../color/sort.coffee":45}],29:[function(e,t,r){t.exports=function(e,t){var r;return e instanceof Array&&(r=void 0===t||null===t?t:t.constructor,e.indexOf(t)>=0||e.indexOf(r)>=0)}},{}],30:[function(e,t,r){var n,a;n=e("./comparator.coffee"),a=e("../core/fetch/sort.coffee"),t.exports=function(e,t,r,i,o,s){var l,u,c,d;if(!e||e.length<=1)return e||[];if(o)for(t||(t=o.order.value||o.size.value||o.id.value),r||(r=o.order.sort.value),i||(i=o.color.value||[]),c=0,d=e.length;c<d;c++)l=e[c],l.d3plus||(l.d3plus={}),u="d3plus"in l&&"d3plus"in l.d3plus?l.d3plus:l,l.d3plus.sortKeys=a(o,u,t,i,s);return e.sort(function(e,a){return n(e,a,t,r,i,o,s)})}},{"../core/fetch/sort.coffee":61,"./comparator.coffee":28}],31:[function(e,t,r){t.exports=function(e,t){return void 0===t?e:!1===t?[]:t instanceof Array?t:(e instanceof Array||(e=[]),e.indexOf(t)>=0?e.splice(e.indexOf(t),1):e.push(t),e)}},{}],32:[function(e,t,r){var n;n=function(e){var t,r,a,i;if(i=n.tested,e in i)return i[e];for(r=0,a=!1;r<document.styleSheets.length;){if(t=document.styleSheets[r],t.href&&t.href.indexOf(e)>=0){a=!0;break}r++}return a},n.tested={},t.exports=n},{}],33:[function(e,t,r){t.exports=/(MSIE|Trident\/|Edge\/)/i.test(navigator.userAgent)},{}],34:[function(e,t,r){var n,a;n=e("./ie.js"),a=e("./touch.coffee"),t.exports=a?{click:"touchend",down:"touchstart",up:"touchend",over:n?"mouseenter":"mouseover",out:n?"mouseleave":"mouseout",move:"mousemove"}:{click:"click",down:"mousedown",up:"mouseup",over:n?"mouseenter":"mouseover",out:n?"mouseleave":"mouseout",move:"mousemove"}},{"./ie.js":33,"./touch.coffee":39}],35:[function(e,t,r){var n;n=function(){var e;return e="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"-o-transform"in document.body.style?"-o-":"",n=function(){return e},e},t.exports=n},{}],36:[function(e,t,r){t.exports="rtl"===d3.select("html").attr("dir")},{}],37:[function(e,t,r){t.exports={y:function(){return void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop},x:function(){return void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft}}},{}],38:[function(e,t,r){var n;n=function(){var e,t,r,a,i;return e=document.createElement("p"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),a=e.offsetWidth,t.style.overflow="scroll",i=e.offsetWidth,a===i&&(i=t.clientWidth),document.body.removeChild(t),r=a-i,n=function(){return r},r},t.exports=n},{}],39:[function(e,t,r){t.exports=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},{}],40:[function(e,t,r){t.exports=function(e){var t;return t=d3.hsl(e),t.l>.45&&(t.s>.8&&(t.s=.8),t.l=.45),t.toString()}},{}],41:[function(e,t,r){t.exports=function(e,t){var r;return void 0===t&&(t=.5),r=d3.hsl(e),t=(1-r.l)*t,r.l+=t,r.s-=t,r.toString()}},{}],42:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o;return r||(r=1),n||(n=1),e=d3.rgb(e),t=d3.rgb(t),o=(r*e.r+n*t.r-r*n*t.r)/(r+n-r*n),i=(r*e.g+n*t.g-r*n*t.g)/(r+n-r*n),a=(r*e.b+n*t.b-r*n*t.b)/(r+n-r*n),d3.rgb(o,i,a).toString()}},{}],43:[function(e,t,r){var n;n=e("./scale.coffee"),t.exports=function(e,t){var r;return r=e||Math.floor(20*Math.random()),(t=t||n)(r)}},{"./scale.coffee":44}],44:[function(e,t,r){t.exports=d3.scale.ordinal().range(["#b22200","#282F6B","#EACE3F","#B35C1E","#224F20","#5F487C","#759143","#419391","#993F88","#e89c89","#ffee8d","#afd5e8","#f7ba77","#a5c697","#c5b5e5","#d1d392","#bbefd0","#e099cf"])},{}],45:[function(e,t,r){t.exports=function(e,t){var r,n;return r=d3.hsl(e),n=d3.hsl(t),e=0===r.s?361:r.h,t=0===n.s?361:n.h,e===t?r.l-n.l:e-t}},{}],46:[function(e,t,r){t.exports=function(e){var t,r,n,a,i;return a=d3.rgb(e),n=a.r,r=a.g,t=a.b,i=(299*n+587*r+114*t)/1e3,i>=128?"#444444":"#f7f7f7"}},{}],47:[function(e,t,r){t.exports=function(e){var t,r,n;return e+="",e=e.replace(RegExp(" ","g"),""),0===e.indexOf("rgb")&&(e=e.split("(")[1].split(")")[0].split(",").slice(0,3).join(",")),0===e.indexOf("hsl")&&(e=e.split(",")[2].split(")")[0]),r=d3.rgb(e).toString(),t=["black","#000","#000000","0%","0,0,0"],n=t.indexOf(e)>=0,"#000000"!==r||n}},{}],48:[function(e,t,r){var n,a,i;n=e("../../client/ie.js"),i=e("./wiki.coffee"),a=function(e,t,r){r=r||"",n||"undefined"!=typeof InstallTrigger?console.log("[ D3plus ] "+t):0===e.indexOf("group")?console[e]("%c[ D3plus ]%c "+t,"font-weight: 800;color: #b35c1e;margin-left: 0px;","font-weight:200;"+r):console[e]("%c"+t,r+"font-weight:200;")},a.comment=function(e){this("log",e,"color:#aaa;")},a.error=function(e,t){this("groupCollapsed","ERROR: "+e,"font-weight:800;color:#D74B03;"),this.stack(),this.wiki(t),this.groupEnd()},a.group=function(e){this("group",e,"color:#888;")},a.groupCollapsed=function(e){this("groupCollapsed",e,"color:#888;")},a.groupEnd=function(){n||console.groupEnd()},a.log=function(e){this("log",e,"color:#444444;")},a.stack=function(){var e,t,r,a,i,o,s;n||(e=new Error,e.stack&&(o=e.stack.split("\n"),o=o.filter(function(e){return 0!==e.indexOf("Error")&&e.indexOf("d3plus.js:")<0&&e.indexOf("d3plus.min.js:")<0}),o.length&&o[0].length&&(i=window.chrome?"at ":"@",s=o[0],s.indexOf(i)>=0&&(s=s.split(i)[1]),o=s.split(":"),3===o.length&&o.pop(),t=o.pop(),a=o.join(":").split("/"),a=a[a.length-1],r="line "+t+" of "+a+": "+s,this("log",r,"color:#D74B03;"))))},a.time=function(e){n||console.time(e)},a.timeEnd=function(e){n||console.timeEnd(e)},a.warning=function(e,t){this("groupCollapsed",e,"color:#888;"),this.stack(),this.wiki(t),this.groupEnd()},a.wiki=function(e){e&&(e in i&&(e=d3plus.repo+"wiki/"+i[e]),this("log","documentation: "+e,"color:#aaa;"))},t.exports=a},{"../../client/ie.js":33,"./wiki.coffee":49}],49:[function(e,t,r){t.exports={active:"Visualizations#active",aggs:"Visualizations#aggs",alt:"Forms#alt",attrs:"Visualizations#attrs",axes:"Visualizations#axes",background:"Visualizations#background",color:"Visualizations#color",cols:"Visualizations#cols",config:"Visualizations#config",container:"Visualizations#container",coords:"Visualizations#coords",csv:"Visualizations#csv",data:"Visualizations#data",depth:"Visualizations#depth",descs:"Visualizations#descs",dev:"Visualizations#dev",draw:"Visualizations#draw",edges:"Visualizations#edges",error:"Visualizations#error",focus:"Visualizations#focus",font:"Visualizations#font",footer:"Visualizations#footer",format:"Visualizations#format",height:"Visualizations#height",history:"Visualizations#history",hover:"Forms#hover",icon:"Visualizations#icon",id:"Visualizations#id",keywords:"Forms#keywords",labels:"Visualizations#labels",legend:"Visualizations#legend",links:"Visualizations#links",margin:"Visualizations#margin",messages:"Visualizations#messages",method:"Methods",mouse:"Visualizations#mouse",nodes:"Visualizations#nodes",open:"Forms#open",order:"Visualizations#order",remove:"Forms#remove",search:"Forms#search",select:"Forms#select",selectAll:"Forms#selectAll",shape:"Visualizations#shape",size:"Visualizations#size",temp:"Visualizations#temp",text:"Visualizations#text",time:"Visualizations#time",timeline:"Visualizations#timeline",timing:"Visualizations#timing",title:"Visualizations#title",tooltip:"Visualizations#tooltip",total:"Visualizations#total",type:"Visualizations#type",ui:"Visualizations#ui",width:"Visualizations#width",x:"Visualizations#x",y:"Visualizations#y",zoom:"Visualizations#zoom"}},{}],50:[function(e,t,r){var n=e("../../util/buckets.coffee"),a=e("../fetch/value.coffee"),i=e("../console/print.coffee");t.exports=function(e){if(e.dev.value&&i.time("getting color data range"),e.color.domain.value)var t=e.color.domain.value;else{var t=[];e.data.pool.forEach(function(r){var n=parseFloat(a(e,r,e.color.value));"number"==typeof n&&!isNaN(n)&&t.indexOf(n)<0&&t.push(n)})}if(e.dev.value&&i.timeEnd("getting color data range"),t.length>1){if(e.dev.value&&i.time("calculating color scale"),t=d3.extent(t),t[0]<0&&t[1]>0){var r=e.color.range;3==r.length&&(t.push(t[1]),t[1]=0)}else if(t[1]>0&&t[0]>=0){var r=e.color.heatmap;t=n(t,r.length)}else{var r=e.color.range.slice(0);t[0]<0?r.pop():r.shift()}e.color.valueScale=d3.scale.sqrt().domain(t).range(r).interpolate(d3.interpolateRgb),e.dev.value&&i.timeEnd("calculating color scale")}else e.color.valueScale=null}},{"../../util/buckets.coffee":202,"../console/print.coffee":48,"../fetch/value.coffee":63}],51:[function(e,t,r){var n=e("../fetch/value.coffee"),a=e("../console/print.coffee"),i=e("../../object/validate.coffee");t.exports=function(e,t){e.dev.value&&a.time("filtering data");var r=d3.keys(e.data.keys||{});"attrs"in e&&(r=r.concat(d3.keys(e.attrs.keys||{}))),t=t.filter(function(t){return null!==n(e,t,e.id.value)});var o=e.types[e.type.value].requirements||[];e.data.filters.forEach(function(a){r.indexOf(e[a].value)>=0&&o.indexOf(a)>=0&&(t=t.filter(function(t){var r=n(e,t,e[a].value);return"y"===a&&e.y2.value&&null===r?r=n(e,t,e.y2.value):"x"===a&&e.x2.value&&null===r&&(r=n(e,t,e.x2.value)),"size"===a?"number"==typeof r:null!==r}))});var s=e.data.solo.length?"solo":"mute";return e.data[s].length?e.data[s].forEach(function(r){function o(t){var n=e[r][s].value,a=!1;return n.forEach(function(e){"function"==typeof e?a=e(t):e===t&&(a=!0)}),"solo"===s?a:!a}function l(t,a){if(!a&&e[r].nesting){var s=e[r].nesting;i(s)&&(s=d3.values(s));for(var l=0;l<s.length;l++){var u=t.filter(function(t){return o(n(e,t,s[l]))});u.length&&(t=u)}}else t=t.filter(function(t){return o(n(e,t,e[r].value))});return t}t=l(t),"id"===r&&("nodes"in e&&e.nodes.value&&(e.dev.value&&a.time("filtering nodes"),e.nodes.restricted=l(e.nodes.value),e.dev.value&&a.timeEnd("filtering nodes")),"edges"in e&&e.edges.value&&(e.dev.value&&a.time("filtering edges"),e.edges.restricted=e.edges.value.filter(function(t){return 2===l([t[e.edges.source],t[e.edges.target]]).length}),e.dev.value&&a.timeEnd("filtering edges")))}):"nodes"in e&&(e.nodes.restricted=void 0,e.edges.restricted=void 0),e.dev.value&&a.timeEnd("filtering data"),t}},{"../../object/validate.coffee":170,"../console/print.coffee":48,"../fetch/value.coffee":63}],52:[function(e,t,r){var n=e("./nest.js"),a=e("../fetch/value.coffee"),i=e("../console/print.coffee"),o=e("../../util/uniques.coffee");t.exports=function(e){var t;if(e.data.time={values:[]},e.time&&e.time.value){e.dev.value&&(t="analyzing time periods",i.time(t)),e.data.time.values=o(e.data.value,e.time.value,a,e),e.data.time.values.sort(function(e,t){return e-t});var r=[];e.data.time.values.forEach(function(t,n){if(0!==n){var a=e.data.time.values[n-1];r.push(t-a),n===e.data.time.values.length-1&&(e.data.time.total=t-e.data.time.values[0])}}),r=d3.min(r),e.data.time.step=r;var s=["Milliseconds","Seconds","Minutes","Hours","Date","Month","FullYear"],l=[1e3,60,60,24,30,12,1];e.data.time.periods=s;var u=function(t,r,n){return e.data.time.stepDivider||(arr=l.slice(0,n),arr.length?e.data.time.stepDivider=arr.reduce(function(e,t){return e*t}):e.data.time.stepDivider=1),Math.round(Math.floor(r-t)/e.data.time.stepDivider)},c=e.data.time.total;s.forEach(function(t,n){var a="Date"===t?28:l[n];if(!e.data.time.stepType&&(n===s.length-1||Math.round(r)<a)){e.data.time.stepType=t;var i=e.data.time.values[0],o=e.data.time.values[e.data.time.values.length-1];e.data.time.stepIntervals=u(i,o,n)}!e.data.time.totalType&&(n===s.length-1||Math.round(c)<a)&&(e.data.time.totalType=t),r/=a,c/=a}),e.data.time.values.forEach(function(t,r){if(0!==r){var n=e.data.time.values[0];e.data.time.dataSteps.push(u(n,t,s.indexOf(e.data.time.stepType)))}else e.data.time.dataSteps=[0]});var d=e.time.format.value,f=e.format.locale.value,p=[function(e){return e.getMilliseconds()},function(e){return e.getSeconds()},function(e){return e.getMinutes()},function(e){return e.getHours()},function(e){return 1!=e.getDate()},function(e){return e.getMonth()},function(e){return!0}];e.data.time.functions=p;var h=function(e,t,r){if(e===t)return r&&f.timeFormat[e+"Small"]?f.timeFormat[e+"Small"]:f.timeFormat[e];if(s.indexOf(e)>=4||s.indexOf(t)<=3)return f.timeFormat[t+"-"+e];var n;return n="Date"===t?f.timeFormat[t]:f.timeFormat[t+"-Date"],"Hours"===e?n+" "+f.timeFormat[e]:n+" "+f.timeFormat["Hours-"+e]};if(e.data.time.getFormat=h,d)"string"==typeof d?e.data.time.format=d3.locale(f.format).timeFormat(d):"function"==typeof d?e.data.time.format=d:d instanceof Array&&(e.data.time.format=d3.locale(f.format).timeFormat.multi(d)),e.data.time.multiFormat=e.data.time.format;else{for(var v=e.data.time.stepType,g=e.data.time.totalType,m=[],y=s.indexOf(v);y<=s.indexOf(g);y++){var x=y-1<s.indexOf(v)?s[y]:s[y-1],b=s[y]===x&&v!==g,w=h(x,s[y],b);m.push([w,p[y]])}e.data.time.format=d3.locale(f.format).timeFormat(h(v,g)),m.length>1?(m[m.length-1][1]=function(e){return!0},e.data.time.multiFormat=d3.locale(f.format).timeFormat.multi(m)):e.data.time.multiFormat=e.data.time.format}e.data.time.ticks=[];for(var _=d3.min(e.data.time.values),k=d3.max(e.data.time.values),z=0;z<=e.data.time.stepIntervals;z++){var A=new Date(_);A["set"+e.data.time.stepType](A["get"+e.data.time.stepType]()+z),A<=k&&e.data.time.ticks.push(A)}e.dev.value&&i.timeEnd(t)}if(e.dev.value&&(t="nesting data by time and depths",i.time(t)),e.data.nested={},0===e.data.time.values.length)e.data.nested.all={},e.id.nesting.forEach(function(t,r){var a=e.id.nesting.slice(0,r+1);e.data.nested.all[t]=n(e,e.data.value,a)});else{var j=e.data.value.reduce(function(t,r){var n=a(e,r,e.time.value).getTime();return n in t||(t[n]=[]),t[n].push(r),t},{});e.data.time.values.forEach(function(t){var r=t.getTime();e.data.nested[r]={},e.id.nesting.forEach(function(t,a){var i=e.id.nesting.slice(0,a+1);e.data.nested[r][t]=n(e,j[r],i)})})}e.dev.value&&i.timeEnd(t)}},{"../../util/uniques.coffee":208,"../console/print.coffee":48,"../fetch/value.coffee":63,"./nest.js":56}],53:[function(e,t,r){var n;n=e("../fetch/value.coffee"),t.exports=function(e,t,r){var a,i,o,s,l,u,c,d,f,p;if(i=d3.nest(),e.id.grouping.value)for(void 0===r&&(r=e.id.nesting),o=s=0,u=r.length;s<u;o=++s)d=r[o],o<e.depth.value&&function(t){i.key(function(r){return n(e,r.d3plus,t)})}(d);for(f=[],l=0,c=t.length;l<c;l++)a=t[l],(p=e.size.value?n(e,a,e.size.value):1)&&"number"==typeof p&&p>0&&(delete a.d3plus.r,delete a.d3plus.x,delete a.d3plus.y,f.push({d3plus:a,id:a[e.id.value],value:p}));return i.entries(f)}},{"../fetch/value.coffee":63}],54:[function(e,t,r){var n,a,i=[].indexOf||function(e){for(var t=0,r=this.length;t<r;t++)if(t in this&&this[t]===e)return t;return-1};n=e("../console/print.coffee"),a=e("../../object/validate.coffee"),t.exports=function(e,t){var r,o,s,l,u,c,d,f,p;if(d=t+" key analysis",e.dev.value&&n.time(d),e[t].keys={},r=function(n){var o,s,l,u,c,d,f;if(n instanceof Array){for(c=[],s=0,u=n.length;s<u;s++)o=n[s],c.push(r(o));return c}if(a(n)){d=[];for(l in n)f=n[l],0===l.indexOf("d3plus")||i.call(e[t].keys,l)>=0||null===f?d.push(void 0):d.push(e[t].keys[l]=typeof f);return d}},a(e[t].value)){l=d3.keys(e[t].value).length===e.id.nesting.length,u=e[t].value;for(o in u)if(f=u[o],l&&e.id.nesting.indexOf(o)>=0&&a(f))for(s in f)p=f[s],r(p);else r(f)}else{c=e[t].value;for(o in c)f=c[o],r(f)}if(e.dev.value)return n.time(d)}},{"../../object/validate.coffee":170,"../console/print.coffee":48}],55:[function(e,t,r){var n,a;n=e("../console/print.coffee"),a=e("../../object/validate.coffee"),t.exports=function(e,t,r){var i,o,s;return i=e.dev.value,i&&n.time("loading "+t),s=e[t].url,e[t].filetype.value?o=e[t].filetype.value:(o=s.slice(s.length-5).split("."),o=o.length>1&&o[1],o?("txt"===o&&(o="text"),e[t].filetype.accepted.indexOf(o)<0&&(o="json")):o="json"),("dsv"===o?d3.dsv(e[t].delimiter.value,"text/plain"):d3[o])(s,function(l,u){var c,d;if(!l&&u){if("function"==typeof e[t].callback){if(d=e[t].callback(u))if(a(d)&&t in d)for(c in d)c in e&&(e[c].value=d[c]);else e[t].value=d}else e[t].value=u;["json"].indexOf(o)<0&&e[t].value.forEach(function(e){var t;t=[];for(c in e)isNaN(e[c])?"false"===e[c].toLowerCase()?t.push(e[c]=!1):"true"===e[c].toLowerCase()?t.push(e[c]=!0):"null"===e[c].toLowerCase()?t.push(e[c]=null):"undefined"===e[c].toLowerCase()?t.push(e[c]=void 0):t.push(void 0):t.push(e[c]=parseFloat(e[c]));return t}),e[t].changed=!0,e[t].loaded=!0}else e.error.internal='Could not load data from: "'+s+'"';return i&&n.timeEnd("loading "+t),r()})}},{"../../object/validate.coffee":170,"../console/print.coffee":48}],56:[function(e,t,r){var n=e("../fetch/value.coffee"),a=e("../../object/validate.coffee"),i=e("../../util/uniques.coffee"),o=function(e,t,r,a){void 0===a&&(a=!0);var o=d3.nest(),c=[],d="temp"in e?["active","temp","total"]:[];r.length?r.forEach(function(t,r){o.key(function(r){return n(e,r,t)})}):o.key(function(e){return!0}),a&&e.axes&&e.axes.discrete&&(!e.time||e[e.axes.discrete].value!==e.time.value)&&o.key(function(t){return n(e,t,e[e.axes.discrete].value)});var f=r.length&&e.id.nesting.indexOf(r[r.length-1])>=0,p=r.length&&f?r.length-1:0;f?e.id.nesting[p]:e.depth.value;o.rollup(function(t){if(1===t.length&&"d3plus"in t[0])return c.push(t[0]),t[0];t=t.reduce(function(e,t){return t.values instanceof Array?e.concat(t.values):(e.push(t),e)},[]);var a={d3plus:{data:{},depth:p}};if(d3.sum(t,function(e){return"d3plus"in e&&e.d3plus.merged?1:0})===t.length)for(var o=0;o<t.length;o++){var u=t[o];a.d3plus.merged||(a.d3plus.merged=[]),a.d3plus.merged=a.d3plus.merged.concat(u.d3plus.merged),u.d3plus.text&&(a.d3plus.text=u.d3plus.text)}for(var f=0;f<d.length;f++){var h=d[f],v=e.aggs&&e.aggs.value[g]?e.aggs.value[g]:"sum";"d3plus"in t[0]&&h in t[0].d3plus?a.d3plus[h]=d3.sum(t,function(e){return e.d3plus[h]}):a.d3plus[h]="function"==typeof v?v(t):d3[v](t,function(t){var r="total"===h?1:0;return e[h].value&&"number"!=typeof(r=n(e,t,e[h].value))&&(r=r?1:0),r})}for(var g in e.data.keys){if(g in a.d3plus.data)a[g]=a.d3plus[g];else{var m=e.aggs&&e.aggs.value[g]?e.aggs.value[g]:"sum",y=typeof m,x=e.data.keys[g],b=e.id.nesting.indexOf(g)>=0,w="time"in e&&g===e.time.value
;if(g in a.d3plus.data)a[g]=a.d3plus[g];else if("function"===y)a[g]=e.aggs.value[g](t);else if(w)a[g]=l(i(t,g));else if(e.axes&&e.axes.discrete&&e[e.axes.discrete].value===g)a[g]=i(t,g);else if("number"!==x||"string"!==y||b){var _=s(t,g),k=1===_.length?_[0][g]:i(_,g);if(1===_.length)a[g]=k;else if(k&&k.length)k instanceof Array||(k=[k]),b&&e.id.nesting.indexOf(g)>p?a[g]=_:a[g]=k;else if(b){var z=e.id.nesting.indexOf(g)-1;z>=p&&(!("endPoint"in a.d3plus)||a.d3plus.endPoint>p)&&(a.d3plus.endPoint=p)}}else{var A=t.map(function(e){return e[g]});A=A.filter(function(e){return typeof e===x}),A.length&&(a[g]=d3[m](A))}}g in a&&a[g]instanceof Array&&1===a[g].length&&(a[g]=a[g][0])}for(var j=0;j<r.length;j++){var M=r[j];M in a||(a[M]=n(e,t[0],M))}return c.push(a),a});var h=function(t,n,a){if(t.children){"number"==e.data.keys[r[n]]&&(t.key=parseFloat(t.key)),a[r[n]]=t.key,delete t.key;for(var i in a)t[i]=a[i];n++,t.children.forEach(function(e){h(e,n,a)})}};return o=o.entries(t).map(u).map(function(e){return h(e,0,{}),e}),c},s=function(e,t){function r(e){e instanceof Array?e.forEach(r):a(e)&&t in e&&(e[t]instanceof Array?e[t].forEach(r):n.push(e))}var n=[];return r(e),n},l=function(e){function t(e){for(var n=0;n<e.length;n++){var a=e[n];a&&(a.constructor===Array?t(a):r.push(a))}}var r=[];return t(e),i(r)},u=function(e){return e.values&&e.values.length?(e.children=e.values.map(function(e){return u(e)}),delete e.values,e):e.values?e.values:e};t.exports=o},{"../../object/validate.coffee":170,"../../util/uniques.coffee":208,"../fetch/value.coffee":63}],57:[function(e,t,r){var n=e("../../array/sort.coffee"),a=e("./nest.js"),i=e("../fetch/value.coffee"),o=(e("../fetch/color.coffee"),e("../fetch/text.js"));t.exports=function(e,t,r){var s;if("number"==typeof(s=!1===e.size.threshold.value?0:"number"==typeof e.size.threshold.value?e.size.threshold.value:"function"==typeof e.size.threshold.value?e.size.threshold.value(e):"number"==typeof e.types[e.type.value].threshold?e.types[e.type.value].threshold:"function"==typeof e.types[e.type.value].threshold?e.types[e.type.value].threshold(e):.02)&&s>0){var l=[],u=0===e.depth.value?0:{},c=[],d=[],f=[],p={},h=d3.nest();r&&h.key(function(t){return i(e,t,r)}),h.rollup(function(t){var n=t.length;e.aggs.value[e.size.value]?"function"==typeof e.aggs.value[e.size.value]?n=e.aggs.value[e.size.value](t):"string"==typeof e.aggs.value[e.size.value]&&(n=d3[e.aggs.value[e.size.value]](t,function(t){return i(e,t,e.size.value)})):n=d3.sum(t,function(t){return i(e,t,e.size.value)});var a=r?i(e,t[0],r):"all";return p[a]=n,n}).entries(t),t.forEach(function(t){var n=i(e,t,e.id.value),a=i(e,t,e.size.value),o=r?i(e,t,r):"all";if(a/p[o]>=s&&l.indexOf(n)<0&&(l.push(n),e.depth.value)){var u=i(e,t,e.id.nesting[e.depth.value-1]);d.indexOf(u)<0&&d.push(u)}});var v=t.filter(function(t){var r=i(e,t,e.id.value),n=l.indexOf(r)>=0,a=e.depth.value?i(e,t,e.id.nesting[e.depth.value-1]):null;if(null!==a&&d.indexOf(a)<0&&f.indexOf(a)<0&&f.push(a),!n){var o=i(e,t,e.size.value);o>0&&(0===e.depth.value?o>u&&(u=o):(a in u||(u[a]=0),o>u[a]&&(u[a]=o)),c.push(t))}return n});if(c.length>1){c=n(c,e.size.value,"desc",[],e);var g=e.id.nesting.slice(0,e.depth.value);e.types[e.type.value].requirements.indexOf(e.axes.discrete)>=0&&g.push(e[e.axes.discrete].value);var m=a(e,c,g);m.forEach(function(t){var r=e.id.nesting[e.depth.value-1],n=i(e,t,r);if(children=r?c.filter(function(t){return i(e,t,r)===n}):c,children.length>1){e.id.nesting.forEach(function(r,n){if(e.depth.value==n){var a=t[r];t[r]="string"==typeof a?"d3plus_other_"+a:"d3plus_other"}else n>e.depth.value&&delete t[r]}),e.color.value&&"string"===e.color.type&&(0===e.depth.value?t[e.color.value]=e.color.missing:t[e.color.value]=i(e,n,e.color.value,r)),e.icon.value&&(t[e.icon.value]=i(e,n,e.icon.value,r)),n&&(t.d3plus.depth=e.depth.value);var a;0===e.depth.value?(a=e.format.value(e.format.locale.value.ui.values,{key:"threshold",vars:e}),a+=" < "+e.format.value(u,{key:e.size.value,vars:e})):(a=o(e,t,e.depth.value-1),a=a.length?a[0].split(" < ")[0]:e.format.value(e.format.locale.value.ui.values,{key:"threshold",vars:e}),f.indexOf(n)<0&&(a+=" < "+e.format.value(u[n],{key:e.size.value,vars:e}))),f.indexOf(n)<0&&(a+=" ("+e.format.value(100*s,{key:"share",vars:e})+")"),t.d3plus.threshold=u,t.d3plus.merged=children,e.text.value&&(t[e.text.value]=a),t.d3plus.text=a}})}else m=c;return v.concat(m)}return t}},{"../../array/sort.coffee":30,"../fetch/color.coffee":59,"../fetch/text.js":62,"../fetch/value.coffee":63,"./nest.js":56}],58:[function(e,t,r){var n;n=e("../../font/sizes.coffee"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b;if(b=t.values||e.data.time.ticks,g=t.style||{},s=t.limit||e.width.value,m={},c=e.data.time.periods,v=e.data.time.stepType,y=e.data.time.totalType,i=e.data.time.functions,o=e.data.time.getFormat,l=e.format.locale.value.format,e.time.format.value)m.format=e.data.time.format,m.values=b,m.sizes=n(b.map(function(e){return m.format(e)}),g);else for(u=c.indexOf(v);u<=c.indexOf(y);){if(x=b.filter(function(e){var t,r;if(u===c.indexOf(v))return!0;if(t=!0,r=u-1,u<0)return!0;for(;r>=c.indexOf(v)&&t;)t=!i[r](e),r--;return t}),c[u]===y)a=d3.locale(l).timeFormat(o(c[u],y));else{for(d=u,a=[];d<=c.indexOf(y);)f=d-1<c.indexOf(v)?d:d-1,f=c[f],h=c[d]===f&&v!==y,r=o(f,c[d],h),a.push([r,i[d]]),d++;a[a.length-1][1]=function(){return!0},a=d3.locale(l).timeFormat.multi(a)}if(p=n(x.map(function(e){return a(e)}),g),d3.sum(p,function(e){return e.width})<s||u===c.indexOf(y)){m.format=a,m.values=x,m.sizes=p;break}u++}return m}},{"../../font/sizes.coffee":100}],59:[function(e,t,r){var n,a,i,o,s,l,u;n=e("./value.coffee"),o=e("../../color/random.coffee"),l=e("../../color/validate.coffee"),u=e("../../object/validate.coffee"),s=e("../../util/uniques.coffee"),t.exports=function(e,t,r){var o,l,c,d,f;if(u(t)&&"d3plus"in t&&"color"in t.d3plus)return t.d3plus.color;if(void 0===r&&(r=e.id.value),"number"==typeof r&&(r=e.id.nesting[r]),e.color.value){for(c=[],d=e.id.nesting.indexOf(r);d>=0;){if(l=e.id.nesting[d],f=s(t,e.color.value,n,e,l),1===f.length&&(f=f[0]),!(f instanceof Array)&&void 0!==f&&null!==f){o=a(e,t,f,r),c.indexOf(o)<0&&c.push(o);break}d--}return 1===c.length?c[0]:e.color.missing}return i(e,t,r)},a=function(e,t,r,n){return r?e.color.valueScale?e.color.valueScale(r):l(r)?r:i(e,r,n):e.color.value&&"function"==typeof e.color.valueScale?e.color.valueScale(0):i(e,t,n)},i=function(e,t,r){return u(t)&&(t=n(e,t,r)),t instanceof Array&&(t=t[0]),o(t,e.color.scale.value)}},{"../../color/random.coffee":43,"../../color/validate.coffee":47,"../../object/validate.coffee":170,"../../util/uniques.coffee":208,"./value.coffee":63}],60:[function(e,t,r){var n=e("../data/filter.js"),a=e("../data/nest.js"),i=e("../console/print.coffee"),o=e("../../string/format.js"),s=e("../../string/list.coffee");t.exports=function(e,t,r){if(!e.data.value)return[];void 0===r&&(r=e.depth.value);var l=e.id.nesting[r];if(!t||t instanceof Array||(t=[t]),!t&&"time"in e){t=[];var u=e.time.solo.value.length?"solo":"mute",c=e.time[u].value;if(c.length){t=[];for(var d=0;d<c.length;d++){var f=c[d];if("function"==typeof f)for(var p=0;p<e.data.time.values.length;p++){var h=e.data.time.values[p].getTime();f(h)&&t.push(h)}else if(f.constructor===Date)t.push(new Date(f).getTime());else{f+="",4===f.length&&parseInt(f)+""===f&&(f+="/01/01");var v=new Date(f);"Invalid Date"!==v&&t.push(v.getTime())}}"mute"===u&&(t=e.data.time.values.filter(function(e){return t.indexOf(e.getTime())<0}))}else t.push("all")}else t=["all"];if(t.indexOf("all")>=0&&e.data.time.values.length){t=e.data.time.values.slice(0);for(var g=0;g<t.length;g++)t[g]=t[g].getTime()}var m=[e.type.value,l,r].concat(e.data.filters).concat(t),y=e.data.solo.length?"solo":"mute",x=d3.keys(e.data.cache),b=e.types[e.type.value].filter||void 0;if(e.data[y].length)for(var w=0;w<e.data[y].length;w++){var _=e.data[y][w],k=e[_][y].value.slice(0);k.unshift(_),k.unshift(y),m=m.concat(k)}e.axes&&e.axes.discrete&&m.push(e.axes.discrete),m=m.join("_"),e.data.cacheID=m;for(var z=0;z<x.length;z++){if(x[z].split("_").slice(1).join("_")===m){m=(new Date).getTime()+"_"+m,e.data.cache[m]=e.data.cache[x[z]],delete e.data.cache[x[z]];break}}var A;if(e.data.cache[m])return e.dev.value&&i.comment("data already cached"),A=e.data.cache[m].data,"nodes"in e&&(e.nodes.restricted=e.data.cache[m].nodes,e.edges.restricted=e.data.cache[m].edges),"function"==typeof b&&(A=b(e,A)),A;var j=[];if(A=[],e.data.value&&e.data.value.length)for(var M=0;M<t.length;M++){var O=t[M];e.data.nested[O]?A=A.concat(e.data.nested[O][l]):j.push(O)}if(0===A.length&&j.length&&!e.error.internal){j.length>1&&(j=d3.extent(j)),j=j.map(function(t){return e.data.time.format(new Date(t))}),j=j.join(" - ");var E=e.format.locale.value.error.dataYear,F=e.format.locale.value.ui.and;j=s(j,F),e.error.internal=o(E,j),e.time.missing=!0}else{if(e.time&&(e.time.missing=!1),t.length>1){var S=!1;if(["x","y","x2","y2"].forEach(function(t){e[t].value===e.time.value&&"discrete"===e[t].scale.value&&(S=!0)}),!S){var T=e.id.nesting.slice(0,r+1);A=a(e,A,T)}}A=A?n(e,A):[],20===x.length&&(x.sort(),delete e.data.cache[x[0]]),m=(new Date).getTime()+"_"+m,e.data.cache[m]={data:A},"nodes"in e&&(e.data.cache[m].nodes=e.nodes.restricted,e.data.cache[m].edges=e.edges.restricted),"function"==typeof b&&(A=b(e,A)),e.dev.value&&i.comment("storing data in cache")}return A}},{"../../string/format.js":171,"../../string/list.coffee":172,"../console/print.coffee":48,"../data/filter.js":51,"../data/nest.js":56}],61:[function(e,t,r){var n,a,i;i=e("./value.coffee"),n=e("./color.coffee"),a=e("./text.js"),t.exports=function(e,t,r,o,s){var l,u,c,d,f,p;for(r instanceof Array||(r=[r]),o instanceof Array||(o=[o]),e&&(void 0===s?s=e.id.value:"number"!=typeof s&&(s=e.id.nesting.indexOf(s))),f={},u=0,d=r.length;u<d;u++)c=r[u],p=e?o.indexOf(c)>=0?n(e,t,s):c===e.text.value?a(e,t,s):3===d3.keys(t).length&&t.d3plus&&t.key&&t.values?i(e,t.values.map(function(e){return e.d3plus}),c,s):i(e,t,c,s):t[c],[e.data.keys[c],e.attrs.keys[c]].indexOf("number")>=0?(l=e.order.agg.value||e.aggs.value[c]||"sum",l.constructor===String&&(l=d3[l]),p instanceof Array||(p=[p]),p=l(p)):(p instanceof Array&&(p=p[0]),p="string"==typeof p?p.toLowerCase():p),f[c]=p;return f}},{"./color.coffee":59,"./text.js":62,"./value.coffee":63}],62:[function(e,t,r){var n=e("./value.coffee"),a=e("../../object/validate.coffee"),i=e("../../util/uniques.coffee");t.exports=function(e,t,r){"number"!=typeof r&&(r=e.depth.value);var o,s=e.id.nesting[r];e.text.nesting&&a(e.text.nesting)?o=e.text.nesting[s]?e.text.nesting[s]:e.text.value:(o=[],e.text.value&&r===e.depth.value&&o.push(e.text.value),o.push(s)),o instanceof Array||(o=[o]);var l=[];if(a(t)&&"d3plus"in t&&t.d3plus.text)l.push(t.d3plus.text.toString()),l.push(e.format.value(t.d3plus.text.toString(),{vars:e,data:t}));else{var u=a(t)?t:void 0;u&&t[e.id.value]instanceof Array?t=t[e.id.value]:t instanceof Array||(t=[t]),o.forEach(function(r){var a=i(t,r,n,e,s);a.length&&(a.length>1&&(a=a.filter(function(e){return e instanceof Array||"string"==typeof e&&e.indexOf(" < ")<0})),a=a.map(function(t){return t instanceof Array?(t=t.filter(function(e){return e}),t.map(function(t){return e.format.value(t.toString(),{vars:e,data:u,key:r})})):t?e.format.value(t.toString(),{vars:e,data:u,key:r}):void 0}),1===a.length&&(a=a[0]),l.push(a))})}return l}},{"../../object/validate.coffee":170,"../../util/uniques.coffee":208,"./value.coffee":63}],63:[function(e,t,r){var n,a,i,o,s,l,u,c,d,f;d=e("../../object/validate.coffee"),c=e("../../util/uniques.coffee"),u=function(e,t,r,o){var s,l,u,f;if(l=d(t),"function"==typeof r&&l)return r(t,e);if(l){if(r in t)return t[r];if(s=e.data.cacheID+"_"+o,n(t,s,e),r in t.d3plus.data[s])return t.d3plus.data[s][r];if(o in t)t=t[o];else{if(!(e.id.value in t))return null;if(t=t[e.id.value],o!==r&&(u=i(e,t,o,e.id.value)),null!==u&&void 0!==u||(u=a(e,t,o,e.id.value)),null===u||void 0===u)return null;if(o===r)return u;t=u}}return t instanceof Array&&!d(t[0])&&(t=c(t)),t instanceof Array&&d(t[0])&&(f=c(t,r),f.length)?f:(f=i(e,t,r,o))?f:f=a(e,t,r,o)},i=function(e,t,r,n){var a;return e.data.viz instanceof Array&&r in e.data.keys&&(a=c(l(e.data.viz,t,n),r)),a&&a.length?a:null},a=function(e,t,r,n){var a,i,o,s;if("attrs"in e&&e.attrs.value&&r in e.attrs.keys)if((a=d(e.attrs.value)&&n in e.attrs.value?e.attrs.value[n]:e.attrs.value)instanceof Array){if(o=c(l(a,t,n),r),o.length)return o}else if(t instanceof Array){if(a=[function(){var e,r,n;if(i in a){for(n=[],e=0,r=t.length;e<r;e++)i=t[e],n.push(a[i]);return n}}()],a.length&&(s=c(a,r),s.length))return s}else if(t in a)return a[t][r];return null},l=function(e,t,r){return t instanceof Array?e.filter(function(e){return t.indexOf(e[r])>=0}):e.filter(function(e){return e[r]===t})},n=function(e,t,r){return"d3plus"in e||(e.d3plus={}),"data"in e.d3plus||(e.d3plus.data={}),!(r.data.changed||r.attrs&&r.attrs.changed)&&t in e.d3plus.data||(e.d3plus.data[t]={}),e},f=function(e,t,r,n,a){var i,o,s,l,u,c,f;if(null===a)return a;c="time"in e&&e.time.value===n,a instanceof Array||(a=[a]);for(s=l=0,u=a.length;l<u;s=++l)f=a[s],c&&null!==f&&f.constructor!==Date&&(f+="",4===f.length&&parseInt(f)+""===f&&(f+="/01/01"),"Invalid Date"!==(o=new Date(f))&&(a[s]=o));return 1===a.length&&(a=a[0]),null===a||!d(t)||"string"!=typeof n||n in t||(i=e.data.cacheID+"_"+r,t.d3plus.data[i][n]=a),a},s=function(e,t,r,n){var a,i,o,s,l;for(l=[],i=0,o=t.length;i<o;i++)a=t[i],d(a)?(s=u(e,a,r,n),l.push(f(e,a,n,r,s))):l.push(a);return"number"!=typeof l[0]&&(l=c(l)),1===l.length?l[0]:l},o=function(e,t,r,n){var a,i;return r?"number"==typeof r?r:(a=d(t),n||(n=e.id.value),a&&t.values instanceof Array?i=s(e,t.values,r,n):a&&t[r]instanceof Array?i=s(e,t[r],r,n):t instanceof Array?i=s(e,t,r,n):(i=u(e,t,r,n),i=f(e,t,n,r,i)),i):null},t.exports=o},{"../../object/validate.coffee":170,"../../util/uniques.coffee":208}],64:[function(e,t,r){t.exports=function(e){var t,r,n;return["div","svg"].indexOf(e)<0&&(e="div"),r={position:"absolute",left:"-9999px",top:"-9999px",visibility:"hidden",display:"block"},t="div"===e?{}:{position:"absolute"},n=d3.select("body").selectAll(e+".d3plus_tester").data([0]),n.enter().append(e).attr("class","d3plus_tester").style(r).attr(t),n}},{}],65:[function(e,t,r){t.exports={dev:{accepted:"{0} ليس قيمة مقبولة لـ{1}، يرجى إستخدام أحد الإجراءات التالية: {2}.",deprecated:"تم إزالة الدالة {0}، يرجى تحديث المصدر ليستخدام البديل {1}.",noChange:"لم يتم تحديث {0} بسبب عدم وجود تغيرات عليه.",noContainer:"الحاوية غير موجودة في الصفحة {0}.",of:"من",oldStyle:"تم دمج الخصائص الشكلية لـ{0} داخل .{1}().",sameEdge:"لا يمكن لحواف الشكل أن تكون متصله بنفسها، سيتم إزالة هذه الحواف تلقائيًا {0}.",set:"تم حفظ {0}.",setLong:"تم حفظ {0} بالقيمة {1}.",setContainer:"يرجى تحديد عنصر الحاوية بإستخدام .container()."},error:{accepted:"{0} ليس {1} مقبول للشكل البياني {2}، رجاءً إستخدم أحد هذه الطرق: {3}.",connections:"لا يوجد روابط متصلة مع {0}.",data:"البيانات غير متوفرة.",dataYear:"البيانات غير متوفرة لـ{0}.",lib:"يتطلب رسم الشكل البياني {0} توفر المكتبة البرمجية {1}.",libs:"يتطلب رسم الشكل البياني {0} توفرهذه المكتبات البرمجية: {1}.",method:"يتطلب الرسم البياني {0} وجود الدالة {1}.",methods:"يتطلب الرسم البياني {0} وجود الدوال التالية: {1}."},lowercase:[],method:{active:"أجزاء نشطة",color:"لون",depth:"عمق",dev:"مُفصَّل",focus:"تركيز",icon:"أيقونة",id:"معرف",height:"طول",labels:"وسم",legend:"مفسِّر",margin:"هامش",messages:"رسائل الحالة",order:"رتِّب",search:"بحث",shape:"شكل",size:"حجم",style:"نمط",temp:"أجزاء مؤقتة",text:"نص",time:"وقت",timeline:"جدول زمني",total:"مجوع الأجزاء",type:"نوع",width:"عرض",x:"محور سيني",y:"محور صادي",zoom:"زوم",mode:"طريقة",mute:"إخفاء",solo:"منفرد"},time:["تاريخ","يوم","شهر","وقت","سنة"],visualization:{bubbles:"فقاعات",chart:"مخطط بياني",geo_map:"خريطة جغرافية",line:"مخطط بياني خطّي",network:"شبكة",rings:"خواتم",scatter:"مخطط بياني نقاطي",stacked:"رسم بياني مكدس",tree_map:"رسم بياني شجري",bar:"مخطط بياني شريطي",box:"مخطط بياني صنوقي",paths:"مسارات",pie:"مخطط بياني دائري",table:"الجدول"},ui:{and:"و",back:"العودة",collapse:"أنقر للإخفاء",error:"خطأ",expand:"أنقر للتفاصيل",loading:"جار التحميل...",more:"{0} أخرى",moreInfo:"أنقر لمزيد من المعلومات",noResults:"لا يوجد نتائج تطابق {0}.",primary:"الروابط الإتصالية الأساسية",share:"شارك",total:"مجموع",values:"القيم",including:"بما فيها",or:"أو",iqr:"مجموعة الشرائح الربعية ل{0}",max:"الحد الأعلى",min:"الحد الأدنى",percentile:"المئين {0}",tukey_bottom:"التوكي الأسفل",tukey_top:"التوكي الأعلى",quartile_first:"الربع الأول",quartile_third:"الربع الثالث",median:"وسيط"},message:{data:"البيانات تحت التحليل",draw:"رسم المخطط البياني",initializing:"تهيئة {0}",loading:"تحميل البيانات",tooltipReset:"إعادة تهيئة التفاصيل المنبثقة",ui:"تحديث واجهة المستخدم"},uppercase:[]}},{}],66:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:[""," €"],dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"]},error:{accepted:"{0} ist kein gültiger {1} für {2}-Darstellungen. Benutzen Sie bitte: {3}.",connections:"Keine Verbindungen verfügbar für {0}.",data:"Keine Daten verfügbar",dataYear:"Für {0} sind keine Daten verfügbar.",lib:"{0}-Darstellungen erfordern das Laden der Bibliothek {1}.",libs:"{0}-Darstellungen erfordern das Laden folgender Bibliotheken: {1}.",method:"{0}-Darstellungen erfordern die Methode {1}.",methods:"Weitere Einstellungen für folgende Methoden {1} sind bei {0}-Darstellungen erforderlich."},lowercase:["ein","ein","und","wie","bei","aber","durch","für","von","wenn","in","in","in der Nähe","noch","von","auf","auf","oder","pro","das","die","zu","mit","über","gegen","gegen."],method:{active:"aktive Segmente",color:"Farbe",depth:"Tiefe",dev:"ausführlich",focus:"Fokus",icon:"Symbol",id:"Kennung",height:"Höhe",labels:"Beschriftungen",legend:"Legende",margin:"Rand",messages:"Statusmeldungen",order:"Reihenfolge",search:"Suche",shape:"Form",size:"Größe",style:"Stil",temp:"temporäre Segmente",text:"Text",time:"Zeit",timeline:"Zeitleiste",total:"Segmente gesamt",type:"Typ",width:"Breite",x:"x-Achse",y:"y-Achse",zoom:"Zoom",mode:"Modus",mute:"ausblenden",solo:"isolieren"},time:["Datum","Tag","Monat","Zeit","Jahr"],visualization:{bubbles:"Blasen",chart:"Diagramm",geo_map:"Karte",line:"Liniendiagramm",network:"Netzwerk",rings:"Ringe",scatter:"Punktdiagramm",stacked:"Gestapelte Fläche",tree_map:"Baumdiagramm",bar:"Balkendiagramm",box:"Boxplot",paths:"Pfade",pie:"Kreisdiagramm",table:"Tabelle"},ui:{and:"und",back:"zurück",collapse:"Zum Ausblenden klicken",error:"Fehler",expand:"Zum Einblenden klicken",loading:"Lade...",more:"{0} weitere",moreInfo:"Für zusätzliche Informationen klicken",noResults:"Keine Ergebnisse für {0} gefunden.",primary:"Primäre Verbindungen",share:"verteilung",total:"gesamt",values:"Werte",including:"einschließlich",or:"oder",iqr:"Interquartilsabstände {0}",max:"Maximalwert",min:"Minimalwert",percentile:"Perzentil P{0}",tukey_bottom:"Unterer Ausreißer",tukey_top:"Oberer Ausreißer",quartile_first:"Unteres Quartil Q1",quartile_third:"Oberes Quartil Q3",median:"Medianwert"},message:{data:"analysiere Daten",draw:"Darstellung wird gerendert",initializing:"initialisiere {0}",loading:"Daten werden geladen",tooltipReset:"Tooltips zurücksetzen",ui:"aktualisiere Oberfläche"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","BIP","HVAC","ID","IT","FuE","TV","UI"]}},{}],67:[function(e,t,r){t.exports={dev:{accepted:"{0} is not an accepted value for {1}, please use one of the following: {2}.",deprecated:"the {0} method has been removed, please update your code to use {1}.",noChange:"{0} was not updated because it did not change.",noContainer:"cannot find a container on the page matching {0}.",of:"of",oldStyle:"style properties for {0} have now been embedded directly into .{1}().",sameEdge:"edges cannot link to themselves. automatically removing self-referencing edge {0}.",set:"{0} has been set.",setLong:"{0} has been set to {1}.",setContainer:"please define a container div using .container()"},error:{accepted:"{0} is not an accepted {1} for {2} visualizations, please use one of the following: {3}.",connections:"no connections available for {0}.",data:"no data available",dataYear:"no data available for {0}.",lib:"{0} visualizations require loading the {1} library.",libs:"{0} visualizations require loading the following libraries: {1}.",method:"{0} visualizations require setting the {1} method.",methods:"{0} visualizations require setting the following methods: {1}."},format:{decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%A, %B %-d, %Y %X",date:"%-m/%-d/%Y",time:"%I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},lowercase:["a","an","and","as","at","but","by","for","from","if","in","into","near","nor","of","on","onto","or","per","that","the","to","with","via","vs","vs."],message:{data:"analyzing data",draw:"drawing visualization",initializing:"initializing {0}",loading:"loading data",tooltipReset:"resetting tooltips",ui:"updating ui"},method:{active:"active segments",color:"color",depth:"depth",dev:"verbose",focus:"focus",icon:"icon",id:"id",height:"height",labels:"labels",legend:"legend",margin:"margin",messages:"status messages",mode:"mode",mute:"hide",order:"order",search:"search",shape:"shape",size:"size",solo:"isolate",style:"style",temp:"temporary segments",text:"text",time:"time",timeline:"timeline",total:"total segments",type:"type",width:"width",x:"x axis",y:"y axis",zoom:"zoom"},time:["date","day","month","time","year"],timeFormat:{FullYear:"%Y",Month:"%B",MonthSmall:"%b",Date:"%A %-d",DateSmall:"%-d",Hours:"%I %p",Minutes:"%I:%M",Seconds:"%Ss",Milliseconds:"%Lms","FullYear-Month":"%b %Y","FullYear-Date":"%-m/%-d/%Y","Month-Date":"%b %-d","Hours-Minutes":"%I:%M %p","Hours-Seconds":"%I:%M:%S %p","Hours-Milliseconds":"%H:%M:%S.%L","Minutes-Seconds":"%I:%M:%S %p","Minutes-Milliseconds":"%H:%M:%S.%L","Seconds-Milliseconds":"%H:%M:%S.%L"},ui:{and:"and",back:"back",collapse:"click to collapse",error:"error",expand:"click to expand",including:"including",iqr:"interquartile range for {0}",loading:"loading...",max:"maximum",median:"median",min:"minimum",more:"{0} more",moreInfo:"click for more info",or:"or",noResults:"no results matching {0}.",percentile:"{0} percentile",primary:"primary connections",quartile_first:"first quartile",quartile_third:"third quartile",share:"share",total:"total",tukey_bottom:"bottom tukey",tukey_top:"top tukey",values:"values"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","ER","GDP","HVAC","ID","IT","PCP","R&D","TV","UI"],visualization:{bar:"Bar Chart",box:"Box Plot",bubbles:"Bubbles",chart:"Chart",geo_map:"Geo Map",line:"Line Plot",network:"Network",paths:"Paths",pie:"Pie Chart",rings:"Rings",scatter:"Scatter Plot",stacked:"Stacked Area",table:"Table",tree_map:"Tree Map"}}},{}],68:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:[""," €"],dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom","lun","mar","mié","jue","vie","sáb"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"]},dev:{accepted:"{0} no es un valor aceptado para {1}, por favor utilice uno de los siguientes: {2}.",deprecated:"el método {0} ha sido eliminado, por favor, actualiza tu código para utilizar {1}.",noChange:"{0} no se actualiza porque no cambió.",noContainer:"no se puede encontrar un contenedor en la página correspondiente a {0}.",of:"de",oldStyle:"propiedades de estilo para {0} ahora se han incorporado directamente en. {1} ().",sameEdge:"los vínculos no se pueden enlazar con si mismos. eliminando automáticamente el vínculo {0} que se autorreferencia.",set:"{0} se ha establecido.",setLong:"{0} ha sido establecido a {1}.",setContainer:"defina un div contenedor utilizando .container ()"},error:{accepted:"{0} no es un {1} aceptado para visualizaciones de {2}, por favor utilice uno de los siguientes: {3}.",connections:"no hay conexiones disponibles para {0}.",data:"No hay datos disponibles",dataYear:"no hay datos disponibles para {0}.",lib:"{0} visualizaciones requieren cargar las siguientes librerías: {1}.",libs:"{0} visualizaciones requieren cargar las siguientes librerías: {1}.",method:"{0} visualizaciones requieren establecer el método {1}.",methods:"{0} visualizaciones requieren establecer los siguientes métodos: {1}."},lowercase:["una","y","en","pero","en","de","o","el","la","los","las","para","a","con"],method:{active:"segmentos activos",color:"color",depth:"profundidad",dev:"detallado",focus:"foco",icon:"ícono",id:"id",height:"alto",labels:"rótulo",legend:"leyenda",margin:"margen",messages:"mensajes de estado",order:"orden",search:"búsqueda",shape:"forma",size:"tamaño",style:"estilo",temp:"segmentos temporales",text:"texto",time:"tiempo",timeline:"línea de tiempo",total:"segmentos totales",type:"tipo",width:"anchura",x:"eje x",y:"eje Y",zoom:"zoom",mode:"modo",mute:"ocultar",solo:"aislar"},time:["fecha","día","mes","hora","año"],visualization:{bubbles:"Burbujas",chart:"Gráfico",geo_map:"Mapa",line:"Gráfico de linea",network:"Red",rings:"Anillos",scatter:"Gráfico De Dispersión",stacked:"Área Apilada",tree_map:"Tree Map",bar:"Gráfico De Barras",box:"Diagrama de Cajas",paths:"Caminos",pie:"Gráfico de Pastel",table:"Tabla"},ui:{and:"y",back:"atrás",collapse:"click para cerrar",error:"error",expand:"haga clic para ampliar",loading:"Cargando ...",more:"{0} más",moreInfo:"clic para más información",noResults:"no se encontraron resultados para {0}.",primary:"relaciones principales",share:"participación",total:"total",values:"valores",including:"Incluyendo",or:"o",iqr:"rango intercuartil para {0}",max:"máximo",min:"mínimo",percentile:"{0} percentil",tukey_bottom:"Tukey inferior",tukey_top:"la parte superior de Tukey",quartile_first:"primer cuartil",quartile_third:"tercer cuartil",median:"mediana"},message:{data:"analizando los datos",draw:"visualizando",initializing:"inicializando {0}",loading:"cargando datos",tooltipReset:"restableciendo las descripciones emergentes",ui:"actualizando la interfaz de usuario"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","PIB","HVAC","ID","TI","I&D","TV","UI"]}},{}],69:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:[""," €"],dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."]},dev:{accepted:"{0} n'est pas une option valide pour {1}, les valeurs possibles sont: {2}.",deprecated:"{0} a été éliminé de la version courante, mettez à jour votre code source avec {1}.",noChange:"{0} n'a pas été mis à jour car inchangé.",noContainer:"impossible de trouver un contenant correspondant à {0}.",of:"de",oldStyle:"les propriétés de {0} ont été imbriquées dans .{1}().",sameEdge:"un arc ne peut pas boucler sur lui même. L'auto-référence est automatiquement éliminée {0}.",set:"{0} a été mis à jour.",setLong:"{0} a été mis à jour à {1}.",setContainer:"merci de choisir un div qui utilise .container()"},error:{accepted:"{0} n'est pas correct {1} pour {2} visualisations, merci d'utilisez une des options suivantes: {3}.",connections:"Pas de connections disponibles pour {0}.",data:"Pas de données disponibles",dataYear:"Pas de données disponibles pour {0}.",lib:"La visualisation de {0} nécessite le chargement de la librairie {1}.",libs:"La visualisation de {0} nécessite le chargement des librairies {1}.",method:"La visualisation du {0} exige la définition de {1}.",methods:"La visualisation du {0} exige les définitions de {1}."},lowercase:["un","une","de","des","et","mais","les","ou","pour","avec","comme","par","vers","si","dans","près","ni","dessus","que","le","la","via","sinon","alors"],method:{active:"segments actifs",color:"couleur",depth:"profondeur",dev:"verbeux",focus:"focus",icon:"ícone",id:"id",height:"hauteur",labels:"labels",legend:"légende",margin:"marge",messages:"messages",order:"ordre",search:"recherche",shape:"format",size:"taille",style:"style",temp:"segments temporaires",text:"texte",time:"temps",timeline:"ligne temporelle",total:"segments totaux",type:"type",width:"largeur",x:"axe x",y:"axe y",zoom:"zoom",mode:"mode",mute:"cacher",solo:"isoler"},time:["année","date","jour","heure","mois"],visualization:{bubbles:"Bulles",chart:"Graphique",geo_map:"Carte",line:"Courbes",network:"Réseau",rings:"Anneaux",scatter:"Nuage de points",stacked:"Aires empilées",tree_map:"Arbre",bar:"Diagramme en barres",box:"Boîtes à Moustaches",paths:"Chemins",pie:"Camembert",table:"Table"},ui:{and:"et",back:"retour",collapse:"clic pour réduire",error:"erreur",expand:"clic pour agrandir",loading:"chargement ...",more:"plus {0}",moreInfo:"clic pour plus d'information",noResults:"pas de résultat correspondant à {0}.",primary:"connections primaires",share:"part",total:"total",values:"valeurs",including:"incluant",or:"ou",iqr:"gamme interquartile pour {0}",max:"maximum",min:"le minimum",percentile:"{0} percentile",tukey_bottom:"tukey bas",tukey_top:"top tukey",quartile_first:"premier quartile",quartile_third:"le troisième quartile",median:"médian"},message:{data:"analyse des données",draw:"tracé en cours",initializing:"Initialisation {0}",loading:"chargement",tooltipReset:"réinitialisation des bulles",ui:"rafraichissement de l'interface"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","PIB","HVAC","ID","IT","TV","UI"]}},{}],70:[function(e,t,r){t.exports={format:{decimal:".",thousands:",",grouping:[3],currency:["₩",""],dateTime:"%Y/%m/%d %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["오전","오후"],days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],shortDays:["일","월","화","수","목","금","토"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],shortMonths:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]},error:{accepted:"{0}하지 허용 {1} {2} 시각화는 다음 중 하나를 사용하십시오에 대해 : {3}.",connections:"{0}에 대한 연결이 없음.",data:"자료 없음",dataYear:"{0}에 대한 자료가 없음.",lib:"{0} 시각화는 {1} 라이브러리를로드 할 필요합니다.",libs:"{0} 시각화는 다음과 같은 라이브러리를로드 할 필요 : {1}.",method:"{0} 시각화를 위해 {1} 메서드를 설정해야 한다.",methods:"{0} 시각화를 위해 다음과 같은 메서드를 설정해야한다: {1}."},lowercase:[""],method:{active:"활성 세그먼트",color:"색",depth:"깊이",dev:"풀어서",focus:"집중하다",icon:"상",id:"신분증",height:"높이",labels:"라벨",legend:"범례",margin:"여유",messages:"상태 메시지",order:"주문",search:"수색",shape:"모양",size:"크기",style:"스타일",temp:"임시 세그먼트",text:"본문",time:"시각",timeline:"타임 라인",total:"총 세그먼트",type:"유형",width:"폭",x:"X 축",y:"Y 축",zoom:"줌",mode:"모드",mute:"숨김",solo:"독주"},time:["날짜","요일","월","시간","년"],visualization:{bubbles:"버블 차트",chart:"차트",geo_map:"지도형",line:"선형 그래프",network:"네트워크 그래프",rings:"반지",scatter:"산포도",stacked:"누적 된 지역",tree_map:"트리 맵",bar:"막대 차트",box:"박스 플롯",paths:"경로",pie:"파이 차트",table:"탁자"},ui:{and:"과",back:"뒤로",collapse:"축소하려면 클릭",error:"오류",
expand:"확장하려면 클릭",loading:"로드 중 ...",more:"{0} 이상",moreInfo:"추가 정보를 위해 클릭하십시오",noResults:"일치하는 결과값이 없음 {0}.",primary:"기본 연결",share:"비중",total:"합계",values:"값",including:"...을 포함하여",or:"또는",iqr:"대한 사 분위 범위 {0}",max:"최고",min:"최저한의",percentile:"{0} 백분위 수",tukey_bottom:"바닥 Tukey에",tukey_top:"상단 Tukey에",quartile_first:"1 분위",quartile_third:"3 분위",median:"중앙값"},message:{data:"데이터 분석 중",draw:"데이터 시각화 중",initializing:"초기화 {0}",loading:"데이터 로딩 중",tooltipReset:"툴팁을 재설정",ui:"UI 업데이트 중"},uppercase:["CEO","최고 경영자","최고 재무 책임자 (CFO)","CFO는","CNC","COO","구구","CPU","CPU에","GDP","HVAC","ID","IT","R & D","TV","UI"]}},{}],71:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:[""," ден."],dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["недела","понеделник","вторник","среда","четврток","петок","сабота"],shortDays:["нед","пон","вто","сре","чет","пет","саб"],months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],shortMonths:["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек"]},error:{accepted:"{0} не е прифатлива за {1} {2} визуелизација, ве молиме користете една од следниве: {3}.",connections:"не е достапна за врски {0}.",data:"нема податоци",dataYear:"Не е достапен за податоци {0}.",lib:"{0} визуализации бараат вчитување на библиотеката {1} .",libs:"{0} визуализации бараат вчитување на следниве библиотеки: {1}.",method:"{0} визуализации бара поставување на {1} методот.",methods:"{0} визуализации бараат поставување на следниве методи: {1}."},lowercase:["a","и","во","но","на","или","да","се","со"],method:{active:"активни сегменти",color:"боја",depth:"длабочина",dev:"опширно",focus:"фокус",icon:"икона",id:"проект",height:"височина",labels:"етикети",legend:"легенда",margin:"маргина",messages:"пораки за статусот",order:"со цел",search:"барај",shape:"форма",size:"големина",style:"стил",temp:"привремени сегменти",text:"текст",time:"време",timeline:"времеплов",total:"Вкупно сегменти",type:"тип",width:"ширина",x:"x оската",y:"Y оската",zoom:"зум",mode:"режим",mute:"се скрие",solo:"изолирање"},time:["датум","ден","месец","време","година"],visualization:{bubbles:"меурчиња",chart:"Графикон",geo_map:"Гео мапа",line:"Линиски график",network:"мрежа",rings:"прстени",scatter:"Распрскан график",stacked:"Наредена површина",tree_map:"Мапа во вид на дрво",bar:"бар шема",box:"правоаголен дијаграм",paths:"патеки",pie:"пита графикон",table:"Табела"},ui:{and:"и",back:"назад",collapse:"кликни за да се собере",error:"грешка",expand:"Кликни за проширување",loading:"Се вчитува ...",more:"{0} повеќе",moreInfo:"кликнете за повеќе информации",noResults:"Не се пронајдени резултати за појавување на {0}.",primary:"основните врски",share:"удел",total:"Вкупниот",values:"вредности",including:"Вклучувајќи",or:"или",iqr:"interquartile опсег за {0}",max:"максималната",min:"минимум",percentile:"{0} перцентил",tukey_bottom:"дното Tukey",tukey_top:"Топ Tukey",quartile_first:"првиот квартал",quartile_third:"третиот квартал",median:"средната"},message:{data:"анализа на податоци",draw:"цртање на визуелизација",initializing:"иницијализација {0}",loading:"податоци за товарење",tooltipReset:"ресетирање на објаснувањата",ui:"ажурирање на кориничкиот интерфејс"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","GDP","HVAC","ID","IT","R&D","TV","UI"]}},{}],72:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:["R$",""],dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]},dev:{accepted:"{0} não é um valor válido para {1}, por favor use um dos seguintes procedimentos: {2}.",deprecated:"{0} método foi removido, por favor atualize seu código para utilizar {1}.",noChange:"{0} não foi atualizado porque ele não mudou.",noContainer:"Não foi possível encontrar um local na página correspondente a {0}.",of:"do",oldStyle:"propriedades de estilo para {0} já foram incorporados diretamente no. {1} ().",sameEdge:"bordas não podem vincular a si mesmos. removendo automaticamente borda de auto-referência {0}.",set:"{0} foi definido.",setLong:"{0} foi definido para {1}.",setContainer:"por favor, defina um div utilizando .container()"},error:{accepted:"{0} não é um {1} reconhecido para visualizações {2}, favor usar um dos seguintes procedimentos: {3}.",connections:"Não há conexões disponíveis para {0}.",data:"Não há dados disponíveis",dataYear:"Não há dados disponíveis para {0}.",lib:"A visualização {0} necessita que seja carregado a biblioteca {1}.",libs:"A visualização {0} necessita que seja carregado as bibliotecas {1}.",method:"A visualização {0} exige a definição do método {1}.",methods:"A visualização {0} exige a definição dos métodos {1}."},lowercase:["um","uma","e","como","em","no","na","mas","por","para","pelo","pela","de","do","da","se","perto","nem","ou","que","o","a","com","v"],method:{active:"segmentos activos",color:"cor",depth:"profundidade",dev:"verboso",focus:"foco",icon:"ícone",id:"identificador",height:"altura",labels:"etiquetas",legend:"legenda",margin:"margem",messages:"mensagens de status",order:"ordenar",search:"pesquisar",shape:"forma",size:"tamanho",style:"estilo",temp:"segmentos temporários",text:"texto",time:"Tempo",timeline:"cronograma",total:"segmentos totais",type:"digitar",width:"largura",x:"eixo x",y:"eixo y",zoom:"zoom",mode:"modo",mute:"ocultar",solo:"isolar"},time:["data","dia","mês","hora","ano"],visualization:{bubbles:"Bolhas",chart:"Gráfico",geo_map:"Mapa",line:"Gráfico de Linha",network:"Rede",rings:"Anéis",scatter:"dispersão",stacked:"Evolução",tree_map:"Tree Map",bar:"Gráfico de Barras",box:"box Plot",paths:"caminhos",pie:"Carta de torta",table:"Mesa"},ui:{and:"e",back:"voltar",collapse:"clique para entrar em colapso",error:"erro",expand:"clique para expandir",loading:"carregando ...",more:"mais {0}",moreInfo:"Clique para mais informações",noResults:"nenhum resultado para {0}.",primary:"conexões primárias",share:"participação",total:"total",values:"valores",including:"Incluindo",or:"ou",iqr:"intervalo interquartil para {0}",max:"máximo",min:"mínimo",percentile:"{0} percentil",tukey_bottom:"tukey bottom",tukey_top:"tukey topo",quartile_first:"primeiro quartil",quartile_third:"terceiro quartil",median:"mediana"},message:{data:"analisando dados",draw:"desenhando visualização",initializing:"inicializando {0}",loading:"carregando dados",tooltipReset:"redefinindo as dicas",ui:"atualizando interface"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","PIB","HVAC","ID","TI","P&D","TV","IU"]}},{}],73:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:["€",""],dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]},error:{accepted:"{0} não é uma {1} válida para a visualização {2}, por favor escolha uma das seguintes: {3}.",connections:"não existem ligações disponíveis para {0}.",data:"não existem dados disponíveis",dataYear:"não existem dados disponíveis para {0}.",lib:"a visualização {0} necessita que a biblioteca {1} seja carregada.",libs:"a visualização {0} necessita que as seguintes bibliotecas sejam carregadas: {1}.",method:"A visualização {0} exige a definição do método {1}.",methods:"A visualização {0} exige a definição dos seguintes métodos {1}."},lowercase:["um","uma","e","como","em","no","na","mas","por","para","pelo","pela","de","do","da","se","perto","nem","ou","que","o","a","com","v"],method:{active:"segmentos activos",color:"cor",depth:"profundidade",dev:"verboso",focus:"foco",icon:"ícone",id:"identificador",height:"altura",labels:"etiquetas",legend:"legenda",margin:"margem",messages:"estado",order:"ordenar",search:"pesquisar",shape:"forma",size:"tamanho",style:"estilo",temp:"segmentos temporários",text:"texto",time:"tempo",timeline:"linha temporal",total:"segmentos totais",type:"digitar",width:"largura",x:"eixo dos xx",y:"eixo dos yy",zoom:"zoom",mode:"modo",mute:"ocultar",solo:"isolar"},time:["data","dia","mês","hora","ano"],visualization:{bubbles:"Bolhas",chart:"Diagrama",geo_map:"Mapa",line:"Gráfico de Linha",network:"Grafo",rings:"Anéis",scatter:"Gráfico de Dispersão",stacked:"Gráfico de Área",tree_map:"Tree Map",bar:"Gráfico de Barras",box:"Diagrama de Caixa e Bigodes",paths:"caminhos",pie:"Gráfico de Setores",table:"Mesa"},ui:{and:"e",back:"voltar",collapse:"Clique para colapsar",error:"erro",expand:"clique para expandir",loading:"a carregar ...",more:"mais {0}",moreInfo:"Clique para mais informações",noResults:"nenhum resultado para {0}.",primary:"ligações principais",share:"proporção",total:"total",values:"valores",including:"Incluindo",or:"ou",iqr:"intervalo interquartil para {0}",max:"máximo",min:"mínimo",percentile:"{0} percentil",tukey_bottom:"tukey bottom",tukey_top:"tukey topo",quartile_first:"primeiro quartil",quartile_third:"terceiro quartil",median:"mediana"},message:{data:"a analisar os dados",draw:"a desenhar a visualização",initializing:"a inicializar {0}",loading:"a carregar os dados",tooltipReset:"a actualizar as caixas de informação",ui:"a actualizar o interface"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","PIB","HVAC","ID","TI","I&D","TV","IU"]}},{}],74:[function(e,t,r){t.exports={format:{decimal:",",thousands:" ",grouping:[3],currency:[""," руб."],dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],shortDays:["вс","пн","вт","ср","чт","пт","сб"],months:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],shortMonths:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"]},error:{accepted:"{0} не является обслуживаемым {1} для {2} визуализаций, пожалуйста, используйте одно из следующих действий: {3}.",connections:"нет соединений, доступных для {0}.",data:"данные недоступны",dataYear:"нет данных для {0}.",lib:"{0} визуализаций требуют загрузки {1} библиотеки.",libs:"{0} визуализаций требует загрузки следующие библиотеки: {1}.",method:"{0} визуализаций требуют установки {1} метод.",methods:"{0} визуализаций требуют установки следующих методов: {1}."},lowercase:["и","как","в","но","для","из","если в","в","недалеко","ни","на","на","или","в","что","к","с","с помощью","против","против"],method:{active:"активные сегменты",color:"цвет",depth:"глубина",dev:"подробный",focus:"фокус",icon:"значок",id:"Я бы",height:"высота",labels:"надписи",legend:"легенда",margin:"поле",messages:"сообщения о состоянии",order:"заказ",search:"поиск",shape:"форма",size:"размер",style:"стиль",temp:"временные сегменты",text:"текст",time:"время",timeline:"график",total:"всего сегментов",type:"тип",width:"ширина",x:"ось х",y:"ось Y",zoom:"масштаб",mode:"Режим",mute:"скрывать",solo:"изолировать"},time:["дата","день недели","месяц","время","год"],visualization:{bubbles:"Пузыри",chart:"Диаграмма",geo_map:"Карта Geo",line:"линия Участок",network:"сеть",rings:"Кольца",scatter:"Scatter Plot",stacked:"Stacked Площадь",tree_map:"Дерево Карта",bar:"гистограмма",box:"Box Участок",paths:"пути",pie:"Круговая диаграмма",table:"Таблица"},ui:{and:"а также",back:"назад",collapse:"нажмите, чтобы свернуть",error:"ошибка",expand:"нажмите, чтобы развернуть",loading:"загрузка ...",more:"{0} более",moreInfo:"нажмите для получения дополнительной информации",noResults:"нет результатов, соответствующих {0}.",primary:"первичные соединения",share:"доля",total:"Всего",values:"значения",including:"в том числе",or:"или",iqr:"межквартильный диапазон для {0}",max:"максимальная",min:"минимальный",percentile:"{0} процентиль",tukey_bottom:"нижний Тьюки",tukey_top:"сверху Тьюки",quartile_first:"первый квартиль",quartile_third:"третий квартиль",median:"медиана"},message:{data:"данные анализа",draw:"рисование визуализация",initializing:"инициализацией {0}",loading:"Загрузка данных",tooltipReset:"сброс всплывающих подсказок",ui:"обновление пользовательского интерфейса"},uppercase:["ID"]}},{}],75:[function(e,t,r){t.exports={format:{decimal:",",thousands:".",grouping:[3],currency:["₺",""],dateTime:"%A, %e %B %Y г. %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:[""," pm"],days:["pazar","pazartesi","salı","çarşamba","perşembe","cuma","cumartesi"],shortDays:["pazar","pazartesi","salı","çarşamba","perşembe","cuma","cumartesi"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],shortMonths:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"]},dev:{accepted:"{0} {1}, aşağıdakilerden birini kullanın lütfen için kabul değer değildir: {2}.",deprecated:"{0} yöntemi kaldırıldı, kullanmak için kodunuzu güncelleyin {1}.",noChange:"{0} o değişmedi çünkü güncelleştirildi.",noContainer:"sayfa eşleştirme {0} üzerine bir kap bulamıyorum.",of:"arasında",oldStyle:"{0} şimdi doğrudan gömülü olan stil özellikleri. {1} ().",sameEdge:"kenarları kendilerine bağlayamazsınız. otomatik olarak kendi kendine referans kenarı {0} kaldırılıyor.",set:"{0} kurulmuştur.",setLong:"{0} {1} olarak ayarlandı.",setContainer:") (.container Kullanarak bir kapsayıcı div tanımlamak lütfen"},error:{accepted:"{0} değildir kabul edilen {1} {2} görsel, aşağıdakilerden birini kullanın lütfen için: {3}.",connections:"için hiçbir bağlantı {0}.",data:"uygun veri yoktur",dataYear:"için uygun veri yoktur {0}.",lib:"{0} görselleştirme {1} kitaplığı yüklemesinde gerektirir.",libs:"{0} görsel aşağıdaki kitaplıkları yüklemek gerektirir: {1}.",method:"{0} görselleştirme {1} yöntemini ayarlama gerektirir.",methods:"{0} görsel aşağıdaki yöntemleri ayarı gerektirir: {1}."},lowercase:["A","bir","ve benzeri gibi","en ancak tarafından için","IF bölgesi içine yakın","ne","ve","üzerinde","ya da","bu","her üzerine","için olan ile","vs vs."],method:{active:"aktif bölümler",color:"renk",depth:"derinlik",dev:"gereksiz sözlerle dolu",focus:"odak",icon:"ikon",id:"İD",height:"yükseklik",labels:"katmanlar",legend:"lejant",margin:"kenar",messages:"durum iletileri",order:"sipariş",search:"arama",shape:"şekil",size:"boyut",style:"stil",temp:"geçici segmentler",text:"Metin",time:"zaman",timeline:"zaman çizelgesi",total:"toplam segmentler",type:"tip",width:"genişlik",x:"x ekseni",y:"y ekseni",zoom:"yakınlaştırma",mode:"kip",mute:"sakla",solo:"solo"},time:["tarih","gün","ay","saat","yıl"],visualization:{bubbles:"baloncuklar",chart:"Grafik",geo_map:"coğrafi Harita",line:"çizgi Arsa",network:"Ağ",rings:"halkalar",scatter:"Dağılım grafiği",stacked:"yığılmış Alan",tree_map:"ağaç Haritası",bar:"Bar grafik",box:"kutu Grafiği",paths:"yollar",pie:"Pasta grafik",table:"tablo"},ui:{and:"ve",back:"geri",collapse:"daraltmak için tıklayın",error:"hata",expand:"Genişletmek için tıklayın",loading:"Yükleniyor...",more:"{0} tane daha",moreInfo:"Daha fazla bilgi için tıklayın",noResults:"Eşleşen sonuç yok {0}.",primary:"öncelikli bağlantılar",share:"paylaş",total:"Genel Toplam",values:"değerler",including:"dahil olmak üzere",or:"veya",iqr:"için çeyrekler arası aralık {0}",max:"maksimum",min:"asgari",percentile:"{0} yüzdelik",tukey_bottom:"alt tukey",tukey_top:"üst tukey",quartile_first:"ilk çeyrek",quartile_third:"üçüncü çeyrek",median:"medyan"},message:{data:"analiz verisi",draw:"çizim görselleştirme",initializing:"başlatılıyor {0}",loading:"veri yükleniyor",tooltipReset:"ipuçları sıfırlama",ui:"güncelleme ui"},uppercase:["CEO","CEO'lar","CFO","CFO","CNC","COO","COO","CPU","CPU","GSYİH","HVAC","kimlik","bilişim","Ar-Ge","TV","UI"]}},{}],76:[function(e,t,r){t.exports={format:{decimal:".",thousands:",",grouping:[3],currency:["¥",""],dateTime:"%A %B %e %Y %X",date:"%Y/%-m/%-d",time:"%H:%M:%S",periods:["上午","下午"],days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],shortDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],shortMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},error:{accepted:"{0}对于{2}的可视化效果并不是一个可接受的{1}, 请使用如下的一个:{3}.",connections:"没有对{0}可用的连接。",data:"无可用数据",dataYear:"没有数据对{0}可用。",lib:"{0}的可视化要求装载{1}库。",libs:"{0}的可视化需要加载以下库:{1}。",method:"{0}的可视化要求设置{1}方法。",methods:"{0}的可视化要求设置以下方法:{1}。"},lowercase:["一个","和","在","但是","在...里","的","或者","这","向","与...一起"],method:{active:"活跃段",color:"颜色",depth:"深度",dev:"详细",focus:"焦点",icon:"图标",id:"身份认证",height:"高度",labels:"标签",legend:"图例注释",margin:"外边距",messages:"状态消息",order:"规则",search:"搜索",shape:"形状",size:"大小",style:"样式",temp:"暂时性区段",text:"文本",time:"时间",timeline:"时间轴",total:"总段",type:"类型",width:"宽度",x:"X轴",y:"Y轴",zoom:"缩放",mode:"模式",mute:"隐藏",solo:"隔离"},time:["日","星期","月","时间","年"],visualization:{bubbles:"气泡",chart:"图表",geo_map:"地理地图",line:"线图",network:"网络",rings:"特性",scatter:"散点图",stacked:"堆积面积图",tree_map:"树图",bar:"条图",box:"箱形图",paths:"路径",pie:"饼形图",table:"表"},ui:{and:"和",back:"后面",collapse:"点击合并",error:"错误",expand:"单击以展开",loading:"载入中...",more:"{0}更多",moreInfo:"点击了解更多信息",noResults:"没有结果匹配{0}。",primary:"主要连接",share:"共享",total:"总",values:"值",including:"包括",or:"要么",iqr:"间距范围为{0}",max:"最大值",min:"最低限度",percentile:"{0}百分",tukey_bottom:"底部杜克",tukey_top:"顶部杜克",quartile_first:"第一个四分位数",quartile_third:"第三个四分位数",median:"中位数"},message:{data:"分析数据",draw:"绘制可视化",initializing:"初始化{0}",loading:"加载数据",tooltipReset:"重置工具提示",ui:"更新UI"},uppercase:["CEO","CEOs","CFO","CFOs","CNC","COO","COOs","CPU","CPUs","GDP","HVAC","ID","电视","用户界面","研发"]}},{}],77:[function(e,t,r){t.exports={ar_SA:e("./languages/ar_SA.js"),de_DE:e("./languages/de_DE.js"),en_US:e("./languages/en_US.coffee"),es_ES:e("./languages/es_ES.js"),fr_FR:e("./languages/fr_FR.js"),ko_KR:e("./languages/ko_KR.js"),mk_MK:e("./languages/mk_MK.js"),pt_BR:e("./languages/pt_BR.js"),pt_PT:e("./languages/pt_PT.js"),ru_RU:e("./languages/ru_RU.js"),zh_CN:e("./languages/tr_TR.js"),zh_CN:e("./languages/zh_CN.js")}},{"./languages/ar_SA.js":65,"./languages/de_DE.js":66,"./languages/en_US.coffee":67,"./languages/es_ES.js":68,"./languages/fr_FR.js":69,"./languages/ko_KR.js":70,"./languages/mk_MK.js":71,"./languages/pt_BR.js":72,"./languages/pt_PT.js":73,"./languages/ru_RU.js":74,"./languages/tr_TR.js":75,"./languages/zh_CN.js":76}],78:[function(e,t,r){var n,a,i,o,s,l,u,c,d;a=e("../../util/copy.coffee"),s=e("../console/print.coffee"),l=e("./process/detect.coffee"),u=e("./set.coffee"),c=e("../../string/format.js"),d=e("../../object/validate.coffee"),t.exports=function(e,t){var r,n,s;s=[];for(r in t)n=t[r],e[r]=a(n),e[r].initialized=o(e,e[r],r),s.push(e.self[r]=i(e,r));return s},o=function(e,t,r,n){var a,i,u,f,p;t.previous=!1,t.changed=!1,t.initialized=!1,t.callback=!1,"init"in t&&!("value"in t)&&(t.value=t.init(e),delete t.init),"process"in t&&(t.value=l(e,t,t.value));for(p in t)if("deprecates"===p)for(i=t[p]instanceof Array?t[p]:[t[p]],u=0,f=i.length;u<f;u++)a=i[u],e.self[a]=function(t,r){return function(a){var i,o,l;return l=e.format.locale.value.dev.deprecated,t="."+t+"()",o=n?'"'+r+'" in .'+n+"()":"."+r+"()",i=n||r,s.error(c(l,t,o),i),e.self}}(a,r);else"global"===p?r in e||(e[r]=[]):"value"!==p&&d(t[p])&&o(e,t[p],p,r);return!0},i=function(e,t){return function(r,a){var i,o,l,u,f,p,h,v;if(i="accepted"in e[t]?e[t].accepted:null,"function"==typeof i&&(i=i(e)),i instanceof Array||(i=[i]),r===Object)return e[t];if(!arguments.length&&i.indexOf(void 0)<0)return"value"in e[t]?e[t].value:e[t];if("style"===t&&"object"==typeof r){v=e.format.locale.value.dev.oldStyle;for(p in r)s.warning(c(v,'"'+p+'"',p),p),e.self[p](r[p])}if("font"===t){"string"==typeof r&&(r={family:r}),h=!0,l=function(e,t,r,n){d(e[r])&&t in e[r]&&(d(e[r][t])?e[r][t].process?e[r][t].value=e[r][t].process(n):e[r][t].value=n:e[r][t]=n)},o=function(e,t,r){var n;if(d(e)){if(h)for(n in e)l(e,t,n,r);else"font"in e&&l(e,t,"font",r);h=!1;for(n in e)o(e[n],t,r)}};for(u in r)f=r[u],"secondary"!==u&&(d(f)&&(f=f.value),f&&o(e,u,f))}return n(e,t,e,t,r),"function"==typeof a&&(e[t].callback=a),!1===e[t].chainable?e[t].value:e.self}},n=function(e,t,r,a,i){var o,s,l,c;if(["accepted","changed","initialized","previous","process"].indexOf(a)<0)if(c=d(i),l=d(r[a])&&"objectAccess"in r[a]&&!1===r[a].objectAccess,o=c&&(l||!("value"in i)&&(!d(r[a])||!(d3.keys(i)[0]in r[a]))),null===i||!c||o)u(e,t,r,a,i);else if(c)for(s in i)n(e,t,r[a],s,i[s])}},{"../../object/validate.coffee":170,"../../string/format.js":171,"../../util/copy.coffee":205,"../console/print.coffee":48,"./process/detect.coffee":86,"./set.coffee":92}],79:[function(e,t,r){t.exports=function(e){return e||(e=!1),{accepted:[!1,Array,Function,Number,Object,String],callback:{accepted:[!1,Function],value:!1},global:e,process:Array,value:[]}}},{}],80:[function(e,t,r){var n;n=e("../../../client/rtl.coffee"),t.exports=function(e){var t;return t=["left","center","right"],!1===e&&t.unshift(!1),t.indexOf(e)<0&&(e="left"),{accepted:t,process:function(e){return n?"left"===e?"right":"right"===e?"left":e:e},value:e}}},{"../../../client/rtl.coffee":36}],81:[function(e,t,r){t.exports=function(e){var t;return t=["line-through","none","overline","underline"],!1===e&&t.unshift(!1),t.indexOf(e)<0&&(e="none"),{accepted:t,value:e}}},{}],82:[function(e,t,r){var n,a;a=e("../../../font/validate.coffee"),n=["Helvetica Neue","HelveticaNeue","Helvetica","Arial","sans-serif"],t.exports=function(e){return void 0===e&&(e=n),{process:a,value:e}}},{"../../../font/validate.coffee":101}],83:[function(e,t,r){t.exports=function(e){var t;return t=["top","middle","bottom"],!1===e&&t.unshift(!1),t.indexOf(e)<0&&(e="bottom"),{accepted:t,mapping:{top:"0ex",middle:"0.5ex",bottom:"1ex"},process:function(e){return this.text=e,this.mapping[e]},value:e}}},{}],84:[function(e,t,r){t.exports=function(e){var t;return t=["capitalize","lowercase","none","uppercase"],!1===e&&t.unshift(!1),t.indexOf(e)<0&&(e="none"),{accepted:t,value:e}}},{}],85:[function(e,t,r){t.exports=function(e,t,r){var n;return t.history&&t.history.reset(),e.constructor===String?e.indexOf("/")>=0?(r.url=e,[]):(n=d3.selectAll(e),n.size()?n:(e.indexOf(".")>=0&&(r.url=e),[])):e}},{}],86:[function(e,t,r){var n,a;n=e("../../../util/copy.coffee"),a=e("../../../array/update.coffee"),t.exports=function(e,t,r){return t.process===Array?a(n(t.value),r):"object"==typeof t.process&&"string"==typeof r?t.process[r]:"function"==typeof t.process?t.process(r,e,t):r}},{"../../../array/update.coffee":31,"../../../util/copy.coffee":205}],87:[function(e,t,r){var n;n=e("../../../client/css.coffee"),t.exports=function(e,t,r){return!1===e||e.indexOf("fa-")<0||0===e.indexOf("fa-")&&n("font-awesome")?e:r.fallback}},{"../../../client/css.coffee":32}],88:[function(e,t,r){t.exports=function(e,t){var r,n,a,i,o,s,l,u,c,d,f,p,h;if("string"==typeof e){for(e=e.split(" "),r=n=0,o=e.length;n<o;r=++n)h=e[r],e[r]=parseFloat(h,10);e=1===e.length?e[0]:2===e.length?{top:e[0],right:e[1],bottom:e[0],left:e[1]}:3===e.length?{top:e[0],right:e[1],bottom:e[2],left:e[1]}:4===e.length?{top:e[0],right:e[1],bottom:e[2],left:e[3]}:0}if(p=["top","right","bottom","left"],"number"==typeof e)for(a=0,s=p.length;a<s;a++)f=p[a],t[f]=e;else for(i=0,l=p.length;i<l;i++)f=p[i],t[f]=e[f];for(t.css="",d=[],r=c=0,u=p.length;c<u;r=++c)f=p[r],r&&(t.css+=" "),d.push(t.css+=t[f]+"px");return d}},{}],89:[function(e,t,r){var n,a,i,o;n=e("../../array/contains.coffee"),a=e("../../string/format.js"),i=e("../../string/list.coffee"),o=e("../console/print.coffee"),t.exports=function(e,t,r,s,l){var u,c,d,f,p,h,v,g;if("function"==typeof t&&(t=t(e)),t instanceof Array||(t=[t]),!1===(c=n(t,r))&&void 0!==r){for(h=[],g=JSON.stringify(r),"string"!=typeof r&&(g='"'+g+'"'),f=0,p=t.length;f<p;f++)u=t[f],"string"==typeof u?h.push('"'+u+'"'):"function"==typeof u?h.push(u.toString().split("()")[0].substring(9)):void 0===u?h.push("undefined"):h.push(JSON.stringify(u));h=i(h,e.format.locale.value.ui.or),e.type&&["mode","shape"].indexOf(s)>=0?(v=e.format.locale.value.error.accepted,d=e.format.locale.value.visualization[e.type.value]||e.type.value,o.warning(a(v,g,s,d,h),s)):(v=e.format.locale.value.dev.accepted,o.warning(a(v,g,l,h),s))}return!c}},{"../../array/contains.coffee":29,"../../string/format.js":171,"../../string/list.coffee":172,"../console/print.coffee":48}],90:[function(e,t,r){t.exports=function(e){var t;return t=["auto","optimizeSpeed","crispEdges","geometricPrecision"],t.indexOf(e)>=0||(e="crispEdges"),{accepted:t,value:e}}},{}],91:[function(e,t,r){var n,a;a=e("../../object/validate.coffee"),n=function(e,t){var r;e.changed&&(e.changed=!1),"draw"===t&&(e.frozen=!1,e.update=!0,e.first=!1);for(r in e)r.indexOf("d3plus")<0&&a(e[r])&&n(e[r],r)},t.exports=n},{"../../object/validate.coffee":170}],92:[function(e,t,r){var n,a,i,o,s,l,u,c,d;n=e("../../util/copy.coffee"),a=e("../../util/d3selection.coffee"),d=e("../../object/validate.coffee"),i=e("../../object/merge.coffee"),o=e("../console/print.coffee"),s=e("./process/detect.coffee"),l=e("./rejected.coffee"),u=e("../../string/format.js"),c=e("../../array/update.coffee"),t.exports=function(e,t,r,f,p){var h,v,g,m,y,x,b,w,_,k,z,A,j,M;if(A="value"!==f&&f&&f!==t?'"'+f+'" '+e.format.locale.value.dev.of+" ."+t+"()":"."+t+"()",h="value"===f&&"accepted"in r?r.accepted:d(r[f])&&"accepted"in r[f]?r[f].accepted:[p],!l(e,h,p,t,A)){if(d(r[f])&&"value"in r[f]&&(k=f,r=r[f],f="value"),"value"===f&&"process"in r&&(p=s(e,r,p)),r[f]instanceof Array||r[f]!==p||void 0===p){if(r.changed=!0,r.loaded&&(r.loaded=!1),"history"in e&&"draw"!==t&&(v=n(r),v.method=t,e.history.chain.push(v)),r.previous=r[f],"id"in e&&"value"===f&&"nesting"in r)if("id"!==t){if("object"!=typeof r.nesting&&(r.nesting={}),d(p)){for(x in p)"string"==typeof p[x]&&(p[x]=[p[x]]);r.nesting=i(r.nesting,p),e.id.value in r.nesting||(r.nesting[e.id.value]=p[d3.keys(p)[0]])}else p instanceof Array?r.nesting[e.id.value]=p:r.nesting[e.id.value]=[p];r[f]=r.nesting[e.id.value][0]}else p instanceof Array?(r.nesting=p,"depth"in e&&e.depth.value<p.length?r[f]=p[e.depth.value]:(r[f]=p[0],"depth"in e&&(e.depth.value=0))):(r[f]=p,r.nesting=[p],"depth"in e&&(e.depth.value=0));else"depth"===t?(p>=e.id.nesting.length?e.depth.value=e.id.nesting.length-1:e.depth.value=p<0?0:p,e.id.value=e.id.nesting[e.depth.value],"object"==typeof e.text.nesting&&(_=e.text.nesting[e.id.value])&&(e.text.nesting[e.id.value]="string"==typeof _?[_]:_,e.text.value=_ instanceof Array?_[0]:_)):d(r[f])&&d(p)?r[f]=i(r[f],p):r[f]=p;"value"===f&&r.global&&(y=r[f].length>0,(b=k||f)in e&&(y&&e.data[b].indexOf(t)<0||!y&&e.data[b].indexOf(t)>=0)&&(e.data[b]=c(e.data[b],t))),"value"===f&&r.dataFilter&&e.data&&e.data.filters.indexOf(t)<0&&e.data.filters.push(t),e.dev.value&&r.changed&&void 0!==r[f]&&(w=r[f]instanceof Array&&r[f].length>10,m=a(r[f]),j="function"==typeof r[f],M=w||m||j?null:"string"==typeof r[f]?r[f]:JSON.stringify(r[f]),null!==M&&M.length<260?(z=e.format.locale.value.dev.setLong,o.log(u(z,A,'"'+M+'"'))):(z=e.format.locale.value.dev.set,o.log(u(z,A))))}else z=e.format.locale.value.dev.noChange,e.dev.value&&o.comment(u(z,A));"value"===f&&r.callback&&!r.url&&(g="function"==typeof r.callback?r.callback:r.callback.value)&&g(p,e.self)}}},{"../../array/update.coffee":31,"../../object/merge.coffee":169,"../../object/validate.coffee":170,"../../string/format.js":171,"../../util/copy.coffee":205,"../../util/d3selection.coffee":206,"../console/print.coffee":48,"./process/detect.coffee":86,"./rejected.coffee":89}],93:[function(e,t,r){var n=e("../console/print.coffee"),a=e("../../string/format.js");t.exports=function(e){if(e.dev.value){var t="analyzing edges list";n.time(t)}var r=e.types[e.type.value].requirements;r instanceof Array||(r=[r]);var i=r.indexOf("nodes")>=0&&!e.nodes.value;if(i){e.nodes.value=[];var o=[];e.nodes.changed=!0}e.edges.value.forEach(function(t){["source","target"].forEach(function(r){var n=typeof t[e.edges[r]];if("object"!==n)if("number"!==n||i||"number"===e.data.keys[e.id.value])if(i&&o.indexOf(t[e.edges[r]])>=0)t[e.edges[r]]=e.nodes.value.filter(function(n){return n[e.id.value]===t[e.edges[r]]})[0];else{var a={};a[e.id.value]=t[e.edges[r]],t[e.edges[r]]=a}else t[e.edges[r]]=e.nodes.value[t[e.edges[r]]];var s=t[e.edges[r]];i&&o.indexOf(s[e.id.value])<0&&(o.push(s[e.id.value]),e.nodes.value.push(s))}),"keys"in e.data||(e.data.keys={}),e.id.value in e.data.keys||(e.data.keys[e.id.value]=typeof t[e.edges.source][e.id.value])}),e.edges.value=e.edges.value.filter(function(t){var r=t[e.edges.source][e.id.value];if(r===t[e.edges.target][e.id.value]){var i=e.format.locale.value.dev.sameEdge;return n.warning(a(i,'"'+r+'"'),"edges"),!1}return!0}),e.edges.linked=!0,e.dev.value&&n.timeEnd(t)}},{"../../string/format.js":171,"../console/print.coffee":48}],94:[function(e,t,r){var n=e("./hideElement.js");t.exports=function(e){function t(e,t){[].forEach.call(t.attributes,function(t){if(/^data-/.test(t.name)){var r=t.name.substr(5).replace(/-(.)/g,function(e,t){return t.toUpperCase()});e[r]=t.value}}),r.forEach(function(r){null!==t.getAttribute(r)&&(e[r]=t.getAttribute(r))})}var r=[e.color.value,e.icon.value,e.keywords.value,e.alt.value,"style"];e.text.value||e.self.text("text"),r=r.concat(e.id.nesting),e.self.data({element:e.data.value});var a=e.data.element.value.node().tagName.toLowerCase(),i=e.data.element.value.attr("type"),o=[];if("select"===a){var s=e.data.element.value.node().id;s&&e.self.container({id:s}),e.data.element.value.selectAll("option").each(function(r,n){var a={};if(a.text=d3.select(this).text(),t(a,this),o.push(a),this.selected)for(var n=e.id.nesting.length-1;n>=0;n--){var i=e.id.nesting[n];if(i in a){e.self.focus(a[i]);break}}})}else if("input"===a&&"radio"===i){var l=e.data.element.value.node().getAttribute("name");l&&e.self.container({id:l}),e.data.element.value.each(function(r,a){var i={};t(i,this);var s=i[e.id.value]||this.id||!1;if(s&&isNaN(parseFloat(s))){var l=d3.select("label[for="+s+"]");l.empty()||(i.text=l.html(),l.call(n))}o.push(i),this.checked&&e.self.focus(i[e.id.value])})}!e.focus.value.length&&o.length&&(e.data.element.value.node().selectedIndex=0,e.self.focus(o[0][e.id.value]));var u=d3.select("legend[for="+e.container.id+"]");u.empty()||(e.self.title(u.html()),u.call(n));var c=!!e.container.value&&e.container.value.node().tagName.toLowerCase();return!1!==e.container.value&&"body"!==c||(e.container.value=d3.select(e.data.element.value.node().parentNode)),e.data.element.value.call(n),o}},{"./hideElement.js":95}],95:[function(e,t,r){t.exports=function(e){e.style("position","absolute","important").style("clip","rect(1px 1px 1px 1px)","important").style("clip","rect(1px, 1px, 1px, 1px)","important").style("width","1px","important").style("height","1px","important").style("margin","-1px","important").style("padding","0","important").style("border","0","important").style("overflow","hidden","important")}},{}],96:[function(e,t,r){var n=e("../console/print.coffee");t.exports=function(e){if("network"===e.type.value){if(e.dev.value){var t="analyzing node positions";n.time(t)}if(e.nodes.value.filter(function(e){return"number"==typeof e.x&&"number"==typeof e.y}).length===e.nodes.value.length)e.nodes.positions=!0;else{var r=d3.layout.force().size([e.width.viz,e.height.viz]).nodes(e.nodes.value).links(e.edges.value),a=e.edges.strength.value;a&&("string"==typeof a?r.linkStrength(function(e){return e[a]}):r.linkStrength(a));r.start();for(var i=50;i>0&&(r.tick(),!(r.alpha()<.01));--i);r.stop(),e.nodes.positions=!0}e.dev.value&&n.timeEnd(t)}}},{
"../console/print.coffee":48}],97:[function(e,t,r){var n;n=e("numeric"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M;for(null==t&&(t={}),null==t.maxDegree&&(t.maxDegree=5),r=e.length,x=Number.MAX_VALUE,s=null,i=function(){var r,n,a;for(a=[],c=r=1,n=t.maxDegree+1;1<=n?r<n:r>n;c=1<=n?++r:--r)a.push(function(){var t,r,n;for(n=[],r=0,t=e.length;r<t;r++)y=e[r],n.push(Math.pow(y[0],c));return n}());return a}(),j=function(){var t,r,n;for(n=[],t=0,r=e.length;t<r;t++)y=e[t],n.push(y[1]);return n}(),f=v=0,w=1<<t.maxDegree;0<=w?v<w:v>w;f=0<=w?++v:--v){for(o=[function(){var e,t,n;for(n=[],b=e=0,t=r;0<=t?e<t:e>t;b=0<=t?++e:--e)n.push(1);return n}()],d=[0],p=m=0,_=t.maxDegree;0<=_?m<_:m>_;p=0<=_?++m:--m)(f&1<<p)>0&&(o.push(i[p]),d.push(p+1));a=n.transpose(o),h=d.length,l=n.dot(n.dot(n.inv(n.dot(o,a)),o),j),M=n.dot(a,l),k=n.sub(j,M),A=n.dot(k,k),z=A/(r-h),g=-.5*r*Math.log(2*Math.PI)-.5*r*Math.log(z)-A/(2*z),u=-2*g+h*(Math.log(r)-Math.log(2*Math.PI)),u<x&&(x=u,s=[d,l,M])}return s}},{numeric:22}],98:[function(e,t,r){var n;n=e("static-kdtree"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h;return null==t&&(t=10),h=n(e),u=function(){var r,n,a;for(a=[],r=0,n=e.length;r<n;r++)c=e[r],a.push(h.knn(c,t+1).slice(1));return a}(),p=function(t,r){var n,a,i,o,s,l;for(n=e[t],a=e[r],o=0,t=s=0,l=n.length;0<=l?s<l:s>l;t=0<=l?++s:--s)i=n[t]-a[t],o+=i*i;return o},o=function(){var r,n,i;for(i=[],a=r=0,n=e.length;0<=n?r<n:r>n;a=0<=n?++r:--r)i.push(p(a,u[a][t-1]));return i}(),d=function(e,t){return Math.max(p(e,t),o[t])},s=function(e){var r,n,a,i,o;for(i=0,o=u[e],n=0,a=o.length;n<a;n++)r=o[n],i+=d(e,r);return t/i},l=function(){var t,r,n;for(n=[],a=t=0,r=e.length;0<=r?t<r:t>r;a=0<=r?++t:--t)n.push(s(a));return n}(),f=function(){var n,o,s,c,d,f;for(f=[],a=n=0,c=e.length;0<=c?n<c:n>c;a=0<=c?++n:--n){for(r=0,d=u[a],o=0,s=d.length;o<s;o++)i=d[o],r+=l[i];r/=t,f.push([a,r/l[a]])}return f}(),f.sort(function(e,t){return t[1]-e[1]})}},{"static-kdtree":24}],99:[function(e,t,r){t.exports=function(e){var t,r,n;return r=d3.median(e),t=d3.median(e.map(function(e){return Math.abs(e-r)})),n=e.map(function(e,n){return[n,Math.abs(e-r)/t]}),n.sort(function(e,t){return t[1]-e[1]})}},{}],100:[function(e,t,r){var n;n=e("../core/font/tester.coffee"),t.exports=function(e,t,r){var a,i,o,s,l,u,c;return r||(r={}),t=t||{},u=r.parent||n("svg").append("text"),s=[],e instanceof Array||(e=[e]),c=u.selectAll("tspan").data(e),a={left:"0px",position:"absolute",top:"0px",x:0,y:0},l=0,"letter-spacing"in t&&(l=parseFloat(t["letter-spacing"]),delete t["letter-spacing"]),o=function(e){var t;return t=0,l&&(t=(d3.select(e).text().length-1)*l),e.getComputedTextLength()+t},i=function(e){return e.parentNode.getBBox().height||e.getBoundingClientRect().height},c.enter().append("tspan").text(String).style(t).attr(a).each(function(e){if("function"==typeof r.mod)return r.mod(this)}).each(function(e){var t,r,n;return t=d3.select(this).selectAll("tspan"),t.size()?(n=[],t.each(function(){return n.push(o(this))}),n=d3.max(n)):n=o(this),r=i(this),s.push({height:r,text:e,width:n})}),c.remove(),r.parent||u.remove(),s}},{"../core/font/tester.coffee":64}],101:[function(e,t,r){var n,a;n=e("../core/font/tester.coffee"),a=function(e){var t,r,i,o,s,l,u,c,d,f,p,h,v,g;for(e instanceof Array||(e=e.split(",")),s=0,u=e.length;s<u;s++)i=e[s],i.trim();if(o=e.join(", "),t=a.complete,o in t)return t[o];for(p=function(e){return v.append("span").style("font-family",e).style("font-size","32px").style("padding","0px").style("margin","0px").text("abcdefghiABCDEFGHI_!@#$%^&*()_+1234567890")},h=function(e,t){var r,n,a;return r=p(e),n=r.node().offsetWidth,a=t.node().offsetWidth,r.remove(),n!==a},v=n("div"),d=p("monospace"),f=p("sans-serif"),l=0,c=e.length;l<c;l++)if(r=e[l],g=h(r+",monospace",d),g||(g=h(r+",sans-serif",f)),g){g=r;break}return g||(g="sans-serif"),d.remove(),f.remove(),t[o]=g,g},a.complete={},t.exports=a},{"../core/font/tester.coffee":64}],102:[function(e,t,r){var n=e("../array/sort.coffee"),a=e("../core/methods/attach.coffee"),i=e("../core/data/format.js"),o=e("../core/data/keys.coffee"),s=e("../core/data/load.coffee"),l=e("../core/fetch/data.js"),u=e("../client/ie.js"),c=e("../core/methods/reset.coffee"),d=e("../core/console/print.coffee");t.exports=function(){var t={types:{auto:e("./types/auto.js"),button:e("./types/button/button.coffee"),drop:e("./types/drop/drop.coffee"),toggle:e("./types/toggle.js")}};return t.self=function(e){var r=t.data.value instanceof Array&&t.data.value.length>t.data.large;if(t.draw.timing=t.draw.first||r||u?0:t.timing.ui,t.data.value instanceof Array){if(t.dev.value&&d.group('drawing "'+t.type.value+'"'),t.data.changed&&(t.data.cache={},o(t,"data"),i(t)),t.data.viz=l(t),t.data.sort.value&&(t.data.changed||t.order.changed||t.order.sort.changed)&&n(t.data.viz,t.order.value||t.text.value,t.order.sort.value,t.color.value,t),!1===t.focus.value&&["auto","button"].indexOf(t.type.value)<0){var a=t.data.element.value;if(a&&"select"===a.node().tagName.toLowerCase()){var f=a.property("selectedIndex");f=f<0?0:f;var p=a.selectAll("option")[0][f],h=p.getAttribute("data-"+t.id.value)||p.getAttribute(t.id.value);h&&(t.focus.value=h)}!1===t.focus.value&&t.data.viz.length&&(t.focus.value=t.data.viz[0][t.id.value]),t.dev.value&&!1!==t.focus.value&&d.log('"value" set to "'+t.focus.value+'"')}var v=function(e,r){r="number"!=typeof r?1===t.id.nesting.length?0:t.id.nesting.length-1:r;var n=t.id.nesting[r];return r>0&&(!(n in e)||e[n]instanceof Array)?v(e,r-1):n};if(t.data.changed){"auto"===t.search.value?t.data.viz.length>10?(t.search.enabled=!0,t.dev.value&&d.log("Search enabled.")):(t.search.enabled=!1,t.dev.value&&d.log("Search disabled.")):t.search.enabled=t.search.value;var g=t.data.element.value?t.data.element.value.node().tagName.toLowerCase():"";if(t.data.element.value&&"select"===g){var m=[];for(var y in t.data.nested.all)m=m.concat(t.data.nested.all[y]);options=t.data.element.value.selectAll("option").data(m,function(e){var t=!!e&&v(e);return!!(e&&t in e)&&e[t]}),options.exit().remove(),options.enter().append("option"),options.each(function(e){var r=v(e),n=r===t.id.value?t.text.value||t.id.value:!0!==t.text.nesting&&r in t.text.nesting?t.text.nesting[r]:r;for(var a in e)"object"!=typeof e[a]&&(a===n&&d3.select(this).html(e[a]),["alt","value"].indexOf(a)>=0?d3.select(this).attr(a,e[a]):d3.select(this).attr("data-"+a,e[a]));e[r]===t.focus.value?this.selected=!0:this.selected=!1})}}else if(t.focus.changed&&t.data.element.value){var x=t.data.element.value.node().tagName.toLowerCase();if("select"===x)t.data.element.value.selectAll("option").each(function(e){e[v(e)]===t.focus.value?this.selected=!0:this.selected=!1});else{var x=t.data.element.value.attr("type").toLowerCase();"radio"===x&&t.data.element.value.each(function(e){this.value===t.focus.value?this.checked=!0:this.checked=!1})}}if("auto"!==t.type.value){if(!t.container.ui){t.container.ui=t.container.value.selectAll("div#d3plus_"+t.type.value+"_"+t.container.id).data(["container"]);var b=t.data.element.value?t.data.element.value[0][0]:null;if(b)if(b.id)b="#"+b.id;else{var w=b.getAttribute(t.id.value)?t.id.value:"data-"+t.id.value;b=b.getAttribute(w)?"["+w+"="+b.getAttribute(w)+"]":null}t.container.ui.enter().insert("div",b).attr("id","d3plus_"+t.type.value+"_"+t.container.id).style("position","relative").style("overflow","visible").style("vertical-align","top")}t.container.ui.style("display",t.ui.display.value),t.container.ui.transition().duration(t.draw.timing).style("margin",t.ui.margin.css);var _=t.container.ui.selectAll("div.d3plus_title").data(t.title.value?[t.title.value]:[]);_.enter().insert("div","#d3plus_"+t.type.value+"_"+t.container.id).attr("class","d3plus_title").style("display","inline-block"),_.style("color",t.font.color).style("font-family",t.font.family.value).style("font-size",t.font.size+"px").style("font-weight",t.font.weight).style("padding",t.ui.padding.css).style("border-color","transparent").style("border-style","solid").style("border-width",t.ui.border+"px").text(String).each(function(e){t.margin.left=this.offsetWidth})}if(t.data.value.length){var k=t.format.locale.value.visualization[t.type.value];t.dev.value&&d.time("drawing "+k),t.types[t.type.value](t),t.dev.value&&d.timeEnd("drawing "+k)}else!t.data.url||t.data.loaded&&!t.data.stream||s(t,"data",t.self.draw);t.dev.value&&d.timeEnd("total draw time"),c(t)}},a(t,{active:e("./methods/active.coffee"),alt:e("./methods/alt.coffee"),color:e("./methods/color.coffee"),config:e("./methods/config.coffee"),container:e("./methods/container.coffee"),data:e("./methods/data.js"),depth:e("./methods/depth.coffee"),dev:e("./methods/dev.coffee"),draw:e("./methods/draw.js"),focus:e("./methods/focus.coffee"),font:e("./methods/font.coffee"),format:e("./methods/format.coffee"),height:e("./methods/height.coffee"),history:e("./methods/history.coffee"),hover:e("./methods/hover.coffee"),icon:e("./methods/icon.coffee"),id:e("./methods/id.coffee"),keywords:e("./methods/keywords.coffee"),margin:e("./methods/margin.coffee"),open:e("./methods/open.coffee"),order:e("./methods/order.coffee"),remove:e("./methods/remove.coffee"),search:e("./methods/search.coffee"),select:e("./methods/select.coffee"),selectAll:e("./methods/selectAll.coffee"),text:e("./methods/text.coffee"),timing:e("./methods/timing.coffee"),title:e("./methods/title.coffee"),type:e("./methods/type.coffee"),ui:e("./methods/ui.coffee"),width:e("./methods/width.coffee")}),t.self}},{"../array/sort.coffee":30,"../client/ie.js":33,"../core/console/print.coffee":48,"../core/data/format.js":52,"../core/data/keys.coffee":54,"../core/data/load.coffee":55,"../core/fetch/data.js":60,"../core/methods/attach.coffee":78,"../core/methods/reset.coffee":91,"./methods/active.coffee":103,"./methods/alt.coffee":104,"./methods/color.coffee":105,"./methods/config.coffee":106,"./methods/container.coffee":107,"./methods/data.js":108,"./methods/depth.coffee":109,"./methods/dev.coffee":110,"./methods/draw.js":111,"./methods/focus.coffee":112,"./methods/font.coffee":113,"./methods/format.coffee":114,"./methods/height.coffee":115,"./methods/history.coffee":116,"./methods/hover.coffee":117,"./methods/icon.coffee":118,"./methods/id.coffee":119,"./methods/keywords.coffee":120,"./methods/margin.coffee":121,"./methods/open.coffee":122,"./methods/order.coffee":123,"./methods/remove.coffee":124,"./methods/search.coffee":125,"./methods/select.coffee":126,"./methods/selectAll.coffee":127,"./methods/text.coffee":128,"./methods/timing.coffee":129,"./methods/title.coffee":130,"./methods/type.coffee":131,"./methods/ui.coffee":132,"./methods/width.coffee":133,"./types/auto.js":134,"./types/button/button.coffee":135,"./types/drop/drop.coffee":140,"./types/toggle.js":157}],103:[function(e,t,r){e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Array,Function,Number,String],value:!1}},{"../../core/methods/filter.coffee":79}],104:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],mute:n(!0),solo:n(!0),value:"alt"}},{"../../core/methods/filter.coffee":79}],105:[function(e,t,r){t.exports={accepted:[String],value:"color"}},{}],106:[function(e,t,r){t.exports={accepted:[Object],objectAccess:!1,process:function(e,t){var r,n;for(r in e)n=e[r],r in t.self&&t.self[r](n);return e},value:{}}},{}],107:[function(e,t,r){var n;n=e("../../util/d3selection.coffee"),t.exports={accepted:[!1,Array,Object,String],element:!1,id:"default",process:function(e){return!1===e?d3.select("body"):n(e)?e:e instanceof Array?d3.select(e[0][0]):(this.selector=e,d3.select(e))},value:d3.select("body")}},{"../../util/d3selection.coffee":206}],108:[function(e,t,r){var n=e("../../util/d3selection.coffee"),a=e("../../core/methods/process/data.coffee");t.exports={accepted:[!1,Array,Function,String],delimiter:{accepted:[String],value:"|"},element:{process:function(e,t){var r=!1;return n(e)?r=e:"string"!=typeof e||d3.select(e).empty()||(r=d3.select(e)),r&&t.self.container(d3.select(r.node().parentNode)),r},value:!1},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},filters:[],large:400,mute:[],process:function(e,t){return"default"===t.container.id&&e.length&&t.self.container({id:"default"+e.length}),a(e,t,this)},solo:[],sort:{accepted:[Boolean],value:!1},value:!1}},{"../../core/methods/process/data.coffee":85,"../../util/d3selection.coffee":206}],109:[function(e,t,r){t.exports={accepted:[Number],value:0}},{}],110:[function(e,t,r){t.exports={accepted:[Boolean],value:!1}},{}],111:[function(e,t,r){var n=e("../../util/d3selection.coffee"),a=e("../../core/parse/hideElement.js"),i=e("../../core/parse/element.js"),o=e("../../core/console/print.coffee"),s=e("../../string/format.js");t.exports={accepted:[void 0,Function],first:!0,frozen:!1,process:function(e,t){if(!1===this.initialized)return this.initialized=!0,e;if(!t.data.value||t.data.value instanceof Array&&!n(t.data.value)?t.data.element.value&&t.data.element.value.call(a):t.data.value=i(t),void 0===e&&"function"==typeof this.value&&(e=this.value),!1===t.container.value){var r=t.format.locale.value.dev.setContainer;o.warning(r,"container")}else if(t.container.value.empty()){var r=t.format.locale.value.dev.noContainer,l=t.container.selector||"";o.warning(s(r,'"'+l+'"'),"container")}else t.dev.value&&o.time("total draw time"),t.container.value.call(t.self);if("function"==typeof e&&t.history.chain.length){var u={};t.history.chain.forEach(function(e){var t=e.method;delete e.method,u[t]=e}),e(u),t.history.chain=[]}return e},update:!0,value:void 0}},{"../../core/console/print.coffee":48,"../../core/parse/element.js":94,"../../core/parse/hideElement.js":95,"../../string/format.js":171,"../../util/d3selection.coffee":206}],112:[function(e,t,r){t.exports={accepted:[!1,Number,String],deprecates:"highlight",process:function(e,t){var r,n,a,i,o,s,l,u,c,d;if((n=t.data.element.value)&&["string","number"].indexOf(typeof e)>=0)if(a=n.node().tagName.toLowerCase(),i=n.attr("type"),"select"===a)for(d=n.selectAll("option"),o=s=0,u=d.length;s<u;o=++s)(r=d[o])&&r[t.id.value]===e&&(n.node().selectedIndex=o);else if("input"===a&&"radio"===i)for(l=0,c=n.length;l<c;l++)r=n[l],this.checked=r&&r[t.id.value]===e;return e},value:!1}},{}],113:[function(e,t,r){var n,a,i,o;i=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/align.coffee"),a=e("../../core/methods/font/decoration.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={align:n(),color:"#444444",decoration:a(),family:i(),secondary:{align:n(),color:"#444444",decoration:a(),family:i(),size:12,spacing:0,transform:o(),weight:200},size:12,spacing:0,transform:o(),weight:200}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],114:[function(e,t,r){var n,a,i,o;n=e("../../number/format.coffee"),a=e("../../core/locale/locale.coffee"),i=e("../../object/merge.coffee"),o=e("../../string/title.coffee"),t.exports={accepted:[Function,String],affixes:{accepted:[Object],objectAccess:!1,value:{}},deprecates:["number_format","text_format"],locale:{accepted:function(){return d3.keys(a)},process:function(e){var t,r;return t="en_US",r=a[t],e!==t&&(r=i(r,a[e])),this.language=e,r},value:"en_US"},number:{accepted:[!1,Function],value:!1},process:function(e,t){if("string"==typeof e)t.self.format({locale:e});else if("function"==typeof e)return e;return this.value},text:{accepted:[!1,Function],value:!1},value:function(e,t){var r,a;return t||(t={}),a=t.vars||{},a.time&&a.time.value&&t.key===a.time.value?(r=e.constructor===Date?e:new Date(e),a.data.time.format(r)):"number"==typeof e?(this.number.value||n)(e,t):"string"==typeof e?(this.text.value||o)(e,t):JSON.stringify(e)}}},{"../../core/locale/locale.coffee":77,"../../number/format.coffee":168,"../../object/merge.coffee":169,"../../string/title.coffee":174}],115:[function(e,t,r){t.exports={accepted:[!1,Number],max:600,secondary:!1,value:!1}},{}],116:[function(e,t,r){t.exports={back:function(){if(this.states.length)return this.states.pop()()},chain:[],reset:function(){var e;for(e=[];this.states.length;)e.push(this.states.pop()());return e},states:[]}},{}],117:[function(e,t,r){t.exports={accepted:[Boolean,Number,String],value:!1}},{}],118:[function(e,t,r){var n;n=e("../../core/methods/process/icon.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],back:{accepted:[!1,String],fallback:"❮",opacity:1,process:n,rotate:0,value:"fa-angle-left"},button:{accepted:[!1,String],fallback:!1,opacity:1,process:n,rotate:0,value:!1},drop:{accepted:[!1,String],fallback:"❯",opacity:1,process:n,rotate:0,value:"fa-angle-down"},next:{accepted:[!1,String],fallback:"❯",opacity:1,process:n,rotate:0,value:"fa-angle-right"},select:{accepted:[!1,String],fallback:"✓",opacity:1,process:n,rotate:0,value:"fa-check"},style:{accepted:[Object,String],value:"default"},value:"icon"}},{"../../core/methods/process/icon.coffee":87}],119:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,String],dataFilter:!0,mute:n(!0),nesting:["value"],solo:n(!0),value:"value"}},{"../../core/methods/filter.coffee":79}],120:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],mute:n(!0),solo:n(!0),value:"keywords"}},{"../../core/methods/filter.coffee":79}],121:[function(e,t,r){var n;n=e("../../core/methods/process/margin.coffee"),t.exports={accepted:[Number,Object,String],process:function(e){var t;return void 0===e&&(e=this.value),t=e,n(e,this),t},value:0}},{"../../core/methods/process/margin.coffee":88}],122:[function(e,t,r){t.exports={accepted:[Boolean],flipped:{accepted:[Boolean],value:!1},value:!1}},{}],123:[function(e,t,r){t.exports={accepted:[!1,Function,String],sort:{accepted:["asc","desc"],deprecates:["sort"],value:"asc"},value:!1}},{}],124:[function(e,t,r){t.exports={accepted:[void 0,Function],process:function(e,t){this.initialized&&t.container.ui.remove(),delete t.container.ui},value:void 0}},{}],125:[function(e,t,r){t.exports={accepted:["auto",Boolean],process:function(e){return"Boolean"==typeof e&&(this.enabled=e),e},term:"",value:"auto"}},{}],126:[function(e,t,r){t.exports={accepted:[String],chainable:!1,process:function(e,t){var r;return r=t.container.value,r&&e?r.select(e):e},value:void 0}},{}],127:[function(e,t,r){t.exports={accepted:[String],chainable:!1,process:function(e,t){var r;return r=t.container.value,r&&e?r.selectAll(e):e},value:void 0}},{}],128:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,String],nesting:!0,mute:n(!0),solo:n(!0),secondary:{accepted:[!1,String],nesting:!0,value:!1},value:!1}},{"../../core/methods/filter.coffee":79}],129:[function(e,t,r){t.exports={mouseevents:60,ui:200}},{}],130:[function(e,t,r){var n,a,i,o;n=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/family.coffee"),o=e("../../core/methods/font/transform.coffee"),i=e("../../string/strip.js"),t.exports={accepted:[!1,Function,String],font:{align:"center",color:"#444444",decoration:n(),family:a(),size:16,transform:o(),weight:400},link:!1,process:function(e,t){var r;return 0===t.container.id.indexOf("default")&&e&&(r=i(e).toLowerCase(),t.self.container({id:r})),e},value:!1}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84,"../../string/strip.js":173}],131:[function(e,t,r){t.exports={accepted:function(e){return d3.keys(e.types)},value:"auto"}},{}],132:[function(e,t,r){var n,a,i,o,s;i=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/align.coffee"),a=e("../../core/methods/font/decoration.coffee"),o=e("../../core/methods/process/margin.coffee"),s=e("../../core/methods/font/transform.coffee"),t.exports={align:n("center"),border:1,color:{primary:{process:function(e,t){var r;return r=this.value,t.ui.color.secondary.value||(t.ui.color.secondary.value=d3.rgb(r).darker(.75).toString()),e},value:"#ffffff"},secondary:{value:!1}},display:{acceped:["block","inline-block"],value:"inline-block"},font:{align:n("center"),color:"#444",decoration:a(),family:i(),size:11,transform:s(),weight:200},margin:{process:function(e){var t;return void 0===e&&(e=this.value),t=e,o(e,this),t},value:5},padding:{process:function(e){var t;return void 0===e&&(e=this.value),t=e,o(e,this),t},value:5}}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84,"../../core/methods/process/margin.coffee":88}],133:[function(e,t,r){t.exports={accepted:[!1,Number],secondary:!1,value:!1}},{}],134:[function(e,t,r){t.exports=function(e){var t=e.data.value.length;1===t?e.self.type("button").draw():t<5?e.self.type("toggle").draw():e.self.type("drop").draw()}},{}],135:[function(e,t,r){t.exports=function(t){var r,n,a,i,o,s,l,u;return s=e("../../../core/console/print.coffee"),a=e("./functions/color.coffee"),i=e("./functions/icons.js"),o=e("./functions/mouseevents.coffee"),l=e("./functions/style.js"),r=t.container.ui.selectAll("div.d3plus_node").data(t.data.viz,function(e){return e[t.id.value]}),t.dev.value&&s.time("enter"),r.enter().append("div").attr("class","d3plus_node").call(a,t).call(l,t).call(i,t).call(o,t),t.dev.value&&s.timeEnd("enter"),t.draw.update||t.draw.timing?(t.dev.value&&s.time("ordering"),r.order(),t.dev.value&&s.timeEnd("ordering"),u=r):(n=[t.focus.previous,t.focus.value,t.hover.previous,t.hover.value].filter(function(e){return e}),u=r.filter(function(e){return n.indexOf(e[t.id.value])>=0})),t.dev.value&&s.time("update"),u.classed("d3plus_button_active",function(e){return t.focus.value===e[t.id.value]}),t.draw.timing?u.transition().duration(t.draw.timing).call(a,t).call(l,t):u.call(a,t).call(l,t),u.call(i,t).call(o,t),t.dev.value&&s.timeEnd("update"),r.exit().remove()}},{"../../../core/console/print.coffee":48,"./functions/color.coffee":136,"./functions/icons.js":137,"./functions/mouseevents.coffee":138,"./functions/style.js":139}],136:[function(e,t,r){t.exports=function(t,r){var n,a;return n=e("../../../../color/legible.coffee"),e("../../../../color/lighter.coffee"),a=e("../../../../color/text.coffee"),t.style("background-color",function(e){var t;return t=r.focus.value===e[r.id.value]?r.ui.color.secondary.value:r.ui.color.primary.value,r.hover.value===e[r.id.value]&&(t=d3.rgb(t).darker(.15).toString()),t}).style("color",function(e){var t,i,o,s;return s=r.focus.value===e[r.id.value]?.75:1,o=e[r.icon.value]&&r.data.viz.length<r.data.large,!o&&e[r.color.value]?i=n(e[r.color.value]):(t=r.focus.value===e[r.id.value]?r.ui.color.secondary.value:r.ui.color.primary.value,r.hover.value===e[r.id.value]&&(t=d3.rgb(t).darker(.15).toString()),i=a(t)),i=d3.rgb(i),"rgba("+i.r+","+i.g+","+i.b+","+s+")"}).style("border-color",r.ui.color.secondary.value)}},{"../../../../color/legible.coffee":40,"../../../../color/lighter.coffee":41,"../../../../color/text.coffee":46}],137:[function(e,t,r){var n=e("../../../../client/prefix.coffee"),a=e("../../../../client/rtl.coffee");t.exports=function(e,t){var r="right"===t.font.align.value&&!a||a&&"right"===t.font.align.value;e.each(function(e,i){var o=["label"];e[t.icon.value]&&t.data.viz.length<=t.data.large&&o.push("icon");var s=t.icon.button.value;e[t.id.value]===t.focus.value&&t.icon.select.value?(s=t.icon.select.value,o.push("selected")):s&&!1!==e.d3plus.icon&&o.push("selected");var l=0,u=d3.select(this).selectAll("div.d3plus_button_element").data(o,function(e){return e});u.enter().append("div").style("display",function(e){return"label"===e?"block":"absolute"}),u.order().attr("class",function(e){var t="";return"selected"===e&&0===s.indexOf("fa-")&&(t=" fa "+s),"d3plus_button_element d3plus_button_"+e+t}).html(function(r){if("label"===r){var n=t.text.value&&t.text.value in e&&!(e[t.text.value]instanceof Array)?t.text.value:t.id.value;return t.format.value(e[n])}return"selected"===r&&s.indexOf("fa-")<0?s:""}).style("background-image",function(r){return"icon"===r?"url('"+e[t.icon.value]+"')":"none"}).style("background-color",function(r){return"icon"===r&&"knockout"===e.style?e[t.color.value]||t.ui.color.primary.value:"transparent"}).style("background-size","100%").style("text-align",function(e){return"label"===e?t.font.align.value:"center"}).style("position",function(e){return"label"==e?"static":"absolute"}).style("width",function(e){return"label"===e?"auto":(l=t.height.value?t.height.value-(t.ui.padding.top+t.ui.padding.bottom)-2*t.ui.border:t.font.size+t.ui.border)+"px"}).style("height",function(e){return"icon"===e?l+"px":"auto"}).style("margin-top",function(e){if("label"===e)return"0px";if(this.offsetHeight||this.getBoundingClientRect().height)var r=this.offsetHeight||this.getBoundingClientRect().height;else if("selected"===e)var r=t.font.size;else var r=l;return-r/2+"px"}).style("top",function(e){return"label"===e?"auto":"50%"}).style("left",function(e){return"icon"===e&&!r||"selected"===e&&r?t.ui.padding.left+"px":"auto"}).style("right",function(e){return"icon"===e&&r||"selected"===e&&!r?t.ui.padding.right+"px":"auto"}).style(n()+"transition",function(e){return"selected"===e?t.draw.timing/1e3+"s":"none"}).style(n()+"transform",function(e){var r="selected"===e?t.icon.select.rotate:"none";return"string"==typeof r?r:"rotate("+r+"deg)"}).style("opacity",function(e){return"selected"===e?t.icon.select.opacity:1}),u.exit().remove();var c=d3.select(this).selectAll(".d3plus_button_label");if(l>0){var d=t.ui.padding;d=3===o.length?d.top+"px "+(2*d.right+l)+"px "+d.bottom+"px "+(2*d.left+l)+"px":o.indexOf("icon")>=0&&!a||o.indexOf("selected")>=0&&a?d.top+"px "+d.right+"px "+d.bottom+"px "+(2*d.left+l)+"px":d.top+"px "+(2*d.right+l)+"px "+d.bottom+"px "+d.left+"px",c.style("padding",d)}else c.style("padding",t.ui.padding.css);if("number"==typeof t.width.value){var f=t.width.value;f-=parseFloat(c.style("padding-left"),10),f-=parseFloat(c.style("padding-right"),10),f-=2*t.ui.border,f+="px"}else var f="auto";c.style("width",f)})}},{"../../../../client/prefix.coffee":35,"../../../../client/rtl.coffee":36}],138:[function(e,t,r){t.exports=function(t,r,n){var a,i;return n=e("./color.coffee"),a=e("../../../../client/pointer.coffee"),i=e("../../../../client/ie.js"),t.on(a.over,function(e,t){return r.self.hover(e[r.id.value]),i||!r.draw.timing?d3.select(this).style("cursor","pointer").call(n,r):d3.select(this).style("cursor","pointer").transition().duration(r.timing.mouseevents).call(n,r)}).on(a.out,function(e){return r.self.hover(!1),i||!r.draw.timing?d3.select(this).style("cursor","auto").call(n,r):d3.select(this).style("cursor","auto").transition().duration(r.timing.mouseevents).call(n,r)}).on(a.click,function(e){return!1!==r.focus.value?r.self.focus(e[r.id.value]).draw():r.focus.callback?r.focus.callback(e,r.self):void 0})}},{"../../../../client/ie.js":33,"../../../../client/pointer.coffee":34,"./color.coffee":136}],139:[function(e,t,r){t.exports=function(e,t){e.style("position","relative").style("margin",t.ui.margin.css).style("display",t.ui.display.value).style("border-style","solid").style("border-width",t.ui.border+"px").style("font-family",t.font.family.value).style("font-size",t.font.size+"px").style("font-weight",t.font.weight).style("letter-spacing",t.font.spacing+"px")}},{}],140:[function(e,t,r){t.exports=function(t){var r,n,a,i,o,s,l,u,c,d,f;return a=e("./functions/element.coffee"),i=e("./functions/keyboard.coffee"),f=e("./functions/window.js"),d=e("./functions/width.js"),r=e("./functions/button.js"),l=e("./functions/selector.js"),u=e("./functions/title.js"),s=e("./functions/search.js"),o=e("./functions/list.js"),n=e("./functions/data.js"),c=e("./functions/update.js"),t.margin.top=0,t.margin.title=0,a(t),i(t),f(t),d(t),r(t),l(t),u(t),s(t),o(t),n(t),c(t)}},{"./functions/button.js":143,"./functions/data.js":144,"./functions/element.coffee":145,"./functions/keyboard.coffee":148,"./functions/list.js":149,"./functions/search.js":151,"./functions/selector.js":152,"./functions/title.js":153,"./functions/update.js":154,"./functions/width.js":155,"./functions/window.js":156}],141:[function(e,t,r){t.exports=function(e,t,r){var n=[],r=r||e.active.value;if(r instanceof Array)for(var a=0;a<r.length;a++)n.push(this(e,t,r[a]));else{var i=typeof r;"number"===i?n.push(e.depth.value===r):"function"===i?n.push(r(t)):n.push(t===r)}return n.indexOf(!0)>=0}},{}],142:[function(e,t,r){var n=e("../../../../core/console/print.coffee");t.exports=function(e){e.dev.value&&n.time("rotating arrow");var t="❯"===e.icon.drop.value?90:0;if(e.open.value!=e.open.flipped.value)var r=180+t;else var r=t;e.container.button.icon({select:{opacity:e.open.value?.5:1,rotate:r}}).draw(),e.dev.value&&n.timeEnd("rotating arrow")}},{"../../../../core/console/print.coffee":48}],143:[function(e,t,r){var n=e("../../../../util/copy.coffee"),a=e("../../../../client/pointer.coffee"),i=e("../../../form.js"),o=e("../../../../core/console/print.coffee");t.exports=function(e){if("button"in e.container||(e.dev.value&&o.time("creating main button"),e.container.button=i().container(e.container.ui).type("button").ui({margin:0}),e.dev.value&&o.timeEnd("creating main button")),e.focus.changed||e.data.changed||e.depth.changed){var t=e.depth.value,r=n(e.data.value.filter(function(r){for(var n=!1,a=0;a<e.id.nesting.length;a++){var i=e.id.nesting[a];if(n=i in r&&r[i]===e.focus.value){t=a;break}}return n})[0]);r||(r=e.container.button.data()[0]||e.data.viz[0]),e.container.button.data([r]).id(e.id.nesting).depth(t)}var s=!0===e.hover.value&&e.focus.value;e.container.button.draw({update:e.draw.update}).focus("").font(e.font).format(e.format).hover(s).icon({button:e.icon.drop.value,select:e.icon.drop.value,value:e.icon.value}).text(e.text.value).timing({ui:e.draw.timing}).ui({border:e.ui.border,color:e.ui.color,padding:e.ui.padding.css}).width(e.width.value).draw();var l=e.container.button.container(Object).ui;e.margin.top+=l.node().offsetHeight||l.node().getBoundingClientRect().height,l.on(a.click,function(){e.self.open(!e.open.value).draw()})}},{"../../../../client/pointer.coffee":34,"../../../../core/console/print.coffee":48,"../../../../util/copy.coffee":205,"../../../form.js":102}],144:[function(e,t,r){var n=e("../../../../string/format.js"),a=e("../../../../string/strip.js");t.exports=function(e){if(e.data.url&&!e.data.loaded){var t={};t[e.text.value||e.id.value]=e.format.value(e.format.locale.value.ui.loading),e.data.filtered=[t],e.data.changed="loading"!==e.data.lastFilter,e.data.lastFilter="loading"}else if(e.open.value)if(e.search.term){var r=a(e.search.term).split("_"),i=[e.id.value,e.text.value,e.alt.value,e.keywords.value];i=i.filter(function(e){return e}),r=r.filter(function(e){return""!==e});var o=[],s=[],l=[],u=[];if(e.id.nesting.forEach(function(t){u=u.concat(e.data.nested.all[t])}),u.forEach(function(t){var n=!1;i.forEach(function(i){if(!n&&i in t&&"string"==typeof t[i]){var u=t[i].toLowerCase();if([e.text.value,e.id.value].indexOf(i)>=0&&0===u.indexOf(e.search.term))o.push(t),n=!0;else if(u.indexOf(e.search.term)>=0)s.push(t),n=!0;else{var c=a(u).split("_");for(var d in c){if(n)break;for(var f in r)if(0===c[d].indexOf(r[f])){l.push(t),n=!0;break}}}}})}),e.data.filtered=d3.merge([o,s,l]),e.data.filtered.forEach(function(e,t){e.d3plus_order=t}),e.data.changed=!0,e.data.lastFilter="search",0===e.data.filtered.length){var c={},d=e.format.value(e.format.locale.value.ui.noResults);c[e.text.value||e.id.value]=n(d,'"'+e.search.term+'"'),e.data.filtered=[c]}}else e.data.filtered=e.data.viz,e.data.changed="viz"!==e.data.lastFilter,e.data.lastFilter="viz",e.id.nesting.length>1&&e.depth.value<e.id.nesting.length-1&&(e.data.filtered=e.data.filtered.filter(function(t){return"endPoint"in t.d3plus&&t.d3plus.endPoint===e.depth.value&&(t.d3plus.icon=!1),!0}),e.data.changed="depth"!==e.data.lastFilter,
e.data.lastFilter="depth");else e.data.filtered=[]}},{"../../../../string/format.js":171,"../../../../string/strip.js":173}],145:[function(e,t,r){t.exports=function(e){if(e.data.element.value)return e.data.element.value.on("focus."+e.container.id,function(){return e.self.hover(!0).draw()}),e.data.element.value.on("blur."+e.container.id,function(){if(!e.search.enabled||d3.event.relatedTarget!==e.container.value.select("input").node())return e.self.open(!1).hover(!1).draw()}),e.data.element.value.on("change."+e.container.id,function(){return e.self.focus(this.value).draw()}),e.data.element.value.on("keydown.cancel_"+e.container.id,function(){if(9!==d3.event.keyCode)return d3.event.preventDefault()})}},{}],146:[function(e,t,r){t.exports=function(e){var t=e.height.secondary,r=e.container.button.container().node().getBoundingClientRect(),n=window.innerHeight-r.bottom-2*e.ui.border-e.ui.margin.top-e.ui.margin.bottom-e.ui.padding.top-e.ui.padding.bottom;n<3*r.height&&(n=r.top-10,e.self.open({flipped:!0})),"number"!=typeof t&&(t=n),t>e.height.max&&(t=e.height.max),e.self.height({secondary:t})}},{}],147:[function(e,t,r){var n,a,i,o;n=e("./active.js"),a=e("../../../../util/copy.coffee"),i=e("../../../form.js"),o=e("../../../../core/console/print.coffee"),t.exports=function(e){var t,r,s;e.open.value&&(e.dev.value&&o.time("updating list items"),"items"in e.container||(e.container.items=i().container(e.container.list).type("button").ui({border:0,display:"block",margin:0}).width(!1)),r=e.draw.timing?e.data.large:1,s=a(e.order),s.value=e.search.term.length?"d3plus_order":e.order.value,t=e.depth.value===e.id.nesting.length-1,(e.focus.changed||!1===e.container.items.focus())&&e.container.items.focus(e.focus.value,function(t){var r,a,i,o;a=e.data.filtered.filter(function(r){return r[e.id.value]===t})[0],e.depth.value<e.id.nesting.length-1&&e.id.nesting[e.depth.value+1]in a?(i=e.depth.value,o=e.id.solo.value,e.history.states.push(function(){return e.self.depth(i).id({solo:o}).draw()}),e.self.depth(e.depth.value+1).id({solo:[t]}).draw()):(e.depth.changed||e.self.open(!1),r=t!==e.focus.value,r&&e.active.value&&(r=n(e,t)),r&&e.self.focus(t).draw())}),e.container.items.active(e.active.value).data({large:r,sort:e.data.sort.value,value:e.data.filtered}).draw({update:e.draw.update}).font(e.font.secondary).format(e.format).hover(e.hover.value).id(e.id.value).icon({button:!t&&e.icon.next,select:!!t&&e.icon.select,value:e.icon.value}).order(s).text(e.text.secondary.value||e.text.value).timing({ui:e.draw.timing}).ui({color:{primary:1===e.id.nesting.length?e.ui.color.primary.value:e.ui.color.secondary.value,secondary:e.ui.color.secondary.value},padding:e.ui.padding.css}).draw(),e.dev.value&&o.timeEnd("updating list items"))}},{"../../../../core/console/print.coffee":48,"../../../../util/copy.coffee":205,"../../../form.js":102,"./active.js":141}],148:[function(e,t,r){t.exports=function(e){return d3.select(window).on("keydown."+e.container.id,function(){var t,r,n,a,i,o,s,l,u,c,d,f,p;if(u=d3.event.keyCode,e.open.value||!0===e.hover.value){for(d=!0===e.hover.value?"focus":"hover",s=!1,f=e.data.filtered,o=l=0,c=f.length;l<c;o=++l)if(t=f[o],t[e.id.value]===e[d].value){s=o;break}if(9===u&&e.open.value&&(!e.search.enabled||e.search.enabled&&!d3.event.shiftKey))return e.self.open(!1).hover(!1).draw();if([38,40].indexOf(u)>=0)return!1===s?s=0:38===u?e.open.value&&(s<=0?s=e.data.filtered.length-1:s-=1):40===u&&e.open.value&&(s>=e.data.filtered.length-1?s=0:s+=1),i="boolean"!=typeof e.hover.value?e.data.filtered[s][e.id.value]:e.focus.value,e.self.hover(i).open(!0).draw();if(13===u)return"boolean"!=typeof e.hover.value?(r=e.data.filtered.filter(function(t){return t[e.id.value]===e.hover.value})[0],n=e.depth.value,n<e.id.nesting.length-1&&e.id.nesting[n+1]in r?(p=e.id.solo.value,a=function(){return e.self.depth(n).id({solo:p}).draw()},e.history.states.push(a),e.self.depth(e.depth.value+1).id({solo:[e.hover.value]}).draw()):e.self.focus(e.hover.value).hover(!0).draw()):e.self.hover(e.focus.value).open(!0).draw();if(27===u){if(e.open.value)return e.self.open(!1).hover(!0).draw();if(!0===e.hover.value)return e.self.hover(!1).draw()}}})}},{}],149:[function(e,t,r){var n=e("../../../../core/console/print.coffee");t.exports=function(e){e.dev.value&&n.time("populating list"),e.container.list=e.container.selector.selectAll("div.d3plus_drop_list").data(["list"]),e.container.list.enter().append("div").attr("class","d3plus_drop_list").attr("id","d3plus_drop_list_"+e.container.id).style("overflow-y","auto").style("overflow-x","hidden"),e.dev.value&&n.timeEnd("populating list")}},{"../../../../core/console/print.coffee":48}],150:[function(e,t,r){var n=e("../../../../core/console/print.coffee");t.exports=function(e){if(e.open.value){e.dev.value&&n.time("calculating height");var t=!1;if("none"==e.container.selector.style("display"))var t=!0;t&&e.container.selector.style("display","block");var r=e.container.selector.style("height"),a=e.container.selector.property("scrollTop"),i=e.container.list.style("max-height"),o=e.container.list.property("scrollTop");e.container.selector.style("height","auto"),e.container.list.style("max-height","200000px"),e.container.listHeight=parseFloat(e.container.selector.style("height"),10),e.container.list.style("max-height",i).property("scrollTop",o),e.container.selector.style("height",r).property("scrollTop",a);var s=!1;if(e.container.listHeight>e.height.secondary&&(e.container.listHeight=e.height.secondary,s=!0),t&&e.container.selector.style("display","none"),e.dev.value&&n.timeEnd("calculating height"),s){e.dev.value&&n.time("calculating scroll position");var l=e.container.list.select("div").selectAll("div.d3plus_node"),u=l[0][0],c="boolean"!=typeof e.hover.value?e.hover.value:e.focus.value;l.each(function(t,r){t[e.id.value]===c&&(u=this)});var t=!1;"none"===e.container.selector.style("display")&&(t=!0,e.container.selector.style("display","block"));var d=u.offsetTop,f=u.offsetHeight||u.getBoundingClientRect().height,p=e.container.list.property("scrollTop");t&&e.container.selector.style("display","none"),t||e.data.changed||e.depth.changed?e.container.listScroll=d:(e.container.listScroll=p,d<p?e.container.listScroll=d:d+f>p+e.height.secondary-e.search.height&&(e.container.listScroll=d-(e.height.secondary-f-e.search.height))),e.dev.value&&n.timeEnd("calculating scroll position")}else e.container.listScroll=0}else e.container.listScroll=e.container.list.property("scrollTop"),e.container.listHeight=0}},{"../../../../core/console/print.coffee":48}],151:[function(e,t,r){var n=e("../../../../client/prefix.coffee"),a=e("../../../../core/console/print.coffee");t.exports=function(t){function r(e){e.style("padding",t.ui.padding.css).style("display","block").style("background-color",d3.rgb(t.ui.color.primary.value).darker(.15).toString())}function i(e){var r=t.width.secondary-2*t.ui.padding.left-2*t.ui.padding.right+2*t.ui.border;e.style("padding",t.ui.padding.left/2+t.ui.padding.right/2+"px").style("width",r+"px").style("border-width","0px").style("font-family",t.font.secondary.family.value).style("font-size",t.font.secondary.size+"px").style("font-weight",t.font.secondary.weight).style("text-align",t.font.secondary.align).style("outline","none").style(n()+"border-radius","0").attr("placeholder",t.format.value(t.format.locale.value.method.search))}t.dev.value&&a.time("creating search");var o=e("./data.js"),s=e("./items.coffee"),l=e("./update.js");t.container.search=t.container.selector.selectAll("div.d3plus_drop_search").data(t.search.enabled?["search"]:[]),t.draw.timing?(t.container.search.transition().duration(t.draw.timing).call(r),t.container.search.select("input").transition().duration(t.draw.timing).call(i)):(t.container.search.call(r),t.container.search.select("input").call(i)),t.container.search.enter().insert("div","#d3plus_drop_list_"+t.container.id).attr("class","d3plus_drop_search").attr("id","d3plus_drop_search_"+t.container.id).call(r).append("input").attr("id","d3plus_drop_input_"+t.container.id).style("-webkit-appearance","none").call(i),t.container.search.select("input").on("keyup."+t.container.id,function(e){var r=this.value;t.search.term!==r&&(t.search.term=r,o(t),s(t),l(t))}),t.container.search.exit().remove();var u=t.container.selector.style("display");t.container.selector.style("display","block"),t.search.height=t.search.enabled?t.container.search.node().offsetHeight||t.container.search.node().getBoundingClientRect().height:0,t.container.selector.style("display",u),t.search.enabled&&(t.margin.title+=t.search.height),t.dev.value&&a.timeEnd("creating search")}},{"../../../../client/prefix.coffee":35,"../../../../core/console/print.coffee":48,"./data.js":144,"./items.coffee":147,"./update.js":154}],152:[function(e,t,r){t.exports=function(e){e.container.selector=e.container.ui.selectAll("div.d3plus_drop_selector").data(["selector"]),e.container.selector.enter().append("div").attr("class","d3plus_drop_selector").style("position","absolute").style("top","0px").style("z-index","-1").style("overflow","hidden"),e.container.selector.style("padding",e.ui.border+"px")}},{}],153:[function(e,t,r){var n=e("../../../../client/pointer.coffee"),a=e("../../../../color/lighter.coffee"),i=e("../../../../core/console/print.coffee"),o=e("../../../../color/text.coffee");t.exports=function(e){function t(t){t.style("padding",e.ui.padding.css).style("display","block").style("background-color",e.ui.color.secondary.value).style("font-family",e.font.secondary.family.value).style("font-size",e.font.secondary.size+"px").style("font-weight",e.font.secondary.weight).style("text-align",e.font.secondary.align).style("color",o(e.ui.color.secondary.value))}function r(t){if(!t.empty()){var r=0===e.icon.back.value.indexOf("fa-")?" fa "+e.icon.back.value:"";r="d3plus_drop_back"+r;var n=0===e.icon.back.value.indexOf("fa-")?"":e.icon.back.value;t.style("position","absolute").attr("class",r).style("top",e.ui.padding.top+e.font.secondary.size/2/2.5+"px").html(n)}}function s(t){var r=u?e.focus.value:e.format.locale.value.ui.back;t.text(e.format.value(r)).style("padding","0px "+(e.ui.padding.left+e.ui.padding.right)+"px")}if(e.open.value){e.dev.value&&i.time("creating title and back button");var l=1===e.id.solo.value.length&&e.depth.value>0,u=l,c=e.container.button.data(Object).viz[0];u=!0;for(var d=0;d<e.id.nesting.length;d++){var f=e.id.nesting[d];if(f in c&&c[f]===e.focus.value){u=!1;break}}e.container.title=e.container.selector.selectAll("div.d3plus_drop_title").data(l?["title"]:[]),e.draw.timing?(e.container.title.transition().duration(e.draw.timing).call(t),e.container.title.select("div.d3plus_drop_title_text").transition().duration(e.draw.timing).call(s)):(e.container.title.call(t),e.container.title.select("div.d3plus_drop_title_text").call(s)),e.container.title.select("span.d3plus_drop_back").call(r);var p=e.container.title.enter().insert("div","#d3plus_drop_list_"+e.container.id).attr("class","d3plus_drop_title").attr("id","d3plus_drop_title_"+e.container.id).call(t);p.append("span").attr("id","d3plus_drop_back_"+e.container.id).attr("class","d3plus_drop_back").call(r),p.append("div").attr("id","d3plus_drop_title_text_"+e.container.id).attr("class","d3plus_drop_title_text").call(s),e.container.title.on(n.over,function(t,r){var n=a(e.ui.color.secondary.value);d3.select(this).style("cursor","pointer").transition().duration(e.timing.mouseevents).style("background-color",n).style("color",o(n))}).on(n.out,function(t){var r=e.ui.color.secondary.value;d3.select(this).style("cursor","auto").transition().duration(e.timing.mouseevents).style("background-color",r).style("color",o(r))}).on(n.click,function(t){e.history.back()}),e.container.title.exit().remove(),l&&(e.margin.title+=e.container.title.node().offsetHeight||e.container.title.node().getBoundingClientRect().height),e.dev.value&&i.timeEnd("creating title and back button")}}},{"../../../../client/pointer.coffee":34,"../../../../color/lighter.coffee":41,"../../../../color/text.coffee":46,"../../../../core/console/print.coffee":48}],154:[function(e,t,r){var n=e("./items.coffee"),a=e("./height.js"),i=e("../../../../core/console/print.coffee"),o=e("./scroll.js"),s=e("./arrow.js");t.exports=function(e){function t(t){var r=e.open.flipped.value;t.style("top",function(){return r?"auto":e.margin.top-e.ui.border+"px"}).style("bottom",function(){return r?e.margin.top+e.ui.border+"px":"auto"})}function r(r){r.style("left",function(){return"left"===e.font.align.value?e.margin.left+"px":"center"===e.font.align.value?e.margin.left-(e.width.secondary-e.width.value)/2+"px":"auto"}).style("right",function(){return"right"===e.font.align.value?"0px":"auto"}).style("height",e.container.listHeight+"px").style("padding",e.ui.border+"px").style("background-color",e.ui.color.secondary.value).style("z-index",function(){return e.open.value?"9999":"-1"}).style("width",e.width.secondary-2*e.ui.border+"px").style("opacity",e.open.value?1:0).call(t)}function l(r){r.style("display",e.open.value?null:"none").call(t),e.search.enabled&&e.open.value&&e.container.selector.select("div.d3plus_drop_search input").node().focus()}e.draw.timing?e.container.ui.transition().duration(e.draw.timing).each("start",function(){e.open.value&&d3.select(this).style("z-index",9999)}).style("margin",e.ui.margin.css).each("end",function(){e.open.value||d3.select(this).style("z-index","auto")}):e.container.ui.style("margin",e.ui.margin.css).style("z-index",function(){return e.open.value?9999:"auto"}),n(e),a(e),o(e),s(e),e.dev.value&&i.time("drawing list");var u=e.open.value?e.height.secondary-e.margin.title:0;e.draw.timing?(e.container.selector.transition().duration(e.draw.timing).each("start",function(){d3.select(this).style("display",e.open.value?"block":null)}).call(r).each("end",function(){d3.select(this).transition().duration(e.draw.timing).call(l)}),e.container.list.transition().duration(e.draw.timing).style("width",e.width.secondary-2*e.ui.border+"px").style("max-height",u+"px").tween("scroll",function(e){return function(){var t=d3.interpolateNumber(this.scrollTop,e);return function(e){this.scrollTop=t(e)}}}(e.container.listScroll))):(e.container.selector.call(r).call(l),e.container.list.style("width",e.width.secondary-2*e.ui.border+"px").style("max-height",u+"px").property("scrollTop",e.container.listScroll)),e.dev.value&&i.timeEnd("drawing list")}},{"../../../../core/console/print.coffee":48,"./arrow.js":142,"./height.js":146,"./items.coffee":147,"./scroll.js":150}],155:[function(e,t,r){var n=e("../../../../util/copy.coffee"),a=e("../../../../core/font/tester.coffee"),i=e("../../../form.js"),o=e("../../../../core/console/print.coffee"),s=e("../../../../object/validate.coffee");t.exports=function(e){function t(t){var n="primary"===t?"value":t,s="value"===n?e.icon.drop.value:e.icon.select.value||e.icon.drop.value,l="value"===n?e.text.value:e.text.secondary.value||e.text.value,u="value"===n?e.font:e.font.secondary;e.dev.value&&o.time("calculating "+t+" width");var c=i().container(a()).data({large:9999,value:r}).draw({update:!1}).font(u).format(e.format).icon({button:s,value:e.icon.value}).id(e.id.value).timing({ui:0}).text(l||e.id.value).type("button").ui({border:"primary"===t?e.ui.border:0,display:"inline-block",margin:0,padding:e.ui.padding.css}).width(!1).draw(),d=[];c.selectAll("div.d3plus_node").each(function(e){d.push(this.offsetWidth+1)}).remove();var f={};f[n]=d3.max(d),e.self.width(f),e.dev.value&&o.timeEnd("calculating "+t+" width")}var r=[];for(var l in e.data.nested.all){var u=e.data.nested.all[l],c=s(e.text.nesting)&&l in e.text.nesting?e.text.nesting[l][0]:l;[e.id.value,e.text.value].indexOf(c)<0&&(u=n(u),u.forEach(function(t){t[e.text.value||e.id.value]=t[c]})),r=r.concat(u)}"number"!=typeof e.width.value&&t("primary"),"number"!=typeof e.width.secondary&&(e.text.secondary.value&&e.text.value!==e.text.secondary.value?t("secondary"):e.self.width({secondary:e.width.value}))}},{"../../../../core/console/print.coffee":48,"../../../../core/font/tester.coffee":64,"../../../../object/validate.coffee":170,"../../../../util/copy.coffee":205,"../../../form.js":102}],156:[function(e,t,r){var n=e("../../../../util/child.coffee"),a=function(e,t){if(void 0===t)var t=window;d3.select(t).on("click."+e.container.id,function(){var t=d3.event.target||d3.event.toElement,r=t.parentNode;r&&["d3plus_node","d3plus_drop_title"].indexOf(r.className)>=0&&(t=r.parentNode),t&&r&&!n(e.container.ui,t)&&(e.open.value||e.hover.value)&&e.self.open(!1).hover(!1).draw()});try{var r=window.parent.location.host===window.location.host}catch(e){var r=!1}r&&t.self!==window.top&&a(e,t.parent)};t.exports=a},{"../../../../util/child.coffee":203}],157:[function(e,t,r){var n=e("../form.js");t.exports=function(e){"buttons"in e.container||(e.container.buttons=n().container(e.container.ui).type("button"));var t=e.data.viz.length,r=!!e.width.value&&e.width.value/t,a=e.container.ui.selectAll("div.d3plus_toggle").data(e.data.viz,function(t){return t[e.id.value]});a.exit().remove(),a.enter().append("div").attr("class","d3plus_toggle").style("display","inline-block").style("vertical-align","top"),a.order().each(function(t){"form"in t.d3plus||(t.d3plus.form=n().container(d3.select(this)));var a=e.id.nesting.length>e.depth.value?e.id.nesting[e.depth.value+1]:e.id.value;t[a]instanceof Array?t.d3plus.form.container({id:e.container.id+"_"+t[e.id.value]}).data(t[a]).id(e.id.nesting.slice(1)).type("drop"):t.d3plus.form.data([t]).id(e.id.value).type("button"),t.d3plus.form.color(e.color).focus(e.focus.value,function(t){t!==e.focus.value&&e.self.focus(t).draw()}).hover(e.hover.value).icon({select:!1,value:e.icon.value}).font(e.font).format(e.format).order(e.order).text(e.text.value).ui({border:e.ui.border,color:e.ui.color,display:"inline-block",margin:0,padding:e.ui.padding.css}).width(r).draw()}),e.data.element.value&&e.data.element.value.on("focus."+e.container.id,function(){e.self.focus(this.value).hover(this.value).draw()}).on("blur."+e.container.id,function(){e.self.hover(!1).draw()})}},{"../form.js":102}],158:[function(e,t,r){var n,a,i,o,s,l,u,c,d,f,p;f=e("simplify-js"),t.exports=function(e,t){var r,a,o,l,u,d,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G,X,J,W,Q,K,Z,$,ee,te,re,ne,ae,ie,oe,se,le,ue,ce,de,fe,pe,he,ve,ge,me,ye,xe;if(e.length<3)return null;if(b=[],v=.5,u=5,null==t&&(t={}),null==t.maxAspectRatio&&(t.maxAspectRatio=15),null==t.minWidth&&(t.minWidth=0),null==t.minHeight&&(t.minHeight=0),null==t.tolerance&&(t.tolerance=.02),null==t.nTries&&(t.nTries=20),null!=t.angle&&(t.angle instanceof Array?d=t.angle:"number"==typeof t.angle?d=[t.angle]:"string"!=typeof t.angle||isNaN(t.angle)||(d=[Number(t.angle)])),null==d&&(d=d3.range(-90,90+u,u)),null!=t.aspectRatio&&(t.aspectRatio instanceof Array?g=t.aspectRatio:"number"==typeof t.aspectRatio?g=[t.aspectRatio]:"string"!=typeof t.aspectRatio||isNaN(t.aspectRatio)||(g=[Number(t.aspectRatio)])),null!=t.origin&&t.origin instanceof Array&&(J=t.origin[0]instanceof Array?t.origin:[t.origin]),0===(h=Math.abs(d3.geom.polygon(e).area())))return null;if(te=d3.extent(e,function(e){return e[0]}),L=te[0],I=te[1],re=d3.extent(e,function(e){return e[1]}),Y=re[0],D=re[1],ve=Math.min(I-L,D-Y)*t.tolerance,he=function(){var t,r,n;for(n=[],t=0,r=e.length;t<r;t++)W=e[t],n.push({x:W[0],y:W[1]});return n}(),ve>0&&(he=f(he,ve),e=function(){var e,t,r;for(r=[],e=0,t=he.length;e<t;e++)W=he[e],r.push([W.x,W.y]);return r}()),t.vdebug&&b.push({type:"simplify",poly:e}),ne=d3.extent(e,function(e){return e[0]}),L=ne[0],I=ne[1],ae=d3.extent(e,function(e){return e[1]}),Y=ae[0],D=ae[1],[[L,Y],[I,Y],[I,D],[L,D]],ie=[I-L,D-Y],y=ie[0],m=ie[1],me=Math.min(y,m)/50,null==J)for(J=[],x=d3.geom.polygon(e).centroid(),i(x,e)&&J.push(x);J.length<t.nTries;)fe=Math.random()*y+L,pe=Math.random()*m+Y,de=[fe,pe],i(de,e)&&J.push(de);for(t.vdebug&&b.push({type:"origins",points:J}),C=0,N=null,z=0,O=d.length;z<O;z++)for(o=d[z],l=-o*Math.PI/180,t.vdebug&&b.push({type:"angle",angle:o}),_=A=0,E=J.length;A<E;_=++A)for(G=J[_],oe=n(e,G,l),K=oe[0],$=oe[1],se=n(e,G,l+Math.PI/2),Q=se[0],Z=se[1],H=[],null!=K&&null!=$&&H.push([(K[0]+$[0])/2,(K[1]+$[1])/2]),null!=Q&&null!=Z&&H.push([(Q[0]+Z[0])/2,(Q[1]+Z[1])/2]),t.vdebug&&b.push({type:"modifOrigin",idx:_,p1W:K,p2W:$,p1H:Q,p2H:Z,modifOrigins:H}),j=0,F=H.length;j<F;j++)if(X=H[j],t.vdebug&&b.push({type:"origin",cx:X[0],cy:X[1]}),le=n(e,X,l),K=le[0],$=le[1],null!==K&&null!==$&&(U=Math.min(p(X,K),p(X,$)),P=2*Math.sqrt(U),ue=n(e,X,l+Math.PI/2),Q=ue[0],Z=ue[1],null!==Q&&null!==Z&&(V=Math.min(p(X,Q),p(X,Z)),q=2*Math.sqrt(V),!(P*q<C))))for(null!=g?a=g:(R=Math.max(1,t.minWidth/q,C/(q*q)),B=Math.min(t.maxAspectRatio,P/t.minHeight,P*P/C),a=d3.range(R,B+v,v)),T=0,S=a.length;T<S;T++)if(r=a[T],M=Math.max(t.minWidth,Math.sqrt(C*r)),!((ce=Math.min(P,q*r))*q<C))for(ce-M>=me&&t.vdebug&&b.push({type:"aRatio",aRatio:r});ce-M>=me;)ge=(M+ce)/2,w=ge/r,ye=X[0],xe=X[1],ee=[[ye-ge/2,xe-w/2],[ye+ge/2,xe-w/2],[ye+ge/2,xe+w/2],[ye-ge/2,xe+w/2]],ee=c(ee,l,X),s(ee,e)?(k=!0,C=ge*w,N={cx:ye,cy:xe,width:ge,height:w,angle:o},M=ge):(k=!1,ce=ge),t.vdebug&&b.push({type:"rectangle",cx:ye,cy:xe,width:ge,height:w,areaFraction:ge*w/h,angle:o,insidePoly:k});return[N,C,b]},p=function(e,t){var r,n;return r=t[0]-e[0],n=t[1]-e[1],r*r+n*n},l=function(e,t,r){var n,a,i,o;return o=t[1]<r[1]?[t,r]:[r,t],n=o[0],a=o[1],e[1]!==a[1]&&e[1]!==n[1]||(e[1]+=Number.MIN_VALUE),!(e[1]>a[1]||e[1]<n[1])&&(!(e[0]>n[0]&&e[0]>a[0])&&(e[0]<n[0]&&e[0]<a[0]||(i=(a[1]-n[1])/(a[0]-n[0]),(e[1]-n[1])/(e[0]-n[0])>i)))},i=function(e,t){var r,n,a,i,o;for(i=-1,o=t.length,n=t[o-1],a=0;++i<o;)r=n,n=t[i],l(e,r,n)&&a++;return a%2!=0},o=function(e,t,r){var n,a,i;return n=1e-9,a=e[0],i=e[1],!(a<Math.min(t[0],r[0])-n||a>Math.max(t[0],r[0])+n||i<Math.min(t[1],r[1])-n||i>Math.max(t[1],r[1])+n)},a=function(e,t,r,n){var a,i,o,s,l,u,c,d,f,p;return d=1e-9,s=e[0]-t[0],u=e[1]-t[1],l=r[0]-n[0],c=r[1]-n[1],o=s*c-u*l,Math.abs(o)<d?null:(a=e[0]*t[1]-e[1]*t[0],i=r[0]*n[1]-r[1]*n[0],f=(a*l-i*s)/o,p=(a*c-i*u)/o,[f,p])},d=function(e,t,r,n){var i;return null!=(i=a(e,t,r,n))&&(o(i,e,t)&&o(i,r,n))},s=function(e,t){var r,n,a,o,s,l,u,c;for(s=-1,u=e.length,c=t.length,a=e[u-1];++s<u;)for(r=a,a=e[s],l=-1,o=t[c-1];++l<c;)if(n=o,o=t[l],d(r,a,n,o))return!1;return i(e[0],t)},u=function(e,t,r){var n,a,i,o;return null==r&&(r=[0,0]),i=e[0]-r[0],o=e[1]-r[1],n=Math.cos(t),a=Math.sin(t),[n*i-a*o+r[0],a*i+n*o+r[1]]},c=function(e,t,r){var n,a,i,o;for(o=[],n=0,a=e.length;n<a;n++)i=e[n],o.push(u(i,t,r));return o},n=function(e,t,r){var n,i,s,l,u,c,d,f,h,v,g,m,y,x,b;for(u=1e-9,t=[t[0]+u*Math.cos(r),t[1]+u*Math.sin(r)],x=t[0],b=t[1],m=[x+Math.cos(r),b+Math.sin(r)],d=0,Math.abs(m[0]-x)<u&&(d=1),c=-1,v=e.length,i=e[v-1],f=Number.MAX_VALUE,h=Number.MAX_VALUE,s=null,l=null;++c<v;)n=i,i=e[c],null!=(g=a(t,m,n,i))&&o(g,n,i)&&(y=p(t,g),g[d]<t[d]?y<f&&(f=y,s=g):g[d]>t[d]&&y<h&&(h=y,l=g));return[s,l]}},{"simplify-js":23}],159:[function(e,t,r){t.exports=function(e,t,r){var n,a,i,o;return a={x:0,y:0},e<0&&(e=2*Math.PI+e),"square"===r?(i=Math.PI/180*45,e<=Math.PI?e<Math.PI/2?e<i?(a.x+=t,o=Math.tan(e)*t,a.y+=o):(a.y+=t,n=t/Math.tan(e),a.x+=n):e<Math.PI-i?(a.y+=t,n=t/Math.tan(Math.PI-e),a.x-=n):(a.x-=t,o=Math.tan(Math.PI-e)*t,a.y+=o):e<3*Math.PI/2?e<i+Math.PI?(a.x-=t,o=Math.tan(e-Math.PI)*t,a.y-=o):(a.y-=t,n=t/Math.tan(e-Math.PI),a.x-=n):e<2*Math.PI-i?(a.y-=t,n=t/Math.tan(2*Math.PI-e),a.x+=n):(a.x+=t,o=Math.tan(2*Math.PI-e)*t,a.y-=o)):(a.x+=t*Math.cos(e),a.y+=t*Math.sin(e)),a}},{}],160:[function(e,t,r){var n;n=e("../geom/offset.coffee"),t.exports=function(e){var t,r,a,i,o,s,l,u,c,d,f,p,h,v,g,m;if(!e)return[];for(e=e.slice(1).slice(0,-1).split(/L|A/),d=[],a=0,o=e.length;a<o;a++)if(c=e[a],c=c.split(" "),1===c.length)d.push(c[0].split(",").map(function(e){return parseFloat(e)}));else{for(f=d[d.length-1],i=c.pop().split(",").map(function(e){return parseFloat(e)}),p=parseFloat(c.shift().split(",")[0]),m=Math.sqrt(Math.pow(i[0]-f[0],2)+Math.pow(i[1]-f[1],2)),t=Math.acos((p*p+p*p-m*m)/(2*p*p)),u="1"===c[1].split(",")[0],u&&(t=2*Math.PI-t),s=t/(2*Math.PI)*(p*Math.PI*2),h=s/5,v=Math.atan2(-f[1],-f[0])-Math.PI,g=t/h,r=g;r<t;)l=n(v+r,p),d.push([l.x,l.y]),r+=g;d.push(i)}return d}},{"../geom/offset.coffee":159}],161:[function(e,t,r){var n,a,i;n={},n.version="1.9.8 - Cornflower",n.repo="https://github.com/alexandersimoes/d3plus/",n.array={comparator:e("./array/comparator.coffee"),contains:e("./array/contains.coffee"),sort:e("./array/sort.coffee"),update:e("./array/update.coffee")},n.client={css:e("./client/css.coffee"),ie:e("./client/ie.js"),pointer:e("./client/pointer.coffee"),prefix:e("./client/prefix.coffee"),rtl:e("./client/rtl.coffee"),scroll:e("./client/scroll.js"),scrollbar:e("./client/scrollbar.coffee"),touch:e("./client/touch.coffee")},n.color={legible:e("./color/legible.coffee"),lighter:e("./color/lighter.coffee"),mix:e("./color/mix.coffee"),random:e("./color/random.coffee"),scale:e("./color/scale.coffee"),sort:e("./color/sort.coffee"),text:e("./color/text.coffee"),validate:e("./color/validate.coffee")},n.data={bestRegress:e("./data/bestRegress.coffee"),lof:e("./data/lof.coffee"),mad:e("./data/mad.coffee")},n.font={sizes:e("./font/sizes.coffee"),validate:e("./font/validate.coffee")},n.form=e("./form/form.js"),n.geom={largestRect:e("./geom/largestRect.coffee"),offset:e("./geom/offset.coffee"),path2poly:e("./geom/path2poly.coffee")},n.network={cluster:e("./network/cluster.coffee"),distance:e("./network/distance.coffee"),normalize:e("./network/normalize.coffee"),shortestPath:e("./network/shortestPath.coffee"),smallestGap:e("./network/smallestGap.coffee"),subgraph:e("./network/subgraph.coffee")},n.number={format:e("./number/format.coffee")},n.object={merge:e("./object/merge.coffee"),validate:e("./object/validate.coffee")},n.string={format:e("./string/format.js"),list:e("./string/list.coffee"),strip:e("./string/strip.js"),title:e("./string/title.coffee")},n.textwrap=e("./textwrap/textwrap.coffee"),n.tooltip={create:e("./tooltip/create.js"),move:e("./tooltip/move.coffee"),remove:e("./tooltip/remove.coffee")},n.util={buckets:e("./util/buckets.coffee"),child:e("./util/child.coffee"),closest:e("./util/closest.coffee"),copy:e("./util/copy.coffee"),d3selection:e("./util/d3selection.coffee"),dataurl:e("./util/dataURL.coffee"),uniques:e("./util/uniques.coffee")},n.viz=e("./viz/viz.coffee"),i=e("./client/css.coffee"),a=e("./core/console/print.coffee"),i("d3plus.css")&&a.warning("d3plus.css has been deprecated, you do not need to load this file.",n.repo+"releases/tag/v1.4.0"),"undefined"!=typeof window&&(window.d3plus=n),t.exports=n},{"./array/comparator.coffee":28,"./array/contains.coffee":29,"./array/sort.coffee":30,"./array/update.coffee":31,"./client/css.coffee":32,"./client/ie.js":33,"./client/pointer.coffee":34,"./client/prefix.coffee":35,"./client/rtl.coffee":36,"./client/scroll.js":37,"./client/scrollbar.coffee":38,"./client/touch.coffee":39,"./color/legible.coffee":40,"./color/lighter.coffee":41,"./color/mix.coffee":42,"./color/random.coffee":43,"./color/scale.coffee":44,"./color/sort.coffee":45,"./color/text.coffee":46,"./color/validate.coffee":47,"./core/console/print.coffee":48,"./data/bestRegress.coffee":97,"./data/lof.coffee":98,"./data/mad.coffee":99,"./font/sizes.coffee":100,"./font/validate.coffee":101,"./form/form.js":102,"./geom/largestRect.coffee":158,"./geom/offset.coffee":159,"./geom/path2poly.coffee":160,"./network/cluster.coffee":162,"./network/distance.coffee":163,"./network/normalize.coffee":164,"./network/shortestPath.coffee":165,"./network/smallestGap.coffee":166,"./network/subgraph.coffee":167,"./number/format.coffee":168,"./object/merge.coffee":169,"./object/validate.coffee":170,"./string/format.js":171,"./string/list.coffee":172,"./string/strip.js":173,"./string/title.coffee":174,"./textwrap/textwrap.coffee":198,"./tooltip/create.js":199,"./tooltip/move.coffee":200,"./tooltip/remove.coffee":201,"./util/buckets.coffee":202,"./util/child.coffee":203,"./util/closest.coffee":204,"./util/copy.coffee":205,"./util/d3selection.coffee":206,"./util/dataURL.coffee":207,"./util/uniques.coffee":208,"./viz/viz.coffee":331}],162:[function(e,t,r){var n;n=e("./normalize.coffee"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C;if(h=[],null==t&&(t={}),(null==t.nodes||"object"!=typeof t.nodes)&&(F=n(e,t),e=F[0],t=F[1],null===t))return null;t.distance,M=t.nodeid,C=t.startpoint,p=t.endpoint,O=t.nodes,E={};for(g in O)E[g]={node:O[g].node,degree:0};for(k=0,_={},v=0,b=e.length;v<b;v++)f=e[v],a=M(C(f)),i=M(p(f)),a in _||(_[a]={}),i in _||(_[i]={}),i in _[a]||(_[a][i]=0,_[i][a]=0,k++,E[a].degree+=1,E[i].degree+=1);u={},r=0;for(g in E)j=E[g],u[g]={score:j.degree/(2*k),nodes:[g]};for(a in _)for(i in _[a])_[a][i]=1/(2*k)-E[a].degree*E[i].degree/(4*k*k);for(m=0;m<1e3;){d=-1,z=void 0,A=void 0;for(a in _)for(i in _[a])_[a][i]>d&&(d=_[a][i],z=a,A=i);if(d<0)break;for(x in _[z])x!==A&&(x in _[A]?_[A][x]+=_[z][x]:_[A][x]=_[z][x]-2*u[A].score*u[x].score,_[x][A]=_[A][x]),delete _[x][z];for(x in _[A])x in _[z]||x===A||(_[A][x]-=2*u[z].score*u[x].score,_[x][A]=_[A][x]);for(S=u[z].nodes,y=0,w=S.length;y<w;y++)j=S[y],u[A].nodes.push(j);u[A].score+=u[z].score,t.vdebug&&h.push({type:"merge",father:A,child:z,nodes:u[A].nodes}),delete u[z],delete _[z],r+=d,m++}return l=function(){var e;e=[];for(o in u)c=u[o],e.push([o,c.nodes.length]);return e}(),l.sort(function(e,t){return t[1]-e[1]}),T=function(){var e,t,r;for(r=[],e=0,t=l.length;e<t;e++)s=l[e],r.push(u[s[0]].nodes);return r}(),[T,h]}},{"./normalize.coffee":164}],163:[function(e,t,r){t.exports=function(e,t){var r,n;return e instanceof Array||(e=[e.x,e.y]),t instanceof Array||(t=[t.x,t.y]),r=Math.abs(e[0]-t[0]),n=Math.abs(e[1]-t[1]),Math.sqrt(r*r+n*n)}},{}],164:[function(e,t,r){var n;n=e("../core/console/print.coffee"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C;if(F=t.source,T=t.target,o=t.directed,s=t.distance,j=t.nodeid,S=t.startpoint,c=t.endpoint,r=t.K,C=t.vdebug,o||(o=!1),null==r&&(r=1),null==j?j=function(e){return e}:"string"==typeof j&&(j=function(e){return function(t){return t[e]}}(j)),null!=F&&"object"==typeof F&&(F=j(F)),null!=T&&"object"==typeof T&&(T=j(T)),null==S?S=function(e){return e.source}:"string"==typeof S&&(S=function(e){return function(t){return t[e]}}(S)),null==c?c=function(e){return e.target}:"string"==typeof c&&(c=function(e){return function(t){return t[e]}}(c)),null==s)s=function(e){return 1};else if("number"==typeof s)s=function(e){return function(t){return e}}(s);else if("string"==typeof s)s=function(e){return function(t){return t[e]}}(s);else if(s instanceof Array){for(u={},f=m=0,b=e.length;m<b;f=++m)l=e[f],a=j(S(l)),i=j(c(l)),u[a+"_"+i]=s[f];s=function(e){return a=j(S(e)),i=j(c(e)),u[a+"_"+i]}}for(M={},y=0,w=e.length;y<w;y++){for(l=e[y],z=S(l),A=c(l),v=j(z),g=j(A),O=[z,A],x=0,_=O.length;x<_;x++)k=O[x],(p=j(k))in M||(M[p]={node:k,outedges:[]});M[v].outedges.push(l),o||M[g].outedges.push(l)}return d=null,0===e.length?d="The length of edges is 0":r<0?d="K can not have negative value":null==s(e[0])?d="Check the distance function/attribute":null==S(e[0])?d="Check the startpoint function/attribute":null==c(e[0])?d="Check the endpoint function/attribute":(h=j(S(e[0])),null==h||"string"!=(E=typeof h)&&"number"!==E?d="Check the nodeid function/attribute":null==F||F in M?null==T||T in M||(d="The target is not in the graph"):d="The source is not in the graph"),null!=d?(n.error(d),null):[e,{source:F,target:T,directed:o,distance:s,nodeid:j,startpoint:S,endpoint:c,K:r,nodes:M,vdebug:C}]}},{"../core/console/print.coffee":48}],165:[function(e,t,r){var n,a;n=e("heap"),a=e("./normalize.coffee"),t.exports=function(e,t,r){var i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C;if(null==r&&(r={}),r.source=t,(null==r.nodes||"object"!=typeof r.nodes)&&(A=a(e,r),e=A[0],r=A[1],null===r))return null;t=r.source,S=r.target,u=r.directed,c=r.distance,_=r.nodeid,F=r.startpoint,f=r.endpoint,i=r.K,k=r.nodes;for(g in k)w=k[g],w.count=0;for(h=new n(function(e,t){
return e.distance-t.distance}),C={},null==S&&(C[t]=!0),h.push({edge:null,target:t,distance:0}),b=0,E=[];!h.empty()&&(b=Math.max(b,h.size()),z=h.pop(),T=z.target,k[T].count++,null==S?E.push(z):T===S&&E.push(z),E.length!==i);)if(k[T].count<=i)for(j=k[T].outedges,v=0,y=j.length;v<y;v++){if(d=j[v],o=_(F(d)),l=_(f(d)),u||l!==T||(M=[l,o],o=M[0],l=M[1]),null==S){if(C[l])continue;C[l]=!0}s=z.distance+c(d),h.push({edge:d,previous:z,target:l,distance:s})}for(p=function(t){for(e=[];null!=t.edge;)e.push(t.edge),t=t.previous;return e.reverse()},m=0,x=E.length;m<x;m++)O=E[m],null!=S&&(delete O.target,O.edges=p(O)),delete O.edge,delete O.previous;return E}},{"./normalize.coffee":164,heap:9}],166:[function(e,t,r){var n;n=e("./distance.coffee"),t.exports=function(e,t){var r,a;return t||(t={}),r=[],a=d3.geom.quadtree().x(function(e){return t.accessor?t.accessor(e)[0]:e[0]}).y(function(e){return t.accessor?t.accessor(e)[1]:e[1]}),a(e).visit(function(e){var a,i,o,s,l,u,c,d;if(!e.leaf)for(c=e.nodes,a=0,o=c.length;a<o;a++)if((l=c[a])&&l.point)if(t.origin)r.push(n(l,t));else for(d=e.nodes,i=0,s=d.length;i<s;i++)(u=d[i])&&u.point&&u.point!==l.point&&r.push(n(l,u));return!1}),t.all?r.sort(function(e,t){return e-t}):d3.min(r)}},{"./distance.coffee":163}],167:[function(e,t,r){var n;n=e("./normalize.coffee"),t.exports=function(e,t,r){var a,i,o,s,l,u,c,d,f,p,h,v;return null==r&&(r={}),r.source=t,null!=r.nodes&&"object"==typeof r.nodes||(p=n(e,r),e=p[0],null!==(r=p[1]))?(t=r.source,o=r.directed,s=r.distance,d=r.nodeid,h=r.startpoint,u=r.endpoint,a=r.K,f=r.nodes,v={},v[t]=!0,i=function(e,t){var r,n,l,c,p,g,m,y,x;for(m=f[e].outedges,x=[],c=0,p=m.length;c<p;c++)l=m[c],r=d(h(l)),n=d(u(l)),o||n!==e||(y=[n,r],r=y[0],n=y[1]),n in v?x.push(void 0):(g=t+s(l),g<=a?(v[n]=!0,x.push(i(n,g))):x.push(void 0));return x},i(t,0),{nodes:function(){var e;e=[];for(c in v)e.push(f[c].node);return e}(),edges:function(){var t,r,n;for(n=[],t=0,r=e.length;t<r;t++)l=e[t],d(h(l))in v&&d(u(l))in v&&n.push(l);return n}()}):null}},{"./normalize.coffee":164}],168:[function(e,t,r){var n;n=e("../core/locale/languages/en_US.coffee"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h;return void 0===e||null===e||!1===e?"":(t||(t={}),l="locale"in t?t.locale:n,f=l.time.slice(),a=d3.locale(l.format),t||(t={}),p=t.vars||{},i=t.key,o=!("labels"in t)||t.labels,s=e.toString().split(".")[0].length,p.time&&p.time.value&&f.push(p.time.value),"string"==typeof i&&f.indexOf(i.toLowerCase())>=0?u=e:"share"===i?(u=0===e?0:e>=100?a.numberFormat(",f")(e):e>99?a.numberFormat(".3g")(e):a.numberFormat(".2g")(e),u+="%"):e<10&&e>-10?(s=e.toString().split("."),c=1,s.length>1&&(c=d3.min([parseFloat(s[1]).toString().length,2]),-1<e&&e<1||(h=s[1].length-parseFloat(s[1]).toString().length,c+=1+h)),u=a.numberFormat("."+c+"g")(e)):s>3?(d=d3.formatPrefix(e).symbol,d=d.replace("G","B"),e=d3.formatPrefix(e).scale(e),e=a.numberFormat(".3g")(e),e=e.replace(l.format.decimal,"."),e=parseFloat(e)+"",e=e.replace(".",l.format.decimal),u=e+d):u=3===s?a.numberFormat(",f")(e):0===e?0:e===parseInt(e,10)?a.numberFormat(".2")(e):a.numberFormat(".3g")(e),u.length>2&&""+u.indexOf(".0")===u.length-2&&(u=u.slice(0,u.length-2)),o&&i&&"format"in p&&i in p.format.affixes.value?(r=p.format.affixes.value[i],r[0]+u+r[1]):u)}},{"../core/locale/languages/en_US.coffee":67}],169:[function(e,t,r){var n,a;n=e("../util/d3selection.coffee"),a=e("./validate.coffee"),t.exports=function(e,t){var r,i;return r=function(e,t,i){var o,s,l;s=[];for(o in e)l=e[o],void 0!==l?!i&&a(l)?("object"!=typeof t[o]&&(t[o]={}),s.push(r(l,t[o],0===o.indexOf("d3plus")))):!n(l)&&l instanceof Array?s.push(t[o]=l.slice(0)):s.push(t[o]=l):s.push(void 0);return s},i={},e&&r(e,i),t&&r(t,i),i}},{"../util/d3selection.coffee":206,"./validate.coffee":170}],170:[function(e,t,r){t.exports=function(e){return e&&e.constructor===Object}},{}],171:[function(e,t,r){t.exports=function(){var e=Array.prototype.slice.call(arguments),t=e.shift();return t.unkeyed_index=0,t.replace(/\{(\w*)\}/g,function(r,n){if(""===n&&(n=t.unkeyed_index,t.unkeyed_index++),n==+n)return"undefined"!==e[n]?e[n]:r;for(var a=0;a<e.length;a++)if("object"==typeof e[a]&&void 0!==e[a][n])return e[a][n];return r}.bind(t))}},{}],172:[function(e,t,r){var n,a;n=e("./format.js"),a=e("../core/locale/languages/en_US.coffee").ui,t.exports=function(e,t,r,i){var o;return e instanceof Array?(e=e.slice(0),t||(t=a.and),i||(i=a.moreText),2===e.length?e.join(" "+t+" "):(r&&e.length>r&&(o=e.length-r+1,e=e.slice(0,r-1),e[r-1]=n(i,o)),e.length>1&&(e[e.length-1]=t+" "+e[e.length-1]),e.join(", "))):e}},{"../core/locale/languages/en_US.coffee":67,"./format.js":171}],173:[function(e,t,r){t.exports=function(e){var t=[[/[\300-\305]/g,"A"],[/[\340-\345]/g,"a"],[/[\306]/g,"AE"],[/[\346]/g,"ae"],[/[\337]/g,"B"],[/[\307]/g,"C"],[/[\347]/g,"c"],[/[\320\336\376]/g,"D"],[/[\360]/g,"d"],[/[\310-\313]/g,"E"],[/[\350-\353]/g,"e"],[/[\314-\317]/g,"I"],[/[\354-\357]/g,"i"],[/[\321]/g,"N"],[/[\361]/g,"n"],[/[\322-\326\330]/g,"O"],[/[\362-\366\370]/g,"o"],[/[\331-\334]/g,"U"],[/[\371-\374]/g,"u"],[/[\327]/g,"x"],[/[\335]/g,"Y"],[/[\375\377]/g,"y"]];return""+e.replace(/[^A-Za-z0-9\-_]/g,function(e){if(" "===e)return"-";for(var r=!1,n=0;n<t.length;n++)if(new RegExp(t[n][0]).test(e)){r=t[n][1];break}return r||""})}},{}],174:[function(e,t,r){var n;n=e("../core/locale/languages/en_US.coffee"),t.exports=function(e,t){var r,a,i,o;return e?(t||(t={}),t.key,"."===e.charAt(e.length-1)?e.charAt(0).toUpperCase()+e.substr(1):(i="locale"in this?this.locale.value:n,o=i.lowercase.map(function(e){return e.toLowerCase()}),a=i.uppercase,a=a.concat(a.map(function(e){return e+"s"})),r=a.map(function(e){return e.toLowerCase()}),e.replace(/[^\s!-#%&(-\x2A,-:;\x3F@\x5B-\x5D_\x7B}\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]*/g,function(t,n){var i;return t?(i=r.indexOf(t.toLowerCase()),i>=0?a[i]:o.indexOf(t.toLowerCase())>=0&&0!==n&&n!==e.length-1?t.toLowerCase():t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()):""}))):""}},{"../core/locale/languages/en_US.coffee":67}],175:[function(e,t,r){var n,a;n=e("./foreign.coffee"),a=e("./tspan.coffee"),t.exports=function(e){e.text.html.value?n(e):a(e)}},{"./foreign.coffee":176,"./tspan.coffee":179}],176:[function(e,t,r){t.exports=function(e){var t,r,n,a,i;i=e.container.value,n=i.attr("font-family")||i.style("font-family"),t=e.align.value||i.attr("text-anchor")||i.style("text-anchor"),r=i.attr("fill")||i.style("fill"),a=i.attr("opacity")||i.style("opacity"),t="end"===t?"right":"middle"===t?"center":"left",d3.select(i.node().parentNode).append("foreignObject").attr("width",e.width.value+"px").attr("height",e.height.value+"px").attr("x","0px").attr("y","0px").append("xhtml:div").style("font-family",n).style("font-size",e.size.value[1]+"px").style("color",r).style("text-align",t).style("opacity",a).text(e.text.current)}},{}],177:[function(e,t,r){t.exports=function(e){var t,r,n,a,i,o,s,l,u,c;if(r=e.container.value,a=r.node().previousElementSibling,o=a?a.tagName.toLowerCase():"",a&&(a=d3.select(a)),e.container.x=e.x.value||parseFloat(r.attr("x"),10),e.container.y=e.y.value||parseFloat(r.attr("y"),10),a&&(e.shape.accepted.indexOf(o)>=0&&e.self.shape(o),"rect"===o?(u=parseFloat(a.attr("x"),10)||0,c=parseFloat(a.attr("y"),10)||0,!1===e.padding.value&&(t=Math.abs(u-e.container.x))&&e.self.padding(t),e.container.x||(e.container.x=u+e.padding.value),e.container.y||(e.container.y=c+e.padding.value),e.width.value||(l=parseFloat(a.attr("width")),e.self.width(l)),e.height.value||(n=parseFloat(a.attr("height")),e.self.height(n))):"circle"===o?(i=parseFloat(a.attr("r"),10),u=parseFloat(a.attr("cx"),10)||0,u-=i,c=parseFloat(a.attr("cy"),10)||0,c-=i,!1===e.padding.value&&(t=Math.abs(u-e.container.x))&&e.self.padding(t),e.container.x||(e.container.x=u+e.padding.value),e.container.y||(e.container.y=c+e.padding.value),e.width.value||e.self.width(2*i,10),e.height.value||e.self.height(2*i,10)):(e.width.value||e.self.width(500),e.height.value||e.self.height(500))),e.container.x||(e.container.x=0),e.container.y||(e.container.y=0),e.width.inner=e.width.value-2*e.padding.value,e.height.inner=e.height.value-2*e.padding.value,s=r.attr("font-size")||r.style("font-size"),s=parseFloat(s,10),e.container.fontSize=s,e.container.dy=parseFloat(r.attr("dy"),10),!e.size.value)return e.resize.value?e.self.size([4,80]):e.self.size([s/2,s])}},{}],178:[function(e,t,r){t.exports=function(e){var t;if(e.text.value||(t=e.container.value.text())&&(t.indexOf("tspan")>=0&&(t.replace(/\<\/tspan\>\<tspan\>/g," "),t.replace(/\<\/tspan\>/g,""),t.replace(/\<tspan\>/g,"")),t=t.replace(/(\r\n|\n|\r)/gm,""),t=t.replace(/^\s+|\s+$/g,""),e.self.text(t)),e.text.value instanceof Array?e.text.phrases=e.text.value.filter(function(e){return["string","number"].indexOf(typeof e)>=0}):e.text.phrases=[e.text.value+""],!e.align.value)return e.container.align=e.container.value.style("text-anchor")||e.container.value.attr("text-anchor")}},{}],179:[function(e,t,r){var n;n=e("../../client/rtl.coffee"),t.exports=function(e){var t,r,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T;return f=function(t){var n;return n=!v||t?e.container.value.append("tspan"):e.container.value.insert("tspan","tspan"),n.attr("x",E+"px").attr("dy",r+"px").style("baseline-shift","0%").attr("dominant-baseline","alphabetic")},d=-90===e.rotate.value||90===e.rotate.value,j=d?e.height.inner:e.width.inner,s=d?e.width.inner:e.height.inner,t="circle"===e.shape.value?"middle":e.align.value||e.container.align||"start",F="end"===t||"start"===t&&n?j:"middle"===t?j/2:0,A=e.valign.value||"top",E=e.container.x+F,i=e.resize.value?e.size.value[1]:e.container.fontSize||e.size.value[0],r=e.container.dy||1.1*i,_=null,h=null,M=null,v=!1,T=0,"circle"===e.shape.value&&("middle"===A?T=s/r%1*r/2:"end"===A&&(T=s/r%1*r)),e.container.value.attr("text-anchor",t).attr("font-size",i+"px").style("font-size",i+"px").attr("x",e.container.x).attr("y",e.container.y),z=function(){if(_.remove(),v?(l++,_=e.container.value.select("tspan")):(l--,_=d3.select(e.container.value.node().lastChild)),!_.empty())return M=_.text().match(/[^\s-]+-?/g),a()},u=function(){var t;return"circle"===e.shape.value?(t=(l-1)*r+T,t>s/2&&(t+=r),2*Math.sqrt(t*(j/2*2-t))):j},a=function(){var t,r;return M&&M.length?(r=M.pop(),t=r.charAt(r.length-1),1===r.length&&e.text.split.value.indexOf(r)>=0?a():(e.text.split.value.indexOf(t)>=0&&(r=r.substr(0,r.length-1)),_.text(M.join(" ")+" "+r+"..."),_.node().getComputedTextLength()>u()?a():void 0)):z()},p=function(t){var r,n,a,i;if(r=_.text(),i="",v){if(" "===(i=e.text.current.charAt(e.text.current.length-h.length-1)))for(a="",n=2;" "===i;)a+=" ",i=e.text.current.charAt(e.text.current.length-h.length-n),n++;else a="";h=t+a+h,_.text(t+a+r)}else{if(" "===(i=e.text.current.charAt(h.length)))for(a="",n=1;" "===i;)a+=" ",i=e.text.current.charAt(h.length+n),n++;else a="";h+=a+t,_.text(r+a+t)}if(Math.floor(_.node().getComputedTextLength())>u()||"\n"===i)return _.text(r),r.length&&(_=f()),_.text(t),v?l--:l++},w=1,l=null,c=null,O=function(){var t,n,a,i,o,u;for(e.container.value.text("").html(""),M=e.text.words.slice(),v&&M.reverse(),h="",_=f(!0),l=w,n=0,a=M.length;n<a;n++){if(u=M[n],l*r>s){z();break}for(p(u),o=!0;o;){for(i=e.text.current.charAt(h.length),t=1;" "===i;)i=e.text.current.charAt(h.length+t),t++;o=e.text.split.value.indexOf(i)>=0,o&&p(i)}}return l*r>s&&z(),c=Math.abs(l-w)+1},O(),c=0,e.container.value.selectAll("tspan").each(function(){if(d3.select(this).text().length)return c++}),"circle"===e.shape.value&&(b=s-c*r)>r&&("middle"===A?(w=1+(b/r/2>>0),O()):"bottom"===A&&(v=!0,w=s/r>>0,O())),c=0,e.container.value.selectAll("tspan").each(function(){if(d3.select(this).text().length)return c++}),"top"===A?S=0:(o=c*r,S="middle"===A?s/2-o/2:s-o),S-=.2*r,k="translate(0,"+S+")",180===e.rotate.value||-180===e.rotate.value?(y=e.container.x+j/2,x=e.container.y+s/2):(g=e.rotate.value<0?j:s,y=e.container.x+g/2,x=e.container.y+g/2),m="rotate("+e.rotate.value+", "+y+", "+x+")",e.container.value.attr("transform",m+k)}},{"../../client/rtl.coffee":36}],180:[function(e,t,r){var n,a,i,o;n=e("./flow.coffee"),a=e("../../font/sizes.coffee"),o=function(e){var t;e.text.phrases.length&&(e.text.current=e.text.phrases.shift()+"",e.text.words=e.text.current.match(e.text.split.break),t=e.text.current.charAt(0),t!==e.text.words[0].charAt(0)&&(e.text.words[0]=t+e.text.words[0]),e.container.value.html(""),e.resize.value?i(e):n(e))},t.exports=o,i=function(e){var t,r,i,s,l,u,c,d,f,p,h,v,g,m,y,x,b;for(b=[],c=0;c<e.text.words.length;)t=c===e.text.words.length-1?"":" ",b.push(e.text.words[c]+t),c++;p=-90===e.rotate.value||90===e.rotate.value,y=p?e.height.inner:e.width.inner,l=p?e.width.inner:e.height.inner,h=Math.floor(e.size.value[1]),d="circle"===e.shape.value?.75*y:y,g=a(b,{"font-size":h+"px"},{parent:e.container.value}),f=d3.max(g,function(e){return e.width}),r=1.165+y/l*.11,m=d3.sum(g,function(t){var r;return r=e.container.dy||1.2*h,t.width*r})*r,s="circle"===e.shape.value?Math.PI*Math.pow(y/2,2):d*l,(f>d||m>s)&&(i=Math.sqrt(s/m),x=d/f,v=d3.min([i,x]),h=d3.max([e.size.value[0],Math.floor(h*v)])),u=Math.floor(.8*l),h>u&&(h=u),f*(h/e.size.value[1])<=d?(h!==e.size.value[1]&&e.self.size([e.size.value[0],h]),n(e)):o(e)}},{"../../font/sizes.coffee":100,"./flow.coffee":175}],181:[function(e,t,r){t.exports={accepted:[!1,"start","middle","end","left","center","right"],process:function(e){var t;return t=["left","center","right"].indexOf(e),t>=0&&(e=this.accepted[t+1]),e},value:!1}},{}],182:[function(e,t,r){arguments[4][106][0].apply(r,arguments)},{dup:106}],183:[function(e,t,r){var n;n=e("../../util/d3selection.coffee"),t.exports={accepted:[!1,Array,Object,String],element:!1,id:"default",process:function(e){return!1!==e&&(n(e)?e:e instanceof Array?d3.select(e[0][0]):(this.selector=e,d3.select(e)))},value:!1}},{"../../util/d3selection.coffee":206}],184:[function(e,t,r){arguments[4][110][0].apply(r,arguments)},{dup:110}],185:[function(e,t,r){var n,a;n=e("../../core/console/print.coffee"),a=e("../../string/format.js"),t.exports={accepted:[void 0],process:function(e,t){var r,i;return!1===this.initialized?e:(!1===t.container.value?(i=t.format.locale.value.dev.setContainer,n.warning(i,"container")):t.container.value.empty()?(i=t.format.locale.value.dev.noContainer,r=t.container.selector||"",n.warning(a(i,'"'+r+'"'),"container")):(t.dev.value&&n.time("total draw time"),t.container.value.call(t.self)),e)},value:void 0}},{"../../core/console/print.coffee":48,"../../string/format.js":171}],186:[function(e,t,r){var n,a;n=e("../../core/locale/locale.coffee"),a=e("../../object/merge.coffee"),t.exports={accepted:[Function,String],locale:{accepted:function(){return d3.keys(n)},process:function(e){var t,r;return t="en_US",r=n[t],e!==t&&(r=a(r,n[e])),this.language=e,r},value:"en_US"},process:function(e,t){if(this.initialized&&"string"==typeof e)t.self.format({locale:e});else if("function"==typeof e)return e;return this.value},value:"en_US"}},{"../../core/locale/locale.coffee":77,"../../object/merge.coffee":169}],187:[function(e,t,r){t.exports={accepted:[!1,Number],value:!1}},{}],188:[function(e,t,r){arguments[4][187][0].apply(r,arguments)},{dup:187}],189:[function(e,t,r){arguments[4][110][0].apply(r,arguments)},{dup:110}],190:[function(e,t,r){t.exports={accepted:[-180,-90,0,90,180],value:0}},{}],191:[function(e,t,r){t.exports={accepted:["circle","square"],value:!1}},{}],192:[function(e,t,r){t.exports={accepted:[Array,!1],value:!1}},{}],193:[function(e,t,r){t.exports={accepted:[!1,Array,Number,String],html:{accepted:[Boolean],value:!1},init:function(e){var t;return t=this.split.value,this.split.break=new RegExp("[^\\s\\"+t.join("\\")+"]+\\"+t.join("?\\")+"?","g"),!1},split:{accepted:[Array],process:function(e){return this.break=new RegExp("[^\\s\\"+e.join("\\")+"]+\\"+e.join("?\\")+"?","g"),e},value:["-","/",";",":","&"]}}},{}],194:[function(e,t,r){t.exports={accepted:[!1,"top","middle","bottom"],value:!1}},{}],195:[function(e,t,r){arguments[4][187][0].apply(r,arguments)},{dup:187}],196:[function(e,t,r){arguments[4][187][0].apply(r,arguments)},{dup:187}],197:[function(e,t,r){arguments[4][187][0].apply(r,arguments)},{dup:187}],198:[function(e,t,r){var n,a,i,o,s;n=e("../core/methods/attach.coffee"),i=e("./helpers/parseSize.coffee"),a=e("../core/console/print.coffee"),o=e("./helpers/parseText.coffee"),s=e("./helpers/wrap.coffee"),t.exports=function(){var t;return t={self:function(e){return e.each(function(){i(t),t.size.value[0]<=t.height.inner?(o(t),s(t)):t.container.value.html(""),t.dev.value&&a.timeEnd("total draw time")}),t.self}},n(t,{align:e("./methods/align.coffee"),config:e("./methods/config.coffee"),container:e("./methods/container.coffee"),dev:e("./methods/dev.coffee"),draw:e("./methods/draw.coffee"),format:e("./methods/format.coffee"),height:e("./methods/height.coffee"),padding:e("./methods/padding.coffee"),resize:e("./methods/resize.coffee"),rotate:e("./methods/rotate.coffee"),text:e("./methods/text.coffee"),shape:e("./methods/shape.coffee"),size:e("./methods/size.coffee"),valign:e("./methods/valign.coffee"),width:e("./methods/width.coffee"),x:e("./methods/x.coffee"),y:e("./methods/y.coffee")}),t.self}},{"../core/console/print.coffee":48,"../core/methods/attach.coffee":78,"./helpers/parseSize.coffee":177,"./helpers/parseText.coffee":178,"./helpers/wrap.coffee":180,"./methods/align.coffee":181,"./methods/config.coffee":182,"./methods/container.coffee":183,"./methods/dev.coffee":184,"./methods/draw.coffee":185,"./methods/format.coffee":186,"./methods/height.coffee":187,"./methods/padding.coffee":188,"./methods/resize.coffee":189,"./methods/rotate.coffee":190,"./methods/shape.coffee":191,"./methods/size.coffee":192,"./methods/text.coffee":193,"./methods/valign.coffee":194,"./methods/width.coffee":195,"./methods/x.coffee":196,"./methods/y.coffee":197}],199:[function(e,t,r){function n(){d3.selectAll("div.d3plus_tooltip_data_desc").style("height","0px"),d3.selectAll("div.d3plus_tooltip_data_help").style("background-color","#ccc")}var a=e("../core/locale/languages/en_US.coffee"),i=e("../client/pointer.coffee"),o=e("../color/legible.coffee"),s=e("./move.coffee"),l=e("../client/prefix.coffee"),u=e("../client/rtl.coffee"),c=e("./remove.coffee"),d=e("../client/scroll.js"),f=e("../client/scrollbar.coffee"),p=e("../string/list.coffee"),h=e("../color/text.coffee");t.exports=function(e){var t=e.fullscreen?250:200,r=l();e.width=e.width||t,e.max_width=e.max_width||386,e.id=e.id||"default",e.size=e.fullscreen||e.html?"large":"small",e.offset=e.offset||0,e.arrow_offset=e.arrow?8:0,e.x=e.x||0,e.y=e.y||0,e.parent=e.parent||d3.select("body"),e.curtain=e.curtain||"#fff",e.curtainopacity=e.curtainopacity||.8,e.background=e.background||"#fff",e.fontcolor=e.fontcolor||"#444",e.fontfamily=e.fontfamily||"sans-serif",e.fontweight=e.fontweight||"normal",e.fontsize=e.fontsize||"12px",e.style=e.style||"default",e.zindex="small"==e.size?2e3:500,e.locale=e.locale||a,e.stacked=e.stacked||!1;var v=e.parent?e.parent.node().offsetHeight||e.parent.node().getBoundingClientRect().height:0;if(e.iconsize||(e.iconsize="small"==e.size?22:50),e.parent.node()===document.body){e.limit=[window.innerWidth+d.x(),window.innerHeight+d.y()];var g=f();document.body.scrollHeight>window.innerHeight&&(e.limit[0]-=g)}else e.limit=[parseFloat(e.parent.style("width"),10),parseFloat(e.parent.style("height"),10)];if(e.title instanceof Array){var m=e.locale.ui.and,y=e.locale.ui.more;e.title=p(e.title,m,3,y)}if(c(e.id),e.anchor={},e.fullscreen)e.anchor.x="center",e.anchor.y="center",e.x=e.parent?e.parent.node().offsetWidth/2:window.innerWidth/2,e.y=e.parent?v/2:window.innerHeight/2;else if(e.align){var x=e.align.split(" ");e.anchor.y=x[0],x[1]?e.anchor.x=x[1]:e.anchor.x="center"}else e.anchor.x="center",e.anchor.y="top";var b=e.width-30;if(e.fullscreen){e.parent.append("div").attr("id","d3plus_tooltip_curtain_"+e.id).attr("class","d3plus_tooltip_curtain").style("background-color",e.curtain).style("opacity",e.curtainopacity).style("position","absolute").style("z-index",499).style("top","0px").style("right","0px").style("bottom","0px").style("left","0px").on(i.click,function(){c(e.id)})}var w=e.parent.append("div").datum(e).attr("id","d3plus_tooltip_id_"+e.id).attr("class","d3plus_tooltip d3plus_tooltip_"+e.size).style("color",e.fontcolor).style("font-family",e.fontfamily).style("font-weight",e.fontweight).style("font-size",e.fontsize+"px").style(r+"box-shadow","0px 1px 3px rgba(0, 0, 0, 0.25)").style("position","absolute").on(i.out,n);e.max_height&&w.style("max-height",e.max_height+"px"),e.fixed?(w.style("z-index",500),e.mouseevents=!0):w.style("z-index",2e3);var _=w.append("div").datum(e).attr("class","d3plus_tooltip_container").style("background-color",e.background).style("padding","6px");if(e.fullscreen&&e.html&&!e.stacked){z=e.parent?.75*e.parent.node().offsetWidth:.75*window.innerWidth,P=e.parent?.75*v:.75*window.innerHeight,_.style("width",z+"px").style("height",P+"px");var k=_.append("div").attr("class","d3plus_tooltip_body").style("padding-right","6px").style("display","inline-block").style("z-index",1).style("width",e.width+"px")}else{if("auto"==e.width){var z="auto";_.style("max-width",e.max_width+"px")}else var z=e.width-14+"px";var k=_.style("width",z)}if(e.title||e.icon)var A=k.append("div").attr("class","d3plus_tooltip_header").style("position","relative").style("z-index",1);if(e.fullscreen){w.append("div").attr("class","d3plus_tooltip_close").style("background-color",e.color).style("color",h(e.color)).style("position","absolute").style(r+"box-shadow","0 1px 3px rgba(0, 0, 0, 0.25)").style("font-size","20px").style("height","18px").style("line-height","14px").style("text-align","center").style("right","16px").style("top","-10px").style("width","18px").style("z-index",10).html("×").on(i.over,function(){d3.select(this).style("cursor","pointer").style(r+"box-shadow","0 1px 3px rgba(0, 0, 0, 0.5)")}).on(i.out,function(){d3.select(this).style("cursor","auto").style(r+"box-shadow","0 1px 3px rgba(0, 0, 0, 0.25)")}).on(i.click,function(){c(e.id)});d3.select("body").on("keydown.esc_"+e.id,function(){27===d3.event.keyCode&&(c(e.id),d3.select("body").on("keydown.esc_"+e.id,null))})}if(e.mouseevents){if(!0!==e.mouseevents){var j=d3.select(e.mouseevents).on(i.out),M=function(){var t=d3.event.toElement||d3.event.relatedTarget;if(t)var r="string"==typeof t.className?t.className:t.className.baseVal,a=0==r.indexOf("d3plus_tooltip");else var a=!1;t&&(O(w.node(),t)||O(e.mouseevents,t)||a)||(j(d3.select(e.mouseevents).datum()),n(),d3.select(e.mouseevents).on(i.out,j))},O=function(e,t){for(var r=t.parentNode;null!==r;){if(r==e)return!0;r=r.parentNode}return!1};d3.select(e.mouseevents).on(i.out,M),w.on(i.out,M);var E=d3.select(e.mouseevents).on(i.move);E&&w.on(i.move,E)}}else w.style("pointer-events","none");if(e.arrow){w.append("div").attr("class","d3plus_tooltip_arrow").style("background-color",e.background).style(r+"box-shadow","0px 1px 3px rgba(0, 0, 0, 0.25)").style("position","absolute").style("bottom","-5px").style("height","10px").style("left","50%").style("margin-left","-5px").style("width","10px").style(r+"transform","rotate(45deg)").style("z-index",-1)}if(e.icon){var F=A.append("div").attr("class","d3plus_tooltip_icon").style("width",e.iconsize+"px").style("height",e.iconsize+"px").style("z-index",1).style("background-position","50%").style("background-size","100%").style("background-image","url("+e.icon+")").style("display","inline-block").style("margin","0px 3px 3px 0px");"knockout"==e.style&&F.style("background-color",e.color),b-=F.node().offsetWidth}if(e.title){var S=e.max_width-6;e.icon&&(S-=e.iconsize+6),S+="px";A.append("div").attr("class","d3plus_tooltip_title").style("max-width",S).style("color",e.icon?e.fontcolor:o(e.color)).style("vertical-align","top").style("width",b+"px").style("display","inline-block").style("overflow","hidden").style("text-overflow","ellipsis").style("word-wrap","break-word").style("z-index",1).style("font-size","large"===e.size?"18px":"16px").style("line-height","large"===e.size?"20px":"17px").style("padding","large"===e.size?"3px 6px":"3px").text(e.title)}if(e.description){k.append("div").attr("class","d3plus_tooltip_description").style("font-size","12px").style("padding","6px").text(e.description)}if(e.data||e.html&&!e.fullscreen)var T=k.append("div").attr("class","d3plus_tooltip_data_container").style("overflow-y","auto").style("z-index",-1);if(e.data){var C=0,B={},q=null;e.data.forEach(function(t,a){t.group&&q!=t.group&&(q=t.group,T.append("div").attr("class","d3plus_tooltip_data_title").style("font-size","12px").style("font-weight","bold").style("padding","6px 3px 0px 3px").text(t.group));var s=T.append("div").attr("class","d3plus_tooltip_data_block").style("font-size","12px").style("padding","3px 6px").style("position","relative").datum(t);!0===t.highlight?s.style("color",o(e.color)):(t.allColors||t.highlight!==e.color)&&s.style("color",o(t.highlight));var c=s.append("div").attr("class","d3plus_tooltip_data_name").style("display","inline-block").html(t.name).on(i.out,function(){d3.event.stopPropagation()});if(t.link&&c.style("cursor","pointer").on(i.click,t.link),t.value instanceof Array){var d=e.locale.ui.and,f=e.locale.ui.more;t.value=list(t.value,d,3,f)}var p=s.append("div").attr("class","d3plus_tooltip_data_value").style("display","block").style("position","absolute").style("text-align","right").style("top","3px").html(t.value).on(i.out,function(){d3.event.stopPropagation()});if(u?p.style("left","6px"):p.style("right","6px"),e.mouseevents&&t.desc){var h=s.append("div").attr("class","d3plus_tooltip_data_desc").style("color","#888").style("overflow","hidden").style(r+"transition","height 0.5s").style("width","85%").text(t.desc).on(i.out,function(){d3.event.stopPropagation()}),v=h.node().offsetHeight||h.node().getBoundingClientRect().height;h.style("height","0px");var g=c.append("div").attr("class","d3plus_tooltip_data_help").style("background-color","#ccc").style(r+"border-radius","5px").style("color","#fff").style("cursor","pointer").style("display","inline-block").style("font-size","8px").style("font-weight","bold").style("height","10px").style("margin","3px 0px 0px 3px").style("padding-right","1px").style("text-align","center").style("width","10px").style("vertical-align","top").style(l+"transition","background-color 0.5s").text("?").on(i.over,function(){var e=d3.select(this.parentNode.parentNode).style("color");d3.select(this).style("background-color",e),h.style("height",v+"px")}).on(i.out,function(){d3.event.stopPropagation()});c.style("cursor","pointer").on(i.over,function(){n();var e=d3.select(this.parentNode).style("color");g.style("background-color",e),h.style("height",v+"px")}),s.on(i.out,function(){d3.event.stopPropagation(),n()})}var m=parseFloat(p.style("width"),10);m>e.width/2&&(m=e.width/2),m>C&&(C=m),a!=e.data.length-1&&(t.group&&t.group==e.data[a+1].group||!t.group&&!e.data[a+1].group)&&T.append("div").attr("class","d3plus_tooltip_data_seperator").style("background-color","#ddd").style("display","block").style("height","1px").style("margin","0px 3px")}),T.selectAll(".d3plus_tooltip_data_name").style("width",function(){return parseFloat(d3.select(this.parentNode).style("width"),10)-C-30+"px"}),T.selectAll(".d3plus_tooltip_data_value").style("width",C+"px").each(function(e){var t=parseFloat(d3.select(this).style("height"),10);B[e.name]=t}),T.selectAll(".d3plus_tooltip_data_name").style("min-height",function(e){return B[e.name]+"px"})}!e.html||e.fullscreen&&!e.stacked||(T.append("div").html(e.html),e.js&&e.js(_));var N=k.append("div").attr("class","d3plus_tooltip_footer").style("font-size","10px").style("position","relative").style("text-align","center");if(e.footer&&N.html(e.footer),e.height=w.node().offsetHeight||w.node().getBoundingClientRect().height,e.html&&e.fullscreen&&!e.stacked){var P=e.height-12,z=w.node().offsetWidth-e.width-44;_.append("div").attr("class","d3plus_tooltip_html").style("width",z+"px").style("height",P+"px").style("display","inline-block").style("vertical-align","top").style("overflow-y","auto").style("padding","0px 12px").style("position","absolute").html(e.html),e.js&&e.js(_)}if(e.width=w.node().offsetWidth,"center"!=e.anchor.y?e.height+=e.arrow_offset:e.width+=e.arrow_offset,e.data||(!e.fullscreen||e.stacked)&&e.html){if(!e.fullscreen||e.stacked)var I=e.fixed?v-e.y-10:v-10,P=e.height<I?e.height:I;else var P=e.height;P-=parseFloat(_.style("padding-top"),10),P-=parseFloat(_.style("padding-bottom"),10),A&&(P-=A.node().offsetHeight||A.node().getBoundingClientRect().height,P-=parseFloat(A.style("padding-top"),10),P-=parseFloat(A.style("padding-bottom"),10)),N&&(P-=N.node().offsetHeight||N.node().getBoundingClientRect().height,P-=parseFloat(N.style("padding-top"),10),P-=parseFloat(N.style("padding-bottom"),10)),T.style("max-height",P+"px")}e.height=w.node().offsetHeight||w.node().getBoundingClientRect().height,s(e.x,e.y,e.id)}},{"../client/pointer.coffee":34,"../client/prefix.coffee":35,"../client/rtl.coffee":36,"../client/scroll.js":37,"../client/scrollbar.coffee":38,"../color/legible.coffee":40,"../color/text.coffee":46,"../core/locale/languages/en_US.coffee":67,"../string/list.coffee":172,"./move.coffee":200,"./remove.coffee":201}],200:[function(e,t,r){var n,a;a=e("../client/scroll.js"),t.exports=function(e,t,r){var i,o,s;return r||(r="default"),s=d3.select("div#d3plus_tooltip_id_"+r),s.node()&&(i=s.datum(),i.cx=e,i.cy=t,i.fixed||(o="body"===i.parent.node().tagName.toLowerCase()?[a.x(),a.y()]:[0,0],"center"!==i.anchor.y?("right"===i.anchor.x?i.x=i.cx-i.arrow_offset-4:"center"===i.anchor.x?i.x=i.cx-i.width/2:"left"===i.anchor.x&&(i.x=i.cx-i.width+i.arrow_offset+2),"bottom"===i.anchor.y?i.flip=i.cy+i.height+i.offset<=i.limit[1]:"top"===i.anchor.y&&(i.flip=i.cy-i.height-i.offset<o[1]),i.flip?i.y=i.cy+i.offset+i.arrow_offset:i.y=i.cy-i.height-i.offset-i.arrow_offset):(i.y=i.cy-i.height/2,"right"===i.anchor.x?i.flip=i.cx+i.width+i.offset<=i.limit[0]:"left"===i.anchor.x&&(i.flip=i.cx-i.width-i.offset<o[0]),"center"===i.anchor.x?(i.flip=!1,i.x=i.cx-i.width/2):i.flip?i.x=i.cx+i.offset+i.arrow_offset:i.x=i.cx-i.width-i.offset),i.x<o[0]?i.x=o[0]:i.x+i.width>i.limit[0]&&(i.x=i.limit[0]-i.width),i.y<o[1]?i.y=o[1]:i.y+i.height>i.limit[1]&&(i.y=i.limit[1]-i.height)),s.style("top",i.y+"px").style("left",i.x+"px"),i.arrow&&s.selectAll(".d3plus_tooltip_arrow").call(n)),s},n=function(e){return e.style("bottom",function(e){return"center"===e.anchor.y||e.flip?"auto":"-5px"}).style("right",function(e){return"center"!==e.anchor.y||e.flip?"auto":"-5px"}).style("top",function(e){return"center"!==e.anchor.y&&e.flip?"-5px":"center"===e.anchor.y?"50%":"auto"}).style("left",function(e){return"center"===e.anchor.y&&e.flip?"-5px":"center"!==e.anchor.y?"50%":"auto"}).style("margin-left",function(e){var t
;return"center"===e.anchor.y?"auto":(t="right"===e.anchor.x?-e.width/2+e.arrow_offset/2:"left"===e.anchor.x?e.width/2-2*e.arrow_offset-5:-5,e.cx-e.width/2-5<t?(t=e.cx-e.width/2-5)<2-e.width/2&&(t=2-e.width/2):-(e.limit[0]-e.cx-e.width/2+5)>t&&(t=-(e.limit[0]-e.cx-e.width/2+5))>e.width/2-11&&(t=e.width/2-11),t+"px")}).style("margin-top",function(e){var t;return"center"!==e.anchor.y?"auto":(t="bottom"===e.anchor.y?-e.height/2+e.arrow_offset/2-1:"top"===e.anchor.y?e.height/2-2*e.arrow_offset-2:-9,e.cy-e.height/2-e.arrow_offset<t?(t=e.cy-e.height/2-e.arrow_offset)<4-e.height/2&&(t=4-e.height/2):-(e.limit[1]-e.cy-e.height/2+e.arrow_offset)>t&&(t=-(e.limit[1]-e.cy-e.height/2+e.arrow_offset))>e.height/2-22&&(t=e.height/2-22),t+"px")})}},{"../client/scroll.js":37}],201:[function(e,t,r){t.exports=function(e){return e?(d3.selectAll("div#d3plus_tooltip_curtain_"+e).remove(),d3.selectAll("div#d3plus_tooltip_id_"+e).remove()):(d3.selectAll("div.d3plus_tooltip_curtain").remove(),d3.selectAll("div.d3plus_tooltip").remove())}},{}],202:[function(e,t,r){t.exports=function(e,t){var r;return[],r=1/(t-1)*(e[1]-e[0]),d3.range(e[0],e[1]+r,r)}},{}],203:[function(e,t,r){var n;n=e("./d3selection.coffee"),t.exports=function(e,t){var r;if(!e||!t)return!1;for(n(e)&&(e=e.node()),n(e)&&(t=t.node()),r=t.parentNode;null!==r;){if(r===e)return!0;r=r.parentNode}return!1}},{"./d3selection.coffee":206}],204:[function(e,t,r){t.exports=function(e,t){var r,n;return t.constructor===String?(n=e.indexOf(t),n>-1?e[n]:e[0]):(r=e[0],e.forEach(function(e){if(Math.abs(t-e)<Math.abs(t-r))return r=e}),r)}},{}],205:[function(e,t,r){var n,a,i;a=e("../object/merge.coffee"),i=e("../object/validate.coffee"),n=function(e){var t;return i(e)?a(e):e instanceof Array?(t=[],e.forEach(function(e){return t.push(n(e))}),t):e},t.exports=n},{"../object/merge.coffee":169,"../object/validate.coffee":170}],206:[function(e,t,r){var n;n=e("../client/ie.js"),t.exports=function(e){return n?"object"==typeof e&&e instanceof Array&&"size"in e&&"select"in e:e instanceof d3.selection}},{"../client/ie.js":33}],207:[function(e,t,r){t.exports=function(e,t){var r;r=new Image,r.src=e,r.crossOrigin="Anonymous",r.onload=function(){var e,r;e=document.createElement("canvas"),e.width=this.width,e.height=this.height,r=e.getContext("2d"),r.drawImage(this,0,0),t.call(this,e.toDataURL("image/png")),e=null}}},{}],208:[function(e,t,r){var n,a;n=e("../object/validate.coffee"),a=function(e,t,r,i,o,s){var l,u,c,d,f,p,h,v,g,m,y,x,b,w;if(void 0===e)return[];if(i&&void 0===o&&(o=i.id.value),s=!0===s&&void 0===s,e instanceof Array||(e=[e]),m=[],void 0===t)return e.reduce(function(e,t){var r;return r=JSON.stringify(t),m.indexOf(r)<0&&(e.indexOf(t)<0&&e.push(t),m.push(r)),e},[]);if(w=[],l=function(e){var t;if(void 0!==e&&null!==e&&(t=JSON.stringify(e),m.indexOf(t)<0))return w.push(e),m.push(t)},"function"==typeof r&&i)for(c=0,p=e.length;c<p;c++)for(u=e[c],b=a(r(i,u,t,o)),d=0,h=b.length;d<h;d++)x=b[d],l(x);else if("function"==typeof t)for(f=0,v=e.length;f<v;f++)u=e[f],b=t(u),l(b);else for(y=0,g=e.length;y<g;y++)u=e[y],n(u)&&(b=u[t],l(b));return s?w.sort(function(e,t){return e-t}):w},t.exports=a},{"../object/validate.coffee":170}],209:[function(e,t,r){t.exports=function(e){var t,r,n,a,i;for(e.container.value.style("position",function(){var e,t;return e=d3.select(this).style("position"),t=["absolute","fixed"].indexOf(e)>=0,t?e:"relative"}),e.container.changed&&e.container.value.html(""),a=["width","height"],r=0,n=a.length;r<n;r++)i=a[r],e[i].value||(t=function(r){var n,a;return void 0===r.tagName||["BODY","HTML"].indexOf(r.tagName)>=0?(a=window["inner"+i.charAt(0).toUpperCase()+i.slice(1)],n=document!==r&&d3.select(r),n&&("width"===i?(a-=parseFloat(n.style("margin-left"),10),a-=parseFloat(n.style("margin-right"),10),a-=parseFloat(n.style("padding-left"),10),a-=parseFloat(n.style("padding-right"),10)):(a-=parseFloat(n.style("margin-top"),10),a-=parseFloat(n.style("margin-bottom"),10),a-=parseFloat(n.style("padding-top"),10),a-=parseFloat(n.style("padding-bottom"),10))),e[i].value=a<=20?e[i].small:a):"number"==typeof(a=parseFloat(d3.select(r).style(i),10))&&a>0?e[i].value=a:"BODY"!==r.tagName?t(r.parentNode):void 0},t(e.container.value.node()),1===d3.selectAll("body > *:not(script)").size()&&d3.select("body").style("overflow","hidden"));e.container.value.style("width",e.width.value+"px").style("height",e.height.value+"px")}},{}],210:[function(e,t,r){var n=e("../../core/data/format.js"),a=e("../../core/data/color.js"),i=e("../../core/data/keys.coffee"),o=e("../../core/data/load.coffee"),s=e("./ui/drawer.js"),l=e("./ui/legend.js"),u=e("./ui/timeline.coffee"),c=e("./errorCheck.js"),d=e("../../core/fetch/data.js"),f=e("./finish.js"),p=e("./focus/tooltip.coffee"),h=e("./ui/history.coffee"),v=e("../../core/parse/edges.js"),g=e("../../core/parse/nodes.js"),m=e("../../core/console/print.coffee"),y=e("../../tooltip/remove.coffee"),x=e("./types/run.coffee"),b=e("./shapes/draw.js"),w=e("../../string/format.js"),_=e("./svg/enter.js"),k=e("./svg/update.js"),z=e("./ui/titles.js"),A=e("../../object/validate.coffee");t.exports=function(e){var t=[],r=e.type.value,j=e.format.locale.value,M=j.message.ui,O=j.message.draw;if(["data","attrs","coords","nodes","edges"].forEach(function(r){e.error.value||e[r].loaded||!e[r].url||t.push({function:function(e,t){o(e,r,t)},message:j.message.loading,wait:!0})}),e.draw.update){var E=j.visualization[r]||r,F=e.types[r].setup||!1,S=e.types[r].requirements||[],T=w(j.message.initializing,E),C=j.message.data;S instanceof Array||(S=[S]),E=E.toLowerCase(),e.error.value||"function"!=typeof F||t.push({function:function(e){if(e.dev.value){var t="running "+E+" setup";m.time(t)}F(e),e.dev.value&&m.timeEnd(t)},message:T}),e.container.changed&&t.push({function:_,message:T}),r in e.g.apps||t.push({function:function(e){if(e.dev.value){var t="creating "+E+" group";m.time(t)}e.g.apps[r]=e.g.app.append("g").attr("id",r).attr("opacity",0),e.dev.value&&m.timeEnd(t)},message:T}),e.data.changed&&t.push({function:function(e){e.data.cache={},delete e.nodes.restricted,delete e.edges.restricted,i(e,"data")},message:C}),e.attrs.changed&&t.push({function:function(e){i(e,"attrs")},message:C}),t.push({function:function(e){if(!e.color.type||e.color.changed||e.data.changed||e.attrs.changed||e.id.changed||e.depth.changed||e.id.solo.changed||!e.time.fixed.value&&(e.time.solo.changed||e.time.mute.changed)){if(e.color.valueScale=!1,e.dev.value){var t="checking color type";m.time(t)}if(e.color.type=!1,e.color.value){var r=e.color.value;A(r)&&(r=r[e.id.value]?r[e.id.value]:r[d3.keys(r)[0]]),e.data.keys&&r in e.data.keys?e.color.type=e.data.keys[r]:e.attrs.keys&&r in e.attrs.keys&&(e.color.type=e.attrs.keys[r])}else e.data.keys&&(e.color.type=e.data.keys[e.id.value]);e.dev.value&&m.timeEnd(t)}},message:C}),(S.indexOf("edges")>=0&&e.edges.value&&(!e.edges.linked||e.edges.changed)||S.indexOf("nodes")>=0&&!e.nodes.value&&e.edges.value)&&t.push({function:v,message:C}),S.indexOf("nodes")>=0&&e.edges.value&&(!e.nodes.positions||e.nodes.changed||e.type.changed)&&t.push({function:g,message:C}),(e.data.changed||e.time.changed||e.time.format.changed||e.type.changed||e.id.changed||e.x.scale.changed&&[e.x.scale.value,e.x.scale.previous].indexOf("discrete")>=0||e.y.scale.changed&&[e.y.scale.value,e.y.scale.previous].indexOf("discrete")>=0)&&t.push({function:n,message:C}),e.error.value||t.push({function:function(e){var t=e.time.fixed.value?["all"]:null;if(e.dev.value){var r=t?"fetching pool data":"fetching data";m.time(r)}e.data.pool=d(e,t),e.dev.value&&m.timeEnd(r),t?(e.dev.value&&m.time("fetching data for current year"),e.data.viz=d(e),e.dev.value&&m.timeEnd("fetching data for current year")):e.data.viz=e.data.pool,e.draw.timing=e.data.viz.length<e.data.large?e.timing.transitions:0},message:C}),e.error.value||t.push({check:function(e){return e.color.value&&"number"===e.color.type&&!1===e.color.valueScale},function:a,message:C})}return t.push({function:function(e){if(e.dev.value){var t=e.format.locale.value.message.tooltipReset;m.time(t)}e.type.previous&&r!==e.type.previous&&y(e.type.previous),y(r),e.dev.value&&m.timeEnd(t)},message:M}),e.error.value||t.push({function:c,message:M}),t.push({function:function(e){if(e.margin.process(),z(e),!e.error.value)if(e.draw.update)s(e),u(e),l(e);else{e.dev.value&&m.time("calculating margins");var t=e.container.value.select("div#d3plus_drawer").node().offsetHeight||e.container.value.select("div#d3plus_drawer").node().getBoundingClientRect().height,r=e.g.timeline.node().getBBox();r=e.timeline.value?r.height+e.ui.padding:0;var n=e.g.legend.node().getBBox();n=e.legend.value?n.height+e.ui.padding:0,e.margin.bottom+=t+r+n,e.dev.value&&m.timeEnd("calculating margins")}h(e),e.height.viz-=e.margin.top+e.margin.bottom,e.width.viz-=e.margin.left+e.margin.right},message:M}),e.error.value||t.push({function:p,message:M}),t.push({function:k,message:O}),!e.error.value&&e.draw.update&&t.push({function:[x,b],message:O}),t.push({function:f,message:O}),t}},{"../../core/console/print.coffee":48,"../../core/data/color.js":50,"../../core/data/format.js":52,"../../core/data/keys.coffee":54,"../../core/data/load.coffee":55,"../../core/fetch/data.js":60,"../../core/parse/edges.js":93,"../../core/parse/nodes.js":96,"../../object/validate.coffee":170,"../../string/format.js":171,"../../tooltip/remove.coffee":201,"./errorCheck.js":211,"./finish.js":212,"./focus/tooltip.coffee":213,"./shapes/draw.js":223,"./svg/enter.js":236,"./svg/update.js":237,"./types/run.coffee":240,"./ui/drawer.js":241,"./ui/history.coffee":242,"./ui/legend.js":243,"./ui/timeline.coffee":245,"./ui/titles.js":246}],211:[function(e,t,r){var n=e("../../core/fetch/text.js"),a=e("../../core/console/print.coffee"),i=e("../../core/methods/rejected.coffee"),o=e("../../string/format.js"),s=e("../../string/list.coffee");t.exports=function(e){e.dev.value&&a.time("checking for errors");var t=["id"],r=e.types[e.type.value].requirements;r&&(r instanceof Array?t=t.concat(e.types[e.type.value].requirements):t.push(r));var l=[];if(t.forEach(function(t){if("string"==typeof t)e[t].value&&e[t].value.length||l.push('"'+t+'"');else if("function"==typeof t){var r=t(e);!r.status&&r.text&&l.push('"'+r.text+'"')}}),l.length>1){var u=e.format.locale.value.error.methods,c=e.format.locale.value.visualization[e.type.value]||e.type.value,d=e.format.locale.value.ui.and;l=s(l,d),e.error.internal=o(u,c,l)}else if(1===l.length){var u=e.format.locale.value.error.method,c=e.format.locale.value.visualization[e.type.value]||e.type.value;e.error.internal=o(u,c,l[0])}if(!e.error.internal&&t.indexOf("edges")>=0&&t.indexOf("focus")>=0){if(0==e.edges.connections(e.focus.value[0],e.id.value).length){var f=n(e,e.focus.value[0],e.depth.value),u=e.format.locale.value.error.connections;e.error.internal=o(u,'"'+f+'"')}}var t=["d3"];e.types[e.type.value].libs&&(t=t.concat(e.types[e.type.value].libs));var l=[];if(t.forEach(function(e){window[e]||l.push('"'+e+'"')}),l.length>1){var u=e.format.locale.value.error.libs,c=e.format.locale.value.visualization[e.type.value],d=e.format.locale.value.ui.and;l=s(l,d),e.error.internal=o(u,c,l)}else if(1===l.length){var u=e.format.locale.value.error.lib,c=e.format.locale.value.visualization[e.type.value];e.error.internal=o(u,c,l[0])}var p=e.shape.accepted(e);p instanceof Array||(p=[p]);var h=e.shape.value;if(h&&!i(e,p,h,"shape")||e.self.shape(p[0]),"modes"in e.types[e.type.value]){var v=e.types[e.type.value].modes;v instanceof Array||(v=[v]);var g=e.type.mode.value;g&&!i(e,v,g,"mode")||e.self.type({mode:v[0]})}e.dev.value&&a.timeEnd("checking for errors")}},{"../../core/console/print.coffee":48,"../../core/fetch/text.js":62,"../../core/methods/rejected.coffee":89,"../../string/format.js":171,"../../string/list.coffee":172}],212:[function(e,t,r){var n=e("./shapes/edges.js"),a=e("./shapes/paths.js"),i=e("./ui/message.js"),o=e("./focus/viz.js"),s=e("../../core/methods/reset.coffee"),l=e("../../core/console/print.coffee"),u=e("./shapes/labels.js"),c=e("../../string/title.coffee"),d=e("./zoom/bounds.coffee"),f=e("./zoom/labels.coffee"),p=e("./zoom/mouse.coffee");t.exports=function(e){if(e.draw.first?setTimeout(function(){o(e)},e.draw.timing):o(e),!e.error.value){var t=e.zoom.viewport||e.zoom.bounds;e.types[e.type.value].zoom&&e.zoom.value&&t?(e.dev.value&&l.time("calculating zoom"),e.draw.first||e.zoom.reset?d(e,t,0):(e.type.changed||e.focus.changed||e.height.changed||e.width.changed||e.nodes.changed||e.legend.changed||e.timeline.changed||e.ui.changed)&&d(e,t),e.dev.value&&l.timeEnd("calculating zoom")):(e.zoom.bounds=[[0,0],[e.width.viz,e.height.viz]],e.zoom.scale=1,d(e))}var r=e.zoom.size?e.zoom.size.width:e.width.viz,h=e.zoom.size?e.zoom.size.height:e.height.viz,v=e.zoom.bounds?e.zoom.bounds[0][0]:0,g=e.zoom.bounds?e.zoom.bounds[0][1]:0;if(e.g.overlay.attr("width",r).attr("height",h).attr("x",v).attr("y",g),e.error.value||(e.draw.update?(e.edges.path?a(e):n(e),u(e,"data"),e.edges.label&&!e.edges.path&&setTimeout(function(){u(e,"edges")},e.draw.timing+200)):(e.labels.value||e.labels.changed)&&e.types[e.type.value].zoom&&e.zoom.value&&e.draw.timing&&setTimeout(function(){f(e)},e.draw.timing)),!e.error.value){var m=e.types[e.type.value].requirements||[];m instanceof Array||(m=[m]);var y=m.indexOf("data")>=0;e.error.internal||e.data.viz&&e.returned.nodes.length||!y||(e.error.internal=e.format.locale.value.error.data)}var x=e.type.previous;if(x&&e.type.value!=x&&e.g.apps[x]&&(e.dev.value&&l.time('hiding "'+x+'"'),e.draw.timing?e.g.apps[x].transition().duration(e.draw.timing).attr("opacity",0):e.g.apps[x].attr("opacity",0),e.dev.value&&l.timeEnd()),!e.error.value){var b=y&&0===e.data.viz.length||e.error.internal||e.error.value?0:e.focus.value.length&&e.types[e.type.value].zoom&&e.zoom.value?1-e.tooltip.curtain.opacity:1,w=e.draw.timing;e.group.transition().duration(w).attr("opacity",b),e.g.data.transition().duration(w).attr("opacity",b),e.g.edges.transition().duration(w).attr("opacity",b)}e.error.value?i(e,e.error.value):e.error.internal?(e.error.internal=c(e.error.internal),l.warning(e.error.internal),i(e,e.error.internal),e.error.internal=null):i(e),setTimeout(function(){s(e),e.types[e.type.value].zoom&&e.zoom.value?(e.g.zoom.datum(e).call(e.zoom.behavior.on("zoom",p)),e.zoom.scroll.value||e.g.zoom.on("mousewheel.zoom",null).on("MozMousePixelScroll.zoom",null).on("wheel.zoom",null),e.zoom.click.value||e.g.zoom.on("dblclick.zoom",null),e.zoom.pan.value||e.g.zoom.on("mousedown.zoom",null).on("mousemove.zoom",null)):e.g.zoom.call(e.zoom.behavior.on("zoom",null)).on("dblclick.zoom",null).on("mousedown.zoom",null).on("mousemove.zoom",null).on("mousewheel.zoom",null).on("MozMousePixelScroll.zoom",null).on("touchstart.zoom",null).on("wheel.zoom",null)},e.draw.timing)}},{"../../core/console/print.coffee":48,"../../core/methods/reset.coffee":91,"../../string/title.coffee":174,"./focus/viz.js":214,"./shapes/edges.js":224,"./shapes/labels.js":226,"./shapes/paths.js":228,"./ui/message.js":244,"./zoom/bounds.coffee":247,"./zoom/labels.coffee":249,"./zoom/mouse.coffee":250}],213:[function(e,t,r){var n,a,i,o;n=e("../tooltip/create.js"),a=e("../../../core/fetch/value.coffee"),i=e("../../../core/console/print.coffee"),o=e("../../../tooltip/remove.coffee"),t.exports=function(e){var t,r,s;r=e.focus,!e.error.internal&&1===r.value.length&&r.value.length&&!e.small&&r.tooltip.value?(e.dev.value&&i.time("drawing focus tooltip"),t=e.data.pool.filter(function(t){return a(e,t,e.id.value)===r.value[0]}),t.length>=1?t=t[0]:(t={},t[e.id.value]=r.value[0]),s=e.labels.padding,n({anchor:"top left",arrow:!1,data:t,fullscreen:!1,id:"visualization_focus",length:"long",maxheight:e.height.viz-2*s,mouseevents:!0,offset:0,vars:e,width:e.tooltip.large,x:e.width.value-e.margin.right-s,y:e.margin.top+s}),e.width.viz-=e.tooltip.large+2*s,e.dev.value&&i.timeEnd("drawing focus tooltip")):o("visualization_focus")}},{"../../../core/console/print.coffee":48,"../../../core/fetch/value.coffee":63,"../../../tooltip/remove.coffee":201,"../tooltip/create.js":238}],214:[function(t,r,n){var a=t("../../../client/pointer.coffee"),i=t("../../../client/ie.js"),o=t("../../../core/fetch/value.coffee"),s=t("../../../core/console/print.coffee"),l=t("../../../util/uniques.coffee");r.exports=function(t){if(t.g.edge_focus.selectAll("g").remove(),t.g.data_focus.selectAll("g").remove(),t.focus.value.length&&t.types[t.type.value].zoom&&t.zoom.value){t.dev.value&&s.time("drawing focus elements");var r=t.g.edges.selectAll("g");if(r.size()>0){r.each(function(e){var r=e[t.edges.source][t.id.value],n=e[t.edges.target][t.id.value];if(r==t.focus.value[0]||n==t.focus.value[0]){var a=t.g.edge_focus.node().appendChild(this.cloneNode(!0));d3.select(a).datum(e).attr("opacity",1).selectAll("line, path").datum(e)}});var n=t.edges.arrows.value;t.g.edge_focus.selectAll("line, path").attr("vector-effect","non-scaling-stroke").style("stroke",t.color.focus).style("stroke-width",function(){return i&&t.types[t.type.value].zoom?0:t.edges.size.value?d3.select(this).style("stroke-width"):2*t.data.stroke.width}).attr("marker-start",function(e){var r=t.edges.arrows.direction.value;if("bucket"in e.d3plus)var a="_"+e.d3plus.bucket;else var a="";return"source"==r&&n?"url(#d3plus_edge_marker_focus"+a+")":"none"}).attr("marker-end",function(e){var r=t.edges.arrows.direction.value;if("bucket"in e.d3plus)var a="_"+e.d3plus.bucket;else var a="";return"target"==r&&n?"url(#d3plus_edge_marker_focus"+a+")":"none"}),t.g.edge_focus.selectAll("text").style("fill",t.color.focus)}var u=l(t.edges.connections(t.focus.value[0],t.id.value,!0),t.id.value,o,t);u.push(t.focus.value[0]);var c=[],d=[],f=[0],p=[0];t.g.data.selectAll("g").each(function(r){if(u.indexOf(r[t.id.value])>=0){var n=t.g.data_focus.node().appendChild(this.cloneNode(!0)),n=d3.select(n).datum(r).attr("opacity",1);"coordinates"==t.shape.value?t.zoom.viewport=t.path.bounds(t.zoom.coords[r.d3plus.id]):"d3plus"in r&&("x"in r.d3plus&&c.push(r.d3plus.x),"y"in r.d3plus&&d.push(r.d3plus.y),"r"in r.d3plus?(f.push(r.d3plus.r),p.push(r.d3plus.r)):("width"in r.d3plus&&f.push(r.d3plus.width/2),"height"in r.d3plus&&p.push(r.d3plus.height/2)));for(e in a){var i=d3.select(this).on(a[e]);i&&n.on(a[e],i)}}});if(c.length&&d.length){var h=d3.extent(c),v=d3.extent(d),g=d3.max(f),m=d3.max(p);t.zoom.viewport=[[h[0]-g,v[0]-m],[h[1]+g,v[1]+m]]}t.g.data_focus.selectAll("path").style("stroke-width",i&&t.types[t.type.value].zoom?0:2*t.data.stroke.width),t.dev.value&&s.timeEnd("drawing focus elements")}else t.zoom.viewport=!1}},{"../../../client/ie.js":33,"../../../client/pointer.coffee":34,"../../../core/console/print.coffee":48,"../../../core/fetch/value.coffee":63,"../../../util/uniques.coffee":208}],215:[function(e,t,r){var n,a,i,o;o=e("./style.coffee"),a=e("../../../geom/largestRect.coffee"),i=e("../../../geom/path2poly.coffee"),n={start:{},end:{}},t.exports=function(e,t,r,s){var l,u,c,d;l=d3.svg.arc().innerRadius(0).outerRadius(function(e){return e.d3plus.r}).startAngle(function(e){return e.d3plus.startAngle}).endAngle(function(e){return e.d3plus.endAngle}),c=function(t){var r,n;return e.labels.value&&(t.d3plus.label?t.d3plus_label=t.d3plus.label:t.d3plus.endAngle-t.d3plus.startAngle>=.1?(r=i(l(t)),n=a(r,{angle:0}),n[0]?t.d3plus_label={w:n[0].width,h:n[0].height,x:n[0].cx,y:n[0].cy}:delete t.d3plus_label):delete t.d3plus_label),[t]},e.draw.timing?(d=d3.svg.arc().innerRadius(0).outerRadius(function(e){return e.d3plus.r}).startAngle(function(e){return void 0===n.start[e.d3plus.id]&&(n.start[e.d3plus.id]=0),isNaN(n.start[e.d3plus.id])&&(n.start[e.d3plus.id]=e.d3plus.startAngle),n.start[e.d3plus.id]}).endAngle(function(e){return void 0===n.end[e.d3plus.id]&&(n.end[e.d3plus.id]=0),isNaN(n.end[e.d3plus.id])&&(n.end[e.d3plus.id]=e.d3plus.endAngle),n.end[e.d3plus.id]}),u=function(e,t){return e.attrTween("d",function(e){var r,a,i,o;return void 0===t?(o=e.d3plus.startAngle,r=e.d3plus.endAngle):0===t&&(o=0,r=0),i=d3.interpolate(n.start[e.d3plus.id],o),a=d3.interpolate(n.end[e.d3plus.id],r),function(t){return n.start[e.d3plus.id]=i(t),n.end[e.d3plus.id]=a(t),d(e)}})},r.append("path").attr("class","d3plus_data").call(o,e).attr("d",d),t.selectAll("path.d3plus_data").data(c).transition().duration(e.draw.timing).call(o,e).call(u),s.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(u,0)):(r.append("path").attr("class","d3plus_data"),t.selectAll("path.d3plus_data").data(c).call(o,e).attr("d",l))}},{"../../../geom/largestRect.coffee":158,"../../../geom/path2poly.coffee":160,"./style.coffee":232}],216:[function(e,t,r){var n=e("../../../core/fetch/text.js"),a=e("../../../font/sizes.coffee"),i=e("../../../geom/largestRect.coffee"),o=e("./style.coffee");t.exports=function(e,t,r,s){var l=d3.svg.area().x(function(e){return e.d3plus.x}).y0(function(e){return e.d3plus.y0}).y1(function(e){return e.d3plus.y}).interpolate(e.shape.interpolate.value),u=d3.svg.area().x(function(e){return e.d3plus.x}).y0(function(e){return e.d3plus.y0}).y1(function(e){return e.d3plus.y0}).interpolate(e.shape.interpolate.value);r.append("path").attr("class","d3plus_data").attr("d",function(e){return u(e.values)}).call(o,e);var c={"font-weight":e.labels.font.weight,"font-family":e.labels.font.family.value};t.selectAll("path.d3plus_data").data(function(t){if(e.labels.value&&t.values.length>1){var r=d3.max(t.values,function(e){return e.d3plus.y0-e.d3plus.y}),o=!1;if(r>e.labels.font.size){var s=[],l=[],u=n(e,t);t.values.forEach(function(e){s.push([e.d3plus.x,e.d3plus.y]),l.push([e.d3plus.x,e.d3plus.y0])}),s=s.concat(l.reverse());var d=null;if(u.length){var f=a(u[0],c);d=f[0].width/f[0].height}o=i(s,{angle:d3.range(-70,71,1),aspectRatio:d,tolerance:0})}if(o&&o[0]){var p={w:~~o[0].width,h:~~o[0].height,x:~~o[0].cx,y:~~o[0].cy,angle:-1*o[0].angle,padding:2,names:u};0!==o[0].angle?p.translate={x:p.x,y:p.y}:p.translate=!1,p.w>=10&&p.h>=10&&(t.d3plus_label=p)}}return[t]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).attr("d",function(e){return l(e.values)}).call(o,e):t.selectAll("path.d3plus_data").attr("d",function(e){return l(e.values)}).call(o,e)}},{"../../../core/fetch/text.js":62,"../../../font/sizes.coffee":100,"../../../geom/largestRect.coffee":158,"./style.coffee":232}],217:[function(e,t,r){var n=(e("../../../core/fetch/text.js"),e("../../../geom/largestRect.coffee"),e("./style.coffee"));t.exports=function(e,t,r,a){function i(e){e.attr("transform","scale(1)")}function o(e){e.attr("transform",function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return"scale("+Math.floor(t/16)+")"})}r.append("path").attr("class","d3plus_data").attr("d","M5-6.844L3.594-5.407L-2,0.188l-1.594-1.594L-5-2.844L-7.844,0l1.438,1.406l3,3L-2,5.843l1.406-1.438l7-7L7.844-4L5-6.844z").call(i).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"../../../core/fetch/text.js":62,"../../../geom/largestRect.coffee":158,"./style.coffee":232}],218:[function(e,t,r){var n,a,i;e("../../../core/fetch/value.coffee"),n=e("../../../core/fetch/color.coffee"),a=e("../../../color/lighter.coffee"),i=e("./segments.coffee"),t.exports=function(e,t,r){var o,s,l,u;return s=e.d3plus.shape||t.shape.value,"line"===t.shape.value&&"circle"!==s?"none":"area"===t.shape.value||"active"===s||"line"===t.shape.value?n(t,e):"temp"===s?r?n(t,e):"url(#d3plus_hatch_"+e.d3plus.id+")":e.d3plus.static?a(n(t,e),.75):(o=i(t,e,"active"),l=i(t,e,"temp"),u=i(t,e,"total"),!t.active.value&&!t.temp.value||!0===o||o&&u&&o>=u&&!l||o&&!u?n(t,e):t.active.spotlight.value?t.color.missing:a(n(t,e),.75))}},{"../../../color/lighter.coffee":41,"../../../core/fetch/color.coffee":59,"../../../core/fetch/value.coffee":63,"./segments.coffee":231}],219:[function(e,t,r){var n,a,i,o,s,l,u,c;n=e("../../../util/copy.coffee"),a=e("../../../network/distance.coffee"),i=e("../../../core/fetch/text.js"),o=e("../../../font/sizes.coffee"),l=e("../../../geom/largestRect.coffee"),u=e("../../../geom/path2poly.coffee"),c=e("./style.coffee"),s={},t.exports=function(e,t,r,d){var f,p;return f=d3.geo[e.coords.projection.value](),f.center&&f.center(e.coords.center),e.zoom.scale||(e.zoom.scale=1),e.zoom.area=1/e.zoom.scale/e.zoom.scale,e.path=d3.geo.path().projection(f),e.draw.timing?t.selectAll("path.d3plus_data").attr("d",e.path).transition().duration(e.draw.timing).call(c,e):t.selectAll("path.d3plus_data").attr("d",e.path).call(c,e),r.append("path").attr("id",function(e){return e.id}).attr("class","d3plus_data").attr("d",e.path).call(c,e),p=e.old_height!==e.height.viz||e.height.changed||e.old_width!==e.width.viz||e.width.changed,e.old_height=e.height.viz,e.old_width=e.width.viz,e.coords.changed||p||e.coords.mute.changed||e.coords.solo.changed||e.type.changed||e.text.changed||e.coords.projection.changed||e.labels.changed?(e.zoom.bounds=null,e.zoom.reset=!0,e.zoom.coords={},t.each(function(t){var r,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E;if(e.coords.simplify.value&&t.geometry.coordinates.length>1){for(m=[],c=[],r=0,b=n(t),j=n(t),t.geometry.coordinates=t.geometry.coordinates.filter(function(t,n){var a;return j.geometry.coordinates=[t],(a=e.path.area(j))>0&&(c.push(a),a>r&&(b.geometry.coordinates=[t],r=a),!0)}),p=e.path.centroid(b),M=t.geometry.coordinates,y=x=0,w=M.length;x<w;y=++x)f=M[y],j.geometry.coordinates=[f],m.push(a(e.path.centroid(j),p));g=m.reduce(function(e,t,r){return t&&e.push(c[r]/t),e},[]),v=d3.quantile(g,e.coords.threshold.value),j.geometry.coordinates=t.geometry.coordinates.filter(function(e,t){var r,n;return n=m[t],r=c[t],0===n||r/n>=v}),h=b.geometry.coordinates[0],h&&"MultiPolygon"===b.geometry.type&&(h=h[0],b.geometry.coordinates[0]=h,b.geometry.type="Polygon")}else j=t,b=t,h=t.geometry.coordinates[0];return e.zoom.coords[t.d3plus.id]=j,delete t.d3plus_label,e.labels.value&&(_=i(e,t),h&&_.length&&(k=u(e.path(b)),E={"font-weight":e.labels.font.weight,"font-family":e.labels.font.family.value},z=null,1===_[0].split(" ").length&&(O=o(_[0],E)[0],z=O.width/O.height),(A=l(k,{angle:0,aspectRatio:z}))&&(A=A[0],t.d3plus_label={anchor:"middle",valign:"center",h:A.height,w:A.width,x:A.cx,y:A.cy,names:_}))),s[t.id]=t.d3plus_label,d=e.path.bounds(j),e.zoom.bounds?(e.zoom.bounds[0][0]>d[0][0]&&(e.zoom.bounds[0][0]=d[0][0]),e.zoom.bounds[0][1]>d[0][1]&&(e.zoom.bounds[0][1]=d[0][1]),e.zoom.bounds[1][0]<d[1][0]&&(e.zoom.bounds[1][0]=d[1][0]),e.zoom.bounds[1][1]<d[1][1]?e.zoom.bounds[1][1]=d[1][1]:void 0):e.zoom.bounds=d})):e.focus.value.length?void 0:(e.zoom.viewport=!1,t.each(function(e){return e.d3plus_label=s[e.id]}))}},{"../../../core/fetch/text.js":62,"../../../font/sizes.coffee":100,"../../../geom/largestRect.coffee":158,"../../../geom/path2poly.coffee":160,"../../../network/distance.coffee":163,"../../../util/copy.coffee":205,"./style.coffee":232}],220:[function(e,t,r){var n=e("./style.coffee");t.exports=function(e,t,r,a){function i(e){e.attr("d",d3.svg.symbol().type("cross").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("cross").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(i).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":232}],221:[function(e,t,r){var n=e("./style.coffee");t.exports=function(e,t,r,a){function i(e){e.attr("d",d3.svg.symbol().type("diamond").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("diamond").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(i).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":232}],222:[function(e,t,r){var n=e("./style.coffee");t.exports=function(e,t,r,a){function i(t,r,n,a){if(!r)var r=0;if("number"!=typeof n)var n=void 0;if("number"!=typeof a)var a=void 0;t.attrTween("d",function(t){if(void 0==n)var i=t.d3plus.r?t.d3plus.r:d3.max([t.d3plus.width,t.d3plus.height]);else var i=n;if(void 0==a)var o=t.d3plus.segments[t.d3plus.shape];else var o=a;e.arcs[t.d3plus.shape][t.d3plus.id]||(e.arcs[t.d3plus.shape][t.d3plus.id]={r:0},e.arcs[t.d3plus.shape][t.d3plus.id].a=2*Math.PI);var l=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].r,i+r),u=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].a,o);return function(r){return e.arcs[t.d3plus.shape][t.d3plus.id].r=l(r),e.arcs[t.d3plus.shape][t.d3plus.id].a=u(r),s(t)}})}function o(e){return e.d3plus.label?e.d3plus_label=e.d3plus.label:delete e.d3plus_label,[e]}e.arcs||(e.arcs={donut:{},active:{},temp:{}});var s=d3.svg.arc().startAngle(0).endAngle(function(t){var r=e.arcs[t.d3plus.shape][t.d3plus.id].a;return r>2*Math.PI?2*Math.PI:r}).innerRadius(function(t){return t.d3plus.static?0:e.arcs[t.d3plus.shape][t.d3plus.id].r*e.data.donut.size}).outerRadius(function(t){return e.arcs[t.d3plus.shape][t.d3plus.id].r});e.draw.timing?(a.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(i,0,0).each("end",function(t){delete e.arcs[t.d3plus.shape][t.d3plus.id]}),t.selectAll("path.d3plus_data").data(o).transition().duration(e.draw.timing).call(i).call(n,e),r.append("path").attr("class","d3plus_data").transition().duration(0).call(i,0,0).call(n,e).transition().duration(e.draw.timing).call(i).call(n,e)):(a.selectAll("path.d3plus_data").each(function(t){delete e.arcs[t.d3plus.shape][t.d3plus.id]}),r.append("path").attr("class","d3plus_data"),t.selectAll("path.d3plus_data").data(o).call(i).call(n,e))}},{"./style.coffee":232}],223:[function(e,t,r){var n=e("../../../util/child.coffee"),a=e("../../../util/closest.coffee"),i=e("../tooltip/create.js"),o=e("../../../client/pointer.coffee"),s=e("../../../core/fetch/value.coffee"),l=e("../../../core/fetch/color.coffee"),u=e("../../../core/fetch/text.js"),c=e("../../../color/legible.coffee"),d=e("../../../core/console/print.coffee"),f=e("../../../tooltip/remove.coffee"),p=e("./segments.coffee"),h=e("./fill.js"),v=e("../../../string/strip.js"),g=e("../../../client/touch.coffee"),m=e("../zoom/propagation.coffee"),y=e("../../../util/uniques.coffee"),x=e("../../../object/validate.coffee"),b=e("../zoom/direction.coffee"),w={arc:e("./arc.coffee"),area:e("./area.js"),check:e("./check.js"),coordinates:e("./coordinates.coffee"),cross:e("./cross.js"),diamond:e("./diamond.js"),donut:e("./donut.js"),line:e("./line.js"),radial:e("./radial.coffee"),rect:e("./rect.coffee"),triangle_down:e("./triangle_down.js"),triangle_up:e("./triangle_up.js"),whisker:e("./whisker.coffee")};t.exports=function(e){function t(t){if(!t.d3plus.id){t.d3plus.id="";for(var r=0;r<=e.depth.value;r++)t.d3plus.id+=s(e,t,e.id.nesting[r])+"_";t.d3plus.id+=F,["x","y","x2","y2"].forEach(function(r){if("discrete"==e[r].scale.value){var n=s(e,t,e[r].value);n.constructor===Date&&(n=n.getTime()),t.d3plus.id+="_"+n}}),t.d3plus.suffix&&(t.d3plus.id+="_"+t.d3plus.suffix),t.d3plus.id=v(t.d3plus.id)}return t}function r(t,r){var n=e.types[e.type.value].scale,a=1;n&&(x[n]&&e.shape.value in n?a=n[e.shape.value]:"function"==typeof n?a=n(e,e.shape.value):"number"==typeof n&&(a=n)),a=r?a:1,t.attr("transform",function(e){if(["line","area","coordinates"].indexOf(F)<0){return"translate("+(e.d3plus.x||0)+","+(e.d3plus.y||0)+")scale("+a+")"}return"scale("+a+")"})}function _(t){t.attr("id",function(e){return"d3plus_group_"+e.d3plus.id}).attr("class",function(t){var r=e.class.value?" "+s(e,t,e.class.value):"";return"d3plus_"+F+r})}function k(t){if(t&&e.g.edges.selectAll("g").size()>0){e.g.edge_hover.selectAll("*").remove(),e.g.edges.selectAll("g").each(function(r){
var n=t[e.id.value],a=r[e.edges.source][e.id.value],i=r[e.edges.target][e.id.value];if(a==n||a=="left_"+n||a=="right_"+n||i==n||i=="left_"+n||i=="right_"+n){var o=e.g.edge_hover.node().appendChild(this.cloneNode(!0));d3.select(o).datum(r).attr("opacity",1).selectAll("line, path").datum(r)}});var r=e.edges.arrows.value;e.g.edge_hover.attr("opacity",0).selectAll("line, path").style("stroke",e.color.primary).style("stroke-width",function(t){return e.edges.path&&t.dy?Math.max(1,t.dy):e.edges.size.value?d3.select(this).style("stroke-width"):2*e.data.stroke.width}).attr("marker-start",function(t){var n=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"source"==n&&r?"url(#d3plus_edge_marker_highlight"+a+")":"none"}).attr("marker-end",function(t){var n=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"target"==n&&r?"url(#d3plus_edge_marker_highlight"+a+")":"none"}),e.g.edge_hover.selectAll("text").style("fill",e.color.primary),e.draw.timing?(e.g.edge_hover.transition().duration(e.timing.mouseevents).attr("opacity",1),e.g.edges.transition().duration(e.timing.mouseevents).attr("opacity",.5)):e.g.edge_hover.attr("opacity",1)}else e.draw.timing?(e.g.edge_hover.transition().duration(e.timing.mouseevents).attr("opacity",0).transition().selectAll("*").remove(),e.g.edges.transition().duration(e.timing.mouseevents).attr("opacity",1)):e.g.edge_hover.selectAll("*").remove()}var z=e.returned.nodes||[],A=e.returned.edges||[];e.draw.timing=z.length<e.data.large&&A.length<e.edges.large?e.timing.transitions:0;var j={arc:"arc",area:"area",check:"check",circle:"rect",coordinates:"coordinates",cross:"cross",donut:"donut",diamond:"diamond",line:"line",plus:"cross",radial:"radial",rect:"rect",square:"rect",triangle_down:"triangle_down",triangle:"triangle_up",triangle_up:"triangle_up",whisker:"whisker"},M={};z.forEach(function(t){var r=t.d3plus&&t.d3plus.shape?t.d3plus.shape:e.shape.value;r in j&&(t.d3plus&&(t.d3plus.shape=r),r=j[r],M[r]||(M[r]=[]),M[r].push(t))});for(var O in j)if(!(j[O]in M)||0===d3.keys(M).length){var E=e.g.data.selectAll("g.d3plus_"+j[O]);e.draw.timing?E.transition().duration(e.draw.timing).attr("opacity",0).remove():E.remove()}for(var F in M){var S=e.g.data.selectAll("g.d3plus_"+F).data(M[F],function(r){if(r.d3plus||(r.d3plus={}),"coordinates"===F)return r.d3plus.id=r.id,r.id;if(!r.d3plus.id)if(r.values)r.values.forEach(function(e){e=t(e),e.d3plus.shape="circle"}),r.d3plus.id=r.key;else if(r=t(r),!r.d3plus.segments){r.d3plus.segments={donut:2*Math.PI};var n=p(e,r,"active"),a=p(e,r,"temp"),i=p(e,r,"total");i&&(r.d3plus.segments.active=n?n/i*(2*Math.PI):0,r.d3plus.segments.temp=a?a/i*(2*Math.PI)+r.d3plus.segments.active:0)}return!!r.d3plus&&r.d3plus.id});if(e.draw.timing)var T=S.exit().transition().duration(e.draw.timing).attr("opacity",0).remove();else var T=S.exit().remove();e.draw.timing?S.transition().duration(e.draw.timing).call(r).call(_):S.call(r).call(_);var C=e.draw.timing?0:1,B=S.enter().append("g").attr("opacity",C).call(r).call(_);e.draw.timing&&B.transition().duration(e.draw.timing).attr("opacity",1),S.order(),e.dev.value&&d.time('drawing "'+F+'" shapes'),w[F](e,S,B,T,r),e.dev.value&&d.timeEnd('drawing "'+F+'" shapes'),["rect","donut"].indexOf(F)>=0&&e.types[e.type.value].fill&&(e.dev.value&&d.time('filling "'+F+'" shapes'),h(e,S,B,T,r),e.dev.value&&d.timeEnd('filling "'+F+'" shapes'))}if(k(),e.tooltip.value)e.g.data.selectAll("g").on(o.over,function(t){if(g&&m(e,d3.event),d3.event.buttons||!e.mouse.value||!e.mouse.over.value||e.draw.frozen||t.d3plus&&t.d3plus.static)f(e.type.value);else{var n="function"!=typeof e.mouse.over.value;if("function"==typeof e.mouse.over.value&&(n=e.mouse.over.value(t,e.self)),n){var s=b(t.d3plus_data||t,e),l="function"==typeof e.mouse.viz||"function"==typeof e.mouse.viz[o.click]||e.zoom.value&&(e.types[e.type.value].zoom||t.d3plus.threshold&&t.d3plus.merged||1===s||-1===s&&e.history.states.length&&!e.tooltip.value.long);if(d3.select(this).style("cursor",l?"pointer":"auto").transition().duration(e.timing.mouseevents).call(r,!0),d3.select(this).selectAll(".d3plus_data").transition().duration(e.timing.mouseevents).attr("opacity",1),e.covered=!1,t.values&&e.axes.discrete){var u="x"===e.axes.discrete?0:1,c=d3.mouse(e.container.value.node())[u],d=y(t.values,function(t){return t.d3plus[e.axes.discrete]}),p=a(d,c);t.d3plus_data=t.values[d.indexOf(p)],t.d3plus=t.values[d.indexOf(p)].d3plus}var h=t.d3plus_data?t.d3plus_data:t;i({vars:e,data:h}),"function"==typeof e.mouse.viz?e.mouse.viz(t.d3plus_data||t,e):e.mouse.viz[o.over]&&e.mouse.viz[o.over](t.d3plus_data||t,e),k(t)}}}).on(o.move,function(t){if(g&&m(e,d3.event),d3.event.buttons||!e.mouse.value||!e.mouse.move.value||e.draw.frozen||t.d3plus&&t.d3plus.static)f(e.type.value);else{var r="function"!=typeof e.mouse.move.value;if("function"==typeof e.mouse.move.value&&(r=e.mouse.move.value(t,e.self)),r){var n=b(t.d3plus_data||t,e),s="function"==typeof e.mouse.viz||"function"==typeof e.mouse.viz[o.click]||e.zoom.value&&(e.types[e.type.value].zoom||t.d3plus.threshold&&t.d3plus.merged||1===n||-1===n&&e.history.states.length&&!e.tooltip.value.long);d3.select(this).style("cursor",s?"pointer":"auto");e.types[e.type.value].tooltip;if(t.values&&e.axes.discrete){var l="x"===e.axes.discrete?0:1,u=d3.mouse(e.container.value.node())[l],c=y(t.values,function(t){return t.d3plus[e.axes.discrete]}),d=a(c,u);t.d3plus_data=t.values[c.indexOf(d)],t.d3plus=t.values[c.indexOf(d)].d3plus}var p=t.d3plus_data?t.d3plus_data:t;i({vars:e,data:p}),"function"==typeof e.mouse.viz?e.mouse.viz(t.d3plus_data||t,e):e.mouse.viz[o.move]&&e.mouse.viz[o.move](t.d3plus_data||t,e)}}}).on(o.out,function(t){if(g&&m(e,d3.event),!d3.event.buttons&&e.mouse.value&&e.mouse.out.value){var a="function"!=typeof e.mouse.out.value;if("function"==typeof e.mouse.out.value&&(a=e.mouse.out.value(t,e.self)),a){n(this,d3.event.toElement)||e.draw.frozen||t.d3plus&&t.d3plus.static||(d3.select(this).transition().duration(e.timing.mouseevents).call(r),d3.select(this).selectAll(".d3plus_data").transition().duration(e.timing.mouseevents).attr("opacity",e.data.opacity),e.covered||f(e.type.value),"function"==typeof e.mouse.viz?e.mouse.viz(t.d3plus_data||t,e):e.mouse.viz[o.out]&&e.mouse.viz[o.out](t.d3plus_data||t,e),k())}}else f(e.type.value)});else{var q=function(){m(e,d3.event)};e.g.data.selectAll("g").on(o.over,q).on(o.move,q).on(o.out,q)}d3.select(window).on("scroll.d3plus",function(){f(e.type.value)}),e.g.data.selectAll("g").on(o.click,function(t){if((!e.mouse.viz||!1!==e.mouse.viz.click)&&e.mouse.value&&e.mouse.click.value&&!d3.event.defaultPrevented&&!e.draw.frozen&&(!t.d3plus||!t.d3plus.static)){var n="function"!=typeof e.mouse.click.value;if("function"==typeof e.mouse.click.value&&(n=e.mouse.click.value(t,e.self)),n){if(t.values&&e.axes.discrete){var d="x"===e.axes.discrete?0:1,p=d3.mouse(e.container.value.node())[d],h=y(t.values,function(t){return t.d3plus[e.axes.discrete]}),v=a(h,p);t.d3plus_data=t.values[h.indexOf(v)],t.d3plus=t.values[h.indexOf(v)].d3plus}"function"==typeof e.mouse.viz?e.mouse.viz(t.d3plus_data||t,e):e.mouse.viz[o.out]?e.mouse.viz[o.out](t.d3plus_data||t,e):e.mouse.viz[o.click]&&e.mouse.viz[o.click](t.d3plus_data||t,e);var g=b(t.d3plus_data||t,e),m=e.id.solo.value,x=u(e,t)[0],w=c(l(e,t)),_=e.title.sub.value||!1,z=e.title.sub.font.color,A=e.title.total.font.color;if(t.d3plus.threshold&&t.d3plus.merged&&e.zoom.value)e.history.states.push(function(){e.self.id({solo:m}).title({sub:{font:{color:z},value:_},total:{font:{color:A}}}).draw()}),e.self.id({solo:m.concat(y(t.d3plus.merged,e.id.value,s,e))}).title({sub:{font:{color:w},value:x},total:{font:{color:w}}}).draw();else if(1===g&&e.zoom.value){var j=s(e,t.d3plus_data||t,e.id.value);e.history.states.push(function(){e.self.depth(e.depth.value-1).id({solo:m}).title({sub:{font:{color:z},value:_},total:{font:{color:A}}}).draw()}),e.self.depth(e.depth.value+1).id({solo:m.concat(j)}).title({sub:{font:{color:w},value:x},total:{font:{color:w}}}).draw()}else if(-1===g&&e.zoom.value&&e.history.states.length&&!e.tooltip.value.long)e.history.back();else if(e.types[e.type.value].zoom&&e.zoom.value)k(),d3.select(this).transition().duration(e.timing.mouseevents).call(r),d3.select(this).selectAll(".d3plus_data").transition().duration(e.timing.mouseevents).attr("opacity",e.data.opacity),f(e.type.value),e.draw.update=!1,t&&t[e.id.value]!=e.focus.value[0]?e.self.focus(t[e.id.value]).draw():e.self.focus(!1).draw();else if(e.types[e.type.value].requirements.indexOf("focus")<0){k();var M=t.d3plus_data?t.d3plus_data:t;i({vars:e,data:M})}}}})}},{"../../../client/pointer.coffee":34,"../../../client/touch.coffee":39,"../../../color/legible.coffee":40,"../../../core/console/print.coffee":48,"../../../core/fetch/color.coffee":59,"../../../core/fetch/text.js":62,"../../../core/fetch/value.coffee":63,"../../../object/validate.coffee":170,"../../../string/strip.js":173,"../../../tooltip/remove.coffee":201,"../../../util/child.coffee":203,"../../../util/closest.coffee":204,"../../../util/uniques.coffee":208,"../tooltip/create.js":238,"../zoom/direction.coffee":248,"../zoom/propagation.coffee":251,"./arc.coffee":215,"./area.js":216,"./check.js":217,"./coordinates.coffee":219,"./cross.js":220,"./diamond.js":221,"./donut.js":222,"./fill.js":225,"./line.js":227,"./radial.coffee":229,"./rect.coffee":230,"./segments.coffee":231,"./triangle_down.js":233,"./triangle_up.js":234,"./whisker.coffee":235}],224:[function(e,t,r){var n=e("../../../util/buckets.coffee"),a=e("../../../geom/offset.coffee");t.exports=function(e){function t(t){t.attr("opacity",0).style("stroke-width",0).style("stroke",e.background.value).style("fill","none")}function r(t){var r=e.edges.arrows.value;t.attr("opacity",function(t){return"number"===h?p:"function"===h?p(t,e):e.edges.opacity.scale.value(t[p])}).style("stroke-width",function(t){return e.edges.scale(t[e.edges.size.value])}).style("stroke",e.edges.color).attr("marker-start",function(t){var n=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"source"==n&&r?"url(#d3plus_edge_marker_default"+a+")":"none"}).attr("marker-end",function(t){var n=e.edges.arrows.direction.value;if("bucket"in t.d3plus)var a="_"+t.d3plus.bucket;else var a="";return"target"==n&&r?"url(#d3plus_edge_marker_default"+a+")":"none"}).attr("vector-effect","non-scaling-stroke").attr("pointer-events","none")}function i(t){t.attr("x1",function(t){return t[e.edges.source].d3plus.edges[t[e.edges.target][e.id.value]].x}).attr("y1",function(t){return t[e.edges.source].d3plus.edges[t[e.edges.target][e.id.value]].y}).attr("x2",function(t){return t[e.edges.target].d3plus.edges[t[e.edges.source][e.id.value]].x}).attr("y2",function(t){return t[e.edges.target].d3plus.edges[t[e.edges.source][e.id.value]].y})}function o(e){e.attr("d",function(e){return v(e.d3plus.spline)})}function s(t){if(delete t.d3plus_label,e.g.edges.selectAll("line, path").size()<e.edges.large&&e.edges.label&&t[e.edges.label]){if("spline"in t.d3plus)var r=this.getTotalLength(),n=this.getPointAtLength(r/2),a=this.getPointAtLength(r/2-.1*r),i=this.getPointAtLength(r/2+.1*r),o=Math.atan2(i.y-a.y,i.x-a.x),s=o*(180/Math.PI),l=(this.parentNode.getBBox(),.8*r),u=n.x,c=n.y;else var d=(this.getBBox(),t[e.edges.source]),f=t[e.edges.target],p={x:d.d3plus.edges[f[e.id.value]].x,y:d.d3plus.edges[f[e.id.value]].y},h={x:f.d3plus.edges[d[e.id.value]].x,y:f.d3plus.edges[d[e.id.value]].y},v=h.x-p.x,g=h.y-p.y,n={x:h.x-v/2,y:h.y-g/2},o=Math.atan2(g,v),s=o*(180/Math.PI),r=Math.sqrt(v*v+g*g),l=r,u=n.x,c=n.y;l+=2*e.labels.padding;var m=0;e.edges.arrows.value&&(m="number"==typeof e.edges.arrows.value?e.edges.arrows.value:8,m/=e.zoom.behavior.scaleExtent()[1],l-=2*m),(s<-90||s>90)&&(s-=180),l*e.zoom.behavior.scaleExtent()[0]>20&&(t.d3plus_label={x:u,y:c,translate:{x:u,y:c},w:l,h:15+2*e.labels.padding,angle:s,anchor:"middle",valign:"center",color:e.edges.color,resize:!1,names:[e.format.value(t[e.edges.label])],background:1})}}var l=e.returned.edges||[],u=e.zoom.behavior.scaleExtent()[0];if("string"==typeof e.edges.size.value){var c=d3.extent(l,function(t){return t[e.edges.size.value]}),d=d3.min(e.returned.nodes||[],function(e){return e.d3plus.r})*(2*e.edges.size.scale);e.edges.scale=d3.scale.sqrt().domain(c).range([e.edges.size.min,d*u])}else{var f="number"==typeof e.edges.size.value?e.edges.size.value:e.edges.size.min;e.edges.scale=function(){return f}}var p=e.edges.opacity.value,h=typeof p;e.edges.opacity.changed&&"string"===h&&e.edges.opacity.scale.value.domain(d3.extent(l,function(e){return e[p]})).range([e.edges.opacity.min.value,1]);var v=d3.svg.line().interpolate(e.edges.interpolate.value),g=e.edges.arrows.value?"string"==typeof e.edges.size.value?["default_0","default_1","default_2","highlight_0","highlight_1","highlight_2","focus_0","focus_1","focus_2"]:["default","highlight","focus"]:[];if("string"==typeof e.edges.size.value)for(var m=n(e.edges.scale.range(),4),y=[],x=0;x<3;x++)y.push(m[x+1]+(m[1]-m[0])*(x+2)*2);else var b="number"==typeof e.edges.arrows.value?e.edges.arrows.value:8,y="number"==typeof e.edges.size.value?e.edges.size.value/b:b;var w=e.defs.selectAll(".d3plus_edge_marker").data(g,String),_=function(t){t.attr("d",function(t){var r=t.split("_");if(2==r.length&&e.edges.scale){r=parseInt(r[1]);var n=y[r]}else var n=y;return"target"==e.edges.arrows.direction.value?"M 0,-"+n/2+" L "+.85*n+",0 L 0,"+n/2+" L 0,-"+n/2:"M 0,-"+n/2+" L -"+.85*n+",0 L 0,"+n/2+" L 0,-"+n/2}).attr("fill",function(t){var r=t.split("_")[0];return"default"==r?e.edges.color:"focus"==r?e.color.focus:e.color.primary}).attr("transform","scale("+1/u+")")};e.draw.timing?(w.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),w.select("path").transition().duration(e.draw.timing).attr("opacity",1).call(_)):(w.exit().remove(),w.select("path").attr("opacity",1).call(_));var k=e.draw.timing?0:1,z=w.enter().append("marker").attr("id",function(e){return"d3plus_edge_marker_"+e}).attr("class","d3plus_edge_marker").attr("orient","auto").attr("markerUnits","userSpaceOnUse").style("overflow","visible").append("path").attr("opacity",k).attr("vector-effect","non-scaling-stroke").call(_);e.draw.timing&&z.transition().duration(e.draw.timing).attr("opacity",1);var A="string"==typeof e.edges.size.value?n(e.edges.scale.domain(),4):null,j=e.edges.arrows.direction.value,M=l.filter(function(t){if(t.d3plus||(t.d3plus={}),t.d3plus.id="edge_"+t[e.edges.source][e.id.value]+"_"+t[e.edges.target][e.id.value],!0!==t.d3plus.spline){if(A){var r=t[e.edges.size.value];t.d3plus.bucket=r<A[1]?0:r<A[2]?1:2;var n=.85*y[t.d3plus.bucket]/u}else{delete t.d3plus.bucket;var n=.85*y/u}var i=t[e.edges.source],o=t[e.edges.target];if(!i.d3plus||!o.d3plus)return!1;var s=Math.atan2(i.d3plus.y-o.d3plus.y,i.d3plus.x-o.d3plus.x),l=Math.atan2(o.d3plus.y-i.d3plus.y,o.d3plus.x-i.d3plus.x),c="source"==j&&e.edges.arrows.value?i.d3plus.r+n:i.d3plus.r,d="target"==j&&e.edges.arrows.value?o.d3plus.r+n:o.d3plus.r,f=a(s,c,e.shape.value),p=a(l,d,e.shape.value);return"edges"in i.d3plus||(i.d3plus.edges={}),i.d3plus.edges[o[e.id.value]]={x:i.d3plus.x-f.x,y:i.d3plus.y-f.y},"edges"in o.d3plus||(o.d3plus.edges={}),o.d3plus.edges[i[e.id.value]]={x:o.d3plus.x-p.x,y:o.d3plus.y-p.y},!0}return!1}),O=e.g.edges.selectAll("g.d3plus_edge_line").data(M,function(e){return e.d3plus.id}),E=l.filter(function(t){if(t.d3plus.spline){if(A){var r=t[e.edges.size.value];t.d3plus.bucket=r<A[1]?0:r<A[2]?1:2;var n=.85*y[t.d3plus.bucket]/u}else{delete t.d3plus.bucket;var n=.85*y/u}var i=t[e.edges.source],o=t[e.edges.target],s=i.d3plus.edges?i.d3plus.edges[o[e.id.value]]||{}:{},l=o.d3plus.edges?o.d3plus.edges[i[e.id.value]]||{}:{},c=e.edges.arrows.value&&"source"==j?n:0,d=e.edges.arrows.value&&"target"==j?n:0,f=i.d3plus.x>o.d3plus.x?.9:1.1,p=i.d3plus.x>o.d3plus.x?1.1:.9,h="number"==typeof s.angle?s.angle:Math.atan2(i.d3plus.y-o.d3plus.y,i.d3plus.x-o.d3plus.x)*f,v=a(h,i.d3plus.r+c,e.shape.value),g="number"==typeof l.angle?l.angle:Math.atan2(o.d3plus.y-i.d3plus.y,o.d3plus.x-i.d3plus.x)*p,m=a(g,o.d3plus.r+d,e.shape.value),x=[i.d3plus.x-v.x,i.d3plus.y-v.y],b=!!s.offset&&a(h,s.offset),w=b?[x[0]-b.x,x[1]-b.y]:x,_=[o.d3plus.x-m.x,o.d3plus.y-m.y],k=!!l.offset&&a(g,l.offset),z=k?[_[0]-k.x,_[1]-k.y]:_,M=z[0]-w[0],O=z[1]-w[1],E="number"==typeof s.radius?s.radius:Math.sqrt(M*M+O*O)/4,F="number"==typeof l.radius?l.radius:Math.sqrt(M*M+O*O)/4,S=a(h,E-i.d3plus.r-2*c),T=a(g,F-o.d3plus.r-2*d);t.d3plus.spline=[x,_];var C=Math.abs(Math.atan2(i.d3plus.y-o.d3plus.y,i.d3plus.x-o.d3plus.x)).toFixed(5),B=Math.abs(h).toFixed(5),q=Math.abs(g-Math.PI).toFixed(5);return(B!==q||[B,q].indexOf(C)<0)&&(t.d3plus.spline.splice(1,0,[w[0]-S.x,w[1]-S.y],[z[0]-T.x,z[1]-T.y]),b&&t.d3plus.spline.splice(1,0,w),k&&t.d3plus.spline.splice(t.d3plus.spline.length-1,0,z)),!0}return!1}),F=e.g.edges.selectAll("g.d3plus_edge_path").data(E,function(e){return e.d3plus.id});e.draw.timing?(O.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),F.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),O.selectAll("text.d3plus_label, rect.d3plus_label_bg").transition().duration(e.draw.timing/2).attr("opacity",0).remove(),F.selectAll("text.d3plus_label, rect.d3plus_label_bg").transition().duration(e.draw.timing/2).attr("opacity",0).remove(),O.selectAll("line").data(function(e){return[e]}).transition().duration(e.draw.timing).call(i).call(r).each("end",s),F.selectAll("path").data(function(e){return[e]}).transition().duration(e.draw.timing).call(o).call(r).each("end",s),O.enter().append("g").attr("class","d3plus_edge_line").append("line").call(i).call(t).transition().duration(e.draw.timing).call(r).each("end",s),F.enter().append("g").attr("class","d3plus_edge_path").append("path").call(o).call(t).transition().duration(e.draw.timing).call(r).each("end",s)):(O.exit().remove(),F.exit().remove(),O.selectAll("text.d3plus_label, rect.d3plus_label_bg").remove(),F.selectAll("text.d3plus_label, rect.d3plus_label_bg").remove(),O.selectAll("line").data(function(e){return[e]}).call(i).call(r).call(s),F.selectAll("path").data(function(e){return[e]}).call(o).call(r).call(s),O.enter().append("g").attr("class","d3plus_edge_line").append("line").call(i).call(t).call(r).call(s),F.enter().append("g").attr("class","d3plus_edge_path").append("path").call(o).call(t).call(r).call(s))}},{"../../../geom/offset.coffee":159,"../../../util/buckets.coffee":202}],225:[function(e,t,r){var n=e("../../../util/copy.coffee"),a=e("../../../core/fetch/color.coffee"),i=(e("../../../core/fetch/value.coffee"),e("./segments.coffee")),o=e("./style.coffee");t.exports=function(e,t,r,s){function l(e){e.attr("x",0).attr("y",0).attr("width",0).attr("height",0)}function u(t,r){r||(r=0),t.attr("x",function(e){return-(e.d3plus.r?2*e.d3plus.r:e.d3plus.width)/2-r/2}).attr("y",function(e){return-(e.d3plus.r?2*e.d3plus.r:e.d3plus.height)/2-r/2}).attr("width",function(e){return(e.d3plus.r?2*e.d3plus.r:e.d3plus.width)+r}).attr("height",function(e){return(e.d3plus.r?2*e.d3plus.r:e.d3plus.height)+r}).attr("rx",function(t){var n=t.d3plus.r?2*t.d3plus.r:t.d3plus.width;return["circle","donut"].indexOf(e.shape.value)>=0?(n+r)/2:0}).attr("ry",function(t){var n=t.d3plus.r?2*t.d3plus.r:t.d3plus.height;return["circle","donut"].indexOf(e.shape.value)>=0?(n+r)/2:0}).attr("shape-rendering",function(t){return["square"].indexOf(e.shape.value)>=0?e.shape.rendering.value:"auto"})}function c(t,r,n,a){r||(r=0),"number"!=typeof n&&(n=void 0),"number"!=typeof a&&(a=void 0),t.attrTween("d",function(t){if(void 0===n)var i=t.d3plus.r?t.d3plus.r:d3.max([t.d3plus.width,t.d3plus.height]);else var i=n;if(void 0===a)var o=t.d3plus.segments[t.d3plus.shape];else var o=a;e.arcs[t.d3plus.shape][t.d3plus.id]||(e.arcs[t.d3plus.shape][t.d3plus.id]={r:0},e.arcs[t.d3plus.shape][t.d3plus.id].a="donut"===t.d3plus.shape?2*Math.PI:0);var s=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].r,i+r),l=d3.interpolate(e.arcs[t.d3plus.shape][t.d3plus.id].a,o);return function(r){return e.arcs[t.d3plus.shape][t.d3plus.id].r=s(r),e.arcs[t.d3plus.shape][t.d3plus.id].a=l(r),d(t)}})}e.arcs||(e.arcs={donut:{},active:{},temp:{}});var d=d3.svg.arc().startAngle(0).endAngle(function(t){var r=e.arcs[t.d3plus.shape][t.d3plus.id].a;return r>2*Math.PI?2*Math.PI:r}).innerRadius(function(t){return t.d3plus.static||"donut"!==e.shape.value?0:e.arcs[t.d3plus.shape][t.d3plus.id].r*e.data.donut.size}).outerRadius(function(t){var r=e.arcs[t.d3plus.shape][t.d3plus.id].r;return"donut"===e.shape.value?r:2*r});t.each(function(t){function r(t){t.attr("stroke",h).attr("stroke-width",1).attr("shape-rendering",e.shape.rendering.value)}var s=i(e,t,"active"),d=i(e,t,"temp"),f=i(e,t,"total"),p=d3.select(this),h=a(e,t),v=[],g=[];if(f&&e.types[e.type.value].fill){if(d){var m=n(t);m.d3plus.shape="temp",v.push(m),g=["temp"]}if(s&&(s<f||d)){var m=n(t);m.d3plus.shape="active",v.push(m)}}var y=e.defs.selectAll("pattern#d3plus_hatch_"+t.d3plus.id).data(g);e.draw.timing?(y.selectAll("rect").transition().duration(e.draw.timing).style("fill",h),y.selectAll("line").transition().duration(e.draw.timing).style("stroke",h)):(y.selectAll("rect").style("fill",h),y.selectAll("line").style("stroke",h));var x=y.enter().append("pattern").attr("id","d3plus_hatch_"+t.d3plus.id).attr("patternUnits","userSpaceOnUse").attr("x","0").attr("y","0").attr("width","10").attr("height","10").append("g");x.append("rect").attr("x","0").attr("y","0").attr("width","10").attr("height","10").attr("fill",h).attr("fill-opacity",.25),x.append("line").attr("x1","0").attr("x2","10").attr("y1","0").attr("y2","10").call(r),x.append("line").attr("x1","-1").attr("x2","1").attr("y1","9").attr("y2","11").call(r),x.append("line").attr("x1","9").attr("x2","11").attr("y1","-1").attr("y2","1").call(r);var b=v.length?[t]:[],w=p.selectAll("#d3plus_clip_"+t.d3plus.id).data(b);w.enter().insert("clipPath",".d3plus_mouse").attr("id","d3plus_clip_"+t.d3plus.id).append("rect").attr("class","d3plus_clipping").call(l),e.draw.timing?(w.selectAll("rect").transition().duration(e.draw.timing).call(u),w.exit().transition().delay(e.draw.timing).remove()):(w.selectAll("rect").call(u),w.exit().remove());var _=p.selectAll("path.d3plus_fill").data(v);_.transition().duration(e.draw.timing).call(o,e).call(c),_.enter().insert("path","rect.d3plus_mouse").attr("class","d3plus_fill").attr("clip-path","url(#d3plus_clip_"+t.d3plus.id+")").transition().duration(0).call(o,e).call(c,0,void 0,0).transition().duration(e.draw.timing).call(c).call(o,e),_.exit().transition().duration(e.draw.timing).call(c,0,void 0,0).remove()})}},{"../../../core/fetch/color.coffee":59,"../../../core/fetch/value.coffee":63,"../../../util/copy.coffee":205,"./segments.coffee":231,"./style.coffee":232}],226:[function(e,t,r){var n=(e("../../../util/copy.coffee"),e("../../../core/fetch/text.js")),a=e("../../../core/fetch/value.coffee"),i=e("../../../color/mix.coffee"),o=e("../../../core/console/print.coffee"),s=(e("../../../client/rtl.coffee"),e("./segments.coffee")),l=e("./color.coffee"),u=e("../../../string/list.coffee"),c=e("../../../color/text.coffee"),d=e("../../../textwrap/textwrap.coffee");t.exports=function(e,t){var r=e.types[e.type.value].zoom?e.zoom.behavior.scaleExtent():[1,1],f=e.g[t].selectAll("g"),p=function(t){t.attr("opacity",function(t){var n=parseFloat(d3.select(this).attr("font-size"),10);return t.visible=n*(e.zoom.scale/r[1])>=2,t.visible?1:0})},h=function(t){e.draw.timing?t.transition().duration(e.draw.timing).attr("opacity",0).remove():t.remove()},v=function(t){var n="bottom"===e.labels.valign.value?"top":"bottom";t.attr("font-weight",e.labels.font.weight).attr("font-family",e.labels.font.family.value).attr("stroke","none").attr("pointer-events",function(e){return e.mouse?"auto":"none"}).attr("fill",function(t){if(t.color)return t.color;var r=l(t.parent,e),n=c(r),a=t.text?.15:1;return i(r,n,.2,a)}).each(function(t){if(t.resize instanceof Array){t.resize[0],t.resize[1]}var a=t.resize,i=!0;if(t.text){a instanceof Array||(a=[9,50],i=t.resize);var o=t.y-t.h*r[1]/2+t.padding/2;"bottom"===n&&(o+=t.h*r[1]/2),d().align("center").container(d3.select(this)).height(t.h*r[1]/2).padding(t.padding/2).resize(i).size(a).text(e.format.value(100*t.text,{key:"share",vars:e})).width(t.w*r[1]).valign(n).x(t.x-t.w*r[1]/2+t.padding/2).y(o).draw()}else{t.resize instanceof Array||(a=[7,r[1]/r[0]*40],i=t.resize);var s="bottom"===e.labels.valign.value?t.share:0;d().align(t.anchor||e.labels.align.value).container(d3.select(this)).height(t.h*r[1]-t.share).padding(t.padding/2).resize(i).size(a).shape(t.shape||"square").text(t.names).valign(e.labels.valign.value).width(t.w*r[1]).x(t.x-t.w*r[1]/2+t.padding/2).y(t.y-t.h*r[1]/2+t.padding/2+s).draw()}}).attr("transform",function(e){var t=d3.select(this).attr("transform")||"",n=e.angle||0,a=e.translate&&e.translate.x?e.translate.x:0,i=e.translate&&e.translate.y?e.translate.y:0;return t.length&&(t=t.split(")").slice(-3).join(")")),"rotate("+n+","+a+","+i+")scale("+1/r[1]+")translate("+(e.x*r[1]-e.x)+","+(e.y*r[1]-e.y)+")"+t})};if("edges"===t||e.labels.value){if(e.dev.value){var g="drawing "+t+" labels";o.time(g)}f.each(function(t){function i(t){var r="string"==typeof l.background?l.background:"none"===e.background.value?"#ffffff":e.background.value,n="string"==typeof l.background?l.background:r,a=_.attr("transform").split(")");a.pop(),a.pop(),a.push(""),a=a.join(")"),t.attr("fill",n).attr(E).attr("transform",a)}var o=t.d3plus&&"label"in t.d3plus&&!t.d3plus.label,l=t.d3plus_label||null,c=t.d3plus_share,d=t.d3plus.text?t.d3plus.text:l&&l.names?l.names:e.labels.text.value?a(e,t,e.labels.text.value):n(e,t),f=l&&"group"in l?l.group:d3.select(this),g=0,m=e.types[e.type.value].fill;if(d instanceof Array||(d=[d]),l)if(["line","area"].indexOf(e.shape.value)>=0)var y=!0;else if(t&&"d3plus"in t)var x=s(e,t,"active"),b=s(e,t,"temp"),w=s(e,t,"total"),y=!b&&!x||x>=w||!x&&b>=w;if(o||!(l&&l.force||y)&&m)delete t.d3plus_label,d3.select(this).selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(h),e.g.labels.selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(h);else{if(c&&t.d3plus.share&&c.w-2*e.labels.padding>=10&&c.h-2*e.labels.padding>=10&&"middle"!=e.labels.valign.value){c.resize=!1!==e.labels.resize.value&&(!(c&&"resize"in c)||c.resize),c.padding=e.labels.padding,c.text=t.d3plus.share,c.parent=t;var _=f.selectAll("text#d3plus_share_"+t.d3plus.id).data([c],function(e){return e.w+""+e.h+e.text});e.draw.timing&&1===e.zoom.scale?(_.transition().duration(e.draw.timing/2).call(v),_.enter().append("text").attr("id","d3plus_share_"+t.d3plus.id).attr("class","d3plus_share").attr("opacity",0).call(v).transition().duration(e.draw.timing/2).delay(e.draw.timing/2).attr("opacity",1)):(_.attr("opacity",1).call(v),_.enter().append("text").attr("id","d3plus_share_"+t.d3plus.id).attr("class","d3plus_share").attr("opacity",1).call(v)),g=_.node().getBBox().height+e.labels.padding,_.exit().call(h)}else f.selectAll("text.d3plus_share").call(h);if(l&&(l.resize=!1!==e.labels.resize.value&&(!(l&&"resize"in l)||l.resize),l.padding="number"==typeof l.padding?l.padding:e.labels.padding),l&&l.w*r[1]-l.padding>=20&&l.h*r[1]-l.padding>=10&&d.length){for(var k=e.format.locale.value.ui.and,z=e.format.locale.value.ui.more,A=0;A<d.length;A++)d[A]instanceof Array&&(d[A]=u(d[A],k,3,z));l.names=d,l.share=g,l.parent=t;var _=f.selectAll("text#d3plus_label_"+t.d3plus.id).data([l],function(e){return!!e&&e.w+"_"+e.h+"_"+e.x+"_"+e.y+"_"+e.names.join("_")}),j=l.resize?void 0:e.labels.font.size*r[0]+"px";if(e.draw.timing&&1===e.zoom.scale?(_.transition().duration(e.draw.timing/2).call(v).call(p),_.enter().append("text").attr("font-size",j).attr("id","d3plus_label_"+t.d3plus.id).attr("class","d3plus_label").attr("opacity",0).call(v).transition().duration(e.draw.timing/2).delay(e.draw.timing/2).call(p)):(_.attr("opacity",1).call(v).call(p),_.enter().append("text").attr("font-size",j).attr("id","d3plus_label_"+t.d3plus.id).attr("class","d3plus_label").call(v).call(p)),_.exit().call(h),0===_.size()||0===_.selectAll("tspan").size())delete t.d3plus_label,d3.select(this).selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(h),e.g.labels.selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(h);else{if(l.background){var M=["background"],O=_.node().getBBox(),E={height:O.height,width:O.width,x:O.x,y:O.y>0?O.y:-O.height/2};E.width+=e.labels.padding*r[0],E.height+=e.labels.padding*r[0],E.x-=e.labels.padding*r[0]/2,E.y-=e.labels.padding*r[0]/2;var F=_.attr("transform").match(/translate\(([^a-z]+)\)/gi)[0];F=F.replace(/([^a-z])\s([^a-z])/gi,"$1,$2"),F=F.split(","),F.length>1&&(F=F[F.length-1],F=F.substring(0,F.length-1),E.y+=parseFloat(F))}else var M=[],E={};var S=f.selectAll("rect#d3plus_label_bg_"+t.d3plus.id).data(M),T="number"==typeof l.background?l.background:"string"==typeof l.background?1:.6;e.draw.timing?(S.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),S.transition().duration(e.draw.timing).attr("opacity",T).call(i),S.enter().insert("rect",".d3plus_label").attr("id","d3plus_label_bg_"+t.d3plus.id).attr("class","d3plus_label_bg").attr("opacity",0).call(i).transition().duration(e.draw.timing).attr("opacity",T)):(S.exit().remove(),S.enter().insert("rect",".d3plus_label").attr("id","d3plus_label_bg_"+t.d3plus.id).attr("class","d3plus_label_bg"),S.attr("opacity",T).call(i))}}else delete t.d3plus_label,d3.select(this).selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(h),e.g.labels.selectAll("text#d3plus_label_"+t.d3plus.id+", rect#d3plus_label_bg_"+t.d3plus.id).call(h)}}),e.dev.value&&o.timeEnd(g)}else{if(e.dev.value){var g="removing "+t+" labels";o.time(g)}f.selectAll("text.d3plus_label, rect.d3plus_label_bg").call(h),e.g.labels.selectAll("text.d3plus_label, rect.d3plus_label_bg").call(h),e.dev.value&&o.timeEnd(g)}}},{"../../../client/rtl.coffee":36,"../../../color/mix.coffee":42,"../../../color/text.coffee":46,"../../../core/console/print.coffee":48,"../../../core/fetch/text.js":62,"../../../core/fetch/value.coffee":63,"../../../string/list.coffee":172,"../../../textwrap/textwrap.coffee":198,"../../../util/copy.coffee":205,"./color.coffee":218,"./segments.coffee":231}],227:[function(e,t,r){function n(e){e.attr("x",function(e){return e.d3plus.x}).attr("y",function(e){return e.d3plus.y}).attr("width",0).attr("height",0)}function a(e,t){void 0===t&&(t=0),e.attr("x",function(e){var r=e.d3plus.r?2*e.d3plus.r:e.d3plus.width;return e.d3plus.x-(r/2+t/2)}).attr("y",function(e){var r=e.d3plus.r?2*e.d3plus.r:e.d3plus.height;return e.d3plus.y-(r/2+t/2)}).attr("width",function(e){return(e.d3plus.r?2*e.d3plus.r:e.d3plus.width)+t}).attr("height",function(e){return(e.d3plus.r?2*e.d3plus.r:e.d3plus.height)+t}).attr("rx",function(e){return((e.d3plus.r?2*e.d3plus.r:e.d3plus.width)+t)/2}).attr("ry",function(e){return((e.d3plus.r?2*e.d3plus.r:e.d3plus.height)+t)/2})}function i(e,t,r,n){var i=e.draw.timing?e.timing.mouseevents:0;void 0===n&&(n=0),i?(d3.select(t.parentNode).selectAll("path.d3plus_line").transition().duration(i).style("stroke-width",function(t){var a=r;if(a.constructor!==Number){var i=c(e,t,r);a=i&&i.length?d3.max(i):e.data.stroke.width}return a+n}),d3.select(t.parentNode).selectAll("rect").transition().duration(i).style("stroke-width",function(t){var n=r;if(n.constructor!==Number){var a=c(e,t,r);n=a&&a.length?d3.max(a):e.data.stroke.width}return n}).call(a,n)):(d3.select(t.parentNode).selectAll("path.d3plus_line").style("stroke-width",function(t){var a=r;if(a.constructor!==Number){var i=c(e,t,r);a=i&&i.length?d3.max(i):e.data.stroke.width}return a+n}),d3.select(t.parentNode).selectAll("rect").style("stroke-width",function(t){var n=r;if(n.constructor!==Number){var a=c(e,t,r);n=a&&a.length?d3.max(a):e.data.stroke.width}return n}).call(a,n))}
var o=e("../../../util/copy.coffee"),s=e("../../../util/closest.coffee"),l=e("../../../client/pointer.coffee"),u=e("./style.coffee"),c=e("../../../core/fetch/value.coffee");t.exports=function(e,t,r,d){var f=d3.svg.line().x(function(e){return e.d3plus.x}).y(function(e){return e.d3plus.y}).interpolate(e.shape.interpolate.value),p=e.size.value||e.data.stroke.width,h=e[e.axes.discrete],v=function(t){var r=p;if(r.constructor!==Number){var n=c(e,t,p);r=n&&n.length?d3.max(n):e.data.stroke.width}return r<15?15:r},g=h.ticks.values.map(function(e){return e.constructor===Date?e.getTime():e});t.each(function(t){var r=!1,d=[],m=[],y=o(t),x=d3.select(this);y.values=[],y.segment_key=y.key,t.values.forEach(function(n,a,i){var l=c(e,n,h.value);l.constructor===Date&&(l=l.getTime());var u=g.indexOf(s(g,l));!1===r||r===u-1?(y.values.push(n),y.segment_key+="_"+u):(y.values.length>1?d.push(y):m.push(y.values[0]),y=o(t),y.values=[n]),a===i.length-1&&(y.values.length>1?d.push(y):m.push(y.values[0])),r=u});var b=x.selectAll("path.d3plus_line").data(d,function(e){return e.d3plus||(e.d3plus={}),e.d3plus.shape="line",e.segment_key}),w=x.selectAll("rect.d3plus_anchor").data(m,function(e){return e.d3plus||(e.d3plus={}),e.d3plus.r=p,e.d3plus.id});e.draw.timing?(b.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),b.transition().duration(e.draw.timing).attr("d",function(e){return f(e.values)}).call(u,e),b.enter().append("path").attr("class","d3plus_line").style("stroke-linecap","round").attr("d",function(e){return f(e.values)}).call(u,e).attr("opacity",0).transition().duration(e.draw.timing).attr("opacity",1),w.enter().append("rect").attr("class","d3plus_anchor").attr("id",function(e){return e.d3plus.id}).call(n).call(u,e),w.transition().duration(e.draw.timing).call(a).call(u,e),w.exit().transition().duration(e.draw.timing).call(n).remove()):(b.exit().remove(),b.enter().append("path").attr("class","d3plus_line").style("stroke-linecap","round"),b.attr("d",function(e){return f(e.values)}).call(u,e),w.enter().append("rect").attr("class","d3plus_anchor").attr("id",function(e){return e.d3plus.id}),w.exit().remove(),w.call(a).call(u,e));var _=x.selectAll("path.d3plus_mouse").data(d,function(e){return e.segment_key});_.enter().append("path").attr("class","d3plus_mouse").attr("d",function(e){return f(e.values)}).style("stroke","black").style("stroke-width",v).style("fill","none").style("stroke-linecap","round").attr("opacity",0),_.on(l.over,function(t){!e.draw.frozen&&e.mouse.value&&e.mouse.over.value&&i(e,this,p,2)}).on(l.out,function(t){!e.draw.frozen&&e.mouse.value&&e.mouse.out.value&&i(e,this,p,0)}),e.draw.timing?_.transition().duration(e.draw.timing).attr("d",function(e){return f(e.values)}).style("stroke-width",v):_.attr("d",function(e){return f(e.values)}).style("stroke-width",v),_.exit().remove()})}},{"../../../client/pointer.coffee":34,"../../../core/fetch/value.coffee":63,"../../../util/closest.coffee":204,"../../../util/copy.coffee":205,"./style.coffee":232}],228:[function(e,t,r){t.exports=function(e){function t(t){t.attr("d",e.edges.path).style("stroke-width",function(e){return Math.max(1,e.dy)}).style("stroke","#ddd").style("fill","none").attr("transform",function(e){return"translate("+e.d3plus.x+","+e.d3plus.y+")"})}var r=e.returned.edges||[],n=e.g.edges.selectAll("g.d3plus_edge_path").data(r,function(t){return t.d3plus.id="path_"+t[e.edges.source][e.id.value]+"_"+t[e.edges.target][e.id.value],t.d3plus.id});e.draw.timing?(n.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),n.selectAll("text.d3plus_label, rect.d3plus_label_bg").transition().duration(e.draw.timing/2).attr("opacity",0).remove(),n.selectAll("path").data(function(e){return[e]}).transition().duration(e.draw.timing).call(t),n.enter().append("g").attr("class","d3plus_edge_path").append("path").style("stroke-width",0).transition().duration(e.draw.timing).call(t)):(n.exit().remove(),n.selectAll("text.d3plus_label, rect.d3plus_label_bg").remove(),n.selectAll("path").data(function(e){return[e]}).call(t),n.enter().append("g").attr("class","d3plus_edge_path").append("path").call(t))}},{}],229:[function(e,t,r){var n,a,i,o;o=e("./style.coffee"),i={},n={},a={r:{},a:{}},t.exports=function(e,t,r,s){var l,u,c,d,f;c=e.id.nesting[e.depth.value+1],d=d3.svg.line.radial().interpolate("linear-closed").radius(function(e){return e.d3plus.r}).angle(function(e){return e.d3plus.a}),l=function(t){return e.labels.value&&(t.d3plus.label?t.d3plus_label=t.d3plus.label:delete t.d3plus_label),[t]},e.draw.timing?(t.each(function(t){var r,n,a,i,o;for(i=t[c],o=[],n=0,a=i.length;n<a;n++)r=i[n],o.push(r.d3plus.id=r[e.id.value]+"_"+r[c]);return o}),u=d3.svg.line.radial().interpolate("linear-closed").radius(function(e,t){return void 0===i[e.d3plus.id]&&(i[e.d3plus.id]=0),isNaN(i[e.d3plus.id])&&(i[e.d3plus.id]=e.d3plus.r),i[e.d3plus.id]}).angle(function(e,t){return void 0===n[e.d3plus.id]&&(n[e.d3plus.id]=e.d3plus.a),isNaN(n[e.d3plus.id])&&(n[e.d3plus.id]=e.d3plus.a),n[e.d3plus.id]}),f=function(e,t){return e.attrTween("d",function(e){var r,o,s,l,d,f,p;for(p=e[c],s=l=0,d=p.length;l<d;s=++l)o=p[s],r=o.d3plus.a,void 0===t?f=o.d3plus.r:0===t&&(f=0),a.a[o.d3plus.id]=d3.interpolate(n[o.d3plus.id],r),a.r[o.d3plus.id]=d3.interpolate(i[o.d3plus.id],f);return function(t){var r,l,d;for(d=e[c],s=r=0,l=d.length;r<l;s=++r)o=d[s],n[o.d3plus.id]=a.a[o.d3plus.id](t),i[o.d3plus.id]=a.r[o.d3plus.id](t);return u(e[c])}})},r.append("path").attr("class","d3plus_data").call(o,e).attr("d",function(e){return u(e[c])}),t.selectAll("path.d3plus_data").data(l).transition().duration(e.draw.timing).call(o,e).call(f),s.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(f,0)):(r.append("path").attr("class","d3plus_data"),t.selectAll("path.d3plus_data").data(l).call(o,e).attr("d",function(e){return d(e[c])}))}},{"./style.coffee":232}],230:[function(e,t,r){var n;n=e("./style.coffee"),t.exports=function(e,t,r,a){var i,o,s;return i=function(t){var r,n;return e.labels.value&&!t.d3plus.label?(n=t.d3plus.r?2*t.d3plus.r:t.d3plus.width,r=t.d3plus.r?2*t.d3plus.r:t.d3plus.height,t.d3plus_label={w:n,h:r,x:0,y:0},t.d3plus_share={w:n,h:r,x:0,y:0},t.d3plus_label.shape="circle"===t.d3plus.shape?"circle":"square"):t.d3plus.label?t.d3plus_label=t.d3plus.label:delete t.d3plus_label,[t]},o=function(e){return e.attr("x",function(e){return e.d3plus.init&&"x"in e.d3plus.init?e.d3plus.init.x:e.d3plus.init&&"width"in e.d3plus.init?-e.d3plus.width/2:0}).attr("y",function(e){return e.d3plus.init&&"y"in e.d3plus.init?e.d3plus.init.y:e.d3plus.init&&"height"in e.d3plus.init?-e.d3plus.height/2:0}).attr("width",function(e){return e.d3plus.init&&"width"in e.d3plus.init?e.d3plus.init.width:0}).attr("height",function(e){return e.d3plus.init&&"height"in e.d3plus.init?e.d3plus.init.height:0})},s=function(t){return t.attr("x",function(e){return-(e.d3plus.r?2*e.d3plus.r:e.d3plus.width)/2}).attr("y",function(e){return-(e.d3plus.r?2*e.d3plus.r:e.d3plus.height)/2}).attr("width",function(e){return e.d3plus.r?2*e.d3plus.r:e.d3plus.width}).attr("height",function(e){return e.d3plus.r?2*e.d3plus.r:e.d3plus.height}).attr("rx",function(e){var t,r;return t="circle"===e.d3plus.shape,r=e.d3plus.r?2*e.d3plus.r:e.d3plus.width,t?(r+2)/2:0}).attr("ry",function(e){var t,r;return r="circle"===e.d3plus.shape,t=e.d3plus.r?2*e.d3plus.r:e.d3plus.height,r?(t+2)/2:0}).attr("transform",function(e){return"rotate"in e.d3plus?"rotate("+e.d3plus.rotate+")":""}).attr("shape-rendering",function(t){return"square"!==t.d3plus.shape||"rotate"in t.d3plus?"auto":e.shape.rendering.value})},e.draw.timing?(r.append("rect").attr("class","d3plus_data").call(o).call(n,e),t.selectAll("rect.d3plus_data").data(i).transition().duration(e.draw.timing).call(s).call(n,e),a.selectAll("rect.d3plus_data").transition().duration(e.draw.timing).call(o)):(r.append("rect").attr("class","d3plus_data"),t.selectAll("rect.d3plus_data").data(i).call(s).call(n,e))}},{"./style.coffee":232}],231:[function(e,t,r){var n;n=e("../../../core/fetch/value.coffee"),t.exports=function(e,t,r){var a;return a=e[r].value,a?r in t.d3plus?t.d3plus[r]:n(e,t,a):t.d3plus[r]}},{"../../../core/fetch/value.coffee":63}],232:[function(e,t,r){var n,a,i;n=e("./color.coffee"),a=e("../../../client/ie.js"),i=e("../../../core/fetch/value.coffee"),t.exports=function(e,t){return e.attr("fill",function(e){return e.d3plus&&e.d3plus.spline?"none":n(e,t)}).style("stroke",function(e){var r;return e.d3plus&&e.d3plus.stroke?e.d3plus.stroke:(r=e.values?n(e.values[0],t):n(e,t,!0),d3.rgb(r).darker(.6))}).style("stroke-width",function(e){var r;if(a&&t.types[t.type.value].zoom)return 0;if("line"===e.d3plus.shape&&t.size.value){if(t.size.value.constructor===Number)return t.size.value;if((r=i(t,e,t.size.value))&&r.length)return d3.max(r)}return t.data.stroke.width}).attr("opacity",t.data.opacity).attr("vector-effect","non-scaling-stroke")}},{"../../../client/ie.js":33,"../../../core/fetch/value.coffee":63,"./color.coffee":218}],233:[function(e,t,r){var n=e("./style.coffee");t.exports=function(e,t,r,a){function i(e){e.attr("d",d3.svg.symbol().type("triangle-down").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("triangle-down").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(i).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":232}],234:[function(e,t,r){var n=e("./style.coffee");t.exports=function(e,t,r,a){function i(e){e.attr("d",d3.svg.symbol().type("triangle-up").size(10))}function o(e){e.attr("d",d3.svg.symbol().type("triangle-up").size(function(e){var t=Math.min(e.d3plus.width,e.d3plus.height);return d3.scale.pow().exponent(2)(t/2)}))}r.append("path").attr("class","d3plus_data").call(i).call(n,e),t.selectAll("path.d3plus_data").data(function(e){return[e]}),e.draw.timing?t.selectAll("path.d3plus_data").transition().duration(e.draw.timing).call(o).call(n,e):t.selectAll("path.d3plus_data").call(o).call(n,e)}},{"./style.coffee":232}],235:[function(e,t,r){t.exports=function(e,t,r,n){var a,i,o,s,l,u,c,d,f;i=function(e){return e.d3plus.text?e.d3plus_label={w:d,h:d,x:0,y:0,background:"#fff",resize:!1,angle:["left","right"].indexOf(e.d3plus.position)>=0?90:0}:e.d3plus.label?e.d3plus_label=e.d3plus.label:delete e.d3plus_label,[e]},f=function(t){return t.style("stroke-width",e.data.stroke.width).style("stroke","#444").attr("fill","none").attr("shape-rendering",e.shape.rendering.value)},o=function(e){return e.attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",0)},c=function(e){return e.attr("x1",function(e){var t,r;return["top","bottom"].indexOf(e.d3plus.position)>=0?0:(t=e.d3plus.offset||0,r=e.d3plus.width||0,(t<0?-r:r)+t)}).attr("x2",function(e){return["top","bottom"].indexOf(e.d3plus.position)>=0?0:e.d3plus.offset||0}).attr("y1",function(e){var t,r;return["left","right"].indexOf(e.d3plus.position)>=0?0:(r=e.d3plus.offset||0,t=e.d3plus.height||0,(r<0?-t:t)+r)}).attr("y2",function(e){return["left","right"].indexOf(e.d3plus.position)>=0?0:e.d3plus.offset||0}).attr("marker-start","url(#d3plus_whisker_marker)")},s=e.defs.selectAll("#d3plus_whisker_marker").data([0]),s.enter().append("marker").attr("id","d3plus_whisker_marker").attr("markerUnits","userSpaceOnUse").style("overflow","visible").append("line"),a=t.datum(),a?(u=a.d3plus.position,l=["top","bottom"].indexOf(u)>=0?"horizontal":"vertical",d="horizontal"===l?a.d3plus.width:a.d3plus.height):(l="horizontal",d=0),s.select("line").attr("x1","horizontal"===l?-d/2:0).attr("x2","horizontal"===l?d/2:0).attr("y1","vertical"===l?-d/2:0).attr("y2","vertical"===l?d/2:0).call(f).style("stroke-width",2*e.data.stroke.width),e.draw.timing?(r.append("line").attr("class","d3plus_data").call(f).call(o),t.selectAll("line.d3plus_data").data(i).transition().duration(e.draw.timing).call(f).call(c),n.selectAll("line.d3plus_data").transition().duration(e.draw.timing).call(o)):(r.append("line").attr("class","d3plus_data"),t.selectAll("line.d3plus_data").data(i).call(f).call(c))}},{}],236:[function(e,t,r){var n=e("../../../client/pointer.coffee"),a=e("../../../client/prefix.coffee"),i=e("../../../core/console/print.coffee"),o=e("../../../client/touch.coffee"),s=e("../zoom/propagation.coffee");t.exports=function(e){e.dev.value&&i.time("creating SVG elements"),e.svg=e.container.value.selectAll("svg#d3plus").data([0]),e.svg.enter().insert("svg","#d3plus_message").attr("id","d3plus").attr("width",e.width.value).attr("height",e.height.value).attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink"),e.g.bg=e.svg.selectAll("rect#bg").data(["bg"]),e.g.bg.enter().append("rect").attr("id","bg").attr("fill",e.background.value).attr("stroke","none").attr("width",e.width.value).attr("height",e.height.value),e.g.timeline=e.svg.selectAll("g#timeline").data(["timeline"]),e.g.timeline.enter().append("g").attr("id","timeline").attr("transform","translate(0,"+e.height.value+")"),e.g.legend=e.svg.selectAll("g#key").data(["key"]),e.g.legend.enter().append("g").attr("id","key").attr("transform","translate(0,"+e.height.value+")"),e.g.footer=e.svg.selectAll("g#footer").data(["footer"]),e.g.footer.enter().append("g").attr("id","footer").attr("transform","translate(0,"+e.height.value+")");var t="clipping_"+e.container.id;e.g.clipping=e.svg.selectAll("#clipping").data(["clipping"]),e.g.clipping.enter().append("clipPath").attr("id",t).append("rect").attr("width",e.width.viz).attr("height",e.height.viz),e.g.container=e.svg.selectAll("g#container").data(["container"]),e.g.container.enter().append("g").attr("id","container").attr("clip-path","url(#"+t+")").attr("transform","translate("+e.margin.left+","+e.margin.top+")"),e.g.zoom=e.g.container.selectAll("g#zoom").data(["zoom"]),e.g.zoom.enter().append("g").attr("id","zoom"),e.g.viz=e.g.zoom.selectAll("g#d3plus_viz").data(["d3plus_viz"]),e.g.viz.enter().append("g").attr("id","d3plus_viz"),e.g.overlay=e.g.viz.selectAll("rect#d3plus_overlay").data([{id:"d3plus_overlay"}]),e.g.overlay.enter().append("rect").attr("id","d3plus_overlay").attr("width",e.width.value).attr("height",e.height.value).attr("opacity",0),e.g.overlay.on(n.move,function(t){o&&s(e,d3.event),e.types[e.type.value].zoom&&e.zoom.pan.value&&e.zoom.behavior.scaleExtent()[0]<e.zoom.scale?d3.select(this).style("cursor",a()+"grab"):d3.select(this).style("cursor","auto")}).on(n.up,function(t){o&&s(e,d3.event),e.types[e.type.value].zoom&&e.zoom.pan.value&&e.zoom.behavior.scaleExtent()[0]<e.zoom.scale?d3.select(this).style("cursor",a()+"grab"):d3.select(this).style("cursor","auto")}).on(n.down,function(t){o&&s(e,d3.event),e.types[e.type.value].zoom&&e.zoom.pan.value&&e.zoom.behavior.scaleExtent()[0]<e.zoom.scale?d3.select(this).style("cursor",a()+"grabbing"):d3.select(this).style("cursor","auto")}),e.g.app=e.g.viz.selectAll("g#app").data(["app"]),e.g.app.enter().append("g").attr("id","app"),e.g.edges=e.g.viz.selectAll("g#edges").data(["edges"]),e.g.edges.enter().append("g").attr("id","edges").attr("opacity",0),e.g.edge_focus=e.g.viz.selectAll("g#focus").data(["focus"]),e.g.edge_focus.enter().append("g").attr("id","focus"),e.g.edge_hover=e.g.viz.selectAll("g#edge_hover").data(["edge_hover"]),e.g.edge_hover.enter().append("g").attr("id","edge_hover").attr("opacity",0),e.g.data=e.g.viz.selectAll("g#data").data(["data"]),e.g.data.enter().append("g").attr("id","data").attr("opacity",0),e.g.data_focus=e.g.viz.selectAll("g#data_focus").data(["data_focus"]),e.g.data_focus.enter().append("g").attr("id","data_focus"),e.g.labels=e.g.viz.selectAll("g#d3plus_labels").data(["d3plus_labels"]),e.g.labels.enter().append("g").attr("id","d3plus_labels"),e.defs=e.svg.selectAll("defs").data(["defs"]),e.defs.enter().append("defs"),e.dev.value&&i.timeEnd("creating SVG elements")}},{"../../../client/pointer.coffee":34,"../../../client/prefix.coffee":35,"../../../client/touch.coffee":39,"../../../core/console/print.coffee":48,"../zoom/propagation.coffee":251}],237:[function(e,t,r){var n=e("../../../core/console/print.coffee");t.exports=function(e){e.dev.value&&n.time("updating SVG elements"),e.draw.timing?(e.container.value.transition().duration(e.draw.timing).style("width",e.width.value+"px").style("height",e.height.value+"px"),e.svg.transition().duration(e.draw.timing).attr("width",e.width.value).attr("height",e.height.value),e.g.bg.transition().duration(e.draw.timing).attr("width",e.width.value).attr("height",e.height.value).attr("fill",e.background.value),e.g.clipping.select("rect").transition().duration(e.draw.timing).attr("width",e.width.viz).attr("height",e.height.viz),e.g.container.transition().duration(e.draw.timing).attr("transform","translate("+e.margin.left+","+e.margin.top+")")):(e.container.value.style("width",e.width.value+"px").style("height",e.height.value+"px"),e.svg.attr("width",e.width.value).attr("height",e.height.value),e.g.bg.attr("width",e.width.value).attr("height",e.height.value).attr("fill",e.background.value),e.g.clipping.select("rect").attr("width",e.width.viz).attr("height",e.height.viz),e.g.container.attr("transform","translate("+e.margin.left+","+e.margin.top+")")),e.dev.value&&n.timeEnd("updating SVG elements")}},{"../../../core/console/print.coffee":48}],238:[function(e,t,r){var n=e("../../../array/sort.coffee"),a=e("../../../tooltip/create.js"),i=e("../../../core/data/nest.js"),o=e("./data.js"),s=e("../../../core/fetch/color.coffee"),l=e("../../../core/fetch/text.js"),u=e("../../../core/fetch/value.coffee"),c=e("../../../object/merge.coffee"),d=e("../../../tooltip/remove.coffee"),f=e("../shapes/segments.coffee"),p=e("../../../client/scroll.js"),h=e("../../../util/uniques.coffee"),v=e("../../../object/validate.coffee"),g=e("../zoom/direction.coffee");t.exports=function(e){function t(t){function p(e){return"string"==typeof r[e].value?r[e].value:r.format.locale.value.method[e]}var g,w="depth"in e?e.depth:y,j={},M=r.id.nesting[w+1]in m?w+1:w,O=r.id.nesting[M],C="merged"in m.d3plus?m.d3plus.merged:m[O];C instanceof Array||(C=[C]);var B=u(r,m,r.size.value);if(r.tooltip.children.value){if(C=C.slice(0),C.length>1&&v(C[0])&&(C=i(r,C,[O])),r.size.value&&v(C[0])){var q=[],N=C.filter(function(e){if(!(null===u(r,e,r.size.value)||"d3plus"in e&&e.d3plus.merged))return!0;q.push(e)});n(N,r.size.value,"desc",[],r),C=N.concat(q)}var P=!0===r.tooltip.children.value?3:r.tooltip.children.value,I="short"===A?P:r.data.large,D=C.length,R=d3.min([D,I]);g={values:[]};for(var V=0;V<R&&C.length;V++){var U=C.shift(),L=l(r,U,M)[0],Y=v(U)?u(r,U,O,M):U;if(Y!==m[r.id.nesting[w]]&&L&&!g[L]){var H=v(U)?u(r,U,r.size.value,O):null,G=s(r,U,O);g[L]=!H||H instanceof Array?"":r.format.value(H,{key:r.size.value,vars:r,data:U});var X={};X[L]=g[L],g.values.push(X),G&&(g.d3plus_colors||(g.d3plus_colors={}),g.d3plus_colors[L]=G)}else V--}D>R&&(g.d3plusMore=D-R)}m.d3plus.tooltip&&(j=c(j,m.d3plus.tooltip)),r.tooltip.size.value&&(B&&"number"!=typeof r.size.value&&(j[p("size")]=B),r.axes.opposite&&r[r.axes.opposite].value!==r.size.value&&(j[p(r.axes.opposite)]=u(r,m,r[r.axes.opposite].value)),r.axes.opposite&&r[r.axes.opposite+"2"].value!==r.size.value&&(j[p(r.axes.opposite+"2")]=u(r,m,r[r.axes.opposite+"2"].value)),r.color.valueScale&&(j[p("color")]=u(r,m,r.color.value)));var J=f(r,m,"active"),W=f(r,m,"temp"),Q=f(r,m,"total");"number"==typeof J&&J>0&&Q&&(j[p("active")]=J+"/"+Q+" ("+r.format.value(J/Q*100,{key:"share",vars:r,data:m})+")"),"number"==typeof W&&W>0&&Q&&(j[p("temp")]=W+"/"+Q+" ("+r.format.value(W/Q*100,{key:"share",vars:r,data:m})+")"),r.tooltip.share.value&&m.d3plus.share&&(j.share=r.format.value(100*m.d3plus.share,{key:"share",vars:r,data:m}));var M="depth"in e?e.depth:y,K=e.title||l(r,m,M)[0],Z=h(m,r.icon.value,u,r,r.id.nesting[M]),$=e.titleOnly?[]:o(r,m,A,j,g,M);if(Z=1===Z.length&&"string"==typeof Z[0]&&Z[0],$.length>0||E||!m.d3plus_label&&"short"==A&&K||m.d3plus_label&&(!("visible"in m.d3plus_label)||"visible"in m.d3plus_label&&!1===m.d3plus_label.visible)){K||(K=r.format.value(Y,{key:r.id.value,vars:r}));var M="d3plus"in m&&"merged"in m.d3plus?y-1:"depth"in e?e.depth:y;if(M<0&&(M=0),M=r.id.nesting[M],"string"==typeof r.icon.style.value)var ee=r.icon.style.value;else if("object"==typeof r.icon.style.value&&r.icon.style.value[M])var ee=r.icon.style.value[M];else var ee="default";var te=r.tooltip.small;e.width?te=e.width:k&&(te=r.tooltip.large);var re=!k&&"long"!==e.length||k&&r.tooltip.fullscreen.value?d3.select("body"):r.container.value;!e.description&&m&&r.tooltip.sub.value&&(e.description=u(r,m,r.tooltip.sub.value)),a({align:z,arrow:b,locale:r.format.locale.value,background:r.tooltip.background,curtain:r.tooltip.curtain.color,curtainopacity:r.tooltip.curtain.opacity,fontcolor:r.tooltip.font.color,fontfamily:r.tooltip.font.family.value,fontsize:r.tooltip.font.size,fontweight:r.tooltip.font.weight,data:$,color:s(r,m),allColors:!0,footer:!1===e.footer?e.footer:E,fullscreen:k,html:t,js:e.js,icon:Z,id:_,max_height:e.maxheight,max_width:te,mouseevents:x,offset:T,parent:re,stacked:r.tooltip.stacked.value,style:ee,title:K,description:e.description,width:e.width||k||0!=$.length?te:"auto",x:F,y:S})}else d(_)}"d3plus"in e.data||(e.data.d3plus={});var r=e.vars,m=e.data,y="d3plus"in m&&"depth"in m.d3plus?m.d3plus.depth:r.depth.value,x=(e.ex,!!e.mouseevents&&e.mouseevents),b=!("arrow"in e)||e.arrow,w=u(r,m,r.id.value),_=e.id||r.type.value;if(!d3.event||"click"!=d3.event.type||!r.tooltip.html.value&&!r.tooltip.value.long||"fullscreen"in e){var k=!1,z=e.anchor||r.tooltip.anchor,A=e.length||"short",j=g(m,r);if(-1===j){var M=r.id.nesting[y-1];u(r,w,M)}var O="";if(r.mouse.click.value&&(!r.mouse.viz||!1!==r.mouse.viz.click))if(1===j&&r.zoom.value)var O=r.format.value(r.format.locale.value.ui.expand);else if(-1===j&&r.zoom.value&&r.history.states.length&&!r.tooltip.value.long)var O=r.format.value(r.format.locale.value.ui.collapse);else if(r.small||"short"!=A||!r.tooltip.html.value&&!r.tooltip.value.long||1===r.focus.value.length&&r.focus.value[0]==w){if("long"==A)var O=r.footer.value||""}else var O=r.format.locale.value.ui.moreInfo;var E=!!O.length&&r.format.value(O,{key:"footer",vars:r})}else{var k=!0,b=!1,x=!0,A="long",E=r.footer.value;r.covered=!0}if("x"in e)var F=e.x;else if("static"===r.types[r.type.value].tooltip){var F=m.d3plus.x;r.zoom.translate&&r.zoom.scale&&(F=r.zoom.translate[0]+F*r.zoom.scale),F+=r.margin.left,"long"!==e.length&&(S+=p.x(),F+=r.container.value.node().getBoundingClientRect().left,F+=parseFloat(r.container.value.style("padding-left"),10))}else var F=d3.mouse(d3.select("html").node())[0];if("y"in e)var S=e.y;else if("static"==r.types[r.type.value].tooltip){var S=m.d3plus.y;r.zoom.translate&&r.zoom.scale&&(S=r.zoom.translate[1]+S*r.zoom.scale),S+=r.margin.top,"long"!==e.length&&(S+=p.y(),S+=r.container.value.node().getBoundingClientRect().top,S+=parseFloat(r.container.value.style("padding-top"),10))}else var S=d3.mouse(d3.select("html").node())[1];if("offset"in e)var T=e.offset;else if("static"==r.types[r.type.value].tooltip){var T=m.d3plus.r?m.d3plus.r:m.d3plus.height/2;r.zoom.scale&&(T*=r.zoom.scale)}else var T=3;if(k||"long"===e.length)if("string"==typeof r.tooltip.html.value)t(r.tooltip.html.value);else if("function"==typeof r.tooltip.html.value)t(r.tooltip.html.value(w));else if(r.tooltip.html.value&&"object"==typeof r.tooltip.html.value&&r.tooltip.html.value.url){var C=r.tooltip.html.value.url;"function"==typeof C&&(C=C(w)),d3.json(C,function(e){t(r.tooltip.html.value.callback?r.tooltip.html.value.callback(e):e)})}else t(e.html);else t(e.html)}},{"../../../array/sort.coffee":30,"../../../client/scroll.js":37,"../../../core/data/nest.js":56,"../../../core/fetch/color.coffee":59,"../../../core/fetch/text.js":62,"../../../core/fetch/value.coffee":63,"../../../object/merge.coffee":169,"../../../object/validate.coffee":170,"../../../tooltip/create.js":199,"../../../tooltip/remove.coffee":201,"../../../util/uniques.coffee":208,"../shapes/segments.coffee":231,"../zoom/direction.coffee":248,"./data.js":239}],239:[function(e,t,r){var n=e("../../../util/copy.coffee"),a=e("../../../core/fetch/value.coffee"),i=e("../../../core/fetch/color.coffee"),o=e("../../../core/fetch/text.js"),s=e("../../../color/legible.coffee"),l=e("../../../object/merge.coffee"),u=e("../../../client/prefix.coffee"),c=e("../../../string/format.js"),d=e("../../../object/validate.coffee");t.exports=function(e,t,r,f,p,h){function v(r,n){if(e.attrs.value[n])var i=n;else var i=null;n&&(n=e.format.value(n));var o=m[r]||a(e,t,r,i);if(d(o))w.push({name:e.format.value(r),value:e.format.value(o.value,{key:o.key,vars:e}),group:n});else if(null!=o&&"undefined"!=o&&!(o instanceof Array)&&("string"==typeof o&&o.indexOf("d3plus_other")<0||"string"!=typeof o)){var s=e.format.locale.value.ui[r]?e.format.value(e.format.locale.value.ui[r]):e.format.value(r),l=x.indexOf(r)>=0;o instanceof Array?o.forEach(function(n){n=e.format.value(n,{key:r,vars:e,data:t})}):o=e.format.value(o,{key:r,vars:e,data:t});var u={name:s,value:o,highlight:l,group:n};if(e.descs.value)if("function"==typeof e.descs.value){var c=e.descs.value(r);"string"==typeof c&&(u.desc=c)}else r in e.descs.value&&(u.desc=e.descs.value[r]);w.push(u)}}if(e.small)return[];if(!r)var r="long";if("long"==r)var g="short";else var g="long";var m={};if(f&&"string"==typeof f)f=[f];else if(f&&"object"==typeof f){m=l(m,f);var f=[];for(var y in m)f.push(y)}else if(!f)var f=[];var x=[];if(e.tooltip.value instanceof Array)var b=e.tooltip.value;else if("string"==typeof e.tooltip.value)var b=[e.tooltip.value];else{if(e.tooltip.value[e.id.nesting[h]])var b=e.tooltip.value[e.id.nesting[h]];else var b=e.tooltip.value;b instanceof Array||(b=b[r]?b[r]:b[g]?[]:l({"":[]},b)),"string"==typeof b?b=[b]:b instanceof Array||(b=l({"":[]},b))}var w=[];if(b.constructor===Array&&(b={"":b}),e.id.nesting.length&&h<e.id.nesting.length-1){var b=n(b);e.id.nesting.forEach(function(e,t){t>h&&b[e]&&delete b[e]})}for(var _ in b){b[_].constructor!==Array&&(b[_]=[b[_]]);for(var k=f.length;k>0;k--)b[_].indexOf(f[k-1])>=0&&f.splice(k-1,1)}if(e.tooltip.value.long&&"object"==typeof e.tooltip.value.long){for(var _ in e.tooltip.value.long)for(var k=f.length;k>0;k--){var z=f[k-1];e.tooltip.value.long[_].indexOf(z)>=0&&(b[_]||(b[_]=[]),b[_].push(z),f.splice(k-1,1))}}f.length&&(b[""]||(b[""]=[]),b[""]=b[""].concat(f));for(var _ in b)b[_].forEach(function(e){v(e,_)});if(p){var A=e.format.locale.value.ui.including,j=p.d3plus_colors;p.values.forEach(function(t){var r=d3.keys(t)[0];w.push({group:e.format.value(A),highlight:!(!j||!j[r])&&j[r],name:r,value:t[r]})}),p.d3plusMore&&w.push({group:e.format.value(A),highlight:!0,name:c(e.format.locale.value.ui.more,p.d3plusMore),value:""})}if(e.tooltip.connections.value&&"long"===r){var M=e.edges.connections(t[e.id.value],e.id.value,!0);M.length&&M.forEach(function(t){var r=e.data.viz.filter(function(r){return r[e.id.value]===t[e.id.value]}),r=r.length?r[0]:t,n=o(e,r)[0],a=i(e,r),l=e.tooltip.font.size,c="square"==e.shape.value?0:l;styles=["background-color: "+a,"border-color: "+s(a),"border-style: solid","border-width: "+e.data.stroke.width+"px","display: inline-block","height: "+l+"px","left: 0px","position: absolute","width: "+l+"px","top: 0px",u()+"border-radius: "+c+"px"],node="<div style='"+styles.join("; ")+";'></div>";var d=function(){e.self.focus([r[e.id.value]]).draw()};w.push({group:e.format.value(e.format.locale.value.ui.primary),highlight:!1,link:d,name:"<div id='d3plustooltipfocuslink_"+r[e.id.value]+"' class='d3plus_tooltip_focus_link' style='position:relative;padding-left:"+1.5*l+"px;'>"+node+n+"</div>"})})}return w}},{"../../../client/prefix.coffee":35,"../../../color/legible.coffee":40,"../../../core/fetch/color.coffee":59,"../../../core/fetch/text.js":62,"../../../core/fetch/value.coffee":63,"../../../object/merge.coffee":169,"../../../object/validate.coffee":170,"../../../string/format.js":171,"../../../util/copy.coffee":205}],240:[function(e,t,r){var n;n=e("../../../core/console/print.coffee"),t.exports=function(e){var t,r,a,i,o,s,l,u,c,d;if(e.group=e.g.apps[e.type.value],e.mouse.viz=!1,e.edges.path=!1,d=e.types[e.type.value],u=d.requirements||[],a=u.indexOf("data")>=0,i=!a||a&&e.data.viz.length,!e.error.internal&&i){for(t=e.format.locale.value.visualization[e.type.value],e.dev.value&&n.time("running "+t),l=e.data.viz,o=0,s=l.length;o<s;o++)r=l[o],r.d3plus&&(delete r.d3plus.shape,delete r.d3plus.label,delete r.d3plus.rotate,delete r.d3plus.share);c=d(e),e.dev.value&&n.timeEnd("running "+t)}else c=null;e.returned={nodes:[],edges:null},c instanceof Array?e.returned.nodes=c:c&&(c.nodes&&(e.returned.nodes=c.nodes),c.edges&&(e.returned.edges=c.edges))}},{"../../../core/console/print.coffee":48}],241:[function(e,t,r){var n=e("../../../util/copy.coffee"),a=e("../../../form/form.js"),i=e("../../../core/console/print.coffee"),o=e("../../../object/validate.coffee");t.exports=function(e){var t=e.ui.value&&e.ui.value.length,r=e.ui.position.value;e.dev.value&&t&&i.time("drawing custom UI elements");var s=e.container.value.selectAll("div#d3plus_drawer").data(["d3plus_drawer"]);s.enter().append("div").attr("id","d3plus_drawer");var l={};e.ui.position.accepted.forEach(function(t){l[t]=t==r?e.margin.bottom+"px":"auto"}),s.style("text-align",e.ui.align.value).style("position","absolute").style("width",e.width.value-2*e.ui.padding+"px").style("height","auto").style(l);var u=s.selectAll("div.d3plus_drawer_ui").data(t?e.ui.value:[],function(e){return e.method||!1});u.exit().remove(),u.enter().append("div").attr("class","d3plus_drawer_ui").style("display","inline-block"),u.style("padding",e.ui.padding+"px").each(function(t){t.form||(t.form=a().container(d3.select(this)).data({sort:!1}).id("id").text("text"));var r,i;"string"==typeof t.method&&t.method in e?(r=e[t.method].value,i=function(r){r!==e[t.method].value&&e.self[t.method](r).draw()}):(r=t.focus||t.value[0],o(r)&&(r=r[d3.keys(r)[0]]),"function"==typeof t.method&&(i=function(n){n!==r&&(r=n,t.focus=n,t.method(n,e.self))}));var s,l=[];t.label?s=t.label:"string"==typeof t.method&&t.method in e&&(s=e.format.locale.value.method[t.method]||t.method),t.value.forEach(function(t){var r={};o(t)?(r.id=t[d3.keys(t)[0]],r.text=e.format.value(d3.keys(t)[0])):(r.id=t,r.text=e.format.value(t)),l.push(r)});var u=n(e.ui.font);u.align=n(e.font.align),u.secondary=n(u),t.form.data(l).font(u).focus(t.value.length>1&&r).focus({callback:i}).format(e.format.locale.language).format({number:e.format.number.value,text:e.format.text.value}).title(e.format.value(s)).type(t.type||"auto").ui({align:e.ui.align.value,border:e.ui.border,color:{primary:e.ui.color.primary.value,secondary:e.ui.color.secondary.value},padding:e.ui.padding,margin:0}).width(t.width||!1).draw()});var c=s.node().offsetHeight||s.node().getBoundingClientRect().height;c&&(e.margin[r]+=c),e.dev.value&&t&&i.timeEnd("drawing custom UI elements")}},{"../../../core/console/print.coffee":48,"../../../form/form.js":102,"../../../object/validate.coffee":170,"../../../util/copy.coffee":205}],242:[function(e,t,r){var n,a,i,o;n=e("../../../client/pointer.coffee"),a=e("../../../color/lighter.coffee"),i=e("../../../core/console/print.coffee"),o=e("../../../client/css.coffee"),t.exports=function(e){var t,r,s,l,u,c,d,f,p,h,v,g,m,y;return!e.small&&e.history.value&&e.history.states.length>0?(e.dev.value&&i.time("drawing back button"),t=e.container.value.selectAll("div#d3plus_back_button").data(["d3plus_back_button"]).style("position","relative").style("z-index",1900),f=e.title.sub.font.size,r=e.title.sub.font.color,l=e.title.sub.font.family.value,y=e.title.sub.font.weight,d=e.title.sub.padding,v=!1,
e.title.sub.value&&["start","left"].indexOf(e.title.sub.font.align)<0?v="sub":e.title.total.value&&["start","left"].indexOf(e.title.total.font.align)<0?v="total":e.title.value&&["start","left"].indexOf(e.title.font.align)<0&&(v="title"),v?(p=function(e){var t;return t=e.attr("transform").match(/translate\(([^a-z]+)\)/gi)[0],t=t.replace(/([^a-z])\s([^a-z])/gi,"$1,$2"),t=t.split(","),t=t[t.length-1],parseFloat(t.substring(0,t.length-1))},g=e.svg.select(".d3plus_title."+v),m=p(g)+p(g.select("text"))):(m=e.margin.top-e.title.padding,c=f+2*d,e.margin.top+=c),s=parseFloat(e.container.value.style("padding-top"),10),m+=s,s=parseFloat(e.container.value.style("padding-left"),10),u=e.margin.left+f/2+s,h=function(e){return e.style("position","absolute").style("left",u+"px").style("top",m+"px").style("color",r).style("font-family",l).style("font-weight",y).style("font-size",f+"px")},t.enter().append("div").attr("id","d3plus_back_button").style("opacity",0).call(h).html(function(){var t;return o("font-awesome")&&0===e.icon.back.value.indexOf("fa-")?(t="<i class='fa "+e.icon.back.value,t+="' style='margin-top:2px;margin-right:4px;'></i>"):t=e.icon.back.value+" ",t+e.format.value(e.format.locale.value.ui.back)}),t.on(n.over,function(){if(!e.small&&e.history.states.length>0)return d3.select(this).style("cursor","pointer").transition().duration(e.timing.mouseevents).style("color",a(r,.25))}).on(n.out,function(){if(!e.small&&e.history.states.length>0)return d3.select(this).style("cursor","auto").transition().duration(e.timing.mouseevents).style("color",r)}).on(n.click,function(){return e.history.back()}).transition().duration(e.draw.timing).style("opacity",1).call(h),e.dev.value?i.timeEnd("drawing back button"):void 0):e.container.value.selectAll("div#d3plus_back_button").transition().duration(e.draw.timing).style("opacity",0).remove()}},{"../../../client/css.coffee":32,"../../../client/pointer.coffee":34,"../../../color/lighter.coffee":41,"../../../core/console/print.coffee":48}],243:[function(e,t,r){var n=e("../../../array/sort.coffee"),a=e("../../../util/buckets.coffee"),i=e("../../../util/copy.coffee"),o=e("../tooltip/create.js"),s=e("../../../core/data/nest.js"),l=e("../../../util/dataURL.coffee"),u=e("../../../client/pointer.coffee"),c=e("../../../core/fetch/value.coffee"),d=e("../../../core/fetch/color.coffee"),f=e("../../../core/fetch/text.js"),p=e("../../../core/console/print.coffee"),h=e("../../../tooltip/remove.coffee"),v=e("../../../color/text.coffee"),g=e("../../../util/uniques.coffee"),m=e("../../../client/scroll.js"),y=e("../../../string/strip.js"),x=e("../../../textwrap/textwrap.coffee"),b=(e("../../../client/touch.coffee"),e("../../../object/validate.coffee"));t.exports=function(e){function t(t){t.attr("transform",function(t,r){return"translate("+(C+r*(e.ui.padding+_))+","+e.ui.padding+")"})}function r(t){t.attr("width",_).attr("height",_).attr("fill",function(t){d3.select(this.parentNode).select("text").remove();var r=g(t,e.icon.value,c,e,R),n=d(e,t,R);if(e.legend.icons.value&&1===r.length&&"string"==typeof r[0]){r=r[0];var a,i=y(r+"_"+n),o=e.icon.style.value,s=e.defs.selectAll("pattern#"+i).data([i]);a="string"==typeof o?e.icon.style.value:b(o)&&o[R]?o[R]:"default",n="knockout"==a?n:"none",s.select("rect").transition().duration(e.draw.timing).attr("fill",n).attr("width",_).attr("height",_),s.select("image").transition().duration(e.draw.timing).attr("width",_).attr("height",_);var u=s.enter().append("pattern").attr("id",i).attr("width",_).attr("height",_);return u.append("rect").attr("fill",n).attr("stroke","none").attr("width",_).attr("height",_),u.append("image").attr("xlink:href",r).attr("width",_).attr("height",_).each(function(e){0===r.indexOf("/")||r.indexOf(window.location.hostname)>=0?l(r,function(e){s.select("image").attr("xlink:href",e)}):s.select("image").attr("xlink:href",r)}),"url(#"+i+")"}if(e.legend.labels.value){var p;if(p=e.legend.text.value?[c(e,t,e.legend.text.value,D)]:f(e,t,D),1===p.length&&!(p[0]instanceof Array)&&p[0].length){var h=d3.select(this.parentNode).append("text"),m=e.legend.font.size;m instanceof Array||(m=[m]),h.attr("font-size",m[m.length-1]+"px").attr("font-weight",e.legend.font.weight).attr("font-family",e.legend.font.family.value).attr("stroke","none").attr("fill",v(n)).attr("x",0).attr("y",0).each(function(t){x().align("middle").container(d3.select(this)).height(_).padding(e.ui.padding).resize(m.length>1).size(m).text(p[0]).width(_).valign("middle").draw()}),h.select("tspan").empty()&&h.remove()}}return n})}var w=!0,_=0;if(!e.error.internal&&e.color.value&&!e.small&&e.legend.value)if(e.color.valueScale)if(e.color.valueScale){e.dev.value&&p.time("drawing color scale"),e.g.legend.selectAll("g.d3plus_color").transition().duration(e.draw.timing).attr("opacity",0).remove();var k=e.color.valueScale.domain(),z=e.color.valueScale.range();k.length<=2&&(k=a(k,6));var A=e.g.legend.selectAll("g.d3plus_scale").data(["scale"]);A.enter().append("g").attr("class","d3plus_scale").attr("opacity",0);var j=e.container.id+"_legend_heatmap",M=A.selectAll("#"+j).data(["heatmap"]);M.enter().append("linearGradient").attr("id",j).attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%").attr("spreadMethod","pad");var O=M.selectAll("stop").data(d3.range(0,z.length));O.enter().append("stop").attr("stop-opacity",1),O.attr("offset",function(e){return Math.round(e/(z.length-1)*100)+"%"}).attr("stop-color",function(e){return z[e]}),O.exit().remove();var E=A.selectAll("rect#gradient").data(["gradient"]);E.enter().append("rect").attr("id","gradient").attr("x",function(t){return"middle"==e.legend.align?e.width.value/2:"end"==e.legend.align?e.width.value:0}).attr("y",e.ui.padding).attr("width",0).attr("height",e.legend.gradient.height).attr("stroke",e.legend.font.color).attr("stroke-width",1).style("fill","url(#"+j+")");var F=A.selectAll("text.d3plus_tick").data(d3.range(0,k.length));F.enter().append("text").attr("class","d3plus_tick").attr("stroke","none").attr("x",function(t){return"middle"==e.legend.align?e.width.value/2:"end"==e.legend.align?e.width.value:0}).attr("y",function(t){return this.getBBox().height+e.legend.gradient.height+2*e.ui.padding});var S=0;F.order().attr("font-weight",e.legend.font.weight).attr("font-family",e.legend.font.family.value).attr("font-size",e.legend.font.size+"px").style("text-anchor",e.legend.font.align).attr("fill",e.legend.font.color).text(function(t){return e.format.value(k[t],{key:e.color.value,vars:e})}).attr("y",function(t){return this.getBBox().height+e.legend.gradient.height+2*e.ui.padding}).each(function(e){var t=Math.ceil(this.getBBox().width);t>S&&(S=t)}),S+=2*e.labels.padding;var T=S*(k.length-1);if(T+S<e.width.value){T+S<e.width.value/2&&(T=e.width.value/2,S=T/k.length,T-=S);var C;C="start"==e.legend.align?e.ui.padding:"end"==e.legend.align?e.width.value-e.ui.padding-T:e.width.value/2-T/2,F.transition().duration(e.draw.timing).attr("x",function(e){return C+S*e}),F.exit().transition().duration(e.draw.timing).attr("opacity",0).remove();var B=A.selectAll("rect.d3plus_tick").data(d3.range(0,k.length));B.enter().append("rect").attr("class","d3plus_tick").attr("x",function(t){return"middle"==e.legend.align?e.width.value/2:"end"==e.legend.align?e.width.value:0}).attr("y",e.ui.padding).attr("width",0).attr("height",e.ui.padding+e.legend.gradient.height).attr("fill",e.legend.font.color),B.transition().duration(e.draw.timing).attr("x",function(e){return C+S*e-(0===e?1:0)}).attr("y",e.ui.padding).attr("width",1).attr("height",e.ui.padding+e.legend.gradient.height).attr("fill",e.legend.font.color),B.exit().transition().duration(e.draw.timing).attr("width",0).remove(),E.transition().duration(e.draw.timing).attr("x",function(t){return"middle"==e.legend.align?e.width.value/2-T/2:"end"==e.legend.align?e.width.value-T-e.ui.padding:e.ui.padding}).attr("y",e.ui.padding).attr("width",T).attr("height",e.legend.gradient.height),A.transition().duration(e.draw.timing).attr("opacity",1),e.dev.value&&p.timeEnd("drawing color scale")}else w=!1}else w=!1;else{e.dev.value&&p.time("grouping data by colors");var q;if(e.nodes.value&&e.types[e.type.value].requirements.indexOf("nodes")>=0){if(q=i(e.nodes.restriced||e.nodes.value),e.data.viz.length)for(var N=0;N<q.length;N++){var P=e.data.viz.filter(function(t){return t[e.id.value]===q[N][e.id.value]});P.length&&(q[N]=P[0])}}else q=e.data.viz;q.length&&"key"in q[0]&&"values"in q[0]&&(q=d3.merge(q.map(function(e){return e.values})));var I=function(t){return d(e,t,D)},D=0,R=e.id.value,V=e.id.nesting.indexOf(e.color.value);if(V>=0)D=V,R=e.id.nesting[V];else for(var U=0;U<=e.depth.value;U++){D=U,R=e.id.nesting[U];var L=g(q,function(t){return c(e,t,R)}),Y=g(q,I);if(L.length>=Y.length&&Y.length>1)break}var H=[e.color.value],z=s(e,q,H,!1);e.dev.value&&p.timeEnd("grouping data by color");var G=e.width.value;_=e.legend.size;var T=_*z.length+e.ui.padding*(z.length+1);if(_ instanceof Array){e.dev.value&&p.time("calculating legend size");for(var N=_[1];N>=_[0];N--)if(T=N*z.length+e.ui.padding*(z.length+1),G>=T){_=N;break}e.dev.value&&p.timeEnd("calculating legend size")}else"number"!=typeof _&&!1!==_&&(_=30);if(G<T||1==z.length)w=!1;else{if(T-=2*e.ui.padding,e.dev.value&&p.time("sorting legend"),"function"==typeof e.legend.order.value)z=e.legend.order.value(z);else{var X=e[e.legend.order.value].value,J=e.color.value;X?"color"!==e.legend.order.value&&(J=[]):X=e[e.color.value].value,n(z,X,e.legend.order.sort.value,J,e,D)}e.dev.value&&p.timeEnd("sorting legend"),e.dev.value&&p.time("drawing legend");var C;C="start"==e.legend.align?e.ui.padding:"end"==e.legend.align?G-e.ui.padding-T:G/2-T/2,e.g.legend.selectAll("g.d3plus_scale").transition().duration(e.draw.timing).attr("opacity",0).remove();var W={},Q=e.g.legend.selectAll("g.d3plus_color").data(z,function(t){var r=d(e,t,R);return r in W||(W[r]=-1),++W[r]+"_"+r});Q.enter().append("g").attr("class","d3plus_color").attr("opacity",0).call(t).append("rect").attr("class","d3plus_color").attr("stroke","none").call(r),Q.order().transition().duration(e.draw.timing).call(t).attr("opacity",1).selectAll("rect.d3plus_color").call(r),Q.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),e.legend.tooltip.value&&Q.on(u.over,function(t,r){d3.select(this).style("cursor","pointer");var n,a=this.getBoundingClientRect(),i=a.left+_/2+m.x(),s=a.top+_/2+m.y()+5,l=c(e,t,R),d=e.id.nesting.indexOf(R);n=e.legend.title.value?c(e,t,e.legend.title.value,D):d>=0?f(e,t,d)[0]:e.format.value(c(e,t,e.color.value,R),{key:e.color.value,vars:e,data:t});var p,h;if(e.legend.filters.value&&!(l instanceof Array)){p="<div style='text-align:center;'>";var v=e.format.locale.value;p+="<div class='mute'>"+e.format.value(v.method.mute)+"</div>",p+="<div class='solo'>"+e.format.value(v.method.solo)+"</div>",p+="</div>",h=function(t){var r={border:"1px solid #ccc",display:"inline-block",margin:"1px 2px",padding:"3px 5px"};t.select(".mute").style(r).on(u.over,function(){d3.select(this).style("cursor","pointer")}).on(u.click,function(){var t=e.id.mute.value;e.history.states.push(function(){e.self.id({mute:t}).draw()}),e.self.id({mute:l}).draw()}),t.select(".solo").style(r).on(u.over,function(){d3.select(this).style("cursor","pointer")}).on(u.click,function(){var t=e.id.solo.value;e.history.states.push(function(){e.self.id({solo:t}).draw()}),e.self.id({solo:l}).draw()})}}o({data:t,html:p,js:h,depth:D,footer:!1,vars:e,x:i,y:s,mouseevents:this,title:n,titleOnly:!e.legend.data.value,offset:.4*_})}).on(u.out,function(t){h(e.type.value)}),e.dev.value&&p.timeEnd("drawing legend")}}else w=!1;if(e.legend.value&&key&&w){if(e.dev.value&&p.time("positioning legend"),_)var K=_+e.ui.padding;else var Z=e.g.legend.node().getBBox(),K=Z.height+Z.y;0===e.margin.bottom&&(e.margin.bottom+=e.ui.padding),e.margin.bottom+=K,e.g.legend.transition().duration(e.draw.timing).attr("transform","translate(0,"+(e.height.value-e.margin.bottom)+")"),e.dev.value&&p.timeEnd("positioning legend")}else e.dev.value&&p.time("hiding legend"),e.g.legend.transition().duration(e.draw.timing).attr("transform","translate(0,"+e.height.value+")"),e.dev.value&&p.timeEnd("hiding legend")}},{"../../../array/sort.coffee":30,"../../../client/pointer.coffee":34,"../../../client/scroll.js":37,"../../../client/touch.coffee":39,"../../../color/text.coffee":46,"../../../core/console/print.coffee":48,"../../../core/data/nest.js":56,"../../../core/fetch/color.coffee":59,"../../../core/fetch/text.js":62,"../../../core/fetch/value.coffee":63,"../../../object/validate.coffee":170,"../../../string/strip.js":173,"../../../textwrap/textwrap.coffee":198,"../../../tooltip/remove.coffee":201,"../../../util/buckets.coffee":202,"../../../util/copy.coffee":205,"../../../util/dataURL.coffee":207,"../../../util/uniques.coffee":208,"../tooltip/create.js":238}],244:[function(e,t,r){var n=e("../../../client/pointer.coffee"),a=e("../../../color/text.coffee");t.exports=function(e,t){function r(t){t.style(o).style("position","absolute").style("background-color",l).style("text-align","center").style("left",function(){return"center"==s?"50%":"0px"}).style("width",function(){return"center"==s?"auto":e.width.value+"px"}).style("margin-left",function(){return"center"==s?-this.offsetWidth/2+"px":"0px"}).style("top",function(){return"center"==s?"50%":"top"==s?"0px":"auto"}).style("bottom",function(){return"bottom"==s?"0px":"auto"}).style("margin-top",function(){if("large"==i){return-(this.offsetHeight||this.getBoundingClientRect().height)/2+"px"}return"0px"})}t=e.messages.value?t:null;var i=e.messages.style.value||(t===e.error.internal?"large":e.messages.style.backup);if("large"===i)var o=e.messages,s="center";else{if(e.footer.value)var o=e.footer;else if(e.title.value)var o=e.title;else if(e.title.sub.value)var o=e.title.sub;else if(e.title.total.value)var o=e.title.total;else var o=e.title.sub;var s=o.position}var o={color:o.font.color,"font-family":o.font.family.value,"font-weight":o.font.weight,"font-size":o.font.size+"px",padding:o.padding+"px"},l=e.messages.background.value;l||"none"!==(l=e.background.value)&&"transparent"!==l||(l=a(o.color)),e.g.message=e.container.value.selectAll("div#d3plus_message").data(["message"]),e.g.message.enter().append("div").attr("id","d3plus_message").attr("opacity",0).append("div").attr("class","d3plus_message_text").style("display","block"),e.g.message.select(".d3plus_message_text").text(t||e.g.message.text());var u=navigator.onLine,c=e.g.message.selectAll(".d3plus_message_branding").data(e.messages.branding.value&&"center"===s?[0]:[]);c.enter().append("div").attr("class","d3plus_message_branding").style("margin-top","15px").style("padding-top","0px").style("display","block").style("font-size","11px").style("background-size","75px").style("background-position","center 10px").style("background-repeat","no-repeat").style("cursor","pointer").on(n.click,function(){window.open("http://www.d3plus.org/","_blank")});var d=d3.hsl(l).l<.5?e.messages.branding.image.dark:e.messages.branding.image.light;c.text(u?"Powered by:":"Powered by D3plus").style("background-color",u?l:"transparent").style("background-image",u?"url('"+d+"')":"none").style("min-width",u?"75px":"auto").style("height",u?"75px":"auto"),c.exit().remove(),e.g.message.style("display",t?"inline-block":"none").call(r).style("opacity",t?1:0)}},{"../../../client/pointer.coffee":34,"../../../color/text.coffee":46}],245:[function(e,t,r){var n,a,i,o,s,l,u,c,d;n=e("../../../util/closest.coffee"),a=e("../../../client/css.coffee"),e("../../../font/sizes.coffee"),i=e("../../../client/pointer.coffee"),o=e("../../../color/mix.coffee"),l=e("../../../client/prefix.coffee"),u=e("../../../core/console/print.coffee"),c=e("../../../color/text.coffee"),d=e("../../../core/data/time.coffee"),s=!1,t.exports=function(e){var t,r,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G,X,J,W,Q,K,Z,$,ee,te,re,ne,ae,ie,oe;if(!e.timeline.value||e.error.internal&&e.data.missing||e.small||!e.data.time||!(e.data.time.values.length>1))return e.g.timeline.transition().duration(e.draw.timing).attr("transform","translate(0,"+e.height.value+")");if(e.dev.value&&u.time("drawing timeline"),H={"font-weight":e.ui.font.weight,"font-family":e.ui.font.family.value,"font-size":e.ui.font.size+"px","text-anchor":"middle"},oe=e.data.time.ticks.map(function(e){return new Date(e)}),Q=d(e,{values:oe,style:H}),te=Q.values.map(Number),W=Q.format,e.time.solo.value.length)for(w=d3.extent(e.time.solo.value),b=_=0,A=w.length;_<A;b=++_)m=w[b],m.constructor!==Date&&(m+="",4===m.length&&parseInt(m)+""===m&&(m+="/01/01"),m=new Date(m),w[b]=m);else w=d3.extent(oe);if(ie=oe.slice(),ne=d3.max(Q.sizes.map(function(e){return e.height})),k=1+~~d3.max(Q.sizes.map(function(e){return e.width})),k+=2*e.ui.padding,Z=e.timeline.height.value||ne+2*e.ui.padding,ee=k*oe.length,N=Z,U=Z-2*e.ui.padding>=ne,t=e.width.value-2*e.ui.padding,U&&e.timeline.play.value&&(t-=N+e.ui.padding),!U||te.length<oe.length||t<k*te.length){for(E=k,k=(t-k)/oe.length,ee=k*oe.length,$=1,X=1+~~(E/(ee/te.length));X<te.length-1&&(te.length-1)%X!=0;)X++;te=te.filter(function(e,t){return t%X==0})}else $=0,M=new Date(oe[0]),R=e.data.time.stepType,M["set"+R](M["get"+R]()+oe.length),ie.push(M);return I=new Date(w[0]),I=n(ie,I),y=new Date(w[1]),$||y["set"+e.data.time.stepType](y["get"+e.data.time.stepType]()+1),y=n(ie,y),ae=ie.map(Number),O=ae.indexOf(+I),j=ae.indexOf(+y),p=[I,y],D="start"===e.timeline.align?e.ui.padding:"end"===e.timeline.align?e.width.value-e.ui.padding-ee:e.width.value/2-ee/2,U&&e.timeline.play.value&&(D+=(N+e.ui.padding)/2),V=function(){return clearInterval(s),s=!1,S.call(T,"icon")},v=function(){var e,t,r;if(null!==d3.event.sourceEvent){if(s&&V(),p=f.extent(),r=n(ie,p[0]),t=n(ie,p[1]),r===t&&(O=ae.indexOf(+r),r<p[0]||0===O?t=ie[O+1]:r=ie[O-1]),O=ae.indexOf(+r),(j=ae.indexOf(+t))-O>=1)e=[r,t];else if(O+1<=oe.length)e=[r,ie[O+1]];else{for(e=[r],b=1;b<=1;)O+b<=oe.length?e.push(ie[O+b]):e.unshift(ie[O-(O+b-oe.length)]),b++;e=[e[0],e[e.length-1]]}return p=e,L.attr("fill",Y),d3.select(this).call(f.extent(e))}},P=function(){var t;return j-O==oe.length-$?t=[]:(t=ae.filter(function(e,t){return t>=O&&t<j+$}),t=t.map(function(e){return new Date(e)})),q(),e.self.time({solo:t}).draw()},g=function(){var t,r,a,i;if(null!==d3.event.sourceEvent&&(e.time.solo.value.length?(i=d3.extent(e.time.solo.value),a=ae.indexOf(+n(ie,i[0])),r=ae.indexOf(+n(ie,i[1])),t=a!==O||r!==j):t=j-O!=oe.length-$,t))return P()},F=e.g.timeline.selectAll("rect.d3plus_timeline_play").data(U&&e.timeline.play.value?[0]:[]),B=function(t){return t.attr("width",N+1).attr("height",Z+1).attr("fill",e.ui.color.primary.value).attr("stroke",e.ui.color.primary.value).attr("stroke-width",1).attr("x",D-N-1-e.ui.padding).attr("y",e.ui.padding)},F.enter().append("rect").attr("class","d3plus_timeline_play").attr("shape-rendering","crispEdges").attr("opacity",0).call(B),F.transition().duration(e.draw.timing).call(B),F.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),S=e.g.timeline.selectAll("text.d3plus_timeline_playIcon").data(U&&e.timeline.play.value?[0]:[]),T=function(t,r){var n;return r=e.timeline.play[r],a("font-awesome")?(r=r.awesome,n="FontAwesome"):(r=r.fallback,n="inherit"),t.style("font-family",n).text(r)},C=function(t){var r;return r=Z/2+e.ui.padding+1,t.attr("fill",c(e.ui.color.primary.value)).attr("stroke","none").attr(H).attr("x",D-(N-1)/2-e.ui.padding).attr("y",r).attr("dy","0.5ex").call(T,s?"pause":"icon")},S.enter().append("text").attr("class","d3plus_timeline_playIcon").call(C).style("pointer-events","none").attr("opacity",0),S.call(C).transition().duration(e.draw.timing).attr("opacity",1),S.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),q=function(){return j-O==oe.length-$?(F.on(i.hover,null).on(i.click,null).transition().duration(e.draw.timing).attr("opacity",.3),S.transition().duration(e.draw.timing).attr("opacity",.3)):(F.on(i.over,function(){return d3.select(this).style("cursor","pointer")}).on(i.out,function(){return d3.select(this).style("cursor","auto")}).on(i.click,function(){return s?V():(S.call(T,"pause"),j===oe.length?(j-=O,O=0):(O++,j++),P(),s=setInterval(function(){return j===oe.length-$?V():(O++,j++,P())},e.timeline.play.timing.value))}).transition().duration(e.draw.timing).attr("opacity",1),S.transition().duration(e.draw.timing).attr("opacity",1))},q(),Y=function(t){var r,n,a;return n=$?t<=p[1]:t<p[1],t>=p[0]&&n?(a=1,r=c(e.ui.color.secondary.value)):(a=.5,r=c(e.ui.color.primary.value)),$&&e.background.value&&"none"!==e.background.value&&(r=d3.rgb(c(e.background.value))),r=d3.rgb(r),"rgba("+r.r+","+r.g+","+r.b+","+a+")"},r=e.g.timeline.selectAll("rect.d3plus_timeline_background").data(["background"]),r.enter().append("rect").attr("class","d3plus_timeline_background").attr("shape-rendering","crispEdges").attr("width",ee+2).attr("height",Z+2).attr("fill",e.ui.color.primary.value).attr("x",D-1).attr("y",e.ui.padding),r.transition().duration(e.draw.timing).attr("width",ee+2).attr("height",Z+2).attr("fill",e.ui.color.primary.value).attr("x",D-1).attr("y",e.ui.padding),J=e.g.timeline.selectAll("g#ticks").data(["ticks"]),J.enter().append("g").attr("id","ticks").attr("transform","translate("+e.width.value/2+","+e.ui.padding+")"),h=e.g.timeline.selectAll("g#brush").data(["brush"]),h.enter().append("g").attr("id","brush"),z=e.g.timeline.selectAll("g#labels").data(["labels"]),z.enter().append("g").attr("id","labels"),L=z.selectAll("text").data(oe,function(e,t){return t}),L.enter().append("text").attr("stroke","none").attr("y",0).attr("dy","0.5ex").attr("x",0),re=d3.time.scale().domain(d3.extent(ie)).rangeRound([0,ee]),L.order().attr(H).text(function(e,t){return te.indexOf(+e)>=0?W(e):""}).attr("opacity",function(t,r){return e.data.time.dataSteps.indexOf(r)>=0?1:.4}).attr("fill",Y).attr("transform",function(t,r){var n,a;return n=D+re(t),$||(n+=k/2),a=Z/2+e.ui.padding+1,$&&(a+=Z/2+ne),"translate("+Math.round(n)+","+Math.round(a)+")"}),L.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),f=d3.svg.brush().x(re).extent(p).on("brush",v).on("brushend",g),G=e.axes.discrete&&e[e.axes.discrete].value===e.time.value?e[e.axes.discrete].ticks.color:e.x.ticks.color,J.attr("transform","translate("+D+","+(e.ui.padding+1)+")").transition().duration(e.draw.timing).call(d3.svg.axis().scale(re).orient("top").ticks(function(){return ie}).tickFormat("").tickSize(-Z).tickPadding(0)).selectAll("line").attr("stroke-width",1).attr("shape-rendering","crispEdges").attr("stroke",function(t){return te.indexOf(+t)>=0?G:o(G,e.background.value,.4,1)}),J.selectAll("path").attr("fill","none"),h.attr("transform","translate("+D+","+(e.ui.padding+1)+")").attr("opacity",1).call(f),L.attr("pointer-events","none"),h.selectAll("rect.background").attr("fill","none").style("visibility","visible").attr("height",Z).attr("shape-rendering","crispEdges").on(i.move,function(){var t;return t=e.timeline.hover.value,["grab","grabbing"].indexOf(t)>=0&&(t=l()+t),d3.select(this).style("cursor",t)}),h.selectAll("rect.extent").attr("opacity",.75).attr("height",Z).attr("fill",e.ui.color.secondary.value).attr("shape-rendering","crispEdges").on(i.move,function(){var t;return t=e.timeline.hover.value,["grab","grabbing"].indexOf(t)>=0&&(t=l()+t),d3.select(this).style("cursor",t)}),e.timeline.handles.value?(x=h.selectAll("g.resize").selectAll("rect.d3plus_handle").data(["d3plus_handle"]),x.enter().insert("rect","rect").attr("class","d3plus_handle"),x.attr("fill",e.timeline.handles.color).attr("transform",function(t){return"translate("+("resize e"===this.parentNode.className.baseVal?-e.timeline.handles.size:0)+",0)"}).attr("width",e.timeline.handles.size).style("visibility","visible").attr("shape-rendering","crispEdges").attr("opacity",e.timeline.handles.opacity),h.selectAll("g.resize").selectAll("rect").attr("height",Z)):h.selectAll("g.resize").remove(),K=e.g.timeline.node().getBBox(),0===e.margin.bottom&&(e.margin.bottom+=e.ui.padding),e.margin.bottom+=K.height+K.y,e.g.timeline.transition().duration(e.draw.timing).attr("transform","translate(0,"+Math.round(e.height.value-e.margin.bottom-e.ui.padding/2)+")"),e.margin.bottom+=e.ui.padding,e.dev.value?u.time("drawing timeline"):void 0}},{"../../../client/css.coffee":32,"../../../client/pointer.coffee":34,"../../../client/prefix.coffee":35,"../../../color/mix.coffee":42,"../../../color/text.coffee":46,"../../../core/console/print.coffee":48,"../../../core/data/time.coffee":58,"../../../font/sizes.coffee":100,"../../../util/closest.coffee":204}],246:[function(e,t,r){var n=e("../../../client/pointer.coffee"),a=e("../../../core/fetch/value.coffee"),i=e("../../../core/console/print.coffee"),o=e("../../../client/rtl.coffee"),s=e("../../../textwrap/textwrap.coffee");t.exports=function(e){function t(t){t.attr("font-size",function(e){return e.style.font.size}).attr("fill",function(t){return t.link?e.links.font.color:t.style.font.color}).attr("font-family",function(t){return t.link?e.links.font.family.value:t.style.font.family.value}).attr("font-weight",function(t){return t.link?e.links.font.weight:t.style.font.weight}).style("text-decoration",function(t){return t.link?e.links.font.decoration.value:t.style.font.decoration.value}).style("text-transform",function(t){return t.link?e.links.font.transform.value:t.style.font.transform.value})}function r(e){var t=e.style.font.align;return"center"==t?"middle":"left"==t&&!o||"right"==t&&o?"start":"left"==t&&o||"right"==t&&!o?"end":t}var l=e.size.value?e.size.value:"number"===e.color.type&&e.color.value;if(e.data.viz&&e.title.total.value&&!e.small)if(l){e.dev.value&&i.time("calculating total value");var u=e.data.pool;e.focus.value.length&&(u=e.data.viz.filter(function(t){return t[e.id.value]==e.focus.value[0]}));var c,d=e.aggs.value[l]||"sum";if(d.constructor===Function?c=d(u):(u=u.reduce(function(t,r){var n=a(e,r,l);return n instanceof Array?t=t.concat(n):t.push(n),t},[]),c=d3[d](u)),0!==c&&null!==c&&void 0!==c||(c=!1),"number"==typeof c){var f="";if(e.data.mute.length||e.data.solo.length||e.focus.value.length){var p=d3.sum(e.data.value,function(t){if(e.time.solo.value.length>0)var r=e.time.solo.value.indexOf(a(e,t,e.time.value))>=0;else if(e.time.mute.value.length>0)var r=e.time.solo.value.indexOf(a(e,t,e.time.value))<0;else var r=!0;if(r)return a(e,t,l)});if(p>c){var f=c/p*100,h=e.format.value(p,{key:e.size.value,vars:e});f=" ("+e.format.value(f,{key:"share",vars:e})+" "+e.format.locale.value.dev.of+" "+h+")"}}c=e.format.value(c,{key:e.size.value,vars:e});var v=e.title.total.value,g=v.prefix||e.format.value(e.format.locale.value.ui.total)+": ";c=g+c,v.suffix&&(c+=v.suffix),c+=f}e.dev.value&&i.timeEnd("calculating total value")}else var c=!1;else var c=!1;var m=[];if(e.footer.value&&m.push({link:e.footer.link,style:e.footer,type:"footer",value:e.footer.value}),!e.small){if(e.title.value){var y=e.title.value;"function"==typeof y&&(y=y(e.self)),m.push({link:e.title.link,style:e.title,type:"title",value:y})}if(e.title.sub.value){var y=e.title.sub.value;"function"==typeof y&&(y=y(e.self)),m.push({link:e.title.sub.link,style:e.title.sub,type:"sub",value:y})}e.title.total.value&&c&&m.push({link:e.title.total.link,style:e.title.total,type:"total",value:c})}e.dev.value&&i.time("drawing titles");var x=e.svg.selectAll("g.d3plus_title").data(m,function(e){return e.type}),b=e.title.width||e.width.value-e.margin.left-e.margin.right;x.enter().append("g").attr("class",function(e){return"d3plus_title "+e.type}).attr("opacity",0).append("text").attr("stroke","none").call(t),x.each(function(n){var a=d3.select(this).select("text").call(t),i=r(n);s().align(i).container(a).height(e.height.value/2).size(!1).text(n.value).width(b).draw(),n.y=e.margin[n.style.position],e.margin[n.style.position]+=this.getBBox().height+2*n.style.padding}).on(n.over,function(t){t.link&&d3.select(this).transition().duration(e.timing.mouseevents).style("cursor","pointer").select("text").attr("fill",e.links.hover.color).attr("font-family",e.links.hover.family.value).attr("font-weight",e.links.hover.weight).style("text-decoration",e.links.hover.decoration.value).style("text-transform",e.links.hover.transform.value)}).on(n.out,function(r){r.link&&d3.select(this).transition().duration(e.timing.mouseevents).style("cursor","auto").select("text").call(t)}).on(n.click,function(e){if(e.link){var t="/"!=e.link.charAt(0)?"_blank":"_self";window.open(e.link,t)}}).attr("opacity",1).attr("transform",function(t){var n=t.style.position,a="top"==n?0+t.y:e.height.value-t.y;"bottom"==n?a-=this.getBBox().height+t.style.padding:a+=t.style.padding;var i=r(t);if("start"===i)var o=e.margin.left+e.title.padding;else{d3.select(this).select("text").node().getBBox().width;o="middle"===i?e.width.value/2-b/2:e.width.value-b-e.margin.right-e.title.padding}return"translate("+o+","+a+")"}),x.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),e.margin.top>0&&(e.margin.top+=e.title.padding),e.margin.bottom>0&&(e.margin.bottom+=e.title.padding);var w=e.title.height;w&&e.margin[e.title.position]<w&&(e.margin[e.title.position]=w),e.dev.value&&i.timeEnd("drawing titles")}},{"../../../client/pointer.coffee":34,"../../../client/rtl.coffee":36,"../../../core/console/print.coffee":48,"../../../core/fetch/value.coffee":63,"../../../textwrap/textwrap.coffee":198}],247:[function(e,t,r){var n,a;n=e("./labels.coffee"),a=e("./transform.coffee"),t.exports=function(e,t,r){var i,o,s,l,u,c,d,f,p;return t||(t=e.zoom.bounds),"number"!=typeof r&&(r=e.timing.transitions),e.zoom.size={height:t[1][1]-t[0][1],width:t[1][0]-t[0][0]},p=e.types[e.type.value],s=e.coords.fit.value,i="auto"===s||p.requirements.indexOf("coords")<0?d3.max([e.zoom.size.width/e.width.viz,e.zoom.size.height/e.height.viz]):e.zoom.size[s]/e["app_"+s],u=d3.min([e.width.viz,e.height.viz]),c=p.zoom?2*e.coords.padding:0,d=(u-c)/u/i,o=e.zoom.behavior.scaleExtent(),o[0]!==o[1]&&t!==e.zoom.bounds||e.zoom.behavior.scaleExtent([d,16*d]),l=e.zoom.behavior.scaleExtent()[1],d>l&&(d=l),e.zoom.scale=d,f=[e.width.viz/2-e.zoom.size.width*d/2-t[0][0]*d,e.height.viz/2-e.zoom.size.height*d/2-t[0][1]*d],e.zoom.translate=f,e.zoom.behavior.translate(f).scale(d),e.zoom.size={height:e.zoom.bounds[1][1]-e.zoom.bounds[0][1],width:e.zoom.bounds[1][0]-e.zoom.bounds[0][0]},e.zoom.reset=!1,(e.labels.value||e.labels.changed)&&n(e),a(e,r)}},{"./labels.coffee":249,"./transform.coffee":252}],248:[function(e,t,r){t.exports=function(e,t){var r,n,a;return n=t.id.nesting.length-1,r=t.depth.value,a=t.id.nesting[r+1],!1===t.types[t.type.value].nesting?0:(e.d3plus.merged||a in e&&r<n)&&(!e||a in e)?1:!(r===n&&r>0||e&&a&&!(a in e))||!t.small&&t.tooltip.html.value?0:-1}},{}],249:[function(e,t,r){var n;n=e("../../../core/console/print.coffee"),t.exports=function(e){var t,r;if(e.dev.value&&n.time("determining label visibility"),r=e.zoom.behavior.scaleExtent(),t=function(t){return t.attr("opacity",function(t){var n;return t||(t={}),n=parseFloat(d3.select(this).attr("font-size"),10),t.visible=n*(e.zoom.scale/r[1])>=2,t.visible?1:0})},e.draw.timing?e.g.viz.selectAll("text.d3plus_label").transition().duration(e.draw.timing).call(t):e.g.viz.selectAll("text.d3plus_label").call(t),e.dev.value)return n.timeEnd("determining label visibility")}},{"../../../core/console/print.coffee":48}],250:[function(e,t,r){var n,a,i;n=e("./labels.coffee"),a=e("../../../tooltip/remove.coffee"),i=e("./transform.coffee"),t.exports=function(e){var t,r,o,s,l,u,c,d,f,p,h;return r=d3.event.sourceEvent?d3.event.sourceEvent.type:null,l=d3.event.translate,s=d3.event.scale,o=e.zoom.bounds,d=(e.width.viz-e.zoom.size.width*s)/2,c=d>0?d:0,u=d>0?e.width.viz-d:e.width.viz,h=(e.height.viz-e.zoom.size.height*s)/2,p=h>0?h:0,f=h>0?e.height.viz-h:e.height.viz,l[0]+o[0][0]*s>c?l[0]=-o[0][0]*s+c:l[0]+o[1][0]*s<u&&(l[0]=u-o[1][0]*s),l[1]+o[0][1]*s>p?l[1]=-o[0][1]*s+p:l[1]+o[1][1]*s<f&&(l[1]=f-o[1][1]*s),e.zoom.behavior.translate(l).scale(s),e.zoom.translate=l,e.zoom.scale=s,"wheel"===r&&a(e.type.value),
(e.labels.value||e.labels.changed)&&("wheel"===r?(t=e.draw.timing?100:250,clearTimeout(e.zoom.wheel),e.zoom.wheel=setTimeout(function(){return n(e)},t)):n(e)),"dblclick"===r?i(e,e.timing.transitions):i(e,0)}},{"../../../tooltip/remove.coffee":201,"./labels.coffee":249,"./transform.coffee":252}],251:[function(e,t,r){t.exports=function(e,t){var r,n,a,i;n=e.zoom,t||(t=d3.event),i=n.scale>n.behavior.scaleExtent()[0],r=e.types[e.type.value].zoom&&n.value&&n.scroll.value,(a=t.touches&&t.touches.length>1&&r)||i||t.stopPropagation()}},{}],252:[function(e,t,r){t.exports=function(e,t){var r;return"number"!=typeof t&&(t=e.timing.transitions),r="translate("+e.zoom.translate+")",r+="scale("+e.zoom.scale+")",t?e.g.viz.transition().duration(t).attr("transform",r):e.g.viz.attr("transform",r)}},{}],253:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Object,String],deprecates:"active_var",mute:n(!0),solo:n(!0),spotlight:{accepted:[Boolean],deprecates:"spotlight",value:!1},value:!1}},{"../../core/methods/filter.coffee":79}],254:[function(e,t,r){t.exports={accepted:[Object],deprecated:"nesting_aggs",objectAccess:!1,value:{}}},{}],255:[function(e,t,r){var n;n=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Object,String],delimiter:{accepted:String,value:"|"},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},keys:{},process:n,value:!1}},{"../../core/methods/process/data.coffee":85}],256:[function(e,t,r){var n,a;n=e("../../core/methods/process/margin.coffee"),a=e("../../core/methods/rendering.coffee"),t.exports={background:{color:"#fafafa",rendering:a(),stroke:{color:"#ccc",width:1}},margin:{accepted:[Number,Object,String],process:function(e){var t;return void 0===e&&(e=this.value),t=e,n(e,this),t},value:10},mirror:{accepted:[Boolean],deprecates:["mirror_axis","mirror_axes"],value:!1},ticks:{accepted:[Boolean],value:!0}}},{"../../core/methods/process/margin.coffee":88,"../../core/methods/rendering.coffee":90}],257:[function(e,t,r){t.exports={accepted:[String],value:"#ffffff"}},{}],258:[function(e,t,r){t.exports={accepted:[Function,String],value:!1}},{}],259:[function(e,t,r){var n,a;n=e("../../core/methods/filter.coffee"),a=e("../../color/scale.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],deprecates:"color_var",domain:{accepted:[!1,Array],value:!1},focus:"#444444",heatmap:["#282F6B","#419391","#AFD5E8","#EACE3F","#B35C1E","#B22200"],missing:"#eeeeee",mute:n(!0),primary:"#d74b03",range:["#B22200","#FFEE8D","#759143"],scale:{accepted:[Array,Function,"d3plus","category10","category20","category20b","category20c"],process:function(e){return e instanceof Array?d3.scale.ordinal().range(e):"d3plus"===e?a:"string"==typeof e?d3.scale[e]():e},value:"d3plus"},solo:n(!0),secondary:"#e5b3bb",value:!1}},{"../../color/scale.coffee":44,"../../core/methods/filter.coffee":79}],260:[function(e,t,r){t.exports={accepted:[Array,Function,String],index:{accepted:[Boolean],value:!0},process:function(e,t){return"string"==typeof e&&(e=[e]),e},value:!1}},{}],261:[function(e,t,r){arguments[4][106][0].apply(r,arguments)},{dup:106}],262:[function(e,t,r){var n;n=e("../../util/d3selection.coffee"),t.exports={accepted:[!1,Array,Object,String],id:"default",process:function(e,t){return!1!==e&&("default"===t.container.id&&t.self.container({id:"d3plus_"+ +new Date}),n(e)?e.append("div"):e instanceof Array?d3.select(e[0][0]).append("div"):(this.selector=e,d3.select(e).append("div")))},value:!1}},{"../../util/d3selection.coffee":206}],263:[function(e,t,r){var n,a;n=e("../../core/methods/filter.coffee"),a=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],center:[0,0],filetype:{accepted:["json"],value:"json"},fit:{accepted:["auto","height","width"],value:"auto"},key:!1,mute:n(!1),padding:20,process:a,projection:{accepted:["albers","albersUsa","azimuthalEqualArea","azimuthalEquidistant","conicConformal","conicEqualArea","conicEquidistant","equirectangular","gnomonic","mercator","orthographic","stereographic","transverseMercator",Function],value:"mercator"},simplify:{accepted:[Boolean],value:!0},solo:n(!1),threshold:{accepted:[Number],value:.9},value:!1}},{"../../core/methods/filter.coffee":79,"../../core/methods/process/data.coffee":85}],264:[function(e,t,r){var n,a,i;n=e("../../core/fetch/value.coffee"),a=e("../../client/ie.js"),i=e("../../string/strip.js"),t.exports={accepted:[void 0,!0,Array,String],chainable:!1,data:[],process:function(e,t){var r,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R;if(void 0===t.returned)return[];if(e=e||t.cols.value,e instanceof Array?l=e:"string"==typeof e&&(l=[e]),c=[],I=[],t.title.value?(P=t.title.value,"function"==typeof P&&(P=P(t.self)),P=i(P),M=250,P=P.substr(0,M)):P="D3plus Visualization Data",!0===e)for(l=d3.keys(t.data.keys),c.push(l),C=t.data.value,h=0,m=C.length;h<m;h++){for(d=C[h],N=[],v=0,y=l.length;v<y;v++)o=l[v],R=d[o],"string"===t.data.keys[o]&&(R='"'+R+'"'),N.push(R);c.push(N)}else{for(l||(l=[t.id.value],t.time.value&&l.push(t.time.value),t.size.value&&l.push(t.size.value),t.text.value&&l.push(t.text.value)),g=0,x=l.length;g<x;g++)o=l[g],I.push(t.format.value(o));for(c.push(I),B=t.returned.nodes,j=0,b=B.length;j<b;j++)if(E=B[j],null!=E.values&&E.values instanceof Array)for(q=E.values,O=0,w=q.length;O<w;O++){for(R=q[O],N=[],F=0,_=l.length;F<_;F++)s=l[F],R=n(t,R,s),"string"==typeof R&&(R='"'+R+'"'),N.push(R);c.push(N)}else{for(N=[],S=0,k=l.length;S<k;S++)s=l[S],N.push(n(t,E,s));c.push(N)}}for(u="",p=T=0,z=c.length;T<z;p=++T)o=c[p],f=o.join(","),u+=p<c.length?f+"\n":f;return r=new Blob([u],{type:"text/csv;charset=utf-8;"}),a?navigator.msSaveBlob(r,P+".csv"):(A=document.createElement("a"),D=URL.createObjectURL(r),A.setAttribute("href",D),A.setAttribute("download",P+".csv"),A.style="visibility:hidden",document.body.appendChild(A),A.click(),document.body.removeChild(A)),this.data=c,l},value:void 0}},{"../../client/ie.js":33,"../../core/fetch/value.coffee":63,"../../string/strip.js":173}],265:[function(e,t,r){var n;n=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Function,String],cache:{},delimiter:{accepted:[String],value:"|"},donut:{size:.35},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},filters:[],keys:{},mute:[],large:400,opacity:.9,padding:{accepted:[Number],value:1},process:function(e,t){return n(e,t,this)},solo:[],stroke:{width:1},value:!1}},{"../../core/methods/process/data.coffee":85}],266:[function(e,t,r){t.exports={accepted:[Function,Number],value:0}},{}],267:[function(e,t,r){t.exports={accepted:[!1,Function,Object],value:!1}},{}],268:[function(e,t,r){arguments[4][110][0].apply(r,arguments)},{dup:110}],269:[function(e,t,r){var n=e("../../core/console/print.coffee"),a=e("../../string/format.js");t.exports={accepted:[void 0,Function],first:!0,frozen:!1,process:function(e,t){if(!1===this.initialized)return this.initialized=!0,e;if(void 0===e&&"function"==typeof this.value&&(e=this.value),!1===t.container.value){var r=t.format.locale.value.dev.setContainer;n.warning(r,"container")}else if(t.container.value.empty()){var r=t.format.locale.value.dev.noContainer,i=t.container.selector||"";n.warning(a(r,'"'+i+'"'),"container")}else t.dev.value&&n.time("total draw time"),t.container.value.call(t.self);if("function"==typeof e&&t.history.chain.length){var o={};t.history.chain.forEach(function(e){var t=e.method;delete e.method,o[t]=e}),e(o),t.history.chain=[]}return e},update:!0,value:void 0}},{"../../core/console/print.coffee":48,"../../string/format.js":171}],270:[function(e,t,r){var n=e("../../core/methods/process/data.coffee");t.exports={accepted:[!1,Array,Function,String],arrows:{accepted:[Boolean,Number],direction:{accepted:["source","target"],value:"target"},value:!1},color:"#d0d0d0",connections:function(e,t,r){var n=this;if(!n.value)return[];if(!t)var t="id";var a=n.restricted||n.value,i=[];if(!e)return a;var o=a.filter(function(a){var o=!1;return a[n.source][t]==e?(o=!0,r&&i.push(a[n.target])):a[n.target][t]==e&&(o=!0,r&&i.push(a[n.source])),o});return r?i:o},delimiter:{accepted:[String],value:"|"},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},interpolate:{accepted:["basis","cardinal","linear","monotone","step"],value:"basis"},label:!1,large:100,limit:{accepted:[!1,Function,Number],value:!1},opacity:{accepted:[Function,Number,String],min:{accepted:[Number],value:.25},scale:{accepted:[Function],value:d3.scale.linear()},value:1},process:n,size:{accepted:[!1,Number,String],min:1,scale:.5,value:!1},source:"source",strength:{accepted:[!1,Function,Number,String],value:!1},target:"target",value:!1}},{"../../core/methods/process/data.coffee":85}],271:[function(e,t,r){t.exports={accepted:[Boolean,String],value:!1}},{}],272:[function(e,t,r){t.exports={accepted:[!1,Array,Function,Number,String],deprecates:"highlight",process:function(e){return!1===e?[]:e instanceof Array?e:[e]},tooltip:{accepted:[Boolean],value:!0},value:[]}},{}],273:[function(e,t,r){var n,a,i,o;n=e("../../core/methods/font/align.coffee"),a=e("../../core/methods/font/decoration.coffee"),i=e("../../core/methods/font/family.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={align:n(),color:"#444444",decoration:a(),family:i(),secondary:{align:n(),color:"#444444",decoration:a(),family:i(),size:12,spacing:0,transform:o(),weight:200},size:12,spacing:0,transform:o(),weight:200}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],274:[function(e,t,r){var n,a,i;a=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/decoration.coffee"),i=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[!1,Number,String],font:{align:"center",color:"#444",decoration:n(),family:a(),size:11,transform:i(),weight:200},link:!1,padding:0,position:"bottom",value:!1}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],275:[function(e,t,r){var n,a,i,o;n=e("../../number/format.coffee"),a=e("../../core/locale/locale.coffee"),i=e("../../object/merge.coffee"),o=e("../../string/title.coffee"),t.exports={accepted:[Function,String],affixes:{accepted:[Object],objectAccess:!1,value:{}},deprecates:["number_format","text_format"],locale:{accepted:function(){return d3.keys(a)},process:function(e){var t,r;return t="en_US",r=a[t],e!==t&&(r=i(r,a[e])),this.language=e,r},value:"en_US"},number:{accepted:[!1,Function],value:!1},process:function(e,t){if("string"==typeof e)t.self.format({locale:e});else if("function"==typeof e)return e;return this.value},text:{accepted:[!1,Function],value:!1},value:function(e,t){var r,a;return t||(t={}),t.locale||(t.locale=this.locale.value),a=t.vars||{},a.time&&a.time.value&&t.key===a.time.value?(r=e.constructor===Date?e:new Date(e),a.data.time.format(r)):"number"==typeof e?(this.number.value||n)(e,t):"string"==typeof e?(this.text.value||o)(e,t):JSON.stringify(e)}}},{"../../core/locale/locale.coffee":77,"../../number/format.coffee":168,"../../object/merge.coffee":169,"../../string/title.coffee":174}],276:[function(e,t,r){t.exports={accepted:[!1,Number],max:600,secondary:!1,small:200,value:!1}},{}],277:[function(e,t,r){var n,a,i,o,s,l,u,c;n=e("../../../core/methods/font/align.coffee"),a=e("../../../core/methods/font/decoration.coffee"),i=e("../../../core/methods/font/family.coffee"),o=e("../../../core/methods/filter.coffee"),l=e("../../../core/methods/font/position.coffee"),u=e("../../../core/methods/rendering.coffee"),c=e("../../../core/methods/font/transform.coffee"),s={x:"bottom",x2:"top",y:"left",y2:"right"},t.exports=function(e){return{accepted:[Array,Boolean,Function,Object,String],affixes:{accepted:[Boolean],separator:{accepted:[Boolean,Array],value:!0},value:!1},axis:{accepted:[Boolean],color:"#444",font:{color:!1,decoration:a(!1),family:i(""),size:!1,spacing:0,transform:c(!1),weight:!1},rendering:u(),value:!0},dataFilter:!0,deprecates:[e+"axis",e+"axis_val",e+"axis_var"],domain:{accepted:[!1,Array],value:!1},grid:{accepted:[Boolean],color:"#ccc",rendering:u(),value:!0},label:{accepted:[Boolean,String],fetch:function(t){return!0===this.value?t.format.value(t[e].value,{key:e,vars:t}):this.value},font:{color:"#444",decoration:a(),family:i(),size:12,spacing:0,transform:c(),weight:200},padding:3,value:!0},lines:{accept:[!1,Array,Number,Object],dasharray:{accepted:[Array,String],process:function(e){return e instanceof Array&&(e=e.filter(function(e){return!isNaN(e)}),e=e.length?e.join(", "):"none"),e},value:"10, 10"},color:"#888",font:{align:n("right"),color:"#444",background:{accepted:[Boolean],value:!0},decoration:a(),family:i(),padding:{accepted:[Number],value:10},position:l("middle"),size:12,transform:c(),weight:200},process:Array,rendering:u(),width:1,value:[]},mouse:{accept:[Boolean],dasharray:{accepted:[Array,String],process:function(e){return e instanceof Array&&(e=e.filter(function(e){return!isNaN(e)}),e=e.length?e.join(", "):"none"),e},value:"none"},rendering:u(),width:2,value:!0},mute:o(!0),orient:{accepted:["top","right","bottom","left"],value:s[e]},padding:{accepted:[Number],value:.1},persist:{position:{accepted:[Boolean],value:!1},size:{accepted:[Boolean],value:!0}},range:{accepted:[!1,Array],value:!1},scale:{accepted:["linear","log","discrete","share"],deprecates:["layout","unique_axis",e+"axis_scale"],process:function(t,r){var n,a,i,o;for(i=["log","discrete","share"],n=0,a=i.length;n<a;n++)o=i[n],o===t?r.axes[o]=e:r.axes[o]===e&&(r.axes[o]=!1);return"discrete"===t&&(r.axes.opposite=0===e.indexOf("x")?"y":"x"),t},value:"linear"},solo:o(!0),stacked:{accepted:[Boolean],process:function(t,r){return t||r.axes.stacked!==e?t&&(r.axes.stacked=e):r.axes.stacked=!1,t},value:!1},ticks:{accepted:[!1,Array],color:"#ccc",font:{color:"#666",decoration:a(),family:i(),size:10,spacing:0,transform:c(),weight:200},labels:{accepted:[Boolean,Array],value:!0},rendering:u(),size:10,width:1,value:!1},value:!1,zerofill:{accepted:[Boolean],value:!1}}}},{"../../../core/methods/filter.coffee":79,"../../../core/methods/font/align.coffee":80,"../../../core/methods/font/decoration.coffee":81,"../../../core/methods/font/family.coffee":82,"../../../core/methods/font/position.coffee":83,"../../../core/methods/font/transform.coffee":84,"../../../core/methods/rendering.coffee":90}],278:[function(e,t,r){t.exports={accepted:[Boolean],back:function(){if(this.states.length)return this.states.pop()()},chain:[],reset:function(){var e;for(e=[];this.states.length;)e.push(this.states.pop()());return e},states:[],value:!0}},{}],279:[function(e,t,r){var n;n=e("../../core/methods/process/icon.coffee"),t.exports={accepted:[!1,Array,Function,Object,String],back:{accepted:[!1,String],fallback:"❮",opacity:1,process:n,rotate:0,value:"fa-angle-left"},deprecates:"icon_var",style:{accepted:[Object,String],deprecates:"icon_style",value:"default"},value:!1}},{"../../core/methods/process/icon.coffee":87}],280:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,String],dataFilter:!0,deprecates:["id_var","nesting"],grouping:{accepted:[Boolean],value:!0},mute:n(!0),nesting:["id"],solo:n(!0),value:"id"}},{"../../core/methods/filter.coffee":79}],281:[function(e,t,r){var n,a,i;n=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/family.coffee"),i=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Boolean],align:{accepted:["start","middle","end","left","center","right"],process:function(e){var t;return t=["left","center","right"].indexOf(e),t>=0&&(e=this.accepted[t]),e},value:"middle"},color:{accepted:[!1,String],value:!1},font:{decoration:n(),family:a(),size:11,transform:i(),weight:200},padding:7,resize:{accepted:[Boolean],value:!0},text:{accepted:[!1,Function,String],value:!1},segments:2,valign:{accepted:[!1,"top","middle","bottom"],value:"middle"},value:!0}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],282:[function(e,t,r){var n;n=e("../../core/methods/font/family.coffee"),t.exports={accepted:[Boolean],align:"middle",data:{accepted:[Boolean],value:!0},filters:{accepted:[Boolean],value:!1},font:{align:"middle",color:"#444444",family:n(),size:[8,14],weight:200},gradient:{height:10},icons:{accepted:[Boolean],value:!0},labels:{accepted:[Boolean],value:!0},order:{accepted:["color","id","size","text",Function],sort:{accepted:["asc","desc"],value:"asc"},value:"color"},size:[8,30],tooltip:{accepted:[Boolean],value:!0},text:{accepted:[!1,Function,String],value:!1},title:{accepted:[!1,Function,String],value:!1},value:!0}},{"../../core/methods/font/family.coffee":82}],283:[function(e,t,r){var n,a,i;n=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/family.coffee"),i=e("../../core/methods/font/transform.coffee"),t.exports={font:{color:"#444444",decoration:n(),family:a(),transform:i(),weight:200},hover:{color:"#444444",decoration:n(),family:a(),transform:i(),weight:200}}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],284:[function(e,t,r){arguments[4][121][0].apply(r,arguments)},{"../../core/methods/process/margin.coffee":88,dup:121}],285:[function(e,t,r){var n,a,i;n=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/family.coffee"),i=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Boolean,String],background:{accepted:[!1,String],value:!1},branding:{accepted:[Boolean],image:{dark:"http://d3plus.org/assets/img/icon-transparent-invert.png",light:"http://d3plus.org/assets/img/icon-transparent.png"},value:!1},font:{color:"#444",decoration:n(),family:a(),size:16,transform:i(),weight:200},padding:5,style:{accepted:[!1,"small","large"],value:!1},value:!0}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],286:[function(e,t,r){t.exports={accepted:[Boolean],click:{accepted:[Boolean,Function],value:!0},move:{accepted:[Boolean,Function],value:!0},out:{accepted:[Boolean,Function],value:!0},over:{accepted:[Boolean,Function],value:!0},value:!0}},{}],287:[function(e,t,r){var n;n=e("../../core/methods/process/data.coffee"),t.exports={accepted:[!1,Array,Function,String],delimiter:{accepted:[String],value:"|"},filetype:{accepted:[!1,"json","xml","html","csv","dsv","tsv","txt"],value:!1},overlap:.6,process:n,value:!1}},{"../../core/methods/process/data.coffee":85}],288:[function(e,t,r){t.exports={accepted:[Boolean,Function,String],agg:{accepted:[!1,Function,"sum","min","max","mean","median"],value:!1},deprecates:["sort"],sort:{accepted:["asc","desc"],value:"desc"},value:!1}},{}],289:[function(e,t,r){t.exports={accepted:[Boolean],value:!1,timeout:400,process:function(e,t){var r,n;return!!e&&(r=null,n=function(){var e,r,n;if(r=t.container.value.node().parentNode.getBoundingClientRect(),n=r.width,e=r.height,t.self.width(n),t.self.height(e),t.width.changed||t.height.changed)return t.self.draw()},d3.select(window).on("resize."+t.container.id,function(e){return function(t){return clearTimeout(r),r=setTimeout(n,e.timeout)}}(this)),e)}}},{}],290:[function(e,t,r){var n;n=e("../../core/methods/rendering.coffee"),t.exports={accepted:function(e){var t;return t=e.types[e.type.value].shapes,!t||t instanceof Array||(t=[t]),t.length?t:["square"]},interpolate:{accepted:["basis","basis-open","cardinal","cardinal-open","linear","monotone","step","step-before","step-after"],deprecates:"stack_type",value:"linear"},rendering:n(),value:!1}},{"../../core/methods/rendering.coffee":90}],291:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Number,Object,String],dataFilter:!0,deprecates:["value","value_var"],mute:n(!0),scale:{accepted:[Function],deprecates:"size_scale",domain:{min:{accepted:[!1,Number],value:!1},max:{accepted:[!1,Number],value:!1}},range:{max:{accepted:[Function,Number],value:function(e){return Math.floor(d3.max([d3.min([e.width.viz,e.height.viz])/15,6]))}},min:{accepted:[Function,Number],value:3}},value:d3.scale.sqrt()},solo:n(!0),threshold:{accepted:[Boolean,Function,Number],value:!1},value:!1}},{"../../core/methods/filter.coffee":79}],292:[function(e,t,r){t.exports={value:!1}},{}],293:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Object,String],deprecates:["else_var","else"],mute:n(!0),solo:n(!0),value:!1}},{"../../core/methods/filter.coffee":79}],294:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,Boolean,Function,Object,String],deprecates:["name_array","text_var"],nesting:!0,mute:n(!0),solo:n(!0),value:!1}},{"../../core/methods/filter.coffee":79}],295:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[Array,Boolean,Function,Object,String],dataFilter:!0,deprecates:["year","year_var"],fixed:{accepted:[Boolean],deprecates:["static_axis","static_axes"],value:!1},format:{accepted:[!1,Array,Function,String],value:!1},mute:n(!1),solo:n(!1),value:!1}},{"../../core/methods/filter.coffee":79}],296:[function(e,t,r){t.exports={accepted:[Boolean],align:"middle",hover:{accepted:["all-scroll","col-resize","crosshair","default","grab","grabbing","move","pointer"],value:"pointer"},handles:{accepted:[Boolean],color:"#666",opacity:1,size:3,stroke:"#666",value:!0},height:{accepted:[!1,Number],value:!1},play:{accepted:[Boolean],icon:{accepted:[!1,String],awesome:"",fallback:"►"},pause:{accepted:[!1,String],awesome:"",fallback:"❚❚"},timing:{accepted:[Number],value:1500},value:!0},value:!0}},{}],297:[function(e,t,r){t.exports={mouseevents:60,transitions:600,ui:200}},{}],298:[function(e,t,r){var n,a,i,o;n=e("../../core/methods/font/decoration.coffee"),a=e("../../core/methods/font/family.coffee"),o=e("../../core/methods/font/transform.coffee"),i=e("../../string/strip.js"),t.exports={accepted:[!1,Function,String],font:{align:"center",color:"#444444",decoration:n(),family:a(),size:16,transform:o(),weight:400},height:!1,link:!1,padding:2,position:"top",process:function(e,t){var r;return 0===t.container.id.indexOf("default")&&e&&(r=i(e).toLowerCase(),t.self.container({id:r})),e},sub:{accepted:[!1,Function,String],deprecates:"sub_title",font:{align:"center",color:"#444444",decoration:n(),family:a(),size:12,transform:o(),weight:200},link:!1,padding:1,position:"top",value:!1},total:{accepted:[Boolean,Object],deprecates:"total_bar",font:{align:"center",color:"#444444",decoration:n(),family:a(),size:12,transform:o(),weight:200,value:!1},link:!1,padding:1,position:"top",value:!1},width:!1,value:!1}},{"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84,"../../string/strip.js":173}],299:[function(e,t,r){var n,a;n=e("../../core/methods/font/family.coffee"),a=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Boolean,Array,Function,Object,String],anchor:"top center",background:"#ffffff",children:{accepted:[Boolean,Number],value:!0},connections:{accepted:[Boolean],value:!0},curtain:{color:"#ffffff",opacity:.8},deprecates:"tooltip_info",extent:{accepted:[Boolean],value:!0},font:{color:"#444",family:n(),size:12,transform:a(),weight:200},fullscreen:{accepted:[Boolean],value:!1},html:{accepted:[!1,Function,Object,String],deprecates:"click_function",value:!1},iqr:{accepted:[Boolean],value:!0},large:250,share:{accepted:[Boolean],value:!0},size:{accepted:[Boolean],value:!0},small:225,stacked:{accepted:[Boolean],value:!1},sub:{accepted:[!1,Function,String],value:!1},value:!0}},{"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],300:[function(e,t,r){var n;n=e("../../core/methods/filter.coffee"),t.exports={accepted:[!1,Function,Object,String],deprecates:["total_var"],mute:n(!0),solo:n(!0),value:!1}},{"../../core/methods/filter.coffee":79}],301:[function(e,t,r){t.exports={accepted:function(e){return d3.keys(e.types)},mode:{accepted:function(e){return e.types[e.type.value].modes||[!1]},value:!1},value:"tree_map"}},{}],302:[function(e,t,r){var n,a,i,o;i=e("../../core/methods/font/family.coffee"),n=e("../../core/methods/font/align.coffee"),a=e("../../core/methods/font/decoration.coffee"),o=e("../../core/methods/font/transform.coffee"),t.exports={accepted:[Array,Boolean],align:n("center"),border:1,color:{primary:{process:function(e,t){var r;return r=this.value,t.ui.color.secondary.value||(t.ui.color.secondary.value=d3.rgb(r).darker(.75).toString()),e},value:"#ffffff"},secondary:{value:!1}},display:{acceped:["block","inline-block"],value:"inline-block"},font:{align:"center",color:"#444",decoration:a(),family:i(),size:11,transform:o(),weight:200},margin:5,padding:5,position:{accepted:["top","right","bottom","left"],value:"bottom"},value:!1}},{"../../core/methods/font/align.coffee":80,"../../core/methods/font/decoration.coffee":81,"../../core/methods/font/family.coffee":82,"../../core/methods/font/transform.coffee":84}],303:[function(e,t,r){t.exports={accepted:[!1,Number],secondary:!1,small:200,value:!1}},{}],304:[function(e,t,r){t.exports={accepted:[Boolean],behavior:d3.behavior.zoom().scaleExtent([1,1]).duration(0),click:{accepted:[Boolean],value:!0},pan:{accepted:[Boolean],value:!0},scroll:{accepted:[Boolean],deprecates:"scroll_zoom",value:!0},value:!0}},{}],305:[function(e,t,r){var n,a,i,o,s,l,u;e("../../util/closest.coffee"),a=e("../../core/fetch/value.coffee"),i=e("./helpers/graph/draw.coffee"),o=e("./helpers/graph/nest.coffee"),s=e("../../array/sort.coffee"),l=e("./helpers/graph/stack.coffee"),u=e("../../core/data/threshold.js"),n=function(e){var t,r,n,o,u,c,d,f,p,h,v;if(i(e,{buffer:e.axes.opposite,zero:!0}),o=e.x.domain.viz.concat(e.y.domain.viz),o.indexOf(void 0)>=0)return[];for(r=s(e.data.viz,null,null,null,e),n=e[e.axes.discrete],p=e[e.axes.opposite],u=0,d=r.length;u<d;u++)for(h=r[u],h.d3plus||(h.d3plus={}),v=h.values,c=0,f=v.length;c<f;c++)t=v[c],t.d3plus||(t.d3plus={}),t.d3plus.x=n.scale.viz(a(e,t,n.value)),t.d3plus.x+=e.axes.margin.viz.left,t.d3plus.y=p.scale.viz(a(e,t,p.value)),t.d3plus.y+=e.axes.margin.viz.top,t.d3plus.merged instanceof Array&&(h.d3plus.merged||(h.d3plus.merged=[]),h.d3plus.merged=h.d3plus.merged.concat(t.d3plus.merged)),t.d3plus.text&&!h.d3plus.text&&(h.d3plus.text=t.d3plus.text);return l(e,r)},n.filter=function(e,t){return o(e,u(e,t,e[e.axes.discrete].value))},n.requirements=["data","x","y"],n.setup=function(e){var t,r,n;return e.axes.discrete||(t=e.time.value===e.y.value?"y":"x",e.self[t]({scale:"discrete"})),e[e.axes.discrete].zerofill.value||e.self[e.axes.discrete]({zerofill:!0}),e[e.axes.opposite].stacked.value||"stacked"!==e.type.value||e.self[e.axes.opposite]({stacked:!0}),n=e[e.axes.opposite],r=e.size,!n.value&&r.value||r.changed&&r.previous===n.value?e.self[e.axes.opposite](r.value):!r.value&&n.value||n.changed&&n.previous===r.value?e.self.size(n.value):void 0},n.shapes=["area"],n.threshold=function(e){return 20/e.height.viz},n.tooltip="static",t.exports=n},{"../../array/sort.coffee":30,"../../core/data/threshold.js":57,"../../core/fetch/value.coffee":63,"../../util/closest.coffee":204,"./helpers/graph/draw.coffee":312,"./helpers/graph/nest.coffee":318,"./helpers/graph/stack.coffee":319}],306:[function(e,t,r){var n,a,i,o,s,l,u,c=[].indexOf||function(e){for(var t=0,r=this.length;t<r;t++)if(t in this&&this[t]===e)return t;return-1};a=e("../../util/buckets.coffee"),i=e("../../core/fetch/value.coffee"),o=e("./helpers/graph/draw.coffee"),s=e("./helpers/graph/nest.coffee"),l=e("./helpers/graph/stack.coffee"),u=e("../../util/uniques.coffee"),n=function(e){var t,r,n,s,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G;if(f=e.axes.discrete,g="x"===f?"height":"width",Y="x"===f?"width":"height",N=e.axes.opposite,n="x"===f?"left":"top",S="x"===f?"top":"left",o(e,{buffer:!0,zero:N}),v=e.x.domain.viz.concat(e.y.domain.viz),v.indexOf(void 0)>=0)return[];if(E=e.data.viz,e.axes.stacked)for(x=0,_=E.length;x<_;x++)D=E[x],l(e,D.values);for(U=e.axes[Y]/e[e.axes.discrete].ticks.values.length,I=e[e.axes.discrete].padding.value,I<1&&(I*=U),2*I>U&&(I=.1*U),M=U-2*I,e.axes.stacked||(e[f].persist.position.value?(R=e[f].value,h=c.call(e.id.nesting,R)>=0?d3.max(E,function(e){return e.values.length}):u(E,e.id.value,i,e).length,M/=h,T=U/2-M/2-I,H=d3.scale.ordinal(),1===h?H.domain([0]).range([0]):H.domain([0,h-1]).range([-T,T])):H=d3.scale.linear()),d=[],B=e[N],C=B.scale.viz.domain().slice(),0===N.indexOf("y")&&(C=C.reverse()),C[0]<=0&&C[1]>=0?G=0:C[0]<0?G(d3.max(C)):G=d3.min(C),e[f].persist.position.value&&!e.axes.stacked&&(y=u(d3.merge(E.map(function(e){return e.values})),e.id.value,i,e,e.id.value,!1),H.domain(y),1===y.length?H.range([0]):H.range(a(H.range(),y.length))),j=d3.max(E,function(e){return e.values.length}),b=0,k=E.length;b<k;b++)for(P=E[b],e.axes.stacked?(t=1,F=M):e[f].persist.position.value?(t=h,F=M):(t=P.values.length,e[f].persist.size.value?(F=M/j,T=U/2-F/2*(j-t)-F/2-I):(F=M/t,T=U/2-F/2-I),H.domain([0,t-1]),H.range([-T,T])),V=P.values,m=w=0,z=V.length;w<z;m=++w){if(s=V[m],B=e[N],O=e.axes.stacked?0:H(e[f].persist.position.value?i(e,s,e.id.value):m%t),e.axes.stacked)L=s.d3plus[N],r=s.d3plus[N+"0"];else{if(q=i(e,s,B.value),null===q&&(B=e[N+"2"],q=i(e,s,B.value)),0===q)continue;"log"===B.scale.value&&(G=q<0?-1:1),L=B.scale.viz(q),r=B.scale.viz(G)}p=i(e,s,e[f].value),s.d3plus[f]=e[f].scale.viz(p),s.d3plus[f]+=e.axes.margin.viz[n]+O,A=r-L,s.d3plus[N]=r-A/2,e.axes.stacked||(s.d3plus[N]+=e.axes.margin.viz[S]),delete s.d3plus.r,s.d3plus[Y]=F,s.d3plus[g]=Math.abs(A),s.d3plus.init={},s.d3plus.init[N]=B.scale.viz(G),s.d3plus.init[N]-=s.d3plus[N],s.d3plus.init[N]+=e.axes.margin.viz[S],s.d3plus.init[Y]=s.d3plus[Y],e.text.value?delete s.d3plus.label:s.d3plus.label=!1,d.push(s)}return d},n.filter=function(e,t){return s(e,t,e[e.axes.discrete].value)},n.requirements=["data","x","y"],n.setup=function(e){var t,r,n;return e.axes.discrete||(t=e.time.value===e.y.value?"y":"x",e.self[t]({scale:"discrete"})),n=e[e.axes.opposite],r=e.size,!n.value&&r.value||r.changed&&r.previous===n.value?e.self[e.axes.opposite](r.value):!r.value&&n.value||n.changed&&n.previous===r.value?e.self.size(n.value):void 0},n.shapes=["square"],t.exports=n},{"../../core/fetch/value.coffee":63,"../../util/buckets.coffee":202,"../../util/uniques.coffee":208,"./helpers/graph/draw.coffee":312,"./helpers/graph/nest.coffee":318,"./helpers/graph/stack.coffee":319}],307:[function(e,t,r){var n,a,i,o,s,l;a=e("../../core/fetch/value.coffee"),i=e("./helpers/graph/draw.coffee"),o=e("../../string/format.js"),s=e("../../string/strip.js"),l=e("../../util/uniques.coffee"),n=function(e){var t,r,n,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O;return i(e,{buffer:!0}),u=e.x.domain.viz.concat(e.y.domain.viz),u.indexOf(void 0)>=0?[]:(n=e.axes.discrete,b=e.axes.opposite,r="x"===n?e.axes.margin.viz.left:e.axes.margin.viz.top,x="x"===b?e.axes.margin.viz.left:e.axes.margin.viz.top,c="x"===n?"height":"width",O="x"===n?"width":"height",j=e.axes[O]/e[n].ticks.values.length,A=e.size.value,A="number"==typeof A?A:100,j=d3.min([j-2*e.labels.padding,A]),m=e.type.mode.value,m instanceof Array||(m=[m,m]),v=function(t){var r,n,i;n={};for(r in e.data.keys)i=l(t,r,a,e),n[r]=1===i.length?i[0]:i;return n},y=!1,p=[],d=e.format.value(e.format.locale.value.ui.iqr),f=e.format.value(e.format.locale.value.ui.max),g=e.format.value(e.format.locale.value.ui.min),w=e.format.value(e.format.locale.value.ui.percentile),t=e.format.value(e.format.locale.value.ui.tukey_bottom),M=e.format.value(e.format.locale.value.ui.tukey_top),_=e.format.value(e.format.locale.value.ui.quartile_first),k=e.format.value(e.format.locale.value.ui.quartile_third),h=e.format.value(e.format.locale.value.ui.median),
z=[],d3.nest().key(function(t){return a(e,t,e[n].value)}).rollup(function(i){var u,A,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G,X,J,W,Q,K,Z,$,ee,te,re,ne;for(J=e[b].scale.viz,te=i.map(function(t){return a(e,t,e[b].value)}),te.sort(function(e,t){return e-t}),l(te),B=d3.quantile(te,.25),U=d3.quantile(te,.5),W=d3.quantile(te,.75),Q={},"tukey"===m[1]?(N=B-W,K=W-1.5*N,Z=M):"extent"===m[1]?(K=d3.max(te),Z=f):"number"==typeof m[1]&&(K=d3.quantile(te,(100-m[1])/100),Z=o(w,m[1])),K=d3.min([d3.max(te),K]),e.tooltip.extent.value&&(Q[Z]={key:e[b].value,value:K}),e.tooltip.iqr.value&&(Q[k]={key:e[b].value,value:W},Q[h]={key:e[b].value,value:U},Q[_]={key:e[b].value,value:B}),"tukey"===m[0]?(N=B-W,u=B+1.5*N,A=t):"extent"===m[0]?(u=d3.min(te),A=g):"number"==typeof m[0]&&(u=d3.quantile(te,m[0]/100),Z=o(w,m[0])),u=d3.max([d3.min(te),u]),e.tooltip.extent.value&&(Q[A]={key:e[b].value,value:u}),F=[],E=[],$=[],X=[],q=0,R=i.length;q<R;q++)S=i[q],ee=a(e,S,e[b].value),ee>=B&&ee<=W?F.push(S):ee>=u&&ee<B?E.push(S):ee<=K&&ee>W?$.push(S):X.push(S);for(I=a(e,i[0],e[n].value),re=e[n].scale.viz(I),re+=r,D=e.format.value(I,{key:e[n].value,vars:e}),I.constructor===Date&&(I=I.getTime()),I=s(I),F=v(F),F.d3plus={color:"white",id:"box_"+I,init:{},label:!1,shape:"square",stroke:"#444",text:o(d,D)},F.d3plus[O]=j,F.d3plus.init[O]=j,F.d3plus[c]=Math.abs(J(B)-J(W)),F.d3plus[n]=re,ne=d3.min([J(B),J(W)])+F.d3plus[c]/2,ne+=x,F.d3plus[b]=ne,F.d3plus.tooltip=Q,z.push(F),Y={d3plus:{id:"median_line_"+I,position:"height"===c?"top":"right",shape:"whisker",static:!0}},G=e.format.value(U,{key:e[b].value,vars:e}),D={background:"#fff",names:[G],padding:0,resize:!1,x:0,y:0},T=Math.abs(J(U)-J(B)),C=Math.abs(J(U)-J(W)),H=2*d3.min([T,C]),L=2*e.data.stroke.width+2*e.labels.padding,D["width"===O?"w":"h"]=j-L,D["width"===c?"w":"h"]=H-L,Y.d3plus.label=D,Y.d3plus[O]=j,Y.d3plus[n]=re,Y.d3plus[b]=J(U)+x,z.push(Y),E=v(E),E.d3plus={id:"bottom_whisker_line_"+I,offset:F.d3plus[c]/2,position:"height"===c?"bottom":"left",shape:"whisker",static:!0},"x"===b&&(E.d3plus.offset*=-1),E.d3plus[c]=Math.abs(J(u)-J(B)),E.d3plus[O]=j,E.d3plus[n]=re,E.d3plus[b]=ne,z.push(E),$=v($),$.d3plus={id:"top_whisker_line_"+I,offset:F.d3plus[c]/2,position:"height"===c?"top":"right",shape:"whisker",static:!0},"y"===b&&($.d3plus.offset*=-1),$.d3plus[c]=Math.abs(J(K)-J(W)),$.d3plus[O]=j,$.d3plus[n]=re,$.d3plus[b]=ne,z.push($),P=0,V=X.length;P<V;P++)S=X[P],S.d3plus[n]=re,S.d3plus[b]=J(a(e,S,e.y.value)),S.d3plus[b]+=x,S.d3plus.r=4,S.d3plus.shape=e.shape.value;return y=!X.length&&K-u==0,p.push(U),z=z.concat(X),i}).entries(e.data.viz),y&&1===l(p).length?[]:z)},n.modes=["tukey","extent",Array,Number],n.requirements=["data","x","y"],n.shapes=["circle","check","cross","diamond","square","triangle","triangle_up","triangle_down"],n.setup=function(e){var t;if(!e.axes.discrete)return t=e.time.value===e.y.value?"y":"x",e.self[t]({scale:"discrete"})},t.exports=n},{"../../core/fetch/value.coffee":63,"../../string/format.js":171,"../../string/strip.js":173,"../../util/uniques.coffee":208,"./helpers/graph/draw.coffee":312}],308:[function(e,t,r){var n,a,i,o,s,l,u;n=e("../../array/sort.coffee"),s=e("../../core/fetch/value.coffee"),i=e("../../core/fetch/color.coffee"),o=e("../../core/fetch/text.js"),u=e("../../color/legible.coffee"),l=e("../../core/data/group.coffee"),a=function(e){var t,r,a,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L;if(m=l(e,e.data.viz),m=n(m,null,null,null,e),f=m.length,f<4?(a=f,F=1):(S=e.width.viz/e.height.viz,a=Math.ceil(Math.sqrt(f*S)),F=Math.ceil(Math.sqrt(f/S))),f>0)for(;(F-1)*a>=f;)F--;for(r=e.width.viz/a,t=e.height.viz/F,e.size.value?(I=e.size.scale.domain.min.value,P=e.size.scale.domain.max.value,v="number"==typeof I?I:d3.min(e.data.viz,function(t){return s(e,t,e.size.value,e.id.value,"min")}),h="number"==typeof P?P:d3.max(e.data.viz,function(t){return s(e,t,e.size.value,e.id.value)}),p=[v,h]):p=[0,0],O=5,C=d3.min([r,t])/2-2*O,_=e.labels.value&&!e.small&&C>=40?d3.max([20,d3.min([.25*C,50])]):0,C-=_,B=d3.min([C,e.size.scale.range.min.value]),T=e.size.scale.value.domain(p).rangeRound([B,C]),M=d3.layout.pack().children(function(e){return e.values}).padding(O).radius(function(e){return T(e)}).size([r-2*O,t-2*O-_]).value(function(e){return e.value}),d=[],E=0,y=x=0,k=m.length;x<k;y=++x){for(c=m[y],N=M.nodes(c),R=r*y%e.width.viz,L=t*E,b=0,z=N.length;b<z;b++)q=N[b],q.children?(j={d3plus:{}},j[e.id.value]=q.key):j=q.d3plus,j.d3plus.depth=e.id.grouping.value?q.depth:e.depth.value,j.d3plus.x=q.x,j.d3plus.xOffset=R,j.d3plus.y=q.y,j.d3plus.yOffset=L+_,j.d3plus.r=q.r,d.push(j);(y+1)%a==0&&E++}for(g=C/d3.max(d,function(e){return e.d3plus.r}),D=M.size()[0]/2,U=M.size()[1]/2,w=0,A=d.length;w<A;w++)c=d[w],c.d3plus.x=(c.d3plus.x-D)*g+D+c.d3plus.xOffset,c.d3plus.y=(c.d3plus.y-U)*g+U+c.d3plus.yOffset,c.d3plus.r=c.d3plus.r*g,delete c.d3plus.xOffset,delete c.d3plus.yOffset,c.d3plus.static=c.d3plus.depth<e.depth.value&&e.id.grouping.value,!_||0!==c.d3plus.depth&&!1!==e.id.grouping.value?delete c.d3plus.label:(c.d3plus.text=o(e,c[e.id.value],c.d3plus.depth),V=_>3*e.labels.padding?e.labels.padding:0,c.d3plus.label={x:0,y:-(C+V+_/2),w:2*C,h:_-V,padding:0,resize:!0,color:u(i(e,c,c.d3plus.depth)),force:!0});return d.sort(function(e,t){return e.d3plus.depth-t.d3plus.depth})},a.fill=!0,a.requirements=["data"],a.scale=1.05,a.shapes=["circle","donut"],t.exports=a},{"../../array/sort.coffee":30,"../../color/legible.coffee":40,"../../core/data/group.coffee":53,"../../core/fetch/color.coffee":59,"../../core/fetch/text.js":62,"../../core/fetch/value.coffee":63}],309:[function(e,t,r){var n,a;a=e("../../../core/console/print.coffee"),n=function(e){var t,r;r={circle:"scatter",donut:"scatter",line:"line",square:"scatter",area:"stacked"},t=r[e.shape.value],a.warning('The "chart" visualization type has been deprecated and will be removed in version 2.0. Please use the "'+t+'" visualization type.'),e.self.type(t).draw()},n.shapes=["circle","donut","line","square","area"],t.exports=n},{"../../../core/console/print.coffee":48}],310:[function(e,t,r){var n;n=function(e){var t,r,n,a,i,o;return t=e.coords.value,n=e.coords.key||d3.keys(t.objects)[0],o=topojson.feature(t,t.objects[n]),r=o.features,i=e.coords.solo.value,a=e.coords.mute.value,r=r.filter(function(t){return t[e.id.value]=t.id,i.length?i.indexOf(t.id)>=0:!a.length||a.indexOf(t.id)<0})},n.libs=["topojson"],n.nesting=!1,n.requirements=["coords"],n.scale=1,n.shapes=["coordinates"],n.zoom=!0,t.exports=n},{}],311:[function(e,t,r){var n,a,i;n=e("../../../../core/fetch/color.coffee"),a=e("../../../../color/legible.coffee"),i=e("../../../../core/console/print.coffee"),t.exports=function(e){var t,r,o,s,l,u,c,d,f,p,h,v;for(t=e.axes,c=e.axes.margin.viz,s=t.stacked||!t.ticks.value?[]:e.data.viz,v=2*s.length>e.data.large?0:e.draw.timing,f=function(r,i){return 0===i.indexOf("y")?r.attr("x1",-2).attr("x2",-8).attr("y1",function(e){return e.d3plus.y-c.top}).attr("y2",function(e){return e.d3plus.y-c.top}):r.attr("x1",function(e){return e.d3plus.x-c.left}).attr("x2",function(e){return e.d3plus.x-c.left}).attr("y1",t.height+2).attr("y2",t.height+8),r.style("stroke",function(t){return a(n(e,t))}).style("stroke-width",e.data.stroke.width).attr("shape-rendering",e.shape.rendering.value)},e.dev.value&&i.time("creating axis tick groups"),h=e.group.select("g#d3plus_graph_plane").selectAll("g.d3plus_data_tick").data(s,function(r){var n;return n=t.discrete?"_"+r.d3plus[t.discrete]:"","tick_"+r[e.id.value]+"_"+r.d3plus.depth+n}),h.enter().append("g").attr("class","d3plus_data_tick").attr("opacity",0),e.dev.value&&i.timeEnd("creating axis tick groups"),d=["x","y"],l=0,u=d.length;l<u;l++)r=d[l],e.dev.value&&v&&i.time("creating "+r+" ticks"),o=v&&r!==t.discrete?s:[],p=h.selectAll("line.d3plus_data_"+r).data(o,function(t){return"tick_"+t[e.id.value]+"_"+t.d3plus.depth}),e.dev.value&&v&&i.timeEnd("creating "+r+" ticks"),e.dev.value&&v&&i.time("styling "+r+" ticks"),v>0?p.transition().duration(v).call(f,r):p.call(f,r),p.enter().append("line").attr("class","d3plus_data_"+r).call(f,r),e.dev.value&&v&&i.timeEnd("styling "+r+" ticks");v>0?(h.transition().duration(v).attr("opacity",1),h.exit().transition().duration(v).attr("opacity",0).remove()):(h.attr("opacity",1),h.exit().remove())}},{"../../../../color/legible.coffee":40,"../../../../core/console/print.coffee":48,"../../../../core/fetch/color.coffee":59}],312:[function(e,t,r){var n,a,i,o;n=e("./includes/axes.coffee"),a=e("./includes/svg.coffee"),i=e("./includes/mouse.coffee"),o=e("./includes/plot.coffee"),t.exports=function(e,t){void 0===t&&(t={}),n(e,t),o(e,t),a(e,t),e.mouse.viz=!0===t.mouse&&i}},{"./includes/axes.coffee":313,"./includes/mouse.coffee":315,"./includes/plot.coffee":316,"./includes/svg.coffee":317}],313:[function(e,t,r){var n,a,i,o,s,l,u,c,d,f,p,h;n=e("../../../../../array/sort.coffee"),o=e("./buffer.coffee"),i=e("../../../../../util/buckets.coffee"),l=e("../../../../../core/fetch/data.js"),u=e("../../../../../core/fetch/value.coffee"),f=e("../../../../../core/console/print.coffee"),h=e("../../../../../util/uniques.coffee"),t.exports=function(e,t){var r,n,i,l,v,g,m,y,x,b,w,_;for(i=s(e),!i&&e.axes.dataset||(e.axes.dataset=c(e)),e.axes.scale=!(!t.buffer||!0===t.buffer)&&p(e,t.buffer),r=e.width.viz>e.height.viz?["y","y2","x","x2"]:["x","x2","y","y2"],v=0,m=r.length;v<m;v++)n=r[v],x=0===n.indexOf("x")?"y":"x",w=e.order.changed||e.order.sort.changed||!0===e.order.value&&e[x].changed,e[n].value&&(!e[n].ticks.values||i||w||e[n].value===e.time.value&&e.time.fixed.value)&&(e.dev.value&&f.time("calculating "+n+" axis"),e[n].reset=!0,e[n].ticks.values=!1,n===e.axes.discrete&&e[n].value!==e.time.value&&(e[n].ticks.values=h(e.axes.dataset,e[n].value,u,e)),_=!0===t.zero||0===n.indexOf(t.zero),b=a(e,n,_),0===n.indexOf("y")&&(b=b.reverse()),e[n].scale.viz=d(e,n,b),e[n].domain.viz=b,e.dev.value&&f.timeEnd("calculating "+n+" axis"));if(e.axes.mirror.value&&(l=d3.extent(e.y.domain.viz.concat(e.x.domain.viz)),e.x.domain.viz=l,e.x.scale.viz.domain(l),l=l.slice().reverse(),e.y.domain.viz=l,e.y.scale.viz.domain(l)),t.buffer)for(g=0,y=r.length;g<y;g++)(n=r[g])!==e.axes.discrete&&o(e,n,t.buffer)},s=function(e){var t,r,n,a,i,o,s,l,u,c,d,f,p;if(r=!e.time.fixed.value&&(e.time.solo.changed||e.time.mute.changed),r||(r=e.id.solo.changed||e.id.mute.changed),r)return r;for(n=["data","time","id","depth","type","width","height","x","y","x2","y2"],a=0,l=n.length;a<l;a++)if(o=n[a],e[o].changed){r=!0;break}if(r)return r;for(p=["mute","range","scale","solo","stacked","zerofill"],d=["x","y","x2","y2"],i=0,u=d.length;i<u;i++)for(t=d[i],s=0,c=p.length;s<c;s++)if(f=p[s],e[t][f].changed){r=!0;break}return r},c=function(e){var t,r;return e.time.fixed.value?(r=d3.range(0,e.id.nesting.length),d3.merge(d3.merge([function(){var n,a,i;for(i=[],n=0,a=r.length;n<a;n++)t=r[n],i.push(l(e,"all",t));return i}()]))):e.data.viz},a=function(e,t,r,a){var i,o,s,l,c,d,f,p,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q;if(A=0===t.indexOf("x")?"y":"x",e[t].range.value&&2===e[t].range.value.length)return e[t].range.value.slice();if("share"===e[t].scale.value)return e[t].ticks.values=d3.range(0,1.1,.1),[0,1];if(e[t].stacked.value){for(T=[],j=e.axes.dataset,v=0,x=j.length;v<x;v++)f=j[v],f.values?T=T.concat(f.values):T.push(f);return c=d3.nest().key(function(t){return u(e,t,e[A].value)}).rollup(function(r){var n,a;return a=d3.sum(r,function(r){var n;return n=u(e,r,e[t].value),n>0?n:0}),n=d3.sum(r,function(r){var n;return n=u(e,r,e[t].value),n<0?n:0}),[n,a]}).entries(T),q=d3.merge(c.map(function(e){return e.values})),d3.extent(q)}if(e[t].value===e.time.value)return e.time.solo.value.length?d3.extent(e.time.solo.value).map(function(e){return e.constructor!==Date?(e+="",4===e.length&&parseInt(e)+""===e&&(e+="/01/01"),new Date(e)):e}):d3.extent(e.data.time.ticks);for(q=[],M=e.axes.dataset,g=0,b=M.length;g<b;g++)f=M[g],B=u(e,f,e[t].value),B instanceof Array?q=q.concat(B):q.push(B);if(q=q.filter(function(e){return null!==e}),t===e.axes.discrete){if(S=!0===e.order.value?e[A].value:e.order.value){for(F=e.order.sort.value,i=e.order.agg.value||e.aggs.value[S]||"max",o=typeof i,d=q.reduce(function(e,t){return e[t]=[],e},{}),O=e.axes.dataset,y=0,w=O.length;y<w;y++)if(f=O[y],f.values)for(E=f.values,k=0,_=E.length;k<_;k++)C=E[k],p=u(e,C,e[t].value),d[p].push(u(e,C,S));else p=u(e,f,e[t].value),d[p].push(u(e,f,S));for(m in d)C=d[m],"string"===o?d[m]=d3[i](C):"function"===o&&(d[m]=i(C,S));return d=n(d3.entries(d),"value",F),d=d.reduce(function(e,t){return e.push(t.key),e},[])}return q[0].constructor===String?h(q).sort(function(e,t){return""+e.localeCompare(""+t)}):h(q).sort(function(e,t){return e-t})}return q.sort(function(e,t){return e-t}),"log"===e[t].scale.value&&(0===q[0]&&(q[0]=1),0===q[q.length-1]&&(q[q.length-1]=-1)),r&&(l=q.every(function(e){return e>0}),s=q.every(function(e){return e<0}),(l||s)&&(z=l?1:-1,q.push("log"===e[t].scale.value?z:0))),d3.extent(q)},d=function(e,t,r){var n,a,o,s,l;return a=0===t.indexOf("x")?e.width.viz:e.height.viz,s=e[t].scale.value,["discrete","share"].indexOf(s)>=0&&(s="linear"),l=10,"string"==typeof r[0]?(s="ordinal",n=i([0,a],r.length)):(n=[0,a],"linear"===e[t].scale.value&&(l=Math.floor(a/(4*e[t].ticks.font.size)))),e[t].scale.ticks=l,o=d3.scale[s]().domain(r).range(n),"clamp"in o&&o.clamp(!0),o},p=function(e,t){var r,n,a;return!0===t&&(t="size"),t in e&&(t=e[t].value),a=e.size.scale.range.min.value,"function"==typeof a&&(a=a(e)),n=e.size.scale.range.max.value,"function"==typeof n&&(n=n(e)),!1===t?e.size.scale.value.domain([0,1]).rangeRound([n,n]):"number"==typeof t?e.size.scale.value.domain([0,1]).rangeRound([t,t]):t?(e.dev.value&&f.time("calculating buffer scale"),r=d3.extent(e.axes.dataset,function(r){return u(e,r,t)||0}),r[0]===r[1]&&(a=n),e.dev.value&&f.timeEnd("calculating buffer scale"),e.size.scale.value.domain(r).rangeRound([a,n])):void 0}},{"../../../../../array/sort.coffee":30,"../../../../../core/console/print.coffee":48,"../../../../../core/fetch/data.js":60,"../../../../../core/fetch/value.coffee":63,"../../../../../util/buckets.coffee":202,"../../../../../util/uniques.coffee":208,"./buffer.coffee":314}],314:[function(e,t,r){var n,a;n=e("../../../../../util/buckets.coffee"),a=e("../../../../../util/closest.coffee"),t.exports=function(e,t,r){var i,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N;if("share"!==e[t].scale.value&&!e[t].range.value&&e[t].reset){if(F=e[t].scale.viz.copy(),"clamp"in F&&F.clamp(!1),t===e.axes.discrete){if(h=F.domain(),"string"==typeof h[0]){for(y=h.length;y>=0;)h.splice(y,0,"d3plus_buffer_"+y),y--;return j=F.range(),j=n(d3.extent(j),h.length),e[t].scale.viz.domain(h).range(j)}if(0===t.indexOf("y")&&(h=h.slice().reverse()),1===e[t].ticks.values.length)h=[h[0],h[0]],e[t].value===e.time.value&&1!==e.data.time.ticks.length?(u=a(e.data.time.ticks,h[0]),S=e.data.time.ticks.indexOf(u),S>0?h[0]=e.data.time.ticks[S-1]:(f=e.data.time.ticks[S+1]-u,h[0]=new Date(u.getTime()-f)),S<e.data.time.ticks.length-1?h[1]=e.data.time.ticks[S+1]:(f=u-e.data.time.ticks[S-1],h[1]=new Date(u.getTime()+f))):(h[0]-=1,h[1]+=1);else if(e.axes.scale)p=Math.abs(h[1]-h[0]),o=p/(e[t].ticks.values.length-1),o/=2,M=F.range()[1],k=1.5*e.axes.scale.range()[1],m=F.invert(-k),g=F.invert(M+k),h[0]-o<m?(h[0]=h[0]-o,h[h.length-1]=h[h.length-1]+o):(h=[m,g],0===t.indexOf("y")&&(h=h.reverse()),v=F.domain(),(v=v[1]-v[0])||(h[0]-=1,h[1]+=1));else if(e[t].value===e.time.value)p=Math.abs(h[1]-h[0]),o=p/(e[t].ticks.values.length-1),o/=2,h[0]=h[0]-o,h[1]=h[1]+o;else{for(p=Math.abs(h[1]-h[0]),i=p/2,y=h.length,A=h.slice();y>=0;)d=y?A[y-1]+i:A[y]-i,h.splice(y,0,d),y--;j=F.range(),j=n(d3.extent(j),h.length),e[t].scale.viz.domain(h).range(j)}return 0===t.indexOf("y")&&(h=h.reverse()),e[t].scale.viz.domain(h)}if("x"===r&&0===t.indexOf("x")||"y"===r&&0===t.indexOf("y")||!0===r)return h=F.domain(),l=h[0]>=0&&h[1]>=0,s=h[0]<=0&&h[1]<=0,"log"===e[t].scale.value?(N=l?1:-1,l&&0===t.indexOf("y")&&(h=h.slice().reverse()),w=Math.pow(10,parseInt(Math.abs(h[0])).toString().length-1)*N,b=h[0]%w,x=b,b&&x/w<=.1&&(x+=w*N),_=0===b?w:x,h[0]-=_,0===h[0]&&(h[0]=N),B=Math.pow(10,parseInt(Math.abs(h[1])).toString().length-1)*N,C=h[1]%B,T=Math.abs(B-C),C&&T/B<=.1&&(T+=B*N),q=0===C?B:T,h[1]+=q,0===h[1]&&(h[1]=N),l&&0===t.indexOf("y")&&(h=h.reverse())):(N=0,0===t.indexOf("y")&&(h=h.slice().reverse()),E=h.filter(function(e){return e.constructor===String}),o=.05*Math.abs(h[1]-h[0])||1,E.length||(h[0]=h[0]-o,h[1]=h[1]+o,(l&&h[0]<N||s&&h[0]>N)&&(h[0]=N),(l&&h[1]<N||s&&h[1]>N)&&(h[1]=N)),0===t.indexOf("y")&&(h=h.reverse())),e[t].scale.viz.domain(h);if(e.axes.scale)return c=!1,e.axes.mirror.value&&(z=0===t.indexOf("y")?"x":"y",c=e[z].scale.viz,O=e.width.viz>e.height.viz?"x":"y"),t===O&&c?h=c.domain().slice().reverse():(M=F.range()[1],k=e.axes.scale.range()[1],m=F.invert(1.5*-k),g=F.invert(M+1.5*k),h=[m,g],0===t.indexOf("y")&&(h=h.reverse()),v=F.domain(),v=v[1]-v[0],v||(h[0]-=1,h[1]+=1),0===t.indexOf("y")&&(h=h.reverse())),e[t].scale.viz.domain(h)}}},{"../../../../../util/buckets.coffee":202,"../../../../../util/closest.coffee":204}],315:[function(e,t,r){var n,a,i,o,s;e("../../../../../util/copy.coffee"),n=e("../../../../../client/pointer.coffee"),a=e("../../../../../core/fetch/color.coffee"),i=e("../../../../../core/fetch/value.coffee"),o=e("../../../../../color/legible.coffee"),s=e("../../../../../color/text.coffee"),t.exports=function(e,t){var r,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A;return r=d3.event.type===n.click&&(t.tooltip.value.long||t.tooltip.html.value),u=[n.over,n.move].indexOf(d3.event.type)>=0,z=e.d3plus.x,A=e.d3plus.y,m=e.d3plus.r||0,b=t.types[t.type.value].scale||1,m*=b,c=t.axes,g=t.axes.margin.viz,k=t.draw.timing?t.timing.mouseevents:0,!r&&u?(l=o(a(t,e)),d=["x","y","x2","y2"].filter(function(r){var n;return(n=i(t,e,t[r].value))&&!(n instanceof Array)&&r!==t.axes.stacked&&t[r].mouse.value})):d=[],f=function(e){return e.attr("x1",function(e){return 0===e.indexOf("x")?z:z-m}).attr("y1",function(e){return 0===e.indexOf("y")?A:A+m}).attr("x2",function(e){return 0===e.indexOf("x")?z:z-m}).attr("y2",function(e){return 0===e.indexOf("y")?A:A+m}).attr("opacity",0)},p=function(e){return e.style("stroke",function(e){return"area"===t.shape.value?"white":l}).attr("stroke-dasharray",function(e){return t[e].mouse.dasharray.value}).attr("shape-rendering",function(e){return t[e].mouse.rendering.value}).style("stroke-width",function(e){return t[e].mouse.width})},h=function(r){return r.attr("x1",function(e){return 0===e.indexOf("x")?z:z-m}).attr("y1",function(e){return 0===e.indexOf("y")?A:A+m}).attr("x2",function(r){return 0===r.indexOf("x")?z:e.d3plus.x0?e.d3plus.x0:"y"===r?g.left-t[r].ticks.size:g.left+c.width+t[r].ticks.size}).attr("y2",function(r){return 0===r.indexOf("y")?A:e.d3plus.y0?e.d3plus.y0:"x"===r?c.height+g.top+t[r].ticks.size:g.top-t[r].ticks.size}).style("opacity",1)},v=t.g.labels.selectAll("line.d3plus_mouse_axis_label").data(d),k?(v.enter().append("line").attr("class","d3plus_mouse_axis_label").attr("pointer-events","none").call(f).call(p),v.transition().duration(k).call(h).call(p),v.exit().transition().duration(k).call(f).remove()):(v.call(h).call(p),v.enter().append("line").attr("class","d3plus_mouse_axis_label").attr("pointer-events","none").call(f).call(p),v.exit().remove()),w=function(r){return r.attr("font-size",function(e){return t[e].ticks.font.size+"px"}).attr("font-family",function(e){return t[e].ticks.font.family.value}).attr("font-weight",function(e){return t[e].ticks.font.weight}).attr("x",function(e){return 0===e.indexOf("x")?z:"y"===e?g.left-5-t[e].ticks.size:g.left+c.width+5+t[e].ticks.size}).attr("y",function(r){return 0===r.indexOf("y")?A:e.d3plus.y0?e.d3plus.y+(e.d3plus.y0-e.d3plus.y)/2+g.top-6:"x"===r?c.height+g.top+5+t[r].ticks.size:g.top-5-t[r].ticks.size-1.35*t[r].ticks.font.size}).attr("fill","area"===t.shape.value?"white":s(l))},_=t.g.labels.selectAll("text.d3plus_mouse_axis_label").data(d),_.enter().append("text").attr("class","d3plus_mouse_axis_label").attr("id",function(e){return e+"_d3plusmouseaxislabel"}).attr("dy",function(e){return 0===e.indexOf("y")?.35*t[e].ticks.font.size:t[e].ticks.font.size}).style("text-anchor",function(e){return"y"===e?"end":"y2"===e?"start":"middle"}).attr("opacity",0).attr("pointer-events","none").call(w),_.text(function(r){var n,a;return n=t.axes.stacked||r,a=i(t,e,t[n].value),t.format.value(a,{key:t[n].value,vars:t,labels:t[n].affixes.value})}),k?(_.transition().duration(k).delay(k).attr("opacity",1).call(w),_.exit().transition().duration(k).attr("opacity",0).remove()):(_.attr("opacity",1).call(w),_.exit().remove()),y=function(r){var n;return n=function(e){var t;return t=d3.select("text#"+e+"_d3plusmouseaxislabel"),t.size()?t.node().getBBox():{width:0,height:0}},r.attr("x",function(e){var r;return r=n(e).width,0===e.indexOf("x")?z-r/2-5:"y"===e?g.left-t[e].ticks.size-r-10:g.left+c.width+t[e].ticks.size}).attr("y",function(r){var a;return a=n(r).height,0===r.indexOf("y")?A-(a/2+5):e.d3plus.y0?e.d3plus.y+(e.d3plus.y0-e.d3plus.y)/2+g.top-(a/2+5):"x"===r?c.height+g.top+t[r].ticks.size:g.top-t[r].ticks.size-a-10}).attr("width",function(e){return n(e).width+10}).attr("height",function(e){return n(e).height+10}).style("stroke","area"===t.shape.value?"transparent":l).attr("fill",l).attr("shape-rendering",function(e){return t[e].mouse.rendering.value}).style("stroke-width",function(e){return t[e].mouse.width})},x=t.g.labels.selectAll("rect.d3plus_mouse_axis_label").data(d),k?(x.enter().insert("rect","text.d3plus_mouse_axis_label").attr("class","d3plus_mouse_axis_label").attr("pointer-events","none").attr("opacity",0).call(y),x.transition().duration(k).delay(k).attr("opacity",1).call(y),x.exit().transition().duration(k).attr("opacity",0).remove()):(x.attr("opacity",1).call(y),x.enter().insert("rect","text.d3plus_mouse_axis_label").attr("class","d3plus_mouse_axis_label").attr("pointer-events","none").call(y),x.exit().remove())}},{"../../../../../client/pointer.coffee":34,"../../../../../color/legible.coffee":40,"../../../../../color/text.coffee":46,"../../../../../core/fetch/color.coffee":59,"../../../../../core/fetch/value.coffee":63,"../../../../../util/copy.coffee":205}],316:[function(e,t,r){var n,a,i,o,s,l,u,c,d,f;n=e("../../../../../util/buckets.coffee"),a=e("./buffer.coffee"),o=e("../../../../../core/fetch/value.coffee"),s=e("../../../../../font/sizes.coffee"),d=e("../../../../../textwrap/textwrap.coffee"),f=e("../../../../../core/data/time.coffee"),e("../../../../../util/uniques.coffee"),t.exports=function(e,t){var r,n,s,l,c,d,p,h,v,g,m,y,x,b,w,_,k,z,A,j;for(e.axes.margin.viz={top:e.axes.margin.top,right:e.axes.margin.right,bottom:e.axes.margin.bottom,left:e.axes.margin.left},e.axes.height=e.height.viz,e.axes.width=e.width.viz,r=e.width.viz>e.height.viz?["y","y2","x","x2"]:["x","x2","y","y2"],c=0,h=r.length;c<h;c++)if(n=r[c],e[n].value){if(!1===e[n].ticks.values)if(e[n].value===e.time.value){for(z=e.time.solo.value,z=z.length?z.map(function(e){return e.constructor!==Date&&(e+="",4===e.length&&parseInt(e)+""===e&&(e+="/01/01"),e=new Date(e)),e}):e.data.time.values,l=d3.extent(z),w=e.data.time.stepType,z=[l[0]],k=l[0];k<l[1];)m=new Date(k),k=new Date(m["set"+w](m["get"+w]()+1)),z.push(k);e[n].ticks.values=z}else 1===n.indexOf("2")?(x=e[n.slice(0,1)].scale.viz,b=e[n].scale.viz,z=e[n.slice(0,1)].scale.ticks,e[n].ticks.values=x.ticks(z).map(function(e){return parseFloat(d3.format(".5f")(b.invert(x(e))))})):e[n].ticks.values=e[n].scale.viz.ticks(e[n].scale.ticks);e[n].ticks.values.length||(j=o(e,e.data.viz,e[n].value),j instanceof Array||(j=[j]),e[n].ticks.values=j),y=0===n.indexOf("x")?"y":"x",(1===e[n].ticks.values.length||t.buffer&&t.buffer!==y&&n===e.axes.discrete&&!0===e[n].reset)&&a(e,n,t.buffer),e[n].reset=!1,e[n].value===e.time.value?(s={"font-family":e[n].ticks.font.family.value,"font-weight":e[n].ticks.font.weight,"font-size":e[n].ticks.font.size+"px","text-transform":e[n].ticks.font.transform.value,"letter-spacing":e[n].ticks.font.spacing+"px"},A=f(e,{values:e[n].ticks.values,limit:e.width.viz,style:s}),e[n].ticks.value?e[n].ticks.visible=e[n].ticks.value.map(Number):e[n].ticks.labels.value.constructor===Array?e[n].ticks.visible=e[n].ticks.labels.value.map(Number):e[n].ticks.visible=A.values.map(Number),e[n].ticks.format=A.format):e[n].ticks.value?(e[n].ticks.values=e[n].ticks.value,e[n].ticks.labels.value.constructor===Array?e[n].ticks.visible=e[n].ticks.labels.value:e[n].ticks.visible=e[n].ticks.value):e[n].ticks.labels.value.constructor===Array?e[n].ticks.visible=e[n].ticks.labels.value:"log"===e[n].scale.value?(z=e[n].ticks.values,_=z.filter(function(e){return"1"===Math.abs(e).toString().charAt(0)}),_.length<3?e[n].ticks.visible=z:e[n].ticks.visible=_):e[n].ticks.visible=e[n].ticks.values,e[n].value===e.time.value&&(e[n].ticks.visible=e[n].ticks.visible.map(function(e){return e.constructor===Number&&(""+e).length>4?e:(e+="",4===e.length&&parseInt(e)+""===e&&(e+="/01/01"),new Date(e).getTime())}))}if(e.small)for(e.axes.width-=e.axes.margin.viz.left+e.axes.margin.viz.right,e.axes.height-=e.axes.margin.viz.top+e.axes.margin.viz.bottom,d=0,v=r.length;d<v;d++)n=r[d],e[n].label.height=0;else e.small||u(e);for(p=0,g=r.length;p<g;p++)n=r[p],e[n].axis.svg=i(e,n)},u=function(e){var t,r,a,i,o,u,c,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B;for(b=e.x.scale.viz.domain(),F=e.y.scale.viz.domain(),e.x2.value&&(g=e.x2.scale.viz.domain()),e.y2.value&&(M=e.y2.scale.viz.domain()),f=["y","y2"],r=0,o=f.length;r<o;r++)t=f[r],e[t].value&&(c="y"===t?"left":"right",O={"font-size":e[t].ticks.font.size+"px","font-family":e[t].ticks.font.family.value,"font-weight":e[t].ticks.font.weight,"text-transform":e[t].ticks.font.transform.value,"letter-spacing":e[t].ticks.font.spacing+"px"},B=e[t].ticks.visible,"log"===e[t].scale.value?C=B.map(function(e){return l(e)}):"share"===e[t].scale.value?C=B.map(function(r){return e.format.value(100*r,{key:"share",vars:e,output:t})}):e[t].value===e.time.value?C=B.map(function(r,n){return e[t].ticks.format(new Date(r))}):("string"==typeof B[0]&&(B=e[t].scale.viz.domain().filter(function(e){return 0!==e.indexOf("d3plus_buffer_")})),C=B.map(function(r){return e.format.value(r,{key:e[t].value,vars:e,labels:e[t].affixes.value,output:t})})),e[t].ticks.labels.value?(e[t].ticks.hidden=!1,(E=d3.max(s(C,O),function(e){return e.width}))&&(E=Math.ceil(E+e.labels.padding),e.axes.margin.viz[c]+=E)):e[t].ticks.hidden=!0,S=e[t].label.fetch(e),S?(T={"font-family":e[t].label.font.family.value,"font-weight":e[t].label.font.weight,"font-size":e[t].label.font.size+"px","text-transform":e[t].label.font.transform.value,"letter-spacing":e[t].label.font.spacing+"px"},e[t].label.height=s([S],T)[0].height):e[t].label.height=0,e[t].label.value&&(e.axes.margin.viz[c]+=e[t].label.height,e.axes.margin.viz[c]+=2*e[t].label.padding));for(e.axes.width-=e.axes.margin.viz.left+e.axes.margin.viz.right,e.x.scale.viz.range(n([0,e.axes.width],b.length)),g&&e.x2.scale.viz.range(n([0,e.axes.width],g.length)),p=["x","x2"],a=0,u=p.length;a<u;a++)t=p[a],e[t].value&&(c="x"===t?"bottom":"top",e[t].ticks.labels.value?(e[t].ticks.hidden=!1,m={"font-size":e[t].ticks.font.size+"px","font-family":e[t].ticks.font.family.value,"font-weight":e[t].ticks.font.weight,"text-transform":e[t].ticks.font.transform.value,"letter-spacing":e[t].ticks.font.spacing+"px"},j=e[t].ticks.visible,"log"===e[t].scale.value?A=j.map(function(e){return l(e)}):"share"===e[t].scale.value?A=j.map(function(r){return e.format.value(100*r,{key:"share",vars:e,output:t})}):e[t].value===e.time.value?A=j.map(function(r,n){return e[t].ticks.format(new Date(r))}):("string"==typeof j[0]&&(j=e[t].scale.viz.domain().filter(function(e){return 0!==e.indexOf("d3plus_buffer_")})),A=j.map(function(r){return e.format.value(r,{key:e[t].value,vars:e,labels:e[t].affixes.value,output:t})})),z=s(A,m),x=d3.max(z,function(e){return e.width}),y=d3.max(z,function(e){return e.height}),1===j.length?k=e.axes.width:(k=e[t].scale.viz(j[1])-e[t].scale.viz(j[0]),k=Math.abs(k)),x>k&&A.join("").indexOf(" ")>0?(e[t].ticks.wrap=!0,z=s(A,m,{mod:function(t){return d().container(d3.select(t)).height(e.axes.height/2).width(k).draw()}}),x=d3.max(z,function(e){return e.width}),y=d3.max(z,function(e){return e.height})):e[t].ticks.wrap=!1,e[t].ticks.baseline="auto",x<=k?e[t].ticks.rotate=0:x<e.axes.height/2?(z=s(A,m,{mod:function(t){return d().container(d3.select(t)).width(e.axes.height/2).height(k).draw()}}),y=d3.max(z,function(e){return e.width}),x=d3.max(z,function(e){return e.height}),e[t].ticks.rotate=-90):(x=0,y=0),x&&y||(e[t].ticks.hidden=!0,e[t].ticks.rotate=0),x=Math.ceil(x),y=Math.ceil(y),e[t].ticks.maxHeight=y,e[t].ticks.maxWidth=x,y&&(e.axes.margin.viz[c]+=y+e.labels.padding),i=e[t].ticks.visible[e[t].ticks.visible.length-1],h=e[t].scale.viz(i),(h+=x/2+e.axes.margin.viz.left)>e.width.value&&(v=h-e.width.value+e.axes.margin.viz.right,e.axes.width-=v,e.axes.margin.viz.right+=v)):e[t].ticks.hidden=!0,w=e[t].label.fetch(e),w?(_={"font-family":e[t].label.font.family.value,"font-weight":e[t].label.font.weight,"font-size":e[t].label.font.size+"px","text-transform":e[t].label.font.transform.value,"letter-spacing":e[t].label.font.spacing+"px"},e[t].label.height=s([w],_)[0].height):e[t].label.height=0,e[t].label.value&&(e.axes.margin.viz[c]+=e[t].label.height,e.axes.margin.viz[c]+=2*e[t].label.padding));if(e.axes.height-=e.axes.margin.viz.top+e.axes.margin.viz.bottom,e.x.scale.viz.range(n([0,e.axes.width],b.length)),g&&e.x2.scale.viz.range(n([0,e.axes.width],g.length)),e.y.scale.viz.range(n([0,e.axes.height],F.length)),M)return e.y2.scale.viz.range(n([0,e.axes.height],M.length))},i=function(e,t){return d3.svg.axis().tickSize(e[t].ticks.size).tickPadding(5).orient(e[t].orient.value).scale(e[t].scale.viz).tickValues(e[t].ticks.values).tickFormat(function(r,n){var a,i;return e[t].ticks.hidden?null:(i=e[t].scale.value,a=r.constructor===Date?+r:r,e[t].ticks.visible.indexOf(a)>=0?"share"===i?e.format.value(100*r,{key:"share",vars:e,labels:e[t].affixes.value,output:t}):r.constructor===Date?e[t].ticks.format(r):"log"===i?l(r):e.format.value(r,{key:e[t].value,vars:e,labels:e[t].affixes.value,output:t}):null)})},c="⁰¹²³⁴⁵⁶⁷⁸⁹",l=function(e){var t,r,n;return r=Math.round(Math.log(Math.abs(e))/Math.LN10),n=Math.abs(e).toString().charAt(0),t="10 "+(r+"").split("").map(function(e){return c[e]}).join(""),"1"!==n&&(t=n+" x "+t),e<0?"-"+t:t}},{"../../../../../core/data/time.coffee":58,"../../../../../core/fetch/value.coffee":63,"../../../../../font/sizes.coffee":100,"../../../../../textwrap/textwrap.coffee":198,"../../../../../util/buckets.coffee":202,"../../../../../util/uniques.coffee":208,"./buffer.coffee":314}],317:[function(e,t,r){var n,a,i;n=e("../../../../../color/mix.coffee"),a=e("../../../../../textwrap/textwrap.coffee"),i=e("../../../../../object/validate.coffee"),t.exports=function(e){var t,r,o,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G,X,J,W,Q,K,Z,$,ee,te,re,ne,ae,ie,oe,se,le,ue;if(h=e.x.domain.viz.concat(e.y.domain.viz),h.indexOf(void 0)>=0)return null;for(d={width:e.axes.width,height:e.axes.height,fill:e.axes.background.color,stroke:e.axes.background.stroke.color,"stroke-width":e.axes.background.stroke.width,"shape-rendering":e.axes.background.rendering.value},r={left:"start",center:"middle",right:"end"},s=e.small?[]:[0],ie=function(t,r){return t.attr("x1",function(t){return 0===r.indexOf("x")?e.x.scale.viz(t):0}).attr("x2",function(t){return 0===r.indexOf("x")?e.x.scale.viz(t):e.axes.width}).attr("y1",function(t){return 0===r.indexOf("y")?e.y.scale.viz(t):0}).attr("y2",function(t){return 0===r.indexOf("y")?e.y.scale.viz(t):e.axes.height})},oe=function(t,r,a){var i,o,s;return i=a?e[r].grid.color:e[r].ticks.color,o="log"===e[r].scale.value,s=e[r].ticks.visible||[],t.attr("stroke",function(t){var l;return 0===t?e[r].axis.color:(t.constructor===Date&&(t=+t),l=s.indexOf(t)>=0,
!l||o&&"1"!==Math.abs(t).toString().charAt(0)?a&&"transparent"!==e.axes.background.color?n(i,e.axes.background.color,.4,1):"transparent"!==e.background.value?n(i,e.background.value,.4,1):n(i,"white",.4,1):i)}).attr("stroke-width",e[r].ticks.width).attr("shape-rendering",e[r].ticks.rendering.value)},v=function(t,r,n){var a;return a=0===r?"axis":"ticks",r=e[t][a].font[n],r&&(r.length||"number"==typeof r)?r:e[t].ticks.font[n]},ae=function(t,r){var a;return a="log"===e[r].scale.value,t.attr("font-size",function(e){return v(r,e,"size")+"px"}).attr("stroke","none").attr("fill",function(t){var i;return i=v(r,t,"color"),a&&"1"!==Math.abs(t).toString().charAt(0)?n(i,e.background.value,.4,1):i}).attr("font-family",function(e){return v(r,e,"family").value}).attr("font-weight",function(e){return v(r,e,"weight")}).style("text-transform",function(e){return v(r,e,"transform").value}).style("letter-spacing",function(e){return v(r,e,"spacing")+"px"})},q=function(t,r){var n,a;return n=0===r.indexOf("x")?"height":"width",a=0===r.indexOf("x")?"y":"x",t.attr(a+"1",0).attr(a+"2",e.axes[n]).attr(r+"1",function(e){return e.coords.line}).attr(r+"2",function(e){return e.coords.line}).attr("stroke",function(t){return t.color||e[r].lines.color}).attr("stroke-width",e[r].lines.width).attr("shape-rendering",e[r].lines.rendering.value).attr("stroke-dasharray",e[r].lines.dasharray.value)},T=function(t,n){var a;return a=0===n.indexOf("x")?"y":"x",t.attr(a,function(e){return e.coords.text[a]+"px"}).attr(n,function(e){return e.coords.text[n]+"px"}).attr("dy",e[n].lines.font.position.value).attr("text-anchor",r[e[n].lines.font.align.value]).attr("transform",function(e){return e.transform}).attr("font-size",e[n].lines.font.size+"px").attr("fill",function(t){return t.color||e[n].lines.color}).attr("font-family",e[n].lines.font.family.value).attr("font-weight",e[n].lines.font.weight)},L="translate("+e.axes.margin.viz.left+","+e.axes.margin.viz.top+")",U=e.group.selectAll("g#d3plus_graph_plane").data([0]),U.transition().duration(e.draw.timing).attr("transform",L),U.enter().append("g").attr("id","d3plus_graph_plane").attr("transform",L),c=U.selectAll("rect#d3plus_graph_background").data([0]),c.transition().duration(e.draw.timing).attr(d),c.enter().append("rect").attr("id","d3plus_graph_background").attr("x",0).attr("y",0).attr(d),D=U.selectAll("path#d3plus_graph_mirror").data([0]),D.enter().append("path").attr("id","d3plus_graph_mirror").attr("fill","#000").attr("fill-opacity",.03).attr("stroke-width",1).attr("stroke","#ccc").attr("stroke-dasharray","10,10").attr("opacity",0),D.transition().duration(e.draw.timing).attr("opacity",function(){return e.axes.mirror.value?1:0}).attr("d",function(){var e,t;return t=d.width,e=d.height,"M "+t+" "+e+" L 0 "+e+" L "+t+" 0 Z"}),Z=0!==e.x.ticks.rotate,le=function(t,r){var n,i;return i="x"===r?e.axes.height:0,n=t.attr("transform","translate(0,"+i+")").call(e[r].axis.svg.scale(e[r].scale.viz)).selectAll("g.tick"),n.selectAll("line").attr("y2",function(t){var n;return t.constructor===Date&&(t=+t),n=d3.select(this).attr("y2"),e[r].ticks.visible.indexOf(t)>=0?n:n/2}),n.select("text").style("text-anchor",Z&&"x"===r?"end":Z?"start":"middle").call(ae,r).each(function(t){if(d3.select(this).attr("dy","0px").attr("font-size",function(e){return v(r,e,"size")+"px"}),t.constructor===Date&&(t=+t),!e[r].ticks.hidden&&e[r].ticks.visible.indexOf(t)>=0)return a().container(d3.select(this)).rotate(e[r].ticks.rotate).align(Z?"end":"center").valign(Z?"middle":"x"===r?"top":"bottom").width(e[r].ticks.maxWidth+2).height(e[r].ticks.maxHeight).padding(0).x(-e[r].ticks.maxWidth/2).y("x2"===r?-(e[r].ticks.maxHeight+2*e.labels.padding):0).draw()})},ue=function(t,r){var n,a;return a="y2"===r?e.axes.width:0,n=t.attr("transform","translate("+a+", 0)").call(e[r].axis.svg.scale(e[r].scale.viz)).selectAll("g.tick"),n.selectAll("line").attr("y2",function(t){var r;return t.constructor===Date&&(t=+t),r=d3.select(this).attr("y2"),e.x.ticks.visible.indexOf(t)>=0?r:r/2}),n.select("text").call(ae,r)},J=["x","x2","y","y2"],x=0,A=J.length;x<A;x++)o=J[x],ee=0===o.indexOf("x")?le:ue,H=s.length&&e[o].value?[0]:[],l=U.selectAll("g#d3plus_graph_"+o+"ticks").data(H),l.transition().duration(e.draw.timing).call(ee,o),l.selectAll("line").transition().duration(e.draw.timing).call(oe,o),y=l.enter().append("g").attr("id","d3plus_graph_"+o+"ticks").call(ee,o),y.selectAll("path").attr("fill","none").attr("stroke","none"),y.selectAll("line").call(oe,o),l.exit().transition().duration(e.data.timing).attr("opacity",0).remove();for(z=function(t,r){return t.attr("x",0===r.indexOf("x")?e.width.viz/2:-(e.axes.height/2+e.axes.margin.viz.top)).attr("y","x"===r?e.height.viz-e[r].label.height/2-e[r].label.padding:"y2"===r?e.width.viz-e[r].label.height/2-e[r].label.padding:e[r].label.height/2+e[r].label.padding).attr("transform",0===r.indexOf("y")?"rotate(-90)":null).attr("font-family",e[r].label.font.family.value).attr("font-weight",e[r].label.font.weight).attr("font-size",e[r].label.font.size+"px").attr("fill",e[r].label.font.color).style("text-anchor","middle").attr("dominant-baseline","central").style("text-transform",e[r].label.font.transform.value).style("letter-spacing",e[r].label.font.spacing+"px")},W=["x","y"],b=0,j=W.length;b<j;b++)o=W[b],e[o].grid.value?m=e[o].ticks.value?e[o].ticks.value:e[o].ticks.values:(m=[],V="x"===o?"y":"x",e[o].ticks.values.indexOf(0)>=0&&e[V].axis.value&&(m=[0])),e[o].value===e.time.value&&(m=m.map(function(e){return e+="",4===e.length&&parseInt(e)+""===e&&(e+="/01/01"),new Date(e).getTime()})),g=U.selectAll("g#d3plus_graph_"+o+"grid").data([0]),g.enter().append("g").attr("id","d3plus_graph_"+o+"grid"),N=g.selectAll("line").data(m,function(e,t){return e.constructor===Date?e.getTime():e}),N.transition().duration(e.draw.timing).call(ie,o).call(oe,o,!0),N.enter().append("line").style("opacity",0).call(ie,o).call(oe,o,!0).transition().duration(e.draw.timing).delay(e.draw.timing/2).style("opacity",1),N.exit().transition().duration(e.draw.timing/2).style("opacity",0).remove();for(Q=["x","x2","y","y2"],w=0,M=Q.length;w<M;w++)o=Q[w],e[o].value?(u=e[o].label.fetch(e),k=s&&u&&!e.small?[0]:[],t=e.format.affixes.value[e[o].value],u&&!e[o].affixes.value&&t&&($=e[o].affixes.separator.value,!0===$?$=["[","]"]:!1===$&&($=["",""]),u+=" "+$[0]+t[0]+" "+t[1]+$[1])):(u="",k=[]),_=e.group.selectAll("text#d3plus_graph_"+o+"label").data(k),_.text(u).transition().duration(e.draw.timing).call(z,o),_.enter().append("text").attr("stroke","none").attr("id","d3plus_graph_"+o+"label").text(u).call(z,o),_.exit().transition().duration(e.data.timing).attr("opacity",0).remove();for(K=["x","y","x2","y2"],I=0,O=K.length;I<O;I++)if(o=K[I],e[o].value){for(C=U.selectAll("g#d3plus_graph_"+o+"_userlines").data([0]),C.enter().append("g").attr("id","d3plus_graph_"+o+"_userlines"),p=e[o].scale.viz.domain(),0===o.indexOf("y")&&(p=p.slice().reverse()),te=[],S=[],se=e[o].lines.value||[],R=0,E=se.length;R<E;R++)F=se[R],f=i(F)?F.position:F,(o===e.axes.discrete?p.indexOf(f)>=0:f>=p[0]&&f<=p[1])&&(f=i(F)?F:{position:f},f.coords={line:e[o].scale.viz(f.position)},S.push(f),f.text&&(f.axis=o,f.padding=.5*e[o].lines.font.padding.value,f.align=e[o].lines.font.align.value,Y=e[o].lines.font.position.text,re="middle"===Y?0:2*f.padding,"top"===Y&&(re=-re),0===o.indexOf("x")?(ne="left"===f.align?e.axes.height:"center"===f.align?e.axes.height/2:0,"left"===f.align&&(ne-=2*f.padding),"right"===f.align&&(ne+=2*f.padding)):(ne="left"===f.align?0:"center"===f.align?e.axes.width/2:e.axes.width,"right"===f.align&&(ne-=2*f.padding),"left"===f.align&&(ne+=2*f.padding)),f.coords.text={},f.coords.text[0===o.indexOf("x")?"y":"x"]=ne,f.coords.text[o]=e[o].scale.viz(f.position)+re,f.transform=0===o.indexOf("x")?"rotate(-90,"+f.coords.text.x+","+f.coords.text.y+")":null,te.push(f)));N=C.selectAll("line.d3plus_graph_"+o+"line").data(S,function(e){return e.position}),N.enter().append("line").attr("class","d3plus_graph_"+o+"line").attr("opacity",0).call(q,o),N.transition().duration(e.draw.timing).attr("opacity",1).call(q,o),N.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),P=C.selectAll("text.d3plus_graph_"+o+"line_text").data(te,function(e){return e.position}),P.enter().append("text").attr("class","d3plus_graph_"+o+"line_text").attr("id",function(e){var t;return t=e.position+"",t=t.replace("-","neg"),t=t.replace(".","p"),"d3plus_graph_"+o+"line_text_"+t}).attr("opacity",0).call(T,o),P.text(function(e){return e.text}).transition().duration(e.draw.timing).attr("opacity",1).call(T,o),P.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),X=function(t){var r;return r=function(e){var t;return t=e.position+"",t=t.replace("-","neg"),t=t.replace(".","p"),U.select("text#d3plus_graph_"+e.axis+"line_text_"+t).node().getBBox()},t.attr("x",function(e){return r(e).x-e.padding}).attr("y",function(e){return r(e).y-e.padding}).attr("transform",function(e){return e.transform}).attr("width",function(e){return r(e).width+2*e.padding}).attr("height",function(e){return r(e).height+2*e.padding}).attr("fill","transparent"!==e.axes.background.color?e.axes.background.color:"white")},G=e[o].lines.font.background.value?te:[],B=C.selectAll("rect.d3plus_graph_"+o+"line_rect").data(G,function(e){return e.position}),B.enter().insert("rect","text.d3plus_graph_"+o+"line_text").attr("class","d3plus_graph_"+o+"line_rect").attr("pointer-events","none").attr("opacity",0).call(X),B.transition().delay(e.draw.timing).each("end",function(t){return d3.select(this).transition().duration(e.draw.timing).attr("opacity",1).call(X)}),B.exit().transition().duration(e.draw.timing).attr("opacity",0).remove()}}},{"../../../../../color/mix.coffee":42,"../../../../../object/validate.coffee":170,"../../../../../textwrap/textwrap.coffee":198}],318:[function(e,t,r){var n,a,i;n=e("../../../../core/fetch/value.coffee"),a=e("../../../../string/strip.js"),i=e("../../../../util/uniques.coffee"),t.exports=function(e,t,r){var o,s,l,u,c,d,f;return void 0===r?r=e.id.nesting.slice(0,e.depth.value+1):r.constructor!==Array&&(r=[r]),void 0===s&&(s=[]),t||(t=e.data.viz),o=e[e.axes.discrete],u=e[e.axes.opposite],f=o.value===e.time.value,f?(d=e.data.time.ticks,l=e.time.solo.value.length?"solo":"mute",e.time[l].value.length&&(c=e.time[l].value.slice().map(function(e){return e.constructor!==Date&&(e+="",4===e.length&&parseInt(e)+""===e&&(e+="/01/01"),e=new Date(e)),+e}),d=d.filter(function(e){return"solo"===l?c.indexOf(+e)>=0:c.indexOf(+e)<0}))):d=o.ticks.values?o.ticks.values:i(t,o.value,n,e),d3.nest().key(function(t){var i,o,s,l,u;for(l="nesting",o=0,s=r.length;o<s;o++)i=r[o],u=n(e,t,i),u instanceof Array&&(u=u.join("_")),l+="_"+a(u);return l}).rollup(function(t){var r,a,s,c,p,h,v,g,m,y,x,b;if(r=i(t,o.value,n,e),b=r.length&&r[0].constructor===Date,b&&(r=r.map(Number)),o.zerofill.value)for(a="log"===o.scale.value?u.scale.viz.domain().every(function(e){return e<0})?-1:1:0,s=c=0,h=d.length;c<h;s=++c)if(x=d[s],y=f?+x:x,r.indexOf(y)<0){for(g={d3plus:{}},m=e.id.nesting,p=0,v=m.length;p<v;p++)(l=m[p])in t[0]&&(g[l]=t[0][l]);g[o.value]=x,g[u.value]=0,g[u.value]=a,t.splice(s,0,g)}return"string"==typeof t[0][o.value]?t:t.sort(function(t,r){var a,i,s,l,c;return a=n(e,t,o.value),s=n(e,r,o.value),(c=a-s)?c:(i=n(e,t,u.value),l=n(e,r,u.value),i-l)})}).entries(t)}},{"../../../../core/fetch/value.coffee":63,"../../../../string/strip.js":173,"../../../../util/uniques.coffee":208}],319:[function(e,t,r){var n;n=e("../../../../core/fetch/value.coffee"),t.exports=function(e,t){var r,a,i,o,s,l,u,c,d,f,p,h,v,g,m,y;for(m=e.axes.stacked||e.axes.opposite,a=e[m].scale.viz(0),v=e[m].scale.value,p="x"===m?"y":"x",u="y"===m?e.axes.margin.viz.top:e.axes.margin.viz.left,f="share"===v?"expand":"zero",g=d3.layout.stack().values(function(e){return e.values||[e]}).offset(f).x(function(e){return e.d3plus[p]}).y(function(t){return a-e[m].scale.viz(n(e,t,e[m].value))}).out(function(t,r,i){var o;return o=n(e,t,e[m].value),o<0,"share"===v?(t.d3plus[m+"0"]=(1-r)*a,t.d3plus[m]=t.d3plus[m+"0"]-i*a):(t.d3plus[m+"0"]=a,e.axes.stacked&&(t.d3plus[m+"0"]-=r),t.d3plus[m]=t.d3plus[m+"0"]-i),t.d3plus[m]+=u,t.d3plus[m+"0"]+=u}),h=[],d=[],i=0,s=t.length;i<s;i++)if(r=t[i],(y=n(e,r,e[m].value))instanceof Array){for(c=!0,o=0,l=y.length;o<l;o++)if(y[o]>=0){c=!1;break}c?d.push(r):h.push(r)}else y>=0&&h.push(r),y<0&&d.push(r);return 0===h.length||0===d.length?g(t):(h.length&&(h=g(h)),d.length&&(d=g(d)),h.concat(d))}},{"../../../../core/fetch/value.coffee":63}],320:[function(e,t,r){var n,a,i,o,s,l;n=e("../../core/fetch/value.coffee"),a=e("./helpers/graph/draw.coffee"),o=e("./helpers/graph/nest.coffee"),s=e("../../array/sort.coffee"),l=e("./helpers/graph/stack.coffee"),i=function(e){var t,r,i,o,u,c,d,f,p,h,v;if(a(e,{buffer:e.axes.opposite,mouse:!0}),i=e.x.domain.viz.concat(e.y.domain.viz),i.indexOf(void 0)>=0)return[];for(r=s(e.data.viz,null,null,null,e),o=0,c=r.length;o<c;o++)for(f=r[o],p=f.values,u=0,d=p.length;u<d;u++)t=p[u],h=n(e,t,e.x.value),null!==h?(t.d3plus.x2=!1,t.d3plus.x=e.x.scale.viz(h)):(t.d3plus.x2=!0,t.d3plus.x=e.x2.scale.viz(n(e,t,e.x2.value))),t.d3plus.x+=e.axes.margin.viz.left,v=n(e,t,e.y.value),null!==v?(t.d3plus.y2=!1,t.d3plus.y=e.y.scale.viz(v)):(t.d3plus.y2=!0,t.d3plus.y=e.y2.scale.viz(n(e,t,e.y2.value))),t.d3plus.y+=e.axes.margin.viz.top;return e.axes.stacked?l(e,r):r},i.filter=function(e,t){return o(e,t)},i.requirements=["data","x","y"],i.setup=function(e){var t;e.axes.discrete||(t=e.time.value===e.y.value?"y":"x",e.self[t]({scale:"discrete"}))},i.shapes=["line"],i.tooltip="static",t.exports=i},{"../../array/sort.coffee":30,"../../core/fetch/value.coffee":63,"./helpers/graph/draw.coffee":312,"./helpers/graph/nest.coffee":318,"./helpers/graph/stack.coffee":319}],321:[function(e,t,r){var n=e("../../network/smallestGap.coffee"),a=e("../../core/fetch/value.coffee"),i=function(e){var t=e.nodes.restricted||e.nodes.value,r=e.edges.restricted||e.edges.value||[],i=d3.extent(t,function(e){return e.x}),o=d3.extent(t,function(e){return e.y}),s=[1,1];if("number"==typeof e.size.value?s=[e.size.value,e.size.value]:e.size.value&&(s=d3.extent(t,function(t){var r=a(e,t,e.size.value);return 0===r?null:r})),void 0===s[0]&&(s=[1,1]),"number"==typeof e.size.value)var l=e.size.value,u=e.size.value;else{var l=n(t,{accessor:function(e){return[e.x,e.y]}}),c=l/2;if(l*=e.size.value?e.nodes.overlap:.4,e.edges.arrows.value&&(l*=.5),s[0]===s[1]){var u=c;l=c}else{var d=i[1]+1.1*l-(i[0]-1.1*l),f=o[1]+1.1*l-(o[0]-1.1*l),p=d/f;if(e.width.viz/e.height.viz>p)var h=e.height.viz/f;else var h=e.width.viz/d;var u=.25*l;u*h<2&&(u=2/h)}}var v=e.size.scale.value.domain(s).range([u,l]);e.zoom.bounds=[[i[0]-1.1*l,o[0]-1.1*l],[i[1]+1.1*l,o[1]+1.1*l]];var g=[],m={};return t.forEach(function(t){var r=e.data.viz.filter(function(r){return r[e.id.value]==t[e.id.value]})[0],n=r||{};n[e.id.value]=t[e.id.value],n.d3plus={},n.d3plus.x=t.x,n.d3plus.y=t.y;var i=a(e,n,e.size.value);n.d3plus.r=i?v(i):v.range()[0],m[n[e.id.value]]={x:n.d3plus.x,y:n.d3plus.y,r:n.d3plus.r},g.push(n)}),g.sort(function(e,t){return t.d3plus.r-e.d3plus.r}),r.forEach(function(t,r){t.d3plus&&delete t.d3plus.spline,t[e.edges.source].d3plus={};var n=m[t[e.edges.source][e.id.value]];void 0!==n?(t[e.edges.source].d3plus.r=n.r,t[e.edges.source].d3plus.x=n.x,t[e.edges.source].d3plus.y=n.y):delete t[e.edges.source].d3plus,t[e.edges.target].d3plus={};var a=m[t[e.edges.target][e.id.value]];void 0!==a?(t[e.edges.target].d3plus.r=a.r,t[e.edges.target].d3plus.x=a.x,t[e.edges.target].d3plus.y=a.y):delete t[e.edges.target].d3plus}),{nodes:g,edges:r}};i.nesting=!1,i.requirements=["nodes"],i.scale=1.05,i.shapes=["circle","square","donut"],i.tooltip="static",i.zoom=!0,t.exports=i},{"../../core/fetch/value.coffee":63,"../../network/smallestGap.coffee":166}],322:[function(e,t,r){var n,a,i,o,s=[].indexOf||function(e){for(var t=0,r=this.length;t<r;t++)if(t in this&&this[t]===e)return t;return-1};a=e("../../network/shortestPath.coffee"),n=e("../../core/fetch/value.coffee"),i=e("../../util/uniques.coffee"),o=function(e){var t,r,a,i,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G,X,J,W,Q,K,Z,$,ee,te,re,ne,ae,ie,oe,se,le,ue,ce,de,fe;for(h=[],H={},H[e.focus.value[0]]=0,H[e.focus.value[1]]=0,G={all:[[e.focus.value[0]],[e.focus.value[1]]]},Q=o.paths,Y=m=0,k=Q.length;m<k;Y=++m)for(L=Q[Y],h=h.concat(L.edges),_=e.focus.value[0],G[Y]=[_],K=L.edges,p=y=0,z=K.length;y<z;p=++y)f=K[p],f[e.edges.source]=e.data.viz.filter(function(t){return f[e.edges.source][e.id.value]===t[e.id.value]})[0],f[e.edges.target]=e.data.viz.filter(function(t){return f[e.edges.target][e.id.value]===t[e.id.value]})[0],P=f[e.edges.source][e.id.value]===_?"target":"source",I=f[e.edges[P]][e.id.value],void 0===H[I]&&(H[I]=Y),G[Y].push(I),_=I;ie=0;for(Y in G)if(L=G[Y],"all"!==Y){for(q=0,v=x=0,A=L.length;x<A;v=++x)if(g=L[v],0!==v&&v!==L.length-1&&H[g]===parseFloat(Y)){for(q=1,X=L[v-1],N=L[v+1],J=null,D=null,Z=G.all,u=S=0,j=Z.length;S<j;u=++S)l=Z[u],s.call(l,X)>=0&&(J=u),s.call(l,N)>=0&&(D=u);null!==J&&null===D?J+1===G.all.length-1?G.all.splice(J+1,0,[g]):G.all[J+1].push(g):D-J==1?G.all.splice(D,0,[g]):D-J>1&&G.all[D-1].push(g)}ie+=q}for(ae=Math.floor(e.height.viz/ie),fe=[],v=0;v<ie;)v%2==0?fe.push(v):fe.unshift(v),v++;for(b=e.size.value&&!e.small?30:0,de=d3.scale.ordinal().domain(fe).range(d3.range(ae/2-b,e.height.viz+ae/2-b,(e.height.viz-ae)/(ie-1))),d=G.all.length,c=Math.floor(e.width.viz/d),ue=d3.scale.linear().domain([0,d-1]).rangeRound([c/2,e.width.viz-c/2]),C=5,T=.4*d3.min([c,ae-b]),se=d3.extent(e.data.viz,function(t){return n(e,t,e.size.value)||0}),oe=e.size.scale.value.domain(se).rangeRound([C,T]),$=e.data.viz,B=0,M=$.length;B<M;B++){for(R=$[B],null==R.d3plus&&(R.d3plus={}),ee=G.all,u=V=0,O=ee.length;V<O;u=++V)l=ee[u],te=R[e.id.value],s.call(l,te)>=0&&(R.d3plus.x=ue(u));R.d3plus.y=de(H[R[e.id.value]]),e.size.value?(le=n(e,R,e.size.value),R.d3plus.r=le?oe(le):C):R.d3plus.r=T,R.d3plus.r<.1*c&&!e.small?R.d3plus.label={x:0,y:R.d3plus.r+2*e.labels.padding,w:.6*c,h:b+T-R.d3plus.r,resize:!1}:delete R.d3plus.label}for(re=o.paths,Y=U=0,E=re.length;U<E;Y=++U)for(L=re[Y],_=e.focus.value[0],ne=L.edges,p=W=0,F=ne.length;W<F;p=++W)f=ne[p],P=f[e.edges.source][e.id.value]===_?"target":"source",w="target"===P?"source":"target",I=f[e.edges[P]][e.id.value],H[_]!==H[I]?(f.d3plus={spline:!0},null==(t=f[e.edges.source]).d3plus&&(t.d3plus={}),null==(r=f[e.edges.source].d3plus).edges&&(r.edges={}),null==(a=f[e.edges.target]).d3plus&&(a.d3plus={}),null==(i=f[e.edges.target].d3plus).edges&&(i.edges={}),ce=f[P].d3plus.x-f[w].d3plus.x,f[w].d3plus.edges[f[P][e.id.value]]={angle:Math.PI,radius:c/2},f[P].d3plus.edges[f[w][e.id.value]]={angle:0,radius:c/2,offset:ce-c}):delete f.d3plus,_=I;return{nodes:e.data.viz,edges:h}},o.filter=function(e,t){var r,s,l,u,c,d,f,p,h,v,g,m,y,x,b,w,_,k,z;for(u=e.edges.filtered||e.edges.value,o.paths=a(u,e.focus.value[0],{target:e.focus.value[1],distance:e.edges.size.value||void 0,nodeid:e.id.value,startpoint:e.edges.source,endpoint:e.edges.target,K:e.edges.limit.value||5}),o.nodes=[],r=[],b=o.paths,f=0,v=b.length;f<v;f++)for(x=b[f],w=x.edges,p=0,g=w.length;p<g;p++)l=w[p],k=l[e.edges.source],z=l[e.edges.target],r.indexOf(k[e.id.value])<0&&(o.nodes.push(k),r.push(k[e.id.value])),r.indexOf(z[e.id.value])<0&&(o.nodes.push(z),r.push(z[e.id.value]));for(d=i(o.nodes,e.id.value,n,e),_=[],h=0,m=d.length;h<m;h++)c=d[h],s=t.filter(function(t){return t[e.id.value]===c}),s[0]?_.push(s[0]):(y={d3plus:{}},y[e.id.value]=c,_.push(y));return _},o.nesting=!1,o.requirements=[function(e){return{status:2===e.focus.value.length,text:e.format.locale.value.method.focus+" x 2"}},"edges"],o.scale=1,o.shapes=["circle","square","donut"],o.tooltip="static",t.exports=o},{"../../core/fetch/value.coffee":63,"../../network/shortestPath.coffee":165,"../../util/uniques.coffee":208}],323:[function(e,t,r){var n,a,i,o;n=e("../../array/comparator.coffee"),a=e("../../core/data/threshold.js"),i=e("../../core/data/group.coffee"),o=function(e){var t,r,a,o,s,l,u,c,d;for(u=d3.layout.pie().value(function(e){return e.value}).sort(function(t,r){return e.order.value?n(t.d3plus,r.d3plus,[e.order.value],e.order.sort.value,[],e):e.id.nesting.length>1?n(t.d3plus,r.d3plus,e.id.nesting.concat([e.size.value]),void 0,[],e):n(t.d3plus,r.d3plus,[e.size.value],"desc",[],e)}),r=i(e,e.data.viz,[]),l=u(r),d=[],c=d3.min([e.width.viz,e.height.viz])/2-2*e.labels.padding,a=0,s=l.length;a<s;a++)t=l[a],o=t.data.d3plus,o.d3plus.startAngle=t.startAngle,o.d3plus.endAngle=t.endAngle,o.d3plus.r=c,o.d3plus.x=e.width.viz/2,o.d3plus.y=e.height.viz/2,o.d3plus.share=(t.endAngle-t.startAngle)/(2*Math.PI),d.push(o);return d},o.filter=a,o.requirements=["data","size"],o.shapes=["arc"],o.threshold=function(e){return 1600/(e.width.viz*e.height.viz)},t.exports=o},{"../../array/comparator.coffee":28,"../../core/data/group.coffee":53,"../../core/data/threshold.js":57}],324:[function(e,t,r){var n,a,i,o,s,l,u,c;e("../../array/comparator.coffee"),e("../../array/sort.coffee"),e("../../core/data/threshold.js"),a=e("../../core/fetch/text.js"),i=e("../../core/fetch/value.coffee"),o=e("../../font/sizes.coffee"),s=e("../../geom/offset.coffee"),u=e("../../textwrap/textwrap.coffee"),n=e("../../util/buckets.coffee"),c=e("../../util/uniques.coffee"),l=function(e){var t,r,l,d,f,p,h,v,g,m,y,x,b,w,_,k,z,A,j,M,O,E,F,S,T,C,B,q,N,P,I,D,R,V,U,L,Y,H,G,X,J,W,Q,K,Z,$,ee,te,re,ne,ae,ie,oe,se;for(m=e.data.viz,L=e.depth.value+1,Y=e.id.nesting[L],v=function(){var e,t,r;for(r=[],e=0,t=m.length;e<t;e++)g=m[e],r.push(g[Y]);return r}(),ie=function(){var t,r,n;for(n=[],t=0,r=m.length;t<r;t++)g=m[t],n.push(c(m,Y,i,e,L));return n}(),ie=c(d3.merge(ie)).length,d=2*Math.PI/ie,V=d3.min([e.width.viz,e.height.viz])/2,F=0,C=0,B=function(){var t,r,n;for(n=[],t=0,r=v.length;t<r;t++)p=v[t],n.push(a(e,p,L)[0]);return n}(),B=c(d3.merge(B)),e.labels.value&&(y=s(Math.PI/2,V),ee=s(d+Math.PI/2,V),F=y.x-ee.x-2*e.labels.padding,ne={fill:e.x.ticks.font.color,"font-family":e.x.ticks.font.family.value,"font-weight":e.x.ticks.font.weight,"font-size":e.x.ticks.font.size+"px"},te=o(B,ne,{mod:function(t){return u().container(d3.select(t)).width(e.height.viz/8).height(F).draw()}}),C=d3.max(te,function(e){return e.width}),V-=C,V-=2*e.labels.padding),R=function(){var t,r,n;for(n=[],t=0,r=v.length;t<r;t++)p=v[t],n.push(function(){var t,r,n;for(n=[],t=0,r=p.length;t<r;t++)g=p[t],n.push(i(e,g,e.size.value));return n}());return n}(),R=d3.max(d3.merge(R)),X=d3.scale.linear().domain([0,R]).range([0,V]),k=function(){var t,r,n;for(n=[],t=0,r=v.length;t<r;t++)p=v[t],n.push(i(e,p,Y));return n}(),k=c(d3.merge(k)),_=d3.scale.ordinal().domain(k).range(d3.range(0,k.length)),A=0,q=m.length;A<q;A++)for(g=m[A],g.d3plus.x=e.width.viz/2+e.margin.top,g.d3plus.y=e.height.viz/2+e.margin.left,J=g[Y],w=j=0,N=J.length;j<N;w=++j)t=J[w],t.d3plus||(t.d3plus={}),t.d3plus.r=X(i(e,t,e.size.value)),t.d3plus.a=_(i(e,t,Y))*d;for(z=1,W=[10,5,4,2],D=0,P=W.length;D<P;D++)if(w=W[D],V/w>=20){z=w;break}for(K=n([V/z,V],z-1).reverse(),K.length===z&&K.shift(),$=e.group.selectAll(".d3plus_radar_rings").data(K,function(e,t){return t}),Z=function(t){return t.attr("fill",function(t,r){return 0===r?e.axes.background.color:"transparent"}).attr("cx",e.width.viz/2+e.margin.top).attr("cy",e.height.viz/2+e.margin.left).attr("stroke",e.x.grid.value?e.x.grid.color:"transparent")},$.enter().append("circle").attr("class","d3plus_radar_rings").call(Z).attr("r",0),$.transition().duration(e.draw.timing).call(Z).attr("r",function(e){return e}),$.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),S=d3.scale.ordinal().domain(B).range(d3.range(0,B.length)),O=[],U=0,I=B.length;U<I;U++)M=B[U],r=d*S(M)-Math.PI/2,t=r*(180/Math.PI),t<-90||t>90?(t-=180,f=-(V+2*e.labels.padding+C),l="end"):(f=V+2*e.labels.padding,l="start"),ae=r<0||r>Math.PI,Q=r<Math.PI/2,G=V,e.labels.value&&(G+=e.labels.padding),H=s(r,G),oe=H.x,se=H.y,Q||(oe-=C),ae&&(se-=F),h=[0,Math.PI].indexOf(d*S(M))>=0,h&&(oe-=C/2),O.push({text:M,angle:t,x:f,anchor:l,offset:H});return E=e.group.selectAll("g.d3plus_radar_label_group").data([0]),E.enter().append("g").attr("class","d3plus_radar_label_group").attr("transform","translate("+e.width.viz/2+","+e.height.viz/2+")"),E.transition().duration(e.draw.timing).attr("transform","translate("+e.width.viz/2+","+e.height.viz/2+")"),re=E.selectAll(".d3plus_radar_labels").data(e.labels.value?O:[],function(e,t){return t}),T=function(e){return e.attr(ne).each(function(e,t){return u().container(d3.select(this)).height(F).width(C).align(e.anchor).text(e.text).padding(0).valign("middle").x(e.x).y(-F/2).draw()}).attr("transform",function(e){var t;return t=d3.select(this).attr("transform")||"",t.length&&(t=t.split(")").slice(-3).join(")")),"rotate("+e.angle+")"+t})},re.call(T),re.enter().append("text").attr("class","d3plus_radar_labels").attr("opacity",0).call(T).transition().duration(e.draw.timing).attr("opacity",1),re.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),x=e.group.selectAll(".d3plus_radar_lines").data(O,function(e,t){return t}),b=function(t){return t.attr("stroke",e.x.grid.color).attr("x1",e.width.viz/2+e.margin.left).attr("y1",e.height.viz/2+e.margin.top)},x.enter().append("line").attr("class","d3plus_radar_lines").call(b).attr("x2",e.width.viz/2+e.margin.left).attr("y2",e.height.viz/2+e.margin.top),x.transition().duration(e.draw.timing).call(b).attr("x2",function(t){return e.width.viz/2+e.margin.left+t.offset.x}).attr("y2",function(t){return e.height.viz/2+e.margin.top+t.offset.y}),x.exit().transition().duration(e.draw.timing).attr("opacity",0).remove(),e.mouse.viz={click:!1},m},l.requirements=["data","size"],l.shapes=["radial"],t.exports=l},{"../../array/comparator.coffee":28,"../../array/sort.coffee":30,"../../core/data/threshold.js":57,"../../core/fetch/text.js":62,"../../core/fetch/value.coffee":63,"../../font/sizes.coffee":100,"../../geom/offset.coffee":159,"../../textwrap/textwrap.coffee":198,"../../util/buckets.coffee":202,"../../util/uniques.coffee":208}],325:[function(e,t,r){var n=e("../../array/sort.coffee"),i=e("../../client/pointer.coffee"),o=e("../../core/fetch/value.coffee"),s=e("../../core/fetch/color.coffee"),l=e("../../color/legible.coffee"),u=e("../../tooltip/remove.coffee"),c=e("../../network/smallestGap.coffee"),d=e("../../color/text.coffee"),f=e("../../util/uniques.coffee"),p=function(e){var t=d3.min([e.height.viz,e.width.viz])/2,r=e.small||!e.labels.value?(t-2*e.labels.padding)/2:t/3,p=e.small||!e.labels.value?1.4*r:r,h=2*r,v=[],g=[],m=e.data.viz.filter(function(t){return t[e.id.value]===e.focus.value[0]})[0];m||(m={d3plus:{}},m[e.id.value]=e.focus.value[0]),m.d3plus.x=e.width.viz/2,m.d3plus.y=e.height.viz/2,m.d3plus.r=.65*p;var y=[],x=[e.focus.value[0]];e.edges.connections(e.focus.value[0],e.id.value).forEach(function(t){var r=t[e.edges.source][e.id.value]==e.focus.value[0]?t[e.edges.target]:t[e.edges.source],n=e.data.viz.filter(function(t){return t[e.id.value]===r[e.id.value]})[0];n||(n={d3plus:{}},n[e.id.value]=r[e.id.value]),n.d3plus.edges=e.edges.connections(n[e.id.value],e.id.value).filter(function(t){return t[e.edges.source][e.id.value]!=e.focus.value[0]&&t[e.edges.target][e.id.value]!=e.focus.value[0]}),n.d3plus.edge=t,x.push(n[e.id.value]),y.push(n)});var b=e.order.value||e.color.value||e.size.value||e.id.value;y.sort(function(t,r){var a=t.d3plus.edges.length-r.d3plus.edges.length;return a||n([t,r],b,e.order.sort.value,e.color.value||[],e)}),"number"==typeof e.edges.limit.value?y=y.slice(0,e.edges.limit.value):"function"==typeof e.edges.limit.value&&(y=e.edges.limit.value(y));var w=[],_=0;y.forEach(function(t){var r=t[e.id.value];t.d3plus.edges=t.d3plus.edges.filter(function(t){var n=t[e.edges.source][e.id.value],a=t[e.edges.target][e.id.value];return x.indexOf(n)<0&&a==r||x.indexOf(a)<0&&n==r}),_+=t.d3plus.edges.length||1,t.d3plus.edges.forEach(function(t){var n=t[e.edges.source],a=t[e.edges.target],i=a[e.id.value]==r?n:a;x.push(i[e.id.value])})}),n(y,b,e.order.sort.value,e.color.value||[],e);var k=0,z=2*Math.PI,A=0;y.forEach(function(t,r){var i=t.d3plus.edges.length||1,o=z/_*i;0==r&&(A=s,k-=o/2);var s=k+o/2;s-=z/4,t.d3plus.radians=s,t.d3plus.x=e.width.viz/2+p*Math.cos(s),t.d3plus.y=e.height.viz/2+p*Math.sin(s),k+=o,t.d3plus.edges.sort(function(r,a){var r=r[e.edges.source][e.id.value]==t[e.id.value]?r[e.edges.target]:r[e.edges.source],a=a[e.edges.source][e.id.value]==t[e.id.value]?a[e.edges.target]:a[e.edges.source];return n([r,a],b,e.order.sort.value,e.color.value||[],e)}),t.d3plus.edges.forEach(function(r,n){var o=r[e.edges.source][e.id.value]==t[e.id.value]?r[e.edges.target]:r[e.edges.source],l=z/_,u=e.data.viz.filter(function(t){return t[e.id.value]===o[e.id.value]})[0];u||(u={d3plus:{}},u[e.id.value]=o[e.id.value]),a=s-l*i/2+l/2+l*n,u.d3plus.radians=a,u.d3plus.x=e.width.viz/2+h*Math.cos(a),u.d3plus.y=e.height.viz/2+h*Math.sin(a),w.push(u)})});var j=c(y,{accessor:function(e){return[e.d3plus.x,e.d3plus.y]}}),M=c(w,{accessor:function(e){return[e.d3plus.x,e.d3plus.y]}});if(j||(j=r/2),M||(M=r/4),j/2-4<8)var O=d3.min([j/2,8]);else var O=j/2-4;if(M/2-4<4)var E=d3.min([M/2,4]);else var E=M/2-4;E>r/10&&(E=r/10),E>O&&E>10&&(E=.75*O),O>1.5*E&&(O=1.5*E),O=Math.floor(O),E=Math.floor(E);var F=f(y,e.id.value,o,e);F=F.concat(f(w,e.id.value,o,e)),F.push(e.focus.value[0]);var S=e.data.viz.filter(function(t){return F.indexOf(t[e.id.value])>=0});if(e.size.value){var T=d3.extent(S,function(t){return o(e,t,e.size.value)});T[0]==T[1]&&(T[0]=0);var t=d3.scale.linear().domain(T).rangeRound([3,d3.min([O,E])]),C=o(e,m,e.size.value);m.d3plus.r=t(C)}else{var t=d3.scale.linear().domain([1,2]).rangeRound([O,E]);e.edges.label&&(m.d3plus.r=1.5*t(1))}w.forEach(function(r){r.d3plus.ring=2;var n=e.size.value?o(e,r,e.size.value):2;r.d3plus.r=t(n)}),y.forEach(function(r){r.d3plus.ring=1;var n=e.size.value?o(e,r,e.size.value):1;r.d3plus.r=t(n)}),g=[m].concat(y).concat(w),y.forEach(function(t,n){var a=[e.edges.source,e.edges.target],i=t.d3plus.edge;a.forEach(function(t){i[t]=g.filter(function(r){return r[e.id.value]==i[t][e.id.value]})[0]}),delete i.d3plus,v.push(i),e.edges.connections(t[e.id.value],e.id.value).forEach(function(n){var a=n[e.edges.source][e.id.value]==t[e.id.value]?n[e.edges.target]:n[e.edges.source];if(a[e.id.value]!=m[e.id.value]){var i=w.filter(function(t){return t[e.id.value]==a[e.id.value]})[0];if(i);else{i=y.filter(function(t){return t[e.id.value]==a[e.id.value]})[0]}if(i){n.d3plus={spline:!0,translate:{x:e.width.viz/2,y:e.height.viz/2}};[e.edges.source,e.edges.target].forEach(function(a,o){n[a]=g.filter(function(t){return t[e.id.value]==n[a][e.id.value]})[0],void 0===n[a].d3plus.edges&&(n[a].d3plus.edges={});var s=0===o?n[e.edges.target][e.id.value]:n[e.edges.source][e.id.value];n[a][e.id.value]==t[e.id.value]?n[a].d3plus.edges[s]={angle:t.d3plus.radians+Math.PI,radius:r/2}:n[a].d3plus.edges[s]={angle:i.d3plus.radians,radius:r/2}}),v.push(n)}}})});var B=!1;return e.background.value&&["transparent","none"].indexOf(e.background.value)<0&&d3.hsl(e.background.value).l<.5&&(B=d(e.background.value)),g.forEach(function(t){if(!e.small&&e.labels.value)if(t[e.id.value]!=e.focus.value[0]){t.d3plus.rotate=t.d3plus.radians*(180/Math.PI);var n=t.d3plus.rotate,a=r-3*e.labels.padding-t.d3plus.r;if(n<-90||n>90){n-=180;var i=-(t.d3plus.r+a/2+e.labels.padding),o="end"}else var i=t.d3plus.r+a/2+e.labels.padding,o="start";var u=y.indexOf(t)>=0,c=1==t.d3plus.ring?j:M;t.d3plus.label={x:i,y:0,w:a,h:c,angle:n,anchor:o,valign:"center",color:B||l(s(e,t)),resize:[8,e.labels.font.size],background:u,mouse:!0}}else if(e.size.value||e.edges.label){var c=p-2*t.d3plus.r-2*e.labels.padding;t.d3plus.label={x:0,y:t.d3plus.r+c/2,w:p,h:c,color:B||l(s(e,t)),resize:[10,40],background:!0,mouse:!0}}else delete t.d3plus.rotate,delete t.d3plus.label;else delete t.d3plus.rotate,delete t.d3plus.label}),e.mouse.viz={},e.mouse.viz[i.click]=function(t){if(t[e.id.value]!=e.focus.value[0]){u(e.type.value);var r=e.focus.value[0];e.history.states.push(function(){
e.self.focus(r).draw()}),e.self.focus(t[e.id.value]).draw()}},{edges:v,nodes:g,data:S}};p.filter=function(e,t){var r=e.edges.connections(e.focus.value[0],e.id.value,!0),n=[];r.forEach(function(t){n=n.concat(e.edges.connections(t[e.id.value],e.id.value,!0))});var a=r.concat(n),i=f(a,e.id.value,o,e),s=[];return i.forEach(function(r){var n=t.filter(function(t){return t[e.id.value]==r})[0];if(n)s.push(n);else{var a={d3plus:{}};a[e.id.value]=r,s.push(a)}}),s},p.nesting=!1,p.scale=1,p.shapes=["circle","square","donut"],p.requirements=["edges","focus"],p.tooltip="static",t.exports=p},{"../../array/sort.coffee":30,"../../client/pointer.coffee":34,"../../color/legible.coffee":40,"../../color/text.coffee":46,"../../core/fetch/color.coffee":59,"../../core/fetch/value.coffee":63,"../../network/smallestGap.coffee":166,"../../tooltip/remove.coffee":201,"../../util/uniques.coffee":208}],326:[function(e,t,r){var n,a,i,o;n=e("./sankey.js"),a=e("../../client/pointer.coffee"),i=e("../../tooltip/remove.coffee"),e("../../util/uniques.coffee"),o=function(e){var t,r,o,s,l,u,c,d,f,p,h,v,g,m,y;for(s=e.focus.value[0],v=2*e.data.stroke.width,y=e.size.value.constructor===Number?e.size.value:20,o=e.edges.connections(s,e.id.value).filter(function(t){return t[e.edges.source][e.id.value]!==s||t[e.edges.target][e.id.value]!==s}),h=[],g=[],o=o.map(function(t){var r,n;return t[e.edges.target][e.id.value]===s?(r={id:"left_"+t[e.edges.source][e.id.value],dupe:"left",data:t[e.edges.source],value:t[e.edges.strength.value]},n=t[e.edges.target]):(r=t[e.edges.source],n={id:"right_"+t[e.edges.target][e.id.value],dupe:"right",data:t[e.edges.target],value:t[e.edges.strength.value]}),g.indexOf(r.id)<0&&h.push(r),g.indexOf(n.id)<0&&h.push(n),g.push(r.id),g.push(n.id),{source:r,target:n,value:t[e.edges.strength.value]||1}}),c=n().nodeWidth(y).nodePadding(e.data.padding.value).size([e.width.viz-2*v,e.height.viz-2*v]).nodes(h).links(o).layout(2),m=[],l=0,d=h.length;l<d;l++)p=h[l],t=p.data||p,t={id:t[e.id.value]},t.d3plus={x:p.x+p.dx/2+v,y:p.y+p.dy/2+v,width:p.dx,height:p.dy,suffix:p.dupe},t.id!==s&&(t[e.edges.strength.value]=p.value),m.push(t);for(e.edges.path=c.link(),u=0,f=o.length;u<f;u++)r=o[u],r.d3plus={x:v,y:v};return e.mouse.viz={},e.mouse.viz[a.click]=function(t){var r;if(t[e.id.value]!==e.focus.value[0])return i(e.type.value),r=e.focus.value[0],e.history.states.push(function(){return e.self.focus(r).draw()}),e.self.focus(t[e.id.value]).draw()},{nodes:m,edges:o}},o.requirements=["edges","focus","nodes"],o.shapes=["square"],t.exports=o},{"../../client/pointer.coffee":34,"../../tooltip/remove.coffee":201,"../../util/uniques.coffee":208,"./sankey.js":327}],327:[function(e,t,r){t.exports=function(){function e(){p.forEach(function(e){e.sourceLinks=[],e.targetLinks=[]}),h.forEach(function(e){var t=e.source,r=e.target;"number"==typeof t&&(t=e.source=p[e.source]),"number"==typeof r&&(r=e.target=p[e.target]),t.sourceLinks.push(e),r.targetLinks.push(e)})}function t(){p.forEach(function(e){e.value=Math.max(d3.sum(e.sourceLinks,l),d3.sum(e.targetLinks,l))})}function r(){for(var e,t=p,r=0;t.length;)e=[],t.forEach(function(t){t.x=r,t.dx=c,t.sourceLinks.forEach(function(t){e.indexOf(t.target)<0&&e.push(t.target)})}),t=e,++r;n(r),a((f[0]-c)/(r-1))}function n(e){p.forEach(function(t){t.sourceLinks.length||(t.x=e-1)})}function a(e){p.forEach(function(t){t.x*=e})}function i(e){function t(){n.forEach(function(e){var t,n,a,i=0,o=e.length;for(e.sort(r),a=0;a<o;++a)t=e[a],n=i-t.y,n>0&&(t.y+=n),i=t.y+t.dy+d;if((n=i-d-f[1])>0)for(i=t.y-=n,a=o-2;a>=0;--a)t=e[a],n=t.y+t.dy+d-i,n>0&&(t.y-=n),i=t.y})}function r(e,t){return e.y-t.y}var n=d3.nest().key(function(e){return e.x}).sortKeys(d3.ascending).entries(p).map(function(e){return e.values});!function(){var e=d3.min(n,function(e){return(f[1]-(e.length-1)*d)/d3.sum(e,l)});n.forEach(function(t){t.forEach(function(t,r){t.y=r,t.dy=t.value*e})}),h.forEach(function(t){t.dy=t.value*e})}(),t();for(var a=1;e>0;--e)!function(e){function t(e){return s(e.target)*e.value}n.slice().reverse().forEach(function(r){r.forEach(function(r){if(r.sourceLinks.length){var n=d3.sum(r.sourceLinks,t)/d3.sum(r.sourceLinks,l);r.y+=(n-s(r))*e}})})}(a*=.99),t(),function(e){function t(e){return s(e.source)*e.value}n.forEach(function(r,n){r.forEach(function(r){if(r.targetLinks.length){var n=d3.sum(r.targetLinks,t)/d3.sum(r.targetLinks,l);r.y+=(n-s(r))*e}})})}(a),t()}function o(){function e(e,t){return e.source.y-t.source.y}function t(e,t){return e.target.y-t.target.y}p.forEach(function(r){r.sourceLinks.sort(t),r.targetLinks.sort(e)}),p.forEach(function(e){var t=0,r=0;e.sourceLinks.forEach(function(e){e.sy=t,t+=e.dy}),e.targetLinks.forEach(function(e){e.ty=r,r+=e.dy})})}function s(e){return e.y+e.dy/2}function l(e){return e.value}var u={},c=24,d=8,f=[1,1],p=[],h=[];return u.nodeWidth=function(e){return arguments.length?(c=+e,u):c},u.nodePadding=function(e){return arguments.length?(d=+e,u):d},u.nodes=function(e){return arguments.length?(p=e,u):p},u.links=function(e){return arguments.length?(h=e,u):h},u.size=function(e){return arguments.length?(f=e,u):f},u.layout=function(n){return e(),t(),r(),i(n),o(),u},u.relayout=function(){return o(),u},u.link=function(){function e(e){var r=e.source.x+e.source.dx,n=e.target.x,a=d3.interpolateNumber(r,n),i=a(t),o=a(1-t),s=e.source.y+e.sy+e.dy/2,l=e.target.y+e.ty+e.dy/2;return"M"+r+","+s+"C"+i+","+s+" "+o+","+l+" "+n+","+l}var t=.5;return e.curvature=function(r){return arguments.length?(t=+r,e):t},e},u}},{}],328:[function(e,t,r){var n,a,i,o,s;n=e("../../core/fetch/value.coffee"),a=e("./helpers/graph/draw.coffee"),e("../../core/console/print.coffee"),o=e("../../array/sort.coffee"),s=e("./helpers/graph/dataTicks.coffee"),i=function(e){var t,r,i,l,u;if(a(e,{buffer:"size",mouse:!0}),r=e.x.domain.viz.concat(e.y.domain.viz),r.indexOf(void 0)>=0)return[];for(u=e.data.viz,i=0,l=u.length;i<l;i++)t=u[i],t.d3plus.x=e.x.scale.viz(n(e,t,e.x.value)),t.d3plus.x+=e.axes.margin.viz.left,t.d3plus.y=e.y.scale.viz(n(e,t,e.y.value)),t.d3plus.y+=e.axes.margin.viz.top,"number"!=typeof e.size.value&&e.size.value?t.d3plus.r=e.axes.scale(n(e,t,e.size.value)):t.d3plus.r=e.axes.scale(0);return s(e),o(e.data.viz,e.order.value||e.size.value||e.id.value,"desc"===e.order.sort.value?"asc":"desc",e.color.value||[],e)},i.fill=!0,i.requirements=["data","x","y"],i.scale=1.1,i.setup=function(e){if(e.time.value&&!e.axes.discrete&&(e.time.value===e.x.value&&e.self.x({scale:"discrete"}),e.time.value===e.y.value))return e.self.y({scale:"discrete"})},i.shapes=["circle","square","donut"],i.tooltip="static",t.exports=i},{"../../array/sort.coffee":30,"../../core/console/print.coffee":48,"../../core/fetch/value.coffee":63,"./helpers/graph/dataTicks.coffee":311,"./helpers/graph/draw.coffee":312}],329:[function(e,t,r){var n=e("../../core/fetch/value.coffee"),a=e("../../util/uniques.coffee"),i=e("../../util/copy.coffee"),o=e("../../color/random.coffee"),s=function(e){var t=a(e.data.viz,e.id.value,n,e),r=a(e.cols.value);r.indexOf("label")<0&&e.cols.index.value&&r.unshift("label");var s=e.height.viz/(t.length+1),l=e.width.viz/r.length;e.group.selectAll("rect").data([0]).enter().append("rect").attr("class","background").attr("height",e.height.viz).attr("width",e.width.viz).style("fill",e.color.missing);var u=e.group.selectAll("line.horiz").data(e.data.viz);u.enter().append("line").attr("class","horiz"),u.attr("x1",0).attr("y1",function(e,t){return s*t+s}).attr("x2",e.width.viz).attr("y2",function(e,t){return s*t+s}).style("fill","#fff").style("stroke","#fff"),u.exit().remove();var c=e.group.selectAll("line.vert").data(r);c.enter().append("line").attr("class","vert"),c.attr("x1",function(e,t){return l*t+l}).attr("y1",0).attr("x2",function(e,t){return l*t+l}).attr("y2",e.height.viz).style("fill","#fff").style("stroke","#fff"),c.exit().remove();var d=[],f={};return r.forEach(function(t,r){var n={d3plus:{x:l*r+l/2,y:s/2,width:l,height:s,id:"d3p_header_"+t.toString().replace(/ /g,"_"),shape:"square",color:"#fff",text:e.format.value(t)}};if(t==e.id.value&&(n.d3plus.color="#fff"),"label"==t&&(n.d3plus.label=!1,n.d3plus.color="#fff",n.d3plus.stroke="#fff"),d.push(n),"number"==e.data.keys[t]){var a=d3.extent(e.data.viz,function(e){return e[t]});a[0]==a[1]&&(a=[a[0]-1,a[1]]),f[t]=d3.scale.linear().domain(a).range([e.color.missing,o(t)])}else"boolean"==e.data.keys[t]&&(f[t]=function(r){return r?o(t):e.color.missing})}),e.data.viz.forEach(function(t,n){n+=1,r.forEach(function(r,a){var o=i(t);o.d3plus.id="d3p_"+o[e.id.value].toString().replace(/ /g,"_")+"_"+r,o.d3plus.x=l*a+l/2,o.d3plus.y=s*n+s/2,o.d3plus.width=l,o.d3plus.height=s,"label"==r&&(o.d3plus.shape="square",o.d3plus.color="#fff",d.push(o)),d3.keys(t).indexOf(r)>=0&&r in t&&(f[r]&&(o.d3plus.color=f[r](o[r])),o.d3plus.text=e.format.value(o[r]),"boolean"==e.data.keys[r]?o.d3plus.label=!1:"string"==e.data.keys[r]&&(o.d3plus.color=e.color.missing,o.d3plus.stroke="#fff",o.d3plus.shape="square"),d.push(o))})}),d};s.shapes=["check","cross","diamond","square","triangle","triangle_up","triangle_down"],s.requirements=["data","cols"],t.exports=s},{"../../color/random.coffee":43,"../../core/fetch/value.coffee":63,"../../util/copy.coffee":205,"../../util/uniques.coffee":208}],330:[function(e,t,r){var n,a,i,o;n=e("../../core/data/threshold.js"),a=e("../../core/data/group.coffee"),i=e("../../object/merge.coffee"),o=function(e){var t,r,n,o,s,l,u;if(n=a(e,e.data.viz),r=d3.layout.treemap().mode(e.type.mode.value).round(!0).size([e.width.viz,e.height.viz]).children(function(e){return e.values}).padding(e.data.padding.value).sort(function(e,t){var r;return r=e.value-t.value,0===r?e.id<t.id:r}).nodes({name:"root",values:n}).filter(function(e){return!e.values&&e.area}),r.length){for(u=r[0];u.parent;)u=u.parent;for(l=[],o=0,s=r.length;o<s;o++)t=r[o],t.d3plus.d3plus=i(t.d3plus.d3plus,{x:t.x+t.dx/2,y:t.y+t.dy/2,width:t.dx,height:t.dy,share:t.value/u.value}),l.push(t.d3plus)}return l},o.filter=n,o.modes=["squarify","slice","dice","slice-dice"],o.requirements=["data","size"],o.shapes=["square"],o.threshold=function(e){return 1600/(e.width.viz*e.height.viz)},t.exports=o},{"../../core/data/group.coffee":53,"../../core/data/threshold.js":57,"../../object/merge.coffee":169}],331:[function(e,t,r){var n,a,i,o,s,l;n=e("../core/methods/attach.coffee"),a=e("./methods/helpers/axis.coffee"),o=e("./helpers/ui/message.js"),s=e("./helpers/drawSteps.js"),l=e("../core/console/print.coffee"),i=e("./helpers/container.coffee"),e("../object/validate.coffee"),t.exports=function(){var t;return t={g:{apps:{}},types:{area:e("./types/area.coffee"),bar:e("./types/bar.coffee"),bubbles:e("./types/bubbles.coffee"),box:e("./types/box.coffee"),chart:e("./types/deprecated/chart.coffee"),geo_map:e("./types/geo_map.coffee"),line:e("./types/line.coffee"),network:e("./types/network.js"),paths:e("./types/paths.coffee"),pie:e("./types/pie.coffee"),radar:e("./types/radar.coffee"),rings:e("./types/rings.js"),sankey:e("./types/sankey.coffee"),scatter:e("./types/scatter.coffee"),stacked:e("./types/area.coffee"),table:e("./types/table.js"),tree_map:e("./types/tree_map.coffee")}},t.self=function(e){return e.each(function(){var e,r,n,a,u,c,d;t.draw.frozen=!0,t.error.internal=null,"timing"in t.draw||(t.draw.timing=t.timing.transitions),t.error.value&&(t.draw.timing=0),i(t),c=t.width.value<=t.width.small,u=t.height.value<=t.height.small,t.small=c||u,t.width.viz=t.width.value,t.height.viz=t.height.value,e=!1,r=function(){d.length?a():t.dev.value&&(l.groupEnd(),l.timeEnd("total draw time"),l.log("\n"))},n=function(e,n){n=n||"function",e[n]instanceof Array?e[n].forEach(function(e){e(t,r)}):"function"==typeof e[n]&&e[n](t,r),e.wait||r()},a=function(){var a,i,s,u;u=d.shift(),s=t.g.message&&e===u.message,i=!("check"in u)||u.check,"function"==typeof i&&(i=i(t)),i?s?n(u):(t.dev.value&&(!1!==e&&l.groupEnd(),l.group(u.message)),"string"==typeof t.messages.value?(e=t.messages.value,a=t.messages.value):(e=u.message,a=t.format.value(u.message)),t.draw.update?(o(t,a),t.error.value?n(u):setTimeout(function(){return n(u)},10)):n(u)):"otherwise"in u?t.error.value?n(u,"otherwise"):setTimeout(function(){return n(u,"otherwise")},10):r()},t.messages.style.backup=t.group&&"1"===t.group.attr("opacity")?"small":"large",d=s(t),a()}),t.self},n(t,{active:e("./methods/active.coffee"),aggs:e("./methods/aggs.coffee"),attrs:e("./methods/attrs.coffee"),axes:e("./methods/axes.coffee"),background:e("./methods/background.coffee"),class:e("./methods/class.coffee"),color:e("./methods/color.coffee"),cols:e("./methods/cols.js"),config:e("./methods/config.coffee"),container:e("./methods/container.coffee"),coords:e("./methods/coords.coffee"),csv:e("./methods/csv.coffee"),data:e("./methods/data.coffee"),depth:e("./methods/depth.coffee"),descs:e("./methods/descs.coffee"),dev:e("./methods/dev.coffee"),draw:e("./methods/draw.js"),edges:e("./methods/edges.js"),error:e("./methods/error.coffee"),focus:e("./methods/focus.coffee"),font:e("./methods/font.coffee"),footer:e("./methods/footer.coffee"),format:e("./methods/format.coffee"),height:e("./methods/height.coffee"),history:e("./methods/history.coffee"),icon:e("./methods/icon.coffee"),id:e("./methods/id.coffee"),labels:e("./methods/labels.coffee"),legend:e("./methods/legend.coffee"),links:e("./methods/links.coffee"),margin:e("./methods/margin.coffee"),messages:e("./methods/messages.coffee"),mouse:e("./methods/mouse.coffee"),nodes:e("./methods/nodes.coffee"),order:e("./methods/order.coffee"),resize:e("./methods/resize.coffee"),shape:e("./methods/shape.coffee"),size:e("./methods/size.coffee"),style:e("./methods/style.coffee"),temp:e("./methods/temp.coffee"),text:e("./methods/text.coffee"),time:e("./methods/time.coffee"),timeline:e("./methods/timeline.coffee"),timing:e("./methods/timing.coffee"),title:e("./methods/title.coffee"),tooltip:e("./methods/tooltip.coffee"),total:e("./methods/total.coffee"),type:e("./methods/type.coffee"),ui:e("./methods/ui.coffee"),width:e("./methods/width.coffee"),x:a("x"),x2:a("x2"),y:a("y"),y2:a("y2"),zoom:e("./methods/zoom.js")}),t.self}},{"../core/console/print.coffee":48,"../core/methods/attach.coffee":78,"../object/validate.coffee":170,"./helpers/container.coffee":209,"./helpers/drawSteps.js":210,"./helpers/ui/message.js":244,"./methods/active.coffee":253,"./methods/aggs.coffee":254,"./methods/attrs.coffee":255,"./methods/axes.coffee":256,"./methods/background.coffee":257,"./methods/class.coffee":258,"./methods/color.coffee":259,"./methods/cols.js":260,"./methods/config.coffee":261,"./methods/container.coffee":262,"./methods/coords.coffee":263,"./methods/csv.coffee":264,"./methods/data.coffee":265,"./methods/depth.coffee":266,"./methods/descs.coffee":267,"./methods/dev.coffee":268,"./methods/draw.js":269,"./methods/edges.js":270,"./methods/error.coffee":271,"./methods/focus.coffee":272,"./methods/font.coffee":273,"./methods/footer.coffee":274,"./methods/format.coffee":275,"./methods/height.coffee":276,"./methods/helpers/axis.coffee":277,"./methods/history.coffee":278,"./methods/icon.coffee":279,"./methods/id.coffee":280,"./methods/labels.coffee":281,"./methods/legend.coffee":282,"./methods/links.coffee":283,"./methods/margin.coffee":284,"./methods/messages.coffee":285,"./methods/mouse.coffee":286,"./methods/nodes.coffee":287,"./methods/order.coffee":288,"./methods/resize.coffee":289,"./methods/shape.coffee":290,"./methods/size.coffee":291,"./methods/style.coffee":292,"./methods/temp.coffee":293,"./methods/text.coffee":294,"./methods/time.coffee":295,"./methods/timeline.coffee":296,"./methods/timing.coffee":297,"./methods/title.coffee":298,"./methods/tooltip.coffee":299,"./methods/total.coffee":300,"./methods/type.coffee":301,"./methods/ui.coffee":302,"./methods/width.coffee":303,"./methods/zoom.js":304,"./types/area.coffee":305,"./types/bar.coffee":306,"./types/box.coffee":307,"./types/bubbles.coffee":308,"./types/deprecated/chart.coffee":309,"./types/geo_map.coffee":310,"./types/line.coffee":320,"./types/network.js":321,"./types/paths.coffee":322,"./types/pie.coffee":323,"./types/radar.coffee":324,"./types/rings.js":325,"./types/sankey.coffee":326,"./types/scatter.coffee":328,"./types/table.js":329,"./types/tree_map.coffee":330}]},{},[161]);