Skip to content

Instantly share code, notes, and snippets.

@zallek
Last active February 22, 2016 17:32
Show Gist options
  • Save zallek/8cf8be51808987be61a1 to your computer and use it in GitHub Desktop.
Save zallek/8cf8be51808987be61a1 to your computer and use it in GitHub Desktop.
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BotifySDK=t():e.BotifySDK=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(46),i=n(o),a=r(48),s=(0,a.applyMiddleware)(a.apiErrorMiddleware,a.getUrlDetailEncodeMiddleware,(0,a.queryMiddleware)(),a.dedupleMiddleware)(i.default);s.authToken=function(e){s.configuration.authorization="Token "+e},s.Query=a.Query,s.QueryAggregate=a.QueryAggregate,s.ApiError=a.ApiError,s.ApiResponseError=a.ApiResponseError,t.default=s,e.exports=t.default},function(e,t){function r(e){return!!e&&"object"==typeof e}function n(e,t){var r=null==e?void 0:e[t];return s(r)?r:void 0}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&v>=e}function i(e){return a(e)&&d.call(e)==l}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null==e?!1:i(e)?g.test(h.call(e)):r(e)&&c.test(e)}var u="[object Array]",l="[object Function]",c=/^\[object .+?Constructor\]$/,f=Object.prototype,h=Function.prototype.toString,p=f.hasOwnProperty,d=f.toString,g=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=n(Array,"isArray"),v=9007199254740991,m=y||function(e){return r(e)&&o(e.length)&&d.call(e)==u};e.exports=m},function(e,t,r){(function(e,n){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
"use strict";function o(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function i(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(t){return this instanceof e?(e.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?a(this,t):"string"==typeof t?s(this,t,arguments.length>1?arguments[1]:"utf8"):u(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function a(t,r){if(t=g(t,0>r?0:0|y(r)),!e.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)t[n]=0;return t}function s(e,t,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|m(t,r);return e=g(e,n),e.write(t,r),e}function u(t,r){if(e.isBuffer(r))return l(t,r);if($(r))return c(t,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return f(t,r);if(r instanceof ArrayBuffer)return h(t,r)}return r.length?p(t,r):d(t,r)}function l(e,t){var r=0|y(t.length);return e=g(e,r),t.copy(e,0,0,r),e}function c(e,t){var r=0|y(t.length);e=g(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function f(e,t){var r=0|y(t.length);e=g(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function h(t,r){return e.TYPED_ARRAY_SUPPORT?(r.byteLength,t=e._augment(new Uint8Array(r))):t=f(t,new Uint8Array(r)),t}function p(e,t){var r=0|y(t.length);e=g(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function d(e,t){var r,n=0;"Buffer"===t.type&&$(t.data)&&(r=t.data,n=0|y(r.length)),e=g(e,n);for(var o=0;n>o;o+=1)e[o]=255&r[o];return e}function g(t,r){e.TYPED_ARRAY_SUPPORT?(t=e._augment(new Uint8Array(r)),t.__proto__=e.prototype):(t.length=r,t._isBuffer=!0);var n=0!==r&&r<=e.poolSize>>>1;return n&&(t.parent=X),t}function y(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function v(t,r){if(!(this instanceof v))return new v(t,r);var n=new e(t,r);return delete n.parent,n}function m(e,t){"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(n)return H(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if(t=0|t,r=void 0===r||r===1/0?this.length:0|r,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return x(this,t,r);case"binary":return T(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;n>a;a++){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[r+a]=s}return a}function w(e,t,r,n){return Y(H(t,e.length-r),e,r,n)}function j(e,t,r,n){return Y(W(t),e,r,n)}function E(e,t,r,n){return j(e,t,r,n)}function S(e,t,r,n){return Y(J(t),e,r,n)}function O(e,t,r,n){return Y(K(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;r>o;){var i=e[o],a=null,s=i>239?4:i>223?3:i>191?2:1;if(r>=o+s){var u,l,c,f;switch(s){case 1:128>i&&(a=i);break;case 2:u=e[o+1],128===(192&u)&&(f=(31&i)<<6|63&u,f>127&&(a=f));break;case 3:u=e[o+1],l=e[o+2],128===(192&u)&&128===(192&l)&&(f=(15&i)<<12|(63&u)<<6|63&l,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(f=(15&i)<<18|(63&u)<<12|(63&l)<<6|63&c,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),o+=s}return R(n)}function R(e){var t=e.length;if(V>=t)return String.fromCharCode.apply(String,e);for(var r="",n=0;t>n;)r+=String.fromCharCode.apply(String,e.slice(n,n+=V));return r}function x(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;o++)n+=String.fromCharCode(127&e[o]);return n}function T(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;r>o;o++)n+=String.fromCharCode(e[o]);return n}function P(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var o="",i=t;r>i;i++)o+=F(e[i]);return o}function U(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function I(e,t,r){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,r,n,o,i,a){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>i||a>r)throw new RangeError("value is out of bounds");if(n+o>t.length)throw new RangeError("index out of range")}function k(e,t,r,n){0>t&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);i>o;o++)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function B(e,t,r,n){0>t&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);i>o;o++)e[r+o]=t>>>8*(n?o:3-o)&255}function L(e,t,r,n,o,i){if(t>o||i>t)throw new RangeError("value is out of bounds");if(r+n>e.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function z(e,t,r,n,o){return o||L(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,o){return o||L(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(e,t,r,n,52,8),r+8}function N(e){if(e=q(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function F(e){return 16>e?"0"+e.toString(16):e.toString(16)}function H(e,t){t=t||1/0;for(var r,n=e.length,o=null,i=[],a=0;n>a;a++){if(r=e.charCodeAt(a),r>55295&&57344>r){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(56320>r){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>r){if((t-=1)<0)break;i.push(r)}else if(2048>r){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(65536>r){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}function K(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);a++)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}function J(e){return Q.toByteArray(N(e))}function Y(e,t,r,n){for(var o=0;n>o&&!(o+r>=t.length||o>=e.length);o++)t[o+r]=e[o];return o}var Q=r(151),G=r(152),$=r(153);t.Buffer=e,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var X={};e.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.TYPED_ARRAY_SUPPORT?(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array):(e.prototype.length=void 0,e.prototype.parent=void 0),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,r){if(!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,o=r.length,i=0,a=Math.min(n,o);a>i&&t[i]===r[i];)++i;return i!==a&&(n=t[i],o=r[i]),o>n?-1:n>o?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!$(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;n++)r+=t[n].length;var o=new e(r),i=0;for(n=0;n<t.length;n++){var a=t[n];a.copy(o,i),i+=a.length}return o},e.byteLength=m,e.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):b.apply(this,arguments)},e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===e.compare(this,t)},e.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:e.compare(this,t)},e.prototype.indexOf=function(t,r){function n(e,t,r){for(var n=-1,o=0;r+o<e.length;o++)if(e[r+o]===t[-1===n?0:o-n]){if(-1===n&&(n=o),o-n+1===t.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(e.isBuffer(t))return n(this,t,r);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):n(this,[t],r);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},e.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},e.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var o=n;n=t,t=0|r,r=o}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(0>r||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return j(this,e,t,r);case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var V=4096;e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),t>r&&(r=t);var o;if(e.TYPED_ARRAY_SUPPORT)o=e._augment(this.subarray(t,r));else{var i=r-t;o=new e(i,void 0);for(var a=0;i>a;a++)o[a]=this[a+t]}return o.length&&(o.parent=this.parent||this),o},e.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},e.prototype.readUIntBE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},e.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},e.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||I(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},e.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),G.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),G.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),G.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),G.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||M(this,e,t,r,Math.pow(2,8*r),0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},e.prototype.writeUIntBE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||M(this,e,t,r,Math.pow(2,8*r),0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},e.prototype.writeUInt8=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},e.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):k(this,t,r,!0),r+2},e.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):k(this,t,r,!1),r+2},e.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):B(this,t,r,!0),r+4},e.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):B(this,t,r,!1),r+4},e.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=0,a=1,s=0>e?1:0;for(this[t]=255&e;++i<r&&(a*=256);)this[t+i]=(e/a>>0)-s&255;return t+r},e.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0>e?1:0;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=(e/a>>0)-s&255;return t+r},e.prototype.writeInt8=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=255&t,r+1},e.prototype.writeInt16LE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):k(this,t,r,!0),r+2},e.prototype.writeInt16BE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):k(this,t,r,!1),r+2},e.prototype.writeInt32LE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):B(this,t,r,!0),r+4},e.prototype.writeInt32BE=function(t,r,n){return t=+t,r=0|r,n||M(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):B(this,t,r,!1),r+4},e.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},e.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},e.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},e.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},e.prototype.copy=function(t,r,n,o){if(n||(n=0),o||0===o||(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&n>o&&(o=n),o===n)return 0;if(0===t.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>o)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r<o-n&&(o=t.length-r+n);var i,a=o-n;if(this===t&&r>n&&o>r)for(i=a-1;i>=0;i--)t[i+r]=this[i+n];else if(1e3>a||!e.TYPED_ARRAY_SUPPORT)for(i=0;a>i;i++)t[i+r]=this[i+n];else t._set(this.subarray(n,n+a),r);return a},e.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new RangeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var o=H(e.toString()),i=o.length;for(n=t;r>n;n++)this[n]=o[n%i]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var t=new Uint8Array(this.length),r=0,n=t.length;n>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Z=e.prototype;e._augment=function(t){return t.constructor=e,t._isBuffer=!0,t._set=t.set,t.get=Z.get,t.set=Z.set,t.write=Z.write,t.toString=Z.toString,t.toLocaleString=Z.toString,t.toJSON=Z.toJSON,t.equals=Z.equals,t.compare=Z.compare,t.indexOf=Z.indexOf,t.copy=Z.copy,t.slice=Z.slice,t.readUIntLE=Z.readUIntLE,t.readUIntBE=Z.readUIntBE,t.readUInt8=Z.readUInt8,t.readUInt16LE=Z.readUInt16LE,t.readUInt16BE=Z.readUInt16BE,t.readUInt32LE=Z.readUInt32LE,t.readUInt32BE=Z.readUInt32BE,t.readIntLE=Z.readIntLE,t.readIntBE=Z.readIntBE,t.readInt8=Z.readInt8,t.readInt16LE=Z.readInt16LE,t.readInt16BE=Z.readInt16BE,t.readInt32LE=Z.readInt32LE,t.readInt32BE=Z.readInt32BE,t.readFloatLE=Z.readFloatLE,t.readFloatBE=Z.readFloatBE,t.readDoubleLE=Z.readDoubleLE,t.readDoubleBE=Z.readDoubleBE,t.writeUInt8=Z.writeUInt8,t.writeUIntLE=Z.writeUIntLE,t.writeUIntBE=Z.writeUIntBE,t.writeUInt16LE=Z.writeUInt16LE,t.writeUInt16BE=Z.writeUInt16BE,t.writeUInt32LE=Z.writeUInt32LE,t.writeUInt32BE=Z.writeUInt32BE,t.writeIntLE=Z.writeIntLE,t.writeIntBE=Z.writeIntBE,t.writeInt8=Z.writeInt8,t.writeInt16LE=Z.writeInt16LE,t.writeInt16BE=Z.writeInt16BE,t.writeInt32LE=Z.writeInt32LE,t.writeInt32BE=Z.writeInt32BE,t.writeFloatLE=Z.writeFloatLE,t.writeFloatBE=Z.writeFloatBE,t.writeDoubleLE=Z.writeDoubleLE,t.writeDoubleBE=Z.writeDoubleBE,t.fill=Z.fill,t.inspect=Z.inspect,t.toArrayBuffer=Z.toArrayBuffer,t};var ee=/[^+\/0-9A-Za-z-_]/g}).call(t,r(2).Buffer,function(){return this}())},function(e,t,r){(function(t){function n(e){return this instanceof n?(u.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",o)):new n(e)}function o(){this.allowHalfOpen||this._writableState.ended||t.nextTick(this.end.bind(this))}function i(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}e.exports=n;var a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},s=r(7);s.inherits=r(8);var u=r(37),l=r(20);s.inherits(n,u),i(a(l.prototype),function(e){n.prototype[e]||(n.prototype[e]=l.prototype[e])})}).call(t,r(11))},function(e,t,r){function n(e,t){return function(r,n,i){if(n=o(n,i,3),u(r)){var l=s(r,n,t);return l>-1?r[l]:void 0}return a(r,n,e)}}var o=r(63),i=r(68),a=r(69),s=r(70),u=r(1),l=n(i);e.exports=l},function(e,t,r){var n=r(107),o=r(108),i=r(113),a=r(115),s=r(116),u=r(117),l=r(32),c=r(120),f=c(function(e,t){if(null==e)return{};if("function"!=typeof t[0]){var t=n(i(t),String);return s(e,o(l(e),t))}var r=a(t[0],t[1],3);return u(e,function(e,t,n){return!r(e,t,n)})});e.exports=f},function(e,t,r){(function(n){"use strict";function o(e,t){return t=t||{},t.algorithm=t.algorithm||"sha1",t.encoding=t.encoding||"hex",t.excludeValues=t.excludeValues?!0:!1,t.algorithm=t.algorithm.toLowerCase(),t.encoding=t.encoding.toLowerCase(),t.respectType=t.respectType===!1?!1:!0,t.respectFunctionProperties=t.respectFunctionProperties===!1?!1:!0,t.unorderedArrays=t.unorderedArrays!==!0?!1:!0,t.unorderedSets=t.unorderedSets!==!0?!1:!0,i(e,t),a(e,t)}function i(e,t){var r=l.getHashes?l.getHashes():["sha1","md5"],n=["buffer","hex","binary","base64"];if("undefined"==typeof e)throw new Error("Object argument required.");for(var o=0;o<r.length;++o)r[o].toLowerCase()===t.algorithm.toLowerCase()&&(t.algorithm=r[o]);if(-1===r.indexOf(t.algorithm))throw new Error('Algorithm "'+t.algorithm+'" not supported. supported values: '+r.join(", "));if(-1===n.indexOf(t.encoding))throw new Error('Encoding "'+t.encoding+'" not supported. supported values: '+n.join(", "))}function a(e,t){var r=l.createHash(t.algorithm),n=[];return u(r,t,n).dispatch(e),"buffer"===t.encoding?r.digest():r.digest(t.encoding)}function s(e){if("function"!=typeof e)return!1;var t=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;return null!=t.exec(Function.prototype.toString.call(e))}function u(e,t,r){return{dispatch:function(e){var t=typeof e;return null===e?this._null():this["_"+t](e)},_object:function(o){var i=/\[object (.*)\]/i,a=Object.prototype.toString.call(o),l=i.exec(a)[1]||"null",c=null;if(l=l.toLowerCase(),(c=r.indexOf(o))>=0)return void u(e,t,r).dispatch("[CIRCULAR]: "+c);if(r.push(o),"undefined"!=typeof n&&n.isBuffer&&n.isBuffer(o))return e.update("buffer:"),e.update(o);if("object"===l||"function"===l){e.update("object:");var f=Object.keys(o).sort();return t.respectType===!1||s(o)||f.splice(0,0,"prototype","__proto__","constructor"),f.forEach(function(n){e.update(n,"utf8"),t.excludeValues||u(e,t,r).dispatch(o[n])})}if(!u(e,t,r)["_"+l])throw new Error('Unknown object type "'+l+'"');u(e,t,r)["_"+l](o)},_array:function(n){return e.update("array:"+n.length+":"),t.unorderedArrays!==!1&&(n=n.sort()),n.forEach(function(n){u(e,t,r).dispatch(n)})},_date:function(t){return e.update("date:"+t.toJSON())},_symbol:function(t){return e.update("symbol:"+t.toString(),"utf8")},_error:function(t){return e.update("error:"+t.toString(),"utf8")},_boolean:function(t){return e.update("bool:"+t.toString())},_string:function(t){return e.update("string:"+t,"utf8")},_function:function(r){return e.update("fn:"+r.toString(),"utf8"),t.respectFunctionProperties&&this._object(r),e},_number:function(t){return e.update("number:"+t.toString())},_xml:function(t){return e.update("xml:"+t.toString(),"utf8")},_null:function(){return e.update("Null")},_undefined:function(){return e.update("Undefined")},_regexp:function(t){return e.update("regex:"+t.toString(),"utf8")},_uint8array:function(n){return e.update("uint8array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_uint8clampedarray:function(n){return e.update("uint8clampedarray:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_int8array:function(n){return e.update("uint8array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_uint16array:function(n){return e.update("uint16array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_int16array:function(n){return e.update("uint16array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_uint32array:function(n){return e.update("uint32array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_int32array:function(n){return e.update("uint32array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_float32array:function(n){return e.update("float32array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_float64array:function(n){return e.update("float64array:"),u(e,t,r).dispatch(Array.prototype.slice.call(n))},_arraybuffer:function(n){return e.update("arraybuffer:"),u(e,t,r).dispatch(new Uint8Array(n))},_url:function(t){return e.update("url:"+t.toString(),"utf8")},_map:function(n){e.update("map:");var o=Array.from(n);return t.unorderedSets!==!1&&t.unorderedArrays===!1&&(o=o.sort()),u(e,t,r).dispatch(o)},_set:function(n){e.update("set:");var o=Array.from(n);return t.unorderedSets!==!1&&t.unorderedArrays===!1&&(o=o.sort()),u(e,t,r).dispatch(o)},_domwindow:function(){return e.update("domwindow")},_process:function(){return e.update("process")},_timer:function(){return e.update("timer")},_pipe:function(){return e.update("pipe")},_tcp:function(){return e.update("tcp")},_udp:function(){return e.update("udp")},_tty:function(){return e.update("tty")},_statwatcher:function(){return e.update("statwatcher")},_securecontext:function(){return e.update("securecontext")},_connection:function(){return e.update("connection")},_zlib:function(){return e.update("zlib")},_context:function(){return e.update("context")},_nodescript:function(){return e.update("nodescript")},_httpparser:function(){return e.update("httpparser")},_dataview:function(){return e.update("dataview")},_signal:function(){return e.update("signal")},_fsevent:function(){return e.update("fsevent")},_tlswrap:function(){return e.update("tlswrap")}}}var l=r(156);t=e.exports=o,t.sha1=function(e){return o(e)},t.keys=function(e){return o(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},t.MD5=function(e){return o(e,{algorithm:"md5",encoding:"hex"})},t.keysMD5=function(e){return o(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})},t.HashTable=r(146)}).call(t,r(2).Buffer)},function(e,t,r){(function(e){function r(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function o(e){return null===e}function i(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function l(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function f(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===y(e)}function p(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function y(e){return Object.prototype.toString.call(e)}t.isArray=r,t.isBoolean=n,t.isNull=o,t.isNullOrUndefined=i,t.isNumber=a,t.isString=s,t.isSymbol=u,t.isUndefined=l,t.isRegExp=c,t.isObject=f,t.isDate=h,t.isError=p,t.isFunction=d,t.isPrimitive=g,t.isBuffer=e.isBuffer}).call(t,r(2).Buffer)},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){function n(){o.call(this)}e.exports=n;var o=r(35).EventEmitter,i=r(173);i(n,o),n.Readable=r(170),n.Writable=r(172),n.Duplex=r(167),n.Transform=r(171),n.PassThrough=r(169),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function n(){l.readable&&l.resume&&l.resume()}function i(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===o.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",n),l.removeListener("end",i),l.removeListener("close",a),l.removeListener("error",s),e.removeListener("error",s),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",n),e._isStdio||t&&t.end===!1||(l.on("end",i),l.on("close",a));var c=!1;return l.on("error",s),e.on("error",s),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},function(e,t){function r(e){return void 0===e}e.exports=r},function(e,t){function r(){l=!1,a.length?u=a.concat(u):c=-1,u.length&&n()}function n(){if(!l){var e=setTimeout(r);l=!0;for(var t=u.length;t;){for(a=u,u=[];++c<t;)a&&a[c].run();c=-1,t=u.length}a=null,l=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function i(){}var a,s=e.exports={},u=[],l=!1,c=-1;s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new o(e,t)),1!==u.length||l||setTimeout(n,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=i,s.addListener=i,s.once=i,s.off=i,s.removeListener=i,s.removeAllListeners=i,s.emit=i,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(e,t,r){"use strict";var n=r(9),o={appendUrlWithTemplateParameters:function(e,t){if(null==e)return void console.log("queryBuilder is null");if(null==t)return e;for(var r in t){var n="",o=t[r];n=null==o?"":o instanceof Array?o.join("/"):o.toString(),e=e.replace("{"+r+"}",n)}return e},appendUrlWithQueryParameters:function(e,t){if(null==e)return void console.log("queryBuilder is null");if(t==e)return e;var r=e.indexOf("?")>-1,n=this.urlEncodeObject(t),o=r?"&":"?";return e=e+o+n},cleanUrl:function(e){var t=/^https?:\/\/[^\/]+/,r=e.match(t);if(null==r)return void console.log("Invalid Url format");var n=r[0],o=e.substring(n.length);o=o.replace(/\/\/+/,"/");var i=n+o;return i},jsonSerialize:function(e){return JSON.stringify(e)},formatString:function(e){if(!e||arguments.length<=1)return e;for(var t=(arguments,1);t<arguments.length;t++){var r=new RegExp("\\{"+(t-1)+"\\}","gm");e=e.replace(r,arguments[t])}return e},cleanObject:function(e){if(e instanceof n.Stream)return e;for(var t in e){var r=e[t];null==r||void 0==r?e.constructor===Array?e.splice(t,1):delete e[t]:"[object Object]"===Object.prototype.toString.call(r)?this.cleanObject(r):r.constructor===Array&&this.cleanObject(r)}return e},merge:function(e,t){for(var r in t)e[r]=t[r];return e},isPrimitiveArray:function(e){return e.constructor&&e.constructor!==Array?!1:0==e.length?!0:e.every(function(e){return null==e||void 0==e||e.constructor&&[String,Number,Boolean].indexOf(e.constructor)>=0})},formDataEncodeObject:function(e,t){var r,o,i,a,s,u,l;t||(t=[]);for(r in e)if(o=e[r],o instanceof n.Stream)t.push({key:r,value:o});else if(o instanceof Array){var c="{0}[{1}]";if(this.isPrimitiveArray(o)){o=o.join(","),t.push({key:r,value:o});continue}for(l=0;l<o.length;++l)s=o[l],i=this.formatString(c,r,l),u={},u[i]=s,this.formDataEncodeObject(u,t)}else if(o instanceof Object)for(a in o)s=o[a],i=r+"["+a+"]",u={},u[i]=s,this.formDataEncodeObject(u,t);else void 0!==o&&null!==o&&(o instanceof Object||t.push({key:r,value:o}));return t},urlEncodeObject:function(e){var t=this.formDataEncodeObject(e),r="";for(var n in t){var o=t[n],i=o.key,a=o.value;r=r+=encodeURIComponent(i)+"="+encodeURIComponent(a)+"&"}return r.length?r.substr(0,r.length-1):r}};e.exports=o},function(e,t){"use strict";function r(){this._variableDict=[],this.toJSON=function(){var e={};for(var t in this)if("function"!=typeof this[t]&&"_variableDict"!==t)if(t in this._variableDict){var r=this._variableDict[t];e[r]=this[t]}else e[t]=this[t];return e}}e.exports=r},function(e,t){"use strict";var r={BASEURI:"https://api.botify.com/v1",authorization:""};e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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(t,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var o=e,i=t,a=r;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,r=a,n=!0,s=l=void 0}},s=r(26),u=n(s),l=function(e){function t(e){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e);
}return i(t,e),t}(u.default);t.default=l,e.exports=t.default},[182,71,72],[182,105,106],[182,142,143],function(e,t,r){function n(e,t){this.afterTransform=function(e,r){return o(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function o(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||e.push(r),o&&o(t);var i=e._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&e._read(i.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e),this._transformState=new n(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(e){a(t,e)}):a(t)})}function a(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}e.exports=i;var s=r(3),u=r(7);u.inherits=r(8),u.inherits(i,s),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,r){throw new Error("not implemented")},i.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;u.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},function(e,t,r){(function(t){function n(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function o(e,t){var n=r(3);e=e||{};var o=e.highWaterMark,i=e.objectMode?16:16384;this.highWaterMark=o||0===o?o:i,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){p(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function i(e){var t=r(3);return this instanceof i||this instanceof t?(this._writableState=new o(e,this),this.writable=!0,void E.call(this)):new i(e)}function a(e,r,n){var o=new Error("write after end");e.emit("error",o),t.nextTick(function(){n(o)})}function s(e,r,n,o){var i=!0;if(!(j.isBuffer(n)||j.isString(n)||j.isNullOrUndefined(n)||r.objectMode)){var a=new TypeError("Invalid non-string/buffer chunk");e.emit("error",a),t.nextTick(function(){o(a)}),i=!1}return i}function u(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&j.isString(t)&&(t=new w(t,r)),t}function l(e,t,r,o,i){r=u(t,r,o),j.isBuffer(r)&&(o="buffer");var a=t.objectMode?1:r.length;t.length+=a;var s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked?t.buffer.push(new n(r,o,i)):c(e,t,!1,a,r,o,i),s}function c(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function f(e,r,n,o,i){n?t.nextTick(function(){r.pendingcb--,i(o)}):(r.pendingcb--,i(o)),e._writableState.errorEmitted=!0,e.emit("error",o)}function h(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function p(e,r){var n=e._writableState,o=n.sync,i=n.writecb;if(h(n),r)f(e,n,o,r,i);else{var a=v(e,n);a||n.corked||n.bufferProcessing||!n.buffer.length||y(e,n),o?t.nextTick(function(){d(e,n,a,i)}):d(e,n,a,i)}}function d(e,t,r,n){r||g(e,t),t.pendingcb--,n(),b(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function y(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,c(e,t,!0,t.length,t.buffer,"",function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)}),t.buffer=[]}else{for(var n=0;n<t.buffer.length;n++){var o=t.buffer[n],i=o.chunk,a=o.encoding,s=o.callback,u=t.objectMode?1:i.length;if(c(e,t,!1,u,i,a,s),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function v(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function m(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function b(e,t){var r=v(e,t);return r&&(0===t.pendingcb?(m(e,t),t.finished=!0,e.emit("finish")):m(e,t)),r}function _(e,r,n){r.ending=!0,b(e,r),n&&(r.finished?t.nextTick(n):e.once("finish",n)),r.ended=!0}e.exports=i;var w=r(2).Buffer;i.WritableState=o;var j=r(7);j.inherits=r(8);var E=r(9);j.inherits(i,E),i.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},i.prototype.write=function(e,t,r){var n=this._writableState,o=!1;return j.isFunction(t)&&(r=t,t=null),j.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),j.isFunction(r)||(r=function(){}),n.ended?a(this,n,r):s(this,n,e,r)&&(n.pendingcb++,o=l(this,n,e,t,r)),o},i.prototype.cork=function(){var e=this._writableState;e.corked++},i.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||y(this,e))},i.prototype._write=function(e,t,r){r(new Error("not implemented"))},i.prototype._writev=null,i.prototype.end=function(e,t,r){var n=this._writableState;j.isFunction(e)?(r=e,e=null,t=null):j.isFunction(t)&&(r=t,t=null),j.isNullOrUndefined(e)||this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||_(this,n,r)}}).call(t,r(11))},function(e,t,r){(function(e,n){function o(e,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),u(n,e,n.depth)}function i(e,t){var r=o.styles[t];return r?"["+o.colors[r][0]+"m"+e+"["+o.colors[r][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return b(o)||(o=u(e,o,n)),o}var i=l(e,r);if(i)return i;var a=Object.keys(r),g=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),O(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(r);if(0===a.length){if(A(r)){var y=r.name?": "+r.name:"";return e.stylize("[Function"+y+"]","special")}if(j(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(O(r))return c(r)}var v="",m=!1,_=["{","}"];if(d(r)&&(m=!0,_=["[","]"]),A(r)){var w=r.name?": "+r.name:"";v=" [Function"+w+"]"}if(j(r)&&(v=" "+RegExp.prototype.toString.call(r)),S(r)&&(v=" "+Date.prototype.toUTCString.call(r)),O(r)&&(v=" "+c(r)),0===a.length&&(!m||0==r.length))return _[0]+v+_[1];if(0>n)return j(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var E;return E=m?f(e,r,n,g,a):a.map(function(t){return h(e,r,n,g,t,m)}),e.seen.pop(),p(E,v,_)}function l(e,t){if(w(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return m(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o){for(var i=[],a=0,s=t.length;s>a;++a)P(t,String(a))?i.push(h(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(h(e,t,r,n,o,!0))}),i}function h(e,t,r,n,o,i){var a,s,l;if(l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},l.get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),P(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(l.value)<0?(s=y(r)?u(e,l.value,null):u(e,l.value,r-1),s.indexOf("\n")>-1&&(s=i?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),w(a)){if(i&&o.match(/^\d+$/))return s;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e,t,r){var n=0,o=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return null==e}function m(e){return"number"==typeof e}function b(e){return"string"==typeof e}function _(e){return"symbol"==typeof e}function w(e){return void 0===e}function j(e){return E(e)&&"[object RegExp]"===R(e)}function E(e){return"object"==typeof e&&null!==e}function S(e){return E(e)&&"[object Date]"===R(e)}function O(e){return E(e)&&("[object Error]"===R(e)||e instanceof Error)}function A(e){return"function"==typeof e}function C(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function R(e){return Object.prototype.toString.call(e)}function x(e){return 10>e?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var U=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(o(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,a=String(e).replace(U,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return e}}),s=n[r];i>r;s=n[++r])a+=y(s)||!E(s)?" "+s:" "+o(s);return a},t.deprecate=function(r,o){function i(){if(!a){if(n.throwDeprecation)throw new Error(o);n.traceDeprecation?console.trace(o):console.error(o),a=!0}return r.apply(this,arguments)}if(w(e.process))return function(){return t.deprecate(r,o).apply(this,arguments)};if(n.noDeprecation===!0)return r;var a=!1;return i};var I,M={};t.debuglog=function(e){if(w(I)&&(I=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(I)){var r=n.pid;M[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else M[e]=function(){};return M[e]},t.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=v,t.isNumber=m,t.isString=b,t.isSymbol=_,t.isUndefined=w,t.isRegExp=j,t.isObject=E,t.isDate=S,t.isError=O,t.isFunction=A,t.isPrimitive=C,t.isBuffer=r(175);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=r(174),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(t,function(){return this}(),r(11))},function(e,t,r){"use strict";function n(e,t){var r=l(e),n=new o;n.request=e;var i=function(e,r){var o=c(r);n.response=o;var i;e&&!e.status&&(i=e),t(i,o,n)};r.end(i)}var o=r(41),i=r(42),a=r(12),s=r(147),u=r(9),l=function(e){var t=s(e.method,e.queryUrl);if(t.set(e.headers),e.username&&t.auth(e.username,e.password),e.body&&t.send(e.body),e.formData){var r=a.formDataEncodeObject(e.formData);for(var n in r){var o=r[n].key,i=r[n].value;i instanceof u.Stream?t.attach(o,i):t.field(o,i)}}return e.form&&(t.send(a.urlEncodeObject(e.form)),t.set("content-type","application/x-www-form-urlencoded")),t},c=function(e){var t=new i;return e&&(t.body=e.text,t.headers=e.headers,t.statusCode=e.statusCode),t};e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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(t,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var o=e,i=t,a=r;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,r=a,n=!0,s=l=void 0}},s=r(26),u=n(s),l=function(e){function t(e,r,n,i){o(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),this.status=r,this.response=n,this.meta=i}return i(t,e),t}(u.default);t.default=l,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(28),u=n(s),l=r(30),c=n(l),f=r(10),h=n(f),p=r(5),d=n(p),g=r(25),y=n(g),v=r(15),m=n(v),b=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0];o(this,e),this.aggregates=[],this.filters=null,this.name=t}return a(e,[{key:"addAggregate",value:function(e){if(!(e instanceof y.default))throw new Error("aggregate must be an instance of QueryAggregate");return this.aggregates=this.aggregates.concat(e),this}},{key:"getAggregates",value:function(){return this.aggregates}},{key:"setFilters",value:function(e){if(e&&!(0,c.default)(e))throw new Error("filters must be an object");return this.filters=e,this}},{key:"getFilters",value:function(){return this.filters}},{key:"getName",value:function(){return this.name}},{key:"toJsonAPI",value:function(){return(0,d.default)({aggs:this.aggregates.map(function(e){return e.toJsonAPI()}),filters:this.filters},function(e){return(0,h.default)(e)||(0,u.default)(e)})}},{key:"fromObject",value:function(e){throw new Error("Not implemented yet")}},{key:"processResponse",value:function(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.transformTermKeys,o=void 0===n?!0:n,a=r.injectMetadata,s=void 0===a?!0:a,u=r.normalizeBoolean,l=void 0===u?!0:u;if(!e)throw new m.default("missing response");if(0===this.aggregates.length)return e;if(!e.aggs)throw new m.default("missing aggs whereas aggregate(s) have been defined");if(e=this.normalizeAggs(e),e.aggs.length!==this.aggregates.length)throw new m.default("missing agg items");return i({},e,{aggs:e.aggs.map(function(e,r){return t.aggregates[r].processResponse(e,{transformTermKeys:o,injectMetadata:s,normalizeBoolean:l})})})}},{key:"normalizeAggs",value:function(e){return 0!==e.count||0!==e.aggs.length?e:i({},e,{aggs:this.aggregates.map(function(){return{groups:[]}})})}}]),e}();t.default=b,t.ApiResponseError=m.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(28),l=n(u),c=r(10),f=n(c),h=r(5),p=n(h),d=r(57),g=n(d),y=r(58),v=n(y),m=r(15),b=n(m),_=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0];i(this,e),this.name=t,this.groupBys=[],this.metrics=[]}return s(e,[{key:"addTermGroupBy",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],r=new v.default(e,t);return this.groupBys=this.groupBys.concat(r),this}},{key:"addGroupBy",value:function(e){return this.addTermGroupBy(e)}},{key:"addRangeGroupBy",value:function(e,t){var r=new g.default(e,t);return this.groupBys=this.groupBys.concat(r),this}},{key:"getGroupBys",value:function(){return this.groupBys}},{key:"addMetric",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this.metrics=this.metrics.concat({operation:e,field:t}),this}},{key:"getMetrics",value:function(){return this.metrics}},{key:"toJsonAPI",value:function(){return(0,p.default)({group_by:this.groupBys.map(function(e){return e.toJsonAPI()}),metrics:this.metrics.map(function(e){return"count"===e.operation?e.operation:o({},e.operation,e.field)})},function(e){return(0,f.default)(e)||(0,l.default)(e)})}},{key:"processResponse",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];t.transformTermKeys,t.injectMetadata,t.normalizeBoolean;if(!e)throw new b.default("missing agg");if(0===this.groupBys.length)return e;if(!e.groups)throw new b.default("missing groups whereas groupby(s) have been defined");return a({},e,{groups:e.groups.map(this._processGroupResponse.bind(this))})}},{key:"_processGroupResponse",value:function(e,t){var r=this,n=t.transformTermKeys,o=t.injectMetadata,i=t.normalizeBoolean;if(!e)throw new b.default("missing group");if(!e.key)throw new b.default("missing group key");if(e.key.length!==this.groupBys.length)throw new b.default("missing group key items");return a({},e,{key:e.key.map(function(e,t){return r.groupBys[t].applyKeyReducers(e,{transformTermKeys:n,injectMetadata:o,normalizeBoolean:i})})})}}]),e}();t.default=_,t.ApiResponseError=b.default},function(e,t){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(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(t,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var o=e,i=t,a=r;s=l=u=void 0,n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,i);if(void 0!==s){if("value"in s)return s.value;var u=s.get;if(void 0===u)return;return u.call(a)}var l=Object.getPrototypeOf(o);if(null===l)return;e=l,t=i,r=a,n=!0}},i=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];return r(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),Object.defineProperty(this,"message",{enumerable:!1,value:e}),Object.defineProperty(this,"name",{enumerable:!1,value:this.constructor.name}),Error.hasOwnProperty("captureStackTrace")?void Error.captureStackTrace(this,this.constructor):void Object.defineProperty(this,"stack",{enumerable:!1,value:new Error(e).stack})}return n(t,e),t}(Error);t.default=i,e.exports=t.default},function(e,t,r){function n(e,t,r){var n=null==e?void 0:o(e,i(t),t+"");return void 0===n?r:n}var o=r(90),i=r(91);e.exports=n},function(e,t,r){function n(e){return!!e&&"object"==typeof e}function o(e){return function(t){return null==t?void 0:t[e]}}function i(e){return null!=e&&a(d(e))}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&p>=e}function s(e){return null==e?!0:i(e)&&(l(e)||f(e)||u(e)||n(e)&&c(e.splice))?!e.length:!h(e).length}var u=r(29),l=r(1),c=r(92),f=r(93),h=r(94),p=9007199254740991,d=o("length");e.exports=s},function(e,t){function r(e){return function(t){return null==t?void 0:t[e]}}function n(e){return i(e)&&g.call(e,"callee")&&(!v.call(e,"callee")||y.call(e)==f)}function o(e){return null!=e&&!("function"==typeof e&&a(e))&&s(m(e))}function i(e){return l(e)&&o(e)}function a(e){var t=u(e)?y.call(e):"";return t==h||t==p}function s(e){return"number"==typeof e&&e>-1&&e%1==0&&c>=e}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function l(e){return!!e&&"object"==typeof e}var c=9007199254740991,f="[object Arguments]",h="[object Function]",p="[object GeneratorFunction]",d=Object.prototype,g=d.hasOwnProperty,y=d.toString,v=d.propertyIsEnumerable,m=r("length");e.exports=n},function(e,t,r){function n(e){return!!e&&"object"==typeof e}function o(e,t){return a(e,t,u)}function i(e){var t;if(!n(e)||h.call(e)!=l||s(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var r;return o(e,function(e,t){r=t}),void 0===r||f.call(e,r)}var a=r(96),s=r(31),u=r(97),l="[object Object]",c=Object.prototype,f=c.hasOwnProperty,h=c.toString;e.exports=i},29,[184,119],function(e,t){function r(){return Math.floor((new Date).getTime()/c)}function n(e,t){f&&(!1 in window||"function"!=typeof window.console.warn||(window.console.warn("lscache - "+e),t&&window.console.warn("lscache - The error was: "+t.message)))}function o(){var e="__lscachetest__",t=e;if(void 0!==a)return a;try{localStorage.setItem(e,t),localStorage.removeItem(e),a=!0}catch(r){a=!1}return a}function i(e){function t(t){return s+e+":"+t}function i(e){return localStorage.getItem(e)}function a(e,t){localStorage.removeItem(e),localStorage.setItem(e,t)}function c(e){localStorage.removeItem(e)}function h(t){return u+e+":"+t}this.path=e,this.set=function(e,f,p){if(o()){f=JSON.stringify(f);try{a(t(e),f)}catch(d){if("QUOTA_EXCEEDED_ERR"!==d.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==d.name&&"QuotaExceededError"!==d.name)throw d;for(var g,y=[],v=0;v<localStorage.length;v++)if(g=localStorage.key(v),0===g.indexOf(u)){var m=s+g.substring(u.length),b=i(g);b=parseInt(b,l),y.push({key:m,expirationKey:g,size:(i(m)||"").length+m.length,expiration:b})}y.sort(function(e,t){return t.expiration-e.expiration});for(var _=(f||"").length+t(e).length+100;y.length&&_>0;)g=y.pop(),n("Cache is full, removing item with key '"+e+"'"),c(g.key),c(g.expirationKey),_-=g.size;a(t(e),f)}p?a(h(e),(r()+p).toString(l)):c(h(e))}},this.get=function(e){if(!o())return null;var n=h(e),a=i(n);if(a){var s=parseInt(a,l);if(r()>=s)return c(t(e)),c(n),null}var u=i(t(e));return JSON.parse(u)},this.remove=function(e){return o()?(c(t(e)),void c(h(e))):null},this.supported=function(){return o()},this.enableWarnings=function(e){f=e},this.flush=function(){if(o())for(var e=localStorage.length-1;e>=0;--e){var t=localStorage.key(e);0===t.indexOf(s+this.path+":")?localStorage.removeItem(t):0===t.indexOf(u+this.path+":")&&localStorage.removeItem(t)}},this.flushRecursive=function(){if(o())for(var e=localStorage.length-1;e>=0;--e){var t=localStorage.key(e);0===t.indexOf(s+this.path)?localStorage.removeItem(t):0===t.indexOf(u+this.path)&&localStorage.removeItem(t)}},this.keys=function(){keyList=[];for(var e=0;e<localStorage.length;e++)if(storedKey=localStorage.key(e),0===storedKey.indexOf(u+this.path+":")){var t=storedKey.substring(u.length+this.path.length+1);keyList.push(t)}return keyList}}var a,s="ls-cache:",u="ls-cache-expiry:",l=10,c=6e4,f=(Math.floor(864e13/c),!1);i.prototype.createBucket=function(e){return new i(this.path+encodeURIComponent(e)+"/")},e.exports=new i("/")},function(e,t,r){(function(t){function n(e){return function(){var r=[],n={update:function(e,n){return t.isBuffer(e)||(e=new t(e,n)),r.push(e),this},digest:function(n){var o=t.concat(r),i=e(o);return r=null,n?i.toString(n):i}};return n}}var o=r(161),i=n(r(157)),a=n(r(159));e.exports=function(e){return"md5"===e?new i:"rmd160"===e?new a:o(e)}}).call(t,r(2).Buffer)},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function o(e){return"number"==typeof e}function i(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,o,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),l=r.slice(),o=l.length,u=0;o>u;u++)l[u].apply(this,s);return!0},r.prototype.addListener=function(e,t){var o;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?i(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,i(this._events[e])&&!this._events[e].warned&&(o=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),o||(o=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var o=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,o,a,s;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(i(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){o=s;break}if(0>o)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){function n(e){return this instanceof n?void o.call(this,e):new n(e)}e.exports=n;var o=r(19),i=r(7);i.inherits=r(8),i.inherits(n,o),n.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){(function(t){function n(e,t){var n=r(3);e=e||{};var o=e.highWaterMark,i=e.objectMode?16:16384;this.highWaterMark=o||0===o?o:i,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(R||(R=r(38).StringDecoder),this.decoder=new R(e.encoding),this.encoding=e.encoding)}function o(e){r(3);return this instanceof o?(this._readableState=new n(e,this),this.readable=!0,void A.call(this)):new o(e)}function i(e,t,r,n,o){var i=l(t,r);if(i)e.emit("error",i);else if(C.isNullOrUndefined(r))t.reading=!1,t.ended||c(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!o){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&o){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else!t.decoder||o||n||(r=t.decoder.write(r)),o||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&f(e)),p(e,t);else o||(t.reading=!1);return a(t)}function a(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function s(e){if(e>=T)e=T;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function u(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||C.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=s(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function l(e,t){var r=null;return C.isBuffer(t)||C.isString(t)||C.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function c(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,f(e)}function f(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(x("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(function(){h(e)}):h(e))}function h(e){x("emit readable"),e.emit("readable"),m(e)}function p(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(function(){d(e,r)}))}function d(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(x("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;x("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&O.listenerCount(e,"data")&&(t.flowing=!0,m(e))}}function y(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(function(){v(e,r)}))}function v(e,t){t.resumeScheduled=!1,e.emit("resume"),m(e),t.flowing&&!t.reading&&e.read(0)}function m(e){var t=e._readableState;if(x("flow",t.flowing),t.flowing)do var r=e.read();while(null!==r&&t.flowing)}function b(e,t){var r,n=t.buffer,o=t.length,i=!!t.decoder,a=!!t.objectMode;if(0===n.length)return null;if(0===o)r=null;else if(a)r=n.shift();else if(!e||e>=o)r=i?n.join(""):S.concat(n,o),
n.length=0;else if(e<n[0].length){var s=n[0];r=s.slice(0,e),n[0]=s.slice(e)}else if(e===n[0].length)r=n.shift();else{r=i?"":new S(e);for(var u=0,l=0,c=n.length;c>l&&e>u;l++){var s=n[0],f=Math.min(e-u,s.length);i?r+=s.slice(0,f):s.copy(r,u,0,f),f<s.length?n[0]=s.slice(f):n.shift(),u+=f}}return r}function _(e){var r=e._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,t.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function w(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function j(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}e.exports=o;var E=r(168),S=r(2).Buffer;o.ReadableState=n;var O=r(35).EventEmitter;O.listenerCount||(O.listenerCount=function(e,t){return e.listeners(t).length});var A=r(9),C=r(7);C.inherits=r(8);var R,x=r(177);x=x&&x.debuglog?x.debuglog("stream"):function(){},C.inherits(o,A),o.prototype.push=function(e,t){var r=this._readableState;return C.isString(e)&&!r.objectMode&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=new S(e,t),t="")),i(this,r,e,t,!1)},o.prototype.unshift=function(e){var t=this._readableState;return i(this,t,e,"",!0)},o.prototype.setEncoding=function(e){return R||(R=r(38).StringDecoder),this._readableState.decoder=new R(e),this._readableState.encoding=e,this};var T=8388608;o.prototype.read=function(e){x("read",e);var t=this._readableState,r=e;if((!C.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return x("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?_(this):f(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&_(this),null;var n=t.needReadable;x("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,x("length less than watermark",n)),(t.ended||t.reading)&&(n=!1,x("reading or ended",n)),n&&(x("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=u(r,t));var o;return o=e>0?b(e,t):null,C.isNull(o)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&_(this),C.isNull(o)||this.emit("data",o),o},o.prototype._read=function(e){this.emit("error",new Error("not implemented"))},o.prototype.pipe=function(e,r){function n(e){x("onunpipe"),e===f&&i()}function o(){x("onend"),e.end()}function i(){x("cleanup"),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("drain",y),e.removeListener("error",s),e.removeListener("unpipe",n),f.removeListener("end",o),f.removeListener("end",i),f.removeListener("data",a),!h.awaitDrain||e._writableState&&!e._writableState.needDrain||y()}function a(t){x("ondata");var r=e.write(t);!1===r&&(x("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,f.pause())}function s(t){x("onerror",t),c(),e.removeListener("error",s),0===O.listenerCount(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",l),c()}function l(){x("onfinish"),e.removeListener("close",u),c()}function c(){x("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,x("pipe count=%d opts=%j",h.pipesCount,r);var p=(!r||r.end!==!1)&&e!==t.stdout&&e!==t.stderr,d=p?o:i;h.endEmitted?t.nextTick(d):f.once("end",d),e.on("unpipe",n);var y=g(f);return e.on("drain",y),f.on("data",a),e._events&&e._events.error?E(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",u),e.once("finish",l),e.emit("pipe",f),h.flowing||(x("pipe resume"),f.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;n>o;o++)r[o].emit("unpipe",this);return this}var o=j(t.pipes,e);return-1===o?this:(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},o.prototype.on=function(e,r){var n=A.prototype.on.call(this,e,r);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var o=this._readableState;if(!o.readableListening)if(o.readableListening=!0,o.emittedReadable=!1,o.needReadable=!0,o.reading)o.length&&f(this,o);else{var i=this;t.nextTick(function(){x("readable nexttick read 0"),i.read(0)})}}return n},o.prototype.addListener=o.prototype.on,o.prototype.resume=function(){var e=this._readableState;return e.flowing||(x("resume"),e.flowing=!0,e.reading||(x("resume read 0"),this.read(0)),y(this,e)),this},o.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this},o.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(x("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(o){if(x("wrapped data"),t.decoder&&(o=t.decoder.write(o)),o&&(t.objectMode||o.length)){var i=n.push(o);i||(r=!0,e.pause())}});for(var o in e)C.isFunction(e[o])&&C.isUndefined(this[o])&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));var i=["error","close","destroy","pause","resume"];return w(i,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){x("wrapped _read",t),r&&(r=!1,e.resume())},n},o._fromList=b}).call(t,r(11))},function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function o(e){return e.toString(this.encoding)}function i(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=r(2).Buffer,u=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},l=t.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=i;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=o)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=t.charCodeAt(t.length-1);if(!(n>=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var o=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,o),o-=this.charReceived),t+=e.toString(this.encoding,0,o);var o=t.length-1,n=t.charCodeAt(o);if(n>=55296&&56319>=n){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),t.substring(0,o)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,o=this.encoding;t+=n.slice(0,r).toString(o)}return t}},function(e,t,r){"use strict";var n=r(22),o=r(14),i=r(12),a={getAnalyses:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}";s=i.appendUrlWithTemplateParameters(s,{project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getAnalysisSummary:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getCrawlStatistics:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/crawl_statistics";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getCrawlStatisticsByFrequency:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/crawl_statistics/time";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{frequency:e.frequency,limit:e.limit});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getCrawlStatisticsUrls:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/crawl_statistics/urls/{list_type}";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,list_type:e.listType,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getGanalyticsOrphanURLs:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/ganalytics/orphan_urls/{medium}/{source}";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,medium:e.medium,project_slug:e.projectSlug,source:e.source,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getLinksPercentiles:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/links/percentiles";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getPageRankLost:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/pagerank/lost";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getSitemapsReport:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/sitemaps/report";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getSitemapsSamplesOutOfConfig:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/sitemaps/samples/out_of_config";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getSitemapsSamplesSitemapsOnly:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/sitemaps/samples/sitemap_only";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getLinksTopDomains:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/top_domains/domains";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getLinksTopSubdomains:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/features/top_domains/subdomains";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getPDFExports:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/pdf";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},createPdfExport:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/pdf";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{area:null!=e.area?e.area:"current",sections:null!=e.sections?e.sections:"overview"});var u=i.cleanUrl(s),l={accept:"application/json","content-type":"application/json; charset=utf-8",Authorization:o.authorization};i.cleanObject(e.urlsFilter);var c={queryUrl:u,method:"POST",headers:l,body:i.jsonSerialize(e.urlsFilter)};n(c,r)},getPdfExportStatus:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/pdf/{pdf_export_id}";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,pdf_export_id:e.pdfExportId,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getUrls:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{area:null!=e.area?e.area:"current",page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json","content-type":"application/json; charset=utf-8",Authorization:o.authorization};i.cleanObject(e.urlsQuery);var c={queryUrl:u,method:"POST",headers:l,body:i.jsonSerialize(e.urlsQuery)};n(c,r)},getUrlsAggs:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls/aggs";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{area:null!=e.area?e.area:"current"});var u=i.cleanUrl(s),l={accept:"application/json","content-type":"application/json; charset=utf-8",Authorization:o.authorization};i.cleanObject(e.urlsAggsQueries);var c={queryUrl:u,method:"POST",headers:l,body:i.jsonSerialize(e.urlsAggsQueries)};n(c,r)},getUrlsDatamodel:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls/datamodel";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{area:null!=e.area?e.area:"current"});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getUrlsExports:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls/export";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},createUrlsExport:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls/export";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{area:null!=e.area?e.area:"current"});var u=i.cleanUrl(s),l={accept:"application/json","content-type":"application/json; charset=utf-8",Authorization:o.authorization};i.cleanObject(e.urlsQuery);var c={queryUrl:u,method:"POST",headers:l,body:i.jsonSerialize(e.urlsQuery)};n(c,r)},getUrlsExportStatus:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls/export/{url_export_id}";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,url_export_id:e.urlExportId,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getUrlDetail:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/analyses/{username}/{project_slug}/{analysis_slug}/urls/{url}";s=i.appendUrlWithTemplateParameters(s,{analysis_slug:e.analysisSlug,project_slug:e.projectSlug,url:e.url,username:e.username}),s=i.appendUrlWithQueryParameters(s,{area:null!=e.area?e.area:"current",fields:e.fields});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)}};e.exports=a},function(e,t,r){"use strict";var n=r(22),o=r(14),i=r(12),a={getProjects:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/projects/{username}";s=i.appendUrlWithTemplateParameters(s,{username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getSavedFilters:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/projects/{username}/{project_slug}/filters";s=i.appendUrlWithTemplateParameters(s,{project_slug:e.projectSlug,username:e.username}),s=i.appendUrlWithQueryParameters(s,{page:e.page,size:e.size});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)},getSavedFilter:function(e,t){function r(e,r,n){e?t({errorMessage:e.message,errorCode:e.code},null,n):r.statusCode>=200&&r.statusCode<=206?t(null,JSON.parse(r.body),n):500==r.statusCode?t({errorMessage:"error payload",errorCode:500,errorResponse:r.body},null,n):t({errorMessage:"HTTP Response Not OK",errorCode:r.statusCode,errorResponse:r.body},null,n)}e=e||{};var a=o.BASEURI,s=a+"/projects/{username}/{project_slug}/filters/{identifier}";s=i.appendUrlWithTemplateParameters(s,{identifier:e.identifier,project_slug:e.projectSlug,username:e.username});var u=i.cleanUrl(s),l={accept:"application/json",Authorization:o.authorization},c={queryUrl:u,method:"GET",headers:l};n(c,r)}};e.exports=a},function(e,t){"use strict";function r(){this.request=null,this.response=null}e.exports=r},function(e,t){"use strict";function r(){this.statusCode=null,this.body=null,this.headers=null}e.exports=r},function(e,t,r){"use strict";function n(){this.filters=null,this.aggs=null}var o=r(13);n.prototype=new o,n.prototype.constructor=o,n.prototype.getFilters=function(){return this.filters},n.prototype.setFilters=function(e){this.filters=e},n.prototype.getAggs=function(){return this.aggs},n.prototype.setAggs=function(e){this.aggs=e},e.exports=n},function(e,t,r){"use strict";function n(){this.filters=null}var o=r(13);n.prototype=new o,n.prototype.constructor=o,n.prototype.getFilters=function(){return this.filters},n.prototype.setFilters=function(e){this.filters=e},e.exports=n},function(e,t,r){"use strict";function n(){this.fields=null,this.filters=null,this.sort=null}var o=r(13);n.prototype=new o,n.prototype.constructor=o,n.prototype.getFields=function(){return this.fields},n.prototype.setFields=function(e){this.fields=e},n.prototype.getFilters=function(){return this.filters},n.prototype.setFilters=function(e){this.filters=e},n.prototype.getSort=function(){return this.sort},n.prototype.setSort=function(e){this.sort=e},e.exports=n},function(e,t,r){"use strict";function n(){}var o=r(14),i=r(39),a=r(40),s=r(43),u=r(45),l=r(44);n.configuration=o,n.AnalysisController=i,n.ProjectController=a,n.UrlsAggsQuery=s,n.UrlsQuery=u,n.UrlsFilter=l,e.exports=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e,r,n){return(0,c.default)(e,function(e,i){var a={controllerId:r,operationId:i,baseSdk:n};return h.default.apply(void 0,o(t.concat(a)))(e)})}}function a(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return(0,c.default)(e,function(r,n){var o=(0,u.default)(n,"Controller");return o?i.apply(void 0,t)(r,n,e):r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.applyMiddlewareController=i,t.default=a;var s=r(61),u=n(s),l=r(98),c=n(l),f=r(59),h=n(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(47),i=n(o),a=r(49),s=n(a),u=r(50),l=n(u),c=r(51),f=n(c),h=r(52),p=n(h),d=r(53),g=n(d),y=r(54),v=n(y),m=r(55),b=n(m),_=r(56),w=n(_),j=r(24),E=n(j),S=r(25),O=n(S),A=r(23),C=n(A),R=r(15),x=n(R);t.applyMiddleware=i.default,t.apiErrorMiddleware=s.default,t.batchMiddleware=l.default,t.dedupleMiddleware=f.default,t.getUrlDetailEncodeMiddleware=p.default,t.invalidateAnalysisMiddleware=g.default,t.jobsMiddleware=v.default,t.lscacheMiddleware=b.default,t.queryMiddleware=w.default,t.Query=E.default,t.QueryAggregate=O.default,t.ApiError=C.default,t.ApiResponseError=x.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function i(){return function(e){return function(t,r,n){e(t,function(e){if(!e||e instanceof Error)return void r.apply(void 0,arguments);var t=e.errorMessage,n=e.errorCode,i=e.errorResponse,a=o(e,["errorMessage","errorCode","errorResponse"]),u=void 0;try{u=JSON.parse(i)}catch(l){u=i}finally{r(new s.default(t,n,u,a))}},n)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=r(23),s=n(a);t.ApiError=s.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,
"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(27),u=n(s),l=r(4),c=n(l),f=r(73),h=n(f),p=r(86),d=n(p),g=r(1),y=n(g),v=r(121),m=n(v),b=r(131),_=n(b),w=r(144),j=n(w),E=r(5),S=n(E),O=r(6),A=n(O),C=[{controllerId:"AnalysisController",operationId:"getUrlsAggs",commonKeys:["username","projectSlug","analysisSlug"],batchedKeyPath:["urlsAggsQueries"],queueLimit:15}];t.DEFAULT_BATCHED_OPERATIONS=C;var R=function(){function e(t,r,n){var i=arguments.length<=3||void 0===arguments[3]?null:arguments[3],a=arguments.length<=4||void 0===arguments[4]?0:arguments[4],s=arguments.length<=5||void 0===arguments[5]?{}:arguments[5];o(this,e),this.operation=t,this.params=r,this.bachedKey=n,this.queueLimit=i,this.timeout=a,this.options=s,this.resources=[],this.onRequestListeners=[],this.sent=!1}return a(e,[{key:"addResource",value:function(e,t){if(!(0,y.default)(e))throw new Error("items must be an array");this.resources.push({items:e,callback:t}),this._requestIfNeed()}},{key:"addOnRequestListener",value:function(e){this.onRequestListeners.push(e)}},{key:"_requestIfNeed",value:function(){var e=this;1===this.resources.length&&setTimeout(function(){e._request()},this.timeout),this.queueLimit&&this.resources.length>=this.queueLimit&&this._request()}},{key:"_request",value:function(){var e=this;if(!this.sent){this.sent=!0,this._onRequest();var t=(0,d.default)((0,_.default)(this.resources,"items")),r=(0,j.default)(this.params,this.bachedKey,t);this.operation(r,function(t,r){var n=0;e.resources.forEach(function(e){var o=e.items,a=e.callback;if(t)return a(t);if(!r)return a({errorMessage:"API returned an empty body",errorCode:200,errorResponse:r});var s=o.map(function(e){return r[n++]}),u=(0,h.default)(s,function(e){return!!e.error});if(u>=0){var l=s[u];return a({errorMessage:"Resource "+u+" failed",errorCode:l.status,errorResponse:i({},l,{error:i({},l.error,{resource_index:u})})})}return a(null,s.map(function(e){return e.data}))})},this.options)}}},{key:"_onRequest",value:function(){this.onRequestListeners.forEach(function(e){return e()})}}]),e}(),x={};t.default=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.batchedOperations,r=void 0===t?C:t,n=e.timeout,o=void 0===n?0:n;return function(e){var t=e.controllerId,n=e.operationId;return function(e){return function(i,a){var s=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],l=s.batch,f=void 0===l?!0:l,h=(0,S.default)(arguments[2],["batch"]),p=f&&(0,c.default)(r,function(e){return e.controllerId===t&&e.operationId===n});if(!p)return e(i,a,h);var d=(0,A.default)({commonParams:(0,m.default)(i,p.commonKeys),options:h,controllerId:t,operationId:n}),g=!x[d];g&&(x[d]=new R(e,i,p.batchedKeyPath,p.queueLimit,o,h),x[d].addOnRequestListener(function(){return x[d]=null}));var y=(0,u.default)(i,p.batchedKeyPath);return x[d].addResource(y,a),!1}}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.controllerId,r=e.operationId,n={};return function(e){return function(o,i,s){var u=(0,a.default)({controllerId:t,operationId:r,params:o,options:s});n[u]?n[u].push(i):(n[u]=[i],e(o,function(e,t){n[u].forEach(function(r){return r(e,t)}),n[u]=null},s))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=r(6),a=n(i);e.exports=t.default},function(e,t){"use strict";function r(e){var t=e.controllerId,r=e.operationId;return function(e){return function(a,s,u){return t!==o||r!==i?e.apply(void 0,arguments):void e(n({},a,{url:encodeURIComponent(a.url)}),s,u)}}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=r;var o="AnalysisController",i="getUrlDetail";e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.username,r=e.projectSlug,n=e.analysisSlug;return(0,f.default)({username:t,projectSlug:r,analysisSlug:n})}function i(e,t){var r=e.username,n=e.projectSlug,i=e.analysisSlug,a=o({username:r,projectSlug:n,analysisSlug:i}),s=l.default.createBucket(a),u=v.get(a);u!==t&&(s.flushRecursive(),v.set(a,t,g))}function a(e){var t=e.controllerId,r=e.operationId;return function(e){return function(n,a,u){return t!==h?e.apply(void 0,arguments):void e(n,function(e,t){if(r===p&&!e){var o=t[d];i(n,o)}a.apply(void 0,arguments)},s({},u,{bucketId:o(n)}))}}}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.getAnalysisBucketId=o,t.default=a;var u=r(33),l=n(u),c=r(6),f=n(c),h="AnalysisController",p="getAnalysisSummary",d="date_last_modified",g=525600,y="botifySdk-invalAna",v=l.default.createBucket(y);t.invalidateAnalysisBucket=v},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(4),s=n(a),u=r(10),l=n(u),c=[{create:{controllerId:"AnalysisController",operationId:"createUrlsExport"},poll:{controllerId:"AnalysisController",operationId:"getUrlsExportStatus",jobIdKey:"urlExportId"}},{create:{controllerId:"AnalysisController",operationId:"createPdfExport"},poll:{controllerId:"AnalysisController",operationId:"getPdfExportStatus",jobIdKey:"pdfExportId"}},{create:{controllerId:"SegmentController",operationId:"createDryRun"},poll:{controllerId:"SegmentController",operationId:"getDryRunStatus",jobIdKey:"dryRunId"}}];t.default=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.jobs,r=void 0===t?c:t,n=e.pollInterval,a=void 0===n?5e3:n;return function(e){var t=e.controllerId,n=e.operationId,u=e.baseSdk;return function(e){return function(c,f,h){var p=(0,s.default)(r,function(e){var r=e.create;return r.controllerId===t&&r.operationId===n});return p?void e(c,function(e,t){if(e)return f(i({},e,{errorMessage:"Error while creating job"}));var r=setInterval(function(){u[p.poll.controllerId][p.poll.operationId](i({},c,o({},p.poll.jobIdKey,t.job_id)),function(e,t){var n=e||"FAILED"===t.job_status||"DONE"===t.job_status&&(0,l.default)(t.results);return n?(clearInterval(r),f(i({},e,{errorMessage:"Error while polling result"}))):void("DONE"===t.job_status&&(clearInterval(r),f(null,t)))})},a)},h):e.apply(void 0,arguments)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return(0,u.default)(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.computeItemCacheKey=o;var i=r(33),a=n(i),s=r(6),u=n(s),l=r(4),c=n(l),f=r(5),h=n(f),p=r(60),d=n(p),g="0.0.1",y=525600,v="botifySdk-",m=a.default.createBucket(v);t.lscacheBucket=m,t.default=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.cachedOperations,r=void 0===t?[]:t;return(0,d.default)(g),function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.controllerId,n=e.operationId;return function(e){return function(i,s){var u=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],l=u.cache,f=u.invalidate,p=void 0===f?!1:f,d=u.bucketId,g=(0,h.default)(arguments[2],["cache","invalidate","bucketId"]),v=(0,c.default)(r,function(e){return e.controllerId===t&&e.operationId===n});if(!("undefined"==typeof l?v:l))return e(i,s,g);var b=d?a.default.createBucket(d):m,_=o(i);if(!p){var w=b.get(_);if(w)return s(null,w),!1}e(i,function(e,t){e||b.set(_,t,y),s.apply(void 0,arguments)},g)}}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(27),a=n(i),s=r(1),u=n(s),l=r(24),c=n(l),f="AnalysisController",h="getUrlsAggs",p=["urlsAggsQueries"];t.default=function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.processResponse,r=void 0===t?!1:t,n=e.transformTermKeys,i=void 0===n?!1:n,s=e.injectMetadata,l=void 0===s?!1:s,d=e.normalizeBoolean,g=void 0===d?!1:d;return function(e){var t=e.controllerId,n=e.operationId;return function(e){return function(s,d,y){if(t!==f||n!==h)return e.apply(void 0,arguments);var v=(0,a.default)(s,p);if(!v||!(0,u.default)(v))throw new Error("urlsAggsQueries param must be an array");if(r&&!v.every(function(e){return e instanceof c.default}))throw new Error("urlsAggsQueries param must be an array of instance of Query");e(o({},s,{urlsAggsQueries:v.map(function(e){return e instanceof c.default?e.toJsonAPI():e})}),function(e,t){if(e||!r)return d.apply(void 0,arguments);var n=null,o=void 0;try{o=t.map(function(e,t){return v[t].processResponse(e,{transformTermKeys:i,injectMetadata:l,normalizeBoolean:g})})}catch(a){n=a}d(n,o)},y)}}}},e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(4),u=n(s),l=r(1),c=n(l),f=r(10),h=n(f),p=r(5),d=n(p),g=function(){function e(t,r){if(o(this,e),this.field=t,!(0,c.default)(r))throw new Error("ranges must be an Array");this.ranges=r}return a(e,[{key:"toJsonAPI",value:function(){return{range:{field:this.field,ranges:this.ranges.map(function(e){return(0,d.default)({from:e.from,to:e.to},h.default)})}}}},{key:"applyKeyReducers",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.injectMetadata,n=void 0===r?!0:r,o=e;return n&&(o=this._injectMetadata(o)),o}},{key:"_injectMetadata",value:function(e){var t=(0,u.default)(this.ranges,function(t){return t.to===e.to&&t.from===e.from});return i({},e,{metadata:t&&t.metadata||{}})}}]),e}();t.default=g,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(4),u=n(s),l=r(1),c=n(l),f=function(){function e(t){var r=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];if(o(this,e),this.field=t,!(0,c.default)(r))throw new Error("terms must be an Array");this.terms=r}return a(e,[{key:"toJsonAPI",value:function(){return this.field}},{key:"applyKeyReducers",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.transformTermKeys,n=void 0===r?!0:r,o=t.injectMetadata,i=void 0===o?!0:o,a=t.normalizeBoolean,s=void 0===a?!0:a,u=e;return s&&(u=this._normalizeBoolean(u)),n&&(u=this._transformTermKeys(u)),i&&n&&(u=this._injectMetadata(u)),u}},{key:"_normalizeBoolean",value:function(e){return"T"===e?!0:"F"===e?!1:e}},{key:"_transformTermKeys",value:function(e){return{value:e}}},{key:"_injectMetadata",value:function(e){var t=(0,u.default)(this.terms,function(t){return t.value===e.value});return i({},e,{metadata:t&&t.metadata||{}})}}]),e}();t.default=f,e.exports=t.default},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function i(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}function a(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){var r=t.length,n=r>0?t[r-1]:void 0;n=(0,u.default)(n)?(r--,n):void 0,t=t.slice(0,r);var a=t.map(function(e){return e(n)});return i.apply(void 0,o(a))(e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var s=r(30),u=n(s);e.exports=t.default},function(e,t){"use strict";function r(e){var t=localStorage.getItem(n);t!==e&&(localStorage.clear(),localStorage.setItem(n,e,o))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var n="botifySdk-lscache-datamodel-version";t.LSCACHE_DATA_MODEL_VERSION_ID=n;var o=525600},function(e,t,r){function n(e,t,r){return e===e&&(void 0!==r&&(e=r>=e?e:r),void 0!==t&&(e=e>=t?e:t)),e}function o(e){var t=i(e)?O.call(e):"";return t==y||t==v}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return!!e&&"object"==typeof e}function s(e){return"symbol"==typeof e||a(e)&&O.call(e)==m}function u(e){if(!e)return 0===e?e:0;if(e=l(e),e===p||e===-p){var t=0>e?-1:1;return t*d}var r=e%1;return e===e?r?e-r:e:0}function l(e){if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(b,"");var r=w.test(e);return r||j.test(e)?E(e.slice(2),r?2:8):_.test(e)?g:+e}function c(e){if("string"==typeof e)return e;if(null==e)return"";if(s(e))return A?R.call(e):"";var t=e+"";return"0"==t&&1/e==-p?"-0":t}function f(e,t,r){e=c(e),t="string"==typeof t?t:t+"";var o=e.length;return r=void 0===r?o:n(u(r),0,o),r-=t.length,r>=0&&e.indexOf(t,r)==r}var h=r(62),p=1/0,d=1.7976931348623157e308,g=NaN,y="[object Function]",v="[object GeneratorFunction]",m="[object Symbol]",b=/^\s+|\s+$/g,_=/^[-+]0x[0-9a-f]+$/i,w=/^0b[01]+$/i,j=/^0o[0-7]+$/i,E=parseInt,S=Object.prototype,O=S.toString,A=h.Symbol,C=A?A.prototype:void 0,R=A?C.toString:void 0;e.exports=f},function(e,t,r){(function(e,r){function n(e){return e&&e.Object===Object?e:null}var o={"function":!0,object:!0},i=o[typeof t]&&t&&!t.nodeType?t:null,a=o[typeof e]&&e&&!e.nodeType?e:null,s=n(i&&a&&"object"==typeof r&&r),u=n(o[typeof self]&&self),l=n(o[typeof window]&&window),c=n(o[typeof this]&&this),f=s||l!==(c&&c.window)&&l||u||c||Function("return this")();e.exports=f}).call(t,r(150)(e),function(){return this}())},[178,64,66,67],[179,65,16],function(e,t){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&i>=e}function n(e){return!!e&&"object"==typeof e}function o(e){return n(e)&&r(e.length)&&!!x[P.call(e)]}var i=9007199254740991,a="[object Arguments]",s="[object Array]",u="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",d="[object Object]",g="[object RegExp]",y="[object Set]",v="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",_="[object Float32Array]",w="[object Float64Array]",j="[object Int8Array]",E="[object Int16Array]",S="[object Int32Array]",O="[object Uint8Array]",A="[object Uint8ClampedArray]",C="[object Uint16Array]",R="[object Uint32Array]",x={};x[_]=x[w]=x[j]=x[E]=x[S]=x[O]=x[A]=x[C]=x[R]=!0,x[a]=x[s]=x[b]=x[u]=x[l]=x[c]=x[f]=x[h]=x[p]=x[d]=x[g]=x[y]=x[v]=x[m]=!1;var T=Object.prototype,P=T.toString;e.exports=o},function(e,t){function r(e,t,r){if("function"!=typeof e)return n;if(void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 3:return function(r,n,o){return e.call(t,r,n,o)};case 4:return function(r,n,o,i){return e.call(t,r,n,o,i)};case 5:return function(r,n,o,i,a){return e.call(t,r,n,o,i,a)}}return function(){return e.apply(t,arguments)}}function n(e){return e}e.exports=r},[180,16],[181,16],function(e,t){function r(e,t,r,n){var o;return r(e,function(e,r,i){return t(e,r,i)?(o=n?r:e,!1):void 0}),o}e.exports=r},function(e,t){function r(e,t,r){for(var n=e.length,o=r?n:-1;r?o--:++o<n;)if(t(e[o],o,e))return o;return-1}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}function n(e,t){var r=null==e?void 0:e[t];return a(r)?r:void 0}function o(e){return i(e)&&h.call(e)==s}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return null==e?!1:o(e)?p.test(c.call(e)):r(e)&&u.test(e)}var s="[object Function]",u=/^\[object .+?Constructor\]$/,l=Object.prototype,c=Function.prototype.toString,f=l.hasOwnProperty,h=l.toString,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},29,function(e,t,r){function n(e){return function(t,r,n){return t&&t.length?(r=o(r,n,3),i(t,r,e)):-1}}var o=r(74),i=r(85),a=n();e.exports=a},[178,75,80,81],[179,76,77],65,[182,78,79],71,29,66,[180,82],[182,83,84],71,29,70,function(e,t,r){function n(e,t,r){var n=e?e.length:0;return r&&i(e,t,r)&&(t=!1),n?o(e,t):[]}var o=r(87),i=r(89);e.exports=n},[183,88],29,function(e,t){function r(e){return function(t){return null==t?void 0:t[e]}}function n(e){return null!=e&&a(c(e))}function o(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?l:t,e>-1&&e%1==0&&t>e}function i(e,t,r){if(!s(r))return!1;var i=typeof t;if("number"==i?n(r)&&o(t,r.length):"string"==i&&t in r){var a=r[t];return e===e?e===a:a!==a}return!1}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&l>=e}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var u=/^\d+$/,l=9007199254740991,c=r("length");e.exports=i},function(e,t){function r(e,t,r){if(null!=e){void 0!==r&&r in n(e)&&(t=[r]);for(var o=0,i=t.length;null!=e&&i>o;)e=e[t[o++]];return o&&o==i?e:void 0}}function n(e){return o(e)?e:Object(e)}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},function(e,t,r){function n(e){return null==e?"":e+""}function o(e){if(i(e))return e;var t=[];return n(e).replace(a,function(e,r,n,o){t.push(n?o.replace(s,"$1"):r||e)}),t}var i=r(1),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;e.exports=o},function(e,t){function r(e){var t=n(e)?s.call(e):"";return t==o||t==i}function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var o="[object Function]",i="[object GeneratorFunction]",a=Object.prototype,s=a.toString;e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}function n(e){return"string"==typeof e||r(e)&&a.call(e)==o}var o="[object String]",i=Object.prototype,a=i.toString;e.exports=n},[182,95,29],71,function(e,t){function r(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(r(i[u],u,i)===!1)break}return t}}var n=r();e.exports=n},[184,31],function(e,t,r){function n(e,t){return a(e,t,s)}function o(e){return function(t,r,o){var a={};return r=i(r,o,3),n(t,function(t,n,o){var i=r(t,n,o);n=e?i:n,t=e?t:i,a[n]=t}),a}}var i=r(99),a=r(104),s=r(17),u=o();e.exports=u},[178,100,102,103],[179,101,17],65,66,[180,17],96,71,29,function(e,t){function r(e,t){for(var r=-1,n=e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}e.exports=r},function(e,t,r){function n(e,t){var r=e?e.length:0,n=[];if(!r)return n;var u=-1,l=o,c=!0,f=c&&t.length>=s?a(t):null,h=t.length;f&&(l=i,c=!1,t=f);e:for(;++u<r;){var p=e[u];if(c&&p===p){for(var d=h;d--;)if(t[d]===p)continue e;n.push(p)}else l(t,p,0)<0&&n.push(p)}return n}var o=r(109),i=r(110),a=r(111),s=200;e.exports=n},function(e,t){function r(e,t,r){if(t!==t)return n(e,r);for(var o=r-1,i=e.length;++o<i;)if(e[o]===t)return o;return-1}function n(e,t,r){for(var n=e.length,o=t+(r?0:-1);r?o--:++o<n;){var i=e[o];if(i!==i)return o}return-1}e.exports=r},function(e,t){function r(e,t){var r=e.data,o="string"==typeof t||n(t)?r.set.has(t):r.hash[t];return o?0:-1}function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},function(e,t,r){(function(t){function n(e){var t=e?e.length:0;for(this.data={hash:l(null),set:new u};t--;)this.push(e[t])}function o(e){var t=this.data;"string"==typeof e||a(e)?t.set.add(e):t.hash[e]=!0}function i(e){return l&&u?new n(e):null}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var s=r(112),u=s(t,"Set"),l=s(Object,"create");n.prototype.push=o,e.exports=i}).call(t,function(){return this}())},71,[183,114],29,66,function(e,t){function r(e,t){e=n(e);for(var r=-1,o=t.length,i={};++r<o;){var a=t[r];a in e&&(i[a]=e[a])}return i}function n(e){return o(e)?e:Object(e)}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},[185,118,32],96,29,function(e,t){function r(e,t){if("function"!=typeof e)throw new TypeError(n);return t=o(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,n=-1,i=o(r.length-t,0),a=Array(i);++n<i;)a[n]=r[t+n];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,r[0],a);case 2:return e.call(this,r[0],r[1],a)}var s=Array(t+1);for(n=-1;++n<t;)s[n]=r[n];return s[t]=a,e.apply(this,s)}}var n="Expected a function",o=Math.max;e.exports=r},function(e,t,r){var n=r(122),o=r(124),i=r(125),a=r(126),s=r(130),u=s(function(e,t){return null==e?{}:"function"==typeof t[0]?a(e,o(t[0],t[1],3)):i(e,n(t))});e.exports=u},[183,123],29,66,116,[185,127,128],96,[184,129],29,120,function(e,t,r){function n(e){return function(t){return null==t?void 0:t[e]}}function o(e){var t=e+"";return e=f(e),function(r){return c(r,e,t)}}function i(e,t){var r=typeof e;if("string"==r&&g.test(e)||"number"==r)return!0;if(h(e))return!1;var n=!d.test(e);return n||null!=t&&e in a(t)}function a(e){return u(e)?e:Object(e)}function s(e,t){return p(e,l(t))}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function l(e){return i(e)?n(e):o(e)}var c=r(132),f=r(133),h=r(1),p=r(134),d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,g=/^\w*$/;e.exports=s},90,91,function(e,t,r){function n(e,t){var r=-1,n=i(e)?Array(e.length):[];return c(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function o(e){return function(t){return null==t?void 0:t[e]}}function i(e){return null!=e&&a(p(e))}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&h>=e}function s(e,t,r){var o=f(e)?u:n;return t=l(t,r,3),o(e,t)}var u=r(135),l=r(136),c=r(141),f=r(1),h=9007199254740991,p=o("length");e.exports=s},107,[178,137,139,140],[179,138,18],65,66,[180,18],[181,18],71,29,function(e,t,r){function n(e,t){return e="number"==typeof e||h.test(e)?+e:-1,t=null==t?p:t,e>-1&&e%1==0&&t>e}function o(e,t){var r=typeof e;if("string"==r&&f.test(e)||"number"==r)return!0;if(l(e))return!1;var n=!c.test(e);return n||null!=t&&e in i(t)}function i(e){return a(e)?e:Object(e)}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e,t,r){if(null==e)return e;var i=t+"";t=null!=e[i]||o(t,e)?[i]:u(t);for(var s=-1,l=t.length,c=l-1,f=e;null!=f&&++s<l;){var h=t[s];a(f)&&(s==c?f[h]=r:null==f[h]&&(f[h]=n(t[s+1])?[]:{})),f=f[h]}return e}var u=r(145),l=r(1),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,f=/^\w*$/,h=/^\d+$/,p=9007199254740991;e.exports=s},91,function(e,t,r){"use strict";function n(e){e=e||{},this.options=e,this._table={}}var o=r(6);t=e.exports=n,n.prototype.add=function(){var e=this,t=Array.prototype.slice.call(arguments,0);return t.forEach(function(t){"[object Array]"===Object.prototype.toString.call(t)?t.forEach(function(t){e._addObject(t)}):e._addObject(t)}),this},n.prototype.remove=function(){var e=this,t=Array.prototype.slice.call(arguments,0);return t.forEach(function(t){"[object Array]"===Object.prototype.toString.call(t)?t.forEach(function(t){e._removeObject(t)}):e._removeObject(t)}),this},n.prototype._removeObject=function(e){var t=o(e,this.options),r=this.getCount(t);1>=r?delete this._table[t]:this._table[t].count=r-1},n.prototype._addObject=function(e){var t=o(e,this.options);this._table[t]?(this._table[t].count++,this.options.excludeValues&&this._table[t].value.push(e)):this._table[t]={value:this.options.excludeValues?[e]:e,count:1}},n.prototype.hasKey=function(e){return!!this._table[e]},n.prototype.getValue=function(e){return this._table[e]?this._table[e].value:void 0},n.prototype.getCount=function(e){return this._table[e]?this._table[e].count:0},n.prototype.table=function(){return this._table},n.prototype.toArray=function(){for(var e=Object.keys(this._table),t=[],r=0;r<e.length;r++)t.push({value:this._table[e[r]].value,count:this._table[e[r]].count,hash:e[r]});return t},n.prototype.reset=function(){return this._table={},this}},function(e,t,r){function n(){}function o(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function i(e){return e===Object(e)}function a(e){if(!i(e))return e;var t=[];for(var r in e)null!=e[r]&&s(t,r,e[r]);return t.join("&")}function s(e,t,r){return Array.isArray(r)?r.forEach(function(r){s(e,t,r)}):void e.push(encodeURIComponent(t)+"="+encodeURIComponent(r))}function u(e){for(var t,r,n={},o=e.split("&"),i=0,a=o.length;a>i;++i)r=o[i],t=r.split("="),n[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return n}function l(e){var t,r,n,o,i=e.split(/\r?\n/),a={};i.pop();for(var s=0,u=i.length;u>s;++s)r=i[s],t=r.indexOf(":"),n=r.slice(0,t).toLowerCase(),o=_(r.slice(t+1)),a[n]=o;return a}function c(e){return/[\/+]json\b/.test(e)}function f(e){return e.split(/ *; */).shift()}function h(e){return b(e.split(/ *; */),function(e,t){var r=t.split(/ *= */),n=r.shift(),o=r.shift();return n&&o&&(e[n]=o),e},{})}function p(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=l(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function d(e,t){var r=this;m.call(this),this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new p(r)}catch(n){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=n,e.rawResponse=r.xhr&&r.xhr.responseText?r.xhr.responseText:null,r.callback(e)}if(r.emit("response",t),e)return r.callback(e,t);if(t.status>=200&&t.status<300)return r.callback(e,t);var o=new Error(t.statusText||"Unsuccessful HTTP response");o.original=e,o.response=t,o.status=t.status,r.callback(o,t)})}function g(e,t){return"function"==typeof t?new d("GET",e).end(t):1==arguments.length?new d("GET",e):new d(e,t)}function y(e,t){var r=g("DELETE",e);return t&&r.end(t),r}var v,m=r(148),b=r(149);v="undefined"!=typeof window?window:"undefined"!=typeof self?self:this,g.getXHR=function(){if(!(!v.XMLHttpRequest||v.location&&"file:"==v.location.protocol&&v.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var _="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};g.serializeObject=a,g.parseString=u,g.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},g.serialize={"application/x-www-form-urlencoded":a,"application/json":JSON.stringify},g.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},p.prototype.get=function(e){return this.header[e.toLowerCase()]},p.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=f(t);var r=h(t);for(var n in r)this[n]=r[n]},p.prototype.parseBody=function(e){var t=g.parse[this.type];return t&&e&&(e.length||e instanceof Object)?t(e):null},p.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=4==t||5==t?this.toError():!1,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},p.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot "+t+" "+r+" ("+this.status+")",o=new Error(n);return o.status=this.status,o.method=t,o.url=r,o},g.Response=p,m(d.prototype),d.prototype.use=function(e){return e(this),this},d.prototype.timeout=function(e){return this._timeout=e,this},d.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},d.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},d.prototype.set=function(e,t){if(i(e)){for(var r in e)this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},d.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},d.prototype.getHeader=function(e){return this._header[e.toLowerCase()]},d.prototype.type=function(e){return this.set("Content-Type",g.types[e]||e),this},d.prototype.parse=function(e){return this._parser=e,this},d.prototype.accept=function(e){return this.set("Accept",g.types[e]||e),this},d.prototype.auth=function(e,t){var r=btoa(e+":"+t);return this.set("Authorization","Basic "+r),this},d.prototype.query=function(e){return"string"!=typeof e&&(e=a(e)),e&&this._query.push(e),this},d.prototype.field=function(e,t){return this._formData||(this._formData=new v.FormData),this._formData.append(e,t),this},d.prototype.attach=function(e,t,r){return this._formData||(this._formData=new v.FormData),this._formData.append(e,t,r||t.name),this},d.prototype.send=function(e){var t=i(e),r=this.getHeader("Content-Type");if(t&&i(this._data))for(var n in e)this._data[n]=e[n];else"string"==typeof e?(r||this.type("form"),r=this.getHeader("Content-Type"),"application/x-www-form-urlencoded"==r?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||o(e)?this:(r||this.type("json"),this)},d.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},d.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},d.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},d.prototype.withCredentials=function(){return this._withCredentials=!0,this},d.prototype.end=function(e){var t=this,r=this.xhr=g.getXHR(),i=this._query.join("&"),a=this._timeout,s=this._formData||this._data;this._callback=e||n,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(n){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var u=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(r.onprogress=u);try{r.upload&&this.hasListeners("progress")&&(r.upload.onprogress=u)}catch(l){}if(a&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},a)),i&&(i=g.serializeObject(i),
this.url+=~this.url.indexOf("?")?"&"+i:"?"+i),r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!o(s)){var f=this.getHeader("Content-Type"),h=this._parser||g.serialize[f?f.split(";")[0]:""];!h&&c(f)&&(h=g.serialize["application/json"]),h&&(s=h(s))}for(var p in this.header)null!=this.header[p]&&r.setRequestHeader(p,this.header[p]);return this.emit("request",this),r.send("undefined"!=typeof s?s:null),this},d.prototype.then=function(e,t){return this.end(function(r,n){r?t(r):e(n)})},g.Request=d,g.get=function(e,t,r){var n=g("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},g.head=function(e,t,r){var n=g("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.del=y,g.delete=y,g.patch=function(e,t,r){var n=g("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.post=function(e,t,r){var n=g("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},g.put=function(e,t,r){var n=g("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},e.exports=g},function(e,t){function r(e){return e?n(e):void 0}function n(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),r=this._callbacks["$"+e];if(r){r=r.slice(0);for(var n=0,o=r.length;o>n;++n)r[n].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){e.exports=function(e,t,r){for(var n=0,o=e.length,i=3==arguments.length?r:e[n++];o>n;)i=t.call(null,i,e[n],++n,e);return i}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===a||t===f?62:t===s||t===h?63:u>t?-1:u+10>t?t-u+26+26:c+26>t?t-c:l+26>t?t-l+26:void 0}function r(e){function r(e){l[f++]=e}var n,o,a,s,u,l;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;u="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,l=new i(3*e.length/4-u),a=u>0?e.length-4:e.length;var f=0;for(n=0,o=0;a>n;n+=4,o+=3)s=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&s)>>16),r((65280&s)>>8),r(255&s);return 2===u?(s=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&s)):1===u&&(s=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(s>>8&255),r(255&s)),l}function o(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var o,i,a,s=e.length%3,u="";for(o=0,a=e.length-s;a>o;o+=3)i=(e[o]<<16)+(e[o+1]<<8)+e[o+2],u+=r(i);switch(s){case 1:i=e[e.length-1],u+=t(i>>2),u+=t(i<<4&63),u+="==";break;case 2:i=(e[e.length-2]<<8)+e[e.length-1],u+=t(i>>10),u+=t(i>>4&63),u+=t(i<<2&63),u+="="}return u}var i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="+".charCodeAt(0),s="/".charCodeAt(0),u="0".charCodeAt(0),l="a".charCodeAt(0),c="A".charCodeAt(0),f="-".charCodeAt(0),h="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=o}(t)},function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?o-1:0,h=r?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-c)-1,p>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=h,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:(p?-1:1)*(1/0);a+=Math.pow(2,n),i-=l}return(p?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,l=8*i-o-1,c=(1<<l)-1,f=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?h/u:h*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&s,p+=d,s/=256,o-=8);for(a=a<<o|s,l+=o;l>0;e[r+p]=255&a,p+=d,a/=256,l-=8);e[r+p-d]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){function n(e,r){if(!(this instanceof n))return new n(e,r);this._opad=u,this._alg=e;var a="sha512"===e?128:64;r=this._key=t.isBuffer(r)?r:new t(r),r.length>a?r=o(e).update(r).digest():r.length<a&&(r=t.concat([r,i],a));for(var s=this._ipad=new t(a),u=this._opad=new t(a),l=0;a>l;l++)s[l]=54^r[l],u[l]=92^r[l];this._hash=o(e).update(s)}var o=r(34),i=new t(128);i.fill(0),e.exports=n,n.prototype.update=function(e,t){return this._hash.update(e,t),this},n.prototype.digest=function(e){var t=this._hash.digest();return o(this._alg).update(this._opad).update(t).digest(e)}}).call(t,r(2).Buffer)},function(e,t,r){(function(t){function r(e,r){if(e.length%i!==0){var n=e.length+(i-e.length%i);e=t.concat([e,a],n)}for(var o=[],s=r?e.readInt32BE:e.readInt32LE,u=0;u<e.length;u+=i)o.push(s.call(e,u));return o}function n(e,r,n){for(var o=new t(r),i=n?o.writeInt32BE:o.writeInt32LE,a=0;a<e.length;a++)i.call(o,e[a],4*a,!0);return o}function o(e,o,i,a){t.isBuffer(e)||(e=new t(e));var u=o(r(e,a),e.length*s);return n(u,i,a)}var i=4,a=new t(i);a.fill(0);var s=8;e.exports={hash:o}}).call(t,r(2).Buffer)},function(e,t,r){(function(e){function n(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(e,t){for(var r in e)t(e[r],r)}var i=r(166);t.createHash=r(34),t.createHmac=r(154),t.randomBytes=function(t,r){if(!r||!r.call)return new e(i(t));try{r.call(this,void 0,new e(i(t)))}catch(n){r(n)}},t.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var a=r(165)(t);t.pbkdf2=a.pbkdf2,t.pbkdf2Sync=a.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(e){t[e]=function(){n("sorry,",e,"is not implemented yet")}})}).call(t,r(2).Buffer)},function(e,t,r){function n(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,o=-1732584194,c=271733878,f=0;f<e.length;f+=16){var h=r,p=n,d=o,g=c;r=i(r,n,o,c,e[f+0],7,-680876936),c=i(c,r,n,o,e[f+1],12,-389564586),o=i(o,c,r,n,e[f+2],17,606105819),n=i(n,o,c,r,e[f+3],22,-1044525330),r=i(r,n,o,c,e[f+4],7,-176418897),c=i(c,r,n,o,e[f+5],12,1200080426),o=i(o,c,r,n,e[f+6],17,-1473231341),n=i(n,o,c,r,e[f+7],22,-45705983),r=i(r,n,o,c,e[f+8],7,1770035416),c=i(c,r,n,o,e[f+9],12,-1958414417),o=i(o,c,r,n,e[f+10],17,-42063),n=i(n,o,c,r,e[f+11],22,-1990404162),r=i(r,n,o,c,e[f+12],7,1804603682),c=i(c,r,n,o,e[f+13],12,-40341101),o=i(o,c,r,n,e[f+14],17,-1502002290),n=i(n,o,c,r,e[f+15],22,1236535329),r=a(r,n,o,c,e[f+1],5,-165796510),c=a(c,r,n,o,e[f+6],9,-1069501632),o=a(o,c,r,n,e[f+11],14,643717713),n=a(n,o,c,r,e[f+0],20,-373897302),r=a(r,n,o,c,e[f+5],5,-701558691),c=a(c,r,n,o,e[f+10],9,38016083),o=a(o,c,r,n,e[f+15],14,-660478335),n=a(n,o,c,r,e[f+4],20,-405537848),r=a(r,n,o,c,e[f+9],5,568446438),c=a(c,r,n,o,e[f+14],9,-1019803690),o=a(o,c,r,n,e[f+3],14,-187363961),n=a(n,o,c,r,e[f+8],20,1163531501),r=a(r,n,o,c,e[f+13],5,-1444681467),c=a(c,r,n,o,e[f+2],9,-51403784),o=a(o,c,r,n,e[f+7],14,1735328473),n=a(n,o,c,r,e[f+12],20,-1926607734),r=s(r,n,o,c,e[f+5],4,-378558),c=s(c,r,n,o,e[f+8],11,-2022574463),o=s(o,c,r,n,e[f+11],16,1839030562),n=s(n,o,c,r,e[f+14],23,-35309556),r=s(r,n,o,c,e[f+1],4,-1530992060),c=s(c,r,n,o,e[f+4],11,1272893353),o=s(o,c,r,n,e[f+7],16,-155497632),n=s(n,o,c,r,e[f+10],23,-1094730640),r=s(r,n,o,c,e[f+13],4,681279174),c=s(c,r,n,o,e[f+0],11,-358537222),o=s(o,c,r,n,e[f+3],16,-722521979),n=s(n,o,c,r,e[f+6],23,76029189),r=s(r,n,o,c,e[f+9],4,-640364487),c=s(c,r,n,o,e[f+12],11,-421815835),o=s(o,c,r,n,e[f+15],16,530742520),n=s(n,o,c,r,e[f+2],23,-995338651),r=u(r,n,o,c,e[f+0],6,-198630844),c=u(c,r,n,o,e[f+7],10,1126891415),o=u(o,c,r,n,e[f+14],15,-1416354905),n=u(n,o,c,r,e[f+5],21,-57434055),r=u(r,n,o,c,e[f+12],6,1700485571),c=u(c,r,n,o,e[f+3],10,-1894986606),o=u(o,c,r,n,e[f+10],15,-1051523),n=u(n,o,c,r,e[f+1],21,-2054922799),r=u(r,n,o,c,e[f+8],6,1873313359),c=u(c,r,n,o,e[f+15],10,-30611744),o=u(o,c,r,n,e[f+6],15,-1560198380),n=u(n,o,c,r,e[f+13],21,1309151649),r=u(r,n,o,c,e[f+4],6,-145523070),c=u(c,r,n,o,e[f+11],10,-1120210379),o=u(o,c,r,n,e[f+2],15,718787259),n=u(n,o,c,r,e[f+9],21,-343485551),r=l(r,h),n=l(n,p),o=l(o,d),c=l(c,g)}return Array(r,n,o,c)}function o(e,t,r,n,o,i){return l(c(l(l(t,e),l(n,i)),o),r)}function i(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function a(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}function l(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function c(e,t){return e<<t|e>>>32-t}var f=r(155);e.exports=function(e){return f.hash(e,n,16)}},function(e,t,r){(function(t){e.exports=function(e){function r(e,t,r,o,i,a){if("function"==typeof i&&(a=i,i=void 0),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var s;try{s=n(e,t,r,o,i)}catch(u){return a(u)}a(void 0,s)})}function n(r,n,o,i,a){if("number"!=typeof o)throw new TypeError("Iterations not a number");if(0>o)throw new TypeError("Bad iterations");if("number"!=typeof i)throw new TypeError("Key length not a number");if(0>i)throw new TypeError("Bad key length");a=a||"sha1",t.isBuffer(r)||(r=new t(r)),t.isBuffer(n)||(n=new t(n));var s,u,l,c=1,f=new t(i),h=new t(n.length+4);n.copy(h,0,0,n.length);for(var p=1;c>=p;p++){h.writeUInt32BE(p,n.length);var d=e.createHmac(a,r).update(h).digest();if(!s&&(s=d.length,l=new t(s),c=Math.ceil(i/s),u=i-(c-1)*s,i>(Math.pow(2,32)-1)*s))throw new TypeError("keylen exceeds maximum length");d.copy(l,0,0,s);for(var g=1;o>g;g++){d=e.createHmac(a,r).update(d).digest();for(var y=0;s>y;y++)l[y]^=d[y]}var v=(p-1)*s,m=p==c?u:s;l.copy(f,v,0,m)}return f}return{pbkdf2:r,pbkdf2Sync:n}}}).call(t,r(2).Buffer)},function(e,t,r){(function(t){function r(e,t,r){return e^t^r}function n(e,t,r){return e&t|~e&r}function o(e,t,r){return(e|~t)^r}function i(e,t,r){return e&r|t&~r}function a(e,t,r){return e^(t|~r)}function s(e,t){return e<<t|e>>>32-t}function u(e){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var n=g(e),o=8*e.length,i=8*e.length;n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);for(var a=0;a<n.length;a+=16)v(r,n,a);for(var a=0;5>a;a++){var s=r[a];r[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var u=y(r);return new t(u)}e.exports=u;/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],p=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],g=function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},y=function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},v=function(e,t,u){for(var g=0;16>g;g++){var y=u+g,v=t[y];t[y]=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8)}var m,b,_,w,j,E,S,O,A,C;E=m=e[0],S=b=e[1],O=_=e[2],A=w=e[3],C=j=e[4];for(var R,g=0;80>g;g+=1)R=m+t[u+l[g]]|0,R+=16>g?r(b,_,w)+p[0]:32>g?n(b,_,w)+p[1]:48>g?o(b,_,w)+p[2]:64>g?i(b,_,w)+p[3]:a(b,_,w)+p[4],R=0|R,R=s(R,f[g]),R=R+j|0,m=j,j=w,w=s(_,10),_=b,b=R,R=E+t[u+c[g]]|0,R+=16>g?a(S,O,A)+d[0]:32>g?i(S,O,A)+d[1]:48>g?o(S,O,A)+d[2]:64>g?n(S,O,A)+d[3]:r(S,O,A)+d[4],R=0|R,R=s(R,h[g]),R=R+C|0,E=C,C=A,A=s(O,10),O=S,S=R;R=e[1]+_+A|0,e[1]=e[2]+w+C|0,e[2]=e[3]+j+E|0,e[3]=e[4]+m+S|0,e[4]=e[0]+b+O|0,e[0]=R}}).call(t,r(2).Buffer)},function(e,t){e.exports=function(e){function t(t,r){this._block=new e(t),this._finalSize=r,this._blockSize=t,this._len=0,this._s=0}return t.prototype.init=function(){this._s=0,this._len=0},t.prototype.update=function(t,r){"string"==typeof t&&(r=r||"utf8",t=new e(t,r));for(var n=this._len+=t.length,o=this._s=this._s||0,i=0,a=this._block;n>o;){for(var s=Math.min(t.length,i+this._blockSize-o%this._blockSize),u=s-i,l=0;u>l;l++)a[o%this._blockSize+l]=t[l+i];o+=u,i+=u,o%this._blockSize===0&&this._update(a)}return this._s=o,this},t.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},t.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t}},function(e,t,r){var t=e.exports=function(e){var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r},n=r(2).Buffer,o=r(160)(n);t.sha1=r(162)(n,o),t.sha256=r(163)(n,o),t.sha512=r(164)(n,o)},function(e,t,r){var n=r(21).inherits;e.exports=function(e,t){function r(){return d.length?d.pop().init():this instanceof r?(this._w=p,t.call(this,64,56),this._h=null,void this.init()):new r}function o(e,t,r,n){return 20>e?t&r|~t&n:40>e?t^r^n:60>e?t&r|t&n|r&n:t^r^n}function i(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function a(e,t){return e+t|0}function s(e,t){return e<<t|e>>>32-t}var u=0,l=4,c=8,f=12,h=16,p=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(r,t),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,t.prototype.init.call(this),this},r.prototype._POOL=d,r.prototype._update=function(e){var t,r,n,u,l,c,f,h,p,d;t=c=this._a,r=f=this._b,n=h=this._c,u=p=this._d,l=d=this._e;for(var g=this._w,y=0;80>y;y++){var v=g[y]=16>y?e.readInt32BE(4*y):s(g[y-3]^g[y-8]^g[y-14]^g[y-16],1),m=a(a(s(t,5),o(y,r,n,u)),a(a(l,v),i(y)));l=u,u=n,n=s(r,30),r=t,t=m}this._a=a(t,c),this._b=a(r,f),this._c=a(n,h),this._d=a(u,p),this._e=a(l,d)},r.prototype._hash=function(){d.length<100&&d.push(this);var t=new e(20);return t.writeInt32BE(0|this._a,u),t.writeInt32BE(0|this._b,l),t.writeInt32BE(0|this._c,c),t.writeInt32BE(0|this._d,f),t.writeInt32BE(0|this._e,h),t},r}},function(e,t,r){var n=r(21).inherits;e.exports=function(e,t){function r(){this.init(),this._w=p,t.call(this,64,56)}function o(e,t){return e>>>t|e<<32-t}function i(e,t){return e>>>t}function a(e,t,r){return e&t^~e&r}function s(e,t,r){return e&t^e&r^t&r}function u(e){return o(e,2)^o(e,13)^o(e,22)}function l(e){return o(e,6)^o(e,11)^o(e,25)}function c(e){return o(e,7)^o(e,18)^i(e,3)}function f(e){return o(e,17)^o(e,19)^i(e,10)}var h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);return n(r,t),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},r.prototype._update=function(e){var t,r,n,o,i,p,d,g,y,v,m=this._w;t=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,i=0|this._e,p=0|this._f,d=0|this._g,g=0|this._h;for(var b=0;64>b;b++){var _=m[b]=16>b?e.readInt32BE(4*b):f(m[b-2])+m[b-7]+c(m[b-15])+m[b-16];y=g+l(i)+a(i,p,d)+h[b]+_,v=u(t)+s(t,r,n),g=d,d=p,p=i,i=o+y,o=n,n=r,r=t,t=y+v}this._a=t+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=i+this._e|0,this._f=p+this._f|0,this._g=d+this._g|0,this._h=g+this._h|0},r.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},r}},function(e,t,r){var n=r(21).inherits;e.exports=function(e,t){function r(){this.init(),this._w=u,t.call(this,128,112)}function o(e,t,r){return e>>>r|t<<32-r}function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}var s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],u=new Array(160);return n(r,t),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},r.prototype._update=function(e){var t,r,n,u,l,c,f,h,p,d,g,y,v,m,b,_,w=this._w;t=0|this._a,r=0|this._b,n=0|this._c,u=0|this._d,l=0|this._e,c=0|this._f,f=0|this._g,h=0|this._h,p=0|this._al,d=0|this._bl,g=0|this._cl,y=0|this._dl,v=0|this._el,m=0|this._fl,b=0|this._gl,_=0|this._hl;for(var j=0;80>j;j++){var E,S,O=2*j;if(16>j)E=w[O]=e.readInt32BE(4*O),S=w[O+1]=e.readInt32BE(4*O+4);else{var A=w[O-30],C=w[O-30+1],R=o(A,C,1)^o(A,C,8)^A>>>7,x=o(C,A,1)^o(C,A,8)^o(C,A,7);A=w[O-4],C=w[O-4+1];var T=o(A,C,19)^o(C,A,29)^A>>>6,P=o(C,A,19)^o(A,C,29)^o(C,A,6),U=w[O-14],I=w[O-14+1],M=w[O-32],k=w[O-32+1];S=x+I,E=R+U+(x>>>0>S>>>0?1:0),S+=P,E=E+T+(P>>>0>S>>>0?1:0),S+=k,E=E+M+(k>>>0>S>>>0?1:0),w[O]=E,w[O+1]=S}var B=a(t,r,n),L=a(p,d,g),z=o(t,p,28)^o(p,t,2)^o(p,t,7),D=o(p,t,28)^o(t,p,2)^o(t,p,7),N=o(l,v,14)^o(l,v,18)^o(v,l,9),q=o(v,l,14)^o(v,l,18)^o(l,v,9),F=s[O],H=s[O+1],W=i(l,c,f),K=i(v,m,b),J=_+q,Y=h+N+(_>>>0>J>>>0?1:0);J+=K,Y=Y+W+(K>>>0>J>>>0?1:0),J+=H,Y=Y+F+(H>>>0>J>>>0?1:0),J+=S,Y=Y+E+(S>>>0>J>>>0?1:0);var Q=D+L,G=z+B+(D>>>0>Q>>>0?1:0);h=f,_=b,f=c,b=m,c=l,m=v,v=y+J|0,l=u+Y+(y>>>0>v>>>0?1:0)|0,u=n,y=g,n=r,g=d,r=t,d=p,p=J+Q|0,t=Y+G+(J>>>0>p>>>0?1:0)|0}this._al=this._al+p|0,this._bl=this._bl+d|0,this._cl=this._cl+g|0,this._dl=this._dl+y|0,this._el=this._el+v|0,this._fl=this._fl+m|0,this._gl=this._gl+b|0,this._hl=this._hl+_|0,this._a=this._a+t+(this._al>>>0<p>>>0?1:0)|0,this._b=this._b+r+(this._bl>>>0<d>>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0<g>>>0?1:0)|0,this._d=this._d+u+(this._dl>>>0<y>>>0?1:0)|0,this._e=this._e+l+(this._el>>>0<v>>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0<m>>>0?1:0)|0,this._g=this._g+f+(this._gl>>>0<b>>>0?1:0)|0,this._h=this._h+h+(this._hl>>>0<_>>>0?1:0)|0},r.prototype._hash=function(){function t(e,t,n){r.writeInt32BE(e,n),r.writeInt32BE(t,n+4)}var r=new e(64);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),t(this._g,this._gl,48),t(this._h,this._hl,56),r},r}},function(e,t,r){var n=r(158);e.exports=function(e,t){t=t||{};var r=n(e);return t.pbkdf2=r.pbkdf2,t.pbkdf2Sync=r.pbkdf2Sync,t}},function(e,t,r){(function(t,n){!function(){var o=("undefined"==typeof window?t:window)||{};_crypto=o.crypto||o.msCrypto||r(176),e.exports=function(e){if(_crypto.getRandomValues){var t=new n(e);return _crypto.getRandomValues(t),t}if(_crypto.randomBytes)return _crypto.randomBytes(e);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(t,function(){return this}(),r(2).Buffer)},function(e,t,r){e.exports=r(3)},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,r){e.exports=r(36)},function(e,t,r){t=e.exports=r(37),t.Stream=r(9),t.Readable=t,t.Writable=r(20),t.Duplex=r(3),t.Transform=r(19),t.PassThrough=r(36)},function(e,t,r){e.exports=r(19)},function(e,t,r){e.exports=r(20)},8,8,function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){},176,function(e,t,r,n,o,i){function a(e){return null==e?"":e+""}function s(e,t,r){var n=typeof e;return"function"==n?void 0===t?e:O(e,t,r):null==e?j:"object"==n?c(e):void 0===t?E(e):f(e,t)}function u(e,t,r){if(null!=e){void 0!==r&&r in m(e)&&(t=[r]);for(var n=0,o=t.length;null!=e&&o>n;)e=e[t[n++]];return n&&n==o?e:void 0}}function l(e,t,r){var n=t.length,o=n,i=!r;if(null==e)return!o;for(e=m(e);n--;){var a=t[n];if(i&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++n<o;){a=t[n];var s=a[0],u=e[s],l=a[1];if(i&&a[2]){if(void 0===u&&!(s in e))return!1}else{var c=r?r(u,l,s):void 0;if(!(void 0===c?S(l,u,r,!0):c))return!1}}return!0}function c(e){var t=g(e);if(1==t.length&&t[0][2]){var r=t[0][0],n=t[0][1];return function(e){return null==e?!1:e[r]===n&&(void 0!==n||r in m(e))}}return function(e){return l(e,t)}}function f(e,t){var r=A(e),n=y(e)&&v(t),o=e+"";return e=b(e),function(i){if(null==i)return!1;var a=o;if(i=m(i),(r||!n)&&!(a in i)){if(i=1==e.length?i:u(i,d(e,0,-1)),null==i)return!1;a=_(e),i=m(i)}return i[a]===t?void 0!==t||a in i:S(t,i[a],void 0,!0)}}function h(e){return function(t){return null==t?void 0:t[e]}}function p(e){var t=e+"";return e=b(e),function(r){return u(r,e,t)}}function d(e,t,r){var n=-1,o=e.length;t=null==t?0:+t||0,0>t&&(t=-t>o?0:o+t),r=void 0===r||r>o?o:+r||0,0>r&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}function g(e){for(var t=C(e),r=t.length;r--;)t[r][2]=v(t[r][1]);return t}function y(e,t){var r=typeof e;if("string"==r&&x.test(e)||"number"==r)return!0;if(A(e))return!1;var n=!R.test(e);return n||null!=t&&e in m(t)}function v(e){return e===e&&!w(e)}function m(e){return w(e)?e:Object(e)}function b(e){if(A(e))return e;var t=[];return a(e).replace(T,function(e,r,n,o){t.push(n?o.replace(P,"$1"):r||e)}),t}function _(e){var t=e?e.length:0;return t?e[t-1]:void 0}function w(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function j(e){return e}function E(e){return y(e)?h(e):p(e)}var S=r(n),O=r(o),A=r(1),C=r(i),R=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,x=/^\w*$/,T=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,P=/\\(\\)?/g;e.exports=s},function(e,t,r,n,o){function i(e){return!!e&&"object"==typeof e}function a(e,t){for(var r=-1,n=e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function s(e,t,r,n,o,a){return e===t?!0:null==e||null==t||!h(e)&&!i(t)?e!==e&&t!==t:u(e,t,s,r,n,o,a)}function u(e,t,r,n,o,i,a){var s=p(e),u=p(t),h=v,g=v;s||(h=C.call(e),h==y?h=j:h!=j&&(s=d(e))),u||(g=C.call(t),g==y?g=j:g!=j&&(u=d(t)));var m=h==j,b=g==j,_=h==g;if(_&&!s&&!m)return c(e,t,h);if(!o){var w=m&&A.call(e,"__wrapped__"),E=b&&A.call(t,"__wrapped__");if(w||E)return r(w?e.value():e,E?t.value():t,n,o,i,a)}if(!_)return!1;i||(i=[]),a||(a=[]);for(var S=i.length;S--;)if(i[S]==e)return a[S]==t;i.push(e),a.push(t);var O=(s?l:f)(e,t,r,n,o,i,a);return i.pop(),a.pop(),O}function l(e,t,r,n,o,i,s){var u=-1,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;for(;++u<l;){var f=e[u],h=t[u],p=n?n(o?h:f,o?f:h,u):void 0;if(void 0!==p){if(p)continue;return!1}if(o){if(!a(t,function(e){return f===e||r(f,e,n,o,i,s)}))return!1}else if(f!==h&&!r(f,h,n,o,i,s))return!1}return!0}function c(e,t,r){switch(r){case m:case b:return+e==+t;case _:return e.name==t.name&&e.message==t.message;case w:return e!=+e?t!=+t:e==+t;case E:case S:return e==t+""}return!1}function f(e,t,r,n,o,i,a){var s=g(e),u=s.length,l=g(t),c=l.length;if(u!=c&&!o)return!1;for(var f=u;f--;){var h=s[f];if(!(o?h in t:A.call(t,h)))return!1}for(var p=o;++f<u;){h=s[f];var d=e[h],y=t[h],v=n?n(o?y:d,o?d:y,h):void 0;if(!(void 0===v?r(d,y,n,o,i,a):v))return!1;p||(p="constructor"==h)}if(!p){var m=e.constructor,b=t.constructor;if(m!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b))return!1}return!0}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var p=r(1),d=r(n),g=r(o),y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",_="[object Error]",w="[object Number]",j="[object Object]",E="[object RegExp]",S="[object String]",O=Object.prototype,A=O.hasOwnProperty,C=O.toString;e.exports=s},function(e,t,r,n){function o(e){return i(e)?e:Object(e)}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){e=o(e);for(var t=-1,r=s(e),n=r.length,i=Array(n);++t<n;){var a=r[t];i[t]=[a,e[a]]}return i}var s=r(n);e.exports=a},function(e,t,r,n){function o(e,t){return d(e,t,f)}function i(e){return function(t){return null==t?void 0:t[e]}}function a(e,t){return function(r,n){var o=r?g(r):0;if(!u(o))return e(r,n);for(var i=t?o:-1,a=l(r);(t?i--:++i<o)&&n(a[i],i,a)!==!1;);return r}}function s(e){return function(t,r,n){for(var o=l(t),i=n(t),a=i.length,s=e?a:-1;e?s--:++s<a;){var u=i[s];if(r(o[u],u,o)===!1)break}return t}}function u(e){return"number"==typeof e&&e>-1&&e%1==0&&h>=e}function l(e){return c(e)?e:Object(e)}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var f=r(n),h=9007199254740991,p=a(o),d=s(),g=i("length");e.exports=p},function(e,t,r,n,o){function i(e){return function(t){return null==t?void 0:t[e]}}function a(e){return null!=e&&u(_(e))}function s(e,t){return e="number"==typeof e||g.test(e)?+e:-1,t=null==t?b:t,e>-1&&e%1==0&&t>e}function u(e){return"number"==typeof e&&e>-1&&e%1==0&&b>=e}function l(e){for(var t=f(e),r=t.length,n=r&&e.length,o=!!n&&u(n)&&(d(e)||p(e)),i=-1,a=[];++i<r;){var l=t[i];(o&&s(l,n)||v.call(e,l))&&a.push(l)}return a}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function f(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&u(t)&&(d(e)||p(e))&&t||0;for(var r=e.constructor,n=-1,o="function"==typeof r&&r.prototype===e,i=Array(t),a=t>0;++n<t;)i[n]=n+"";for(var l in e)a&&s(l,t)||"constructor"==l&&(o||!v.call(e,l))||i.push(l);return i}var h=r(n),p=r(o),d=r(1),g=/^\d+$/,y=Object.prototype,v=y.hasOwnProperty,m=h(Object,"keys"),b=9007199254740991,_=i("length"),w=m?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&a(e)?l(e):c(e)?m(e):[]}:l;e.exports=w},function(e,t,r,n){function o(e){return!!e&&"object"==typeof e}function i(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function a(e,t,r,n){n||(n=[]);for(var s=-1,l=e.length;++s<l;){var h=e[s];o(h)&&u(h)&&(r||f(h)||c(h))?t?a(h,t,r,n):i(n,h):r||(n[n.length]=h)}return n}function s(e){return function(t){return null==t?void 0:t[e]}}function u(e){return null!=e&&l(p(e))}function l(e){return"number"==typeof e&&e>-1&&e%1==0&&h>=e}var c=r(n),f=r(1),h=9007199254740991,p=s("length");e.exports=a},function(e,t,r,n){function o(e,t){return e="number"==typeof e||c.test(e)?+e:-1,t=null==t?p:t,e>-1&&e%1==0&&t>e}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&p>=e}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){if(null==e)return[];a(e)||(e=Object(e));var t=e.length;t=t&&i(t)&&(l(e)||u(e))&&t||0;for(var r=e.constructor,n=-1,s="function"==typeof r&&r.prototype===e,c=Array(t),f=t>0;++n<t;)c[n]=n+"";for(var p in e)f&&o(p,t)||"constructor"==p&&(s||!h.call(e,p))||c.push(p);return c}var u=r(n),l=r(1),c=/^\d+$/,f=Object.prototype,h=f.hasOwnProperty,p=9007199254740991;e.exports=s},function(e,t,r,n,o){function i(e,t){return s(e,t,u)}function a(e,t){var r={};return i(e,function(e,n,o){t(e,n,o)&&(r[n]=e)}),r}var s=r(n),u=r(o);e.exports=a}]))});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment