UNPKG

@shriara/autogram

Version:

Generate unique svg avatars from any text

7 lines 492 kB
!function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Pictogrify=e():A.Pictogrify=e()}("undefined"!=typeof self?self:this,function(){return function(A){function e(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return A[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var t={};return e.m=A,e.c=t,e.d=function(A,t,r){e.o(A,t)||Object.defineProperty(A,t,{configurable:!1,enumerable:!0,get:r})},e.n=function(A){var t=A&&A.__esModule?function(){return A.default}:function(){return A};return e.d(t,"a",t),t},e.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},e.p="",e(e.s=17)}([function(A,e){var t;t=function(){return this}();try{t=t||Function("return this")()||(0,eval)("this")}catch(A){"object"==typeof window&&(t=window)}A.exports=t},function(A,e,t){"use strict";function r(A){if(!(this instanceof r))return new r(A);u.call(this,A),s.call(this,A),A&&!1===A.readable&&(this.readable=!1),A&&!1===A.writable&&(this.writable=!1),this.allowHalfOpen=!0,A&&!1===A.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",n)}function n(){this.allowHalfOpen||this._writableState.ended||o.nextTick(i,this)}function i(A){A.end()}var o=t(5),a=Object.keys||function(A){var e=[];for(var t in A)e.push(t);return e};A.exports=r;var l=t(3);l.inherits=t(2);var u=t(13),s=t(10);l.inherits(r,u);for(var f=a(s.prototype),c=0;c<f.length;c++){var d=f[c];r.prototype[d]||(r.prototype[d]=s.prototype[d])}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(A){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=A,this._writableState.destroyed=A)}}),r.prototype._destroy=function(A,e){this.push(null),this.end(),o.nextTick(e,A)}},function(A,e){"function"==typeof Object.create?A.exports=function(A,e){A.super_=e,A.prototype=Object.create(e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}})}:A.exports=function(A,e){A.super_=e;var t=function(){};t.prototype=e.prototype,A.prototype=new t,A.prototype.constructor=A}},function(A,e,t){(function(A){function t(A){return Array.isArray?Array.isArray(A):"[object Array]"===v(A)}function r(A){return"boolean"==typeof A}function n(A){return null===A}function i(A){return null==A}function o(A){return"number"==typeof A}function a(A){return"string"==typeof A}function l(A){return"symbol"==typeof A}function u(A){return void 0===A}function s(A){return"[object RegExp]"===v(A)}function f(A){return"object"==typeof A&&null!==A}function c(A){return"[object Date]"===v(A)}function d(A){return"[object Error]"===v(A)||A instanceof Error}function h(A){return"function"==typeof A}function p(A){return null===A||"boolean"==typeof A||"number"==typeof A||"string"==typeof A||"symbol"==typeof A||void 0===A}function v(A){return Object.prototype.toString.call(A)}e.isArray=t,e.isBoolean=r,e.isNull=n,e.isNullOrUndefined=i,e.isNumber=o,e.isString=a,e.isSymbol=l,e.isUndefined=u,e.isRegExp=s,e.isObject=f,e.isDate=c,e.isError=d,e.isFunction=h,e.isPrimitive=p,e.isBuffer=A.isBuffer}).call(e,t(7).Buffer)},function(A,e){function t(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function n(A){if(s===setTimeout)return setTimeout(A,0);if((s===t||!s)&&setTimeout)return s=setTimeout,setTimeout(A,0);try{return s(A,0)}catch(e){try{return s.call(null,A,0)}catch(e){return s.call(this,A,0)}}}function i(A){if(f===clearTimeout)return clearTimeout(A);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(A);try{return f(A)}catch(e){try{return f.call(null,A)}catch(e){return f.call(this,A)}}}function o(){p&&d&&(p=!1,d.length?h=d.concat(h):v=-1,h.length&&a())}function a(){if(!p){var A=n(o);p=!0;for(var e=h.length;e;){for(d=h,h=[];++v<e;)d&&d[v].run();v=-1,e=h.length}d=null,p=!1,i(A)}}function l(A,e){this.fun=A,this.array=e}function u(){}var s,f,c=A.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:t}catch(A){s=t}try{f="function"==typeof clearTimeout?clearTimeout:r}catch(A){f=r}}();var d,h=[],p=!1,v=-1;c.nextTick=function(A){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];h.push(new l(A,e)),1!==h.length||p||n(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=u,c.addListener=u,c.once=u,c.off=u,c.removeListener=u,c.removeAllListeners=u,c.emit=u,c.prependListener=u,c.prependOnceListener=u,c.listeners=function(A){return[]},c.binding=function(A){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(A){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(A,e,t){"use strict";(function(e){function t(A,t,r,n){if("function"!=typeof A)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(A);case 2:return e.nextTick(function(){A.call(null,t)});case 3:return e.nextTick(function(){A.call(null,t,r)});case 4:return e.nextTick(function(){A.call(null,t,r,n)});default:for(i=new Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return e.nextTick(function(){A.apply(null,i)})}}!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?A.exports={nextTick:t}:A.exports=e}).call(e,t(4))},function(A,e,t){function r(A,e){for(var t in A)e[t]=A[t]}function n(A,e,t){return o(A,e,t)}var i=t(7),o=i.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?A.exports=i:(r(i,e),e.Buffer=n),r(o,n),n.from=function(A,e,t){if("number"==typeof A)throw new TypeError("Argument must not be a number");return o(A,e,t)},n.alloc=function(A,e,t){if("number"!=typeof A)throw new TypeError("Argument must be a number");var r=o(A);return void 0!==e?"string"==typeof t?r.fill(e,t):r.fill(e):r.fill(0),r},n.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return o(A)},n.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return i.SlowBuffer(A)}},function(A,e,t){"use strict";(function(A){function r(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function n(A,e){if(r()<e)throw new RangeError("Invalid typed array length");return i.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(e),A.__proto__=i.prototype):(null===A&&(A=new i(e)),A.length=e),A}function i(A,e,t){if(!(i.TYPED_ARRAY_SUPPORT||this instanceof i))return new i(A,e,t);if("number"==typeof A){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return u(this,A)}return o(this,A,e,t)}function o(A,e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?c(A,e,t,r):"string"==typeof e?s(A,e,t):d(A,e)}function a(A){if("number"!=typeof A)throw new TypeError('"size" argument must be a number');if(A<0)throw new RangeError('"size" argument must not be negative')}function l(A,e,t,r){return a(e),e<=0?n(A,e):void 0!==t?"string"==typeof r?n(A,e).fill(t,r):n(A,e).fill(t):n(A,e)}function u(A,e){if(a(e),A=n(A,e<0?0:0|h(e)),!i.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)A[t]=0;return A}function s(A,e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(e,t);A=n(A,r);var o=A.write(e,t);return o!==r&&(A=A.slice(0,o)),A}function f(A,e){var t=e.length<0?0:0|h(e.length);A=n(A,t);for(var r=0;r<t;r+=1)A[r]=255&e[r];return A}function c(A,e,t,r){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(r||0))throw new RangeError("'length' is out of bounds");return e=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),i.TYPED_ARRAY_SUPPORT?(A=e,A.__proto__=i.prototype):A=f(A,e),A}function d(A,e){if(i.isBuffer(e)){var t=0|h(e.length);return A=n(A,t),0===A.length?A:(e.copy(A,0,0,t),A)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||X(e.length)?n(A,0):f(A,e);if("Buffer"===e.type&&K(e.data))return f(A,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function h(A){if(A>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|A}function p(A){return+A!=A&&(A=0),i.alloc(+A)}function v(A,e){if(i.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return V(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Q(A).length;default:if(r)return V(A).length;e=(""+e).toLowerCase(),r=!0}}function g(A,e,t){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if(t>>>=0,e>>>=0,t<=e)return"";for(A||(A="utf8");;)switch(A){case"hex":return O(this,e,t);case"utf8":case"utf-8":return j(this,e,t);case"ascii":return B(this,e,t);case"latin1":case"binary":return z(this,e,t);case"base64":return S(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t);default:if(r)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),r=!0}}function m(A,e,t){var r=A[e];A[e]=A[t],A[t]=r}function y(A,e,t,r,n){if(0===A.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=n?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(n)return-1;t=A.length-1}else if(t<0){if(!n)return-1;t=0}if("string"==typeof e&&(e=i.from(e,r)),i.isBuffer(e))return 0===e.length?-1:b(A,e,t,r,n);if("number"==typeof e)return e&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):b(A,[e],t,r,n);throw new TypeError("val must be string, number or Buffer")}function b(A,e,t,r,n){function i(A,e){return 1===o?A[e]:A.readUInt16BE(e*o)}var o=1,a=A.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(A.length<2||e.length<2)return-1;o=2,a/=2,l/=2,t/=2}var u;if(n){var s=-1;for(u=t;u<a;u++)if(i(A,u)===i(e,-1===s?0:u-s)){if(-1===s&&(s=u),u-s+1===l)return s*o}else-1!==s&&(u-=u-s),s=-1}else for(t+l>a&&(t=a-l),u=t;u>=0;u--){for(var f=!0,c=0;c<l;c++)if(i(A,u+c)!==i(e,c)){f=!1;break}if(f)return u}return-1}function _(A,e,t,r){t=Number(t)||0;var n=A.length-t;r?(r=Number(r))>n&&(r=n):r=n;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var o=0;o<r;++o){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))return o;A[t+o]=a}return o}function w(A,e,t,r){return q(V(e,A.length-t),A,t,r)}function M(A,e,t,r){return q(G(e),A,t,r)}function k(A,e,t,r){return M(A,e,t,r)}function x(A,e,t,r){return q(Q(e),A,t,r)}function E(A,e,t,r){return q(H(e,A.length-t),A,t,r)}function S(A,e,t){return 0===e&&t===A.length?Z.fromByteArray(A):Z.fromByteArray(A.slice(e,t))}function j(A,e,t){t=Math.min(A.length,t);for(var r=[],n=e;n<t;){var i=A[n],o=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=t){var l,u,s,f;switch(a){case 1:i<128&&(o=i);break;case 2:128==(192&(l=A[n+1]))&&(f=(31&i)<<6|63&l)>127&&(o=f);break;case 3:l=A[n+1],u=A[n+2],128==(192&l)&&128==(192&u)&&(f=(15&i)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=A[n+1],u=A[n+2],s=A[n+3],128==(192&l)&&128==(192&u)&&128==(192&s)&&(f=(15&i)<<18|(63&l)<<12|(63&u)<<6|63&s)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),n+=a}return T(r)}function T(A){var e=A.length;if(e<=$)return String.fromCharCode.apply(String,A);for(var t="",r=0;r<e;)t+=String.fromCharCode.apply(String,A.slice(r,r+=$));return t}function B(A,e,t){var r="";t=Math.min(A.length,t);for(var n=e;n<t;++n)r+=String.fromCharCode(127&A[n]);return r}function z(A,e,t){var r="";t=Math.min(A.length,t);for(var n=e;n<t;++n)r+=String.fromCharCode(A[n]);return r}function O(A,e,t){var r=A.length;(!e||e<0)&&(e=0),(!t||t<0||t>r)&&(t=r);for(var n="",i=e;i<t;++i)n+=Y(A[i]);return n}function C(A,e,t){for(var r=A.slice(e,t),n="",i=0;i<r.length;i+=2)n+=String.fromCharCode(r[i]+256*r[i+1]);return n}function P(A,e,t){if(A%1!=0||A<0)throw new RangeError("offset is not uint");if(A+e>t)throw new RangeError("Trying to access beyond buffer length")}function I(A,e,t,r,n,o){if(!i.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(t+r>A.length)throw new RangeError("Index out of range")}function D(A,e,t,r){e<0&&(e=65535+e+1);for(var n=0,i=Math.min(A.length-t,2);n<i;++n)A[t+n]=(e&255<<8*(r?n:1-n))>>>8*(r?n:1-n)}function R(A,e,t,r){e<0&&(e=4294967295+e+1);for(var n=0,i=Math.min(A.length-t,4);n<i;++n)A[t+n]=e>>>8*(r?n:3-n)&255}function N(A,e,t,r,n,i){if(t+r>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function F(A,e,t,r,n){return n||N(A,e,t,4,3.4028234663852886e38,-3.4028234663852886e38),J.write(A,e,t,r,23,4),t+4}function L(A,e,t,r,n){return n||N(A,e,t,8,1.7976931348623157e308,-1.7976931348623157e308),J.write(A,e,t,r,52,8),t+8}function U(A){if(A=W(A).replace(AA,""),A.length<2)return"";for(;A.length%4!=0;)A+="=";return A}function W(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}function Y(A){return A<16?"0"+A.toString(16):A.toString(16)}function V(A,e){e=e||1/0;for(var t,r=A.length,n=null,i=[],o=0;o<r;++o){if((t=A.charCodeAt(o))>55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&i.push(239,191,189),n=t;continue}t=65536+(n-55296<<10|t-56320)}else n&&(e-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;i.push(t)}else if(t<2048){if((e-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function G(A){for(var e=[],t=0;t<A.length;++t)e.push(255&A.charCodeAt(t));return e}function H(A,e){for(var t,r,n,i=[],o=0;o<A.length&&!((e-=2)<0);++o)t=A.charCodeAt(o),r=t>>8,n=t%256,i.push(n),i.push(r);return i}function Q(A){return Z.toByteArray(U(A))}function q(A,e,t,r){for(var n=0;n<r&&!(n+t>=e.length||n>=A.length);++n)e[n+t]=A[n];return n}function X(A){return A!==A}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ var Z=t(30),J=t(31),K=t(12);e.Buffer=i,e.SlowBuffer=p,e.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==A.TYPED_ARRAY_SUPPORT?A.TYPED_ARRAY_SUPPORT:function(){try{var A=new Uint8Array(1);return A.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===A.foo()&&"function"==typeof A.subarray&&0===A.subarray(1,1).byteLength}catch(A){return!1}}(),e.kMaxLength=r(),i.poolSize=8192,i._augment=function(A){return A.__proto__=i.prototype,A},i.from=function(A,e,t){return o(null,A,e,t)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(A,e,t){return l(null,A,e,t)},i.allocUnsafe=function(A){return u(null,A)},i.allocUnsafeSlow=function(A){return u(null,A)},i.isBuffer=function(A){return!(null==A||!A._isBuffer)},i.compare=function(A,e){if(!i.isBuffer(A)||!i.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(A===e)return 0;for(var t=A.length,r=e.length,n=0,o=Math.min(t,r);n<o;++n)if(A[n]!==e[n]){t=A[n],r=e[n];break}return t<r?-1:r<t?1:0},i.isEncoding=function(A){switch(String(A).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(A,e){if(!K(A))throw new TypeError('"list" argument must be an Array of Buffers');if(0===A.length)return i.alloc(0);var t;if(void 0===e)for(e=0,t=0;t<A.length;++t)e+=A[t].length;var r=i.allocUnsafe(e),n=0;for(t=0;t<A.length;++t){var o=A[t];if(!i.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,n),n+=o.length}return r},i.byteLength=v,i.prototype._isBuffer=!0,i.prototype.swap16=function(){var A=this.length;if(A%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<A;e+=2)m(this,e,e+1);return this},i.prototype.swap32=function(){var A=this.length;if(A%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<A;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},i.prototype.swap64=function(){var A=this.length;if(A%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<A;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},i.prototype.toString=function(){var A=0|this.length;return 0===A?"":0===arguments.length?j(this,0,A):g.apply(this,arguments)},i.prototype.equals=function(A){if(!i.isBuffer(A))throw new TypeError("Argument must be a Buffer");return this===A||0===i.compare(this,A)},i.prototype.inspect=function(){var A="",t=e.INSPECT_MAX_BYTES;return this.length>0&&(A=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(A+=" ... ")),"<Buffer "+A+">"},i.prototype.compare=function(A,e,t,r,n){if(!i.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===t&&(t=A?A.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||t>A.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=t)return 0;if(r>=n)return-1;if(e>=t)return 1;if(e>>>=0,t>>>=0,r>>>=0,n>>>=0,this===A)return 0;for(var o=n-r,a=t-e,l=Math.min(o,a),u=this.slice(r,n),s=A.slice(e,t),f=0;f<l;++f)if(u[f]!==s[f]){o=u[f],a=s[f];break}return o<a?-1:a<o?1:0},i.prototype.includes=function(A,e,t){return-1!==this.indexOf(A,e,t)},i.prototype.indexOf=function(A,e,t){return y(this,A,e,t,!0)},i.prototype.lastIndexOf=function(A,e,t){return y(this,A,e,t,!1)},i.prototype.write=function(A,e,t,r){if(void 0===e)r="utf8",t=this.length,e=0;else if(void 0===t&&"string"==typeof e)r=e,t=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(t)?(t|=0,void 0===r&&(r="utf8")):(r=t,t=void 0)}var n=this.length-e;if((void 0===t||t>n)&&(t=n),A.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return _(this,A,e,t);case"utf8":case"utf-8":return w(this,A,e,t);case"ascii":return M(this,A,e,t);case"latin1":case"binary":return k(this,A,e,t);case"base64":return x(this,A,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,A,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;i.prototype.slice=function(A,e){var t=this.length;A=~~A,e=void 0===e?t:~~e,A<0?(A+=t)<0&&(A=0):A>t&&(A=t),e<0?(e+=t)<0&&(e=0):e>t&&(e=t),e<A&&(e=A);var r;if(i.TYPED_ARRAY_SUPPORT)r=this.subarray(A,e),r.__proto__=i.prototype;else{var n=e-A;r=new i(n,void 0);for(var o=0;o<n;++o)r[o]=this[o+A]}return r},i.prototype.readUIntLE=function(A,e,t){A|=0,e|=0,t||P(A,e,this.length);for(var r=this[A],n=1,i=0;++i<e&&(n*=256);)r+=this[A+i]*n;return r},i.prototype.readUIntBE=function(A,e,t){A|=0,e|=0,t||P(A,e,this.length);for(var r=this[A+--e],n=1;e>0&&(n*=256);)r+=this[A+--e]*n;return r},i.prototype.readUInt8=function(A,e){return e||P(A,1,this.length),this[A]},i.prototype.readUInt16LE=function(A,e){return e||P(A,2,this.length),this[A]|this[A+1]<<8},i.prototype.readUInt16BE=function(A,e){return e||P(A,2,this.length),this[A]<<8|this[A+1]},i.prototype.readUInt32LE=function(A,e){return e||P(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},i.prototype.readUInt32BE=function(A,e){return e||P(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},i.prototype.readIntLE=function(A,e,t){A|=0,e|=0,t||P(A,e,this.length);for(var r=this[A],n=1,i=0;++i<e&&(n*=256);)r+=this[A+i]*n;return n*=128,r>=n&&(r-=Math.pow(2,8*e)),r},i.prototype.readIntBE=function(A,e,t){A|=0,e|=0,t||P(A,e,this.length);for(var r=e,n=1,i=this[A+--r];r>0&&(n*=256);)i+=this[A+--r]*n;return n*=128,i>=n&&(i-=Math.pow(2,8*e)),i},i.prototype.readInt8=function(A,e){return e||P(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},i.prototype.readInt16LE=function(A,e){e||P(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(A,e){e||P(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(A,e){return e||P(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},i.prototype.readInt32BE=function(A,e){return e||P(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},i.prototype.readFloatLE=function(A,e){return e||P(A,4,this.length),J.read(this,A,!0,23,4)},i.prototype.readFloatBE=function(A,e){return e||P(A,4,this.length),J.read(this,A,!1,23,4)},i.prototype.readDoubleLE=function(A,e){return e||P(A,8,this.length),J.read(this,A,!0,52,8)},i.prototype.readDoubleBE=function(A,e){return e||P(A,8,this.length),J.read(this,A,!1,52,8)},i.prototype.writeUIntLE=function(A,e,t,r){A=+A,e|=0,t|=0,r||I(this,A,e,t,Math.pow(2,8*t)-1,0);var n=1,i=0;for(this[e]=255&A;++i<t&&(n*=256);)this[e+i]=A/n&255;return e+t},i.prototype.writeUIntBE=function(A,e,t,r){A=+A,e|=0,t|=0,r||I(this,A,e,t,Math.pow(2,8*t)-1,0);var n=t-1,i=1;for(this[e+n]=255&A;--n>=0&&(i*=256);)this[e+n]=A/i&255;return e+t},i.prototype.writeUInt8=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,1,255,0),i.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[e]=255&A,e+1},i.prototype.writeUInt16LE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):D(this,A,e,!0),e+2},i.prototype.writeUInt16BE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):D(this,A,e,!1),e+2},i.prototype.writeUInt32LE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e+3]=A>>>24,this[e+2]=A>>>16,this[e+1]=A>>>8,this[e]=255&A):R(this,A,e,!0),e+4},i.prototype.writeUInt32BE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):R(this,A,e,!1),e+4},i.prototype.writeIntLE=function(A,e,t,r){if(A=+A,e|=0,!r){var n=Math.pow(2,8*t-1);I(this,A,e,t,n-1,-n)}var i=0,o=1,a=0;for(this[e]=255&A;++i<t&&(o*=256);)A<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(A/o>>0)-a&255;return e+t},i.prototype.writeIntBE=function(A,e,t,r){if(A=+A,e|=0,!r){var n=Math.pow(2,8*t-1);I(this,A,e,t,n-1,-n)}var i=t-1,o=1,a=0;for(this[e+i]=255&A;--i>=0&&(o*=256);)A<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(A/o>>0)-a&255;return e+t},i.prototype.writeInt8=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,1,127,-128),i.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[e]=255&A,e+1},i.prototype.writeInt16LE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):D(this,A,e,!0),e+2},i.prototype.writeInt16BE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):D(this,A,e,!1),e+2},i.prototype.writeInt32LE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8,this[e+2]=A>>>16,this[e+3]=A>>>24):R(this,A,e,!0),e+4},i.prototype.writeInt32BE=function(A,e,t){return A=+A,e|=0,t||I(this,A,e,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),i.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):R(this,A,e,!1),e+4},i.prototype.writeFloatLE=function(A,e,t){return F(this,A,e,!0,t)},i.prototype.writeFloatBE=function(A,e,t){return F(this,A,e,!1,t)},i.prototype.writeDoubleLE=function(A,e,t){return L(this,A,e,!0,t)},i.prototype.writeDoubleBE=function(A,e,t){return L(this,A,e,!1,t)},i.prototype.copy=function(A,e,t,r){if(t||(t=0),r||0===r||(r=this.length),e>=A.length&&(e=A.length),e||(e=0),r>0&&r<t&&(r=t),r===t)return 0;if(0===A.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),A.length-e<r-t&&(r=A.length-e+t);var n,o=r-t;if(this===A&&t<e&&e<r)for(n=o-1;n>=0;--n)A[n+e]=this[n+t];else if(o<1e3||!i.TYPED_ARRAY_SUPPORT)for(n=0;n<o;++n)A[n+e]=this[n+t];else Uint8Array.prototype.set.call(A,this.subarray(t,t+o),e);return o},i.prototype.fill=function(A,e,t,r){if("string"==typeof A){if("string"==typeof e?(r=e,e=0,t=this.length):"string"==typeof t&&(r=t,t=this.length),1===A.length){var n=A.charCodeAt(0);n<256&&(A=n)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!i.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof A&&(A&=255);if(e<0||this.length<e||this.length<t)throw new RangeError("Out of range index");if(t<=e)return this;e>>>=0,t=void 0===t?this.length:t>>>0,A||(A=0);var o;if("number"==typeof A)for(o=e;o<t;++o)this[o]=A;else{var a=i.isBuffer(A)?A:V(new i(A,r).toString()),l=a.length;for(o=0;o<t-e;++o)this[o+e]=a[o%l]}return this};var AA=/[^+\/0-9A-Za-z-_]/g}).call(e,t(0))},function(A,e){function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(A){return"function"==typeof A}function n(A){return"number"==typeof A}function i(A){return"object"==typeof A&&null!==A}function o(A){return void 0===A}A.exports=t,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(A){if(!n(A)||A<0||isNaN(A))throw TypeError("n must be a positive number");return this._maxListeners=A,this},t.prototype.emit=function(A){var e,t,n,a,l,u;if(this._events||(this._events={}),"error"===A&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var s=new Error('Uncaught, unspecified "error" event. ('+e+")");throw s.context=e,s}if(t=this._events[A],o(t))return!1;if(r(t))switch(arguments.length){case 1:t.call(this);break;case 2:t.call(this,arguments[1]);break;case 3:t.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),t.apply(this,a)}else if(i(t))for(a=Array.prototype.slice.call(arguments,1),u=t.slice(),n=u.length,l=0;l<n;l++)u[l].apply(this,a);return!0},t.prototype.addListener=function(A,e){var n;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",A,r(e.listener)?e.listener:e),this._events[A]?i(this._events[A])?this._events[A].push(e):this._events[A]=[this._events[A],e]:this._events[A]=e,i(this._events[A])&&!this._events[A].warned&&(n=o(this._maxListeners)?t.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[A].length>n&&(this._events[A].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[A].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(A,e){function t(){this.removeListener(A,t),n||(n=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var n=!1;return t.listener=e,this.on(A,t),this},t.prototype.removeListener=function(A,e){var t,n,o,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[A])return this;if(t=this._events[A],o=t.length,n=-1,t===e||r(t.listener)&&t.listener===e)delete this._events[A],this._events.removeListener&&this.emit("removeListener",A,e);else if(i(t)){for(a=o;a-- >0;)if(t[a]===e||t[a].listener&&t[a].listener===e){n=a;break}if(n<0)return this;1===t.length?(t.length=0,delete this._events[A]):t.splice(n,1),this._events.removeListener&&this.emit("removeListener",A,e)}return this},t.prototype.removeAllListeners=function(A){var e,t;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[A]&&delete this._events[A],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(t=this._events[A],r(t))this.removeListener(A,t);else if(t)for(;t.length;)this.removeListener(A,t[t.length-1]);return delete this._events[A],this},t.prototype.listeners=function(A){return this._events&&this._events[A]?r(this._events[A])?[this._events[A]]:this._events[A].slice():[]},t.prototype.listenerCount=function(A){if(this._events){var e=this._events[A];if(r(e))return 1;if(e)return e.length}return 0},t.listenerCount=function(A,e){return A.listenerCount(e)}},function(A,e,t){e=A.exports=t(13),e.Stream=e,e.Readable=e,e.Writable=t(10),e.Duplex=t(1),e.Transform=t(16),e.PassThrough=t(39)},function(A,e,t){"use strict";(function(e,r,n){function i(A){var e=this;this.next=null,this.entry=null,this.finish=function(){S(e,A)}}function o(A){return P.from(A)}function a(A){return P.isBuffer(A)||A instanceof I}function l(){}function u(A,e){T=T||t(1),A=A||{};var r=e instanceof T;this.objectMode=!!A.objectMode,r&&(this.objectMode=this.objectMode||!!A.writableObjectMode);var n=A.highWaterMark,o=A.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===A.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(A){m(e,A)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function s(A){if(T=T||t(1),!(R.call(s,this)||this instanceof T))return new s(A);this._writableState=new u(A,this),this.writable=!0,A&&("function"==typeof A.write&&(this._write=A.write),"function"==typeof A.writev&&(this._writev=A.writev),"function"==typeof A.destroy&&(this._destroy=A.destroy),"function"==typeof A.final&&(this._final=A.final)),C.call(this)}function f(A,e){var t=new Error("write after end");A.emit("error",t),j.nextTick(e,t)}function c(A,e,t,r){var n=!0,i=!1;return null===t?i=new TypeError("May not write null values to stream"):"string"==typeof t||void 0===t||e.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(A.emit("error",i),j.nextTick(r,i),n=!1),n}function d(A,e,t){return A.objectMode||!1===A.decodeStrings||"string"!=typeof e||(e=P.from(e,t)),e}function h(A,e,t,r,n,i){if(!t){var o=d(e,r,n);r!==o&&(t=!0,n="buffer",r=o)}var a=e.objectMode?1:r.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:n,isBuf:t,callback:i,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else p(A,e,!1,a,r,n,i);return l}function p(A,e,t,r,n,i,o){e.writelen=r,e.writecb=o,e.writing=!0,e.sync=!0,t?A._writev(n,e.onwrite):A._write(n,i,e.onwrite),e.sync=!1}function v(A,e,t,r,n){--e.pendingcb,t?(j.nextTick(n,r),j.nextTick(x,A,e),A._writableState.errorEmitted=!0,A.emit("error",r)):(n(r),A._writableState.errorEmitted=!0,A.emit("error",r),x(A,e))}function g(A){A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0}function m(A,e){var t=A._writableState,r=t.sync,n=t.writecb;if(g(t),e)v(A,t,r,e,n);else{var i=w(t);i||t.corked||t.bufferProcessing||!t.bufferedRequest||_(A,t),r?B(y,A,t,i,n):y(A,t,i,n)}}function y(A,e,t,r){t||b(A,e),e.pendingcb--,r(),x(A,e)}function b(A,e){0===e.length&&e.needDrain&&(e.needDrain=!1,A.emit("drain"))}function _(A,e){e.bufferProcessing=!0;var t=e.bufferedRequest;if(A._writev&&t&&t.next){var r=e.bufferedRequestCount,n=new Array(r),o=e.corkedRequestsFree;o.entry=t;for(var a=0,l=!0;t;)n[a]=t,t.isBuf||(l=!1),t=t.next,a+=1;n.allBuffers=l,p(A,e,!0,e.length,n,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;t;){var u=t.chunk,s=t.encoding,f=t.callback;if(p(A,e,!1,e.objectMode?1:u.length,u,s,f),t=t.next,e.bufferedRequestCount--,e.writing)break}null===t&&(e.lastBufferedRequest=null)}e.bufferedRequest=t,e.bufferProcessing=!1}function w(A){return A.ending&&0===A.length&&null===A.bufferedRequest&&!A.finished&&!A.writing}function M(A,e){A._final(function(t){e.pendingcb--,t&&A.emit("error",t),e.prefinished=!0,A.emit("prefinish"),x(A,e)})}function k(A,e){e.prefinished||e.finalCalled||("function"==typeof A._final?(e.pendingcb++,e.finalCalled=!0,j.nextTick(M,A,e)):(e.prefinished=!0,A.emit("prefinish")))}function x(A,e){var t=w(e);return t&&(k(A,e),0===e.pendingcb&&(e.finished=!0,A.emit("finish"))),t}function E(A,e,t){e.ending=!0,x(A,e),t&&(e.finished?j.nextTick(t):A.once("finish",t)),e.ended=!0,A.writable=!1}function S(A,e,t){var r=A.entry;for(A.entry=null;r;){var n=r.callback;e.pendingcb--,n(t),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=A:e.corkedRequestsFree=A}var j=t(5);A.exports=s;var T,B=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:j.nextTick;s.WritableState=u;var z=t(3);z.inherits=t(2);var O={deprecate:t(38)},C=t(14),P=t(6).Buffer,I=n.Uint8Array||function(){},D=t(15);z.inherits(s,C),u.prototype.getBuffer=function(){for(var A=this.bufferedRequest,e=[];A;)e.push(A),A=A.next;return e},function(){try{Object.defineProperty(u.prototype,"buffer",{get:O.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(A){}}();var R;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(A){return!!R.call(this,A)||this===s&&A&&A._writableState instanceof u}})):R=function(A){return A instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(A,e,t){var r=this._writableState,n=!1,i=!r.objectMode&&a(A);return i&&!P.isBuffer(A)&&(A=o(A)),"function"==typeof e&&(t=e,e=null),i?e="buffer":e||(e=r.defaultEncoding),"function"!=typeof t&&(t=l),r.ended?f(this,t):(i||c(this,r,A,t))&&(r.pendingcb++,n=h(this,r,i,A,e,t)),n},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var A=this._writableState;A.corked&&(A.corked--,A.writing||A.corked||A.finished||A.bufferProcessing||!A.bufferedRequest||_(this,A))},s.prototype.setDefaultEncoding=function(A){if("string"==typeof A&&(A=A.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((A+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),s.prototype._write=function(A,e,t){t(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(A,e,t){var r=this._writableState;"function"==typeof A?(t=A,A=null,e=null):"function"==typeof e&&(t=e,e=null),null!==A&&void 0!==A&&this.write(A,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||E(this,r,t)},Object.defineProperty(s.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),s.prototype.destroy=D.destroy,s.prototype._undestroy=D.undestroy,s.prototype._destroy=function(A,e){this.end(),e(A)}}).call(e,t(4),t(36).setImmediate,t(0))},function(A,e,t){"use strict";function r(A){if(!A)return"utf8";for(var e;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(e)return;A=(""+A).toLowerCase(),e=!0}}function n(A){var e=r(A);if("string"!=typeof e&&(m.isEncoding===y||!y(A)))throw new Error("Unknown encoding: "+A);return e||A}function i(A){this.encoding=n(A);var e;switch(this.encoding){case"utf16le":this.text=c,this.end=d,e=4;break;case"utf8":this.fillLast=u,e=4;break;case"base64":this.text=h,this.end=p,e=3;break;default:return this.write=v,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=m.allocUnsafe(e)}function o(A){return A<=127?0:A>>5==6?2:A>>4==14?3:A>>3==30?4:A>>6==2?-1:-2}function a(A,e,t){var r=e.length-1;if(r<t)return 0;var n=o(e[r]);return n>=0?(n>0&&(A.lastNeed=n-1),n):--r<t||-2===n?0:(n=o(e[r]))>=0?(n>0&&(A.lastNeed=n-2),n):--r<t||-2===n?0:(n=o(e[r]),n>=0?(n>0&&(2===n?n=0:A.lastNeed=n-3),n):0)}function l(A,e,t){if(128!=(192&e[0]))return A.lastNeed=0,"�";if(A.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return A.lastNeed=1,"�";if(A.lastNeed>2&&e.length>2&&128!=(192&e[2]))return A.lastNeed=2,"�"}}function u(A){var e=this.lastTotal-this.lastNeed,t=l(this,A,e);return void 0!==t?t:this.lastNeed<=A.length?(A.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(A.copy(this.lastChar,e,0,A.length),void(this.lastNeed-=A.length))}function s(A,e){var t=a(this,A,e);if(!this.lastNeed)return A.toString("utf8",e);this.lastTotal=t;var r=A.length-(t-this.lastNeed);return A.copy(this.lastChar,0,r),A.toString("utf8",e,r)}function f(A){var e=A&&A.length?this.write(A):"";return this.lastNeed?e+"�":e}function c(A,e){if((A.length-e)%2==0){var t=A.toString("utf16le",e);if(t){var r=t.charCodeAt(t.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",e,A.length-1)}function d(A){var e=A&&A.length?this.write(A):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,t)}return e}function h(A,e){var t=(A.length-e)%3;return 0===t?A.toString("base64",e):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",e,A.length-t))}function p(A){var e=A&&A.length?this.write(A):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function v(A){return A.toString(this.encoding)}function g(A){return A&&A.length?this.write(A):""}var m=t(6).Buffer,y=m.isEncoding||function(A){switch((A=""+A)&&A.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}};e.StringDecoder=i,i.prototype.write=function(A){if(0===A.length)return"";var e,t;if(this.lastNeed){if(void 0===(e=this.fillLast(A)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<A.length?e?e+this.text(A,t):this.text(A,t):e||""},i.prototype.end=f,i.prototype.text=s,i.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length}},function(A,e){var t={}.toString;A.exports=Array.isArray||function(A){return"[object Array]"==t.call(A)}},function(A,e,t){"use strict";(function(e,r){function n(A){return R.from(A)}function i(A){return R.isBuffer(A)||A instanceof N}function o(A,e,t){if("function"==typeof A.prependListener)return A.prependListener(e,t);A._events&&A._events[e]?P(A._events[e])?A._events[e].unshift(t):A._events[e]=[t,A._events[e]]:A.on(e,t)}function a(A,e){C=C||t(1),A=A||{};var r=e instanceof C;this.objectMode=!!A.objectMode,r&&(this.objectMode=this.objectMode||!!A.readableObjectMode);var n=A.highWaterMark,i=A.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(i||0===i)?i:o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Y,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(W||(W=t(11).StringDecoder),this.decoder=new W(A.encoding),this.encoding=A.encoding)}function l(A){if(C=C||t(1),!(this instanceof l))return new l(A);this._readableState=new a(A,this),this.readable=!0,A&&("function"==typeof A.read&&(this._read=A.read),"function"==typeof A.destroy&&(this._destroy=A.destroy)),D.call(this)}function u(A,e,t,r,i){var o=A._readableState;if(null===e)o.reading=!1,p(A,o);else{var a;i||(a=f(o,e)),a?A.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===R.prototype||(e=n(e)),r?o.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):s(A,o,e,!0):o.ended?A.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!t?(e=o.decoder.write(e),o.objectMode||0!==e.length?s(A,o,e,!1):m(A,o)):s(A,o,e,!1))):r||(o.reading=!1)}return c(o)}function s(A,e,t,r){e.flowing&&0===e.length&&!e.sync?(A.emit("data",t),A.read(0)):(e.length+=e.objectMode?1:t.length,r?e.buffer.unshift(t):e.buffer.push(t),e.needReadable&&v(A)),m(A,e)}function f(A,e){var t;return i(e)||"string"==typeof e||void 0===e||A.objectMode||(t=new TypeError("Invalid non-string/buffer chunk")),t}function c(A){return!A.ended&&(A.needReadable||A.length<A.highWaterMark||0===A.length)}function d(A){return A>=H?A=H:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}function h(A,e){return A<=0||0===e.length&&e.ended?0:e.objectMode?1:A!==A?e.flowing&&e.length?e.buffer.head.data.length:e.length:(A>e.highWaterMark&&(e.highWaterMark=d(A)),A<=e.length?A:e.ended?e.length:(e.needReadable=!0,0))}function p(A,e){if(!e.ended){if(e.decoder){var t=e.decoder.end();t&&t.length&&(e.buffer.push(t),e.length+=e.objectMode?1:t.length)}e.ended=!0,v(A)}}function v(A){var e=A._readableState;e.needReadable=!1,e.emittedReadable||(U("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?O.nextTick(g,A):g(A))}function g(A){U("emit readable"),A.emit("readable"),k(A)}function m(A,e){e.readingMore||(e.readingMore=!0,O.nextTick(y,A,e))}function y(A,e){for(var t=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(U("maybeReadMore read 0"),A.read(0),t!==e.length);)t=e.length;e.readingMore=!1}function b(A){return function(){var e=A._readableState;U("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&I(A,"data")&&(e.flowing=!0,k(A))}}function _(A){U("readable nexttick read 0"),A.read(0)}function w(A,e){e.resumeScheduled||(e.resumeScheduled=!0,O.nextTick(M,A,e))}function M(A,e){e.reading||(U("resume read 0"),A.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,A.emit("resume"),k(A),e.flowing&&!e.reading&&A.read(0)}function k(A){var e=A._readableState;for(U("flow",e.flowing);e.flowing&&null!==A.read(););}function x(A,e){if(0===e.length)return null;var t;return e.objectMode?t=e.buffer.shift():!A||A>=e.length?(t=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):t=E(A,e.buffer,e.decoder),t}function E(A,e,t){var r;return A<e.head.data.length?(r=e.head.data.slice(0,A),e.head.data=e.head.data.slice(A)):r=A===e.head.data.length?e.shift():t?S(A,e):j(A,e),r}function S(A,e){var t=e.head,r=1,n=t.data;for(A-=n.length;t=t.next;){var i=t.data,o=A>i.length?i.length:A;if(o===i.length?n+=i:n+=i.slice(0,A),0==(A-=o)){o===i.length?(++r,t.next?e.head=t.next:e.head=e.tail=null):(e.head=t,t.data=i.slice(o));break}++r}return e.length-=r,n}function j(A,e){var t=R.allocUnsafe(A),r=e.head,n=1;for(r.data.copy(t),A-=r.data.length;r=r.next;){var i=r.data,o=A>i.length?i.length:A;if(i.copy(t,t.length-A,0,o),0==(A-=o)){o===i.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=i.slice(o));break}++n}return e.length-=n,t}function T(A){var e=A._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,O.nextTick(B,e,A))}function B(A,e){A.endEmitted||0!==A.length||(A.endEmitted=!0,e.readable=!1,e.emit("end"))}function z(A,e){for(var t=0,r=A.length;t<r;t++)if(A[t]===e)return t;return-1}var O=t(5);A.exports=l;var C,P=t(12);l.ReadableState=a;var I=(t(8).EventEmitter,function(A,e){return A.listeners(e).length}),D=t(14),R=t(6).Buffer,N=e.Uint8Array||function(){},F=t(3);F.inherits=t(2);var L=t(33),U=void 0;U=L&&L.debuglog?L.debuglog("stream"):function(){};var W,Y=t(34),V=t(15);F.inherits(l,D);var G=["error","close","destroy","pause","resume"];Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(A){this._readableState&&(this._readableState.destroyed=A)}}),l.prototype.destroy=V.destroy,l.prototype._undestroy=V.undestroy,l.prototype._destroy=function(A,e){this.push(null),e(A)},l.prototype.push=function(A,e){var t,r=this._readableState;return r.objectMode?t=!0:"string"==typeof A&&(e=e||r.defaultEncoding,e!==r.encoding&&(A=R.from(A,e),e=""),t=!0),u(this,A,e,!1,t)},l.prototype.unshift=function(A){return u(this,A,null,!0,!1)},l.prototype.isPaused=function(){return!1===this._readableState.flowing},l.prototype.setEncoding=function(A){return W||(W=t(11).StringDecoder),this._readableState.decoder=new W(A),this._readableState.encoding=A,this};var H=8388608;l.prototype.read=function(A){U("read",A),A=parseInt(A,10);var e=this._readableState,t=A;if(0!==A&&(e.emittedReadable=!1),0===A&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return U("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?T(this):v(this),null;if(0===(A=h(A,e))&&e.ended)return 0===e.length&&T(this),null;var r=e.needReadable;U("need readable",r),(0===e.length||e.length-A<e.highWaterMark)&&(r=!0,U("length less than watermark",r)),e.ended||e.reading?(r=!1,U("reading or ended",r)):r&&(U("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(A=h(t,e)));var n;return n=A>0?x(A,e):null,null===n?(e.needReadable=!0,A=0):e.length-=A,0===e.length&&(e.ended||(e.needReadable=!0),t!==A&&e.ended&&T(this)),null!==n&&this.emit("data",n),n},l.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},l.prototype.pipe=function(A,e){function t(A,e){U("onunpipe"),A===c&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,i())}function n(){U("onend"),A.end()}function i(){U("cleanup"),A.removeListener("close",u),A.removeListener("finish",s),A.removeListener("drain",v),A.removeListener("error",l),A.removeListener("unpipe",t),c.removeListener("end",n),c.removeListener("end",f),c.removeListener("data",a),g=!0,!d.awaitDrain||A._writableState&&!A._writableState.needDrain||v()}function a(e){U("ondata"),m=!1,!1!==A.write(e)||m||((1===d.pipesCount&&d.pipes===A||d.pipesCount>1&&-1!==z(d.pipes,A))&&!g&&(U("false write response, pause",c._readableState.awaitDrain),c._readableState.awaitDrain++,m=!0),c.pause())}function l(e){U("onerror",e),f(),A.removeListener("error",l),0===I(A,"error")&&A.emit("error",e)}function u(){A.removeListener("finish",s),f()}function s(){U("onfinish"),A.removeListener("close",u),f()}function f(){U("unpipe"),c.unpipe(A)}var c=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=A;break;case 1:d.pipes=[d.pipes,A];break;default:d.pipes.push(A)}d.pipesCount+=1,U("pipe count=%d opts=%j",d.pipesCount,e);var h=(!e||!1!==e.end)&&A!==r.stdout&&A!==r.stderr,p=h?n:f;d.endEmitted?O.nextTick(p):c.once("end",p),A.on("unpipe",t);var v=b(c);A.on("drain",v);var g=!1,m=!1;return c.on("data",a),o(A,"error",l),A.once("close",u),A.once("finish",s),A.emit("pipe",c),d.flowing||(U("pipe resume"),c.resume()),A},l.prototype.unpipe=function(A){var e=this._readableState,t={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return A&&A!==e.pipes?this:(A||(A=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,A&&A.emit("unpipe",this,t),this);if(!A){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this,t);return this}var o=z(e.pipes,A);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),A.emit("unpipe",this,t),this)},l.prototype.on=function(A,e){var t=D.prototype.on.ca