-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmediaflow.browser.min.js
3 lines (3 loc) · 79.8 KB
/
mediaflow.browser.min.js
1
2
3
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.Mediaflow=e()}}(function(){var e;return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var f=n[s]={exports:{}};e[s][0].call(f.exports,function(t){var n=e[s][1][t];return i(n?n:t)},f,f.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t){e("native-promise-only");var n=e("querystring"),r=e("./src/getJSON"),i=e("./src/compactObject"),o=e("./src/signature"),s=function(e){if("string"!=typeof e)throw new Error("Mediaflow requires a hostname argument");this.host=e,this.username=null,this.key=null};s.prototype.url=function(e,t){var r={host:this.host,port:80,path:e,headers:{}},s=n.stringify(i(t));if(s&&(r.path+="?"+s),this.username){var a=o(t,this.key);r.headers["X-Keymedia-Username"]=this.username,r.headers["X-Keymedia-Signature"]=a}return r},s.prototype.auth=function(e,t){return this.username=e,this.key=t,this},s.prototype.media=function(e,t){r(this.url("/media/"+e+".json"),function(e,n){t(e,n?n.media:e)})},s.prototype.search=function(e,t){var n={q:e};r(this.url("/media.json",n),t)},t.exports=s},{"./src/compactObject":3,"./src/getJSON":4,"./src/signature":5,"native-promise-only":2,querystring:25}],2:[function(t,n){(function(t){!function(t,r,i){r[t]=r[t]||i(),"undefined"!=typeof n&&n.exports?n.exports=r[t]:"function"==typeof e&&e.amd&&e(function(){return r[t]})}("Promise","undefined"!=typeof t?t:this,function(){"use strict";function e(){function e(e,t){this.fn=e,this.self=t,this.next=void 0}var t,n,r;return{add:function(i,o){r=new e(i,o),n?n.next=r:t=r,n=r,r=void 0},drain:function(){var e=t;for(t=n=d=null;e;)e.fn.call(e.self),e=e.next}}}function t(e,t){g?(g=!1,e.call(t)):(p.add(e,t),d||(d=v(p.drain)))}function n(e){var t,n=typeof e;return null===e||"object"!==n&&"function"!==n||(t=e.then),"function"==typeof t?t:!1}function r(){var e,t,n,r=this;if(0===r.state)return g=!1;for(n=0;n<r.chain.length;n++)t=r.chain[n],e=1===r.state?t.success:t.failure,i(r,e,t);r.chain.length=0}function i(e,t,r){var i,o;try{t===!1?(g=!0,r.reject(e.msg)):(i=t===!0?e.msg:t.call(void 0,e.msg),g=!0,i===r.promise?r.reject(TypeError("Promise-chain cycle")):(o=n(i))?o.call(i,r.resolve,r.reject):r.resolve(i))}catch(s){g=!0,r.reject(s)}}function o(e){if(e.def){if(e.triggered)return g=!1;e.triggered=!0,e=e.def}return 0!==e.state?g=!1:e}function s(e){var i,u,f=o(this);if(f!==!1)try{(i=n(e))?(u=new h(f),i.call(e,function(){s.apply(u,arguments)},function(){a.apply(u,arguments)})):(f.msg=e,f.state=1,t(r,f))}catch(c){a.call(u||new h(f),c)}}function a(e){var n=o(this);n!==!1&&(n.msg=e,n.state=2,t(r,n))}function u(e,t){g=!0,e(t)}function f(e,t,n,r){for(var i=0;i<t.length;i++)!function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)}(i)}function h(e){this.def=e,this.triggered=!1}function c(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function l(e){if("function"!=typeof e)throw TypeError("Not a function");var n=this,i=new c(n);n.then=function(e,n){var o={success:"function"==typeof e?e:!0,failure:"function"==typeof n?n:!1};return o.promise=new this.constructor(function(e,t){if("function"!=typeof(e&&t))throw TypeError("Not a function");o.resolve=e,o.reject=t}),i.chain.push(o),t(r,i),o.promise},n["catch"]=function(e){return i.promise.then.call(this,void 0,e)};try{e.call(void 0,function(e){return i.triggered?void(g=!1):(i.triggered=!0,void s.call(i,e))},function(e){return i.triggered?void(g=!1):(i.triggered=!0,void a.call(i,e))})}catch(o){a.call(i,o)}}var d,p,g=!1,v="undefined"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout,m=Object.defineProperty?function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:r!==!1})}:function(e,t,n){return e[t]=n,e};return p=e(),m(l,"prototype",m({},"constructor",l),!1),m(l,"resolve",function(e){var n=this;return"object"==typeof e&&e instanceof n?e:new n(function(n,r){if("function"!=typeof(n&&r))throw TypeError("Not a function");t(function(){u(n,e)})})}),m(l,"reject",function(e){return new this(function(t,n){if("function"!=typeof(t&&n))throw TypeError("Not a function");n(e)})}),m(l,"all",function(e){var t=this;return Array.isArray(e)?0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof(n&&r))throw TypeError("Not a function");var i=e.length,o=Array(i),s=0;f(t,e,function(e,t){o[e]=t,++s===i&&u(n,o)},r)}):t.reject(TypeError("Not an array"))}),m(l,"race",function(e){var t=this;return Array.isArray(e)?new t(function(n,r){if("function"!=typeof(n&&r))throw TypeError("Not a function");f(t,e,function(e,t){u(n,t)},r)}):t.reject(TypeError("Not an array"))}),l})}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(e,t){t.exports=function(e){var t={};for(var n in e)""!==e[n]&&null!==e[n]&&"undefined"==typeof v&&(t[n]=e[n]);return t}},{}],4:[function(e,t){var n=e("http"),r=function(){};t.exports=function(e,t){return"undefined"==typeof e.withCredentials&&(e.withCredentials=!1),n.get(e,function(e){if(200!==e.statusCode)return t(n.STATUS_CODES[""+e.statusCode]);var r="";e.on("data",function(e){r+=e.toString()}),e.on("end",function(){t(null,JSON.parse(r))})}).on("error",function(e){t(e),t=r})}},{http:16}],5:[function(e,t){var n=e("crypto");t.exports=function(e,t){message=Object.keys(e).filter(function(t){return"@"!==e[t]&&"object"!=typeof e[t]}).map(function(t){return t+e[t]}).join("");var r=n.createHmac("sha1",t);return r.setEncoding("hex"),r.write(message),r.end(),r.read()}},{crypto:10}],6:[function(e,t,n){function r(e,t,n){if(!(this instanceof r))return new r(e,t,n);var i=typeof e;if("base64"===t&&"string"===i)for(e=C(e);e.length%4!==0;)e+="=";var o;if("number"===i)o=B(e);else if("string"===i)o=r.byteLength(e,t);else{if("object"!==i)throw new Error("First argument needs to be a number, array or string.");o=B(e.length)}var s;r._useTypedArrays?s=r._augment(new Uint8Array(o)):(s=this,s.length=o,s._isBuffer=!0);var a;if(r._useTypedArrays&&"number"==typeof e.byteLength)s._set(e);else if(T(e))if(r.isBuffer(e))for(a=0;o>a;a++)s[a]=e.readUInt8(a);else for(a=0;o>a;a++)s[a]=(e[a]%256+256)%256;else if("string"===i)s.write(e,0,t);else if("number"===i&&!r._useTypedArrays&&!n)for(a=0;o>a;a++)s[a]=0;return s}function i(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;F(o%2===0,"Invalid hex string"),r>o/2&&(r=o/2);for(var s=0;r>s;s++){var a=parseInt(t.substr(2*s,2),16);F(!isNaN(a),"Invalid hex string"),e[n+s]=a}return s}function o(e,t,n,r){var i=q(O(t),e,n,r);return i}function s(e,t,n,r){var i=q(R(t),e,n,r);return i}function a(e,t,n,r){return s(e,t,n,r)}function u(e,t,n,r){var i=q(N(t),e,n,r);return i}function f(e,t,n,r){var i=q(U(t),e,n,r);return i}function h(e,t,n){return W.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function c(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var o=t;n>o;o++)e[o]<=127?(r+=D(i)+String.fromCharCode(e[o]),i=""):i+="%"+e[o].toString(16);return r+D(i)}function l(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function d(e,t,n){return l(e,t,n)}function p(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=M(e[o]);return i}function g(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function v(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(t+1<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return n?(o=e[t],i>t+1&&(o|=e[t+1]<<8)):(o=e[t]<<8,i>t+1&&(o|=e[t+1])),o}}function m(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(t+3<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o;return n?(i>t+2&&(o=e[t+2]<<16),i>t+1&&(o|=e[t+1]<<8),o|=e[t],i>t+3&&(o+=e[t+3]<<24>>>0)):(i>t+1&&(o=e[t+1]<<16),i>t+2&&(o|=e[t+2]<<8),i>t+3&&(o|=e[t+3]),o+=e[t]<<24>>>0),o}}function y(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(t+1<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=v(e,t,n,!0),s=32768&o;return s?-1*(65535-o+1):o}}function b(e,t,n,r){r||(F("boolean"==typeof n,"missing or invalid endian"),F(void 0!==t&&null!==t,"missing offset"),F(t+3<e.length,"Trying to read beyond buffer length"));var i=e.length;if(!(t>=i)){var o=m(e,t,n,!0),s=2147483648&o;return s?-1*(4294967295-o+1):o}}function w(e,t,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(t+3<e.length,"Trying to read beyond buffer length")),J.read(e,t,n,23,4)}function _(e,t,n,r){return r||(F("boolean"==typeof n,"missing or invalid endian"),F(t+7<e.length,"Trying to read beyond buffer length")),J.read(e,t,n,52,8)}function E(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(n+1<e.length,"trying to write beyond buffer length"),z(t,65535));var o=e.length;if(!(n>=o)){for(var s=0,a=Math.min(o-n,2);a>s;s++)e[n+s]=(t&255<<8*(r?s:1-s))>>>8*(r?s:1-s);return n+2}}function x(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(n+3<e.length,"trying to write beyond buffer length"),z(t,4294967295));var o=e.length;if(!(n>=o)){for(var s=0,a=Math.min(o-n,4);a>s;s++)e[n+s]=t>>>8*(r?s:3-s)&255;return n+4}}function j(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(n+1<e.length,"Trying to write beyond buffer length"),H(t,32767,-32768));var o=e.length;if(!(n>=o))return t>=0?E(e,t,n,r,i):E(e,65535+t+1,n,r,i),n+2}function S(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(n+3<e.length,"Trying to write beyond buffer length"),H(t,2147483647,-2147483648));var o=e.length;if(!(n>=o))return t>=0?x(e,t,n,r,i):x(e,4294967295+t+1,n,r,i),n+4}function L(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(n+3<e.length,"Trying to write beyond buffer length"),P(t,3.4028234663852886e38,-3.4028234663852886e38));var o=e.length;if(!(n>=o))return J.write(e,t,n,r,23,4),n+4}function A(e,t,n,r,i){i||(F(void 0!==t&&null!==t,"missing value"),F("boolean"==typeof r,"missing or invalid endian"),F(void 0!==n&&null!==n,"missing offset"),F(n+7<e.length,"Trying to write beyond buffer length"),P(t,1.7976931348623157e308,-1.7976931348623157e308));var o=e.length;if(!(n>=o))return J.write(e,t,n,r,52,8),n+8}function C(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function I(e,t,n){return"number"!=typeof e?n:(e=~~e,e>=t?t:e>=0?e:(e+=t,e>=0?e:0))}function B(e){return e=~~Math.ceil(+e),0>e?0:e}function k(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function T(e){return k(e)||r.isBuffer(e)||e&&"object"==typeof e&&"number"==typeof e.length}function M(e){return 16>e?"0"+e.toString(16):e.toString(16)}function O(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);if(127>=r)t.push(r);else{var i=n;r>=55296&&57343>=r&&n++;for(var o=encodeURIComponent(e.slice(i,n+1)).substr(1).split("%"),s=0;s<o.length;s++)t.push(parseInt(o[s],16))}}return t}function R(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function U(e){for(var t,n,r,i=[],o=0;o<e.length;o++)t=e.charCodeAt(o),n=t>>8,r=t%256,i.push(r),i.push(n);return i}function N(e){return W.toByteArray(e)}function q(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function D(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}function z(e,t){F("number"==typeof e,"cannot write a non-number as a number"),F(e>=0,"specified a negative value for writing an unsigned value"),F(t>=e,"value is larger than maximum value for type"),F(Math.floor(e)===e,"value has a fractional component")}function H(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(t>=e,"value larger than maximum allowed value"),F(e>=n,"value smaller than minimum allowed value"),F(Math.floor(e)===e,"value has a fractional component")}function P(e,t,n){F("number"==typeof e,"cannot write a non-number as a number"),F(t>=e,"value larger than maximum allowed value"),F(e>=n,"value smaller than minimum allowed value")}function F(e,t){if(!e)throw new Error(t||"Failed assertion")}var W=e("base64-js"),J=e("ieee754");n.Buffer=r,n.SlowBuffer=r,n.INSPECT_MAX_BYTES=50,r.poolSize=8192,r._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(n){return!1}}(),r.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}},r.isBuffer=function(e){return!(null===e||void 0===e||!e._isBuffer)},r.byteLength=function(e,t){var n;switch(e=e.toString(),t||"utf8"){case"hex":n=e.length/2;break;case"utf8":case"utf-8":n=O(e).length;break;case"ascii":case"binary":case"raw":n=e.length;break;case"base64":n=N(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*e.length;break;default:throw new Error("Unknown encoding")}return n},r.concat=function(e,t){if(F(k(e),"Usage: Buffer.concat(list[, length])"),0===e.length)return new r(0);if(1===e.length)return e[0];var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var i=new r(t),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},r.compare=function(e,t){F(r.isBuffer(e)&&r.isBuffer(t),"Arguments must be Buffers");for(var n=e.length,i=t.length,o=0,s=Math.min(n,i);s>o&&e[o]===t[o];o++);return o!==s&&(n=e[o],i=t[o]),i>n?-1:n>i?1:0},r.prototype.write=function(e,t,n,r){if(isFinite(t))isFinite(n)||(r=n,n=void 0);else{var h=r;r=t,t=n,n=h}t=Number(t)||0;var c=this.length-t;n?(n=Number(n),n>c&&(n=c)):n=c,r=String(r||"utf8").toLowerCase();var l;switch(r){case"hex":l=i(this,e,t,n);break;case"utf8":case"utf-8":l=o(this,e,t,n);break;case"ascii":l=s(this,e,t,n);break;case"binary":l=a(this,e,t,n);break;case"base64":l=u(this,e,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":l=f(this,e,t,n);break;default:throw new Error("Unknown encoding")}return l},r.prototype.toString=function(e,t,n){var r=this;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,n=void 0===n?r.length:Number(n),n===t)return"";var i;switch(e){case"hex":i=p(r,t,n);break;case"utf8":case"utf-8":i=c(r,t,n);break;case"ascii":i=l(r,t,n);break;case"binary":i=d(r,t,n);break;case"base64":i=h(r,t,n);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=g(r,t,n);break;default:throw new Error("Unknown encoding")}return i},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.equals=function(e){return F(r.isBuffer(e),"Argument must be a Buffer"),0===r.compare(this,e)},r.prototype.compare=function(e){return F(r.isBuffer(e),"Argument must be a Buffer"),r.compare(this,e)},r.prototype.copy=function(e,t,n,i){var o=this;if(n||(n=0),i||0===i||(i=this.length),t||(t=0),i!==n&&0!==e.length&&0!==o.length){F(i>=n,"sourceEnd < sourceStart"),F(t>=0&&t<e.length,"targetStart out of bounds"),F(n>=0&&n<o.length,"sourceStart out of bounds"),F(i>=0&&i<=o.length,"sourceEnd out of bounds"),i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var s=i-n;if(100>s||!r._useTypedArrays)for(var a=0;s>a;a++)e[a+t]=this[a+n];else e._set(this.subarray(n,n+s),t)}},r.prototype.slice=function(e,t){var n=this.length;if(e=I(e,n,0),t=I(t,n,n),r._useTypedArrays)return r._augment(this.subarray(e,t));for(var i=t-e,o=new r(i,void 0,!0),s=0;i>s;s++)o[s]=this[s+e];return o},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.readUInt8=function(e,t){return t||(F(void 0!==e&&null!==e,"missing offset"),F(e<this.length,"Trying to read beyond buffer length")),e>=this.length?void 0:this[e]},r.prototype.readUInt16LE=function(e,t){return v(this,e,!0,t)},r.prototype.readUInt16BE=function(e,t){return v(this,e,!1,t)},r.prototype.readUInt32LE=function(e,t){return m(this,e,!0,t)},r.prototype.readUInt32BE=function(e,t){return m(this,e,!1,t)},r.prototype.readInt8=function(e,t){if(t||(F(void 0!==e&&null!==e,"missing offset"),F(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length)){var n=128&this[e];return n?-1*(255-this[e]+1):this[e]}},r.prototype.readInt16LE=function(e,t){return y(this,e,!0,t)},r.prototype.readInt16BE=function(e,t){return y(this,e,!1,t)},r.prototype.readInt32LE=function(e,t){return b(this,e,!0,t)},r.prototype.readInt32BE=function(e,t){return b(this,e,!1,t)},r.prototype.readFloatLE=function(e,t){return w(this,e,!0,t)},r.prototype.readFloatBE=function(e,t){return w(this,e,!1,t)},r.prototype.readDoubleLE=function(e,t){return _(this,e,!0,t)},r.prototype.readDoubleBE=function(e,t){return _(this,e,!1,t)},r.prototype.writeUInt8=function(e,t,n){return n||(F(void 0!==e&&null!==e,"missing value"),F(void 0!==t&&null!==t,"missing offset"),F(t<this.length,"trying to write beyond buffer length"),z(e,255)),t>=this.length?void 0:(this[t]=e,t+1)},r.prototype.writeUInt16LE=function(e,t,n){return E(this,e,t,!0,n)},r.prototype.writeUInt16BE=function(e,t,n){return E(this,e,t,!1,n)},r.prototype.writeUInt32LE=function(e,t,n){return x(this,e,t,!0,n)},r.prototype.writeUInt32BE=function(e,t,n){return x(this,e,t,!1,n)},r.prototype.writeInt8=function(e,t,n){return n||(F(void 0!==e&&null!==e,"missing value"),F(void 0!==t&&null!==t,"missing offset"),F(t<this.length,"Trying to write beyond buffer length"),H(e,127,-128)),t>=this.length?void 0:(e>=0?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n),t+1)},r.prototype.writeInt16LE=function(e,t,n){return j(this,e,t,!0,n)},r.prototype.writeInt16BE=function(e,t,n){return j(this,e,t,!1,n)},r.prototype.writeInt32LE=function(e,t,n){return S(this,e,t,!0,n)},r.prototype.writeInt32BE=function(e,t,n){return S(this,e,t,!1,n)},r.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return A(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return A(this,e,t,!1,n)},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),F(n>=t,"end < start"),n!==t&&0!==this.length){F(t>=0&&t<this.length,"start out of bounds"),F(n>=0&&n<=this.length,"end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=O(e.toString()),o=i.length;for(r=t;n>r;r++)this[r]=i[r%o]}return this}},r.prototype.inspect=function(){for(var e=[],t=this.length,r=0;t>r;r++)if(e[r]=M(this[r]),r===n.INSPECT_MAX_BYTES){e[r+1]="...";break}return"<Buffer "+e.join(" ")+">"},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r._useTypedArrays)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var X=r.prototype;r._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=X.get,e.set=X.set,e.write=X.write,e.toString=X.toString,e.toLocaleString=X.toString,e.toJSON=X.toJSON,e.equals=X.equals,e.compare=X.compare,e.copy=X.copy,e.slice=X.slice,e.readUInt8=X.readUInt8,e.readUInt16LE=X.readUInt16LE,e.readUInt16BE=X.readUInt16BE,e.readUInt32LE=X.readUInt32LE,e.readUInt32BE=X.readUInt32BE,e.readInt8=X.readInt8,e.readInt16LE=X.readInt16LE,e.readInt16BE=X.readInt16BE,e.readInt32LE=X.readInt32LE,e.readInt32BE=X.readInt32BE,e.readFloatLE=X.readFloatLE,e.readFloatBE=X.readFloatBE,e.readDoubleLE=X.readDoubleLE,e.readDoubleBE=X.readDoubleBE,e.writeUInt8=X.writeUInt8,e.writeUInt16LE=X.writeUInt16LE,e.writeUInt16BE=X.writeUInt16BE,e.writeUInt32LE=X.writeUInt32LE,e.writeUInt32BE=X.writeUInt32BE,e.writeInt8=X.writeInt8,e.writeInt16LE=X.writeInt16LE,e.writeInt16BE=X.writeInt16BE,e.writeInt32LE=X.writeInt32LE,e.writeInt32BE=X.writeInt32BE,e.writeFloatLE=X.writeFloatLE,e.writeFloatBE=X.writeFloatBE,e.writeDoubleLE=X.writeDoubleLE,e.writeDoubleBE=X.writeDoubleBE,e.fill=X.fill,e.inspect=X.inspect,e.toArrayBuffer=X.toArrayBuffer,e}},{"base64-js":7,ieee754:8}],7:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===s?62:t===a?63:u>t?-1:u+10>t?t-u+26+26:h+26>t?t-h:f+26>t?t-f+26:void 0}function n(e){function n(e){f[c++]=e}var r,i,s,a,u,f;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=e.length;u="="===e.charAt(h-2)?2:"="===e.charAt(h-1)?1:0,f=new o(3*e.length/4-u),s=u>0?e.length-4:e.length;var c=0;for(r=0,i=0;s>r;r+=4,i+=3)a=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&a)):1===u&&(a=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(a>>8&255),n(255&a)),f}function i(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,s,a=e.length%3,u="";for(i=0,s=e.length-a;s>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],u+=n(o);switch(a){case 1:o=e[e.length-1],u+=t(o>>2),u+=t(o<<4&63),u+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],u+=t(o>>10),u+=t(o>>4&63),u+=t(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),f="a".charCodeAt(0),h="A".charCodeAt(0);e.toByteArray=n,e.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],8:[function(e,t,n){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,f=u>>1,h=-7,c=n?i-1:0,l=n?-1:1,d=e[t+c];for(c+=l,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+e[t+c],c+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+c],c+=l,h-=8);if(0===o)o=1-f;else{if(o===u)return s?0/0:1/0*(d?-1:1);s+=Math.pow(2,r),o-=f}return(d?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,u,f=8*o-i-1,h=(1<<f)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||1/0===t?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+c>=1?l/u:l*Math.pow(2,1-c),t*u>=2&&(s++,u/=2),s+c>=h?(a=0,s=h):s+c>=1?(a=(t*u-1)*Math.pow(2,i),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;e[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;e[n+d]=255&s,d+=p,s/=256,f-=8);e[n+d-p]|=128*g}},{}],9:[function(e,t){function n(e,t){if(e.length%s!==0){var n=e.length+(s-e.length%s);e=o.concat([e,a],n)}for(var r=[],i=t?e.readInt32BE:e.readInt32LE,u=0;u<e.length;u+=s)r.push(i.call(e,u));return r}function r(e,t,n){for(var r=new o(t),i=n?r.writeInt32BE:r.writeInt32LE,s=0;s<e.length;s++)i.call(r,e[s],4*s,!0);return r}function i(e,t,i,s){o.isBuffer(e)||(e=new o(e));var a=t(n(e,s),e.length*u);return r(a,i,s)}var o=e("buffer").Buffer,s=4,a=new o(s);a.fill(0);var u=8;t.exports={hash:i}},{buffer:6}],10:[function(e,t,n){function r(e,t,n){a.isBuffer(t)||(t=new a(t)),a.isBuffer(n)||(n=new a(n)),t.length>d?t=e(t):t.length<d&&(t=a.concat([t,p],d));for(var r=new a(d),i=new a(d),o=0;d>o;o++)r[o]=54^t[o],i[o]=92^t[o];var s=e(a.concat([r,n]));return e(a.concat([i,s]))}function i(e,t){e=e||"sha1";var n=l[e],i=[],s=0;return n||o("algorithm:",e,"is not yet supported"),{update:function(e){return a.isBuffer(e)||(e=new a(e)),i.push(e),s+=e.length,this},digest:function(e){var o=a.concat(i),s=t?r(n,t,o):n(o);return i=null,e?s.toString(e):s}}}function o(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function s(e,t){for(var n in e)t(e[n],n)}var a=e("buffer").Buffer,u=e("./sha"),f=e("./sha256"),h=e("./rng"),c=e("./md5"),l={sha1:u,sha256:f,md5:c},d=64,p=new a(d);p.fill(0),n.createHash=function(e){return i(e)},n.createHmac=function(e,t){return i(e,t)},n.randomBytes=function(e,t){if(!t||!t.call)return new a(h(e));try{t.call(this,void 0,new a(h(e)))}catch(n){t(n)}},s(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(e){n[e]=function(){o("sorry,",e,"is not implemented yet")}})},{"./md5":11,"./rng":12,"./sha":13,"./sha256":14,buffer:6}],11:[function(e,t){function n(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var n=1732584193,r=-271733879,f=-1732584194,h=271733878,c=0;c<e.length;c+=16){var l=n,d=r,p=f,g=h;n=i(n,r,f,h,e[c+0],7,-680876936),h=i(h,n,r,f,e[c+1],12,-389564586),f=i(f,h,n,r,e[c+2],17,606105819),r=i(r,f,h,n,e[c+3],22,-1044525330),n=i(n,r,f,h,e[c+4],7,-176418897),h=i(h,n,r,f,e[c+5],12,1200080426),f=i(f,h,n,r,e[c+6],17,-1473231341),r=i(r,f,h,n,e[c+7],22,-45705983),n=i(n,r,f,h,e[c+8],7,1770035416),h=i(h,n,r,f,e[c+9],12,-1958414417),f=i(f,h,n,r,e[c+10],17,-42063),r=i(r,f,h,n,e[c+11],22,-1990404162),n=i(n,r,f,h,e[c+12],7,1804603682),h=i(h,n,r,f,e[c+13],12,-40341101),f=i(f,h,n,r,e[c+14],17,-1502002290),r=i(r,f,h,n,e[c+15],22,1236535329),n=o(n,r,f,h,e[c+1],5,-165796510),h=o(h,n,r,f,e[c+6],9,-1069501632),f=o(f,h,n,r,e[c+11],14,643717713),r=o(r,f,h,n,e[c+0],20,-373897302),n=o(n,r,f,h,e[c+5],5,-701558691),h=o(h,n,r,f,e[c+10],9,38016083),f=o(f,h,n,r,e[c+15],14,-660478335),r=o(r,f,h,n,e[c+4],20,-405537848),n=o(n,r,f,h,e[c+9],5,568446438),h=o(h,n,r,f,e[c+14],9,-1019803690),f=o(f,h,n,r,e[c+3],14,-187363961),r=o(r,f,h,n,e[c+8],20,1163531501),n=o(n,r,f,h,e[c+13],5,-1444681467),h=o(h,n,r,f,e[c+2],9,-51403784),f=o(f,h,n,r,e[c+7],14,1735328473),r=o(r,f,h,n,e[c+12],20,-1926607734),n=s(n,r,f,h,e[c+5],4,-378558),h=s(h,n,r,f,e[c+8],11,-2022574463),f=s(f,h,n,r,e[c+11],16,1839030562),r=s(r,f,h,n,e[c+14],23,-35309556),n=s(n,r,f,h,e[c+1],4,-1530992060),h=s(h,n,r,f,e[c+4],11,1272893353),f=s(f,h,n,r,e[c+7],16,-155497632),r=s(r,f,h,n,e[c+10],23,-1094730640),n=s(n,r,f,h,e[c+13],4,681279174),h=s(h,n,r,f,e[c+0],11,-358537222),f=s(f,h,n,r,e[c+3],16,-722521979),r=s(r,f,h,n,e[c+6],23,76029189),n=s(n,r,f,h,e[c+9],4,-640364487),h=s(h,n,r,f,e[c+12],11,-421815835),f=s(f,h,n,r,e[c+15],16,530742520),r=s(r,f,h,n,e[c+2],23,-995338651),n=a(n,r,f,h,e[c+0],6,-198630844),h=a(h,n,r,f,e[c+7],10,1126891415),f=a(f,h,n,r,e[c+14],15,-1416354905),r=a(r,f,h,n,e[c+5],21,-57434055),n=a(n,r,f,h,e[c+12],6,1700485571),h=a(h,n,r,f,e[c+3],10,-1894986606),f=a(f,h,n,r,e[c+10],15,-1051523),r=a(r,f,h,n,e[c+1],21,-2054922799),n=a(n,r,f,h,e[c+8],6,1873313359),h=a(h,n,r,f,e[c+15],10,-30611744),f=a(f,h,n,r,e[c+6],15,-1560198380),r=a(r,f,h,n,e[c+13],21,1309151649),n=a(n,r,f,h,e[c+4],6,-145523070),h=a(h,n,r,f,e[c+11],10,-1120210379),f=a(f,h,n,r,e[c+2],15,718787259),r=a(r,f,h,n,e[c+9],21,-343485551),n=u(n,l),r=u(r,d),f=u(f,p),h=u(h,g)}return Array(n,r,f,h)}function r(e,t,n,r,i,o){return u(f(u(u(t,e),u(r,o)),i),n)}function i(e,t,n,i,o,s,a){return r(t&n|~t&i,e,t,o,s,a)}function o(e,t,n,i,o,s,a){return r(t&i|n&~i,e,t,o,s,a)}function s(e,t,n,i,o,s,a){return r(t^n^i,e,t,o,s,a)}function a(e,t,n,i,o,s,a){return r(n^(t|~i),e,t,o,s,a)}function u(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function f(e,t){return e<<t|e>>>32-t}var h=e("./helpers");t.exports=function(e){return h.hash(e,n,16)}},{"./helpers":9}],12:[function(e,t){!function(){var e,n,r=this;e=function(e){for(var t,t,n=new Array(e),r=0;e>r;r++)0==(3&r)&&(t=4294967296*Math.random()),n[r]=t>>>((3&r)<<3)&255;return n},r.crypto&&crypto.getRandomValues&&(n=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t}),t.exports=n||e}()},{}],13:[function(e,t){function n(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var n=Array(80),a=1732584193,u=-271733879,f=-1732584194,h=271733878,c=-1009589776,l=0;l<e.length;l+=16){for(var d=a,p=u,g=f,v=h,m=c,y=0;80>y;y++){n[y]=16>y?e[l+y]:s(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=o(o(s(a,5),r(y,u,f,h)),o(o(c,n[y]),i(y)));c=h,h=f,f=s(u,30),u=a,a=b}a=o(a,d),u=o(u,p),f=o(f,g),h=o(h,v),c=o(c,m)}return Array(a,u,f,h,c)}function r(e,t,n,r){return 20>e?t&n|~t&r:40>e?t^n^r:60>e?t&n|t&r|n&r:t^n^r}function i(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function o(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n}function s(e,t){return e<<t|e>>>32-t}var a=e("./helpers");t.exports=function(e){return a.hash(e,n,20,!0)}},{"./helpers":9}],14:[function(e,t){var n=e("./helpers"),r=function(e,t){var n=(65535&e)+(65535&t),r=(e>>16)+(t>>16)+(n>>16);return r<<16|65535&n},i=function(e,t){return e>>>t|e<<32-t},o=function(e,t){return e>>>t},s=function(e,t,n){return e&t^~e&n},a=function(e,t,n){return e&t^e&n^t&n},u=function(e){return i(e,2)^i(e,13)^i(e,22)},f=function(e){return i(e,6)^i(e,11)^i(e,25)},h=function(e){return i(e,7)^i(e,18)^o(e,3)},c=function(e){return i(e,17)^i(e,19)^o(e,10)},l=function(e,t){var n,i,o,l,d,p,g,v,m,y,b,w,_=new Array(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),E=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;for(var m=0;m<e.length;m+=16){n=E[0],i=E[1],o=E[2],l=E[3],d=E[4],p=E[5],g=E[6],v=E[7];for(var y=0;64>y;y++)x[y]=16>y?e[y+m]:r(r(r(c(x[y-2]),x[y-7]),h(x[y-15])),x[y-16]),b=r(r(r(r(v,f(d)),s(d,p,g)),_[y]),x[y]),w=r(u(n),a(n,i,o)),v=g,g=p,p=d,d=r(l,b),l=o,o=i,i=n,n=r(b,w);E[0]=r(n,E[0]),E[1]=r(i,E[1]),E[2]=r(o,E[2]),E[3]=r(l,E[3]),E[4]=r(d,E[4]),E[5]=r(p,E[5]),E[6]=r(g,E[6]),E[7]=r(v,E[7])}return E};t.exports=function(e){return n.hash(e,l,32,!0)}},{"./helpers":9}],15:[function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,a,u,f;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length))throw t=arguments[1],t instanceof Error?t:TypeError('Uncaught, unspecified "error" event.');if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(i=arguments.length,a=new Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];
n.apply(this,a)}else if(o(n)){for(i=arguments.length,a=new Array(i-1),u=1;i>u;u++)a[u-1]=arguments[u];for(f=n.slice(),i=f.length,u=0;i>u;u++)f[u].apply(this,a)}return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned){var i;i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(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())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],s=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(0>i)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;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(n=this._events[e],r(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?r(e._events[t])?1:e._events[t].length:0}},{}],16:[function(e,t){var n=t.exports,r=(e("events").EventEmitter,e("./lib/request")),i=e("url");n.request=function(e,t){"string"==typeof e&&(e=i.parse(e)),e||(e={}),e.host||e.port||(e.port=parseInt(window.location.port,10)),!e.host&&e.hostname&&(e.host=e.hostname),e.scheme||(e.scheme=window.location.protocol.split(":")[0]),e.host||(e.host=window.location.hostname||window.location.host),/:/.test(e.host)&&(e.port||(e.port=e.host.split(":")[1]),e.host=e.host.split(":")[0]),e.port||(e.port="https"==e.scheme?443:80);var n=new r(new o,e);return t&&n.on("response",t),n},n.get=function(e,t){e.method="GET";var r=n.request(e,t);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4;var o=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{var n=new window.ActiveXObject(e[t]);return function(){if(n){var r=n;return n=null,r}return new window.ActiveXObject(e[t])}}catch(r){}throw new Error("ajax not supported in this browser")}throw new Error("ajax not supported in this browser")}();n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{"./lib/request":17,events:15,url:40}],17:[function(e,t){var n=e("stream"),r=e("./response"),i=e("Base64"),o=e("inherits"),s=t.exports=function(e,t){var n=this;n.writable=!0,n.xhr=e,n.body=[],n.uri=(t.scheme||"http")+"://"+t.host+(t.port?":"+t.port:"")+(t.path||"/"),"undefined"==typeof t.withCredentials&&(t.withCredentials=!0);try{e.withCredentials=t.withCredentials}catch(o){}if(e.open(t.method||"GET",n.uri,!0),n._headers={},t.headers)for(var s=a(t.headers),u=0;u<s.length;u++){var f=s[u];if(n.isSafeRequestHeader(f)){var h=t.headers[f];n.setHeader(f,h)}}t.auth&&this.setHeader("Authorization","Basic "+i.btoa(t.auth));var c=new r;c.on("close",function(){n.emit("close")}),c.on("ready",function(){n.emit("response",c)}),e.onreadystatechange=function(){e.__aborted||c.handle(e)}};o(s,n),s.prototype.setHeader=function(e,t){this._headers[e.toLowerCase()]=t},s.prototype.getHeader=function(e){return this._headers[e.toLowerCase()]},s.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},s.prototype.write=function(e){this.body.push(e)},s.prototype.destroy=function(){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},s.prototype.end=function(e){void 0!==e&&this.body.push(e);for(var t=a(this._headers),n=0;n<t.length;n++){var r=t[n],i=this._headers[r];if(u(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(r,i[o]);else this.xhr.setRequestHeader(r,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(u(this.body[0])){for(var s=[],n=0;n<this.body.length;n++)s.push.apply(s,this.body[n]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){for(var f=0,n=0;n<this.body.length;n++)f+=this.body[n].length;for(var s=new this.body[0].constructor(f),h=0,n=0;n<this.body.length;n++)for(var c=this.body[n],o=0;o<c.length;o++)s[h++]=c[o];this.xhr.send(s)}else{for(var s="",n=0;n<this.body.length;n++)s+=this.body[n].toString();this.xhr.send(s)}},s.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],s.prototype.isSafeRequestHeader=function(e){return e?-1===f(s.unsafeHeaders,e.toLowerCase()):!1};var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},f=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}},{"./response":18,Base64:19,inherits:20,stream:39}],18:[function(e,t){function n(e){for(var t=e.getAllResponseHeaders().split(/\r?\n/),n={},r=0;r<t.length;r++){var i=t[r];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),u=o[2];void 0!==n[s]?a(n[s])?n[s].push(u):n[s]=[n[s],u]:n[s]=u}else n[i]=!0}}return n}var r=e("stream"),i=e("util"),o=t.exports=function(){this.offset=0,this.readable=!0};i.inherits(o,r);var s={streaming:!0,status2:!0};o.prototype.getResponse=function(e){var t=String(e.responseType).toLowerCase();return"blob"===t?e.responseBlob||e.response:"arraybuffer"===t?e.response:e.responseText},o.prototype.getHeader=function(e){return this.headers[e.toLowerCase()]},o.prototype.handle=function(e){if(2===e.readyState&&s.status2){try{this.statusCode=e.status,this.headers=n(e)}catch(t){s.status2=!1}s.status2&&this.emit("ready")}else if(s.streaming&&3===e.readyState){try{this.statusCode||(this.statusCode=e.status,this.headers=n(e),this.emit("ready"))}catch(t){}try{this._emitData(e)}catch(t){s.streaming=!1}}else 4===e.readyState&&(this.statusCode||(this.statusCode=e.status,this.emit("ready")),this._emitData(e),e.error?this.emit("error",this.getResponse(e)):this.emit("end"),this.emit("close"))},o.prototype._emitData=function(e){var t=this.getResponse(e);return t.toString().match(/ArrayBuffer/)?(this.emit("data",new Uint8Array(t,this.offset)),void(this.offset=t.byteLength)):void(t.length>this.offset&&(this.emit("data",t.slice(this.offset)),this.offset=t.length))};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{stream:39,util:42}],19:[function(e,t,n){!function(){function e(e){this.message=e}var t="undefined"!=typeof n?n:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",t.btoa||(t.btoa=function(t){for(var n,i,o=0,s=r,a="";t.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&n>>8-o%1*8)){if(i=t.charCodeAt(o+=.75),i>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");n=n<<8|i}return a}),t.atob||(t.atob=function(t){if(t=t.replace(/=+$/,""),t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,o=0,s=0,a="";i=t.charAt(s++);~i&&(n=o%4?64*n+i:i,o++%4)?a+=String.fromCharCode(255&n>>(-2*o&6)):0)i=r.indexOf(i);return a})}()},{}],20:[function(e,t){t.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],21:[function(e,t){function n(){}var r=t.exports={};r.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var n=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(e){n.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],22:[function(t,n,r){(function(t){!function(i){function o(e){throw RangeError(O[e])}function s(e,t){for(var n=e.length;n--;)e[n]=t(e[n]);return e}function a(e,t){return s(e.split(M),t).join(".")}function u(e){for(var t,n,r=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function f(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=N(e>>>10&1023|55296),e=56320|1023&e),t+=N(e)}).join("")}function h(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function c(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,n){var r=0;for(e=n?U(e/A):e>>1,e+=U(e/t);e>R*S>>1;r+=x)e=U(e/R);return U(r+(R+1)*e/(e+L))}function d(e){var t,n,r,i,s,a,u,c,d,p,g=[],v=e.length,m=0,y=I,b=C;for(n=e.lastIndexOf(B),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&o("not-basic"),g.push(e.charCodeAt(r));for(i=n>0?n+1:0;v>i;){for(s=m,a=1,u=x;i>=v&&o("invalid-input"),c=h(e.charCodeAt(i++)),(c>=x||c>U((E-m)/a))&&o("overflow"),m+=c*a,d=b>=u?j:u>=b+S?S:u-b,!(d>c);u+=x)p=x-d,a>U(E/p)&&o("overflow"),a*=p;t=g.length+1,b=l(m-s,t,0==s),U(m/t)>E-y&&o("overflow"),y+=U(m/t),m%=t,g.splice(m++,0,y)}return f(g)}function p(e){var t,n,r,i,s,a,f,h,d,p,g,v,m,y,b,w=[];for(e=u(e),v=e.length,t=I,n=0,s=C,a=0;v>a;++a)g=e[a],128>g&&w.push(N(g));for(r=i=w.length,i&&w.push(B);v>r;){for(f=E,a=0;v>a;++a)g=e[a],g>=t&&f>g&&(f=g);for(m=r+1,f-t>U((E-n)/m)&&o("overflow"),n+=(f-t)*m,t=f,a=0;v>a;++a)if(g=e[a],t>g&&++n>E&&o("overflow"),g==t){for(h=n,d=x;p=s>=d?j:d>=s+S?S:d-s,!(p>h);d+=x)b=h-p,y=x-p,w.push(N(c(p+b%y,0))),h=U(b/y);w.push(N(c(h,0))),s=l(n,m,r==i),n=0,++r}++n,++t}return w.join("")}function g(e){return a(e,function(e){return k.test(e)?d(e.slice(4).toLowerCase()):e})}function v(e){return a(e,function(e){return T.test(e)?"xn--"+p(e):e})}var m="object"==typeof r&&r,y="object"==typeof n&&n&&n.exports==m&&n,b="object"==typeof t&&t;(b.global===b||b.window===b)&&(i=b);var w,_,E=2147483647,x=36,j=1,S=26,L=38,A=700,C=72,I=128,B="-",k=/^xn--/,T=/[^ -~]/,M=/\x2E|\u3002|\uFF0E|\uFF61/g,O={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=x-j,U=Math.floor,N=String.fromCharCode;if(w={version:"1.2.4",ucs2:{decode:u,encode:f},decode:d,encode:p,toASCII:v,toUnicode:g},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return w});else if(m&&!m.nodeType)if(y)y.exports=w;else for(_ in w)w.hasOwnProperty(_)&&(m[_]=w[_]);else i.punycode=w}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],23:[function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,i,o){t=t||"&",i=i||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var f=e.length;u>0&&f>u&&(f=u);for(var h=0;f>h;++h){var c,l,d,p,g=e[h].replace(a,"%20"),v=g.indexOf(i);v>=0?(c=g.substr(0,v),l=g.substr(v+1)):(c=g,l=""),d=decodeURIComponent(c),p=decodeURIComponent(l),n(s,d)?r(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],24:[function(e,t){"use strict";function n(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,s,a){return t=t||"&",s=s||"=",null===e&&(e=void 0),"object"==typeof e?n(o(e),function(o){var a=encodeURIComponent(r(o))+s;return i(e[o])?n(e[o],function(e){return a+encodeURIComponent(r(e))}).join(t):a+encodeURIComponent(r(e[o]))}).join(t):a?encodeURIComponent(r(a))+s+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],25:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":23,"./encode":24}],26:[function(e,t){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":27}],27:[function(e,t){(function(n){function r(e){return this instanceof r?(u.call(this,e),f.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",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}function o(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}t.exports=r;var s=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t},a=e("core-util-is");a.inherits=e("inherits");var u=e("./_stream_readable"),f=e("./_stream_writable");a.inherits(r,u),o(s(f.prototype),function(e){r.prototype[e]||(r.prototype[e]=f.prototype[e])})}).call(this,e("lvYx0z"))},{"./_stream_readable":29,"./_stream_writable":31,"core-util-is":32,inherits:20,lvYx0z:21}],28:[function(e,t){function n(e){return this instanceof n?void r.call(this,e):new n(e)}t.exports=n;var r=e("./_stream_transform"),i=e("core-util-is");i.inherits=e("inherits"),i.inherits(n,r),n.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":30,"core-util-is":32,inherits:20}],29:[function(e,t){(function(n){function r(t){t=t||{};var n=t.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!t.objectMode,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(C||(C=e("string_decoder/").StringDecoder),this.decoder=new C(t.encoding),this.encoding=t.encoding)}function i(e){return this instanceof i?(this._readableState=new r(e,this),this.readable=!0,void L.call(this)):new i(e)}function o(e,t,n,r,i){var o=f(t,n);if(o)e.emit("error",o);else if(null===n||void 0===n)t.reading=!1,t.ended||h(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else!t.decoder||i||r||(n=t.decoder.write(n)),t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):(t.reading=!1,t.buffer.push(n)),t.needReadable&&c(e),d(e,t);else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function a(e){if(e>=I)e=I;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)||null===e?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=a(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function f(e,t){var n=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||n||(n=new TypeError("Invalid non-string/buffer chunk")),n}function h(e,t){if(t.decoder&&!t.ended){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.length>0?c(e):w(e)}function c(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,t.sync?n.nextTick(function(){l(e)}):l(e))}function l(e){e.emit("readable")}function d(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(function(){p(e,t)}))}function p(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;t.awaitDrain--,0===t.awaitDrain&&v(e)}}function v(e){function t(e){var t=e.write(n);!1===t&&r.awaitDrain++}var n,r=e._readableState;for(r.awaitDrain=0;r.pipesCount&&null!==(n=e.read());)if(1===r.pipesCount?t(r.pipes,0,null):_(r.pipes,t),e.emit("data",n),r.awaitDrain>0)return;return 0===r.pipesCount?(r.flowing=!1,void(S.listenerCount(e,"data")>0&&y(e))):void(r.ranOut=!0)}function m(){this._readableState.ranOut&&(this._readableState.ranOut=!1,v(this))}function y(e,t){var r=e._readableState;if(r.flowing)throw new Error("Cannot switch to old mode now.");var i=t||!1,o=!1;e.readable=!0,e.pipe=L.prototype.pipe,e.on=e.addListener=L.prototype.on,e.on("readable",function(){o=!0;for(var t;!i&&null!==(t=e.read());)e.emit("data",t);null===t&&(o=!1,e._readableState.needReadable=!0)}),e.pause=function(){i=!0,this.emit("pause")},e.resume=function(){i=!1,o?n.nextTick(function(){e.emit("readable")}):this.read(0),this.emit("resume")},e.emit("readable")}function b(e,t){var n,r=t.buffer,i=t.length,o=!!t.decoder,s=!!t.objectMode;if(0===r.length)return null;if(0===i)n=null;else if(s)n=r.shift();else if(!e||e>=i)n=o?r.join(""):j.concat(r,i),r.length=0;else if(e<r[0].length){var a=r[0];n=a.slice(0,e),r[0]=a.slice(e)}else if(e===r[0].length)n=r.shift();else{n=o?"":new j(e);for(var u=0,f=0,h=r.length;h>f&&e>u;f++){var a=r[0],c=Math.min(e-u,a.length);o?n+=a.slice(0,c):a.copy(n,u,0,c),c<a.length?r[0]=a.slice(c):r.shift(),u+=c}}return n}function w(e){var t=e._readableState;if(t.length>0)throw new Error("endReadable called on non-empty stream");!t.endEmitted&&t.calledRead&&(t.ended=!0,n.nextTick(function(){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function _(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n],n)}function E(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}t.exports=i;var x=e("isarray"),j=e("buffer").Buffer;i.ReadableState=r;var S=e("events").EventEmitter;S.listenerCount||(S.listenerCount=function(e,t){return e.listeners(t).length});var L=e("stream"),A=e("core-util-is");A.inherits=e("inherits");var C;A.inherits(i,L),i.prototype.push=function(e,t){var n=this._readableState;return"string"!=typeof e||n.objectMode||(t=t||n.defaultEncoding,t!==n.encoding&&(e=new j(e,t),t="")),o(this,n,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(t){C||(C=e("string_decoder/").StringDecoder),this._readableState.decoder=new C(t),this._readableState.encoding=t};var I=8388608;i.prototype.read=function(e){var t=this._readableState;t.calledRead=!0;var n=e;if(("number"!=typeof e||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return c(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&w(this),null;var r=t.needReadable;t.length-e<=t.highWaterMark&&(r=!0),(t.ended||t.reading)&&(r=!1),r&&(t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),r&&!t.reading&&(e=u(n,t));var i;return i=e>0?b(e,t):null,null===i&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),t.ended&&!t.endEmitted&&0===t.length&&w(this),i},i.prototype._read=function(){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,t){function r(e){e===h&&o()}function i(){e.end()}function o(){e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("drain",p),e.removeListener("error",s),e.removeListener("unpipe",r),h.removeListener("end",i),h.removeListener("end",o),(!e._writableState||e._writableState.needDrain)&&p()}function s(t){f(),e.removeListener("error",s),0===S.listenerCount(e,"error")&&e.emit("error",t)}function a(){e.removeListener("finish",u),f()}function u(){e.removeListener("close",a),f()}function f(){h.unpipe(e)}var h=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1;var l=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,d=l?i:o;c.endEmitted?n.nextTick(d):h.once("end",d),e.on("unpipe",r);var p=g(h);return e.on("drain",p),e._events&&e._events.error?x(e._events.error)?e._events.error.unshift(s):e._events.error=[s,e._events.error]:e.on("error",s),e.once("close",a),e.once("finish",u),e.emit("pipe",h),c.flowing||(this.on("readable",m),c.flowing=!0,n.nextTick(function(){v(h)})),e},i.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,this.removeListener("readable",m),t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,this.removeListener("readable",m),t.flowing=!1;for(var i=0;r>i;i++)n[i].emit("unpipe",this);return this}var i=E(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,t){var n=L.prototype.on.call(this,e,t);if("data"!==e||this._readableState.flowing||y(this),"readable"===e&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&c(this,r):this.read(0))}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){y(this),this.read(0),this.emit("resume")},i.prototype.pause=function(){y(this,!0),this.emit("pause")},i.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on("end",function(){if(t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on("data",function(i){if(t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var o=r.push(i);o||(n=!0,e.pause())}});for(var i in e)"function"==typeof e[i]&&"undefined"==typeof this[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(){n&&(n=!1,e.resume())},r},i._fromList=b}).call(this,e("lvYx0z"))},{buffer:6,"core-util-is":32,events:15,inherits:20,isarray:33,lvYx0z:21,stream:39,"string_decoder/":34}],30:[function(e,t){function n(e,t){this.afterTransform=function(e,n){return r(t,e,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function r(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);s.call(this,e);var t=(this._transformState=new n(e,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(e){o(t,e)}):o(t)})}function o(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=(e._readableState,e._transformState);if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}t.exports=i;var s=e("./_stream_duplex"),a=e("core-util-is");a.inherits=e("inherits"),a.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(){throw new Error("not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./_stream_duplex":27,"core-util-is":32,inherits:20}],31:[function(e,t){(function(n){function r(e,t,n){this.chunk=e,this.encoding=t,this.callback=n}function i(e,t){e=e||{};var n=e.highWaterMark;this.highWaterMark=n||0===n?n:16384,this.objectMode=!!e.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var r=e.decodeStrings===!1;this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){d(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function o(t){var n=e("./_stream_duplex");return this instanceof o||this instanceof n?(this._writableState=new i(t,this),this.writable=!0,void E.call(this)):new o(t)}function s(e,t,r){var i=new Error("write after end");e.emit("error",i),n.nextTick(function(){r(i)})}function a(e,t,r,i){var o=!0;if(!w.isBuffer(r)&&"string"!=typeof r&&null!==r&&void 0!==r&&!t.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),n.nextTick(function(){i(s)}),o=!1}return o}function u(e,t,n){return e.objectMode||e.decodeStrings===!1||"string"!=typeof t||(t=new w(t,n)),t}function f(e,t,n,i,o){n=u(t,n,i),w.isBuffer(n)&&(i="buffer");var s=t.objectMode?1:n.length;t.length+=s;var a=t.length<t.highWaterMark;return a||(t.needDrain=!0),t.writing?t.buffer.push(new r(n,i,o)):h(e,t,s,n,i,o),a}function h(e,t,n,r,i,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,e._write(r,i,t.onwrite),t.sync=!1}function c(e,t,r,i,o){r?n.nextTick(function(){o(i)}):o(i),e._writableState.errorEmitted=!0,e.emit("error",i)}function l(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function d(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if(l(r),t)c(e,r,i,t,o);else{var s=m(e,r);s||r.bufferProcessing||!r.buffer.length||v(e,r),i?n.nextTick(function(){p(e,r,s,o)}):p(e,r,s,o)}}function p(e,t,n,r){n||g(e,t),r(),n&&y(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function v(e,t){t.bufferProcessing=!0;for(var n=0;n<t.buffer.length;n++){var r=t.buffer[n],i=r.chunk,o=r.encoding,s=r.callback,a=t.objectMode?1:i.length;if(h(e,t,a,i,o,s),t.writing){n++;break}}t.bufferProcessing=!1,n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}function m(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function y(e,t){var n=m(e,t);return n&&(t.finished=!0,e.emit("finish")),n}function b(e,t,r){t.ending=!0,y(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0}t.exports=o;var w=e("buffer").Buffer;o.WritableState=i;var _=e("core-util-is");_.inherits=e("inherits");var E=e("stream");_.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),w.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=function(){}),r.ended?s(this,r,n):a(this,r,e,n)&&(i=f(this,r,e,t,n)),i},o.prototype._write=function(e,t,n){n(new Error("not implemented"))},o.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),"undefined"!=typeof e&&null!==e&&this.write(e,t),r.ending||r.finished||b(this,r,n)}}).call(this,e("lvYx0z"))},{"./_stream_duplex":27,buffer:6,"core-util-is":32,inherits:20,lvYx0z:21,stream:39}],32:[function(e,t,n){(function(e){function t(e){return Array.isArray(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function s(e){return"number"==typeof e}function a(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function f(e){return void 0===e}function h(e){return c(e)&&"[object RegExp]"===m(e)}function c(e){return"object"==typeof e&&null!==e}function l(e){return c(e)&&"[object Date]"===m(e)}function d(e){return c(e)&&("[object Error]"===m(e)||e instanceof Error)}function p(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 v(t){return e.isBuffer(t)}function m(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=r,n.isNull=i,n.isNullOrUndefined=o,n.isNumber=s,n.isString=a,n.isSymbol=u,n.isUndefined=f,n.isRegExp=h,n.isObject=c,n.isDate=l,n.isError=d,n.isFunction=p,n.isPrimitive=g,n.isBuffer=v}).call(this,e("buffer").Buffer)},{buffer:6}],33:[function(e,t){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],34:[function(e,t,n){function r(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){var t=this.charReceived=e.length%2;return this.charLength=t?2:0,t}function s(e){var t=this.charReceived=e.length%3;
return this.charLength=t?3:0,t}var a=e("buffer").Buffer,u=a.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}},f=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),r(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};f.prototype.write=function(e){for(var t="",n=0;this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,n,r),this.charReceived+=r-n,n=r,this.charReceived<this.charLength)return"";t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var i=t.charCodeAt(t.length-1);if(!(i>=55296&&56319>=i)){if(this.charReceived=this.charLength=0,r==e.length)return t;e=e.slice(r,e.length);break}this.charLength+=this.surrogateSize,t=""}var o=this.detectIncompleteChar(e),s=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-o,s),this.charReceived=o,s-=o),t+=e.toString(this.encoding,0,s);var s=t.length-1,i=t.charCodeAt(s);if(i>=55296&&56319>=i){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),this.charBuffer.write(t.charAt(t.length-1),this.encoding),t.substring(0,s)}return t},f.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(2>=t&&n>>4==14){this.charLength=3;break}if(3>=t&&n>>3==30){this.charLength=4;break}}return t},f.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:6}],35:[function(e,t){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":28}],36:[function(e,t,n){n=t.exports=e("./lib/_stream_readable.js"),n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":27,"./lib/_stream_passthrough.js":28,"./lib/_stream_readable.js":29,"./lib/_stream_transform.js":30,"./lib/_stream_writable.js":31}],37:[function(e,t){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":30}],38:[function(e,t){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":31}],39:[function(e,t){function n(){r.call(this)}t.exports=n;var r=e("events").EventEmitter,i=e("inherits");i(n,r),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&f.pause&&f.pause()}function i(){f.readable&&f.resume&&f.resume()}function o(){h||(h=!0,e.end())}function s(){h||(h=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){f.removeListener("data",n),e.removeListener("drain",i),f.removeListener("end",o),f.removeListener("close",s),f.removeListener("error",a),e.removeListener("error",a),f.removeListener("end",u),f.removeListener("close",u),e.removeListener("close",u)}var f=this;f.on("data",n),e.on("drain",i),e._isStdio||t&&t.end===!1||(f.on("end",o),f.on("close",s));var h=!1;return f.on("error",a),e.on("error",a),f.on("end",u),f.on("close",u),e.on("close",u),e.emit("pipe",f),e}},{events:15,inherits:20,"readable-stream/duplex.js":26,"readable-stream/passthrough.js":35,"readable-stream/readable.js":36,"readable-stream/transform.js":37,"readable-stream/writable.js":38}],40:[function(e,t,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&f(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return u(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function f(e){return"object"==typeof e&&null!==e}function h(e){return null===e}function c(e){return null==e}var l=e("punycode");n.parse=i,n.resolve=s,n.resolveObject=a,n.format=o,n.Url=r;var d=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,g=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(g),m=["'"].concat(v),y=["%","/","?",";","#"].concat(m),b=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},j={javascript:!0,"javascript:":!0},S={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},L=e("querystring");r.prototype.parse=function(e,t,n){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e;r=r.trim();var i=d.exec(r);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,r=r.substr(i.length)}if(n||i||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===r.substr(0,2);!s||i&&j[i]||(r=r.substr(2),this.slashes=!0)}if(!j[i]&&(s||i&&!S[i])){for(var a=-1,f=0;f<b.length;f++){var h=r.indexOf(b[f]);-1!==h&&(-1===a||a>h)&&(a=h)}var c,p;p=-1===a?r.lastIndexOf("@"):r.lastIndexOf("@",a),-1!==p&&(c=r.slice(0,p),r=r.slice(p+1),this.auth=decodeURIComponent(c)),a=-1;for(var f=0;f<y.length;f++){var h=r.indexOf(y[f]);-1!==h&&(-1===a||a>h)&&(a=h)}-1===a&&(a=r.length),this.host=r.slice(0,a),r=r.slice(a),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var v=this.hostname.split(/\./),f=0,A=v.length;A>f;f++){var C=v[f];if(C&&!C.match(_)){for(var I="",B=0,k=C.length;k>B;B++)I+=C.charCodeAt(B)>127?"x":C[B];if(!I.match(_)){var T=v.slice(0,f),M=v.slice(f+1),O=C.match(E);O&&(T.push(O[1]),M.unshift(O[2])),M.length&&(r="/"+M.join(".")+r),this.hostname=T.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!g){for(var R=this.hostname.split("."),U=[],f=0;f<R.length;++f){var N=R[f];U.push(N.match(/[^A-Za-z0-9_-]/)?"xn--"+l.encode(N):N)}this.hostname=U.join(".")}var q=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+q,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!x[o])for(var f=0,A=m.length;A>f;f++){var z=m[f],H=encodeURIComponent(z);H===z&&(H=escape(z)),r=r.split(z).join(H)}var P=r.indexOf("#");-1!==P&&(this.hash=r.substr(P),r=r.slice(0,P));var F=r.indexOf("?");if(-1!==F?(this.search=r.substr(F),this.query=r.substr(F+1),t&&(this.query=L.parse(this.query)),r=r.slice(0,F)):t&&(this.search="",this.query={}),r&&(this.pathname=r),S[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",N=this.search||"";this.path=q+N}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&f(this.query)&&Object.keys(this.query).length&&(o=L.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||S[t])&&i!==!1?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+n+s+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(u(e)){var t=new r;t.parse(e,!1,!0),e=t}var n=new r;if(Object.keys(this).forEach(function(e){n[e]=this[e]},this),n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(n[t]=e[t])}),S[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(e.protocol&&e.protocol!==n.protocol){if(!S[e.protocol])return Object.keys(e).forEach(function(t){n[t]=e[t]}),n.href=n.format(),n;if(n.protocol=e.protocol,e.host||j[e.protocol])n.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),n.pathname=i.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var o=n.pathname||"",s=n.search||"";n.path=o+s}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var a=n.pathname&&"/"===n.pathname.charAt(0),f=e.host||e.pathname&&"/"===e.pathname.charAt(0),l=f||a||n.host&&e.pathname,d=l,p=n.pathname&&n.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],g=n.protocol&&!S[n.protocol];if(g&&(n.hostname="",n.port=null,n.host&&(""===p[0]?p[0]=n.host:p.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),l=l&&(""===i[0]||""===p[0])),f)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,p=i;else if(i.length)p||(p=[]),p.pop(),p=p.concat(i),n.search=e.search,n.query=e.query;else if(!c(e.search)){if(g){n.hostname=n.host=p.shift();var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return n.search=e.search,n.query=e.query,h(n.pathname)&&h(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!p.length)return n.pathname=null,n.path=n.search?"/"+n.search:null,n.href=n.format(),n;for(var m=p.slice(-1)[0],y=(n.host||e.host)&&("."===m||".."===m)||""===m,b=0,w=p.length;w>=0;w--)m=p[w],"."==m?p.splice(w,1):".."===m?(p.splice(w,1),b++):b&&(p.splice(w,1),b--);if(!l&&!d)for(;b--;b)p.unshift("..");!l||""===p[0]||p[0]&&"/"===p[0].charAt(0)||p.unshift(""),y&&"/"!==p.join("/").substr(-1)&&p.push("");var _=""===p[0]||p[0]&&"/"===p[0].charAt(0);if(g){n.hostname=n.host=_?"":p.length?p.shift():"";var v=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;v&&(n.auth=v.shift(),n.host=n.hostname=v.shift())}return l=l||n.host&&p.length,l&&!_&&p.unshift(""),p.length?n.pathname=p.join("/"):(n.pathname=null,n.path=null),h(n.pathname)&&h(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{punycode:22,querystring:25}],41:[function(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],42:[function(e,t,n){(function(t,r){function i(e,t){var r={seen:[],stylize:s};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(t)?r.showHidden=t:t&&n._extend(r,t),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function s(e){return e}function a(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function u(e,t,r){if(e.customInspect&&t&&L(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return b(i)||(i=u(e,i,r)),i}var o=f(e,t);if(o)return o;var s=Object.keys(t),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),S(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(t);if(0===s.length){if(L(t)){var v=t.name?": "+t.name:"";return e.stylize("[Function"+v+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(j(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return h(t)}var m="",y=!1,w=["{","}"];if(p(t)&&(y=!0,w=["[","]"]),L(t)){var _=t.name?": "+t.name:"";m=" [Function"+_+"]"}if(E(t)&&(m=" "+RegExp.prototype.toString.call(t)),j(t)&&(m=" "+Date.prototype.toUTCString.call(t)),S(t)&&(m=" "+h(t)),0===s.length&&(!y||0==t.length))return w[0]+m+w[1];if(0>r)return E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var x;return x=y?c(e,t,r,g,s):s.map(function(n){return l(e,t,r,g,n,y)}),e.seen.pop(),d(x,m,w)}function f(e,t){if(_(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function c(e,t,n,r,i){for(var o=[],s=0,a=t.length;a>s;++s)o.push(k(t,String(s))?l(e,t,n,r,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(l(e,t,n,r,i,!0))}),o}function l(e,t,n,r,i,o){var s,a,f;if(f=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},f.get?a=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(a=e.stylize("[Setter]","special")),k(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(f.value)<0?(a=v(n)?u(e,f.value,null):u(e,f.value,n-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),_(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function d(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function m(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function _(e){return void 0===e}function E(e){return x(e)&&"[object RegExp]"===C(e)}function x(e){return"object"==typeof e&&null!==e}function j(e){return x(e)&&"[object Date]"===C(e)}function S(e){return x(e)&&("[object Error]"===C(e)||e instanceof Error)}function L(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function I(e){return 10>e?"0"+e.toString(10):e.toString(10)}function B(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var T=/%[sdj%]/g;n.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,s=String(e).replace(T,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),a=r[n];o>n;a=r[++n])s+=v(a)||!x(a)?" "+a:" "+i(a);return s},n.deprecate=function(e,i){function o(){if(!s){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),s=!0}return e.apply(this,arguments)}if(_(r.process))return function(){return n.deprecate(e,i).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return o};var M,O={};n.debuglog=function(e){if(_(M)&&(M=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!O[e])if(new RegExp("\\b"+e+"\\b","i").test(M)){var r=t.pid;O[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else O[e]=function(){};return O[e]},n.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=p,n.isBoolean=g,n.isNull=v,n.isNullOrUndefined=m,n.isNumber=y,n.isString=b,n.isSymbol=w,n.isUndefined=_,n.isRegExp=E,n.isObject=x,n.isDate=j,n.isError=S,n.isFunction=L,n.isPrimitive=A,n.isBuffer=e("./support/isBuffer");var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",B(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("lvYx0z"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":41,inherits:20,lvYx0z:21}]},{},[1])(1)});