lugins.graylog-plugin-pipeline-processor.2.5.0-alpha.1.source-code.plugin.org.graylog.plugins.pipelineprocessor.PipelineProcessorPlugin.af93212607f316c5e325.js Maven / Gradle / Ivy
Show all versions of graylog-plugin-pipeline-processor Show documentation
!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(exports,e,n){t.o(exports,e)||Object.defineProperty(exports,e,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=206)}([function(e,exports,t){e.exports=t(8)(1)},function(e,exports,t){e.exports=t(8)(928)},function(e,exports,t){e.exports=t(8)(582)},function(e,exports,t){e.exports=t(8)(819)},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(68),i=n(r),o=t(45),a=n(o),s=t(53),l=n(s),u=t(274),c=n(u),d={parser:new c.default,qualifyUrl:function(e){return new a.default(l.default.gl2ServerUrl()+e).normalizePathname().toString()},appPrefixed:function(e){return this.concatURLPath(l.default.gl2AppPathPrefix(),e)},getParsedSearch:function(e){var t={},n=e.search;return n&&0===n.indexOf("?")&&n.length>1&&(n=n.substr(1,n.length-1),t=i.default.parse(n)),t},getParsedHash:function(e){var t={},n=e.hash;return n&&0===n.indexOf("#")&&n.length>1&&(n=n.substr(1,n.length-1),t=i.default.parse(n)),t},replaceHashParam:function(e,t){var n=this.getParsedHash(window.location);n[e]=t,window.location.replace("#"+i.default.stringify(n))},concatURLPath:function(){for(var e=arguments.length,t=Array(e),n=0;n=0&&y.splice(t,1)}function a(e){var t=document.createElement("style");return e.attrs.type="text/css",l(t,e.attrs),i(e,t),t}function s(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",l(t,e.attrs),i(e,t),t}function l(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function u(e,t){var n,r,i,l;if(t.transform&&e.css){if(!(l=t.transform(e.css)))return function(){};e.css=l}if(t.singleton){var u=v++;n=m||(m=a(t)),r=c.bind(null,n,u,!1),i=c.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=h.bind(null,n,t),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(t),r=d.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function c(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=_(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function d(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function h(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=b(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var f={},p=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),m=null,v=0,y=[],b=t(402);e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=p()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var i=r(e,t);return n(i,t),function(e){for(var o=[],a=0;a0)return void(u[r]=function(){for(var e=arguments.length,r=Array(e),o=0;o>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?p(e)+t:t}function m(){return!0}function v(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function y(e,t){return _(e,t,0)}function b(e,t){return _(e,t,t)}function _(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function C(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function A(){return{value:void 0,done:!0}}function E(e){return!!F(e)}function S(e){return e&&"function"==typeof e.next}function x(e){var t=F(e);return t&&t.call(e)}function F(e){var t=e&&(An&&e[An]||e[En]);if("function"==typeof t)return t}function k(e){return e&&"number"==typeof e.length}function T(e){return null===e||void 0===e?N():o(e)?e.toSeq():H(e)}function D(e){return null===e||void 0===e?N().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():j(e)}function M(e){return null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function R(e){return(null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function O(e){this._array=e,this.size=e.length}function L(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function P(e){this._iterable=e,this.size=e.length||e.size}function B(e){this._iterator=e,this._iteratorCache=[]}function I(e){return!(!e||!e[xn])}function N(){return Fn||(Fn=new O([]))}function j(e){var t=Array.isArray(e)?new O(e).fromEntrySeq():S(e)?new B(e).fromEntrySeq():E(e)?new P(e).fromEntrySeq():"object"==typeof e?new L(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function H(e){var t=U(e)||"object"==typeof e&&new L(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return k(e)?new O(e):S(e)?new B(e):E(e)?new P(e):void 0}function V(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(!1===t(s[1],r?s[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function G(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new w(function(){var e=i[n?o-a:a];return a++>o?A():C(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function W(e,t){return t?q(t,e,"",{"":e}):K(e)}function q(e,t,n,r){return Array.isArray(t)?e.call(r,n,M(t).map(function(n,r){return q(e,n,r,t)})):Y(t)?e.call(r,n,D(t).map(function(n,r){return q(e,n,r,t)})):t}function K(e){return Array.isArray(e)?M(e).map(K).toList():Y(e)?D(e).map(K).toMap():e}function Y(e){return e&&(e.constructor===Object||void 0===e.constructor)}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Q(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var c=e;e=t,t=c}var d=!0,h=t.__iterate(function(t,r){if(n?!e.has(t):i?!X(t,e.get(r,vn)):!X(e.get(r,vn),t))return d=!1,!1});return d&&e.size===h}function Z(e,t){if(!(this instanceof Z))return new Z(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(kn)return kn;kn=this}}function J(e,t){if(!e)throw new Error(t)}function ee(e,t,n){if(!(this instanceof ee))return new ee(e,t,n);if(J(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function ae(e){if(!1===e||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null===e||void 0===e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return oe(n)}if("string"===t)return e.length>In?se(e):le(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return le(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function se(e){var t=jn[e];return void 0===t&&(t=le(e),Nn===$n&&(Nn=0,jn={}),Nn++,jn[e]=t),t}function le(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function de(e){J(e!==1/0,"Cannot perform this action with an infinite size.")}function he(e){return null===e||void 0===e?Ae():fe(e)&&!u(e)?e:Ae().withMutations(function(t){var r=n(e);de(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[zn])}function pe(e,t){this.ownerID=e,this.entries=t}function ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function be(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&we(e._root)}function _e(e,t){return C(e,t[0],t[1])}function we(e,t){return{node:e,index:0,__prev:t}}function Ce(e,t,n,r){var i=Object.create(Hn);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Ae(){return Un||(Un=Ce(0))}function Ee(e,t,n){var r,i;if(e._root){var o=c(yn),a=c(bn);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===vn?-1:1:0)}else{if(n===vn)return e;i=1,r=new pe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?Ce(i,r):Ae()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===vn?e:(d(s),d(a),new ye(t,r,[i,o]))}function xe(e){return e.constructor===ye||e.constructor===ve}function Fe(e,t,n,r,i){if(e.keyHash===r)return new ve(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&mn,s=(0===n?r:r>>>n)&mn;return new ge(t,1<>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function Me(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function Ie(e,t,n,r){var i=r?e:f(e);return i[t]=n,i}function $e(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,u=a-n;return u>gn&&(u=gn),function(){if(i===u)return Xn;var e=t?--u:i++;return r&&r[e]}}function i(e,r,i){var s,l=e&&e.array,u=i>o?0:o-i>>r,c=1+(a-i>>r);return c>gn&&(c=gn),function(){for(;;){if(s){var e=s();if(e!==Xn)return e;s=null}if(u===c)return Xn;var o=t?--c:u++;s=n(l&&l[o],r-pn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Xe(e,t).set(0,n):Xe(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=c(bn);return t>=Ze(e._capacity)?r=qe(r,e.__ownerID,0,t,n,o):i=qe(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ve(e._origin,e._capacity,e._level,i,r):e}function qe(e,t,n,r,i,o){var a=r>>>n&mn,s=e&&a0){var u=e&&e.array[a],c=qe(u,t,n-pn,r,i,o);return c===u?e:(l=Ke(e,t),l.array[a]=c,l)}return s&&e.array[a]===i?e:(d(o),l=Ke(e,t),void 0===i&&a===l.array.length-1?l.array.pop():l.array[a]=i,l)}function Ke(e,t){return t&&e&&t===e.ownerID?e:new He(e?e.array.slice():[],t)}function Ye(e,t){if(t>=Ze(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&mn],r-=pn;return n}}function Xe(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new h,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var l=e._level,u=e._root,c=0;a+c<0;)u=new He(u&&u.array.length?[void 0,u]:[],r),l+=pn,c+=1<=1<d?new He([],r):p;if(p&&f>d&&apn;v-=pn){var y=d>>>v&mn;m=m.array[y]=Ke(m.array[y],r)}m.array[d>>>pn&mn]=p}if(s=f)a-=f,s-=f,l=pn,u=null,g=g&&g.removeBefore(r,0,a);else if(a>i||f>>l&mn;if(b!==f>>>l&mn)break;b&&(c+=(1<i&&(u=u.removeBefore(r,l,a-c)),u&&fa&&(a=u.size),o(l)||(u=u.map(function(e){return W(e)})),i.push(u)}return a>e.size&&(e=e.setSize(a)),Le(e,t,i)}function Ze(e){return e>>pn<=gn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(l){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):tt(r,i)}function it(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){this._iter=e,this.size=e.size}function lt(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Dt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return!1!==t(n,e,r)},n)},t.__iteratorUncached=function(t,n){if(t===Cn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?_n:wn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,vn);return o===vn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return!1!==r(t.call(n,e,i,a),i,o)},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(Cn,i);return new w(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return C(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=lt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Dt,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function dt(e,t,n,r){var i=Tt(e);return r&&(i.has=function(r){var i=e.get(r,vn);return i!==vn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,vn);return o!==vn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,l){if(t.call(n,e,o,l))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(Cn,o),s=0;return new w(function(){for(;;){var o=a.next();if(o.done)return o;var l=o.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return C(i,r?u:s++,c,o)}})},i}function ht(e,t,n){var r=he().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ft(e,t,n){var r=a(e),i=(u(e)?Je():he()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=kt(e);return i.map(function(t){return St(e,o(t))})}function pt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),v(t,n,i))return e;var o=y(t,i),a=b(n,i);if(o!==o||a!==a)return pt(e.toSeq().cacheResult(),t,n,r);var s,l=a-o;l===l&&(s=l<0?0:l);var u=Tt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&I(e)&&s>=0&&(u.get=function(t,n){return t=g(this,t),t>=0&&ts)return A();var e=i.next();return r||t===wn?e:t===_n?C(t,l-1,void 0,e):C(t,l-1,e.value[1],e)})},u}function gt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(Cn,i),s=!0;return new w(function(){if(!s)return A();var e=a.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,o)?r===Cn?e:C(r,l,u,e):(s=!1,A())})},r}function mt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,l=0;return e.__iterate(function(e,o,u){if(!s||!(s=t.call(n,e,o,u)))return l++,i(e,r?o:l-1,a)}),l},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(Cn,o),l=!0,u=0;return new w(function(){var e,o,c;do{if(e=s.next(),e.done)return r||i===wn?e:i===_n?C(i,u++,void 0,e):C(i,u++,e.value[1],e);var d=e.value;o=d[0],c=d[1],l&&(l=t.call(n,c,o,a))}while(l);return i===Cn?e:C(i,o,c,e)})},i}function vt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?j(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var l=i[0];if(l===e||r&&a(l)||s(e)&&s(l))return l}var u=new O(i);return r?u=u.toKeyedSeq():s(e)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),u}function yt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,u){var c=this;e.__iterate(function(e,i){return(!t||u0}function Et(e,n,r){var i=Tt(e);return i.size=new O(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(wn,t),i=0;!(n=r.next()).done&&!1!==e(n.value,i++,this););return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),x(i?e.reverse():e)}),a=0,s=!1;return new w(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?A():C(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return I(e)?t:e.constructor(t)}function xt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ft(e){return de(e.size),p(e)}function kt(e){return a(e)?n:s(e)?r:i}function Tt(e){return Object.create((a(e)?D:s(e)?M:R).prototype)}function Dt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):T.prototype.cacheResult.call(this)}function Mt(e,t){return e>t?1:et?-1:0}function an(e){if(e.size===1/0)return 0;var t=u(e),n=a(e),r=t?1:0;return sn(e.__iterate(n?t?function(e,t){r=31*r+ln(ae(e),ae(t))|0}:function(e,t){r=r+ln(ae(e),ae(t))|0}:t?function(e){r=31*r+ae(e)|0}:function(e){r=r+ae(e)|0}),r)}function sn(e,t){return t=Mn(t,3432918353),t=Mn(t<<15|t>>>-15,461845907),t=Mn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Mn(t^t>>>16,2246822507),t=Mn(t^t>>>13,3266489909),t=oe(t^t>>>16)}function ln(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=l,t.isOrdered=u,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",dn="@@__IMMUTABLE_KEYED__@@",hn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",pn=5,gn=1<r?A():C(e,i,n[t?r-i++:i++])})},e(L,D),L.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},L.prototype.has=function(e){return this._object.hasOwnProperty(e)},L.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(!1===e(n[a],a,this))return o+1}return o},L.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new w(function(){var a=r[t?i-o:o];return o++>i?A():C(e,a,n[a])})},L.prototype[fn]=!0,e(P,M),P.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=x(n),i=0;if(S(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,i++,this););return i},P.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=x(n);if(!S(r))return new w(A);var i=0;return new w(function(){var t=r.next();return t.done?t:C(e,i++,t.value)})},e(B,M),B.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return C(e,i,r[i++])})};var Fn;e(Z,M),Z.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Z.prototype.get=function(e,t){return this.has(e)?this._value:t},Z.prototype.includes=function(e){return X(this._value,e)},Z.prototype.slice=function(e,t){var n=this.size;return v(e,t,n)?this:new Z(this._value,b(t,n)-y(e,n))},Z.prototype.reverse=function(){return this},Z.prototype.indexOf=function(e){return X(this._value,e)?0:-1},Z.prototype.lastIndexOf=function(e){return X(this._value,e)?this.size:-1},Z.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?A():C(e,o++,a)})},ee.prototype.equals=function(e){return e instanceof ee?this._start===e._start&&this._end===e._end&&this._step===e._step:Q(this,e)};var Tn;e(te,t),e(ne,te),e(re,te),e(ie,te),te.Keyed=ne,te.Indexed=re,te.Set=ie;var Dn,Mn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Rn=Object.isExtensible,On=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Ln="function"==typeof WeakMap;Ln&&(Dn=new WeakMap);var Pn=0,Bn="__immutablehash__";"function"==typeof Symbol&&(Bn=Symbol(Bn));var In=16,$n=255,Nn=0,jn={};e(he,ne),he.of=function(){var e=un.call(arguments,0);return Ae().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},he.prototype.toString=function(){return this.__toString("Map {","}")},he.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},he.prototype.set=function(e,t){return Ee(this,e,t)},he.prototype.setIn=function(e,t){return this.updateIn(e,vn,function(){return t})},he.prototype.remove=function(e){return Ee(this,e,vn)},he.prototype.deleteIn=function(e){return this.updateIn(e,function(){return vn})},he.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},he.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=Pe(this,Rt(e),t,n);return r===vn?void 0:r},he.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Ae()},he.prototype.merge=function(){return Me(this,void 0,arguments)},he.prototype.mergeWith=function(e){return Me(this,e,un.call(arguments,1))},he.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,Ae(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},he.prototype.mergeDeep=function(){return Me(this,Re,arguments)},he.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Me(this,Oe(e),t)},he.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,Ae(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},he.prototype.sort=function(e){return Je(wt(this,e))},he.prototype.sortBy=function(e,t){return Je(wt(this,t,e))},he.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},he.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new h)},he.prototype.asImmutable=function(){return this.__ensureOwner()},he.prototype.wasAltered=function(){return this.__altered},he.prototype.__iterator=function(e,t){return new be(this,e,t)},he.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},he.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Ce(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},he.isMap=fe;var zn="@@__IMMUTABLE_MAP__@@",Hn=he.prototype;Hn[zn]=!0,Hn.delete=Hn.remove,Hn.removeIn=Hn.deleteIn,pe.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Vn)return ke(e,l,r,i);var p=e&&e===this.ownerID,g=p?l:f(l);return h?s?u===c-1?g.pop():g[u]=g.pop():g[u]=[r,i]:g.push([r,i]),p?(this.entries=g,this):new pe(e,g)}},ge.prototype.get=function(e,t,n,r){void 0===t&&(t=ae(n));var i=1<<((0===e?t:t>>>e)&mn),o=this.bitmap;return 0==(o&i)?r:this.nodes[Be(o&i-1)].get(e+pn,t,n,r)},ge.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ae(r));var s=(0===t?n:n>>>t)&mn,l=1<=Gn)return De(e,h,u,s,p);if(c&&!p&&2===h.length&&xe(h[1^d]))return h[1^d];if(c&&p&&1===h.length&&xe(p))return p;var g=e&&e===this.ownerID,m=c?p?u:u^l:u|l,v=c?p?Ie(h,d,p,g):Ne(h,d,g):$e(h,d,p,g);return g?(this.bitmap=m,this.nodes=v,this):new ge(e,m,v)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=ae(n));var i=(0===e?t:t>>>e)&mn,o=this.nodes[i];return o?o.get(e+pn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=ae(r));var s=(0===t?n:n>>>t)&mn,l=i===vn,u=this.nodes,c=u[s];if(l&&!c)return this;var d=Se(c,e,t+pn,n,r,i,o,a);if(d===c)return this;var h=this.count;if(c){if(!d&&--h=0&&e>>t&mn;if(r>=this.array.length)return new He([],e);var i,o=0===r;if(t>0){var a=this.array[r];if((i=a&&a.removeBefore(e,t-pn,n))===a&&o)return this}if(o&&!i)return this;var s=Ke(this,e);if(!o)for(var l=0;l>>t&mn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if((i=o&&o.removeAfter(e,t-pn,n))===o&&r===this.array.length-1)return this}var a=Ke(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Yn,Xn={};e(Je,he),Je.of=function(){return this(arguments)},Je.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Je.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Je.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):nt()},Je.prototype.set=function(e,t){return rt(this,e,t)},Je.prototype.remove=function(e){return rt(this,e,vn)},Je.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Je.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Je.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Je.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?tt(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Je.isOrderedMap=et,Je.prototype[fn]=!0,Je.prototype.delete=Je.prototype.remove;var Qn;e(it,D),it.prototype.get=function(e,t){return this._iter.get(e,t)},it.prototype.has=function(e){return this._iter.has(e)},it.prototype.valueSeq=function(){return this._iter.valueSeq()},it.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},it.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},it.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ft(this):0,function(i){return e(i,t?--n:n++,r)}),t)},it.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(wn,t),r=t?Ft(this):0;return new w(function(){var i=n.next();return i.done?i:C(e,t?--r:r++,i.value,i)})},it.prototype[fn]=!0,e(ot,M),ot.prototype.includes=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t),r=0;return new w(function(){var t=n.next();return t.done?t:C(e,r++,t.value,t)})},e(at,R),at.prototype.has=function(e){return this._iter.includes(e)},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){var t=n.next();return t.done?t:C(e,t.value,t.value,t)})},e(st,D),st.prototype.entrySeq=function(){return this._iter.toSeq()},st.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){xt(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},st.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){xt(r);var i=o(r);return C(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},ot.prototype.cacheResult=it.prototype.cacheResult=at.prototype.cacheResult=st.prototype.cacheResult=Dt,e(Ot,ne),Ot.prototype.toString=function(){return this.__toString(Pt(this)+" {","}")},Ot.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Ot.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Ot.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=Lt(this,Ae()))},Ot.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Pt(this));if(this._map&&!this._map.has(e)){if(t===this._defaultValues[e])return this}var n=this._map&&this._map.set(e,t);return this.__ownerID||n===this._map?this:Lt(this,n)},Ot.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:Lt(this,t)},Ot.prototype.wasAltered=function(){return this._map.wasAltered()},Ot.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Ot.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Ot.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?Lt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Zn=Ot.prototype;Zn.delete=Zn.remove,Zn.deleteIn=Zn.removeIn=Hn.removeIn,Zn.merge=Hn.merge,Zn.mergeWith=Hn.mergeWith,Zn.mergeIn=Hn.mergeIn,Zn.mergeDeep=Hn.mergeDeep,Zn.mergeDeepWith=Hn.mergeDeepWith,Zn.mergeDeepIn=Hn.mergeDeepIn,Zn.setIn=Hn.setIn,Zn.update=Hn.update,Zn.updateIn=Hn.updateIn,Zn.withMutations=Hn.withMutations,Zn.asMutable=Hn.asMutable,Zn.asImmutable=Hn.asImmutable,e($t,ie),$t.of=function(){return this(arguments)},$t.fromKeys=function(e){return this(n(e).keySeq())},$t.prototype.toString=function(){return this.__toString("Set {","}")},$t.prototype.has=function(e){return this._map.has(e)},$t.prototype.add=function(e){return jt(this,this._map.set(e,!0))},$t.prototype.remove=function(e){return jt(this,this._map.remove(e))},$t.prototype.clear=function(){return jt(this,this._map.clear())},$t.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Yt(e,t)},qt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;de(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Yt(t,n)},qt.prototype.pop=function(){return this.slice(1)},qt.prototype.unshift=function(){return this.push.apply(this,arguments)},qt.prototype.unshiftAll=function(e){return this.pushAll(e)},qt.prototype.shift=function(){return this.pop.apply(this,arguments)},qt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xt()},qt.prototype.slice=function(e,t){if(v(e,t,this.size))return this;var n=y(e,this.size);if(b(t,this.size)!==this.size)return re.prototype.slice.call(this,e,t);for(var r=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=r,this._head=i,this.__hash=void 0,this.__altered=!0,this):Yt(r,i)},qt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Yt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},qt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},qt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,C(e,n++,t)}return A()})},qt.isStack=Kt;var ir="@@__IMMUTABLE_STACK__@@",or=qt.prototype;or[ir]=!0,or.withMutations=Hn.withMutations,or.asMutable=Hn.asMutable,or.asImmutable=Hn.asImmutable,or.wasAltered=Hn.wasAltered;var ar;t.Iterator=w,Qt(t,{toArray:function(){de(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new ot(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new it(this,!0)},toMap:function(){return he(this.toKeyedSeq())},toObject:function(){de(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Je(this.toKeyedSeq())},toOrderedSet:function(){return Ut(a(this)?this.valueSeq():this)},toSet:function(){return $t(a(this)?this.valueSeq():this)},toSetSeq:function(){return new at(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return qt(a(this)?this.valueSeq():this)},toList:function(){return je(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return St(this,vt(this,un.call(arguments,0)))},includes:function(e){return this.some(function(t){return X(t,e)})},entries:function(){return this.__iterator(Cn)},every:function(e,t){de(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return St(this,dt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return de(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){de(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(_n)},map:function(e,t){return St(this,ut(this,e,t))},reduce:function(e,t,n){de(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ct(this,!0))},slice:function(e,t){return St(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(en(e),t)},sort:function(e){return St(this,wt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return p(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ht(this,e,t)},equals:function(e){return Q(this,e)},entrySeq:function(){var e=this;if(e._cache)return new O(e._cache);var t=e.toSeq().map(Jt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(en(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(m)},flatMap:function(e,t){return St(this,bt(this,e,t))},flatten:function(e){return St(this,yt(this,e,!0))},fromEntrySeq:function(){return new st(this)},get:function(e,t){return this.find(function(t,n){return X(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Rt(e);!(n=i.next()).done;){var o=n.value;if((r=r&&r.get?r.get(o,vn):vn)===vn)return t}return r},groupBy:function(e,t){return ft(this,e,t)},has:function(e){return this.get(e,vn)!==vn},hasIn:function(e){return this.getIn(e,vn)!==vn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return X(t,e)})},keySeq:function(){return this.toSeq().map(Zt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return Ct(this,e)},maxBy:function(e,t){return Ct(this,t,e)},min:function(e){return Ct(this,e?tn(e):on)},minBy:function(e,t){return Ct(this,t?tn(t):on,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(en(e),t)},sortBy:function(e,t){return St(this,wt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,gt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(en(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=an(this))}});var sr=t.prototype;sr[cn]=!0,sr[Sn]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=nn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Qt(n,{flip:function(){return St(this,lt(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var lr=n.prototype;return lr[dn]=!0,lr[Sn]=sr.entries,lr.__toJS=sr.toObject,lr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+nn(e)},Qt(r,{toKeyedSeq:function(){return new it(this,!1)},filter:function(e,t){return St(this,dt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=y(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(f(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,yt(this,e,!1))},get:function(e,t){return e=g(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return(e=g(this,e))>=0&&(void 0!==this.size?this.size===1/0||et-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),s=s.replace(o,"")),s}function o(e,t,n){return 0===e._value&&null!==_.zeroFormat?_.zeroFormat:null===e._value&&null!==_.nullFormat?_.nullFormat:t.indexOf("$")>-1?a(e,t,n):t.indexOf("%")>-1?s(e,t,n):t.indexOf(":")>-1?c(e):t.indexOf("b")>-1||t.indexOf("ib")>-1?l(e,t,n):t.indexOf("o")>-1?u(e,t,n):d(e._value,t,n)}function a(e,t,n){var r,i,o=t.indexOf("$"),a=t.indexOf("("),s=t.indexOf("-"),l="";return t.indexOf(" $")>-1?(l=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(l=" ",t=t.replace("$ ","")):t=t.replace("$",""),i=d(e._value,t,n),o<=1?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),r=1,(o-1?(i=i.split(""),i.splice(-1,0,l+y[_.currentLanguage].currency.symbol),i=i.join("")):i=i+l+y[_.currentLanguage].currency.symbol,i}function s(e,t,n){var r,i="",o=100*e._value;return t.indexOf(" %")>-1?(i=" ",t=t.replace(" %","")):t=t.replace("%",""),r=d(o,t,n),r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,i+"%"),r=r.join("")):r=r+i+"%",r}function l(e,t,n){var r,i,o,a=t.indexOf("ib")>-1?w.iec:w.bytes,s=e._value,l="";for(t.indexOf(" b")>-1||t.indexOf(" ib")>-1?(l=" ",t=t.replace(" ib","").replace(" b","")):t=t.replace("ib","").replace("b",""),r=0;r<=a.length;r++)if(i=Math.pow(1024,r),o=Math.pow(1024,r+1),null===s||0===s||s>=i&&s0&&(s/=i);break}return d(s,t,n)+l}function u(e,t,n){var r="";return t.indexOf(" o")>-1?(r=" ",t=t.replace(" o","")):t=t.replace("o",""),r+=y[_.currentLanguage].ordinal(e._value),d(e._value,t,n)+r}function c(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0"+n:n)+":"+(r<10?"0"+r:r)}function d(e,t,n){var r,o,a,s,l=!1,u=!1,c=!1,d="",h=!1,f=!1,p=!1,g=!1,m=!1,v="",b=!1;return null===e&&(e=0),r=Math.abs(e),t.indexOf("(")>-1?(l=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(u=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(h=t.indexOf("aK")>=0,f=t.indexOf("aM")>=0,p=t.indexOf("aB")>=0,g=t.indexOf("aT")>=0,m=h||f||p||g,t.indexOf(" a")>-1&&(d=" "),t=t.replace(new RegExp(d+"a[KMBT]?"),""),r>=Math.pow(10,12)&&!m||g?(d+=y[_.currentLanguage].abbreviations.trillion,e/=Math.pow(10,12)):r=Math.pow(10,9)&&!m||p?(d+=y[_.currentLanguage].abbreviations.billion,e/=Math.pow(10,9)):r=Math.pow(10,6)&&!m||f?(d+=y[_.currentLanguage].abbreviations.million,e/=Math.pow(10,6)):(r=Math.pow(10,3)&&!m||h)&&(d+=y[_.currentLanguage].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf("[.]")>-1&&(c=!0,t=t.replace("[.]",".")),o=e.toString().split(".")[0],a=t.split(".")[1],s=t.indexOf(","),a?(a.indexOf("[")>-1?(a=a.replace("]",""),a=a.split("["),v=i(e,a[0].length+a[1].length,n,a[1].length)):v=i(e,a.length,n),o=v.split(".")[0],v=v.indexOf(".")>-1?y[_.currentLanguage].delimiters.decimal+v.split(".")[1]:"",c&&0===Number(v.slice(1))&&(v="")):o=i(e,null,n),o.indexOf("-")>-1&&(o=o.slice(1),b=!0),s>-1&&(o=o.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+y[_.currentLanguage].delimiters.thousands)),0===t.indexOf(".")&&(o=""),(l&&b?"(":"")+(!l&&b?"-":"")+(!b&&u?"+":"")+o+v+(d||"")+(l&&b?")":"")}function h(e,t){var n,r,i,o,a,s,l=t,u=!1;if(t.indexOf(":")>-1)s=f(t);else if(t===_.zeroFormat||t===_.nullFormat)s=0;else{for("."!==y[_.currentLanguage].delimiters.decimal&&(t=t.replace(/\./g,"").replace(y[_.currentLanguage].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.thousand+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.million+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.billion+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+y[_.currentLanguage].abbreviations.trillion+"(?:\\)|(\\"+y[_.currentLanguage].currency.symbol+")?(?:\\))?)?$"),a=1;a<=w.bytes.length&&!(u=(t.indexOf(w.bytes[a])>-1||t.indexOf(w.iec[a])>-1)&&Math.pow(1024,a));a++);s=u||1,s*=l.match(n)?Math.pow(10,3):1,s*=l.match(r)?Math.pow(10,6):1,s*=l.match(i)?Math.pow(10,9):1,s*=l.match(o)?Math.pow(10,12):1,s*=t.indexOf("%")>-1?.01:1,s*=(t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1,s*=Number(t.replace(/[^0-9\.]+/g,"")),s=u?Math.ceil(s):s}return e._value=s,e._value}function f(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function p(e,t){y[e]=t}function g(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function m(){return Array.prototype.slice.call(arguments).reduce(function(e,t){var n=g(e),r=g(t);return n>r?n:r},-1/0)}var v,y={},b={currentLanguage:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0"},_={currentLanguage:b.currentLanguage,zeroFormat:b.zeroFormat,nullFormat:b.nullFormat,defaultFormat:b.defaultFormat},w={bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],iec:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]};v=function(e){return e=v.isNumeral(e)?e.value():0===e||void 0===e?0:null===e?null:Number(e)?Number(e):v.fn.unformat(e),new t(e)},v.version="1.5.6",v.isNumeral=function(e){return e instanceof t},v.language=function(e,t){if(!e)return _.currentLanguage;if((e=e.toLowerCase())&&!t){if(!y[e])throw new Error("Unknown language : "+e);_.currentLanguage=e}return!t&&y[e]||p(e,t),v},v.reset=function(){for(var e in b)_[e]=b[e]},v.languageData=function(e){if(!e)return y[_.currentLanguage];if(!y[e])throw new Error("Unknown language : "+e);return y[e]},v.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),v.zeroFormat=function(e){_.zeroFormat="string"==typeof e?e:null},v.nullFormat=function(e){_.nullFormat="string"==typeof e?e:null},v.defaultFormat=function(e){_.defaultFormat="string"==typeof e?e:"0.0"},v.validate=function(e,t){var n,r,i,o,a,s,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),e.match(/^\d+$/))return!0;if(""===e)return!1;try{l=v.languageData(t)}catch(e){l=v.languageData(v.language())}return i=l.currency.symbol,a=l.abbreviations,n=l.delimiters.decimal,r="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,(null===(u=e.match(/^[^\d]+/))||(e=e.substr(1),u[0]===i))&&((null===(u=e.match(/[^\d]+$/))||(e=e.slice(0,-1),u[0]===a.thousand||u[0]===a.million||u[0]===a.billion||u[0]===a.trillion))&&(s=new RegExp(r+"{2}"),!e.match(/[^\d.,]/g)&&(o=e.split(n),!(o.length>2)&&(o.length<2?!!o[0].match(/^\d+.*\d$/)&&!o[0].match(s):1===o[0].length?!!o[0].match(/^\d+$/)&&!o[0].match(s)&&!!o[1].match(/^\d+$/):!!o[0].match(/^\d+.*\d$/)&&!o[0].match(s)&&!!o[1].match(/^\d+$/)))))},Array.prototype.reduce||(Array.prototype.reduce=function(e){"use strict";if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var t,n=Object(this),r=n.length>>>0,i=0;if(2===arguments.length)t=arguments[1];else{for(;i=r)throw new TypeError("Reduce of empty array with no initial value");t=n[i++]}for(;i'+t+" "}},{key:"versionedDocsHomePage",value:function(){return this.toString("")}}]),e}(),s=new a;exports.default=s,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r={tempDocument:document.createElement("textarea"),capitalizeFirstLetter:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},escapeHTML:function(e){return this.tempDocument.textContent=e,this.tempDocument.innerHTML},unescapeHTML:function(e){return this.tempDocument.innerHTML=e,this.tempDocument.textContent},pluralize:function(e,t,n){return 1===e||"1"===e?t:n},stringify:function(e){return("object"===(void 0===e?"undefined":n(e))?JSON.stringify(e):String(e))||""}};exports.default=r,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(621);Object.defineProperty(exports,"AddDecoratorButton",{enumerable:!0,get:function(){return n(r).default}});var i=t(623);Object.defineProperty(exports,"AddSearchCountToDashboard",{enumerable:!0,get:function(){return n(i).default}});var o=t(658);Object.defineProperty(exports,"ChangedMessageField",{enumerable:!0,get:function(){return n(o).default}});var a=t(661);Object.defineProperty(exports,"DecoratedMessageFieldMarker",{enumerable:!0,get:function(){return n(a).default}});var s=t(662);Object.defineProperty(exports,"DecoratedSidebarMessageField",{enumerable:!0,get:function(){return n(s).default}});var l=t(663);Object.defineProperty(exports,"Decorator",{enumerable:!0,get:function(){return n(l).default}});var u=t(664);Object.defineProperty(exports,"DecoratorList",{enumerable:!0,get:function(){return n(u).default}});var c=t(665);Object.defineProperty(exports,"DecoratorSidebar",{enumerable:!0,get:function(){return n(c).default}});var d=t(666);Object.defineProperty(exports,"FieldAnalyzersSidebar",{enumerable:!0,get:function(){return n(d).default}});var h=t(667);Object.defineProperty(exports,"LegacyHistogram",{enumerable:!0,get:function(){return n(h).default}});var f=t(670);Object.defineProperty(exports,"MalformedSearchQuery",{enumerable:!0,get:function(){return n(f).default}});var p=t(116);Object.defineProperty(exports,"MessageDetail",{enumerable:!0,get:function(){return n(p).default}});var g=t(673);Object.defineProperty(exports,"MessageFieldDescription",{enumerable:!0,get:function(){return n(g).default}});var m=t(674);Object.defineProperty(exports,"MessageFieldExtractorActions",{enumerable:!0,get:function(){return n(m).default}});var v=t(675);Object.defineProperty(exports,"MessageField",{enumerable:!0,get:function(){return n(v).default}});var y=t(187);Object.defineProperty(exports,"MessageFields",{enumerable:!0,get:function(){return n(y).default}});var b=t(193);Object.defineProperty(exports,"MessageFieldSearchActions",{enumerable:!0,get:function(){return n(b).default}});var _=t(115);Object.defineProperty(exports,"MessageShow",{enumerable:!0,get:function(){return n(_).default}});var w=t(676);Object.defineProperty(exports,"MessageTableEntry",{enumerable:!0,get:function(){return n(w).default}});var C=t(677);Object.defineProperty(exports,"MessageTablePaginator",{enumerable:!0,get:function(){return n(C).default}});var A=t(679);Object.defineProperty(exports,"NoSearchResults",{enumerable:!0,get:function(){return n(A).default}});var E=t(682);Object.defineProperty(exports,"RefreshControls",{enumerable:!0,get:function(){return n(E).default}});var S=t(683);Object.defineProperty(exports,"ResultTable",{enumerable:!0,get:function(){return n(S).default}});var x=t(684);Object.defineProperty(exports,"SavedSearchControls",{enumerable:!0,get:function(){return n(x).default}});var F=t(685);Object.defineProperty(exports,"SearchBar",{enumerable:!0,get:function(){return n(F).default}});var k=t(686);Object.defineProperty(exports,"SearchExecutionError",{enumerable:!0,get:function(){return n(k).default}});var T=t(687);Object.defineProperty(exports,"SearchResult",{enumerable:!0,get:function(){return n(T).default}});var D=t(697);Object.defineProperty(exports,"SearchSidebar",{enumerable:!0,get:function(){return n(D).default}});var M=t(715);Object.defineProperty(exports,"ShowQueryModal",{enumerable:!0,get:function(){return n(M).default}});var R=t(716);Object.defineProperty(exports,"SidebarMessageField",{enumerable:!0,get:function(){return n(R).default}});var O=t(201);Object.defineProperty(exports,"SurroundingSearchButton",{enumerable:!0,get:function(){return n(O).default}});var L=t(719);Object.defineProperty(exports,"QueryInput",{enumerable:!0,get:function(){return n(L).default}})},function(e,exports,t){(function(e,n){var r;(function(){function i(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function a(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function s(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function f(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function N(e,t){for(var n=e.length;n--&&A(t,e[n],0)>-1;);return n}function j(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function z(e){return"\\"+kn[e]}function H(e,t){return null==e?ie:e[t]}function U(e){return bn.test(e)}function V(e){return _n.test(e)}function G(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function W(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function q(e,t){return function(n){return e(t(n))}}function K(e,t){for(var n=-1,r=e.length,i=0,o=[];++n>>1,Ne=[["ary",Ae],["bind",me],["bindKey",ve],["curry",be],["curryRight",_e],["flip",Se],["partial",we],["partialRight",Ce],["rearg",Ee]],je="[object Arguments]",ze="[object Array]",He="[object AsyncFunction]",Ue="[object Boolean]",Ve="[object Date]",Ge="[object DOMException]",We="[object Error]",qe="[object Function]",Ke="[object GeneratorFunction]",Ye="[object Map]",Xe="[object Number]",Qe="[object Null]",Ze="[object Object]",Je="[object Proxy]",et="[object RegExp]",tt="[object Set]",nt="[object String]",rt="[object Symbol]",it="[object Undefined]",ot="[object WeakMap]",at="[object WeakSet]",st="[object ArrayBuffer]",lt="[object DataView]",ut="[object Float32Array]",ct="[object Float64Array]",dt="[object Int8Array]",ht="[object Int16Array]",ft="[object Int32Array]",pt="[object Uint8Array]",gt="[object Uint8ClampedArray]",mt="[object Uint16Array]",vt="[object Uint32Array]",yt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,_t=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wt=/&(?:amp|lt|gt|quot|#39);/g,Ct=/[&<>"']/g,At=RegExp(wt.source),Et=RegExp(Ct.source),St=/<%-([\s\S]+?)%>/g,xt=/<%([\s\S]+?)%>/g,Ft=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tt=/^\w*$/,Dt=/^\./,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rt=/[\\^$.*+?()[\]{}|]/g,Ot=RegExp(Rt.source),Lt=/^\s+|\s+$/g,Pt=/^\s+/,Bt=/\s+$/,It=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,$t=/\{\n\/\* \[wrapped with (.+)\] \*/,Nt=/,? & /,jt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zt=/\\(\\)?/g,Ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ut=/\w*$/,Vt=/^[-+]0x[0-9a-f]+$/i,Gt=/^0b[01]+$/i,Wt=/^\[object .+?Constructor\]$/,qt=/^0o[0-7]+$/i,Kt=/^(?:0|[1-9]\d*)$/,Yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,Qt=/['\n\r\u2028\u2029\\]/g,Zt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Jt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",en="["+Jt+"]",tn="["+Zt+"]",nn="[a-z\\xdf-\\xf6\\xf8-\\xff]",rn="[^\\ud800-\\udfff"+Jt+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",on="\\ud83c[\\udffb-\\udfff]",an="(?:\\ud83c[\\udde6-\\uddff]){2}",sn="[\\ud800-\\udbff][\\udc00-\\udfff]",ln="[A-Z\\xc0-\\xd6\\xd8-\\xde]",un="(?:"+nn+"|"+rn+")",cn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",dn="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",an,sn].join("|")+")[\\ufe0e\\ufe0f]?"+cn+")*",hn="[\\ufe0e\\ufe0f]?"+cn+dn,fn="(?:"+["[\\u2700-\\u27bf]",an,sn].join("|")+")"+hn,pn="(?:"+["[^\\ud800-\\udfff]"+tn+"?",tn,an,sn,"[\\ud800-\\udfff]"].join("|")+")",gn=RegExp("['’]","g"),mn=RegExp(tn,"g"),vn=RegExp(on+"(?="+on+")|"+pn+hn,"g"),yn=RegExp([ln+"?"+nn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[en,ln,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[en,ln+un,"$"].join("|")+")",ln+"?"+un+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ln+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",fn].join("|"),"g"),bn=RegExp("[\\u200d\\ud800-\\udfff"+Zt+"\\ufe0e\\ufe0f]"),_n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,wn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Cn=-1,An={};An[ut]=An[ct]=An[dt]=An[ht]=An[ft]=An[pt]=An[gt]=An[mt]=An[vt]=!0,An[je]=An[ze]=An[st]=An[Ue]=An[lt]=An[Ve]=An[We]=An[qe]=An[Ye]=An[Xe]=An[Ze]=An[et]=An[tt]=An[nt]=An[ot]=!1;var En={};En[je]=En[ze]=En[st]=En[lt]=En[Ue]=En[Ve]=En[ut]=En[ct]=En[dt]=En[ht]=En[ft]=En[Ye]=En[Xe]=En[Ze]=En[et]=En[tt]=En[nt]=En[rt]=En[pt]=En[gt]=En[mt]=En[vt]=!0,En[We]=En[qe]=En[ot]=!1;var Sn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},xn={"&":"&","<":"<",">":">",'"':""","'":"'"},Fn={"&":"&","<":"<",">":">",""":'"',"'":"'"},kn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tn=parseFloat,Dn=parseInt,Mn="object"==typeof e&&e&&e.Object===Object&&e,Rn="object"==typeof self&&self&&self.Object===Object&&self,On=Mn||Rn||Function("return this")(),Ln="object"==typeof exports&&exports&&!exports.nodeType&&exports,Pn=Ln&&"object"==typeof n&&n&&!n.nodeType&&n,Bn=Pn&&Pn.exports===Ln,In=Bn&&Mn.process,$n=function(){try{return In&&In.binding&&In.binding("util")}catch(e){}}(),Nn=$n&&$n.isArrayBuffer,jn=$n&&$n.isDate,zn=$n&&$n.isMap,Hn=$n&&$n.isRegExp,Un=$n&&$n.isSet,Vn=$n&&$n.isTypedArray,Gn=F("length"),Wn=k(Sn),qn=k(xn),Kn=k(Fn),Yn=function e(t){function n(e){if(al(e)&&!vh(e)&&!(e instanceof k)){if(e instanceof b)return e;if(vc.call(e,"__wrapped__"))return ra(e)}return new b(e)}function r(){}function b(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=ie}function k(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Be,this.__views__=[]}function Q(){var e=new k(this.__wrapped__);return e.__actions__=$i(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=$i(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=$i(this.__views__),e}function te(){if(this.__filtered__){var e=new k(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ne(){var e=this.__wrapped__.value(),t=this.__dir__,n=vh(e),r=t<0,i=n?e.length:0,o=ko(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,d=c.length,h=0,f=qc(l,this.__takeCount__);if(!n||!r&&i==l&&f==l)return bi(e,this.__actions__);var p=[];e:for(;l--&&h-1}function un(e,t){var n=this.__data__,r=Qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function cn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function ir(e,t,n,r,i,o){var a,s=t&de,u=t&he,c=t&fe;if(n&&(a=i?n(e,r,i,o):n(e)),a!==ie)return a;if(!ol(e))return e;var d=vh(e);if(d){if(a=Mo(e),!s)return $i(e,a)}else{var h=Fd(e),f=h==qe||h==Ke;if(bh(e))return xi(e,s);if(h==Ze||h==je||f&&!i){if(a=u||f?{}:Ro(e),!s)return u?zi(e,er(a,e)):ji(e,Jn(a,e))}else{if(!En[h])return i?e:{};a=Oo(e,h,ir,s)}}o||(o=new Sn);var p=o.get(e);if(p)return p;o.set(e,a);var g=c?u?_o:bo:u?Hl:zl,m=d?ie:g(e);return l(m||e,function(r,i){m&&(i=r,r=e[i]),Xn(a,i,ir(r,t,n,i,e,o))}),a}function or(e){var t=zl(e);return function(n){return ar(n,e,t)}}function ar(e,t,n){var r=n.length;if(null==e)return!r;for(e=lc(e);r--;){var i=n[r],o=t[i],a=e[i];if(a===ie&&!(i in e)||!o(a))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new dc(se);return Dd(function(){e.apply(ie,n)},t)}function lr(e,t,n,r){var i=-1,o=h,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=p(t,L(n))),r?(o=f,a=!1):t.length>=oe&&(o=B,a=!1,t=new yn(t));e:for(;++ii?0:i+n),r=r===ie||r>i?i:Al(r),r<0&&(r+=i),r=n>r?0:El(r);n0&&n(s)?t>1?fr(s,t-1,n,r,i):g(i,s):r||(i[i.length]=s)}return i}function pr(e,t){return e&&vd(e,t,zl)}function gr(e,t){return e&&yd(e,t,zl)}function mr(e,t){return d(t,function(t){return nl(e[t])})}function vr(e,t){t=Ei(t,e);for(var n=0,r=t.length;null!=e&&nt}function wr(e,t){return null!=e&&vc.call(e,t)}function Cr(e,t){return null!=e&&t in lc(e)}function Ar(e,t,n){return e>=qc(t,n)&&e=120&&c.length>=120)?new yn(a&&c):ie}c=e[0];var d=-1,g=s[0];e:for(;++d-1;)s!==e&&Mc.call(s,l,1),Mc.call(e,l,1);return e}function Jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;Bo(i)?Mc.call(e,i,1):mi(e,i)}}return e}function ei(e,t){return e+jc(Xc()*(t-e+1))}function ti(e,t,n,r){for(var i=-1,o=Wc(Nc((t-e)/(n||1)),0),a=rc(o);o--;)a[r?o:++i]=e,e+=n;return a}function ni(e,t){var n="";if(!e||t<1||t>Oe)return n;do{t%2&&(n+=e),(t=jc(t/2))&&(e+=e)}while(t);return n}function ri(e,t){return Md(Ko(e,t,Mu),e+"")}function ii(e){return Pn(eu(e))}function oi(e,t){var n=eu(e);return Jo(n,rr(t,0,n.length))}function ai(e,t,n,r){if(!ol(e))return e;t=Ei(t,e);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++ii?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=rc(i);++r>>1,a=e[o];null!==a&&!vl(a)&&(n?a<=t:a=oe){var u=t?null:Ad(e);if(u)return Y(u);a=!1,i=B,l=new yn}else l=t?[]:s;e:for(;++r=r?e:li(e,t,n)}function xi(e,t){if(t)return e.slice();var n=e.length,r=Fc?Fc(n):new e.constructor(n);return e.copy(r),r}function Fi(e){var t=new e.constructor(e.byteLength);return new xc(t).set(new xc(e)),t}function ki(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Ti(e,t,n){return m(t?n(W(e),de):W(e),i,new e.constructor)}function Di(e){var t=new e.constructor(e.source,Ut.exec(e));return t.lastIndex=e.lastIndex,t}function Mi(e,t,n){return m(t?n(Y(e),de):Y(e),o,new e.constructor)}function Ri(e){return hd?lc(hd.call(e)):{}}function Oi(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Li(e,t){if(e!==t){var n=e!==ie,r=null===e,i=e===e,o=vl(e),a=t!==ie,s=null===t,l=t===t,u=vl(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=s)return l;return l*("desc"==n[r]?-1:1)}}return e.index-t.index}function Bi(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=Wc(o-a,0),c=rc(l+u),d=!r;++s1?n[i-1]:ie,a=i>2?n[2]:ie;for(o=e.length>3&&"function"==typeof o?(i--,o):ie,a&&Io(n[0],n[1],a)&&(o=i<3?ie:o,i=1),t=lc(t);++r-1?i[o?t[a]:a]:ie}}function Zi(e){return yo(function(t){var n=t.length,r=n,i=b.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new dc(se);if(i&&!a&&"wrapper"==wo(o))var a=new b([],!0)}for(r=a?r:n;++r1&&y.reverse(),d&&ls))return!1;var u=o.get(e);if(u&&o.get(t))return u==t;var c=-1,d=!0,h=n&ge?new yn:ie;for(o.set(e,t),o.set(t,e);++c1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(It,"{\n/* [wrapped with "+t+"] */\n")}function Po(e){return vh(e)||mh(e)||!!(Rc&&e&&e[Rc])}function Bo(e,t){return!!(t=null==t?Oe:t)&&("number"==typeof e||Kt.test(e))&&e>-1&&e%1==0&&e0){if(++t>=ke)return arguments[0]}else t=0;return e.apply(ie,arguments)}}function Jo(e,t){var n=-1,r=e.length,i=r-1;for(t=t===ie?r:t;++n=this.__values__.length;return{done:e,value:e?ie:this.__values__[this.__index__++]}}function rs(){return this}function is(e){for(var t,n=this;n instanceof r;){var i=ra(n);i.__index__=0,i.__values__=ie,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t}function os(){var e=this.__wrapped__;if(e instanceof k){var t=e;return this.__actions__.length&&(t=new k(this)),t=t.reverse(),t.__actions__.push({func:Ja,args:[Ta],thisArg:ie}),new b(t,this.__chain__)}return this.thru(Ta)}function as(){return bi(this.__wrapped__,this.__actions__)}function ss(e,t,n){var r=vh(e)?c:ur;return n&&Io(e,t,n)&&(t=ie),r(e,Ao(t,3))}function ls(e,t){return(vh(e)?d:hr)(e,Ao(t,3))}function us(e,t){return fr(gs(e,t),1)}function cs(e,t){return fr(gs(e,t),Re)}function ds(e,t,n){return n=n===ie?1:Al(n),fr(gs(e,t),n)}function hs(e,t){return(vh(e)?l:gd)(e,Ao(t,3))}function fs(e,t){return(vh(e)?u:md)(e,Ao(t,3))}function ps(e,t,n,r){e=qs(e)?e:eu(e),n=n&&!r?Al(n):0;var i=e.length;return n<0&&(n=Wc(i+n,0)),ml(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&A(e,t,n)>-1}function gs(e,t){return(vh(e)?p:Hr)(e,Ao(t,3))}function ms(e,t,n,r){return null==e?[]:(vh(t)||(t=null==t?[]:[t]),n=r?ie:n,vh(n)||(n=null==n?[]:[n]),Kr(e,t,n))}function vs(e,t,n){var r=vh(e)?m:T,i=arguments.length<3;return r(e,Ao(t,4),n,i,gd)}function ys(e,t,n){var r=vh(e)?v:T,i=arguments.length<3;return r(e,Ao(t,4),n,i,md)}function bs(e,t){return(vh(e)?d:hr)(e,Os(Ao(t,3)))}function _s(e){return(vh(e)?Pn:ii)(e)}function ws(e,t,n){return t=(n?Io(e,t,n):t===ie)?1:Al(t),(vh(e)?In:oi)(e,t)}function Cs(e){return(vh(e)?$n:si)(e)}function As(e){if(null==e)return 0;if(qs(e))return ml(e)?J(e):e.length;var t=Fd(e);return t==Ye||t==tt?e.size:Nr(e).length}function Es(e,t,n){var r=vh(e)?y:ui;return n&&Io(e,t,n)&&(t=ie),r(e,Ao(t,3))}function Ss(e,t){if("function"!=typeof t)throw new dc(se);return e=Al(e),function(){if(--e<1)return t.apply(this,arguments)}}function xs(e,t,n){return t=n?ie:t,t=e&&null==t?e.length:t,co(e,Ae,ie,ie,ie,ie,t)}function Fs(e,t){var n;if("function"!=typeof t)throw new dc(se);return e=Al(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=ie),n}}function ks(e,t,n){t=n?ie:t;var r=co(e,be,ie,ie,ie,ie,ie,t);return r.placeholder=ks.placeholder,r}function Ts(e,t,n){t=n?ie:t;var r=co(e,_e,ie,ie,ie,ie,ie,t);return r.placeholder=Ts.placeholder,r}function Ds(e,t,n){function r(t){var n=h,r=f;return h=f=ie,y=t,g=e.apply(r,n)}function i(e){return y=e,m=Dd(s,t),b?r(e):g}function o(e){var n=e-v,r=e-y,i=t-n;return _?qc(i,p-r):i}function a(e){var n=e-v,r=e-y;return v===ie||n>=t||n<0||_&&r>=p}function s(){var e=oh();if(a(e))return l(e);m=Dd(s,o(e))}function l(e){return m=ie,w&&h?r(e):(h=f=ie,g)}function u(){m!==ie&&Cd(m),y=0,h=v=f=m=ie}function c(){return m===ie?g:l(oh())}function d(){var e=oh(),n=a(e);if(h=arguments,f=this,v=e,n){if(m===ie)return i(v);if(_)return m=Dd(s,t),r(v)}return m===ie&&(m=Dd(s,t)),g}var h,f,p,g,m,v,y=0,b=!1,_=!1,w=!0;if("function"!=typeof e)throw new dc(se);return t=Sl(t)||0,ol(n)&&(b=!!n.leading,_="maxWait"in n,p=_?Wc(Sl(n.maxWait)||0,t):p,w="trailing"in n?!!n.trailing:w),d.cancel=u,d.flush=c,d}function Ms(e){return co(e,Se)}function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new dc(se);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Rs.Cache||cn),n}function Os(e){if("function"!=typeof e)throw new dc(se);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Ls(e){return Fs(2,e)}function Ps(e,t){if("function"!=typeof e)throw new dc(se);return t=t===ie?t:Al(t),ri(e,t)}function Bs(e,t){if("function"!=typeof e)throw new dc(se);return t=null==t?0:Wc(Al(t),0),ri(function(n){var r=n[t],i=Si(n,0,t);return r&&g(i,r),a(e,this,i)})}function Is(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new dc(se);return ol(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ds(e,t,{leading:r,maxWait:t,trailing:i})}function $s(e){return xs(e,1)}function Ns(e,t){return dh(Ai(t),e)}function js(){if(!arguments.length)return[];var e=arguments[0];return vh(e)?e:[e]}function zs(e){return ir(e,fe)}function Hs(e,t){return t="function"==typeof t?t:ie,ir(e,fe,t)}function Us(e){return ir(e,de|fe)}function Vs(e,t){return t="function"==typeof t?t:ie,ir(e,de|fe,t)}function Gs(e,t){return null==t||ar(e,t,zl(t))}function Ws(e,t){return e===t||e!==e&&t!==t}function qs(e){return null!=e&&il(e.length)&&!nl(e)}function Ks(e){return al(e)&&qs(e)}function Ys(e){return!0===e||!1===e||al(e)&&br(e)==Ue}function Xs(e){return al(e)&&1===e.nodeType&&!pl(e)}function Qs(e){if(null==e)return!0;if(qs(e)&&(vh(e)||"string"==typeof e||"function"==typeof e.splice||bh(e)||Eh(e)||mh(e)))return!e.length;var t=Fd(e);if(t==Ye||t==tt)return!e.size;if(Ho(e))return!Nr(e).length;for(var n in e)if(vc.call(e,n))return!1;return!0}function Zs(e,t){return Dr(e,t)}function Js(e,t,n){n="function"==typeof n?n:ie;var r=n?n(e,t):ie;return r===ie?Dr(e,t,ie,n):!!r}function el(e){if(!al(e))return!1;var t=br(e);return t==We||t==Ge||"string"==typeof e.message&&"string"==typeof e.name&&!pl(e)}function tl(e){return"number"==typeof e&&Uc(e)}function nl(e){if(!ol(e))return!1;var t=br(e);return t==qe||t==Ke||t==He||t==Je}function rl(e){return"number"==typeof e&&e==Al(e)}function il(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Oe}function ol(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function al(e){return null!=e&&"object"==typeof e}function sl(e,t){return e===t||Or(e,t,So(t))}function ll(e,t,n){return n="function"==typeof n?n:ie,Or(e,t,So(t),n)}function ul(e){return fl(e)&&e!=+e}function cl(e){if(kd(e))throw new oc(ae);return Lr(e)}function dl(e){return null===e}function hl(e){return null==e}function fl(e){return"number"==typeof e||al(e)&&br(e)==Xe}function pl(e){if(!al(e)||br(e)!=Ze)return!1;var t=kc(e);if(null===t)return!0;var n=vc.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&mc.call(n)==wc}function gl(e){return rl(e)&&e>=-Oe&&e<=Oe}function ml(e){return"string"==typeof e||!vh(e)&&al(e)&&br(e)==nt}function vl(e){return"symbol"==typeof e||al(e)&&br(e)==rt}function yl(e){return e===ie}function bl(e){return al(e)&&Fd(e)==ot}function _l(e){return al(e)&&br(e)==at}function wl(e){if(!e)return[];if(qs(e))return ml(e)?ee(e):$i(e);if(Oc&&e[Oc])return G(e[Oc]());var t=Fd(e);return(t==Ye?W:t==tt?Y:eu)(e)}function Cl(e){if(!e)return 0===e?e:0;if((e=Sl(e))===Re||e===-Re){return(e<0?-1:1)*Le}return e===e?e:0}function Al(e){var t=Cl(e),n=t%1;return t===t?n?t-n:t:0}function El(e){return e?rr(Al(e),0,Be):0}function Sl(e){if("number"==typeof e)return e;if(vl(e))return Pe;if(ol(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ol(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Lt,"");var n=Gt.test(e);return n||qt.test(e)?Dn(e.slice(2),n?2:8):Vt.test(e)?Pe:+e}function xl(e){return Ni(e,Hl(e))}function Fl(e){return e?rr(Al(e),-Oe,Oe):0===e?e:0}function kl(e){return null==e?"":pi(e)}function Tl(e,t){var n=pd(e);return null==t?n:Jn(n,t)}function Dl(e,t){return w(e,Ao(t,3),pr)}function Ml(e,t){return w(e,Ao(t,3),gr)}function Rl(e,t){return null==e?e:vd(e,Ao(t,3),Hl)}function Ol(e,t){return null==e?e:yd(e,Ao(t,3),Hl)}function Ll(e,t){return e&&pr(e,Ao(t,3))}function Pl(e,t){return e&&gr(e,Ao(t,3))}function Bl(e){return null==e?[]:mr(e,zl(e))}function Il(e){return null==e?[]:mr(e,Hl(e))}function $l(e,t,n){var r=null==e?ie:vr(e,t);return r===ie?n:r}function Nl(e,t){return null!=e&&Do(e,t,wr)}function jl(e,t){return null!=e&&Do(e,t,Cr)}function zl(e){return qs(e)?Ln(e):Nr(e)}function Hl(e){return qs(e)?Ln(e,!0):jr(e)}function Ul(e,t){var n={};return t=Ao(t,3),pr(e,function(e,r,i){tr(n,t(e,r,i),e)}),n}function Vl(e,t){var n={};return t=Ao(t,3),pr(e,function(e,r,i){tr(n,r,t(e,r,i))}),n}function Gl(e,t){return Wl(e,Os(Ao(t)))}function Wl(e,t){if(null==e)return{};var n=p(_o(e),function(e){return[e]});return t=Ao(t),Xr(e,n,function(e,n){return t(e,n[0])})}function ql(e,t,n){t=Ei(t,e);var r=-1,i=t.length;for(i||(i=1,e=ie);++rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Xc();return qc(e+i*(t-e+Tn("1e-"+((i+"").length-1))),t)}return ei(e,t)}function ou(e){return Xh(kl(e).toLowerCase())}function au(e){return(e=kl(e))&&e.replace(Yt,Wn).replace(mn,"")}function su(e,t,n){e=kl(e),t=pi(t);var r=e.length;n=n===ie?r:rr(Al(n),0,r);var i=n;return(n-=t.length)>=0&&e.slice(n,i)==t}function lu(e){return e=kl(e),e&&Et.test(e)?e.replace(Ct,qn):e}function uu(e){return e=kl(e),e&&Ot.test(e)?e.replace(Rt,"\\$&"):e}function cu(e,t,n){e=kl(e),t=Al(t);var r=t?J(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return ro(jc(i),n)+e+ro(Nc(i),n)}function du(e,t,n){e=kl(e),t=Al(t);var r=t?J(e):0;return t&&r>>0)?(e=kl(e),e&&("string"==typeof t||null!=t&&!Ch(t))&&!(t=pi(t))&&U(e)?Si(ee(e),0,n):e.split(t,n)):[]}function vu(e,t,n){return e=kl(e),n=null==n?0:rr(Al(n),0,e.length),t=pi(t),e.slice(n,n+t.length)==t}function yu(e,t,r){var i=n.templateSettings;r&&Io(e,t,r)&&(t=ie),e=kl(e),t=Th({},t,i,ho);var o,a,s=Th({},t.imports,i.imports,ho),l=zl(s),u=P(s,l),c=0,d=t.interpolate||Xt,h="__p += '",f=uc((t.escape||Xt).source+"|"+d.source+"|"+(d===Ft?Ht:Xt).source+"|"+(t.evaluate||Xt).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Cn+"]")+"\n";e.replace(f,function(t,n,r,i,s,l){return r||(r=i),h+=e.slice(c,l).replace(Qt,z),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),s&&(a=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),h+="';\n";var g=t.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(a?h.replace(yt,""):h).replace(bt,"$1").replace(_t,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Qh(function(){return ac(l,p+"return "+h).apply(ie,u)});if(m.source=h,el(m))throw m;return m}function bu(e){return kl(e).toLowerCase()}function _u(e){return kl(e).toUpperCase()}function wu(e,t,n){if((e=kl(e))&&(n||t===ie))return e.replace(Lt,"");if(!e||!(t=pi(t)))return e;var r=ee(e),i=ee(t);return Si(r,I(r,i),N(r,i)+1).join("")}function Cu(e,t,n){if((e=kl(e))&&(n||t===ie))return e.replace(Bt,"");if(!e||!(t=pi(t)))return e;var r=ee(e);return Si(r,0,N(r,ee(t))+1).join("")}function Au(e,t,n){if((e=kl(e))&&(n||t===ie))return e.replace(Pt,"");if(!e||!(t=pi(t)))return e;var r=ee(e);return Si(r,I(r,ee(t))).join("")}function Eu(e,t){var n=xe,r=Fe;if(ol(t)){var i="separator"in t?t.separator:i;n="length"in t?Al(t.length):n,r="omission"in t?pi(t.omission):r}e=kl(e);var o=e.length;if(U(e)){var a=ee(e);o=a.length}if(n>=o)return e;var s=n-J(r);if(s<1)return r;var l=a?Si(a,0,s).join(""):e.slice(0,s);if(i===ie)return l+r;if(a&&(s+=l.length-s),Ch(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=uc(i.source,kl(Ut.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===ie?s:d)}}else if(e.indexOf(pi(i),s)!=s){var h=l.lastIndexOf(i);h>-1&&(l=l.slice(0,h))}return l+r}function Su(e){return e=kl(e),e&&At.test(e)?e.replace(wt,Kn):e}function xu(e,t,n){return e=kl(e),t=n?ie:t,t===ie?V(e)?re(e):_(e):e.match(t)||[]}function Fu(e){var t=null==e?0:e.length,n=Ao();return e=t?p(e,function(e){if("function"!=typeof e[1])throw new dc(se);return[n(e[0]),e[1]]}):[],ri(function(n){for(var r=-1;++rOe)return[];var n=Be,r=qc(e,Be);t=Ao(t),e-=Be;for(var i=R(r,t);++n1?e[t-1]:ie;return n="function"==typeof n?(e.pop(),n):ie,Ka(e,n)}),Xd=yo(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return nr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof k&&Bo(n)?(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:Ja,args:[i],thisArg:ie}),new b(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(ie),e})):this.thru(i)}),Qd=Hi(function(e,t,n){vc.call(e,n)?++e[n]:tr(e,n,1)}),Zd=Qi(ha),Jd=Qi(fa),eh=Hi(function(e,t,n){vc.call(e,n)?e[n].push(t):tr(e,n,[t])}),th=ri(function(e,t,n){var r=-1,i="function"==typeof t,o=qs(e)?rc(e.length):[];return gd(e,function(e){o[++r]=i?a(t,e,n):xr(e,t,n)}),o}),nh=Hi(function(e,t,n){tr(e,n,t)}),rh=Hi(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ih=ri(function(e,t){if(null==e)return[];var n=t.length;return n>1&&Io(e,t[0],t[1])?t=[]:n>2&&Io(t[0],t[1],t[2])&&(t=[t[0]]),Kr(e,fr(t,1),[])}),oh=Ic||function(){return On.Date.now()},ah=ri(function(e,t,n){var r=me;if(n.length){var i=K(n,Co(ah));r|=we}return co(e,r,t,n,i)}),sh=ri(function(e,t,n){var r=me|ve;if(n.length){var i=K(n,Co(sh));r|=we}return co(t,r,e,n,i)}),lh=ri(function(e,t){return sr(e,1,t)}),uh=ri(function(e,t,n){return sr(e,Sl(t)||0,n)});Rs.Cache=cn;var ch=wd(function(e,t){t=1==t.length&&vh(t[0])?p(t[0],L(Ao())):p(fr(t,1),L(Ao()));var n=t.length;return ri(function(r){for(var i=-1,o=qc(r.length,n);++i=t}),mh=Fr(function(){return arguments}())?Fr:function(e){return al(e)&&vc.call(e,"callee")&&!Dc.call(e,"callee")},vh=rc.isArray,yh=Nn?L(Nn):kr,bh=Hc||Hu,_h=jn?L(jn):Tr,wh=zn?L(zn):Rr,Ch=Hn?L(Hn):Pr,Ah=Un?L(Un):Br,Eh=Vn?L(Vn):Ir,Sh=ao(zr),xh=ao(function(e,t){return e<=t}),Fh=Ui(function(e,t){if(Ho(t)||qs(t))return void Ni(t,zl(t),e);for(var n in t)vc.call(t,n)&&Xn(e,n,t[n])}),kh=Ui(function(e,t){Ni(t,Hl(t),e)}),Th=Ui(function(e,t,n,r){Ni(t,Hl(t),e,r)}),Dh=Ui(function(e,t,n,r){Ni(t,zl(t),e,r)}),Mh=yo(nr),Rh=ri(function(e){return e.push(ie,ho),a(Th,ie,e)}),Oh=ri(function(e){return e.push(ie,fo),a($h,ie,e)}),Lh=eo(function(e,t,n){e[t]=n},Tu(Mu)),Ph=eo(function(e,t,n){vc.call(e,t)?e[t].push(n):e[t]=[n]},Ao),Bh=ri(xr),Ih=Ui(function(e,t,n){Gr(e,t,n)}),$h=Ui(function(e,t,n,r){Gr(e,t,n,r)}),Nh=yo(function(e,t){var n={};if(null==e)return n;var r=!1;t=p(t,function(t){return t=Ei(t,e),r||(r=t.length>1),t}),Ni(e,_o(e),n),r&&(n=ir(n,de|he|fe,po));for(var i=t.length;i--;)mi(n,t[i]);return n}),jh=yo(function(e,t){return null==e?{}:Yr(e,t)}),zh=uo(zl),Hh=uo(Hl),Uh=Ki(function(e,t,n){return t=t.toLowerCase(),e+(n?ou(t):t)}),Vh=Ki(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Gh=Ki(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Wh=qi("toLowerCase"),qh=Ki(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),Kh=Ki(function(e,t,n){return e+(n?" ":"")+Xh(t)}),Yh=Ki(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Xh=qi("toUpperCase"),Qh=ri(function(e,t){try{return a(e,ie,t)}catch(e){return el(e)?e:new oc(e)}}),Zh=yo(function(e,t){return l(t,function(t){t=ea(t),tr(e,t,ah(e[t],e))}),e}),Jh=Zi(),ef=Zi(!0),tf=ri(function(e,t){return function(n){return xr(n,e,t)}}),nf=ri(function(e,t){return function(n){return xr(e,n,t)}}),rf=no(p),of=no(c),af=no(y),sf=oo(),lf=oo(!0),uf=to(function(e,t){return e+t},0),cf=lo("ceil"),df=to(function(e,t){return e/t},1),hf=lo("floor"),ff=to(function(e,t){return e*t},1),pf=lo("round"),gf=to(function(e,t){return e-t},0);return n.after=Ss,n.ary=xs,n.assign=Fh,n.assignIn=kh,n.assignInWith=Th,n.assignWith=Dh,n.at=Mh,n.before=Fs,n.bind=ah,n.bindAll=Zh,n.bindKey=sh,n.castArray=js,n.chain=Qa,n.chunk=ia,n.compact=oa,n.concat=aa,n.cond=Fu,n.conforms=ku,n.constant=Tu,n.countBy=Qd,n.create=Tl,n.curry=ks,n.curryRight=Ts,n.debounce=Ds,n.defaults=Rh,n.defaultsDeep=Oh,n.defer=lh,n.delay=uh,n.difference=Od,n.differenceBy=Ld,n.differenceWith=Pd,n.drop=sa,n.dropRight=la,n.dropRightWhile=ua,n.dropWhile=ca,n.fill=da,n.filter=ls,n.flatMap=us,n.flatMapDeep=cs,n.flatMapDepth=ds,n.flatten=pa,n.flattenDeep=ga,n.flattenDepth=ma,n.flip=Ms,n.flow=Jh,n.flowRight=ef,n.fromPairs=va,n.functions=Bl,n.functionsIn=Il,n.groupBy=eh,n.initial=_a,n.intersection=Bd,n.intersectionBy=Id,n.intersectionWith=$d,n.invert=Lh,n.invertBy=Ph,n.invokeMap=th,n.iteratee=Ru,n.keyBy=nh,n.keys=zl,n.keysIn=Hl,n.map=gs,n.mapKeys=Ul,n.mapValues=Vl,n.matches=Ou,n.matchesProperty=Lu,n.memoize=Rs,n.merge=Ih,n.mergeWith=$h,n.method=tf,n.methodOf=nf,n.mixin=Pu,n.negate=Os,n.nthArg=$u,n.omit=Nh,n.omitBy=Gl,n.once=Ls,n.orderBy=ms,n.over=rf,n.overArgs=ch,n.overEvery=of,n.overSome=af,n.partial=dh,n.partialRight=hh,n.partition=rh,n.pick=jh,n.pickBy=Wl,n.property=Nu,n.propertyOf=ju,n.pull=Nd,n.pullAll=Sa,n.pullAllBy=xa,n.pullAllWith=Fa,n.pullAt=jd,n.range=sf,n.rangeRight=lf,n.rearg=fh,n.reject=bs,n.remove=ka,n.rest=Ps,n.reverse=Ta,n.sampleSize=ws,n.set=Kl,n.setWith=Yl,n.shuffle=Cs,n.slice=Da,n.sortBy=ih,n.sortedUniq=Ia,n.sortedUniqBy=$a,n.split=mu,n.spread=Bs,n.tail=Na,n.take=ja,n.takeRight=za,n.takeRightWhile=Ha,n.takeWhile=Ua,n.tap=Za,n.throttle=Is,n.thru=Ja,n.toArray=wl,n.toPairs=zh,n.toPairsIn=Hh,n.toPath=qu,n.toPlainObject=xl,n.transform=Xl,n.unary=$s,n.union=zd,n.unionBy=Hd,n.unionWith=Ud,n.uniq=Va,n.uniqBy=Ga,n.uniqWith=Wa,n.unset=Ql,n.unzip=qa,n.unzipWith=Ka,n.update=Zl,n.updateWith=Jl,n.values=eu,n.valuesIn=tu,n.without=Vd,n.words=xu,n.wrap=Ns,n.xor=Gd,n.xorBy=Wd,n.xorWith=qd,n.zip=Kd,n.zipObject=Ya,n.zipObjectDeep=Xa,n.zipWith=Yd,n.entries=zh,n.entriesIn=Hh,n.extend=kh,n.extendWith=Th,Pu(n,n),n.add=uf,n.attempt=Qh,n.camelCase=Uh,n.capitalize=ou,n.ceil=cf,n.clamp=nu,n.clone=zs,n.cloneDeep=Us,n.cloneDeepWith=Vs,n.cloneWith=Hs,n.conformsTo=Gs,n.deburr=au,n.defaultTo=Du,n.divide=df,n.endsWith=su,n.eq=Ws,n.escape=lu,n.escapeRegExp=uu,n.every=ss,n.find=Zd,n.findIndex=ha,n.findKey=Dl,n.findLast=Jd,n.findLastIndex=fa,n.findLastKey=Ml,n.floor=hf,n.forEach=hs,n.forEachRight=fs,n.forIn=Rl,n.forInRight=Ol,n.forOwn=Ll,n.forOwnRight=Pl,n.get=$l,n.gt=ph,n.gte=gh,n.has=Nl,n.hasIn=jl,n.head=ya,n.identity=Mu,n.includes=ps,n.indexOf=ba,n.inRange=ru,n.invoke=Bh,n.isArguments=mh,n.isArray=vh,n.isArrayBuffer=yh,n.isArrayLike=qs,n.isArrayLikeObject=Ks,n.isBoolean=Ys,n.isBuffer=bh,n.isDate=_h,n.isElement=Xs,n.isEmpty=Qs,n.isEqual=Zs,n.isEqualWith=Js,n.isError=el,n.isFinite=tl,n.isFunction=nl,n.isInteger=rl,n.isLength=il,n.isMap=wh,n.isMatch=sl,n.isMatchWith=ll,n.isNaN=ul,n.isNative=cl,n.isNil=hl,n.isNull=dl,n.isNumber=fl,n.isObject=ol,n.isObjectLike=al,n.isPlainObject=pl,n.isRegExp=Ch,n.isSafeInteger=gl,n.isSet=Ah,n.isString=ml,n.isSymbol=vl,n.isTypedArray=Eh,n.isUndefined=yl,n.isWeakMap=bl,n.isWeakSet=_l,n.join=wa,n.kebabCase=Vh,n.last=Ca,n.lastIndexOf=Aa,n.lowerCase=Gh,n.lowerFirst=Wh,n.lt=Sh,n.lte=xh,n.max=Yu,n.maxBy=Xu,n.mean=Qu,n.meanBy=Zu,n.min=Ju,n.minBy=ec,n.stubArray=zu,n.stubFalse=Hu,n.stubObject=Uu,n.stubString=Vu,n.stubTrue=Gu,n.multiply=ff,n.nth=Ea,n.noConflict=Bu,n.noop=Iu,n.now=oh,n.pad=cu,n.padEnd=du,n.padStart=hu,n.parseInt=fu,n.random=iu,n.reduce=vs,n.reduceRight=ys,n.repeat=pu,n.replace=gu,n.result=ql,n.round=pf,n.runInContext=e,n.sample=_s,n.size=As,n.snakeCase=qh,n.some=Es,n.sortedIndex=Ma,n.sortedIndexBy=Ra,n.sortedIndexOf=Oa,n.sortedLastIndex=La,n.sortedLastIndexBy=Pa,n.sortedLastIndexOf=Ba,n.startCase=Kh,n.startsWith=vu,n.subtract=gf,n.sum=tc,n.sumBy=nc,n.template=yu,n.times=Wu,n.toFinite=Cl,n.toInteger=Al,n.toLength=El,n.toLower=bu,n.toNumber=Sl,n.toSafeInteger=Fl,n.toString=kl,n.toUpper=_u,n.trim=wu,n.trimEnd=Cu,n.trimStart=Au,n.truncate=Eu,n.unescape=Su,n.uniqueId=Ku,n.upperCase=Yh,n.upperFirst=Xh,n.each=hs,n.eachRight=fs,n.first=ya,Pu(n,function(){var e={};return pr(n,function(t,r){vc.call(n.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),n.VERSION="4.17.4",l(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){n[e].placeholder=n}),l(["drop","take"],function(e,t){k.prototype[e]=function(n){n=n===ie?1:Wc(Al(n),0);var r=this.__filtered__&&!t?new k(this):this.clone();return r.__filtered__?r.__takeCount__=qc(n,r.__takeCount__):r.__views__.push({size:qc(n,Be),type:e+(r.__dir__<0?"Right":"")}),r},k.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),l(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==De||3==n;k.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ao(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),l(["head","last"],function(e,t){var n="take"+(t?"Right":"");k.prototype[e]=function(){return this[n](1).value()[0]}}),l(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");k.prototype[e]=function(){return this.__filtered__?new k(this):this[n](1)}}),k.prototype.compact=function(){return this.filter(Mu)},k.prototype.find=function(e){return this.filter(e).head()},k.prototype.findLast=function(e){return this.reverse().find(e)},k.prototype.invokeMap=ri(function(e,t){return"function"==typeof e?new k(this):this.map(function(n){return xr(n,e,t)})}),k.prototype.reject=function(e){return this.filter(Os(Ao(e)))},k.prototype.slice=function(e,t){e=Al(e);var n=this;return n.__filtered__&&(e>0||t<0)?new k(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==ie&&(t=Al(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},k.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},k.prototype.toArray=function(){return this.take(Be)},pr(k.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=n[i?"take"+("last"==t?"Right":""):t],a=i||/^find/.test(t);o&&(n.prototype[t]=function(){var t=this.__wrapped__,s=i?[1]:arguments,l=t instanceof k,u=s[0],c=l||vh(t),d=function(e){var t=o.apply(n,g([e],s));return i&&h?t[0]:t};c&&r&&"function"==typeof u&&1!=u.length&&(l=c=!1);var h=this.__chain__,f=!!this.__actions__.length,p=a&&!h,m=l&&!f;if(!a&&c){t=m?t:new k(this);var v=e.apply(t,s);return v.__actions__.push({func:Ja,args:[d],thisArg:ie}),new b(v,h)}return p&&m?e.apply(this,s):(v=this.thru(d),p?i?v.value()[0]:v.value():v)})}),l(["pop","push","shift","sort","splice","unshift"],function(e){var t=hc[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);n.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var n=this.value();return t.apply(vh(n)?n:[],e)}return this[r](function(n){return t.apply(vh(n)?n:[],e)})}}),pr(k.prototype,function(e,t){var r=n[t];if(r){var i=r.name+"";(od[i]||(od[i]=[])).push({name:t,func:r})}}),od[Ji(ie,ve).name]=[{name:"wrapper",func:ie}],k.prototype.clone=Q,k.prototype.reverse=te,k.prototype.value=ne,n.prototype.at=Xd,n.prototype.chain=es,n.prototype.commit=ts,n.prototype.next=ns,n.prototype.plant=is,n.prototype.reverse=os,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=as,n.prototype.first=n.prototype.head,Oc&&(n.prototype[Oc]=rs),n}();On._=Yn,(r=function(){return Yn}.call(exports,t,exports,n))!==ie&&(n.exports=r)}).call(this)}).call(exports,t(21),t(40)(e))},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(1),i=n(r),o=t(0),a=n(o),s=t(27),l=n(s),u=a.default.createClass({displayName:"DocumentationLink",propTypes:{page:i.default.string.isRequired,text:i.default.node.isRequired,title:i.default.string},render:function(){return a.default.createElement("a",{href:l.default.toString(this.props.page),title:this.props.title,target:"_blank"},this.props.text)}});exports.default=u,e.exports=exports.default},function(e,exports,t){var n,r;!function(){function i(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}function a(e,t){return et?1:e>=t?0:NaN}function s(e){return null===e?NaN:+e}function l(e){return!isNaN(e)}function u(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}function c(e){return e.length}function d(e){for(var t=1;e*t%1;)t*=10;return t}function h(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function f(){this._=Object.create(null)}function p(e){return(e+="")===Ea||e[0]===Sa?Sa+e:e}function g(e){return(e+="")[0]===Sa?e.slice(1):e}function m(e){return p(e)in this._}function v(e){return(e=p(e))in this._&&delete this._[e]}function y(){var e=[];for(var t in this._)e.push(g(t));return e}function b(){var e=0;for(var t in this._)++e;return e}function _(){for(var e in this._)return!1;return!0}function w(){this._=Object.create(null)}function C(e){return e}function A(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function E(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=xa.length;n=t&&(t=i+1);!(a=s[t])&&++t0&&(e=e.slice(0,s));var u=Ba.get(e);return u&&(e=u,l=J),s?t?i:r:t?S:o}function Z(e,t){return function(n){var r=fa.event;fa.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{fa.event=r}}}function J(e,t){var n=Z(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}function ee(e){var t=".dragsuppress-"+ ++$a,n="click"+t,r=fa.select(o(e)).on("touchmove"+t,k).on("dragstart"+t,k).on("selectstart"+t,k);if(null==Ia&&(Ia=!("onselectstart"in e)&&E(e.style,"userSelect")),Ia){var a=i(e).style,s=a[Ia];a[Ia]="none"}return function(e){if(r.on(t,null),Ia&&(a[Ia]=s),e){var i=function(){r.on(n,null)};r.on(n,function(){k(),i()},!0),setTimeout(i,0)}}}function te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Na<0){var i=o(e);if(i.scrollX||i.scrollY){n=fa.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=n[0][0].getScreenCTM();Na=!(a.f||a.e),n.remove()}}return Na?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function ne(){return fa.event.changedTouches[0].identifier}function re(e){return e>0?1:e<0?-1:0}function ie(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function oe(e){return e>1?0:e<-1?Ha:Math.acos(e)}function ae(e){return e>1?Ga:e<-1?-Ga:Math.asin(e)}function se(e){return((e=Math.exp(e))-1/e)/2}function le(e){return((e=Math.exp(e))+1/e)/2}function ue(e){return((e=Math.exp(2*e))-1)/(e+1)}function ce(e){return(e=Math.sin(e/2))*e}function de(){}function he(e,t,n){return this instanceof he?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof he?new he(e.h,e.s,e.l):xe(""+e,Fe,he):new he(e,t,n)}function fe(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?o+(a-o)*e/60:e<180?a:e<240?o+(a-o)*(240-e)/60:o}function i(e){return Math.round(255*r(e))}var o,a;return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)?0:t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a,new Ce(i(e+120),i(e),i(e-120))}function pe(e,t,n){return this instanceof pe?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof pe?new pe(e.h,e.c,e.l):e instanceof me?ye(e.l,e.a,e.b):ye((e=ke((e=fa.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new pe(e,t,n)}function ge(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new me(n,Math.cos(e*=Wa)*t,Math.sin(e)*t)}function me(e,t,n){return this instanceof me?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof me?new me(e.l,e.a,e.b):e instanceof pe?ge(e.h,e.c,e.l):ke((e=Ce(e)).r,e.g,e.b):new me(e,t,n)}function ve(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return i=be(i)*ts,r=be(r)*ns,o=be(o)*rs,new Ce(we(3.2404542*i-1.5371385*r-.4985314*o),we(-.969266*i+1.8760108*r+.041556*o),we(.0556434*i-.2040259*r+1.0572252*o))}function ye(e,t,n){return e>0?new pe(Math.atan2(n,t)*qa,Math.sqrt(t*t+n*n),e):new pe(NaN,NaN,e)}function be(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function _e(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function we(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function Ce(e,t,n){return this instanceof Ce?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof Ce?new Ce(e.r,e.g,e.b):xe(""+e,Ce,fe):new Ce(e,t,n)}function Ae(e){return new Ce(e>>16,e>>8&255,255&e)}function Ee(e){return Ae(e)+""}function Se(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function xe(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(De(i[0]),De(i[1]),De(i[2]))}return(o=as.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function Fe(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t0&&l<1?0:r),new he(r,i,l)}function ke(e,t,n){e=Te(e),t=Te(t),n=Te(n);var r=_e((.4124564*e+.3575761*t+.1804375*n)/ts),i=_e((.2126729*e+.7151522*t+.072175*n)/ns);return me(116*i-16,500*(r-i),200*(i-_e((.0193339*e+.119192*t+.9503041*n)/rs)))}function Te(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function De(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}function Me(e){return"function"==typeof e?e:function(){return e}}function Re(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Oe(t,n,e,r)}}function Oe(e,t,n,r){function i(){var e,t=l.status;if(!t&&Pe(l)||t>=200&&t<300||304===t){try{e=n.call(o,l)}catch(e){return void a.error.call(o,e)}a.load.call(o,e)}else a.error.call(o,l)}var o={},a=fa.dispatch("beforesend","progress","load","error"),s={},l=new XMLHttpRequest,u=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(e)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(e){var t=fa.event;fa.event=e;try{a.progress.call(o,l)}finally{fa.event=t}},o.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s[e]:(null==t?delete s[e]:s[e]=t+"",o)},o.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",o):t},o.responseType=function(e){return arguments.length?(u=e,o):u},o.response=function(e){return n=e,o},["get","post"].forEach(function(e){o[e]=function(){return o.send.apply(o,[e].concat(ga(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(n,e,!0),null==t||"accept"in s||(s.accept=t+",*/*"),l.setRequestHeader)for(var c in s)l.setRequestHeader(c,s[c]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=u&&(l.responseType=u),null!=i&&o.on("error",i).on("load",function(e){i(null,e)}),a.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},fa.rebind(o,a,"on"),null==r?o:o.get(Le(r))}function Le(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}function Pe(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}function Be(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return ls?ls.n=o:ss=o,ls=o,us||(cs=clearTimeout(cs),us=1,ds(Ie)),o}function Ie(){var e=$e(),t=Ne()-e;t>24?(isFinite(t)&&(clearTimeout(cs),cs=setTimeout(Ie,t)),us=0):(us=1,ds(Ie))}function $e(){for(var e=Date.now(),t=ss;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Ne(){for(var e,t=ss,n=1/0;t;)t.c?(t.t8?function(e){return e/n}:function(e){return e*n},symbol:e}}function He(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,o=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:C;return function(e){var n=fs.exec(e),r=n[1]||" ",a=n[2]||">",s=n[3]||"-",l=n[4]||"",u=n[5],c=+n[6],d=n[7],h=n[8],f=n[9],p=1,g="",m="",v=!1,y=!0;switch(h&&(h=+h.substring(1)),(u||"0"===r&&"="===a)&&(u=r="0",a="="),f){case"n":d=!0,f="g";break;case"%":p=100,m="%",f="f";break;case"p":p=100,m="%",f="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+f.toLowerCase());case"c":y=!1;case"d":v=!0,h=0;break;case"s":p=-1,f="r"}"$"===l&&(g=i[0],m=i[1]),"r"!=f||h||(f="g"),null!=h&&("g"==f?h=Math.max(1,Math.min(21,h)):"e"!=f&&"f"!=f||(h=Math.max(0,Math.min(20,h)))),f=ps.get(f)||Ue;var b=u&&d;return function(e){var n=m;if(v&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===s?"":s;if(p<0){var l=fa.formatPrefix(e,h);e=l.scale(e),n=l.symbol+m}else e*=p;e=f(e,h);var _,w,C=e.lastIndexOf(".");if(C<0){var A=y?e.lastIndexOf("e"):-1;A<0?(_=e,w=""):(_=e.substring(0,A),w=e.substring(A))}else _=e.substring(0,C),w=t+e.substring(C+1);!u&&d&&(_=o(_,1/0));var E=g.length+_.length+w.length+(b?0:i.length),S=E"===a?S+i+e:"^"===a?S.substring(0,E>>=1)+i+e+S.substring(E):i+(b?e:S+e))+n}}}function Ue(e){return e+""}function Ve(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ge(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n1)for(;a=u)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=T[a in ys?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(e,t,n){C.lastIndex=0;var r=C.exec(t.slice(n));return r?(e.w=A.get(r[0].toLowerCase()),n+r[0].length):-1}function i(e,t,n){_.lastIndex=0;var r=_.exec(t.slice(n));return r?(e.w=w.get(r[0].toLowerCase()),n+r[0].length):-1}function o(e,t,n){x.lastIndex=0;var r=x.exec(t.slice(n));return r?(e.m=F.get(r[0].toLowerCase()),n+r[0].length):-1}function a(e,t,n){E.lastIndex=0;var r=E.exec(t.slice(n));return r?(e.m=S.get(r[0].toLowerCase()),n+r[0].length):-1}function s(e,t,r){return n(e,k.c.toString(),t,r)}function l(e,t,r){return n(e,k.x.toString(),t,r)}function u(e,t,r){return n(e,k.X.toString(),t,r)}function c(e,t,n){var r=b.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)}var d=e.dateTime,h=e.date,f=e.time,p=e.periods,g=e.days,m=e.shortDays,v=e.months,y=e.shortMonths;t.utc=function(e){function n(e){try{ms=Ve;var t=new ms;return t._=e,r(t)}finally{ms=Date}}var r=t(e);return n.parse=function(e){try{ms=Ve;var t=r.parse(e);return t&&t._}finally{ms=Date}},n.toString=r.toString,n},t.multi=t.utc.multi=ft;var b=fa.map(),_=Ye(g),w=Xe(g),C=Ye(m),A=Xe(m),E=Ye(v),S=Xe(v),x=Ye(y),F=Xe(y);p.forEach(function(e,t){b.set(e.toLowerCase(),t)});var k={a:function(e){return m[e.getDay()]},A:function(e){return g[e.getDay()]},b:function(e){return y[e.getMonth()]},B:function(e){return v[e.getMonth()]},c:t(d),d:function(e,t){return Ke(e.getDate(),t,2)},e:function(e,t){return Ke(e.getDate(),t,2)},H:function(e,t){return Ke(e.getHours(),t,2)},I:function(e,t){return Ke(e.getHours()%12||12,t,2)},j:function(e,t){return Ke(1+gs.dayOfYear(e),t,3)},L:function(e,t){return Ke(e.getMilliseconds(),t,3)},m:function(e,t){return Ke(e.getMonth()+1,t,2)},M:function(e,t){return Ke(e.getMinutes(),t,2)},p:function(e){return p[+(e.getHours()>=12)]},S:function(e,t){return Ke(e.getSeconds(),t,2)},U:function(e,t){return Ke(gs.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Ke(gs.mondayOfYear(e),t,2)},x:t(h),X:t(f),y:function(e,t){return Ke(e.getFullYear()%100,t,2)},Y:function(e,t){return Ke(e.getFullYear()%1e4,t,4)},Z:dt,"%":function(){return"%"}},T={a:r,A:i,b:o,B:a,c:s,d:ot,e:ot,H:st,I:st,j:at,L:ct,m:it,M:lt,p:c,S:ut,U:Ze,w:Qe,W:Je,x:l,X:u,y:tt,Y:et,Z:nt,"%":ht};return t}function Ke(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o68?1900:2e3)}function it(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ot(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function at(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function st(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function lt(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ut(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ct(e,t,n){bs.lastIndex=0;var r=bs.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dt(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=Aa(t)/60|0,i=Aa(t)%60;return n+Ke(r,"0",2)+Ke(i,"0",2)}function ht(e,t,n){_s.lastIndex=0;var r=_s.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ft(e){for(var t=e.length,n=-1;++n=0?1:-1,s=a*n,l=Math.cos(t),u=Math.sin(t),c=o*u,d=i*l+c*Math.cos(s),h=c*a*Math.sin(s);xs.add(Math.atan2(h,d)),r=e,i=l,o=u}var t,n,r,i,o;Fs.point=function(a,s){Fs.point=e,r=(t=a)*Wa,i=Math.cos(s=(n=s)*Wa/2+Ha/4),o=Math.sin(s)},Fs.lineEnd=function(){e(t,n)}}function _t(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function wt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Ct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function At(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Et(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function St(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function xt(e){return[Math.atan2(e[1],e[0]),ae(e[2])]}function Ft(e,t){return Aa(e[0]-t[0])=0;--s)i.point((d=c[s])[0],d[1])}else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,p=!p}while(!f.v);i.lineEnd()}}}function Bt(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r0){for(w||(o.polygonStart(),w=!0),o.lineStart();++a1&&2&t&&n.push(n.pop().concat(n.shift())),f.push(n.filter(Nt))}var f,p,g,m=t(o),v=i.invert(r[0],r[1]),y={point:a,lineStart:l,lineEnd:u,polygonStart:function(){y.point=c,y.lineStart=d,y.lineEnd=h,f=[],p=[]},polygonEnd:function(){y.point=a,y.lineStart=l,y.lineEnd=u,f=fa.merge(f);var e=Gt(v,p);f.length?(w||(o.polygonStart(),w=!0),Pt(f,zt,e,n,o)):e&&(w||(o.polygonStart(),w=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),w&&(o.polygonEnd(),w=!1),f=p=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=jt(),_=t(b),w=!1;return y}}function Nt(e){return e.length>1}function jt(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:S,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function zt(e,t){return((e=e.x)[0]<0?e[1]-Ga-ja:Ga-e[1])-((t=t.x)[0]<0?t[1]-Ga-ja:Ga-t[1])}function Ht(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Ha:-Ha,l=Aa(o-n);Aa(l-Ha)0?Ga:-Ga),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=Ha&&(Aa(n-i)ja?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}function Vt(e,t,n,r){var i;if(null==e)i=n*Ga,r.point(-Ha,i),r.point(0,i),r.point(Ha,i),r.point(Ha,0),r.point(Ha,-i),r.point(0,-i),r.point(-Ha,-i),r.point(-Ha,0),r.point(-Ha,i);else if(Aa(e[0]-t[0])>ja){var o=e[0]=0?1:-1,A=C*w,E=A>Ha,S=p*b;if(xs.add(Math.atan2(S*C*Math.sin(A),g*_+S*Math.cos(A))),o+=E?w+C*Ua:w,E^h>=n^v>=n){var x=Ct(_t(d),_t(e));St(x);var F=Ct(i,x);St(F);var k=(E^w>=0?-1:1)*ae(F[2]);(r>k||r===k&&(x[0]||x[1]))&&(a+=E^w>=0?1:-1)}if(!m++)break;h=v,p=b,g=_,d=e}}return(o<-ja||oo}function n(e){var n,o,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,h){var f,p=[d,h],g=t(d,h),m=a?g?0:i(d,h):g?i(d+(d<0?Ha:-Ha),h):0;if(!n&&(u=l=g)&&e.lineStart(),g!==l&&(f=r(n,p),(Ft(n,f)||Ft(p,f))&&(p[0]+=ja,p[1]+=ja,g=t(p[0],p[1]))),g!==l)c=0,g?(e.lineStart(),f=r(p,n),e.point(f[0],f[1])):(f=r(n,p),e.point(f[0],f[1]),e.lineEnd()),n=f;else if(s&&n&&a^g){var v;m&o||!(v=r(p,n,!0))||(c=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!g||n&&Ft(n,p)||e.point(p[0],p[1]),n=p,l=g,o=m},lineEnd:function(){l&&e.lineEnd(),n=null},clean:function(){return c|(u&&l)<<1}}}function r(e,t,n){var r=_t(e),i=_t(t),a=[1,0,0],s=Ct(r,i),l=wt(s,s),u=s[0],c=l-u*u;if(!c)return!n&&e;var d=o*l/c,h=-o*u/c,f=Ct(a,s),p=Et(a,d);At(p,Et(s,h));var g=f,m=wt(p,g),v=wt(g,g),y=m*m-v*(wt(p,p)-1);if(!(y<0)){var b=Math.sqrt(y),_=Et(g,(-m-b)/v);if(At(_,p),_=xt(_),!n)return _;var w,C=e[0],A=t[0],E=e[1],S=t[1];A0^_[1]<(Aa(_[0]-C)Ha^(C<=_[0]&&_[0]<=A)){var T=Et(g,(-m+b)/v);return At(T,p),[_,xt(T)]}}}function i(t,n){var r=a?e:Ha-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var o=Math.cos(e),a=o>0,s=Aa(o)>ja;return $t(t,n,_n(e,6*Wa),a?[0,-e]:[-Ha,e-Ha])}function qt(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,u=a.y,c=s.x,d=s.y,h=0,f=1,p=c-l,g=d-u;if(o=e-l,p||!(o>0)){if(o/=p,p<0){if(o0){if(o>f)return;o>h&&(h=o)}if(o=n-l,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>h&&(h=o)}else if(p>0){if(o0)){if(o/=g,g<0){if(o0){if(o>f)return;o>h&&(h=o)}if(o=r-u,g||!(o<0)){if(o/=g,g<0){if(o>f)return;o>h&&(h=o)}else if(g>0){if(o0&&(i.a={x:l+h*p,y:u+h*g}),f<1&&(i.b={x:l+f*p,y:u+f*g}),i}}}}}}function Kt(e,t,n,r){function i(r,i){return Aa(r[0]-e)0?0:3:Aa(r[0]-n)0?2:1:Aa(r[1]-t)0?1:0:i>0?3:2}function o(e,t){return a(e.x,t.x)}function a(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(s){function l(e){for(var t=0,n=m.length,r=e[1],i=0;ir&&ie(u,o,e)>0&&++t:o[1]<=r&&ie(u,o,e)<0&&--t,u=o;return 0!==t}function u(o,s,l,u){var c=0,d=0;if(null==o||(c=i(o,l))!==(d=i(s,l))||a(o,s)<0^l>0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+l+4)%4)!==d);else u.point(s[0],s[1])}function c(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function d(e,t){c(e,t)&&s.point(e,t)}function h(){T.point=p,m&&m.push(v=[]),E=!0,A=!1,w=C=NaN}function f(){g&&(p(y,b),_&&A&&F.rejoin(),g.push(F.buffer())),T.point=d,A&&s.lineEnd()}function p(e,t){e=Math.max(-zs,Math.min(zs,e)),t=Math.max(-zs,Math.min(zs,t));var n=c(e,t);if(m&&v.push([e,t]),E)y=e,b=t,_=n,E=!1,n&&(s.lineStart(),s.point(e,t));else if(n&&A)s.point(e,t);else{var r={a:{x:w,y:C},b:{x:e,y:t}};k(r)?(A||(s.lineStart(),s.point(r.a.x,r.a.y)),s.point(r.b.x,r.b.y),n||s.lineEnd(),S=!1):n&&(s.lineStart(),s.point(e,t),S=!1)}w=e,C=t,A=n}var g,m,v,y,b,_,w,C,A,E,S,x=s,F=jt(),k=qt(e,t,n,r),T={point:d,lineStart:h,lineEnd:f,polygonStart:function(){s=F,g=[],m=[],S=!0},polygonEnd:function(){s=x,g=fa.merge(g);var t=l([e,r]),n=S&&t,i=g.length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),u(null,null,1,s),s.lineEnd()),i&&Pt(g,o,t,u,s),s.polygonEnd()),g=m=v=null}};return T}}function Yt(e){var t=0,n=Ha/3,r=hn(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Ha/180,n=e[1]*Ha/180):[t/Ha*180,n/Ha*180]},i}function Xt(e,t){function n(e,t){var n=Math.sqrt(o-2*i*Math.sin(t))/i;return[n*Math.sin(e*=i),a-n*Math.cos(e)]}var r=Math.sin(e),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(e,t){var n=a-t;return[Math.atan2(e,n)/i,ae((o-(e*e+n*n)*i*i)/(2*i))]},n}function Qt(){function e(e,t){Us+=i*e-r*t,r=e,i=t}var t,n,r,i;Ks.point=function(o,a){Ks.point=e,t=r=o,n=i=a},Ks.lineEnd=function(){e(t,n)}}function Zt(e,t){eWs&&(Ws=e),tqs&&(qs=t)}function Jt(){function e(e,t){a.push("M",e,",",t,o)}function t(e,t){a.push("M",e,",",t),s.point=n}function n(e,t){a.push("L",e,",",t)}function r(){s.point=e}function i(){a.push("Z")}var o=en(4.5),a=[],s={point:e,lineStart:function(){s.point=t},lineEnd:r,polygonStart:function(){s.lineEnd=i},polygonEnd:function(){s.lineEnd=r,s.point=e},pointRadius:function(e){return o=en(e),s},result:function(){if(a.length){var e=a.join("");return a=[],e}}};return s}function en(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function tn(e,t){Ds+=e,Ms+=t,++Rs}function nn(){function e(e,r){var i=e-t,o=r-n,a=Math.sqrt(i*i+o*o);Os+=a*(t+e)/2,Ls+=a*(n+r)/2,Ps+=a,tn(t=e,n=r)}var t,n;Xs.point=function(r,i){Xs.point=e,tn(t=r,n=i)}}function rn(){Xs.point=tn}function on(){function e(e,t){var n=e-r,o=t-i,a=Math.sqrt(n*n+o*o);Os+=a*(r+e)/2,Ls+=a*(i+t)/2,Ps+=a,a=i*e-r*t,Bs+=a*(r+e),Is+=a*(i+t),$s+=3*a,tn(r=e,i=t)}var t,n,r,i;Xs.point=function(o,a){Xs.point=e,tn(t=r=o,n=i=a)},Xs.lineEnd=function(){e(t,n)}}function an(e){function t(t,n){e.moveTo(t+a,n),e.arc(t,n,a,0,Ua)}function n(t,n){e.moveTo(t,n),s.point=r}function r(t,n){e.lineTo(t,n)}function i(){s.point=t}function o(){e.closePath()}var a=4.5,s={point:t,lineStart:function(){s.point=n},lineEnd:i,polygonStart:function(){s.lineEnd=o},polygonEnd:function(){s.lineEnd=i,s.point=t},pointRadius:function(e){return a=e,s},result:S};return s}function sn(e){function t(e){return(s?r:n)(e)}function n(t){return cn(t,function(n,r){n=e(n,r),t.point(n[0],n[1])})}function r(t){function n(n,r){n=e(n,r),t.point(n[0],n[1])}function r(){b=NaN,E.point=o,t.lineStart()}function o(n,r){var o=_t([n,r]),a=e(n,r);i(b,_,y,w,C,A,b=a[0],_=a[1],y=n,w=o[0],C=o[1],A=o[2],s,t),t.point(b,_)}function a(){E.point=n,t.lineEnd()}function l(){r(),E.point=u,E.lineEnd=c}function u(e,t){o(d=e,h=t),f=b,p=_,g=w,m=C,v=A,E.point=o}function c(){i(b,_,y,w,C,A,f,p,d,g,m,v,s,t),E.lineEnd=a,a()}var d,h,f,p,g,m,v,y,b,_,w,C,A,E={point:n,lineStart:r,lineEnd:a,polygonStart:function(){t.polygonStart(),E.lineStart=l},polygonEnd:function(){t.polygonEnd(),E.lineStart=r}};return E}function i(t,n,r,s,l,u,c,d,h,f,p,g,m,v){var y=c-t,b=d-n,_=y*y+b*b;if(_>4*o&&m--){var w=s+f,C=l+p,A=u+g,E=Math.sqrt(w*w+C*C+A*A),S=Math.asin(A/=E),x=Aa(Aa(A)-1)o||Aa((y*D+b*M)/_-.5)>.3||s*f+l*p+u*g0&&16,t):Math.sqrt(o)},t}function ln(e){var t=sn(function(t,n){return e([t*qa,n*qa])});return function(e){return fn(t(e))}}function un(e){this.stream=e}function cn(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function dn(e){return hn(function(){return e})()}function hn(e){function t(e){return e=s(e[0]*Wa,e[1]*Wa),[e[0]*h+l,u-e[1]*h]}function n(e){return(e=s.invert((e[0]-l)/h,(u-e[1])/h))&&[e[0]*qa,e[1]*qa]}function r(){s=Ot(a=mn(v,y,b),o);var e=o(g,m);return l=f-e[0]*h,u=p+e[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),t}var o,a,s,l,u,c,d=sn(function(e,t){return e=o(e,t),[e[0]*h+l,u-e[1]*h]}),h=150,f=480,p=250,g=0,m=0,v=0,y=0,b=0,_=js,w=C,A=null,E=null;return t.stream=function(e){return c&&(c.valid=!1),c=fn(_(a,d(w(e)))),c.valid=!0,c},t.clipAngle=function(e){return arguments.length?(_=null==e?(A=e,js):Wt((A=+e)*Wa),i()):A},t.clipExtent=function(e){return arguments.length?(E=e,w=e?Kt(e[0][0],e[0][1],e[1][0],e[1][1]):C,i()):E},t.scale=function(e){return arguments.length?(h=+e,r()):h},t.translate=function(e){return arguments.length?(f=+e[0],p=+e[1],r()):[f,p]},t.center=function(e){return arguments.length?(g=e[0]%360*Wa,m=e[1]%360*Wa,r()):[g*qa,m*qa]},t.rotate=function(e){return arguments.length?(v=e[0]%360*Wa,y=e[1]%360*Wa,b=e.length>2?e[2]%360*Wa:0,r()):[v*qa,y*qa,b*qa]},fa.rebind(t,d,"precision"),function(){return o=e.apply(this,arguments),t.invert=o.invert&&n,r()}}function fn(e){return cn(e,function(t,n){e.point(t*Wa,n*Wa)})}function pn(e,t){return[e,t]}function gn(e,t){return[e>Ha?e-Ua:e<-Ha?e+Ua:e,t]}function mn(e,t,n){return e?t||n?Ot(yn(e),bn(t,n)):yn(e):t||n?bn(t,n):gn}function vn(e){return function(t,n){return t+=e,[t>Ha?t-Ua:t<-Ha?t+Ua:t,n]}}function yn(e){var t=vn(e);return t.invert=vn(-e),t}function bn(e,t){function n(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*r+s*i;return[Math.atan2(l*o-c*a,s*r-u*i),ae(c*o+l*a)]}var r=Math.cos(e),i=Math.sin(e),o=Math.cos(t),a=Math.sin(t);return n.invert=function(e,t){var n=Math.cos(t),s=Math.cos(e)*n,l=Math.sin(e)*n,u=Math.sin(t),c=u*o-l*a;return[Math.atan2(l*o+u*a,s*r+c*i),ae(c*r-s*i)]},n}function _n(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=wn(n,i),o=wn(n,o),(a>0?io)&&(i+=a*Ua)):(i=e+a*Ua,o=e-.5*l);for(var u,c=i;a>0?c>o:c0?t<-Ga+ja&&(t=-Ga+ja):t>Ga-ja&&(t=Ga-ja);var n=a/Math.pow(i(t),o);return[n*Math.sin(o*e),a-n*Math.cos(o*e)]}var r=Math.cos(e),i=function(e){return Math.tan(Ha/4+e/2)},o=e===t?Math.sin(e):Math.log(r/Math.cos(t))/Math.log(i(t)/i(e)),a=r*Math.pow(i(e),o)/o;return o?(n.invert=function(e,t){var n=a-t,r=re(o)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Ga]},n):Mn}function Dn(e,t){function n(e,t){var n=o-t;return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}var r=Math.cos(e),i=e===t?Math.sin(e):(r-Math.cos(t))/(t-e),o=r/i+e;return Aa(i)1&&ie(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function In(e,t){return e[0]-t[0]||e[1]-t[1]}function $n(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Nn(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],u=n[1],c=t[1]-l,d=r[1]-u,h=(s*(l-u)-d*(i-o))/(d*a-s*c);return[i+h*a,l+h*c]}function jn(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}function zn(){lr(this),this.edge=this.site=this.circle=null}function Hn(e){var t=cl.pop()||new zn;return t.site=e,t}function Un(e){Jn(e),sl.remove(e),cl.push(e),lr(e)}function Vn(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Un(e);for(var l=o;l.circle&&Aa(n-l.circle.x)ja)s=s.L;else{if(!((i=o-qn(s,a))>ja)){r>-ja?(t=s.P,n=s):i>-ja?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Hn(e);if(sl.insert(t,l),t||n){if(t===n)return Jn(t),n=Hn(t.site),sl.insert(l,n),l.edge=n.edge=rr(t.site,l.site),Zn(t),void Zn(n);if(!n)return void(l.edge=rr(t.site,l.site));Jn(t),Jn(n);var u=t.site,c=u.x,d=u.y,h=e.x-c,f=e.y-d,p=n.site,g=p.x-c,m=p.y-d,v=2*(h*m-f*g),y=h*h+f*f,b=g*g+m*m,_={x:(m*y-f*b)/v+c,y:(h*b-g*y)/v+d};or(n.edge,u,p,_),l.edge=rr(u,e,null,_),n.edge=rr(e,p,null,_),Zn(t),Zn(n)}}function Wn(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;n=a.site;var s=n.x,l=n.y,u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,h=c/u;return d?(-h+Math.sqrt(h*h-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function qn(e,t){var n=e.N;if(n)return Wn(n,t);var r=e.site;return r.y===t?r.x:1/0}function Kn(e){this.site=e,this.edges=[]}function Yn(e){for(var t,n,r,i,o,a,s,l,u,c,d=e[0][0],h=e[1][0],f=e[0][1],p=e[1][1],g=al,m=g.length;m--;)if((o=g[m])&&o.prepare())for(s=o.edges,l=s.length,a=0;aja||Aa(i-n)>ja)&&(s.splice(a,0,new ar(ir(o.site,c,Aa(r-d)ja?{x:d,y:Aa(t-d)ja?{x:Aa(n-p)ja?{x:h,y:Aa(t-h)ja?{x:Aa(n-f)=-za)){var f=l*l+u*u,p=c*c+d*d,g=(d*f-u*p)/h,m=(l*p-c*f)/h,d=m+s,v=dl.pop()||new Qn;v.arc=e,v.site=i,v.x=g+a,v.y=d+Math.sqrt(g*g+m*m),v.cy=d,e.circle=v;for(var y=null,b=ul._;b;)if(v.y=s)return;if(h>p){if(o){if(o.y>=u)return}else o={x:m,y:l};n={x:m,y:u}}else{if(o){if(o.y1)if(h>p){if(o){if(o.y>=u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else{if(o){if(o.y=s)return}else o={x:a,y:r*a+i};n={x:s,y:r*s+i}}else{if(o){if(o.xo||d>a||h=_,A=n>=w,E=A<<1|C,S=E+4;Eo&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Cr(n,r)})),o=pl.lastIndex;return o=0&&!(n=fa.interpolators[r](e,t)););return n}function Sr(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n=1?1:e(t)}}function Fr(e){return function(t){return 1-e(1-t)}}function kr(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function Tr(e){return e*e}function Dr(e){return e*e*e}function Mr(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function Rr(e){return function(t){return Math.pow(t,e)}}function Or(e){return 1-Math.cos(e*Ga)}function Lr(e){return Math.pow(2,10*(e-1))}function Pr(e){return 1-Math.sqrt(1-e*e)}function Br(e,t){var n;return arguments.length<2&&(t=.45),arguments.length?n=t/Ua*Math.asin(1/e):(e=1,n=t/4),function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*Ua/t)}}function Ir(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function $r(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function Nr(e,t){e=fa.hcl(e),t=fa.hcl(t);var n=e.h,r=e.c,i=e.l,o=t.h-n,a=t.c-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return ge(n+o*e,r+a*e,i+s*e)+""}}function jr(e,t){e=fa.hsl(e),t=fa.hsl(t);var n=e.h,r=e.s,i=e.l,o=t.h-n,a=t.s-r,s=t.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,n=isNaN(n)?t.h:n):o>180?o-=360:o<-180&&(o+=360),function(e){return fe(n+o*e,r+a*e,i+s*e)+""}}function zr(e,t){e=fa.lab(e),t=fa.lab(t);var n=e.l,r=e.a,i=e.b,o=t.l-n,a=t.a-r,s=t.b-i;return function(e){return ve(n+o*e,r+a*e,i+s*e)+""}}function Hr(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function Ur(e){var t=[e.a,e.b],n=[e.c,e.d],r=Gr(t),i=Vr(t,n),o=Gr(Wr(n,t,-i))||0;t[0]*n[1]180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(qr(n)+"rotate(",null,")")-2,x:Cr(e,t)})):t&&n.push(qr(n)+"rotate("+t+")")}function Xr(e,t,n,r){e!==t?r.push({i:n.push(qr(n)+"skewX(",null,")")-2,x:Cr(e,t)}):t&&n.push(qr(n)+"skewX("+t+")")}function Qr(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(qr(n)+"scale(",null,",",null,")");r.push({i:i-4,x:Cr(e[0],t[0])},{i:i-2,x:Cr(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(qr(n)+"scale("+t+")")}function Zr(e,t){var n=[],r=[];return e=fa.transform(e),t=fa.transform(t),Kr(e.translate,t.translate,n,r),Yr(e.rotate,t.rotate,n,r),Xr(e.skew,t.skew,n,r),Qr(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i=0;)n.push(i[r])}function di(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++ai&&(r=n,i=t);return r}function Ci(e){return e.reduce(Ai,0)}function Ai(e,t){return e+t[1]}function Ei(e,t){return Si(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Si(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function xi(e){return[fa.min(e),fa.max(e)]}function Fi(e,t){return e.value-t.value}function ki(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Ti(e,t){e._pack_next=t,t._pack_prev=e}function Di(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function Mi(e){function t(e){c=Math.min(e.x-e.r,c),d=Math.max(e.x+e.r,d),h=Math.min(e.y-e.r,h),f=Math.max(e.y+e.r,f)}if((n=e.children)&&(u=n.length)){var n,r,i,o,a,s,l,u,c=1/0,d=-1/0,h=1/0,f=-1/0;if(n.forEach(Ri),r=n[0],r.x=-r.r,r.y=0,t(r),u>1&&(i=n[1],i.x=i.r,i.y=0,t(i),u>2))for(o=n[2],Pi(r,i,o),t(o),ki(r,o),r._pack_prev=o,ki(o,i),i=r._pack_next,a=3;a=0;)t=i[o],t.z+=n,t.m+=n,n+=t.s+(r+=t.c)}function zi(e,t,n){return e.a.parent===t.parent?e.a:n}function Hi(e){return 1+fa.max(e,function(e){return e.y})}function Ui(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Vi(e){var t=e.children;return t&&t.length?Vi(t[0]):e}function Gi(e){var t,n=e.children;return n&&(t=n.length)?Gi(n[t-1]):e}function Wi(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function qi(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function Ki(e){var t=e[0],n=e[e.length-1];return t2?Ji:Xi,l=r?ei:Jr;return a=i(e,t,l,n),s=i(t,e,l,Er),o}function o(e){return a(e)}var a,s;return o.invert=function(e){return s(e)},o.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},o.range=function(e){return arguments.length?(t=e,i()):t},o.rangeRound=function(e){return o.range(e).interpolate(Hr)},o.clamp=function(e){return arguments.length?(r=e,i()):r},o.interpolate=function(e){return arguments.length?(n=e,i()):n},o.ticks=function(t){return io(e,t)},o.tickFormat=function(t,n){return oo(e,t,n)},o.nice=function(t){return no(e,t),i()},o.copy=function(){return eo(e,t,n,r)},i()}function to(e,t){return fa.rebind(e,t,"range","rangeRound","interpolate","clamp")}function no(e,t){return Qi(e,Zi(ro(e,t)[2])),Qi(e,Zi(ro(e,t)[2])),e}function ro(e,t){null==t&&(t=10);var n=Ki(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function io(e,t){return fa.range.apply(fa,ro(e,t))}function oo(e,t,n){var r=ro(e,t);if(n){var i=fs.exec(n);if(i.shift(),"s"===i[8]){var o=fa.formatPrefix(Math.max(Aa(r[0]),Aa(r[1])));return i[7]||(i[7]="."+ao(o.scale(r[2]))),i[8]="f",n=fa.format(i.join("")),function(e){return n(o.scale(e))+o.symbol}}i[7]||(i[7]="."+so(i[8],r)),n=i.join("")}else n=",."+ao(r[2])+"f";return fa.format(n)}function ao(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function so(e,t){var n=ao(t[2]);return e in xl?Math.abs(n-ao(Math.max(Aa(t[0]),Aa(t[1]))))+ +("e"!==e):n-2*("%"===e)}function lo(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function o(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function a(t){return e(i(t))}return a.invert=function(t){return o(e.invert(t))},a.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),a):t},a.nice=function(){var t=Qi(r.map(i),n?Math:kl);return e.domain(t),r=t.map(o),a},a.ticks=function(){var e=Ki(r),a=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;u0;h--)a.push(o(u)*h);for(u=0;a[u]l;c--);a=a.slice(u,c)}return a},a.tickFormat=function(e,n){if(!arguments.length)return Fl;arguments.length<2?n=Fl:"function"!=typeof n&&(n=fa.format(n));var r=Math.max(1,t*e/a.ticks().length);return function(e){var a=e/o(Math.round(i(e)));return a*t0?i[n-1]:e[0],n0?0:1}function Eo(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,h=t[0]+l,f=t[1]+u,p=(c+h)/2,g=(d+f)/2,m=h-c,v=f-d,y=m*m+v*v,b=n-r,_=c*f-h*d,w=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-_*_)),C=(_*v-m*w)/y,A=(-_*m-v*w)/y,E=(_*v+m*w)/y,S=(-_*m+v*w)/y,x=C-p,F=A-g,k=E-p,T=S-g;return x*x+F*F>k*k+T*T&&(C=E,A=S),[[C-l,A-u],[C*n/b,A*n/b]]}function So(e){function t(t){function a(){u.push("M",o(e(c),s))}for(var l,u=[],c=[],d=-1,h=t.length,f=Me(n),p=Me(r);++d1?e.join("L"):e+"Z"}function Fo(e){return e.join("L")+"Z"}function ko(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1&&i.push("H",r[0]),i.join("")}function To(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r));for(s=-1;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}function Go(e){return e.length<3?xo(e):e[0]+Lo(e,Vo(e))}function Wo(e){for(var t,n,r,i=-1,o=e.length;++i0;)h[--s].call(e,a);if(o>=1)return g.event&&g.event.end.call(e,e.__data__,t),--p.count?delete p[r]:delete e[n],1}var l,u,c,d,h,p=e[n]||(e[n]={active:0,count:0}),g=p[r];g||(l=i.time,u=Be(o,0,l),g=p[r]={tween:new f,time:l,timer:u,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++p.count)}function aa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"})}function sa(e,t,n){e.attr("transform",function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"})}function la(e){return e.toISOString()}function ua(e,t,n){function r(t){return e(t)}function i(e,n){var r=e[1]-e[0],i=r/n,o=fa.bisect(Jl,i);return o==Jl.length?[t.year,ro(e.map(function(e){return e/31536e6}),n)[2]]:o?t[i/Jl[o-1]1?{floor:function(t){for(;n(t=e.floor(t));)t=ca(t-1);return t},ceil:function(t){for(;n(t=e.ceil(t));)t=ca(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ki(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],ca(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return ua(e.copy(),t,n)},to(r,e)}function ca(e){return new Date(e)}function da(e){return JSON.parse(e.responseText)}function ha(e){var t=ma.createRange();return t.selectNode(ma.body),t.createContextualFragment(e.responseText)}var fa={version:"3.5.17"},pa=[].slice,ga=function(e){return pa.call(e)},ma=this.document;if(ma)try{ga(ma.documentElement.childNodes)[0].nodeType}catch(e){ga=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),ma)try{ma.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var va=this.Element.prototype,ya=va.setAttribute,ba=va.setAttributeNS,_a=this.CSSStyleDeclaration.prototype,wa=_a.setProperty;va.setAttribute=function(e,t){ya.call(this,e,t+"")},va.setAttributeNS=function(e,t,n){ba.call(this,e,t,n+"")},_a.setProperty=function(e,t,n){wa.call(this,e,t+"",n)}}fa.ascending=a,fa.descending=function(e,t){return te?1:t>=e?0:NaN},fa.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++ir&&(n=r)}else{for(;++i=r){n=r;break}for(;++ir&&(n=r)}return n},fa.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i=r){n=r;break}for(;++in&&(n=r)}else{for(;++i=r){n=r;break}for(;++in&&(n=r)}return n},fa.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o=r){n=i=r;break}for(;++or&&(n=r),i=r){n=i=r;break}for(;++or&&(n=r),i1)return a/(c-1)},fa.deviation=function(){var e=fa.variance.apply(this,arguments);return e?Math.sqrt(e):e};var Ca=u(a);fa.bisectLeft=Ca.left,fa.bisect=fa.bisectRight=Ca.right,fa.bisector=function(e){return u(1===e.length?function(t,n){return a(e(t),n)}:e)},fa.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},fa.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},fa.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t=0;)for(r=e[i],t=r.length;--t>=0;)n[--a]=r[t];return n};var Aa=Math.abs;fa.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=d(Aa(n)),a=-1;if(e*=o,t*=o,n*=o,n<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var l,u,c,d,h=-1,p=a.length,g=o[s++],m=new f;++h=o.length)return e;var r=[],i=a[n++];return e.forEach(function(e,i){r.push({key:e,values:t(i,n)})}),i?r.sort(function(e,t){return i(e.key,t.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(t,n){return e(n,t,0)},i.entries=function(n){return t(e(fa.map,n,0),0)},i.key=function(e){return o.push(e),i},i.sortKeys=function(e){return a[o.length-1]=e,i},i.sortValues=function(e){return n=e,i},i.rollup=function(e){return r=e,i},i},fa.set=function(e){var t=new w;if(e)for(var n=0,r=e.length;n=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},fa.event=null,fa.requote=function(e){return e.replace(Fa,"\\$&")};var Fa=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ka={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]},Ta=function(e,t){return t.querySelector(e)},Da=function(e,t){return t.querySelectorAll(e)},Ma=function(e,t){var n=e.matches||e[E(e,"matchesSelector")];return(Ma=function(e,t){return n.call(e,t)})(e,t)};"function"==typeof Sizzle&&(Ta=function(e,t){return Sizzle(e,t)[0]||null},Da=Sizzle,Ma=Sizzle.matchesSelector),fa.selection=function(){return fa.select(ma.documentElement)};var Ra=fa.selection.prototype=[];Ra.select=function(e){var t,n,r,i,o=[];e=R(e);for(var a=-1,s=this.length;++a=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),La.hasOwnProperty(n)?{space:La[n],local:e}:e}},Ra.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return e=fa.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(L(t,e[t]));return this}return this.each(L(e,t))},Ra.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=I(e)).length,i=-1;if(t=n.classList){for(;++i=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Ra.sort=function(e){e=q.apply(this,arguments);for(var t=-1,n=this.length;++t0&&(t=t.transition().duration(F)),t.call(e.event)}function s(){w&&w.domain(_.range().map(function(e){return(e-E.x)/E.k}).map(_.invert)),A&&A.domain(C.range().map(function(e){return(e-E.y)/E.k}).map(C.invert))}function l(e){T++||e({type:"zoomstart"})}function u(e){s(),e({type:"zoom",scale:E.k,translate:[E.x,E.y]})}function c(e){--T||(e({type:"zoomend"}),m=null)}function d(){function e(){s=1,i(fa.mouse(r),h),u(a)}function n(){d.on(R,null).on(O,null),f(s),c(a)}var r=this,a=P.of(r,arguments),s=0,d=fa.select(o(r)).on(R,e).on(O,n),h=t(fa.mouse(r)),f=ee(r);Ul.call(r),l(a)}function h(){function e(){var e=fa.touches(p);return f=E.k,e.forEach(function(e){e.identifier in m&&(m[e.identifier]=t(e))}),e}function n(){var t=fa.event.target;fa.select(t).on(_,o).on(w,s),C.push(t);for(var n=fa.event.changedTouches,r=0,i=n.length;r1){var c=l[0],d=l[1],h=c[0]-d[0],f=c[1]-d[1];v=h*h+f*f}}function o(){var e,t,n,o,a=fa.touches(p);Ul.call(p);for(var s=0,l=a.length;s=u)return a;if(i)return i=!1,o;var t=c;if(34===e.charCodeAt(t)){for(var n=t;n++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ps=fa.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=fa.round(e,je(e,t))).toFixed(Math.max(0,Math.min(20,je(e*(1+1e-15),t))))}}),gs=fa.time={},ms=Date;Ve.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){vs.setUTCDate.apply(this._,arguments)},setDay:function(){vs.setUTCDay.apply(this._,arguments)},setFullYear:function(){vs.setUTCFullYear.apply(this._,arguments)},setHours:function(){vs.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){vs.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){vs.setUTCMinutes.apply(this._,arguments)},setMonth:function(){vs.setUTCMonth.apply(this._,arguments)},setSeconds:function(){vs.setUTCSeconds.apply(this._,arguments)},setTime:function(){vs.setTime.apply(this._,arguments)}};var vs=Date.prototype;gs.year=Ge(function(e){return e=gs.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),gs.years=gs.year.range,gs.years.utc=gs.year.utc.range,gs.day=Ge(function(e){var t=new ms(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),gs.days=gs.day.range,gs.days.utc=gs.day.utc.range,gs.dayOfYear=function(e){var t=gs.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(e,t){t=7-t;var n=gs[e]=Ge(function(e){return(e=gs.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+7*Math.floor(t))},function(e){var n=gs.year(e).getDay();return Math.floor((gs.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});gs[e+"s"]=n.range,gs[e+"s"].utc=n.utc.range,gs[e+"OfYear"]=function(e){var n=gs.year(e).getDay();return Math.floor((gs.dayOfYear(e)+(n+t)%7)/7)}}),gs.week=gs.sunday,gs.weeks=gs.sunday.range,gs.weeks.utc=gs.sunday.utc.range,gs.weekOfYear=gs.sundayOfYear;var ys={"-":"",_:" ",0:"0"},bs=/^\s*\d+/,_s=/^%/;fa.locale=function(e){return{numberFormat:He(e),timeFormat:qe(e)}};var ws=fa.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});fa.format=ws.numberFormat,fa.geo={},pt.prototype={s:0,t:0,add:function(e){gt(e,this.t,Cs),gt(Cs.s,this.s,this),this.s?this.t+=Cs.t:this.s=Cs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Cs=new pt;fa.geo.stream=function(e,t){e&&As.hasOwnProperty(e.type)?As[e.type](e,t):mt(e,t)};var As={Feature:function(e,t){mt(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++rf&&(f=t)}function t(t,n){var r=_t([t*Wa,n*Wa]);if(v){var i=Ct(v,r),o=[i[1],-i[0],0],a=Ct(o,i);St(a),a=xt(a);var l=t-p,u=l>0?1:-1,g=a[0]*qa*u,m=Aa(l)>180;if(m^(u*pf&&(f=y)}else if(g=(g+360)%360-180,m^(u*pf&&(f=n);m?ts(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t):h>=c?(th&&(h=t)):t>p?s(c,t)>s(c,h)&&(h=t):s(t,h)>s(c,h)&&(c=t)}else e(t,n);v=r,p=t}function n(){w.point=t}function r(){_[0]=c,_[1]=h,w.point=e,v=null}function i(e,n){if(v){var r=e-p;y+=Aa(r)>180?r+(r>0?360:-360):r}else g=e,m=n;Fs.point(e,n),t(e,n)}function o(){Fs.lineStart()}function a(){i(g,m),Fs.lineEnd(),Aa(y)>ja&&(c=-(h=180)),_[0]=c,_[1]=h,v=null}function s(e,t){return(t-=e)<0?t+360:t}function l(e,t){return e[0]-t[0]}function u(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eja?f=90:y<-ja&&(d=-90),_[0]=c,_[1]=h}};return function(e){f=h=-(c=d=1/0),b=[],fa.geo.stream(e,w);var t=b.length;if(t){b.sort(l);for(var n,r=1,i=b[0],o=[i];rs(i[0],i[1])&&(i[1]=n[1]),s(n[0],i[1])>s(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,p=-1/0,t=o.length-1,r=0,i=o[t];r<=t;i=n,++r)n=o[r],(a=s(i[1],n[0]))>p&&(p=a,c=n[0],h=i[1])}return b=_=null,c===1/0||d===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,d],[h,f]]}}(),fa.geo.centroid=function(e){ks=Ts=Ds=Ms=Rs=Os=Ls=Ps=Bs=Is=$s=0,fa.geo.stream(e,Ns);var t=Bs,n=Is,r=$s,i=t*t+n*n+r*r;return i=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:o).invert(e)},e.stream=function(e){var t=o.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},e.precision=function(t){return arguments.length?(o.precision(t),a.precision(t),s.precision(t),e):o.precision()},e.scale=function(t){return arguments.length?(o.scale(t),a.scale(.35*t),s.scale(t),e.translate(o.translate())):o.scale()},e.translate=function(t){if(!arguments.length)return o.translate();var u=o.scale(),c=+t[0],d=+t[1];return n=o.translate(t).clipExtent([[c-.455*u,d-.238*u],[c+.455*u,d+.238*u]]).stream(l).point,r=a.translate([c-.307*u,d+.201*u]).clipExtent([[c-.425*u+ja,d+.12*u+ja],[c-.214*u-ja,d+.234*u-ja]]).stream(l).point,i=s.translate([c-.205*u,d+.212*u]).clipExtent([[c-.214*u+ja,d+.166*u+ja],[c-.115*u-ja,d+.234*u-ja]]).stream(l).point,e},e.scale(1070)};var Hs,Us,Vs,Gs,Ws,qs,Ks={point:S,lineStart:S,lineEnd:S,polygonStart:function(){Us=0,Ks.lineStart=Qt},polygonEnd:function(){Ks.lineStart=Ks.lineEnd=Ks.point=S,Hs+=Aa(Us/2)}},Ys={point:Zt,lineStart:S,lineEnd:S,polygonStart:S,polygonEnd:S},Xs={point:tn,lineStart:nn,lineEnd:rn,polygonStart:function(){Xs.lineStart=on},polygonEnd:function(){Xs.point=tn,Xs.lineStart=nn,Xs.lineEnd=rn}};fa.geo.path=function(){function e(e){return e&&("function"==typeof s&&o.pointRadius(+s.apply(this,arguments)),a&&a.valid||(a=i(o)),fa.geo.stream(e,a)),o.result()}function t(){return a=null,e}var n,r,i,o,a,s=4.5;return e.area=function(e){return Hs=0,fa.geo.stream(e,i(Ks)),Hs},e.centroid=function(e){return Ds=Ms=Rs=Os=Ls=Ps=Bs=Is=$s=0,fa.geo.stream(e,i(Xs)),$s?[Bs/$s,Is/$s]:Ps?[Os/Ps,Ls/Ps]:Rs?[Ds/Rs,Ms/Rs]:[NaN,NaN]},e.bounds=function(e){return Ws=qs=-(Vs=Gs=1/0),fa.geo.stream(e,i(Ys)),[[Vs,Gs],[Ws,qs]]},e.projection=function(e){return arguments.length?(i=(n=e)?e.stream||ln(e):C,t()):n},e.context=function(e){return arguments.length?(o=null==(r=e)?new Jt:new an(e),"function"!=typeof s&&o.pointRadius(s),t()):r},e.pointRadius=function(t){return arguments.length?(s="function"==typeof t?t:(o.pointRadius(+t),+t),e):s},e.projection(fa.geo.albersUsa()).context(null)},fa.geo.transform=function(e){return{stream:function(t){var n=new un(t);for(var r in e)n[r]=e[r];return n}}},un.prototype={point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},fa.geo.projection=dn,fa.geo.projectionMutator=hn,(fa.geo.equirectangular=function(){return dn(pn)}).raw=pn.invert=pn,fa.geo.rotation=function(e){function t(t){return t=e(t[0]*Wa,t[1]*Wa),t[0]*=qa,t[1]*=qa,t}return e=mn(e[0]%360*Wa,e[1]*Wa,e.length>2?e[2]*Wa:0),t.invert=function(t){return t=e.invert(t[0]*Wa,t[1]*Wa),t[0]*=qa,t[1]*=qa,t},t},gn.invert=pn,fa.geo.circle=function(){function e(){var e="function"==typeof r?r.apply(this,arguments):r,t=mn(-e[0]*Wa,-e[1]*Wa,0).invert,i=[];return n(null,null,1,{point:function(e,n){i.push(e=t(e,n)),e[0]*=qa,e[1]*=qa}}),{type:"Polygon",coordinates:[i]}}var t,n,r=[0,0],i=6;return e.origin=function(t){return arguments.length?(r=t,e):r},e.angle=function(r){return arguments.length?(n=_n((t=+r)*Wa,i*Wa),e):t},e.precision=function(r){return arguments.length?(n=_n(t*Wa,(i=+r)*Wa),e):i},e.angle(90)},fa.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Wa,i=e[1]*Wa,o=t[1]*Wa,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},fa.geo.graticule=function(){function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return fa.range(Math.ceil(o/m)*m,i,m).map(h).concat(fa.range(Math.ceil(u/v)*v,l,v).map(f)).concat(fa.range(Math.ceil(r/p)*p,n,p).filter(function(e){return Aa(e%m)>ja}).map(c)).concat(fa.range(Math.ceil(s/g)*g,a,g).filter(function(e){return Aa(e%v)>ja}).map(d))}var n,r,i,o,a,s,l,u,c,d,h,f,p=10,g=p,m=90,v=360,y=2.5;return e.lines=function(){return t().map(function(e){return{type:"LineString",coordinates:e}})},e.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(f(l).slice(1),h(i).reverse().slice(1),f(u).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.majorExtent(t).minorExtent(t):e.minorExtent()},e.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],u=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),u>l&&(t=u,u=l,l=t),e.precision(y)):[[o,u],[i,l]]},e.minorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),s>a&&(t=s,s=a,a=t),e.precision(y)):[[r,s],[n,a]]},e.step=function(t){return arguments.length?e.majorStep(t).minorStep(t):e.minorStep()},e.majorStep=function(t){return arguments.length?(m=+t[0],v=+t[1],e):[m,v]},e.minorStep=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(y=+t,c=Cn(s,a,90),d=An(r,n,y),h=Cn(u,l,90),f=An(o,i,y),e):y},e.majorExtent([[-180,-90+ja],[180,90-ja]]).minorExtent([[-180,-80-ja],[180,80+ja]])},fa.geo.greatArc=function(){function e(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),n||i.apply(this,arguments)]}}var t,n,r=En,i=Sn;return e.distance=function(){return fa.geo.distance(t||r.apply(this,arguments),n||i.apply(this,arguments))},e.source=function(n){return arguments.length?(r=n,t="function"==typeof n?null:n,e):r},e.target=function(t){return arguments.length?(i=t,n="function"==typeof t?null:t,e):i},e.precision=function(){return arguments.length?e:0},e},fa.geo.interpolate=function(e,t){return xn(e[0]*Wa,e[1]*Wa,t[0]*Wa,t[1]*Wa)},fa.geo.length=function(e){return Qs=0,fa.geo.stream(e,Zs),Qs};var Qs,Zs={sphere:S,point:S,lineStart:Fn,lineEnd:S,polygonStart:S,polygonEnd:S},Js=kn(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(fa.geo.azimuthalEqualArea=function(){return dn(Js)}).raw=Js;var el=kn(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},C);(fa.geo.azimuthalEquidistant=function(){return dn(el)}).raw=el,(fa.geo.conicConformal=function(){return Yt(Tn)}).raw=Tn,(fa.geo.conicEquidistant=function(){return Yt(Dn)}).raw=Dn;var tl=kn(function(e){return 1/e},Math.atan);(fa.geo.gnomonic=function(){return dn(tl)}).raw=tl,Mn.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ga]},(fa.geo.mercator=function(){return Rn(Mn)}).raw=Mn;var nl=kn(function(){return 1},Math.asin);(fa.geo.orthographic=function(){return dn(nl)}).raw=nl;var rl=kn(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(fa.geo.stereographic=function(){return dn(rl)}).raw=rl,On.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ga]},(fa.geo.transverseMercator=function(){var e=Rn(On),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):(e=t(),[e[1],-e[0]])},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):(e=n(),[e[0],e[1],e[2]-90])},n([0,0,90])}).raw=On,fa.geom={},fa.geom.hull=function(e){function t(e){if(e.length<3)return[];var t,i=Me(n),o=Me(r),a=e.length,s=[],l=[];for(t=0;t=0;--t)f.push(e[s[u[t]][2]]);for(t=+d;t=r&&u.x<=o&&u.y>=i&&u.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[]).point=e[s]}),t}function n(e){return e.map(function(e,t){return{x:Math.round(o(e,t)/ja)*ja,y:Math.round(a(e,t)/ja)*ja,i:t}})}var r=Ln,i=Pn,o=r,a=i,s=hl;return e?t(e):(t.links=function(e){return hr(n(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},t.triangles=function(e){var t=[];return hr(n(e)).cells.forEach(function(n,r){for(var i,o=n.site,a=n.edges.sort(Xn),s=-1,l=a.length,u=a[l-1].edge,c=u.l===o?u.r:u.l;++s=u,h=r>=c,f=h<<1|d;e.leaf=!1,e=e.nodes[f]||(e.nodes[f]=vr()),d?i=u:s=u,h?a=c:l=c,o(e,t,n,r,i,a,s,l)}var c,d,h,f,p,g,m,v,y,b=Me(s),_=Me(l);if(null!=t)g=t,m=n,v=r,y=i;else if(v=y=-(g=m=1/0),d=[],h=[],p=e.length,a)for(f=0;fv&&(v=c.x),c.y>y&&(y=c.y),d.push(c.x),h.push(c.y);else for(f=0;f
v&&(v=w),C>y&&(y=C),d.push(w),h.push(C)}var A=v-g,E=y-m;A>E?y=m+A:v=g+E;var S=vr();if(S.add=function(e){o(S,e,+b(e,++f),+_(e,f),g,m,v,y)},S.visit=function(e){yr(e,S,g,m,v,y)},S.find=function(e){return br(S,e[0],e[1],g,m,v,y)},f=-1,null==t){for(;++f
=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=ml.get(n)||gl,r=vl.get(r)||C,xr(r(n.apply(null,pa.call(arguments,1))))},fa.interpolateHcl=Nr,fa.interpolateHsl=jr,fa.interpolateLab=zr,fa.interpolateRound=Hr,fa.transform=function(e){var t=ma.createElementNS(fa.ns.prefix.svg,"g");return(fa.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new Ur(n?n.matrix:yl)})(e)},Ur.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var yl={a:1,b:0,c:0,d:1,e:0,f:0};fa.interpolateTransform=Zr,fa.layout={},fa.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n0?i=e:(n.c=null,n.t=NaN,n=null,u.end({type:"end",alpha:i=0})):e>0&&(u.start({type:"start",alpha:i=e}),n=Be(l.tick)),l):i},l.start=function(){function e(e,r){if(!n){for(n=new Array(i),l=0;l=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=u}else r&&(o.value=+r.call(e,o,o.depth)||0),delete o.children;return di(i,function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)}),s}var t=pi,n=hi,r=fi;return e.sort=function(n){return arguments.length?(t=n,e):t},e.children=function(t){return arguments.length?(n=t,e):n},e.value=function(t){return arguments.length?(r=t,e):r},e.revalue=function(t){return r&&(ci(t,function(e){e.children&&(e.value=0)}),di(t,function(t){var n;t.children||(t.value=+r.call(e,t,t.depth)||0),(n=t.parent)&&(n.value+=t.value)})),t},e},fa.layout.partition=function(){function e(t,n,r,i){var o=t.children;if(t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(a=o.length)){var a,s,l,u=-1;for(r=t.value?r/t.value:0;++us&&(s=r),a.push(r)}for(n=0;n0)for(o=-1;++o=c[0]&&s<=c[1]&&(a=l[fa.bisect(d,s,1,f)-1],a.y+=p,a.push(e[o]));return l}var t=!0,n=Number,r=xi,i=Ei;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=Me(t),e):r},e.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Si(e,t)}:Me(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},fa.layout.pack=function(){function e(e,o){var a=n.call(this,e,o),s=a[0],l=i[0],u=i[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,di(s,function(e){e.r=+c(e.value)}),di(s,Mi),r){var d=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;di(s,function(e){e.r+=d}),di(s,Mi),di(s,function(e){e.r-=d})}return Li(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),a}var t,n=fa.layout.hierarchy().sort(Fi),r=0,i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},e.radius=function(n){return arguments.length?(t=null==n||"function"==typeof n?n:+n,e):t},e.padding=function(t){return arguments.length?(r=+t,e):r},ui(e,n)},fa.layout.tree=function(){function e(e,i){var c=a.call(this,e,i),d=c[0],h=t(d);if(di(h,n),h.parent.m=-h.z,ci(h,r),u)ci(d,o);else{var f=d,p=d,g=d;ci(d,function(e){e.xp.x&&(p=e),e.depth>g.depth&&(g=e)});var m=s(f,p)/2-f.x,v=l[0]/(p.x+s(p,f)/2+m),y=l[1]/(g.depth||1);ci(d,function(e){e.x=(e.x+m)*v,e.y=e.depth*y})}return c}function t(e){for(var t,n={A:null,children:[e]},r=[n];null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a0&&(Ni(zi(a,e,n),e,r),u+=r,c+=r),d+=a.m,u+=i.m,h+=l.m,c+=o.m;a&&!$i(o)&&(o.t=a,o.m+=d-c),i&&!Ii(l)&&(l.t=i,l.m+=u-h,n=e)}return n}function o(e){e.x*=l[0],e.y=e.depth*l[1]}var a=fa.layout.hierarchy().sort(null).value(null),s=Bi,l=[1,1],u=null;return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=null==(l=t)?o:null,e):u?null:l},e.nodeSize=function(t){return arguments.length?(u=null==(l=t)?null:o,e):u?l:null},ui(e,a)},fa.layout.cluster=function(){function e(e,o){var a,s=t.call(this,e,o),l=s[0],u=0;di(l,function(e){var t=e.children;t&&t.length?(e.x=Ui(t),e.y=Hi(t)):(e.x=a?u+=n(e,a):0,e.y=0,a=e)});var c=Vi(l),d=Gi(l),h=c.x-n(c,d)/2,f=d.x+n(d,c)/2;return di(l,i?function(e){e.x=(e.x-l.x)*r[0],e.y=(l.y-e.y)*r[1]}:function(e){e.x=(e.x-h)/(f-h)*r[0],e.y=(1-(l.y?e.y/l.y:1))*r[1]}),s}var t=fa.layout.hierarchy().sort(null).value(null),n=Bi,r=[1,1],i=!1;return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(i=null==(r=t),e):i?null:r},e.nodeSize=function(t){return arguments.length?(i=null!=(r=t),e):i?r:null},ui(e,t)},fa.layout.treemap=function(){function e(e,t){for(var n,r,i=-1,o=e.length;++i0;)c.push(a=h[l-1]),c.area+=a.area,"squarify"!==f||(s=r(c,g))<=p?(h.pop(),p=s):(c.area-=c.pop().area,i(c,g,u,!1),g=Math.min(u.dx,u.dy),c.length=c.area=0,p=1/0);c.length&&(i(c,g,u,!0),c.length=c.area=0),o.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var o,a=d(t),s=r.slice(),l=[];for(e(s,a.dx*a.dy/t.value),l.area=0;o=s.pop();)l.push(o),l.area+=o.area,null!=o.z&&(i(l,o.z?a.dx:a.dy,a,!s.length),l.length=l.area=0);r.forEach(n)}}function r(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++ai&&(i=n));return r*=r,t*=t,r?Math.max(t*i*p/r,r/(t*o*p)):1/0}function i(e,t,n,r){var i,o=-1,a=e.length,s=n.x,u=n.y,c=t?l(e.area/t):0;if(t==n.dx){for((r||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=fa.random.normal.apply(fa,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=fa.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;nd?0:1;if(u=Va)return t(u,f)+(e?t(e,1-f):"")+"Z";var p,g,m,v,y,b,_,w,C,A,E,S,x=0,F=0,k=[];if((v=(+l.apply(this,arguments)||0)/2)&&(m=o===Ol?Math.sqrt(e*e+u*u):+o.apply(this,arguments),f||(F*=-1),u&&(F=ae(m/u*Math.sin(v))),e&&(x=ae(m/e*Math.sin(v)))),u){y=u*Math.cos(c+F),b=u*Math.sin(c+F),_=u*Math.cos(d-F),w=u*Math.sin(d-F);var T=Math.abs(d-c-2*F)<=Ha?0:1;if(F&&Ao(y,b,_,w)===f^T){var D=(c+d)/2;y=u*Math.cos(D),b=u*Math.sin(D),_=w=null}}else y=b=0;if(e){C=e*Math.cos(d-x),A=e*Math.sin(d-x),E=e*Math.cos(c+x),S=e*Math.sin(c+x);var M=Math.abs(c-d+2*x)<=Ha?0:1;if(x&&Ao(C,A,E,S)===1-f^M){var R=(c+d)/2;C=e*Math.cos(R),A=e*Math.sin(R),E=S=null}}else C=A=0;if(h>ja&&(p=Math.min(Math.abs(u-e)/2,+i.apply(this,arguments)))>.001){g=eHa)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var o=En,a=Sn,s=Ko,l=_o,u=wo;return e.radius=function(t){return arguments.length?(s=Me(t),e):s},e.source=function(t){return arguments.length?(o=Me(t),e):o},e.target=function(t){return arguments.length?(a=Me(t),e):a},e.startAngle=function(t){return arguments.length?(l=Me(t),e):l},e.endAngle=function(t){return arguments.length?(u=Me(t),e):u},e},fa.svg.diagonal=function(){function e(e,i){var o=t.call(this,e,i),a=n.call(this,e,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=En,n=Sn,r=Yo;return e.source=function(n){return arguments.length?(t=Me(n),e):t},e.target=function(t){return arguments.length?(n=Me(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},fa.svg.diagonal.radial=function(){var e=fa.svg.diagonal(),t=Yo,n=e.projection;return e.projection=function(e){return arguments.length?n(Xo(t=e)):t},e},fa.svg.symbol=function(){function e(e,r){return($l.get(t.call(this,e,r))||Jo)(n.call(this,e,r))}var t=Zo,n=Qo;return e.type=function(n){return arguments.length?(t=Me(n),e):t},e.size=function(t){return arguments.length?(n=Me(t),e):n},e};var $l=fa.map({circle:Jo,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*jl)),n=t*jl;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Nl),n=t*Nl/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Nl),n=t*Nl/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});fa.svg.symbolTypes=$l.keys();var Nl=Math.sqrt(3),jl=Math.tan(30*Wa);Ra.transition=function(e){for(var t,n,r=zl||++Gl,i=ia(e),o=[],a=Hl||{time:Date.now(),ease:Mr,delay:0,duration:250},s=-1,l=this.length;++srect,.s>rect").attr("width",d[1]-d[0])}function r(e){e.select(".extent").attr("y",h[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==fa.event.keyCode&&(T||(b=null,M[0]-=d[1],M[1]-=h[1],T=2),k())}function g(){32==fa.event.keyCode&&2==T&&(M[0]+=d[1],M[1]+=h[1],T=0,k())}function m(){var e=fa.mouse(w),i=!1;_&&(e[0]+=_[0],e[1]+=_[1]),T||(fa.event.altKey?(b||(b=[(d[0]+d[1])/2,(h[0]+h[1])/2]),M[0]=d[+(e[0]-1},_permissionPredicate:function(e,t){if(e.indexOf(t)>-1||e.indexOf("*")>-1)return!0;var n=t.split(":");if(n.length>=2){var r=n[0],i=n[0]+":"+n[1];return e.indexOf(r)>-1||e.indexOf(r+":*")>-1||e.indexOf(i)>-1||e.indexOf(i+":*")>-1}return e.indexOf(t+":*")>-1},isPermitted:function(e,t){var n=this;return!!this._isWildCard(e)||(t.every?t.every(function(t){return n._permissionPredicate(e,t)}):this._permissionPredicate(e,t))},isAnyPermitted:function(e,t){var n=this;return!!this._isWildCard(e)||t.some(function(t){return n._permissionPredicate(e,t)})}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ModifierPropType=void 0;var n=Object.assign||function(e){for(var t=1;t0?this._renderDashboardMenu():this._renderNoDashboardsMenu());var t=this.props,n=t.appendMenus,r=t.children,i=this.state.loading;return a.default.createElement("div",{style:{display:"inline-block"}},a.default.createElement(u.ButtonToolbar,{className:w.default.toolbar},a.default.createElement(u.ButtonGroup,null,e,n),r),a.default.createElement(y.WidgetCreationModal,{ref:"widgetModal",widgetType:this.props.widgetType,onConfigurationSaved:this._saveWidget,fields:this.props.fields,loading:i}))}});exports.default=x,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(642);Object.defineProperty(exports,"CountWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(r).default}});var i=t(643);Object.defineProperty(exports,"CountWidgetEditConfiguration",{enumerable:!0,get:function(){return n(i).default}});var o=t(644);Object.defineProperty(exports,"FieldChartWidgetConfiguration",{enumerable:!0,get:function(){return n(o).default}});var a=t(645);Object.defineProperty(exports,"QueryConfiguration",{enumerable:!0,get:function(){return n(a).default}});var s=t(646);Object.defineProperty(exports,"QuickValuesConfiguration",{enumerable:!0,get:function(){return n(s).default}});var l=t(647);Object.defineProperty(exports,"QuickValuesWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(l).default}});var u=t(648);Object.defineProperty(exports,"QuickValuesWidgetEditConfiguration",{enumerable:!0,get:function(){return n(u).default}});var c=t(649);Object.defineProperty(exports,"QuickValuesHistogramWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(c).default}});var d=t(650);Object.defineProperty(exports,"QuickValuesHistogramWidgetEditConfiguration",{enumerable:!0,get:function(){return n(d).default}});var h=t(651);Object.defineProperty(exports,"StackedChartWidgetConfiguration",{enumerable:!0,get:function(){return n(h).default}});var f=t(652);Object.defineProperty(exports,"StatisticalCountWidgetCreateConfiguration",{enumerable:!0,get:function(){return n(f).default}});var p=t(653);Object.defineProperty(exports,"StatisticalCountWidgetEditConfiguration",{enumerable:!0,get:function(){return n(p).default}})},function(e,exports,t){var n,r,i;/*!
* URI.js - Mutating URLs
*
* Version: 1.19.0
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/
!function(o,a){"use strict";"object"==typeof e&&e.exports?e.exports=a(t(121),t(122),t(123)):(r=[t(121),t(122),t(123)],n=a,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i))}(0,function(e,t,n,r){"use strict";function i(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}function o(e){return/^[0-9]+$/.test(e)}function a(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function s(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===s(e)}function u(e,t){var n,r,i={};if("RegExp"===s(t))i=null;else if(l(t))for(n=0,r=t.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=p,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=p,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var n=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var _,w={encode:"encode",decode:"decode"},C=function(e,t){return function(n){try{return i[t](n+"").replace(i.characters[e][t].expression,function(n){return i.characters[e][t].map[n]})}catch(e){return n}}};for(_ in w)i[_+"PathSegment"]=C("pathname",w[_]),i[_+"UrnPathSegment"]=C("urnpath",w[_]);var A=function(e,t,n){return function(r){var o;o=n?function(e){return i[t](i[n](e))}:i[t];for(var a=(r+"").split(e),s=0,l=a.length;s-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),n=e.indexOf("?"),n>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=i.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e=""),e=e.replace(/\\/g,"/");var n,r,o=e.indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),s=e.indexOf("/"),l=e.indexOf(":",a+1);-1!==l&&(-1===s||l-1?r:e.length-1);return o>-1&&(-1===r||o-1?f.slice(0,p)+f.slice(p).replace(a,""):f.replace(a,""),!(f.length<=u[0].length||n.ignore&&n.ignore.test(f))){h=c+f.length;var v=t(f,c,h,e);void 0!==v?(v=String(v),e=e.slice(0,c)+v+e.slice(h),r.lastIndex=c+v.length):r.lastIndex=h}}return r.lastIndex=0,e},i.ensureValidHostname=function(t,n){var r=!!t,o=!!n,a=!1;if(o&&(a=c(i.hostProtocols,n)),a&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(o(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=v),this},y.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},y.clone=function(){return new i(this)},y.valueOf=y.toString=function(){return this.build(!1)._string},y.protocol=g("protocol"),y.username=g("username"),y.password=g("password"),y.hostname=g("hostname"),y.port=g("port"),y.query=m("query","?"),y.fragment=m("fragment","#"),y.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},y.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},y.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},y.path=y.pathname,y.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName){e=e[i.getDomAttribute(e)]||"",o=!1}if(!r&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var a=r?e._parts:e;for(n in a)b.call(this._parts,n)&&(this._parts[n]=a[n])}return this.build(!t),this},y.is=function(e){var t=!1,r=!1,o=!1,a=!1,s=!1,l=!1,u=!1,c=!this._parts.urn;switch(this._parts.hostname&&(c=!1,r=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),t=r||o,a=!t,s=a&&n&&n.has(this._parts.hostname),l=a&&i.idn_expression.test(this._parts.hostname),u=a&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return c;case"absolute":return!c;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return o;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var E=y.protocol,S=y.port,x=y.hostname;y.protocol=function(e,t){if(e&&(e=e.replace(/:(\/\/)?$/,""),!e.match(i.protocol_expression)))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return E.call(this,e,t)},y.scheme=y.protocol,y.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(e+="",":"===e.charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},y.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return x.call(this,e,t)},y.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},y.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},y.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},y.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},y.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=i.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},y.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,r),s=new RegExp("^"+a(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},y.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(a(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},y.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[i.toLowerCase()]?n.get(this._parts.hostname)||i:i}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},y.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?i.decodePath(r):r}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),l=new RegExp("^"+a(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(l,e),this.build(!t),this},y.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?i.decodePathSegment(r):r}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var s=new RegExp(a(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),o?this.normalizePath(t):this.build(!t),this},y.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(n=o.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",e?i.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var l,u=this.suffix();if(u)l=e?new RegExp(a(u)+"$"):new RegExp(a("."+u)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return l&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(l,e)),this.build(!t),this},y.segment=function(e,t,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),a=i.split(r);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,u=t.length;s6&&void 0!==arguments[6]&&arguments[6],d=[],h=i&&i>0?i:4e3;if("object"===(void 0===e?"undefined":r(e))&&!Array.isArray(e)){var f=this._firstDataPointTimestamp(e,t.from,a),p=o.default.utc(t.to),g=(0,o.default)(f),m=o.default.duration(1,n),v=((p.valueOf()-f.valueOf())/m.as("milliseconds")).toFixed(),y=v>h?(v/h).toFixed():1,b=0;for(g=s.default.startOfResolution(g,n);g.isBefore(p)||g.isSame(p);){if(b%y==0){var _=String(g.unix()),w=e[_],C=0;null!==w&&void 0!==w&&("object"===(void 0===w?"undefined":r(w))?w.hasOwnProperty(l)&&(C=w[l]):C=w),d.push({x:c?g.unix():g.valueOf(),y:u.default.normalizeGraphNumber(C)})}b+=1,g.add(m)}}return d}};exports.default=c,e.exports=exports.default},function(e,exports,t){function n(e,t){return o(i(e,t,r),e+"")}var r=t(162),i=t(494),o=t(495);e.exports=n},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(2),i=n(r),o=t(65),a=n(o),s=t(7),l=n(s),u=t(4),c=n(u),d=t(5),h=n(d),f=t(64),p=n(f),g="/plugins/org.graylog.plugins.pipelineprocessor",m=i.default.createStore({listenables:[a.default],rules:void 0,functionDescriptors:void 0,getInitialState:function(){return{rules:this.rules,functionDescriptors:this.functionDescriptors}},_updateRulesState:function(e){if(this.rules){this.rules.some(function(t){return t.id===e.id})?this.rules=this.rules.map(function(t){return t.id===e.id?e:t}):this.rules.push(e)}else this.rules=[e];this.trigger({rules:this.rules,functionDescriptors:this.functionDescriptors})},_updateFunctionDescriptors:function(e){e&&(this.functionDescriptors=e.sort(function(e,t){return(0,p.default)(e.name,t.name)})),this.trigger({rules:this.rules,functionDescriptors:this.functionDescriptors})},list:function(){var e=this,t=function(e){l.default.error("Fetching rules failed with status: "+e.message,"Could not retrieve processing rules")},n=c.default.qualifyUrl(g+"/system/pipelines/rule");return(0,h.default)("GET",n).then(function(t){e.rules=t,e.trigger({rules:t,functionDescriptors:e.functionDescriptors})},t)},get:function(e){var t=function(t){l.default.error('Fetching rule "'+e+'" failed with status: '+t.message,'Could not retrieve processing rule "'+e+'"')},n=c.default.qualifyUrl(g+"/system/pipelines/rule/"+e),r=(0,h.default)("GET",n);return r.then(this._updateRulesState,t),r},save:function(e){var t=this,n=function(t){l.default.error('Saving rule "'+e.title+'" failed with status: '+t.message,'Could not save processing rule "'+e.title+'"')},r=c.default.qualifyUrl(g+"/system/pipelines/rule"),i={title:e.title,description:e.description,source:e.source},o=(0,h.default)("POST",r,i);return o.then(function(e){t._updateRulesState(e),l.default.success('Rule "'+e.title+'" created successfully')},n),a.default.save.promise(o),o},update:function(e){var t=this,n=function(t){l.default.error('Updating rule "'+e.title+'" failed with status: '+t.message,'Could not update processing rule "'+e.title+'"')},r=c.default.qualifyUrl(g+"/system/pipelines/rule/"+e.id),i={id:e.id,title:e.title,description:e.description,source:e.source},o=(0,h.default)("PUT",r,i);return o.then(function(e){t._updateRulesState(e),l.default.success('Rule "'+e.title+'" updated successfully')},n),a.default.update.promise(o),o},delete:function(e){var t=this,n=function(t){l.default.error('Deleting rule "'+e.title+'" failed with status: '+t.message,'Could not delete processing rule "'+e.title+'"')},r=c.default.qualifyUrl(g+"/system/pipelines/rule/"+e.id);return(0,h.default)("DELETE",r).then(function(){t.rules=t.rules.filter(function(t){return t.id!==e.id}),t.trigger({rules:t.rules,functionDescriptors:t.functionDescriptors}),l.default.success('Rule "'+e.title+'" was deleted successfully')},n)},parse:function(e,t){var n=c.default.qualifyUrl(g+"/system/pipelines/rule/parse"),r={title:e.title,description:e.description,source:e.source};return(0,h.default)("POST",n,r).then(function(e){t([])},function(e){var n=e.additional.res;400===n.status&&t(n.body)})},multiple:function(e,t){var n=c.default.qualifyUrl(g+"/system/pipelines/rule/multiple"),r=(0,h.default)("POST",n,{rules:e});return r.then(t),r},loadFunctions:function(){if(!this.functionDescriptors){var e=c.default.qualifyUrl(g+"/system/pipelines/rule/functions");return(0,h.default)("GET",e).then(this._updateFunctionDescriptors)}}});exports.default=m,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=t(611);Object.defineProperty(exports,"BooleanField",{enumerable:!0,get:function(){return n(r).default}});var i=t(612);Object.defineProperty(exports,"ConfigurationForm",{enumerable:!0,get:function(){return n(i).default}});var o=t(613);Object.defineProperty(exports,"ConfigurationWell",{enumerable:!0,get:function(){return n(o).default}});var a=t(614);Object.defineProperty(exports,"DropdownField",{enumerable:!0,get:function(){return n(a).default}});var s=t(66);Object.defineProperty(exports,"FieldHelpers",{enumerable:!0,get:function(){return n(s).default}});var l=t(615);Object.defineProperty(exports,"ListField",{enumerable:!0,get:function(){return n(l).default}});var u=t(616);Object.defineProperty(exports,"NumberField",{enumerable:!0,get:function(){return n(u).default}});var c=t(617);Object.defineProperty(exports,"TextField",{enumerable:!0,get:function(){return n(c).default}});var d=t(618);Object.defineProperty(exports,"TitleField",{enumerable:!0,get:function(){return n(d).default}})},function(e,exports,t){var n=t(622);"string"==typeof n&&(n=[[e.i,n,""]]);var r={};r.transform=void 0;t(15)(n,r);n.locals&&(e.exports=n.locals)},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n={gl2ServerUrl:function(){return this.appConfig().gl2ServerUrl},gl2AppPathPrefix:function(){return this.appConfig().gl2AppPathPrefix},gl2DevMode:function(){return"undefined"!=typeof DEVELOPMENT&&DEVELOPMENT},rootTimeZone:function(){return this.appConfig().rootTimeZone},appConfig:function(){return window.appConfig||{}}};exports.default=n,e.exports=exports.default},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n1}},{interval:"month",unit:"month",step:1,condition:function(e){return 1===e.years()||e.months()>1}},{interval:"day",unit:"date",step:2,condition:function(e){return 1===e.months()||e.days()>10}},{interval:"day",unit:"date",step:1,condition:function(e){return e.days()>3}},{interval:"hour",unit:"hour",step:12,condition:function(e){return e.days()>1}},{interval:"hour",unit:"hour",step:3,condition:function(e){return 1===e.days()}},{interval:"hour",unit:"hour",step:1,condition:function(e){return e.hours()>1}},{interval:"minute",unit:"minute",step:10,condition:function(e){return 1===e.hours()||e.minutes()>30}},{interval:"minute",unit:"minute",step:5,condition:function(e){return e.minutes()>15}},{interval:"minute",unit:"minute",step:1,condition:function(){return!0}}],customDateTimeFormat:function(e){var t=this;return void 0===e&&(e=null),function(n){var r=void 0,o=void 0;return null===e?r=new i.default(n).toMoment():(r=(0,a.default)(n),r.utcOffset(e)),t.dateTimeFormats.some(function(e){if(!0===e.condition(r))return o=r.format(e.formatString),!0}),o}},customTickInterval:function(e){var t=this;return void 0===e&&(e=null),function(n,r,o){var s=[],l=void 0,u=void 0;if(null===e?(l=new i.default(n).toMoment(),u=new i.default(r).toMoment()):(l=(0,a.default)(n),u=(0,a.default)(r),l.utcOffset(e),u.utcOffset(e)),!l.isValid()||!u.isValid())return s;var c=void 0,d=void 0,h=a.default.duration(u.valueOf()-l.valueOf());if(t.intervalResolutions.some(function(e){if(e.condition(h))return c=e.interval,d=e.unit,o=e.step,!0}),l.add(1,c).startOf(c),o>1)for(;l.isBefore(u);)l.get(d)%o==0&&s.push(new Date(l.valueOf())),l.add(1,c);else for(;l.isBefore(u);)s.push(new Date(l.valueOf())),l.add(1,c);return s}}},e.exports=exports.default},function(e,exports,t){e.exports=t(325).crossfilter},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(32),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={glColourPalette:function(){return r.default.scale.ordinal().range(["#16ACE3","#FBB040","#ED8EEF","#7CE255","#8DB3ED","#EAF253","#CED945","#EF8DB6","#D4A8ED","#F495D9"])},tooltipRenderlet:function(e,t,n){e.on("renderlet.tooltip",function(e){r.default.select(e.root()[0][0]).selectAll(t).attr("rel","tooltip").attr("data-original-title",n)})}};exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;nn(t).setHours(0,0,0,0)}function s(e){var t=new Date;return t.setHours(0,0,0,0),o(e,t)}function l(e){var t=new Date((new Date).getTime()+864e5);return t.setHours(0,0,0,0),e>=t}function u(e,t,r){var i=n(e);return i.setHours(0,0,0,0),a(i,t)&&o(i,r)||a(i,r)&&o(i,t)}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:null,to:null},n=t.from,r=t.to;return n?n&&r&&i(n,r)&&i(e,n)?(n=null,r=null):r&&o(e,n)?n=e:r&&i(e,r)?(n=e,r=e):(r=e,o(r,n)&&(r=n,n=e)):n=e,{from:n,to:r}}function d(e,t){var n=t.from,r=t.to;return n&&i(e,n)||r&&i(e,r)||n&&r&&u(e,n,r)}function h(e){var t=n(e);return t.setHours(0,0,0),t.setDate(t.getDate()+4-(t.getDay()||7)),Math.ceil(((t-new Date(t.getFullYear(),0,1))/864e5+1)/7)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.clone=n,exports.addMonths=r,exports.isSameDay=i,exports.isDayBefore=o,exports.isDayAfter=a,exports.isPastDay=s,exports.isFutureDay=l,exports.isDayBetween=u,exports.addDayToRange=c,exports.isDayInRange=d,exports.getWeekNumber=h,exports.default={addDayToRange:c,addMonths:r,clone:n,getWeekNumber:h,isDayAfter:a,isDayBefore:o,isDayBetween:u,isDayInRange:d,isFutureDay:l,isPastDay:s,isSameDay:i}},function(e,exports,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function r(e){for(var t=0,n=void 0,r=0,i=e.length;rt&&(t=n);return t}function i(e){for(var t=Array(e.length),n=0,r=e.length;n=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function l(e,t){for(var n=p(e),r=_(e),i=Array(e.length),a=0,s=r.length;a0&&!h(e,t);)t.y--;for(var i=void 0;i=h(e,t);)t.y=i.y+i.h;return t}function c(e,t){for(var n=p(e),r=0,i=e.length;rt.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;h(n,o);)o.y++;else n.push(o)}return e}function d(e,t){for(var n=0,r=e.length;nr;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var a=_(e);o&&(a=a.reverse());for(var s=f(a,t),l=0,u=s.length;lc.y&&t.y-c.y>c.h/4||(e=c.static?m(e,c,t,i):m(e,t,c,i)))}return e}function m(e,t,n,r){if(r){var i={x:n.x,y:n.y,w:n.w,h:n.h,i:"-1"};if(i.y=Math.max(t.y-n.h,0),!h(e,i))return g(e,n,void 0,i.y)}return g(e,n,void 0,n.y+1)}function v(e){return 100*e+"%"}function y(e){var t=e.top,n=e.left,r=e.width,i=e.height,o="translate("+n+"px,"+t+"px)";return{transform:o,WebkitTransform:o,MozTransform:o,msTransform:o,OTransform:o,width:r+"px",height:i+"px",position:"absolute"}}function b(e){return{top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px",position:"absolute"}}function _(e){return[].concat(e).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function w(e,t,n,i){e=e||[];var a=[];return k.default.Children.forEach(t,function(t,n){var i=d(e,t.key||"1");if(i)a[n]=o(i);else{!T&&t.props._grid&&console.warn("`_grid` properties on children have been deprecated as of React 15.2. Please use `data-grid` or add your properties directly to the `layout`.");var s=t.props["data-grid"]||t.props._grid;s?(T||C([s],"ReactGridLayout.children"),a[n]=o(E({},s,{i:t.key}))):a[n]=o({w:1,h:1,x:0,y:r(a),i:t.key||"1"})}}),a=c(a,{cols:n}),a=l(a,i)}function C(e,t){t=t||"Layout";var n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,i=e.length;rm)return 1}for(var v=0,y=Math.max(f.length,p.length);vi)return 1}return 0}},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(2),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i=r.default.createActions({delete:{asyncResult:!0},list:{asyncResult:!0},get:{asyncResult:!0},save:{asyncResult:!0},update:{asyncResult:!0},parse:{asyncResult:!0},multiple:{asyncResult:!0},loadFunctions:{asyncResult:!0}});exports.default=i,e.exports=exports.default},function(e,exports,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=t(0),r=function(e){return e&&e.__esModule?e:{default:e}}(n),i={hasAttribute:function(e,t){return e.indexOf(t)>-1},optionalMarker:function(e){return e.is_optional?r.default.createElement("span",{className:"configuration-field-optional"},"(optional)"):null}};exports.default=i,e.exports=exports.default},function(e,exports){e.exports=function e(t,n){"use strict";var r,i,o=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,l=/^0x[0-9a-f]+$/i,u=/^0/,c=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},d=c(t).replace(a,"")||"",h=c(n).replace(a,"")||"",f=d.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=h.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),g=parseInt(d.match(l),16)||1!==f.length&&d.match(s)&&Date.parse(d),m=parseInt(h.match(l),16)||g&&h.match(s)&&Date.parse(h)||null;if(m){if(gm)return 1}for(var v=0,y=Math.max(f.length,p.length);vi)return 1}return 0}},function(e,exports,t){"use strict";var n=t(272),r=t(273),i=t(126);e.exports={formats:i,parse:r,stringify:n}},function(e,exports,t){(function(t,n,r){/* @preserve
* The MIT License (MIT)
*
* Copyright (c) 2013-2017 Petka Antonov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
!function(t){e.exports=t()}(function(){var e,i,exports;return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n||e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a0;){var t=e.shift();if("function"==typeof t){var n=e.shift(),r=e.shift();t.call(n,r)}else t._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},n.exports=r,n.exports.firstLineError=s},{"./queue":26,"./schedule":29,"./util":36}],3:[function(e,t,exports){"use strict";t.exports=function(e,t,n,r){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=r.propagateFromFunction(),e.prototype._boundValue=r.boundValueFunction());var u=n(o),c=new e(t);c._propagateFrom(this,1);var d=this._target();if(c._setBoundTo(u),u instanceof e){var h={promiseRejectionQueued:!1,promise:c,target:d,bindingPromise:u};d._then(t,a,void 0,c,h),u._then(s,l,void 0,c,h),c._setOnCancel(u)}else c._resolveCallback(d);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,n){return e.resolve(n).bind(t)}}},{}],4:[function(e,t,exports){"use strict";function n(){try{Promise===i&&(Promise=r)}catch(e){}return i}var r;"undefined"!=typeof Promise&&(r=Promise);var i=e("./promise")();i.noConflict=n,t.exports=i},{"./promise":22}],5:[function(e,t,exports){"use strict";var n=Object.create;if(n){var r=n(null),i=n(null);r[" size"]=i[" size"]=0}t.exports=function(t){function n(e,n){var r;if(null!=e&&(r=e[n]),"function"!=typeof r){var i="Object "+s.classString(e)+" has no method '"+s.toString(n)+"'";throw new t.TypeError(i)}return r}function r(e){return n(e,this.pop()).apply(e,this)}function i(e){return e[this]}function o(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}var a,s=e("./util"),l=s.canEvaluate;s.isIdentifier;t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(r,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t,n="number"==typeof e;if(n)t=o;else if(l){var r=a(e);t=null!==r?r:i}else t=i;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i){var o=e("./util"),a=o.tryCatch,s=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var n=e._cancellationParent;if(null==n||!n._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=n}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var n=0;n=0)return o[e]}var i=!1,o=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=o.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=n,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var n=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=n,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,i=!1},i=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=r,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],9:[function(e,n,exports){"use strict";n.exports=function(n,r){function i(e,t){return{promise:t}}function o(){return!1}function a(e,t,n){var r=this;try{e(t,n,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+j.toString(e));r._attachCancellationCallback(e)})}catch(e){return e}}function s(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?j.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function l(){return this._onCancelField}function u(e){this._onCancelField=e}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function d(e,t){if(0!=(1&t)){this._cancellationParent=e;var n=e._branchesRemainingToCancel;void 0===n&&(n=0),e._branchesRemainingToCancel=n+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function h(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function f(){var e=this._boundTo;return void 0!==e&&e instanceof n?e.isFulfilled()?e.value():void 0:e}function p(){this._trace=new R(this._peekContext())}function g(e,t){if(z(e)){var n=this._trace;if(void 0!==n&&t&&(n=n._parent),void 0!==n)n.attachExtraTrace(e);else if(!e.__stackCleaned__){var r=E(e);j.notEnumerableProp(e,"stack",r.message+"\n"+r.stack.join("\n")),j.notEnumerableProp(e,"__stackCleaned__",!0)}}}function m(e,t,n,r,i){if(void 0===e&&null!==t&&Q){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=C(s),u=l.length-1;u>=0;--u){var c=l[u];if(!U.test(c)){var d=c.match(V);d&&(o="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(l.length>0)for(var h=l[0],u=0;u0&&(a="\n"+s[u-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;r._warn(f,!0,t)}}function v(e,t){var n=e+" is deprecated and will be removed in a future version.";return t&&(n+=" Use "+t+" instead."),y(n)}function y(e,t,r){if(se.warnings){var i,o=new N(e);if(t)r._attachExtraTrace(o);else if(se.longStackTraces&&(i=n._peekContext()))i.attachExtraTrace(o);else{var a=E(o);o.stack=a.message+"\n"+a.stack.join("\n")}ne("warning",o)||S(o,"",!0)}}function b(e,t){for(var n=0;n=0;--s)if(r[s]===o){a=s;break}for(var s=a;s>=0;--s){var l=r[s];if(t[i]!==l)break;t.pop(),i--}t=r}}function C(e){for(var t=[],n=0;n0&&"SyntaxError"!=e.name&&(t=t.slice(n)),t}function E(e){var t=e.stack,n=e.toString();return t="string"==typeof t&&t.length>0?A(e):[" (No stack trace)"],{message:n,stack:"SyntaxError"==e.name?t:C(t)}}function S(e,t,n){if("undefined"!=typeof console){var r;if(j.isObject(e)){var i=e.stack;r=t+W(i,e)}else r=t+String(e);"function"==typeof P?P(r,n):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(r)}}function x(e,t,n,r){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(r):t(n,r))}catch(e){I.throwLater(e)}"unhandledRejection"===e?ne(e,n,r)||i||S(n,"Unhandled rejection "):ne(e,r)}function F(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():j.toString(e);if(/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+k(t)+">, no stack trace)"}function k(e){return e.length<41?e:e.substr(0,38)+"..."}function T(){return"function"==typeof ae}function D(e){var t=e.match(oe);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function M(e,t){if(T()){for(var n,r,i=e.stack.split("\n"),o=t.stack.split("\n"),a=-1,s=-1,l=0;l=s||(ie=function(e){if(H.test(e))return!0;var t=D(e);return!!(t&&t.fileName===n&&a<=t.line&&t.line<=s)})}}function R(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ae(this,R),t>32&&this.uncycle()}var O,L,P,B=n._getDomain,I=n._async,N=e("./errors").Warning,j=e("./util"),z=j.canAttachTrace,H=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,V=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,G=null,W=null,q=!1,K=!(0==j.env("BLUEBIRD_DEBUG")),Y=!(0==j.env("BLUEBIRD_WARNINGS")||!K&&!j.env("BLUEBIRD_WARNINGS")),X=!(0==j.env("BLUEBIRD_LONG_STACK_TRACES")||!K&&!j.env("BLUEBIRD_LONG_STACK_TRACES")),Q=0!=j.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Y||!!j.env("BLUEBIRD_W_FORGOTTEN_RETURN"));n.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},n.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var e=this;setTimeout(function(){e._notifyUnhandledRejection()},1)}},n.prototype._notifyUnhandledRejectionIsHandled=function(){x("rejectionHandled",O,void 0,this)},n.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},n.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},n.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),x("unhandledRejection",L,e,this)}},n.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},n.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},n.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},n.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},n.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},n.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},n.prototype._warn=function(e,t,n){return y(e,t,n||this)},n.onPossiblyUnhandledRejection=function(e){var t=B();L="function"==typeof e?null===t?e:j.domainBind(t,e):void 0},n.onUnhandledRejectionHandled=function(e){var t=B();O="function"==typeof e?null===t?e:j.domainBind(t,e):void 0};var Z=function(){};n.longStackTraces=function(){if(I.haveItemsQueued()&&!se.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!se.longStackTraces&&T()){var e=n.prototype._captureStackTrace,t=n.prototype._attachExtraTrace;se.longStackTraces=!0,Z=function(){if(I.haveItemsQueued()&&!se.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");n.prototype._captureStackTrace=e,n.prototype._attachExtraTrace=t,r.deactivateLongStackTraces(),I.enableTrampoline(),se.longStackTraces=!1},n.prototype._captureStackTrace=p,n.prototype._attachExtraTrace=g,r.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},n.hasLongStackTraces=function(){return se.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return j.global.dispatchEvent(e),function(e,t){var n=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!j.global.dispatchEvent(n)}}if("function"==typeof Event){var e=new Event("CustomEvent");return j.global.dispatchEvent(e),function(e,t){var n=new Event(e.toLowerCase(),{cancelable:!0});return n.detail=t,!j.global.dispatchEvent(n)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),j.global.dispatchEvent(e),function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e.toLowerCase(),!1,!0,t),!j.global.dispatchEvent(n)}}catch(e){}return function(){return!1}}(),ee=function(){return j.isNode?function(){return t.emit.apply(t,arguments)}:j.global?function(e){var t="on"+e.toLowerCase(),n=j.global[t];return!!n&&(n.apply(j.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),te={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(e,t,n){return{promise:t,child:n}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,n){return{reason:t,promise:n}},rejectionHandled:i},ne=function(e){var t=!1;try{t=ee.apply(null,arguments)}catch(e){I.throwLater(e),t=!0}var n=!1;try{n=J(e,te[e].apply(null,arguments))}catch(e){I.throwLater(e),n=!0}return n||t};n.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?n.longStackTraces():!e.longStackTraces&&n.hasLongStackTraces()&&Z()),"warnings"in e){var t=e.warnings;se.warnings=!!t,Q=se.warnings,j.isObject(t)&&"wForgottenReturn"in t&&(Q=!!t.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!se.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");n.prototype._clearCancellationData=c,n.prototype._propagateFrom=d,n.prototype._onCancel=l,n.prototype._setOnCancel=u,n.prototype._attachCancellationCallback=s,n.prototype._execute=a,re=d,se.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!se.monitoring?(se.monitoring=!0,n.prototype._fireEvent=ne):!e.monitoring&&se.monitoring&&(se.monitoring=!1,n.prototype._fireEvent=o)),n},n.prototype._fireEvent=o,n.prototype._execute=function(e,t,n){try{e(t,n)}catch(e){return e}},n.prototype._onCancel=function(){},n.prototype._setOnCancel=function(e){},n.prototype._attachCancellationCallback=function(e){},n.prototype._captureStackTrace=function(){},n.prototype._attachExtraTrace=function(){},n.prototype._clearCancellationData=function(){},n.prototype._propagateFrom=function(e,t){};var re=h,ie=function(){return!1},oe=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;j.inherits(R,Error),r.CapturedTrace=R,R.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],n={},r=0,i=this;void 0!==i;++r)t.push(i),i=i._parent;e=this._length=r;for(var r=e-1;r>=0;--r){var o=t[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;r0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[r]._parent=void 0,t[r]._length=1;var l=r>0?t[r-1]:this;s=0;--c)t[c]._length=u,u++;return}}}},R.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=E(e),n=t.message,r=[t.stack],i=this;void 0!==i;)r.push(C(i.stack.split("\n"))),i=i._parent;w(r),_(r),j.notEnumerableProp(e,"stack",b(n,r)),j.notEnumerableProp(e,"__stackCleaned__",!0)}};var ae=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():F(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,G=e,W=t;var n=Error.captureStackTrace;return ie=function(e){return H.test(e)},function(e,t){Error.stackTraceLimit+=6,n(e,t),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return G=/@/,W=t,q=!0,function(e){e.stack=(new Error).stack};var i;try{throw new Error}catch(e){i="stack"in e}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(W=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?F(t):t.toString()},null):(G=e,W=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(P=function(e){console.warn(e)},j.isNode&&t.stderr.isTTY?P=function(e,t){var n=t?"[33m":"[31m";console.warn(n+e+"[0m\n")}:j.isNode||"string"!=typeof(new Error).stack||(P=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var se={warnings:Y,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&n.longStackTraces(),{longStackTraces:function(){return se.longStackTraces},warnings:function(){return se.warnings},cancellation:function(){return se.cancellation},monitoring:function(){return se.monitoring},propagateFromFunction:function(){return re},boundValueFunction:function(){return f},checkForgottenReturns:m,setBounds:M,warn:y,deprecated:v,CapturedTrace:R,fireDomEvent:J,fireGlobalEvent:ee}}},{"./errors":12,"./util":36}],10:[function(e,t,exports){"use strict";t.exports=function(e){function t(){return this.value}function n(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(n){return n instanceof e&&n.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:n},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(n,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:e},void 0);var t=arguments[1],r=function(){throw t};return this.caught(e,r)},e.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof e&&n.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:n},void 0);var r=arguments[1];r instanceof e&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(e,t,exports){"use strict";t.exports=function(e,t){function n(){return o(this)}function r(e,n){return i(e,n,t,t)}var i=e.reduce,o=e.all;e.prototype.each=function(e){return i(this,e,t,0)._then(n,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return i(this,e,t,t)},e.each=function(e,r){return i(e,r,t,0)._then(n,void 0,void 0,e,void 0)},e.mapSeries=r}},{}],12:[function(e,t,exports){"use strict";function n(e,t){function n(r){if(!(this instanceof n))return new n(r);c(this,"message","string"==typeof r?r:t),c(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(n,Error),n}function r(e){if(!(this instanceof r))return new r(e);c(this,"name","OperationalError"),c(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(c(this,"message",e.message),c(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}var i,o,a=e("./es5"),s=a.freeze,l=e("./util"),u=l.inherits,c=l.notEnumerableProp,d=n("Warning","warning"),h=n("CancellationError","cancellation error"),f=n("TimeoutError","timeout error"),p=n("AggregateError","aggregate error");try{i=TypeError,o=RangeError}catch(e){i=n("TypeError","type error"),o=n("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function s(){return u.call(this,this.promise._target()._settledValue())}function l(e){if(!a(this,e))return h.e=e,h}function u(e){var i=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(i._boundValue()):u.call(i._boundValue(),e);if(c===r)return c;if(void 0!==c){i._setReturnedNonUndefined();var f=n(c,i);if(f instanceof t){if(null!=this.cancelPromise){if(f._isCancelled()){var p=new d("late cancellation observer");return i._attachExtraTrace(p),h.e=p,h}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(s,l,void 0,this,void 0)}}}return i.isRejected()?(a(this),h.e=e,h):(a(this),e)}var c=e("./util"),d=t.CancellationError,h=c.errorObj,f=e("./catch_filter")(r);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){a(this.finallyHandler)},t.prototype._passThrough=function(e,t,n,r){return"function"!=typeof e?this.then():this._then(n,r,void 0,new i(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,u,u)},t.prototype.tap=function(e){return this._passThrough(e,1,u)},t.prototype.tapCatch=function(e){var n=arguments.length;if(1===n)return this._passThrough(e,1,void 0,u);var r,i=new Array(n-1),o=0;for(r=0;r0&&"function"==typeof arguments[t]){e=arguments[t];var r}var i=[].slice.call(arguments);e&&i.pop();var r=new n(i).promise();return void 0!==e?r.spread(e):r}}},{"./util":36}],18:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i,o,a){function s(e,t,n,r){this.constructor$(e),this._promise._captureStackTrace();var i=u();this._callback=null===i?t:c.domainBind(i,t),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function l(e,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+c.classString(n));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+c.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(e,n,a,o).promise()}var u=t._getDomain,c=e("./util"),d=c.tryCatch,h=c.errorObj,f=t._async;c.inherits(s,n),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(e,n){var r=this._values,o=this.length(),s=this._preservedValues,l=this._limit;if(n<0){if(n=-1*n-1,r[n]=e,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return r[n]=e,this._queue.push(n),!1;null!==s&&(s[n]=e);var u=this._promise,c=this._callback,f=u._boundValue();u._pushContext();var p=d(c).call(f,e,n,o),g=u._popContext();if(a.checkForgottenReturns(p,g,null!==s?"Promise.filter":"Promise.map",u),p===h)return this._reject(p.e),!0;var m=i(p,this._promise);if(m instanceof t){m=m._target();var v=m._bitField;if(0==(50397184&v))return l>=1&&this._inFlight++,r[n]=m,m._proxy(this,-1*(n+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(m._reason()),!0):(this._cancel(),!0);p=m._value()}r[n]=p}return++this._totalResolved>=o&&(null!==s?this._filter(r,s):this._resolve(r),!0)},s.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,n=this._values;e.length>0&&this._inFlight1){o.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];l=a.isArray(u)?s(e).apply(c,u):s(e).call(c,u)}else l=s(e)();var d=r._popContext();return o.checkForgottenReturns(l,d,"Promise.try",r),r._resolveFromSyncValue(l),r},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,exports){"use strict";function n(e){return e instanceof Error&&u.getPrototypeOf(e)===Error.prototype}function r(e){var t;if(n(e)){t=new l(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var r=u.keys(e),i=0;i1){var n,r=new Array(t-1),i=0;for(n=0;n0&&"function"!=typeof e&&"function"!=typeof t){var n=".then() only accepts functions but was passed: "+p.classString(e);arguments.length>1&&(n+=", "+p.classString(t)),this._warn(n)}return this._then(e,t,void 0,void 0,void 0)},o.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},o.prototype.spread=function(e){return"function"!=typeof e?h("expecting a function but got "+p.classString(e)):this.all()._then(e,void 0,void 0,C,void 0)},o.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},o.prototype.error=function(e){return this.caught(p.originatesFromRejection,e)},o.getNewLibraryCopy=n.exports,o.is=function(e){return e instanceof o},o.fromNode=o.fromCallback=function(e){var t=new o(w);t._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=O(e)(M(t,n));return r===R&&t._rejectCallback(r.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},o.all=function(e){return new S(e).promise()},o.cast=function(e){var t=E(e);return t instanceof o||(t=new o(w),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(e){var t=new o(w);return t._captureStackTrace(),t._rejectCallback(e,!0),t},o.setScheduler=function(e){if("function"!=typeof e)throw new b("expecting a function but got "+p.classString(e));return v.setScheduler(e)},o.prototype._then=function(e,t,n,r,i){var a=void 0!==i,s=a?i:new o(w),l=this._target(),c=l._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&c)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var d=u();if(0!=(50397184&c)){var h,f,g=l._settlePromiseCtx;0!=(33554432&c)?(f=l._rejectionHandler0,h=e):0!=(16777216&c)?(f=l._fulfillmentHandler0,h=t,l._unsetRejectionIsUnhandled()):(g=l._settlePromiseLateCancellationObserver,f=new _("late cancellation observer"),l._attachExtraTrace(f),h=t),v.invoke(g,l,{handler:null===d?h:"function"==typeof h&&p.domainBind(d,h),promise:s,receiver:r,value:f})}else l._addCallbacks(e,t,s,r,d);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},o.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==f)return void 0===t&&this._isBound()?this._boundValue():t},o.prototype._promiseAt=function(e){return this[4*e-4+2]},o.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},o.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),n=e._rejectionHandler0,r=e._promise0,i=e._receiverAt(0);void 0===i&&(i=f),this._addCallbacks(t,n,r,i,null)},o.prototype._migrateCallbackAt=function(e,t){var n=e._fulfillmentHandlerAt(t),r=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=f),this._addCallbacks(n,r,i,o,null)},o.prototype._addCallbacks=function(e,t,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof e&&(this._fulfillmentHandler0=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=null===i?t:p.domainBind(i,t));else{var a=4*o-4;this[a+2]=n,this[a+3]=r,"function"==typeof e&&(this[a+0]=null===i?e:p.domainBind(i,e)),"function"==typeof t&&(this[a+1]=null===i?t:p.domainBind(i,t))}return this._setLength(o+1),o},o.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},o.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(c(),!1);var n=E(e,this);if(!(n instanceof o))return this._fulfill(e);t&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(c());var i=r._bitField;if(0==(50397184&i)){var a=this._length();a>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var n=c();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():v.settlePromises(this))}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return v.fatalError(e,p.isNode);(65535&t)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled()}},o.prototype._fulfillPromises=function(e,t){for(var n=1;n0){if(0!=(16842752&e)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,e),this._rejectPromises(t,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,e),this._fulfillPromises(t,r)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){return k.deprecated("Promise.defer","new Promise"),{promise:new o(w),resolve:a,reject:s}},p.notEnumerableProp(o,"_makeSelfResolutionError",c),e("./method")(o,w,E,h,k),e("./bind")(o,w,E,k),e("./cancel")(o,S,h,k),e("./direct_resolve")(o),e("./synchronous_inspection")(o),e("./join")(o,S,E,w,v,u),o.Promise=o,o.version="3.5.1",e("./map.js")(o,S,h,E,w,k),e("./call_get.js")(o),e("./using.js")(o,h,E,F,w,k),e("./timers.js")(o,w,k),e("./generators.js")(o,h,w,E,r,k),e("./nodeify.js")(o),e("./promisify.js")(o,w),e("./props.js")(o,S,E,h),e("./race.js")(o,w,E,h),e("./reduce.js")(o,S,h,E,w,k),e("./settle.js")(o,S,k),e("./some.js")(o,S,h),e("./filter.js")(o,w),e("./each.js")(o,w),e("./any.js")(o),p.toFastProperties(o),p.toFastProperties(o.prototype),l({a:1}),l({b:2}),l({c:3}),l(1),l(function(){}),l(void 0),l(!1),l(new o(w)),k.setBounds(m.firstLineError,p.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i,o){function a(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function s(e){var r=this._promise=new t(n);e instanceof t&&r._propagateFrom(e,3),r._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var l=e("./util");l.isArray;return l.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(n,o){var s=r(this._values,this._promise);if(s instanceof t){s=s._target();var u=s._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null===(s=l.asArray(s))){var c=i("expecting an array or an iterable object but got "+l.classString(s)).reason();return void this._promise._rejectCallback(c,!1)}if(0===s.length)return void(-5===o?this._resolveEmptyArray():this._resolve(a(o)));this._iterate(s)},s.prototype._iterate=function(e){var n=this.getActualLength(e.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=h(this._values);else{n={};for(var r=this.length(),i=0,o=this.length();i>1},t.prototype.props=function(){return a(this)},t.props=function(e){return a(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,exports){"use strict";function n(e,t,n,r,i){for(var o=0;o=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(e,t){var n=new o;return n._bitField=33554432,n._settledValueField=e,this._promiseResolved(t,n)},i.prototype._promiseRejected=function(e,t){var n=new o;return n._bitField=16777216,n._settledValueField=e,this._promiseResolved(t,n)},t.settle=function(e){return r.deprecated(".settle()",".reflect()"),new i(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,exports){"use strict";t.exports=function(t,n,r){function i(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(e,t){if((0|t)!==t||t<0)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(e),o=n.promise();return n.setHowMany(t),n.init(),o}var a=e("./util"),s=e("./errors").RangeError,l=e("./errors").AggregateError,u=a.isArray,c={};a.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var e=u(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(e){this._howMany=e},i.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new l,t=this.length();t0?this._reject(e):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(e){this._values.push(e)},i.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new s(t)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return o(e,t)},t.prototype.some=function(e){return o(this,e)},t._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(e,t,exports){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var n=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return n.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),r.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,exports){"use strict";t.exports=function(t,n){function r(e,r){if(c(e)){if(e instanceof t)return e;var i=o(e);if(i===u){r&&r._pushContext();var l=t.reject(i.e);return r&&r._popContext(),l}if("function"==typeof i){if(a(e)){var l=new t(n);return e._then(l._fulfill,l._reject,void 0,l,null),l}return s(e,i,r)}}return e}function i(e){return e.then}function o(e){try{return i(e)}catch(e){return u.e=e,u}}function a(e){try{return d.call(e,"_promise0")}catch(e){return!1}}function s(e,r,i){function o(e){s&&(s._resolveCallback(e),s=null)}function a(e){s&&(s._rejectCallback(e,d,!0),s=null)}var s=new t(n),c=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var d=!0,h=l.tryCatch(r).call(e,o,a);return d=!1,s&&h===u&&(s._rejectCallback(h.e,!0,!0),s=null),c}var l=e("./util"),u=l.errorObj,c=l.isObject,d={}.hasOwnProperty;return r}},{"./util":36}],34:[function(e,t,exports){"use strict";t.exports=function(t,n,r){function i(e){this.handle=e}function o(e){return clearTimeout(this.handle),e}function a(e){throw clearTimeout(this.handle),e}var s=e("./util"),l=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var u=function(e){return c(+this).thenReturn(e)},c=t.delay=function(e,o){var a,s;return void 0!==o?(a=t.resolve(o)._then(u,null,null,e,void 0),r.cancellation()&&o instanceof t&&a._setOnCancel(o)):(a=new t(n),s=setTimeout(function(){a._fulfill()},+e),r.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};t.prototype.delay=function(e){return c(e,this)};var d=function(e,t,n){var r;r="string"!=typeof t?t instanceof Error?t:new l("operation timed out"):new l(t),s.markAsOriginatingFromRejection(r),e._attachExtraTrace(r),e._reject(r),null!=n&&n.cancel()};t.prototype.timeout=function(e,t){e=+e;var n,s,l=new i(setTimeout(function(){n.isPending()&&d(n,t,s)},e));return r.cancellation()?(s=this.then(),n=s._then(o,a,void 0,l,void 0),n._setOnCancel(l)):n=this._then(o,a,void 0,l,void 0),n}}},{"./util":36}],35:[function(e,t,exports){"use strict";t.exports=function(t,n,r,i,o,a){function s(e){setTimeout(function(){throw e},0)}function l(e){var t=r(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function u(e,n){function i(){if(a>=u)return c._fulfill();var o=l(e[a++]);if(o instanceof t&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),e.promise)}catch(e){return s(e)}if(o instanceof t)return o._then(i,s,null,null,null)}i()}var a=0,u=e.length,c=new t(o);return i(),c}function c(e,t,n){this._data=e,this._promise=t,this._context=n}function d(e,t,n){this.constructor$(e,t,n)}function h(e){return c.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function f(e){this.length=e,this.promise=null,this[e-1]=null}var p=e("./util"),g=e("./errors").TypeError,m=e("./util").inherits,v=p.errorObj,y=p.tryCatch,b={};c.prototype.data=function(){return this._data},c.prototype.promise=function(){return this._promise},c.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():b},c.prototype.tryDispose=function(e){var t=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=t!==b?this.doDispose(t,e):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},c.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},m(d,c),d.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},f.prototype._resultCancelled=function(){for(var e=this.length,n=0;n0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new d(e,this,i());throw new g}}},{"./errors":12,"./util":36}],36:[function(e,r,exports){"use strict";function i(){try{var e=D;return D=null,e.apply(this,arguments)}catch(e){return T.e=e,T}}function o(e){return D=e,i}function a(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function s(e){return"function"==typeof e||"object"==typeof e&&null!==e}function l(e){return a(e)?new Error(v(e)):e}function u(e,t){var n,r=e.length,i=new Array(r+1);for(n=0;n1,r=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=L.test(e+"")&&F.names(e).length>0;if(n||r||i)return!0}return!1}catch(e){return!1}}function p(e){function t(){}t.prototype=e;for(var n=8;n--;)new t;return e}function g(e){return P.test(e)}function m(e,t,n){for(var r=new Array(e),i=0;i10||e[0]>0}(),H.isNode&&H.toFastProperties(t);try{throw new Error}catch(e){H.lastLineError=e}r.exports=H},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(exports,t(277),t(21),t(127).setImmediate)},function(e,exports,t){e.exports=t(8)(81)},function(e,exports,t){var n,r;!function(i,o){n=[t(32)],void 0!==(r=function(e){return i.Rickshaw=o(e)}.apply(exports,n))&&(e.exports=r)}(this,function(e){var t={version:"1.6.3",namespace:function(e,n){for(var r=e.split("."),i=t,o=1,a=r.length;o0){var t=e.data[0].x,n=e.data[0].y;if("number"!=typeof t||"number"!=typeof n&&null!==n)throw"x and y properties of points should be numbers instead of "+typeof t+" and "+typeof n}if(e.data.length>=3&&(e.data[2].xthis.window.xMax&&(t=!1),t}return!0},this.onUpdate=function(e){this.updateCallbacks.push(e)},this.onConfigure=function(e){this.configureCallbacks.push(e)},this.registerRenderer=function(e){this._renderers=this._renderers||{},this._renderers[e.name]=e},this.configure=function(e){this.config=this.config||{},(e.width||e.height)&&this.setSize(e),t.keys(this.defaults).forEach(function(t){this.config[t]=t in e?e[t]:t in this?this[t]:this.defaults[t]},this),t.keys(this.config).forEach(function(e){this[e]=this.config[e]},this),"stack"in e&&(e.unstack=!e.stack);var n=e.renderer||this.renderer&&this.renderer.name||"stack";this.setRenderer(n,e),this.configureCallbacks.forEach(function(t){t(e)})},this.setRenderer=function(e,t){if("function"==typeof e)this.renderer=new e({graph:r}),this.registerRenderer(this.renderer);else{if(!this._renderers[e])throw"couldn't find renderer "+e;this.renderer=this._renderers[e]}"object"==typeof t&&this.renderer.configure(t)},this.setSize=function(e){if(e=e||{},"undefined"!=typeof window)var t=window.getComputedStyle(this.element,null),n=parseInt(t.getPropertyValue("width"),10),r=parseInt(t.getPropertyValue("height"),10);this.width=e.width||n||400,this.height=e.height||r||250,this.vis&&this.vis.attr("width",this.width).attr("height",this.height)},this.initialize(n)},t.namespace("Rickshaw.Fixtures.Color"),t.Fixtures.Color=function(){this.schemes={},this.schemes.spectrum14=["#ecb796","#dc8f70","#b2a470","#92875a","#716c49","#d2ed82","#bbe468","#a1d05d","#e7cbe6","#d8aad6","#a888c2","#9dc2d3","#649eb9","#387aa3"].reverse(),this.schemes.spectrum2000=["#57306f","#514c76","#646583","#738394","#6b9c7d","#84b665","#a7ca50","#bfe746","#e2f528","#fff726","#ecdd00","#d4b11d","#de8800","#de4800","#c91515","#9a0000","#7b0429","#580839","#31082b"],this.schemes.spectrum2001=["#2f243f","#3c2c55","#4a3768","#565270","#6b6b7c","#72957f","#86ad6e","#a1bc5e","#b8d954","#d3e04e","#ccad2a","#cc8412","#c1521d","#ad3821","#8a1010","#681717","#531e1e","#3d1818","#320a1b"],this.schemes.classic9=["#423d4f","#4a6860","#848f39","#a2b73c","#ddcb53","#c5a32f","#7d5836","#963b20","#7c2626","#491d37","#2f254a"].reverse(),this.schemes.httpStatus={503:"#ea5029",502:"#d23f14",500:"#bf3613",410:"#efacea",409:"#e291dc",403:"#f457e8",408:"#e121d2",401:"#b92dae",405:"#f47ceb",404:"#a82a9f",400:"#b263c6",301:"#6fa024",302:"#87c32b",307:"#a0d84c",304:"#28b55c",200:"#1a4f74",206:"#27839f",201:"#52adc9",202:"#7c979f",203:"#a5b8bd",204:"#c1cdd1"},this.schemes.colorwheel=["#b5b6a9","#858772","#785f43","#96557e","#4682b4","#65b9ac","#73c03a","#cb513a"].reverse(),this.schemes.cool=["#5e9d2f","#73c03a","#4682b4","#7bc3b8","#a9884e","#c1b266","#a47493","#c09fb5"],this.schemes.munin=["#00cc00","#0066b3","#ff8000","#ffcc00","#330099","#990099","#ccff00","#ff0000","#808080","#008f00","#00487d","#b35a00","#b38f00","#6b006b","#8fb300","#b30000","#bebebe","#80ff80","#80c9ff","#ffc080","#ffe680","#aa80ff","#ee00cc","#ff8080","#666600","#ffbfff","#00ffcc","#cc6699","#999900"]},t.namespace("Rickshaw.Fixtures.RandomData"),t.Fixtures.RandomData=function(e){e=e||1;var t=200,n=Math.floor((new Date).getTime()/1e3);this.addData=function(r){var i=100*Math.random()+15+t,o=r[0].length,a=1;r.forEach(function(t){var r=20*Math.random(),s=i/25+a+++15*(Math.cos(o*a*11/960)+2)+7*(Math.cos(o/7)+2)+1*(Math.cos(o/17)+2);t.push({x:o*e+n,y:s+r})}),t=.85*i},this.removeData=function(t){t.forEach(function(e){e.shift()}),n+=e}},t.namespace("Rickshaw.Fixtures.Time"),t.Fixtures.Time=function(){var t=this;this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.units=[{name:"decade",seconds:315576e3,formatter:function(e){return 10*parseInt(e.getUTCFullYear()/10,10)}},{name:"year",seconds:31557600,formatter:function(e){return e.getUTCFullYear()}},{name:"month",seconds:2635200,formatter:function(e){return t.months[e.getUTCMonth()]}},{name:"week",seconds:604800,formatter:function(e){return t.formatDate(e)}},{name:"day",seconds:86400,formatter:function(e){return e.getUTCDate()}},{name:"6 hour",seconds:21600,formatter:function(e){return t.formatTime(e)}},{name:"hour",seconds:3600,formatter:function(e){return t.formatTime(e)}},{name:"15 minute",seconds:900,formatter:function(e){return t.formatTime(e)}},{name:"minute",seconds:60,formatter:function(e){return e.getUTCMinutes()+"m"}},{name:"15 second",seconds:15,formatter:function(e){return e.getUTCSeconds()+"s"}},{name:"second",seconds:1,formatter:function(e){return e.getUTCSeconds()+"s"}},{name:"decisecond",seconds:.1,formatter:function(e){return e.getUTCMilliseconds()+"ms"}},{name:"centisecond",seconds:.01,formatter:function(e){return e.getUTCMilliseconds()+"ms"}}],this.unit=function(e){return this.units.filter(function(t){return e==t.name}).shift()},this.formatDate=function(t){return e.time.format("%b %e")(t)},this.formatTime=function(e){return e.toUTCString().match(/(\d+:\d+):/)[1]},this.ceil=function(e,t){var n,r;if("month"==t.name){if(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),n.getUTCMonth())/1e3==e)return e;r=n.getUTCFullYear();var i=n.getUTCMonth();return 11==i?(i=0,r+=1):i+=1,Date.UTC(r,i)/1e3}return"year"==t.name?(n=new Date(1e3*e),Date.UTC(n.getUTCFullYear(),0)/1e3==e?e:(r=n.getUTCFullYear()+1,Date.UTC(r,0)/1e3)):Math.ceil(e/t.seconds)*t.seconds}},t.namespace("Rickshaw.Fixtures.Time.Local"),t.Fixtures.Time.Local=function(){var t=this;this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.units=[{name:"decade",seconds:315576e3,formatter:function(e){return 10*parseInt(e.getFullYear()/10,10)}},{name:"year",seconds:31557600,formatter:function(e){return e.getFullYear()}},{name:"month",seconds:2635200,formatter:function(e){return t.months[e.getMonth()]}},{name:"week",seconds:604800,formatter:function(e){return t.formatDate(e)}},{name:"day",seconds:86400,formatter:function(e){return e.getDate()}},{name:"6 hour",seconds:21600,formatter:function(e){return t.formatTime(e)}},{name:"hour",seconds:3600,formatter:function(e){return t.formatTime(e)}},{name:"15 minute",seconds:900,formatter:function(e){return t.formatTime(e)}},{name:"minute",seconds:60,formatter:function(e){return e.getMinutes()}},{name:"15 second",seconds:15,formatter:function(e){return e.getSeconds()+"s"}},{name:"second",seconds:1,formatter:function(e){return e.getSeconds()+"s"}},{name:"decisecond",seconds:.1,formatter:function(e){return e.getMilliseconds()+"ms"}},{name:"centisecond",seconds:.01,formatter:function(e){return e.getMilliseconds()+"ms"}}],this.unit=function(e){return this.units.filter(function(t){return e==t.name}).shift()},this.formatDate=function(t){return e.time.format("%b %e")(t)},this.formatTime=function(e){return e.toString().match(/(\d+:\d+):/)[1]},this.ceil=function(e,t){var n,r,i;if("day"==t.name){var o=new Date(1e3*(e+t.seconds-1)),a=new Date(0);return a.setFullYear(o.getFullYear()),a.setMonth(o.getMonth()),a.setDate(o.getDate()),a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.getTime()/1e3}if("month"==t.name){if(n=new Date(1e3*e),new Date(n.getFullYear(),n.getMonth()).getTime()/1e3==e)return e;r=n.getFullYear();var s=n.getMonth();return 11==s?(s=0,r+=1):s+=1,new Date(r,s).getTime()/1e3}return"year"==t.name?(n=new Date(1e3*e),new Date(n.getUTCFullYear(),0).getTime()/1e3==e?e:(r=n.getFullYear()+1,new Date(r,0).getTime()/1e3)):(i=60*new Date(1e3*e).getTimezoneOffset(),Math.ceil((e-i)/t.seconds)*t.seconds+i)}},t.namespace("Rickshaw.Fixtures.Number"),t.Fixtures.Number.formatKMBT=function(e){var t=Math.abs(e);return t>=1e12?e/1e12+"T":t>=1e9?e/1e9+"B":t>=1e6?e/1e6+"M":t>=1e3?e/1e3+"K":t<1&&t>0?e.toFixed(2):0===t?"":e},t.Fixtures.Number.formatBase1024KMGTP=function(e){var t=Math.abs(e);return t>=0x4000000000000?e/0x4000000000000+"P":t>=1099511627776?e/1099511627776+"T":t>=1073741824?e/1073741824+"G":t>=1048576?e/1048576+"M":t>=1024?e/1024+"K":t<1&&t>0?e.toFixed(2):0===t?"":e},t.namespace("Rickshaw.Color.Palette"),t.Color.Palette=function(n){var r=new t.Fixtures.Color;if(n=n||{},this.schemes={},this.scheme=r.schemes[n.scheme]||n.scheme||r.schemes.colorwheel,this.runningIndex=0,this.generatorIndex=0,n.interpolatedStopCount){var i,o,a=this.scheme.length-1,s=[];for(i=0;in.graph.x.range()[1])return t.element&&(t.line.classList.add("offscreen"),t.element.style.display="none"),void t.boxes.forEach(function(e){e.rangeElement&&e.rangeElement.classList.add("offscreen")});if(!t.element){var i=t.element=document.createElement("div");i.classList.add("annotation"),this.elements.timeline.appendChild(i),i.addEventListener("click",function(e){i.classList.toggle("active"),t.line.classList.toggle("active"),t.boxes.forEach(function(e){e.rangeElement&&e.rangeElement.classList.toggle("active")})},!1)}t.element.style.left=r+"px",t.element.style.display="block",t.boxes.forEach(function(e){var i=e.element;if(i||(i=e.element=document.createElement("div"),i.classList.add("content"),i.innerHTML=e.content,t.element.appendChild(i),t.line=document.createElement("div"),t.line.classList.add("annotation_line"),n.graph.element.appendChild(t.line),e.end&&(e.rangeElement=document.createElement("div"),e.rangeElement.classList.add("annotation_range"),n.graph.element.appendChild(e.rangeElement))),e.end){var o=r,a=Math.min(n.graph.x(e.end),n.graph.x.range()[1]);o>a&&(a=r,o=Math.max(n.graph.x(e.end),n.graph.x.range()[0]));var s=a-o;e.rangeElement.style.left=o+"px",e.rangeElement.style.width=s+"px",e.rangeElement.classList.remove("offscreen")}t.line.classList.remove("offscreen"),t.line.style.left=r+"px"})},this)},this.graph.onUpdate(function(){n.update()})},t.namespace("Rickshaw.Graph.Axis.Time"),t.Graph.Axis.Time=function(e){var n=this;this.graph=e.graph,this.elements=[],this.ticksTreatment=e.ticksTreatment||"plain",this.fixedTimeUnit=e.timeUnit;var r=e.timeFixture||new t.Fixtures.Time;this.appropriateTimeUnit=function(){var e,t=r.units,n=this.graph.x.domain(),i=n[1]-n[0];return t.forEach(function(t){Math.floor(i/t.seconds)>=2&&(e=e||t)}),e||r.units[r.units.length-1]},this.tickOffsets=function(){for(var e=this.graph.x.domain(),t=this.fixedTimeUnit||this.appropriateTimeUnit(),n=Math.ceil((e[1]-e[0])/t.seconds),i=e[0],o=[],a=0;an.graph.x.range()[1])){var t=document.createElement("div");t.style.left=n.graph.x(e.value)+"px",t.classList.add("x_tick"),t.classList.add(n.ticksTreatment);var r=document.createElement("div");r.classList.add("title"),r.innerHTML=e.unit.formatter(new Date(1e3*e.value)),t.appendChild(r),n.graph.element.appendChild(t),n.elements.push(t)}})},this.graph.onUpdate(function(){n.render()})},t.namespace("Rickshaw.Graph.Axis.X"),t.Graph.Axis.X=function(t){var n=this;this.initialize=function(t){this.graph=t.graph,this.orientation=t.orientation||"top",this.pixelsPerTick=t.pixelsPerTick||75,t.ticks&&(this.staticTicks=t.ticks),t.tickValues&&(this.tickValues=t.tickValues),this.tickSize=t.tickSize||4,this.ticksTreatment=t.ticksTreatment||"plain",t.element?(this.element=t.element,this._discoverSize(t.element,t),this.vis=e.select(t.element).append("svg:svg").attr("height",this.height).attr("width",this.width).attr("class","rickshaw_graph x_axis_d3"),this.element=this.vis[0][0],this.element.style.position="relative",this.setSize({width:t.width,height:t.height})):this.vis=this.graph.vis,this.graph.onUpdate(function(){n.render()})},this.setSize=function(e){if(e=e||{},this.element){this._discoverSize(this.element.parentNode,e),this.vis.attr("height",this.height).attr("width",1.1*this.width);var t=Math.floor(.1*this.width/2);this.element.style.left=-1*t+"px"}},this.render=function(){void 0!==this._renderWidth&&this.graph.width!==this._renderWidth&&this.setSize({auto:!0});var n=e.svg.axis().scale(this.graph.x).orient(this.orientation);n.tickFormat(t.tickFormat||function(e){return e}),this.tickValues&&n.tickValues(this.tickValues),this.ticks=this.staticTicks||Math.floor(this.graph.width/this.pixelsPerTick);var r,i=Math.floor(.1*this.width/2)||0,o="bar"==this.graph.renderer.name&&Math.ceil(.95*this.graph.width/this.graph.series[0].data.length/2)||0;if("top"==this.orientation){r="translate("+(i+o)+","+(this.height||this.graph.height)+")"}else r="translate("+(i+o)+", 0)";this.element&&this.vis.selectAll("*").remove(),this.vis.append("svg:g").attr("class",["x_ticks_d3",this.ticksTreatment].join(" ")).attr("transform",r).call(n.ticks(this.ticks).tickSubdivide(0).tickSize(this.tickSize));var a=("bottom"==this.orientation?1:-1)*this.graph.height;this.graph.vis.append("svg:g").attr("class","x_grid_d3").call(n.ticks(this.ticks).tickSubdivide(0).tickSize(a)).selectAll("text").each(function(){this.parentNode.setAttribute("data-x-value",this.textContent)}),this._renderHeight=this.graph.height},this._discoverSize=function(e,t){if("undefined"!=typeof window){var n=window.getComputedStyle(e,null),r=parseInt(n.getPropertyValue("height"),10);if(!t.auto)var i=parseInt(n.getPropertyValue("width"),10)}this.width=1.1*(t.width||i||this.graph.width),this.height=t.height||r||40},this.initialize(t)},t.namespace("Rickshaw.Graph.Axis.Y"),t.Graph.Axis.Y=t.Class.create({initialize:function(t){this.graph=t.graph,this.orientation=t.orientation||"right",this.pixelsPerTick=t.pixelsPerTick||75,t.ticks&&(this.staticTicks=t.ticks),t.tickValues&&(this.tickValues=t.tickValues),this.tickSize=t.tickSize||4,this.ticksTreatment=t.ticksTreatment||"plain",this.tickFormat=t.tickFormat||function(e){return e},this.berthRate=.1,t.element?(this.element=t.element,this.vis=e.select(t.element).append("svg:svg").attr("class","rickshaw_graph y_axis"),this.element=this.vis[0][0],this.element.style.position="relative",this.setSize({width:t.width,height:t.height})):this.vis=this.graph.vis;var n=this;this.graph.onUpdate(function(){n.render()})},setSize:function(e){if(e=e||{},this.element){if("undefined"!=typeof window){var t=window.getComputedStyle(this.element.parentNode,null),n=parseInt(t.getPropertyValue("width"),10);if(!e.auto)var r=parseInt(t.getPropertyValue("height"),10)}this.width=e.width||n||this.graph.width*this.berthRate,this.height=e.height||r||this.graph.height,this.vis.attr("width",this.width).attr("height",this.height*(1+this.berthRate));var i=this.height*this.berthRate;"left"==this.orientation&&(this.element.style.top=-1*i+"px")}},render:function(){void 0!==this._renderHeight&&this.graph.height!==this._renderHeight&&this.setSize({auto:!0}),this.ticks=this.staticTicks||Math.floor(this.graph.height/this.pixelsPerTick);var e=this._drawAxis(this.graph.y);this._drawGrid(e),this._renderHeight=this.graph.height},_drawAxis:function(t){var n=e.svg.axis().scale(t).orient(this.orientation);if(n.tickFormat(this.tickFormat),this.tickValues&&n.tickValues(this.tickValues),"left"==this.orientation)var r=this.height*this.berthRate,i="translate("+this.width+", "+r+")";return this.element&&this.vis.selectAll("*").remove(),this.vis.append("svg:g").attr("class",["y_ticks",this.ticksTreatment].join(" ")).attr("transform",i).call(n.ticks(this.ticks).tickSubdivide(0).tickSize(this.tickSize)),n},_drawGrid:function(e){var t=("right"==this.orientation?1:-1)*this.graph.width;this.graph.vis.append("svg:g").attr("class","y_grid").call(e.ticks(this.ticks).tickSubdivide(0).tickSize(t)).selectAll("text").each(function(){this.parentNode.setAttribute("data-y-value",this.textContent)})}}),t.namespace("Rickshaw.Graph.Axis.Y.Scaled"),t.Graph.Axis.Y.Scaled=t.Class.create(t.Graph.Axis.Y,{initialize:function($super,e){if(void 0===e.scale)throw new Error("Scaled requires scale");this.scale=e.scale,void 0===e.grid?this.grid=!0:this.grid=e.grid,$super(e)},_drawAxis:function($super,t){var n=this.scale.domain(),r=this.graph.renderer.domain().y,i=[Math.min.apply(Math,n),Math.max.apply(Math,n)],o=e.scale.linear().domain([0,1]).range(i),a=[o(r[0]),o(r[1])],s=e.scale.linear().domain(i).range(a);return $super(this.scale.copy().domain(n.map(s)).range(t.range()))},_drawGrid:function($super,e){this.grid&&$super(e)}}),t.namespace("Rickshaw.Graph.Behavior.Series.Highlight"),t.Graph.Behavior.Series.Highlight=function(t){this.graph=t.graph,this.legend=t.legend;var n=this,r={},i=null,o=t.disabledColor||function(t){return e.interpolateRgb(t,e.rgb("#d8d8d8"))(.8).toString()};this.addHighlightEvents=function(e){e.element.addEventListener("mouseover",function(t){i||(i=e,n.legend.lines.forEach(function(t){if(e!==t)r[t.series.name]=r[t.series.name]||t.series.color,t.series.color=o(t.series.color);else if(n.graph.renderer.unstack&&(!t.series.renderer||t.series.renderer.unstack)){var i=n.graph.series.indexOf(t.series);t.originalIndex=i;var a=n.graph.series.splice(i,1)[0];n.graph.series.push(a)}}),n.graph.update())},!1),e.element.addEventListener("mouseout",function(t){i&&(i=null,n.legend.lines.forEach(function(t){if(e===t&&t.hasOwnProperty("originalIndex")){var i=n.graph.series.pop();n.graph.series.splice(t.originalIndex,0,i),delete t.originalIndex}r[t.series.name]&&(t.series.color=r[t.series.name])}),n.graph.update())},!1)},this.legend&&this.legend.lines.forEach(function(e){n.addHighlightEvents(e)})},t.namespace("Rickshaw.Graph.Behavior.Series.Order"),t.Graph.Behavior.Series.Order=function(e){this.graph=e.graph,this.legend=e.legend;var t=this;if(void 0===window.jQuery)throw"couldn't find jQuery at window.jQuery";if(void 0===window.jQuery.ui)throw"couldn't find jQuery UI at window.jQuery.ui";jQuery(function(){jQuery(t.legend.list).sortable({containment:"parent",tolerance:"pointer",update:function(e,n){var r=[];jQuery(t.legend.list).find("li").each(function(e,t){t.series&&r.push(t.series)});for(var i=t.graph.series.length-1;i>=0;i--)t.graph.series[i]=r.shift();t.graph.update()}}),jQuery(t.legend.list).disableSelection()}),this.graph.onUpdate(function(){var e=window.getComputedStyle(t.legend.element).height;t.legend.element.style.height=e})},t.namespace("Rickshaw.Graph.Behavior.Series.Toggle"),t.Graph.Behavior.Series.Toggle=function(e){this.graph=e.graph,this.legend=e.legend;var t=this;this.addAnchor=function(e){var n=document.createElement("a");n.innerHTML="✔",n.classList.add("action"),e.element.insertBefore(n,e.element.firstChild),n.onclick=function(n){if(e.series.disabled)e.series.enable(),e.element.classList.remove("disabled");else{if(this.graph.series.filter(function(e){return!e.disabled}).length<=1)return;e.series.disable(),e.element.classList.add("disabled")}t.graph.update()}.bind(this),e.element.getElementsByTagName("span")[0].onclick=function(n){var r=e.series.disabled;if(!r)for(var i=0;il.svgWidth-1||t<1)){var n=[c.startPX,t].sort(o),r=n[1]-n[0];if(isNaN(r))return i(this);s.attr("fill",l.fill).attr("x",n[0]).attr("width",r)}}function r(){var r=e.select(this);s=r.append("rect").style("opacity",l.opacity).attr("y",0).attr("height","100%"),e.event.preventDefault?e.event.preventDefault():e.event.returnValue=!1,c.target=e.event.target,c.startDt=a(e.event),c.startPX=e.event.offsetX||e.event.layerX,r.on("mousemove",n),e.select(document).on("mouseup",t),e.select(document).on("keyup",function(){e.event.keyCode===u&&i(this)})}function i(t){e.select(t).on("mousemove",null),e.select(document).on("mouseup",null),c={},s.remove()}function o(e,t){return e-t}function a(e){return Math.floor(l.graph.x.invert(e.offsetX||e.layerX))}var s,l=this,u=27,c={startDt:null,stopDt:null,startPX:null,stopPX:null};this.svg.on("mousedown",r)}}),t.namespace("Rickshaw.Graph.HoverDetail"),t.Graph.HoverDetail=t.Class.create({initialize:function(e){var t=this.graph=e.graph;this.xFormatter=e.xFormatter||function(e){return new Date(1e3*e).toUTCString()},this.yFormatter=e.yFormatter||function(e){return null===e?e:e.toFixed(2)};var n=this.element=document.createElement("div");n.className="detail inactive",this.visible=!0,t.element.appendChild(n),this.lastEvent=null,this._addListeners(),this.onShow=e.onShow,this.onHide=e.onHide,this.onRender=e.onRender,this.formatter=e.formatter||this.formatter},formatter:function(e,t,n,r,i,o){return e.name+": "+i},update:function(t){if((t=t||this.lastEvent)&&(this.lastEvent=t,t.target.nodeName.match(/^(path|svg|rect|circle)$/))){var n,r=this.graph,i=t.layerX||t.offsetX,o=t.layerY||t.offsetY,a=0,s=[];if(this.graph.series.active().forEach(function(t){var l=this.graph.stackedData[a++];if(l.length){var u=r.x.invert(i),c=e.scale.linear().domain([l[0].x,l.slice(-1)[0].x]).range([0,l.length-1]),d=Math.round(c(u));d==l.length-1&&d--;for(var h=Math.min(d||0,l.length-1),f=d;fu){h=Math.abs(u-l[f].x)0){d.forEach(function(e){e.classList.remove("left"),e.classList.add("right")});this._calcLayoutError(d)>h&&d.forEach(function(e){e.classList.remove("right"),e.classList.add("left")})}"function"==typeof this.onRender&&this.onRender(e)}},_calcLayoutError:function(e){var t=this.element.parentNode.getBoundingClientRect(),n=0;e.forEach(function(e){var r=e.getBoundingClientRect();r.width&&(r.right>t.right&&(n+=r.right-t.right),r.left=u.previewWidth&&(i[0]-=i[1]-u.previewWidth,i[1]=u.previewWidth)),u.graphs.forEach(function(t){var n=e.scale.linear().interpolate(e.interpolateNumber).domain([0,u.previewWidth]).range(t.dataDomain()),r=[n(i[0]),n(i[1])];u.slideCallbacks.forEach(function(e){e(t,r[0],r[1])}),0===i[0]&&(r[0]=void 0),i[1]===u.previewWidth&&(r[1]=void 0),t.window.xMin=r[0],t.window.xMax=r[1],t.update()})}function n(){l.target=e.event.target,l.start=u._getClientXFromEvent(e.event,l),u.frameBeforeDrag=u.currentFrame.slice(),e.event.preventDefault?e.event.preventDefault():e.event.returnValue=!1,e.select(document).on("mousemove.rickshaw_range_slider_preview",t),e.select(document).on("mouseup.rickshaw_range_slider_preview",a),e.select(document).on("touchmove.rickshaw_range_slider_preview",t),e.select(document).on("touchend.rickshaw_range_slider_preview",a),e.select(document).on("touchcancel.rickshaw_range_slider_preview",a)}function r(e,t){l.left=!0,n()}function i(e,t){l.right=!0,n()}function o(e,t){l.left=!0,l.right=!0,l.rigid=!0,n()}function a(t,n){e.select(document).on("mousemove.rickshaw_range_slider_preview",null),e.select(document).on("mouseup.rickshaw_range_slider_preview",null),e.select(document).on("touchmove.rickshaw_range_slider_preview",null),e.select(document).on("touchend.rickshaw_range_slider_preview",null),e.select(document).on("touchcancel.rickshaw_range_slider_preview",null),delete u.frameBeforeDrag,l.left=!1,l.right=!1,l.rigid=!1}var s=e.select(this.element),l={target:null,start:null,stop:null,left:!1,right:!1,rigid:!1},u=this;s.select("rect.left_handle").on("mousedown",r),s.select("rect.right_handle").on("mousedown",i),s.select("rect.middle_handle").on("mousedown",o),s.select("rect.left_handle").on("touchstart",r),s.select("rect.right_handle").on("touchstart",i),s.select("rect.middle_handle").on("touchstart",o)},_getClientXFromEvent:function(e,t){switch(e.type){case"touchstart":case"touchmove":for(var n=e.changedTouches,r=null,i=0;io&&(o=t)}}),e.length&&(e[0].xr&&(r=e[e.length-1].x))}),n-=(r-n)*this.padding.left,r+=(r-n)*this.padding.right,i="auto"===this.graph.min?i:this.graph.min||0,o=void 0===this.graph.max?o:this.graph.max,("auto"===this.graph.min||i<0)&&(i-=(o-i)*this.padding.bottom),void 0===this.graph.max&&(o+=(o-i)*this.padding.top),{x:[n,r],y:[i,o]}},render:function(e){e=e||{};var t=this.graph,n=e.series||t.series,r=e.vis||t.vis;r.selectAll("*").remove();var i=n.filter(function(e){return!e.disabled}).map(function(e){return e.stack}),o=r.selectAll("path.path").data(i).enter().append("svg:path").classed("path",!0).attr("d",this.seriesPathFactory());if(this.stroke)var a=r.selectAll("path.stroke").data(i).enter().append("svg:path").classed("stroke",!0).attr("d",this.seriesStrokeFactory());var s=0;n.forEach(function(e){e.disabled||(e.path=o[0][s],this.stroke&&(e.stroke=a[0][s]),this._styleSeries(e),s++)},this)},_styleSeries:function(t){var n=this.fill?t.color:"none",r=this.stroke?t.color:"none",i=t.strokeWidth?t.strokeWidth:this.strokeWidth,o=t.opacity?t.opacity:this.opacity;t.path.setAttribute("fill",n),t.path.setAttribute("stroke",r),t.path.setAttribute("stroke-width",i),t.path.setAttribute("opacity",o),t.className&&e.select(t.path).classed(t.className,!0),t.className&&this.stroke&&e.select(t.stroke).classed(t.className,!0)},configure:function(e){e=e||{},t.keys(this.defaults()).forEach(function(n){if(!e.hasOwnProperty(n))return void(this[n]=this[n]||this.graph[n]||this.defaults()[n]);"object"==typeof this.defaults()[n]?t.keys(this.defaults()[n]).forEach(function(t){this[n][t]=void 0!==e[n][t]?e[n][t]:void 0!==this[n][t]?this[n][t]:this.defaults()[n][t]},this):this[n]=void 0!==e[n]?e[n]:void 0!==this[n]?this[n]:void 0!==this.graph[n]?this.graph[n]:this.defaults()[n]},this)},setStrokeWidth:function(e){void 0!==e&&(this.strokeWidth=e)},setTension:function(e){void 0!==e&&(this.tension=e)}}),t.namespace("Rickshaw.Graph.Renderer.Line"),t.Graph.Renderer.Line=t.Class.create(t.Graph.Renderer,{name:"line",defaults:function($super){return t.extend($super(),{unstack:!0,fill:!1,stroke:!0})},seriesPathFactory:function(){var t=this.graph,n=e.svg.line().x(function(e){return t.x(e.x)}).y(function(e){return t.y(e.y)}).interpolate(this.graph.interpolation).tension(this.tension);return n.defined&&n.defined(function(e){return null!==e.y}),n}}),t.namespace("Rickshaw.Graph.Renderer.Stack"),t.Graph.Renderer.Stack=t.Class.create(t.Graph.Renderer,{name:"stack",defaults:function($super){return t.extend($super(),{fill:!0,stroke:!1,unstack:!1})},seriesPathFactory:function(){var t=this.graph,n=e.svg.area().x(function(e){return t.x(e.x)}).y0(function(e){return t.y(e.y0)}).y1(function(e){return t.y(e.y+e.y0)}).interpolate(this.graph.interpolation).tension(this.tension);return n.defined&&n.defined(function(e){return null!==e.y}),n}}),t.namespace("Rickshaw.Graph.Renderer.Bar"),t.Graph.Renderer.Bar=t.Class.create(t.Graph.Renderer,{name:"bar",defaults:function($super){var e=t.extend($super(),{gapSize:.05,unstack:!1,opacity:1});return delete e.tension,e},initialize:function($super,e){e=e||{},this.gapSize=e.gapSize||this.gapSize,$super(e)},domain:function($super){var e=$super(),t=this._frequentInterval(this.graph.stackedData.slice(-1).shift());return e.x[1]+=Number(t.magnitude),e},barWidth:function(e){var t=this._frequentInterval(e.stack);return this.graph.x.magnitude(t.magnitude)*(1-this.gapSize)},render:function(e){e=e||{};var t=this.graph,n=e.series||t.series,r=e.vis||t.vis;r.selectAll("*").remove();var i=this.barWidth(n.active()[0]),o=0,a=n.filter(function(e){return!e.disabled}).length,s=this.unstack?i/a:i,l=function(e){return"matrix("+[1,0,0,e.y<0?-1:1,0,e.y<0?2*t.y.magnitude(Math.abs(e.y)):0].join(",")+")"};n.forEach(function(e){if(!e.disabled){var n=(this.barWidth(e),r.selectAll("path").data(e.stack.filter(function(e){return null!==e.y})).enter().append("svg:rect").attr("x",function(e){return t.x(e.x)+o}).attr("y",function(e){return t.y(e.y0+Math.abs(e.y))*(e.y<0?-1:1)}).attr("width",s).attr("height",function(e){return t.y.magnitude(Math.abs(e.y))}).attr("opacity",e.opacity).attr("transform",l));Array.prototype.forEach.call(n[0],function(t){t.setAttribute("fill",e.color)}),this.unstack&&(o+=s)}},this)},_frequentInterval:function(e){for(var n={},r=0;r0?this[0].data.forEach(function(t){e.data.push({x:t.x,y:0})}):0===e.data.length&&e.data.push({x:this.timeBase-(this.timeInterval||0),y:0}),this.push(e),this.legend&&this.legend.addLine(this.itemByName(e.name))},addData:function(e,n){var r=this.getIndex();t.keys(e).forEach(function(e){this.itemByName(e)||this.addItem({name:e})},this),this.forEach(function(t){t.data.push({x:n||(r*this.timeInterval||1)+this.timeBase,y:e[t.name]||0})},this)},getIndex:function(){return this[0]&&this[0].data&&this[0].data.length?this[0].data.length:0},itemByName:function(e){for(var t=0;t1;i--)this.currentSize+=1,this.currentIndex+=1,this.forEach(function(e){e.data.unshift({x:((i-1)*this.timeInterval||1)+this.timeBase,y:0,i:i})},this)},addData:function($super,e,t){if($super(e,t),this.currentSize+=1,this.currentIndex+=1,void 0!==this.maxDataPoints)for(;this.currentSize>this.maxDataPoints;)this.dropData()},dropData:function(){this.forEach(function(e){e.data.splice(0,1)}),this.currentSize-=1},getIndex:function(){return this.currentIndex}}),t})},function(e,exports,t){var n,r,i;/*!
* dc 2.0.5
* http://dc-js.github.io/dc.js/
* Copyright 2012-2016 Nick Zhu & the dc.js Developers
* https://github.com/dc-js/dc.js/blob/master/AUTHORS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
!function(){function o(e,t){"use strict";var n={version:"2.0.5",constants:{CHART_CLASS:"dc-chart",DEBUG_GROUP_CLASS:"debug",STACK_CLASS:"stack",DESELECTED_CLASS:"deselected",SELECTED_CLASS:"selected",NODE_INDEX_NAME:"__index__",GROUP_INDEX_NAME:"__group_index__",DEFAULT_CHART_GROUP:"__default_chart_group__",EVENT_DELAY:40,NEGLIGIBLE_NUMBER:1e-10},_renderlet:null};n.chartRegistry=function(){function e(e){return e||(e=n.constants.DEFAULT_CHART_GROUP),t[e]||(t[e]=[]),e}var t={};return{has:function(e){for(var n in t)if(t[n].indexOf(e)>=0)return!0;return!1},register:function(n,r){r=e(r),t[r].push(n)},deregister:function(n,r){r=e(r);for(var i=0;i=0||void 0!==t)&&(o=o.duration(t)),(r>=0||void 0!==r)&&(o=o.delay(r)),o},n.optionalTransition=function(e,t,r,i){return e?function(e){return n.transition(e,t,r,i)}:function(e){return e}},n.afterTransition=function(e,t){if(e.empty()||!e.duration)t.call(e);else{var n=0;e.each(function(){++n}).each("end",function(){--n||t.call(e)})}},n.units={},n.units.integers=function(e,t){return Math.abs(t-e)},n.units.ordinal=function(e,t,n){return n},n.units.fp={},n.units.fp.precision=function(e){var t=function(e,r){var i=Math.abs((r-e)/t.resolution);return n.utils.isNegligible(i-Math.floor(i))?Math.floor(i):Math.ceil(i)};return t.resolution=e,t},n.round={},n.round.floor=function(e){return Math.floor(e)},n.round.ceil=function(e){return Math.ceil(e)},n.round.round=function(e){return Math.round(e)},n.override=function(e,t,n){var r=e[t];e["_"+t]=r,e[t]=n},n.renderlet=function(e){return arguments.length?(n._renderlet=e,n):n._renderlet},n.instanceOfChart=function(e){return e instanceof Object&&e.__dcFlag__&&!0},n.errors={},n.errors.Exception=function(e){var t=e||"Unexpected internal error";this.message=t,this.toString=function(){return t},this.stack=(new Error).stack},n.errors.Exception.prototype=Object.create(Error.prototype),n.errors.Exception.prototype.constructor=n.errors.Exception,n.errors.InvalidStateException=function(){n.errors.Exception.apply(this,arguments)},n.errors.InvalidStateException.prototype=Object.create(n.errors.Exception.prototype),n.errors.InvalidStateException.prototype.constructor=n.errors.InvalidStateException,n.errors.BadArgumentException=function(){n.errors.Exception.apply(this,arguments)},n.errors.BadArgumentException.prototype=Object.create(n.errors.Exception.prototype),n.errors.BadArgumentException.prototype.constructor=n.errors.BadArgumentException,n.dateFormat=e.time.format("%m/%d/%Y"),n.printers={},n.printers.filters=function(e){for(var t="",r=0;r0&&(t+=", "),t+=n.printers.filter(e[r]);return t},n.printers.filter=function(e){var t="";return void 0!==e&&null!==e&&(e instanceof Array?e.length>=2?t="["+n.utils.printSingleValue(e[0])+" -> "+n.utils.printSingleValue(e[1])+"]":e.length>=1&&(t=n.utils.printSingleValue(e[0])):t=n.utils.printSingleValue(e)),t},n.pluck=function(e,t){return t?function(n,r){return t.call(n,n[e],r)}:function(t){return t[e]}},n.utils={},n.utils.printSingleValue=function(e){var t=""+e;return e instanceof Date?t=n.dateFormat(e):"string"==typeof e?t=e:n.utils.isFloat(e)?t=n.utils.printSingleValue.fformat(e):n.utils.isInteger(e)&&(t=Math.round(e)),t},n.utils.printSingleValue.fformat=e.format(".2f"),n.utils.add=function(t,n,r){if("string"==typeof n&&(n=n.replace("%","")),t instanceof Date)return"string"==typeof n&&(n=+n),"millis"===r?new Date(t.getTime()+n):(r=r||"day",e.time[r].offset(t,n));if("string"==typeof n){var i=+n/100;return t>0?t*(1+i):t*(1-i)}return t+n},n.utils.subtract=function(t,n,r){if("string"==typeof n&&(n=n.replace("%","")),t instanceof Date)return"string"==typeof n&&(n=+n),"millis"===r?new Date(t.getTime()-n):(r=r||"day",e.time[r].offset(t,-n));if("string"==typeof n){var i=+n/100;return t<0?t*(1+i):t*(1-i)}return t-n},n.utils.isNumber=function(e){return e===+e},n.utils.isFloat=function(e){return e===+e&&e!==(0|e)},n.utils.isInteger=function(e){return e===+e&&e===(0|e)},n.utils.isNegligible=function(e){return!n.utils.isNumber(e)||e-n.constants.NEGLIGIBLE_NUMBER},n.utils.clamp=function(e,t,n){return en?n:e};var r=0;return n.utils.uniqueId=function(){return++r},n.utils.nameToId=function(e){return e.toLowerCase().replace(/[\s]/g,"_").replace(/[\.']/g,"")},n.utils.appendOrSelect=function(e,t,n){n=n||t;var r=e.select(t);return r.empty()&&(r=e.append(n)),r},n.utils.safeNumber=function(e){return n.utils.isNumber(+e)?+e:0},n.logger={},n.logger.enableDebugLog=!1,n.logger.warn=function(e){return console&&(console.warn?console.warn(e):console.log&&console.log(e)),n.logger},n.logger.debug=function(e){return n.logger.enableDebugLog&&console&&(console.debug?console.debug(e):console.log&&console.log(e)),n.logger},n.logger.deprecate=function(e,t){function r(){return i||(n.logger.warn(t),i=!0),e.apply(this,arguments)}var i=!1;return r},n.events={current:null},n.events.trigger=function(e,t){if(!t)return void e();n.events.current=e,setTimeout(function(){e===n.events.current&&e()},t)},n.filters={},n.filters.RangedFilter=function(e,t){var n=new Array(e,t);return n.isFiltered=function(e){return e>=this[0]&&e=t[0][0]&&n=t[0][1]&&rb?t:b},w=_,C=200,A=function(e){var t=e&&e.getBoundingClientRect&&e.getBoundingClientRect().height;return t&&t>C?t:C},E=A,S=n.pluck("key"),x=n.pluck("value"),F=n.pluck("key"),k=n.pluck("key"),T=!1,D=function(e){return r.keyAccessor()(e)+": "+r.valueAccessor()(e)},M=!0,R=!1,O=750,L=0,P=n.printers.filters,B=["dimension","group"],I=n.constants.DEFAULT_CHART_GROUP,N=e.dispatch("preRender","postRender","preRedraw","postRedraw","filtered","zoomed","renderlet","pretransition"),j=[],z=function(e,t){return 0===t.length?e.filter(null):1!==t.length||t[0].isFiltered?1===t.length&&"RangedFilter"===t[0].filterType?e.filterRange(t[0]):e.filterFunction(function(e){for(var n=0;n=e)return!0}return!1}):e.filterExact(t[0]),t},H=function(e){return e.all()};r.height=function(t){return arguments.length?(E=e.functor(t||A),g=void 0,r):(n.utils.isNumber(g)||(g=E(d.node())),g)},r.width=function(t){return arguments.length?(w=e.functor(t||_),p=void 0,r):(n.utils.isNumber(p)||(p=w(d.node())),p)},r.minWidth=function(e){return arguments.length?(b=e,r):b},r.minHeight=function(e){return arguments.length?(C=e,r):C},r.dimension=function(e){return arguments.length?(l=e,r.expireCache(),r):l},r.data=function(t){return arguments.length?(H=e.functor(t),r.expireCache(),r):H.call(r,u)},r.group=function(e,t){return arguments.length?(u=e,r._groupName=t,r.expireCache(),r):u},r.ordering=function(e){return arguments.length?(k=e,m=t.quicksort.by(k),r.expireCache(),r):k},r._computeOrderedGroups=function(e){var n=e.slice(0);return n.length<=1?n:(m||(m=t.quicksort.by(k)),m(n,0,n.length))},r.filterAll=function(){return r.filter(null)},r.select=function(e){return d.select(e)},r.selectAll=function(e){return d?d.selectAll(e):null},r.anchor=function(t,i){if(!arguments.length)return c;if(n.instanceOfChart(t))c=t.anchor(),d=t.root(),f=!0;else{if(!t)throw new n.errors.BadArgumentException("parent must be defined");c=t.select&&t.classed?t.node():t,d=e.select(c),d.classed(n.constants.CHART_CLASS,!0),n.registerChart(r,i),f=!1}return I=i,r},r.anchorName=function(){var e=r.anchor();return e&&e.id?e.id:e&&e.replace?e.replace("#",""):"dc-chart"+r.chartID()},r.root=function(e){return arguments.length?(d=e,r):d},r.svg=function(e){return arguments.length?(h=e,r):h},r.resetSvg=function(){return r.select("svg").remove(),o()},r.filterPrinter=function(e){return arguments.length?(P=e,r):P},r.controlsUseVisibility=function(e){return arguments.length?(R=e,r):R},r.turnOnControls=function(){if(d){var e=r.controlsUseVisibility()?"visibility":"display";r.selectAll(".reset").style(e,null),r.selectAll(".filter").text(P(r.filters())).style(e,null)}return r},r.turnOffControls=function(){if(d){var e=r.controlsUseVisibility()?"visibility":"display",t=r.controlsUseVisibility()?"hidden":"none";r.selectAll(".reset").style(e,t),r.selectAll(".filter").style(e,t).text(r.filter())}return r},r.transitionDuration=function(e){return arguments.length?(O=e,r):O},r.transitionDelay=function(e){return arguments.length?(L=e,r):L},r._mandatoryAttributes=function(e){return arguments.length?(B=e,r):B},r.render=function(){g=p=void 0,N.preRender(r),B&&B.forEach(a);var e=r._doRender();return v&&v.render(),r._activateRenderlets("postRender"),e},r._activateRenderlets=function(e){N.pretransition(r),r.transitionDuration()>0&&h?h.transition().duration(r.transitionDuration()).delay(r.transitionDelay()).each("end",function(){N.renderlet(r),e&&N[e](r)}):(N.renderlet(r),e&&N[e](r))},r.redraw=function(){i(),N.preRedraw(r);var e=r._doRedraw();return v&&v.render(),r._activateRenderlets("postRedraw"),e},r.commitHandler=function(e){return arguments.length?(y=e,r):y},r.redrawGroup=function(){return y?y(!1,function(e,t){e?console.log(e):n.redrawAll(r.chartGroup())}):n.redrawAll(r.chartGroup()),r},r.renderGroup=function(){return y?y(!1,function(e,t){e?console.log(e):n.renderAll(r.chartGroup())}):n.renderAll(r.chartGroup()),r},r._invokeFilteredListener=function(e){void 0!==e&&N.filtered(r,e)},r._invokeZoomedListener=function(){N.zoomed(r)};var U=function(e,t){return null===t||void 0===t?e.length>0:e.some(function(e){return t<=e&&t>=e})};r.hasFilterHandler=function(e){return arguments.length?(U=e,r):U},r.hasFilter=function(e){return U(j,e)};var V=function(e,t){for(var n=0;n=t){e.splice(n,1);break}return e};r.removeFilterHandler=function(e){return arguments.length?(V=e,r):V};var G=function(e,t){return e.push(t),e};r.addFilterHandler=function(e){return arguments.length?(G=e,r):G};var W=function(e){return[]};return r.resetFilterHandler=function(e){return arguments.length?(W=e,r):W},r.replaceFilter=function(e){return j=W(j),r.filter(e),r},r.filter=function(e){return arguments.length?(e instanceof Array&&e[0]instanceof Array&&!e.isFiltered?e[0].forEach(function(e){r.hasFilter(e)?V(j,e):G(j,e)}):null===e?j=W(j):r.hasFilter(e)?V(j,e):G(j,e),s(),r._invokeFilteredListener(e),null!==d&&r.hasFilter()?r.turnOnControls():r.turnOffControls(),r):j.length>0?j[0]:null},r.filters=function(){return j},r.highlightSelected=function(t){e.select(t).classed(n.constants.SELECTED_CLASS,!0),e.select(t).classed(n.constants.DESELECTED_CLASS,!1)},r.fadeDeselected=function(t){e.select(t).classed(n.constants.SELECTED_CLASS,!1),e.select(t).classed(n.constants.DESELECTED_CLASS,!0)},r.resetHighlight=function(t){e.select(t).classed(n.constants.SELECTED_CLASS,!1),e.select(t).classed(n.constants.DESELECTED_CLASS,!1)},r.onClick=function(e){var t=r.keyAccessor()(e);n.events.trigger(function(){r.filter(t),r.redrawGroup()})},r.filterHandler=function(e){return arguments.length?(z=e,r):z},r._doRender=function(){return r},r._doRedraw=function(){return r},r.legendables=function(){return[]},r.legendHighlight=function(){},r.legendReset=function(){},r.legendToggle=function(){},r.isLegendableHidden=function(){return!1},r.keyAccessor=function(e){return arguments.length?(S=e,r):S},r.valueAccessor=function(e){return arguments.length?(x=e,r):x},r.label=function(e,t){return arguments.length?(F=e,(void 0===t||t)&&(T=!0),r):F},r.renderLabel=function(e){return arguments.length?(T=e,r):T},r.title=function(e){return arguments.length?(D=e,r):D},r.renderTitle=function(e){return arguments.length?(M=e,r):M},r.renderlet=n.logger.deprecate(function(e){return r.on("renderlet."+n.utils.uniqueId(),e),r},'chart.renderlet has been deprecated. Please use chart.on("renderlet.", renderletFunction)'),r.chartGroup=function(e){return arguments.length?(f||n.deregisterChart(r,I),I=e,f||n.registerChart(r,I),r):I},r.expireCache=function(){return r},r.legend=function(e){return arguments.length?(v=e,v.parent(r),r):v},r.chartID=function(){return r.__dcFlag__},r.options=function(e){var t=["anchor","group","xAxisLabel","yAxisLabel","stack","title","point","getColor","overlayGeoJson"];for(var i in e)"function"==typeof r[i]?e[i]instanceof Array&&-1!==t.indexOf(i)?r[i].apply(r,e[i]):r[i].call(r,e[i]):n.logger.debug("Not a valid option setter name: "+i);return r},r.on=function(e,t){return N.on(e,t),r},r},n.marginMixin=function(e){var t={top:10,right:50,bottom:30,left:30};return e.margins=function(n){return arguments.length?(t=n,e):t},e.effectiveWidth=function(){return e.width()-e.margins().left-e.margins().right},e.effectiveHeight=function(){return e.height()-e.margins().top-e.margins().bottom},e},n.colorMixin=function(t){var r=e.scale.category20c(),i=!0,o=function(e){return t.keyAccessor()(e)};return t.colors=function(n){return arguments.length?(r=n instanceof Array?e.scale.quantize().range(n):e.functor(n),t):r},t.ordinalColors=function(n){return t.colors(e.scale.ordinal().range(n))},t.linearColors=function(n){return t.colors(e.scale.linear().range(n).interpolate(e.interpolateHcl))},t.colorAccessor=function(e){return arguments.length?(o=e,i=!1,t):o},t.defaultColorAccessor=function(){return i},t.colorDomain=function(e){return arguments.length?(r.domain(e),t):r.domain()},t.calculateColorDomain=function(){var n=[e.min(t.data(),t.colorAccessor()),e.max(t.data(),t.colorAccessor())];return r.domain(n),t},t.getColor=function(e,t){return r(o.call(this,e,t))},t.colorCalculator=n.logger.deprecate(function(e){return arguments.length?(t.getColor=e,t):t.getColor},"colorMixin.colorCalculator has been deprecated. Please colorMixin.colors and colorMixin.colorAccessor instead"),t},n.coordinateGridMixin=function(t){function r(e,t){return!e||!t||e.length!==t.length||e.some(function(e,n){return e&&t[n]?e.toString()!==t[n].toString():e===t[n]})}function i(e,n){t.isOrdinal()?(t.elasticX()||0===w.domain().length)&&w.domain(t._ordinalXDomain()):t.elasticX()&&w.domain([t.xAxisMin(),t.xAxisMax()]);var i=w.domain();(n||r(E,i))&&t.rescale(),E=i,t.isOrdinal()?w.rangeBands([0,t.xAxisLength()],ne,t._useOuterPadding()?te:0):w.range([0,t.xAxisLength()]),M=M.scale(t.x()),o(e)}function o(e){var r=e.select("g."+v);if(G){r.empty()&&(r=e.insert("g",":first-child").attr("class",m+" "+v).attr("transform","translate("+t.margins().left+","+t.margins().top+")"));var i=M.tickValues()?M.tickValues():"function"==typeof w.ticks?w.ticks(M.ticks()[0]):w.domain(),o=r.selectAll("line").data(i),a=o.enter().append("line").attr("x1",function(e){return w(e)}).attr("y1",t._xAxisY()-t.margins().top).attr("x2",function(e){return w(e)}).attr("y2",0).attr("opacity",0);n.transition(a,t.transitionDuration(),t.transitionDelay()).attr("opacity",1),n.transition(o,t.transitionDuration(),t.transitionDelay()).attr("x1",function(e){return w(e)}).attr("y1",t._xAxisY()-t.margins().top).attr("x2",function(e){return w(e)}).attr("y2",0),o.exit().remove()}else r.selectAll("line").remove()}function a(){return t._xAxisY()-t.margins().top}function s(){return t.anchorName().replace(/[ .#=\[\]"]/g,"-")+"-clip"}function l(){var e=n.utils.appendOrSelect(y,"defs"),r=s(),i=n.utils.appendOrSelect(e,"#"+r,"clipPath").attr("id",r),o=2*ee;n.utils.appendOrSelect(i,"rect").attr("width",t.xAxisLength()+o).attr("height",t.yAxisHeight()+o).attr("transform","translate(-"+ee+", -"+ee+")")}function u(e){t.isOrdinal()&&(U=!1),i(t.g(),e),t._prepareYAxis(t.g()),t.plotData(),(t.elasticX()||q||e)&&t.renderXAxis(t.g()),(t.elasticY()||q||e)&&t.renderYAxis(t.g()),e?t.renderBrush(t.g(),!1):t.redrawBrush(t.g(),q),t.fadeDeselectedArea(),q=!1}function c(){J?t._enableMouseZoom():Z&&t._disableMouseZoom()}function d(){if(W=!0,Y){var e=C;T&&(e=h(e,T.x().domain()));var r=f(t.x().domain(),e);r&&t.x().domain(r)}var i=t.x().domain(),o=n.filters.RangedFilter(i[0],i[1]);t.replaceFilter(o),t.rescale(),t.redraw(),T&&!p(t.filter(),T.filter())&&n.events.trigger(function(){T.replaceFilter(o),T.redraw()}),t._invokeZoomedListener(),n.events.trigger(function(){t.redrawGroup()},n.constants.EVENT_DELAY),W=!p(i,C)}function h(e,t){return(e[0]>t[1]||e[1]t[1]?[Math.max(t[0],n.utils.subtract(t[1],r,"millis")),t[1]]:null}function p(e,t){return!e&&!t||!(!e||!t)&&(0===e.length&&0===t.length||e[0].valueOf()===t[0].valueOf()&&e[1].valueOf()===t[1].valueOf())}function g(e){return e instanceof Array&&e.length>1}var m="grid-line",v="vertical";t=n.colorMixin(n.marginMixin(n.baseMixin(t))),t.colors(e.scale.category10()),t._mandatoryAttributes().push("x");var y,b,_,w,C,A,E,S,x,F,k,T,D,M=e.svg.axis().orient("bottom"),R=n.units.integers,O=0,L="day",P=!1,B=0,I=e.svg.axis().orient("left"),N=0,j=!1,z=0,H=e.svg.brush(),U=!0,V=!1,G=!1,W=!1,q=!1,K=[1,1/0],Y=!0,X=e.behavior.zoom().on("zoom",d),Q=e.behavior.zoom().on("zoom",null),Z=!1,J=!1,ee=0,te=.5,ne=0,re=!1;return t.rescale=function(){return k=void 0,q=!0,t},t.resizing=function(){return q},t.rangeChart=function(e){return arguments.length?(T=e,T.focusChart(t),t):T},t.zoomScale=function(e){return arguments.length?(K=e,t):K},t.zoomOutRestrict=function(e){return arguments.length?(K[0]=e?1:0,Y=e,t):Y},t._generateG=function(e){y=void 0===e?t.svg():e;var n=window.location.href.split("#")[0];return b=y.append("g"),_=b.append("g").attr("class","chart-body").attr("transform","translate("+t.margins().left+", "+t.margins().top+")").attr("clip-path","url("+n+"#"+s()+")"),b},t.g=function(e){return arguments.length?(b=e,t):b},t.mouseZoomable=function(e){return arguments.length?(J=e,t):J},t.chartBodyG=function(e){return arguments.length?(_=e,t):_},t.x=function(e){return arguments.length?(w=e,C=w.domain(),t.rescale(),t):w},t.xOriginalDomain=function(){return C},t.xUnits=function(e){return arguments.length?(R=e,t):R},t.xAxis=function(e){return arguments.length?(M=e,t):M},t.elasticX=function(e){return arguments.length?(P=e,t):P},t.xAxisPadding=function(e){return arguments.length?(O=e,t):O},t.xAxisPaddingUnit=function(e){return arguments.length?(L=e,t):L},t.xUnitCount=function(){if(void 0===k){var e=t.xUnits()(t.x().domain()[0],t.x().domain()[1],t.x().domain());k=e instanceof Array?e.length:e}return k},t.useRightYAxis=function(e){return arguments.length?(re=e,t):re},t.isOrdinal=function(){return t.xUnits()===n.units.ordinal},t._useOuterPadding=function(){return!0},t._ordinalXDomain=function(){return t._computeOrderedGroups(t.data()).map(t.keyAccessor())},t.renderXAxis=function(e){var r=e.select("g.x");r.empty()&&(r=e.append("g").attr("class","axis x").attr("transform","translate("+t.margins().left+","+t._xAxisY()+")"));var i=e.select("text.x-axis-label");i.empty()&&t.xAxisLabel()&&(i=e.append("text").attr("class","x-axis-label").attr("transform","translate("+(t.margins().left+t.xAxisLength()/2)+","+(t.height()-B)+")").attr("text-anchor","middle")),t.xAxisLabel()&&i.text()!==t.xAxisLabel()&&i.text(t.xAxisLabel()),n.transition(r,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+t.margins().left+","+t._xAxisY()+")").call(M),n.transition(i,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+(t.margins().left+t.xAxisLength()/2)+","+(t.height()-B)+")")},t._xAxisY=function(){return t.height()-t.margins().bottom},t.xAxisLength=function(){return t.effectiveWidth()},t.xAxisLabel=function(e,n){return arguments.length?(A=e,t.margins().bottom-=B,B=void 0===n?12:n,t.margins().bottom+=B,t):A},t._prepareYAxis=function(n){if(void 0===S||t.elasticY()){void 0===S&&(S=e.scale.linear());var r=t.yAxisMin()||0,i=t.yAxisMax()||0;S.domain([r,i]).rangeRound([t.yAxisHeight(),0])}S.range([t.yAxisHeight(),0]),I=I.scale(S),re&&I.orient("right"),t._renderHorizontalGridLinesForAxis(n,S,I)},t.renderYAxisLabel=function(e,r,i,o){o=o||z;var a=t.g().select("text.y-axis-label."+e+"-label"),s=t.margins().top+t.yAxisHeight()/2;a.empty()&&r&&(a=t.g().append("text").attr("transform","translate("+o+","+s+"),rotate("+i+")").attr("class","y-axis-label "+e+"-label").attr("text-anchor","middle").text(r)),r&&a.text()!==r&&a.text(r),n.transition(a,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+o+","+s+"),rotate("+i+")")},t.renderYAxisAt=function(e,r,i){var o=t.g().select("g."+e);o.empty()&&(o=t.g().append("g").attr("class","axis "+e).attr("transform","translate("+i+","+t.margins().top+")")),n.transition(o,t.transitionDuration(),t.transitionDelay()).attr("transform","translate("+i+","+t.margins().top+")").call(r)},t.renderYAxis=function(){var e=re?t.width()-t.margins().right:t._yAxisX();t.renderYAxisAt("y",I,e);var n=re?t.width()-z:z,r=re?90:-90;t.renderYAxisLabel("y",t.yAxisLabel(),r,n)},t._renderHorizontalGridLinesForAxis=function(e,r,i){var o=e.select("g.horizontal");if(V){var a=i.tickValues()?i.tickValues():r.ticks(i.ticks()[0]);o.empty()&&(o=e.insert("g",":first-child").attr("class",m+" horizontal").attr("transform","translate("+t.margins().left+","+t.margins().top+")"));var s=o.selectAll("line").data(a),l=s.enter().append("line").attr("x1",1).attr("y1",function(e){return r(e)}).attr("x2",t.xAxisLength()).attr("y2",function(e){return r(e)}).attr("opacity",0);n.transition(l,t.transitionDuration(),t.transitionDelay()).attr("opacity",1),n.transition(s,t.transitionDuration(),t.transitionDelay()).attr("x1",1).attr("y1",function(e){return r(e)}).attr("x2",t.xAxisLength()).attr("y2",function(e){return r(e)}),s.exit().remove()}else o.selectAll("line").remove()},t._yAxisX=function(){return t.useRightYAxis()?t.width()-t.margins().right:t.margins().left},t.yAxisLabel=function(e,n){return arguments.length?(x=e,t.margins().left-=z,z=void 0===n?12:n,t.margins().left+=z,t):x},t.y=function(e){return arguments.length?(S=e,t.rescale(),t):S},t.yAxis=function(e){return arguments.length?(I=e,t):I},t.elasticY=function(e){return arguments.length?(j=e,t):j},t.renderHorizontalGridLines=function(e){return arguments.length?(V=e,t):V},t.renderVerticalGridLines=function(e){return arguments.length?(G=e,t):G},t.xAxisMin=function(){var r=e.min(t.data(),function(e){return t.keyAccessor()(e)});return n.utils.subtract(r,O,L)},t.xAxisMax=function(){var r=e.max(t.data(),function(e){return t.keyAccessor()(e)});return n.utils.add(r,O,L)},t.yAxisMin=function(){var r=e.min(t.data(),function(e){return t.valueAccessor()(e)});return n.utils.subtract(r,N)},t.yAxisMax=function(){var r=e.max(t.data(),function(e){return t.valueAccessor()(e)});return n.utils.add(r,N)},t.yAxisPadding=function(e){return arguments.length?(N=e,t):N},t.yAxisHeight=function(){return t.effectiveHeight()},t.round=function(e){return arguments.length?(F=e,t):F},t._rangeBandPadding=function(e){return arguments.length?(ne=e,t):ne},t._outerRangeBandPadding=function(e){return arguments.length?(te=e,t):te},n.override(t,"filter",function(e){return arguments.length?(t._filter(e),e?t.brush().extent(e):t.brush().clear(),t):t._filter()}),t.brush=function(e){return arguments.length?(H=e,t):H},t.renderBrush=function(e){if(U){H.on("brush",t._brushing),H.on("brushstart",t._disableMouseZoom),H.on("brushend",c);var n=e.append("g").attr("class","brush").attr("transform","translate("+t.margins().left+","+t.margins().top+")").call(H.x(t.x()));t.setBrushY(n,!1),t.setHandlePaths(n),t.hasFilter()&&t.redrawBrush(e,!1)}},t.setHandlePaths=function(e){e.selectAll(".resize").append("path").attr("d",t.resizeHandlePath)},t.setBrushY=function(e){e.selectAll("rect").attr("height",a()),e.selectAll(".resize path").attr("d",t.resizeHandlePath)},t.extendBrush=function(){var e=H.extent();return t.round()&&(e[0]=e.map(t.round())[0],e[1]=e.map(t.round())[1],b.select(".brush").call(H.extent(e))),e},t.brushIsEmpty=function(e){return H.empty()||!e||e[1]<=e[0]},t._brushing=function(){var e=t.extendBrush();if(t.redrawBrush(b,!1),t.brushIsEmpty(e))n.events.trigger(function(){t.filter(null),t.redrawGroup()},n.constants.EVENT_DELAY);else{var r=n.filters.RangedFilter(e[0],e[1]);n.events.trigger(function(){t.replaceFilter(r),t.redrawGroup()},n.constants.EVENT_DELAY)}},t.redrawBrush=function(e,r){if(U){t.filter()&&t.brush().empty()&&t.brush().extent(t.filter());var i=n.optionalTransition(r,t.transitionDuration(),t.transitionDelay())(e.select("g.brush"));t.setBrushY(i),i.call(t.brush().x(t.x()).extent(t.brush().extent()))}t.fadeDeselectedArea()},t.fadeDeselectedArea=function(){},t.resizeHandlePath=function(e){var t=+("e"===e),n=t?1:-1,r=a()/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"ZM"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)},t.clipPadding=function(e){return arguments.length?(ee=e,t):ee},t._preprocessData=function(){},t._doRender=function(){return t.resetSvg(),t._preprocessData(),t._generateG(),l(),u(!0),c(),t},t._doRedraw=function(){return t._preprocessData(),u(!1),l(),t},t._enableMouseZoom=function(){Z=!0,X.x(t.x()).scaleExtent(K).size([t.width(),t.height()]).duration(t.transitionDuration()),t.root().call(X)},t._disableMouseZoom=function(){t.root().call(Q)},t.focus=function(e){g(e)?t.x().domain(e):t.x().domain(C),X.x(t.x()),d()},t.refocused=function(){return W},t.focusChart=function(e){return arguments.length?(D=e,t.on("filtered",function(e){e.filter()?p(e.filter(),D.filter())||n.events.trigger(function(){D.focus(e.filter())}):n.events.trigger(function(){D.x().domain(D.xOriginalDomain())})}),t):D},t.brushOn=function(e){return arguments.length?(U=e,t):U},t},n.stackMixin=function(t){function r(e,n){var r=e.accessor||t.valueAccessor();return e.name=String(e.name||n),e.values=e.group.all().map(function(n,i){return{x:t.keyAccessor()(n,i),y:e.hidden?null:r(n,i),data:n,layer:e.name,hidden:e.hidden}}),e.values=e.values.filter(i()),e.values}function i(){if(!t.x()||h)return e.functor(!0);var n=t.x().domain();return t.isOrdinal()?function(){return!0}:t.elasticX()?function(){return!0}:function(e){return e.x>=n[0]&&e.x<=n[n.length-1]}}function o(e){var t=u.map(n.pluck("name")).indexOf(e);return u[t]}function a(){var e=t.data().map(function(e){return e.values});return Array.prototype.concat.apply([],e)}function s(e){return!e.hidden}var l=e.layout.stack().values(r),u=[],c={},d=!1,h=!1;return t.stack=function(e,n,r){if(!arguments.length)return u;arguments.length<=2&&(r=n);var i={group:e};return"string"==typeof n&&(i.name=n),"function"==typeof r&&(i.accessor=r),u.push(i),t},n.override(t,"group",function(e,n,r){return arguments.length?(u=[],c={},t.stack(e,n),r&&t.valueAccessor(r),t._group(e,n)):t._group()}),t.hidableStacks=function(e){return arguments.length?(d=e,t):d},t.hideStack=function(e){var n=o(e);return n&&(n.hidden=!0),t},t.showStack=function(e){var n=o(e);return n&&(n.hidden=!1),t},t.getValueAccessorByIndex=function(e){return u[e].accessor||t.valueAccessor()},t.yAxisMin=function(){var r=e.min(a(),function(e){return e.y<0?e.y+e.y0:e.y0});return n.utils.subtract(r,t.yAxisPadding())},t.yAxisMax=function(){var r=e.max(a(),function(e){return e.y>0?e.y+e.y0:e.y0});return n.utils.add(r,t.yAxisPadding())},t.xAxisMin=function(){var r=e.min(a(),n.pluck("x"));return n.utils.subtract(r,t.xAxisPadding(),t.xAxisPaddingUnit())},t.xAxisMax=function(){var r=e.max(a(),n.pluck("x"));return n.utils.add(r,t.xAxisPadding(),t.xAxisPaddingUnit())},n.override(t,"title",function(e,n){return e?"function"==typeof e?t._title(e):e===t._groupName&&"function"==typeof n?t._title(n):"function"!=typeof n?c[e]||t._title():(c[e]=n,t):t._title()}),t.stackLayout=function(n){return arguments.length?(l=n,l.values()===e.layout.stack().values()&&l.values(r),t):l},t.evadeDomainFilter=function(e){return arguments.length?(h=e,t):h},t.data(function(){var e=u.filter(s);return e.length?t.stackLayout()(e):[]}),t._ordinalXDomain=function(){var e=a().map(n.pluck("data"));return t._computeOrderedGroups(e).map(t.keyAccessor())},t.colorAccessor(function(e){return this.layer||this.name||e.name||e.layer}),t.legendables=function(){return u.map(function(e,n){return{chart:t,name:e.name,hidden:e.hidden||!1,color:t.getColor.call(e,e.values,n)}})},t.isLegendableHidden=function(e){var t=o(e.name);return!!t&&t.hidden},t.legendToggle=function(e){d&&(t.isLegendableHidden(e)?t.showStack(e.name):t.hideStack(e.name),t.renderGroup())},t},n.capMixin=function(t){var r=1/0,i="Others",o=function(n){var r=e.sum(n,t.valueAccessor()),i=t.group().all(),o=e.sum(i,t.valueAccessor()),a=n.map(t.keyAccessor()),s=i.map(t.keyAccessor()),l=e.set(a),u=s.filter(function(e){return!l.has(e)});return o>r?n.concat([{others:u,key:t.othersLabel(),value:o-r}]):n};return t.cappedKeyAccessor=function(e,n){return e.others?e.key:t.keyAccessor()(e,n)},t.cappedValueAccessor=function(e,n){return e.others?e.value:t.valueAccessor()(e,n)},t.data(function(e){if(r===1/0)return t._computeOrderedGroups(e.all());var n=e.top(r);return n=t._computeOrderedGroups(n),o?o(n):n}),t.cap=function(e){return arguments.length?(r=e,t):r},t.othersLabel=function(e){return arguments.length?(i=e,t):i},t.othersGrouper=function(e){return arguments.length?(o=e,t):o},n.override(t,"onClick",function(e){e.others&&t.filter([e.others]),t._onClick(e)}),t},n.bubbleMixin=function(t){var r=.3,i=10;t.BUBBLE_NODE_CLASS="node",t.BUBBLE_CLASS="bubble",t.MIN_RADIUS=10,t=n.colorMixin(t),t.renderLabel(!0),t.data(function(e){return e.top(1/0)});var o=e.scale.linear().domain([0,100]),a=function(e){return e.r};t.r=function(e){return arguments.length?(o=e,t):o},t.radiusValueAccessor=function(e){return arguments.length?(a=e,t):a},t.rMin=function(){return e.min(t.data(),function(e){return t.radiusValueAccessor()(e)})},t.rMax=function(){return e.max(t.data(),function(e){return t.radiusValueAccessor()(e)})},t.bubbleR=function(e){var n=t.radiusValueAccessor()(e),r=t.r()(n);return(isNaN(r)||n<=0)&&(r=0),r};var s=function(e){return t.label()(e)},l=function(e){return t.bubbleR(e)>i},u=function(e){return l(e)?1:0},c=function(e){return l(e)?"all":"none"};t._doRenderLabel=function(e){if(t.renderLabel()){var r=e.select("text");r.empty()&&(r=e.append("text").attr("text-anchor","middle").attr("dy",".3em").on("click",t.onClick)),r.attr("opacity",0).attr("pointer-events",c).text(s),n.transition(r,t.transitionDuration(),t.transitionDelay()).attr("opacity",u)}},t.doUpdateLabels=function(e){if(t.renderLabel()){var r=e.select("text").attr("pointer-events",c).text(s);n.transition(r,t.transitionDuration(),t.transitionDelay()).attr("opacity",u)}};var d=function(e){return t.title()(e)};return t._doRenderTitles=function(e){if(t.renderTitle()){e.select("title").empty()&&e.append("title").text(d)}},t.doUpdateTitles=function(e){t.renderTitle()&&e.select("title").text(d)},t.minRadius=function(e){return arguments.length?(t.MIN_RADIUS=e,t):t.MIN_RADIUS},t.minRadiusWithLabel=function(e){return arguments.length?(i=e,t):i},t.maxBubbleRelativeSize=function(e){return arguments.length?(r=e,t):r},t.fadeDeselectedArea=function(){t.hasFilter()?t.selectAll("g."+t.BUBBLE_NODE_CLASS).each(function(e){t.isSelectedNode(e)?t.highlightSelected(this):t.fadeDeselected(this)}):t.selectAll("g."+t.BUBBLE_NODE_CLASS).each(function(){t.resetHighlight(this)})},t.isSelectedNode=function(e){return t.hasFilter(e.key)},t.onClick=function(e){var r=e.key;n.events.trigger(function(){t.filter(r),t.redrawGroup()})},t},n.pieChart=function(t,r){function i(){var t=e.min([K.width(),K.height()])/2;M=R&&R=0&&(r="M0,0"),r}function T(t,n){var r;return r=B?e.svg.arc().outerRadius(M-G+B).innerRadius(M-G+B).centroid(t):n.centroid(t),isNaN(r[0])||isNaN(r[1])?"translate(0,0)":"translate("+r+")"}function D(t,n){K.selectAll("g.pie-slice").each(function(r){t.name===r.data.key&&e.select(this).classed("highlight",n)})}var M,R,O,L,P,B,I="pie-slice",N="pie-label",j="pie-slice-group",z="pie-label-group",H="empty-chart",U="empty",V=0,G=0,W=.5,q=!1,K=n.capMixin(n.colorMixin(n.baseMixin({})));return K.colorAccessor(K.cappedKeyAccessor),K.title(function(e){return K.cappedKeyAccessor(e)+": "+K.cappedValueAccessor(e)}),K.slicesCap=K.cap,K.label(K.cappedKeyAccessor),K.renderLabel(!0),K.transitionDuration(350),K.transitionDelay(0),K._doRender=function(){return K.resetSvg(),O=K.svg().append("g").attr("transform","translate("+K.cx()+","+K.cy()+")"),O.append("g").attr("class",j),O.append("g").attr("class",z),i(),K},K._applyLabelText=function(e){e.text(function(e){return!A(e.data)&&!C(e)||_(e)?K.label()(e.data):""})},K.externalRadiusPadding=function(e){return arguments.length?(G=e,K):G},K.innerRadius=function(e){return arguments.length?(V=e,K):V},K.radius=function(e){return arguments.length?(R=e,K):R},K.cx=function(e){return arguments.length?(L=e,K):L||K.width()/2},K.cy=function(e){return arguments.length?(P=e,K):P||K.height()/2},K._doRedraw=function(){return i(),K},K.minAngleForLabel=function(e){return arguments.length?(W=e,K):W},K.emptyTitle=function(e){return 0===arguments.length?U:(U=e,K)},K.externalLabels=function(e){return 0===arguments.length?B:(B=e||void 0,K)},K.drawPaths=function(e){return 0===arguments.length?q:(q=e,K)},K.legendables=function(){return K.data().map(function(e,t){var n={name:e.key,data:e.value,others:e.others,chart:K};return n.color=K.getColor(e,t),n})},K.legendHighlight=function(e){D(e,!0)},K.legendReset=function(e){D(e,!1)},K.legendToggle=function(e){K.onClick({key:e.name,others:e.others})},K.anchor(t,r)},n.barChart=function(t,r){function i(e){return n.utils.safeNumber(Math.abs(h.y()(e.y+e.y0)-h.y()(e.y0)))}function o(e,t,r){var o=e.selectAll("text.barLabel").data(r.values,n.pluck("x"));o.enter().append("text").attr("class","barLabel").attr("text-anchor","middle"),h.isOrdinal()&&(o.on("click",h.onClick),o.attr("cursor","pointer")),n.transition(o,h.transitionDuration(),h.transitionDelay()).attr("x",function(e){var t=h.x()(e.x);return p||(t+=u/2),n.utils.safeNumber(t)}).attr("y",function(e){var t=h.y()(e.y+e.y0);return e.y<0&&(t-=i(e)),n.utils.safeNumber(t-d)}).text(function(e){return h.label()(e)}),n.transition(o.exit(),h.transitionDuration(),h.transitionDelay()).attr("height",0).remove()}function a(e,t,r){var o=e.selectAll("rect.bar").data(r.values,n.pluck("x")),a=o.enter().append("rect").attr("class","bar").attr("fill",n.pluck("data",h.getColor)).attr("y",h.yAxisHeight()).attr("height",0);h.renderTitle()&&a.append("title").text(n.pluck("data",h.title(r.name))),h.isOrdinal()&&o.on("click",h.onClick),n.transition(o,h.transitionDuration(),h.transitionDelay()).attr("x",function(e){var t=h.x()(e.x);return p&&(t-=u/2),h.isOrdinal()&&void 0!==f&&(t+=f/2),n.utils.safeNumber(t)}).attr("y",function(e){var t=h.y()(e.y+e.y0);return e.y<0&&(t-=i(e)),n.utils.safeNumber(t)}).attr("width",u).attr("height",function(e){return i(e)}).attr("fill",n.pluck("data",h.getColor)).select("title").text(n.pluck("data",h.title(r.name))),n.transition(o.exit(),h.transitionDuration(),h.transitionDelay()).attr("x",function(e){return h.x()(e.x)}).attr("width",.9*u).remove()}function s(){if(void 0===u){var e=h.xUnitCount();u=h.isOrdinal()&&void 0===f?Math.floor(h.x().rangeBand()):f?Math.floor((h.xAxisLength()-(e-1)*f)/e):Math.floor(h.xAxisLength()/(1+h.barPadding())/e),(u===1/0||isNaN(u)||u=i})}},h.centerBar=function(e){return arguments.length?(p=e,h):p},n.override(h,"onClick",function(e){h._onClick(e.data)}),h.barPadding=function(e){return arguments.length?(h._rangeBandPadding(e),f=void 0,h):h._rangeBandPadding()},h._useOuterPadding=function(){return void 0===f},h.outerPadding=h._outerRangeBandPadding,h.gap=function(e){return arguments.length?(f=e,h):f},h.extendBrush=function(){var e=h.brush().extent();return!h.round()||p&&!g||(e[0]=e.map(h.round())[0],e[1]=e.map(h.round())[1],h.chartBodyG().select(".brush").call(h.brush().extent(e))),e},h.alwaysUseRounding=function(e){return arguments.length?(g=e,h):g},h.legendHighlight=function(e){h.isLegendableHidden(e)||h.g().selectAll("rect.bar").classed("highlight",l(e.color)).classed("fadeout",l(e.color,!0))},h.legendReset=function(){h.g().selectAll("rect.bar").classed("highlight",!1).classed("fadeout",!1)},n.override(h,"xAxisMax",function(){var e=this._xAxisMax();if("resolution"in h.xUnits()){e+=h.xUnits().resolution}return e}),h.anchor(t,r)},n.lineChart=function(t,r){function i(e,t){return S.getColor.call(e,e.values,t)}function o(t,r){var o=e.svg.line().x(function(e){return S.x()(e.x)}).y(function(e){return S.y()(e.y+e.y0)}).interpolate(M).tension(R);y&&o.defined(y);var a=t.append("path").attr("class","line").attr("stroke",i);b&&a.attr("stroke-dasharray",b),n.transition(r.select("path.line"),S.transitionDuration(),S.transitionDelay()).attr("stroke",i).attr("d",function(e){return s(o(e.values))})}function a(t,r){if(x){var o=e.svg.area().x(function(e){return S.x()(e.x)}).y(function(e){return S.y()(e.y+e.y0)}).y0(function(e){return S.y()(e.y0)}).interpolate(M).tension(R);y&&o.defined(y),t.append("path").attr("class","area").attr("fill",i).attr("d",function(e){return s(o(e.values))}),n.transition(r.select("path.area"),S.transitionDuration(),S.transitionDelay()).attr("fill",i).attr("d",function(e){return s(o(e.values))})}}function s(e){return!e||e.indexOf("NaN")>=0?"M0,0":e}function l(t,r){if("always"===S.xyTipsOn()||!S.brushOn()&&S.xyTipsOn()){var i=_+"-list",o=t.select("g."+i);o.empty()&&(o=t.append("g").attr("class",i)),r.each(function(t,r){var i=t.values;y&&(i=i.filter(y));var a=o.select("g."+_+"._"+r);a.empty()&&(a=o.append("g").attr("class",_+" _"+r)),c(a);var s=a.selectAll("circle."+w).data(i,n.pluck("x"));s.enter().append("circle").attr("class",w).attr("r",f()).style("fill-opacity",T).style("stroke-opacity",D).attr("fill",S.getColor).on("mousemove",function(){var t=e.select(this);d(t),h(t,a)}).on("mouseout",function(){p(e.select(this)),g(a)}),s.call(m,t),n.transition(s,S.transitionDuration()).attr("cx",function(e){return n.utils.safeNumber(S.x()(e.x))}).attr("cy",function(e){return n.utils.safeNumber(S.y()(e.y+e.y0))}).attr("fill",S.getColor),s.exit().remove()})}}function u(t){t.each(function(t,r){var i=e.select(this),o=i.selectAll("text.lineLabel").data(t.values,n.pluck("x"));o.enter().append("text").attr("class","lineLabel").attr("text-anchor","middle"),n.transition(o,S.transitionDuration()).attr("x",function(e){return n.utils.safeNumber(S.x()(e.x))}).attr("y",function(e){var t=S.y()(e.y+e.y0)-E;return n.utils.safeNumber(t)}).text(function(e){return S.label()(e)}),n.transition(o.exit(),S.transitionDuration()).attr("height",0).remove()})}function c(e){(e.select("path."+C).empty()?e.append("path").attr("class",C):e.select("path."+C)).style("display","none").attr("stroke-dasharray","5,5"),(e.select("path."+A).empty()?e.append("path").attr("class",A):e.select("path."+A)).style("display","none").attr("stroke-dasharray","5,5")}function d(e){return e.style("fill-opacity",.8),e.style("stroke-opacity",.8),e.attr("r",F),e}function h(e,t){var n=e.attr("cx"),r=e.attr("cy"),i=S._yAxisX()-S.margins().left,o="M"+i+" "+r+"L"+n+" "+r,a="M"+n+" "+S.yAxisHeight()+"L"+n+" "+r;t.select("path."+C).style("display","").attr("d",o),t.select("path."+A).style("display","").attr("d",a)}function f(){return k||F}function p(e){e.style("fill-opacity",T).style("stroke-opacity",D).attr("r",f())}function g(e){e.select("path."+C).style("display","none"),e.select("path."+A).style("display","none")}function m(e,t){S.renderTitle()&&(e.select("title").remove(),e.append("title").text(n.pluck("data",S.title(t.name))))}function v(t,n,r){return function(){var i=e.select(this),o=i.attr("stroke")===t&&i.attr("stroke-dasharray")===(n instanceof Array?n.join(","):null)||i.attr("fill")===t;return r?!o:o}}var y,b,_="dc-tooltip",w="dot",C="yRef",A="xRef",E=3,S=n.stackMixin(n.coordinateGridMixin({})),x=!1,F=5,k=null,T=1e-6,D=1e-6,M="linear",R=.7,O=!0;return S.transitionDuration(500),S.transitionDelay(0),S._rangeBandPadding(1),S.plotData=function(){var e=S.chartBodyG(),t=e.select("g.stack-list");t.empty()&&(t=e.append("g").attr("class","stack-list"));var n=t.selectAll("g.stack").data(S.data()),r=n.enter().append("g").attr("class",function(e,t){return"stack _"+t});o(r,n),a(r,n),l(e,n),S.renderLabel()&&u(n)},S.interpolate=function(e){return arguments.length?(M=e,S):M},S.tension=function(e){return arguments.length?(R=e,S):R},S.defined=function(e){return arguments.length?(y=e,S):y},S.dashStyle=function(e){return arguments.length?(b=e,S):b},S.renderArea=function(e){return arguments.length?(x=e,S):x},S.label(function(e){return n.utils.printSingleValue(e.y0+e.y)},!1),S.xyTipsOn=function(e){return arguments.length?(O=e,S):O},S.dotRadius=function(e){return arguments.length?(F=e,S):F},S.renderDataPoints=function(e){return arguments.length?(e?(T=e.fillOpacity||.8,D=e.strokeOpacity||.8,k=e.radius||2):(T=1e-6,D=1e-6,k=null),S):{fillOpacity:T,strokeOpacity:D,radius:k}},S.legendHighlight=function(e){S.isLegendableHidden(e)||S.g().selectAll("path.line, path.area").classed("highlight",v(e.color,e.dashstyle)).classed("fadeout",v(e.color,e.dashstyle,!0))},S.legendReset=function(){S.g().selectAll("path.line, path.area").classed("highlight",!1).classed("fadeout",!1)},n.override(S,"legendables",function(){var e=S._legendables();return b?e.map(function(e){return e.dashstyle=b,e}):e}),S.anchor(t,r)},n.dataCount=function(t,r){var i=e.format(",d"),o=n.baseMixin({}),a={some:"",all:""};return o.html=function(e){return arguments.length?(e.all&&(a.all=e.all),e.some&&(a.some=e.some),o):a},o.formatNumber=function(e){return arguments.length?(i=e,o):i},o._doRender=function(){var e=o.dimension().size(),t=o.group().value(),n=i(e),r=i(t);return e===t&&""!==a.all?o.root().html(a.all.replace("%total-count",n).replace("%filter-count",r)):""!==a.some?o.root().html(a.some.replace("%total-count",n).replace("%filter-count",r)):(o.selectAll(".total-count").text(n),o.selectAll(".filter-count").text(r)),o},o._doRedraw=function(){return o._doRender()},o.anchor(t,r)},n.dataTable=function(t,r){function i(){var e=!0;if(g.forEach(function(t){e&="function"==typeof t}),!e){var t=f.selectAll("thead").data([0]);t.enter().append("thead"),t.exit().remove();var n=t.selectAll("tr").data([0]);n.enter().append("tr"),n.exit().remove();var r=n.selectAll("th").data(g);r.enter().append("th"),r.exit().remove(),r.attr("class",h).html(function(e){return f._doColumnHeaderFormat(e)})}var i=f.root().selectAll("tbody").data(o(),function(e){return f.keyAccessor()(e)}),a=i.enter().append("tbody");return!0===b&&a.append("tr").attr("class",d).append("td").attr("class",l).attr("colspan",g.length).html(function(e){return f.keyAccessor()(e)}),i.exit().remove(),a}function o(){var t;return t=v===e.ascending?f.dimension().bottom(p):f.dimension().top(p),e.nest().key(f.group()).sortKeys(v).entries(t.sort(function(e,t){return v(m(e),m(t))}).slice(y,s))}function a(e){var t=e.order().selectAll("tr."+u).data(function(e){return e.values}),n=t.enter().append("tr").attr("class",u);return g.forEach(function(e,t){n.append("td").attr("class",c+" _"+t).html(function(t){return f._doColumnValueFormat(e,t)})}),t.exit().remove(),t}var s,l="dc-table-label",u="dc-table-row",c="dc-table-column",d="dc-table-group",h="dc-table-head",f=n.baseMixin({}),p=25,g=[],m=function(e){return e},v=e.ascending,y=0,b=!0;return f._doRender=function(){return f.selectAll("tbody").remove(),a(i()),f},f._doColumnValueFormat=function(e,t){return"function"==typeof e?e(t):"string"==typeof e?t[e]:e.format(t)},f._doColumnHeaderFormat=function(e){return"function"==typeof e?f._doColumnHeaderFnToString(e):"string"==typeof e?f._doColumnHeaderCapitalize(e):String(e.label)},f._doColumnHeaderCapitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},f._doColumnHeaderFnToString=function(e){var t=String(e),n=t.indexOf("return ");if(n>=0){var r=t.lastIndexOf(";");if(r>=0){t=t.substring(n+7,r);t.indexOf("numberFormat")>=0&&(t=t.replace("numberFormat",""))}}return t},f._doRedraw=function(){return f._doRender()},f.size=function(e){return arguments.length?(p=e,f):p},f.beginSlice=function(e){return arguments.length?(y=e,f):y},f.endSlice=function(e){return arguments.length?(s=e,f):s},f.columns=function(e){return arguments.length?(g=e,f):g},f.sortBy=function(e){return arguments.length?(m=e,f):m},f.order=function(e){return arguments.length?(v=e,f):v},f.showGroups=function(e){return arguments.length?(b=e,f):b},f.anchor(t,r)},n.dataGrid=function(t,r){function i(){var e=c.root().selectAll("div."+u).data(o(),function(e){return c.keyAccessor()(e)}),t=e.enter().append("div").attr("class",u);return m&&t.html(function(e){return m(e)}),e.exit().remove(),t}function o(){var t=c.dimension().top(d);return e.nest().key(c.group()).sortKeys(p).entries(t.sort(function(e,t){return p(f(e),f(t))}).slice(g,s))}function a(e){var t=e.order().selectAll("div."+l).data(function(e){return e.values});return t.enter().append("div").attr("class",l).html(function(e){return h(e)}),t.exit().remove(),t}var s,l="dc-grid-item",u="dc-grid-top",c=n.baseMixin({}),d=999,h=function(e){return"you need to provide an html() handling param: "+JSON.stringify(e)},f=function(e){return e},p=e.ascending,g=0,m=function(e){return""+c.keyAccessor()(e)+"
"};return c._doRender=function(){return c.selectAll("div."+u).remove(),a(i()),c},c._doRedraw=function(){return c._doRender()},c.beginSlice=function(e){return arguments.length?(g=e,c):g},c.endSlice=function(e){return arguments.length?(s=e,c):s},c.size=function(e){return arguments.length?(d=e,c):d},c.html=function(e){return arguments.length?(h=e,c):h},c.htmlGroup=function(e){return arguments.length?(m=e,c):m},c.sortBy=function(e){return arguments.length?(f=e,c):f},c.order=function(e){return arguments.length?(p=e,c):p},c.anchor(t,r)},n.bubbleChart=function(t,r){function i(e){var t=e.enter().append("g");t.attr("class",u.BUBBLE_NODE_CLASS).attr("transform",h).append("circle").attr("class",function(e,t){return u.BUBBLE_CLASS+" _"+t}).on("click",u.onClick).attr("fill",u.getColor).attr("r",0),n.transition(e,u.transitionDuration(),u.transitionDelay()).select("circle."+u.BUBBLE_CLASS).attr("r",function(e){return u.bubbleR(e)}).attr("opacity",function(e){return u.bubbleR(e)>0?1:0}),u._doRenderLabel(t),u._doRenderTitles(t)}function o(e){n.transition(e,u.transitionDuration(),u.transitionDelay()).attr("transform",h).select("circle."+u.BUBBLE_CLASS).attr("fill",u.getColor).attr("r",function(e){return u.bubbleR(e)}).attr("opacity",function(e){return u.bubbleR(e)>0?1:0}),u.doUpdateLabels(e),u.doUpdateTitles(e)}function a(e){e.exit().remove()}function s(e){var t=u.x()(u.keyAccessor()(e));return isNaN(t)&&(t=0),t}function l(e){var t=u.y()(u.valueAccessor()(e));return isNaN(t)&&(t=0),t}var u=n.bubbleMixin(n.coordinateGridMixin({})),c=!1,d=!1;u.transitionDuration(750),u.transitionDelay(0);var h=function(e){return"translate("+s(e)+","+l(e)+")"};return u.elasticRadius=function(e){return arguments.length?(c=e,u):c},u.sortBubbleSize=function(e){return arguments.length?(d=e,u):d},u.plotData=function(){c&&u.r().domain([u.rMin(),u.rMax()]),u.r().range([u.MIN_RADIUS,u.xAxisLength()*u.maxBubbleRelativeSize()]);var t=u.data();if(d){var n=u.radiusValueAccessor();t.sort(function(t,r){return e.descending(n(t),n(r))})}var r=u.chartBodyG().selectAll("g."+u.BUBBLE_NODE_CLASS).data(t,function(e){return e.key});d&&r.order(),i(r),o(r),a(r),u.fadeDeselectedArea()},u.renderBrush=function(){},u.redrawBrush=function(){u.fadeDeselectedArea()},u.anchor(t,r)},n.compositeChart=function(t,r){function i(e,t){var n,r,i,a,s;return e&&(n=h(),r=g()),t&&(i=f(),a=m()),w.alignYAxes()&&e&&t&&(s=o(n,r,i,a)),s||{lyAxisMin:n,lyAxisMax:r,ryAxisMin:i,ryAxisMax:a}}function o(e,t,n,r){var i=(r-n)/(t-e);return{lyAxisMin:Math.min(e,n/i),lyAxisMax:Math.max(t,r/i),ryAxisMin:Math.min(n,e*i),ryAxisMax:Math.max(r,t*i)}}function a(t){var n=void 0===w.rightY()||w.elasticY(),r=n||w.resizing();void 0===w.rightY()&&w.rightY(e.scale.linear()),n&&w.rightY().domain([t.ryAxisMin,t.ryAxisMax]),r&&w.rightY().rangeRound([w.yAxisHeight(),0]),w.rightY().range([w.yAxisHeight(),0]),w.rightYAxis(w.rightYAxis().scale(w.rightY())),w.rightYAxis().orient("right")}function s(t){var n=void 0===w.y()||w.elasticY(),r=n||w.resizing();void 0===w.y()&&w.y(e.scale.linear()),n&&w.y().domain([t.lyAxisMin,t.lyAxisMax]),r&&w.y().rangeRound([w.yAxisHeight(),0]),w.y().range([w.yAxisHeight(),0]),w.yAxis(w.yAxis().scale(w.y())),w.yAxis().orient("left")}function l(e,t){e._generateG(w.g()),e.g().attr("class",_+" _"+t)}function u(){return C.filter(function(e){return!e.useRightYAxis()})}function c(){return C.filter(function(e){return e.useRightYAxis()})}function d(e){return e.map(function(e){return e.yAxisMin()})}function h(){return e.min(d(u()))}function f(){return e.min(d(c()))}function p(e){return e.map(function(e){return e.yAxisMax()})}function g(){return n.utils.add(e.max(p(u())),w.yAxisPadding())}function m(){return n.utils.add(e.max(p(c())),w.yAxisPadding())}function v(){return C.map(function(e){return e.xAxisMin()})}function y(){return C.map(function(e){return e.xAxisMax()})}var b,_="sub",w=n.coordinateGridMixin({}),C=[],A={},E=!1,S=!0,x=!1,F=e.svg.axis(),k=0,T=12,D=!1;return w._mandatoryAttributes([]),w.transitionDuration(500),w.transitionDelay(0),n.override(w,"_generateG",function(){for(var e=this.__generateG(),t=0;t0&&!D?w._renderHorizontalGridLinesForAxis(w.g(),w.y(),w.yAxis()):c().length>0&&w._renderHorizontalGridLinesForAxis(w.g(),b,F)},w.renderYAxis=function(){0!==u().length&&(w.renderYAxisAt("y",w.yAxis(),w.margins().left),w.renderYAxisLabel("y",w.yAxisLabel(),-90)),0!==c().length&&(w.renderYAxisAt("yr",w.rightYAxis(),w.width()-w.margins().right),w.renderYAxisLabel("yr",w.rightYAxisLabel(),90,w.width()-T))},w.plotData=function(){for(var e=0;e0&&(t[0]=0),t[1]<0&&(t[1]=0),b=e.scale.linear().domain(t).range([0,R.effectiveWidth()])}O.scale(b)}function o(){var e=y.select("g.axis");i(),e.empty()&&(e=y.append("g").attr("class","axis")),e.attr("transform","translate(0, "+R.effectiveHeight()+")"),n.transition(e,R.transitionDuration(),R.transitionDelay()).call(O)}function a(){y.selectAll("g.tick").select("line.grid-line").remove(),y.selectAll("g.tick").append("line").attr("class","grid-line").attr("x1",0).attr("y1",0).attr("x2",0).attr("y2",function(){return-R.effectiveHeight()})}function s(){w=R.data(),o(),a();var e=y.selectAll("g."+T).data(w);l(e),u(e),d(e)}function l(e){var t=e.enter().append("g").attr("class",function(e,t){return T+" _"+t});t.append("rect").attr("width",0),f(t)}function u(e){e.exit().remove()}function c(){var e=b(0);return e===-1/0||e!==e?b(1):e}function d(e){var t,r=w.length;t=k||(R.effectiveHeight()-(r+1)*F)/r,E||(A=t/2);var i=e.attr("transform",function(e,n){return"translate(0,"+((n+1)*F+n*t)+")"}).select("rect").attr("height",t).attr("fill",R.getColor).on("click",g).classed("deselected",function(e){return!!R.hasFilter()&&!v(e)}).classed("selected",function(e){return!!R.hasFilter()&&v(e)});n.transition(i,R.transitionDuration(),R.transitionDelay()).attr("width",function(e){return Math.abs(c()-b(R.valueAccessor()(e)))}).attr("transform",m),h(e),p(e)}function h(e){R.renderTitle()&&(e.select("title").remove(),e.append("title").text(R.title()))}function f(e){R.renderLabel()&&e.append("text").on("click",g),R.renderTitleLabel()&&e.append("text").attr("class",D).on("click",g)}function p(e){if(R.renderLabel()){var t=e.select("text").attr("x",C).attr("y",A).attr("dy",S).on("click",g).attr("class",function(e,t){return T+" _"+t}).text(function(e){return R.label()(e)});n.transition(t,R.transitionDuration(),R.transitionDelay()).attr("transform",m)}if(R.renderTitleLabel()){var r=e.select("."+D).attr("x",R.effectiveWidth()-x).attr("y",A).attr("dy",S).attr("text-anchor","end").on("click",g).attr("class",function(e,t){return D+" _"+t}).text(function(e){return R.title()(e)});n.transition(r,R.transitionDuration(),R.transitionDelay()).attr("transform",m)}}function g(e){R.onClick(e)}function m(e){var t=b(R.cappedValueAccessor(e)),n=c();return"translate("+(t>n?n:t)+",0)"}function v(e){return R.hasFilter(R.cappedKeyAccessor(e))}var y,b,_,w,C=10,A=15,E=!1,S="0.35em",x=2,F=5,k=!1,T="row",D="titlerow",M=!1,R=n.capMixin(n.marginMixin(n.colorMixin(n.baseMixin({})))),O=e.svg.axis().orient("bottom");return R.rowsCap=R.cap,R._doRender=function(){return R.resetSvg(),y=R.svg().append("g").attr("transform","translate("+R.margins().left+","+R.margins().top+")"),s(),R},R.title(function(e){return R.cappedKeyAccessor(e)+": "+R.cappedValueAccessor(e)}),R.label(R.cappedKeyAccessor),R.x=function(e){return arguments.length?(b=e,R):b},R.renderTitleLabel=function(e){return arguments.length?(M=e,R):M},R._doRedraw=function(){return s(),R},R.xAxis=function(){return O},R.fixedBarHeight=function(e){return arguments.length?(k=e,R):k},R.gap=function(e){return arguments.length?(F=e,R):F},R.elasticX=function(e){return arguments.length?(_=e,R):_},R.labelOffsetX=function(e){return arguments.length?(C=e,R):C},R.labelOffsetY=function(e){return arguments.length?(A=e,E=!0,R):A},R.titleLabelOffsetX=function(e){return arguments.length?(x=e,R):x},R.anchor(t,r)},n.legend=function(){function e(){return u+l}var t,r,i,o={},a=0,s=0,l=12,u=5,c=!1,d=560,h=70,f=!1,p=n.pluck("name");return o.parent=function(e){return arguments.length?(t=e,o):t},o.render=function(){t.svg().select("g.dc-legend").remove(),i=t.svg().append("g").attr("class","dc-legend").attr("transform","translate("+a+","+s+")");var o=t.legendables();void 0!==r&&(o=o.slice(0,r));var g=i.selectAll("g.dc-legend-item").data(o).enter().append("g").attr("class","dc-legend-item").on("mouseover",function(e){t.legendHighlight(e)}).on("mouseout",function(e){t.legendReset(e)}).on("click",function(e){e.chart.legendToggle(e)});i.selectAll("g.dc-legend-item").classed("fadeout",function(e){return e.chart.isLegendableHidden(e)}),o.some(n.pluck("dashstyle"))?g.append("line").attr("x1",0).attr("y1",l/2).attr("x2",l).attr("y2",l/2).attr("stroke-width",2).attr("stroke-dasharray",n.pluck("dashstyle")).attr("stroke",n.pluck("color")):g.append("rect").attr("width",l).attr("height",l).attr("fill",function(e){return e?e.color:"blue"}),g.append("text").text(p).attr("x",l+2).attr("y",function(){return l/2+(this.clientHeight?this.clientHeight:13)/2-2});var m=0,v=0;g.attr("transform",function(t,n){if(c){var r=!0===f?this.getBBox().width+u:h;m+r>d&&m>0&&(++v,m=0);var i="translate("+m+","+v*e()+")";return m+=r,i}return"translate(0,"+n*e()+")"})},o.x=function(e){return arguments.length?(a=e,o):a},o.y=function(e){return arguments.length?(s=e,o):s},o.gap=function(e){return arguments.length?(u=e,o):u},o.itemHeight=function(e){return arguments.length?(l=e,o):l},o.horizontal=function(e){return arguments.length?(c=e,o):c},o.legendWidth=function(e){return arguments.length?(d=e,o):d},o.itemWidth=function(e){return arguments.length?(h=e,o):h},o.autoItemWidth=function(e){return arguments.length?(f=e,o):f},o.legendText=function(e){return arguments.length?(p=e,o):p},o.maxItems=function(e){return arguments.length?(r=n.utils.isNumber(e)?e:void 0,o):r},o},n.scatterPlot=function(t,r){function i(e,t){return u(e)?w[t]?Math.pow(f,2):Math.pow(p,2):Math.pow(v,2)}function o(e,t){s.renderTitle()&&(e.selectAll("title").remove(),e.append("title").text(function(e){return s.title()(e)}))}function a(t,r){var i=s.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return t(e.select(this))}),o=l.size();l.size(Math.pow(r,2)),n.transition(i,s.transitionDuration(),s.transitionDelay()).attr("d",l),l.size(o)}var s=n.coordinateGridMixin({}),l=e.svg.symbol(),u=function(e){return e.value},c=s.keyAccessor();s.keyAccessor(function(e){return c(e)[0]}),s.valueAccessor(function(e){return c(e)[1]}),s.colorAccessor(function(){return s._groupName}),s.title(function(e){return s.keyAccessor()(e)+","+s.valueAccessor()(e)+": "+s.existenceAccessor()(e)});var d=function(e){return"translate("+s.x()(s.keyAccessor()(e))+","+s.y()(s.valueAccessor()(e))+")"},h=7,f=5,p=3,g=null,m=1,v=0,y=0,b=1,_=null,w=[];return l.size(i),n.override(s,"_filter",function(e){return arguments.length?s.__filter(n.filters.RangedTwoDimensionalFilter(e)):s.__filter()}),s.plotData=function(){var e=s.chartBodyG().selectAll("path.symbol").data(s.data());e.enter().append("path").attr("class","symbol").attr("opacity",0).attr("fill",s.getColor).attr("transform",d),e.call(o,s.data()),e.each(function(e,t){w[t]=!s.filter()||s.filter().isFiltered([e.key[0],e.key[1]])}),n.transition(e,s.transitionDuration(),s.transitionDelay()).attr("opacity",function(e,t){return u(e)?w[t]?b:s.excludedOpacity():y}).attr("fill",function(e,t){return _&&!u(e)?_:s.excludedColor()&&!w[t]?s.excludedColor():s.getColor(e)}).attr("transform",d).attr("d",l),n.transition(e.exit(),s.transitionDuration(),s.transitionDelay()).attr("opacity",0).remove()},s.existenceAccessor=function(e){return arguments.length?(u=e,this):u},s.symbol=function(e){return arguments.length?(l.type(e),s):l.type()},s.customSymbol=function(e){return arguments.length?(l=e,l.size(i),s):l},s.symbolSize=function(e){return arguments.length?(f=e,s):f},s.highlightedSize=function(e){return arguments.length?(h=e,s):h},s.excludedSize=function(e){return arguments.length?(p=e,s):p},s.excludedColor=function(e){return arguments.length?(g=e,s):g},s.excludedOpacity=function(e){return arguments.length?(m=e,s):m},s.hiddenSize=s.emptySize=function(e){return arguments.length?(v=e,s):v},s.emptyColor=function(e){return arguments.length?(_=e,s):_},s.emptyOpacity=function(e){return arguments.length?(y=e,s):y},s.nonemptyOpacity=function(e){return arguments.length?(b=e,s):y},s.legendables=function(){return[{chart:s,name:s._groupName,color:s.getColor()}]},s.legendHighlight=function(t){a(function(e){return e.attr("fill")===t.color},h),s.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return e.select(this).attr("fill")!==t.color}).classed("fadeout",!0)},s.legendReset=function(t){a(function(e){return e.attr("fill")===t.color},f),s.chartBodyG().selectAll(".chart-body path.symbol").filter(function(){return e.select(this).attr("fill")!==t.color}).classed("fadeout",!1)},s.setHandlePaths=function(){},s.extendBrush=function(){var e=s.brush().extent();return s.round()&&(e[0]=e[0].map(s.round()),e[1]=e[1].map(s.round()),s.g().select(".brush").call(s.brush().extent(e))),e},s.brushIsEmpty=function(e){return s.brush().empty()||!e||e[0][0]>=e[1][0]||e[0][1]>=e[1][1]},s._brushing=function(){var e=s.extendBrush();if(s.redrawBrush(s.g()),s.brushIsEmpty(e))n.events.trigger(function(){s.filter(null),s.redrawGroup()});else{var t=n.filters.RangedTwoDimensionalFilter(e);n.events.trigger(function(){s.filter(null),s.filter(t),s.redrawGroup()},n.constants.EVENT_DELAY)}},s.setBrushY=function(e){e.call(s.brush().y(s.y()))},s.anchor(t,r)},n.numberDisplay=function(t,r){var i,o=e.format(".2s"),a=n.baseMixin({}),s={one:"",some:"",none:""};return a._mandatoryAttributes(["group"]),a.html=function(e){return arguments.length?(e.none?s.none=e.none:e.one?s.none=e.one:e.some&&(s.none=e.some),e.one?s.one=e.one:e.some&&(s.one=e.some),e.some?s.some=e.some:e.one&&(s.some=e.one),a):s},a.value=function(){return a.data()},a.data(function(e){var t=e.value?e.value():e.top(1)[0];return a.valueAccessor()(t)}),a.transitionDuration(250),a.transitionDelay(0),a._doRender=function(){var t=a.value(),n=a.selectAll(".number-display");n.empty()&&(n=n.data([0]).enter().append("span").attr("class","number-display")),n.transition().duration(a.transitionDuration()).delay(a.transitionDelay()).ease("quad-out-in").tween("text",function(){var n=isFinite(i)?i:0,r=e.interpolateNumber(n||0,t);return i=t,function(e){var n=null,i=a.formatNumber()(r(e));0===t&&""!==s.none?n=s.none:1===t&&""!==s.one?n=s.one:""!==s.some&&(n=s.some),this.innerHTML=n?n.replace("%number",i):i}})},a._doRedraw=function(){return a._doRender()},a.formatNumber=function(e){return arguments.length?(o=e,a):o},a.anchor(t,r)},n.heatMap=function(t,r){function i(e,t){var r=d.selectAll(".box-group").filter(function(n){return n.key[e]===t}),i=r.filter(function(e){return!d.hasFilter(e.key)});n.events.trigger(function(){var e=i.empty()?r:i,t=e.data().map(function(e){return n.filters.TwoDimensionalFilter(e.key)});d._filter([t]),d.redrawGroup()})}function o(e,t,n){return!t||n[t-1]!==e}var a,s,l,u=6.75,c=6.75,d=n.colorMixin(n.marginMixin(n.baseMixin({})));d._mandatoryAttributes(["group"]),d.title(d.colorAccessor());var h=function(e){return e},f=function(e){return e};d.colsLabel=function(e){return arguments.length?(h=e,d):h},d.rowsLabel=function(e){return arguments.length?(f=e,d):f};var p=function(e){i(0,e)},g=function(e){i(1,e)},m=function(e){var t=e.key;n.events.trigger(function(){d.filter(t),d.redrawGroup()})};return n.override(d,"filter",function(e){return arguments.length?d._filter(n.filters.TwoDimensionalFilter(e)):d._filter()}),d.rows=function(t){if(arguments.length)return l=t,d;if(l)return l;var n=d.data().map(d.valueAccessor());return n.sort(e.ascending),e.scale.ordinal().domain(n.filter(o))},d.cols=function(t){if(arguments.length)return s=t,d;if(s)return s;var n=d.data().map(d.keyAccessor());return n.sort(e.ascending),e.scale.ordinal().domain(n.filter(o))},d._doRender=function(){return d.resetSvg(),a=d.svg().append("g").attr("class","heatmap").attr("transform","translate("+d.margins().left+","+d.margins().top+")"),d._doRedraw()},d._doRedraw=function(){var e=d.rows(),t=d.cols(),r=e.domain().length,i=t.domain().length,o=Math.floor(d.effectiveWidth()/i),s=Math.floor(d.effectiveHeight()/r);t.rangeRoundBands([0,d.effectiveWidth()]),e.rangeRoundBands([d.effectiveHeight(),0]);var l=a.selectAll("g.box-group").data(d.data(),function(e,t){return d.keyAccessor()(e,t)+"\0"+d.valueAccessor()(e,t)}),h=l.enter().append("g").attr("class","box-group");h.append("rect").attr("class","heat-box").attr("fill","white").on("click",d.boxOnClick()),d.renderTitle()&&(h.append("title"),l.select("title").text(d.title())),n.transition(l.select("rect"),d.transitionDuration(),d.transitionDelay()).attr("x",function(e,n){return t(d.keyAccessor()(e,n))}).attr("y",function(t,n){return e(d.valueAccessor()(t,n))}).attr("rx",u).attr("ry",c).attr("fill",d.getColor).attr("width",o).attr("height",s),l.exit().remove();var f=a.select("g.cols");f.empty()&&(f=a.append("g").attr("class","cols axis"));var p=f.selectAll("text").data(t.domain());p.enter().append("text").attr("x",function(e){return t(e)+o/2}).style("text-anchor","middle").attr("y",d.effectiveHeight()).attr("dy",12).on("click",d.xAxisOnClick()).text(d.colsLabel()),n.transition(p,d.transitionDuration(),d.transitionDelay()).text(d.colsLabel()).attr("x",function(e){return t(e)+o/2}).attr("y",d.effectiveHeight()),p.exit().remove();var g=a.select("g.rows");g.empty()&&(g=a.append("g").attr("class","rows axis"));var m=g.selectAll("text").data(e.domain());return m.enter().append("text").attr("dy",6).style("text-anchor","end").attr("x",0).attr("dx",-2).on("click",d.yAxisOnClick()).text(d.rowsLabel()),n.transition(m,d.transitionDuration(),d.transitionDelay()).text(d.rowsLabel()).attr("y",function(t){return e(t)+s/2}),m.exit().remove(),d.hasFilter()?d.selectAll("g.box-group").each(function(e){d.isSelectedNode(e)?d.highlightSelected(this):d.fadeDeselected(this)}):d.selectAll("g.box-group").each(function(){d.resetHighlight(this)}),d},d.boxOnClick=function(e){return arguments.length?(m=e,d):m},d.xAxisOnClick=function(e){return arguments.length?(p=e,d):p},d.yAxisOnClick=function(e){return arguments.length?(g=e,d):g},d.xBorderRadius=function(e){return arguments.length?(u=e,d):u},d.yBorderRadius=function(e){return arguments.length?(c=e,d):c},d.isSelectedNode=function(e){return d.hasFilter(e.key)},d.anchor(t,r)},function(){function t(e){return[0,e.length-1]}function n(t){return[e.quantile(t,.25),e.quantile(t,.5),e.quantile(t,.75)]}e.box=function(){function r(t){t.each(function(t,n){t=t.map(u).sort(e.ascending);var r=e.select(this),f=t.length,p=t[0],g=t[f-1],m=t.quartiles=d(t),v=c&&c.call(this,t,n),y=v&&v.map(function(e){return t[e]}),b=v?e.range(0,v[0]).concat(e.range(v[1]+1,f)):e.range(f),_=e.scale.linear().domain(l&&l.call(this,t,n)||[p,g]).range([o,0]),w=this.__chart__||e.scale.linear().domain([0,1/0]).range(_.range());this.__chart__=_;var C=r.selectAll("line.center").data(y?[y]:[]);C.enter().insert("line","rect").attr("class","center").attr("x1",i/2).attr("y1",function(e){return w(e[0])}).attr("x2",i/2).attr("y2",function(e){return w(e[1])}).style("opacity",1e-6).transition().duration(a).delay(s).style("opacity",1).attr("y1",function(e){return _(e[0])}).attr("y2",function(e){return _(e[1])}),C.transition().duration(a).delay(s).style("opacity",1).attr("x1",i/2).attr("x2",i/2).attr("y1",function(e){return _(e[0])}).attr("y2",function(e){return _(e[1])}),C.exit().transition().duration(a).delay(s).style("opacity",1e-6).attr("y1",function(e){return _(e[0])}).attr("y2",function(e){return _(e[1])}).remove();var A=r.selectAll("rect.box").data([m]);A.enter().append("rect").attr("class","box").attr("x",0).attr("y",function(e){return w(e[2])}).attr("width",i).attr("height",function(e){return w(e[0])-w(e[2])}).transition().duration(a).delay(s).attr("y",function(e){return _(e[2])}).attr("height",function(e){return _(e[0])-_(e[2])}),A.transition().duration(a).delay(s).attr("width",i).attr("y",function(e){return _(e[2])}).attr("height",function(e){return _(e[0])-_(e[2])});var E=r.selectAll("line.median").data([m[1]]);E.enter().append("line").attr("class","median").attr("x1",0).attr("y1",w).attr("x2",i).attr("y2",w).transition().duration(a).delay(s).attr("y1",_).attr("y2",_),E.transition().duration(a).delay(s).attr("x1",0).attr("x2",i).attr("y1",_).attr("y2",_);var S=r.selectAll("line.whisker").data(y||[]);S.enter().insert("line","circle, text").attr("class","whisker").attr("x1",0).attr("y1",w).attr("x2",i).attr("y2",w).style("opacity",1e-6).transition().duration(a).delay(s).attr("y1",_).attr("y2",_).style("opacity",1),S.transition().duration(a).delay(s).attr("x1",0).attr("x2",i).attr("y1",_).attr("y2",_).style("opacity",1),S.exit().transition().duration(a).delay(s).attr("y1",_).attr("y2",_).style("opacity",1e-6).remove();var x=r.selectAll("circle.outlier").data(b,Number);x.enter().insert("circle","text").attr("class","outlier").attr("r",5).attr("cx",i/2).attr("cy",function(e){return w(t[e])}).style("opacity",1e-6).transition().duration(a).delay(s).attr("cy",function(e){return _(t[e])}).style("opacity",1),x.transition().duration(a).delay(s).attr("cx",i/2).attr("cy",function(e){return _(t[e])}).style("opacity",1),x.exit().transition().duration(a).delay(s).attr("cy",function(e){return _(t[e])}).style("opacity",1e-6).remove();var F=h||_.tickFormat(8),k=r.selectAll("text.box").data(m);k.enter().append("text").attr("class","box").attr("dy",".3em").attr("dx",function(e,t){return 1&t?6:-6}).attr("x",function(e,t){return 1&t?i:0}).attr("y",w).attr("text-anchor",function(e,t){return 1&t?"start":"end"}).text(F).transition().duration(a).delay(s).attr("y",_),k.transition().duration(a).delay(s).text(F).attr("x",function(e,t){return 1&t?i:0}).attr("y",_);var T=r.selectAll("text.whisker").data(y||[]);T.enter().append("text").attr("class","whisker").attr("dy",".3em").attr("dx",6).attr("x",i).attr("y",w).text(F).style("opacity",1e-6).transition().duration(a).delay(s).attr("y",_).style("opacity",1),T.transition().duration(a).delay(s).text(F).attr("x",i).attr("y",_).style("opacity",1),T.exit().transition().duration(a).delay(s).attr("y",_).style("opacity",1e-6).remove()}),e.timer.flush()}var i=1,o=1,a=0,s=0,l=null,u=Number,c=t,d=n,h=null;return r.width=function(e){return arguments.length?(i=e,r):i},r.height=function(e){return arguments.length?(o=e,r):o},r.tickFormat=function(e){return arguments.length?(h=e,r):h},r.duration=function(e){return arguments.length?(a=e,r):a},r.domain=function(t){return arguments.length?(l=null===t?t:e.functor(t),r):l},r.value=function(e){return arguments.length?(u=e,r):u},r.whiskers=function(e){return arguments.length?(c=e,r):c},r.quartiles=function(e){return arguments.length?(d=e,r):d},r}}(),n.boxPlot=function(t,r){function i(e){return function(t){var n=t.quartiles[0],r=t.quartiles[2],i=(r-n)*e,o=-1,a=t.length;do{++o}while(t[o]r+i);return[o,a]}}function o(e){e.enter().append("g").attr("class","box").attr("transform",p).call(d).on("click",function(e){l.filter(l.keyAccessor()(e)),l.redrawGroup()})}function a(t){n.transition(t,l.transitionDuration(),l.transitionDelay()).attr("transform",p).call(d).each(function(){e.select(this).select("rect.box").attr("fill",l.getColor)})}function s(e){e.exit().remove().call(d)}var l=n.coordinateGridMixin({}),u=i,c=u(1.5),d=e.box(),h=null,f=function(e,t){return l.isOrdinal()?l.x().rangeBand():e/(1+l.boxPadding())/t};l.yAxisPadding(12),l.x(e.scale.ordinal()),l.xUnits(n.units.ordinal),l.data(function(e){return e.all().map(function(e){return e.map=function(t){return t.call(e,e)},e}).filter(function(e){return 0!==l.valueAccessor()(e).length})}),l.boxPadding=l._rangeBandPadding,l.boxPadding(.8),l.outerPadding=l._outerRangeBandPadding,l.outerPadding(.5),l.boxWidth=function(t){return arguments.length?(f=e.functor(t),l):f};var p=function(e,t){return"translate("+l.x()(l.keyAccessor()(e,t))+", 0)"};return l._preprocessData=function(){l.elasticX()&&l.x().domain([])},l.plotData=function(){var e=f(l.effectiveWidth(),l.xUnitCount());d.whiskers(c).width(e).height(l.effectiveHeight()).value(l.valueAccessor()).domain(l.y().domain()).duration(l.transitionDuration()).tickFormat(h);var t=l.chartBodyG().selectAll("g.box").data(l.data(),l.keyAccessor());o(t),a(t),s(t),l.fadeDeselectedArea()},l.fadeDeselectedArea=function(){if(l.hasFilter())if(l.isOrdinal())l.g().selectAll("g.box").each(function(e){l.isSelectedNode(e)?l.highlightSelected(this):l.fadeDeselected(this)});else{var e=l.brush().extent(),t=e[0],n=e[1],r=l.keyAccessor();l.g().selectAll("g.box").each(function(e){var i=r(e);i=n?l.fadeDeselected(this):l.highlightSelected(this)})}else l.g().selectAll("g.box").each(function(){l.resetHighlight(this)})},l.isSelectedNode=function(e){return l.hasFilter(l.keyAccessor()(e))},l.yAxisMin=function(){var t=e.min(l.data(),function(t){return e.min(l.valueAccessor()(t))});return n.utils.subtract(t,l.yAxisPadding())},l.yAxisMax=function(){var t=e.max(l.data(),function(t){return e.max(l.valueAccessor()(t))});return n.utils.add(t,l.yAxisPadding())},l.tickFormat=function(e){return arguments.length?(h=e,l):h},l.anchor(t,r)},n.abstractBubbleChart=n.bubbleMixin,n.baseChart=n.baseMixin,n.capped=n.capMixin,n.colorChart=n.colorMixin,n.coordinateGridChart=n.coordinateGridMixin,n.marginable=n.marginMixin,n.stackableChart=n.stackMixin,n.d3=e,n.crossfilter=t,n}r=[t(32),t(326)],n=o,void 0!==(i="function"==typeof n?n.apply(exports,r):n)&&(e.exports=i)}()},function(e,exports){+function($){"use strict";function e(e){return this.each(function(){var n=$(this),r=n.data("bs.tooltip"),i="object"==typeof e&&e;!r&&/destroy|hide/.test(e)||(r||n.data("bs.tooltip",r=new t(this,i)),"string"==typeof e&&r[e]())})}var t=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};t.VERSION="3.3.7",t.TRANSITION_DURATION=150,t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'