w-json-stream 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/.eslintrc.js +17 -17
  2. package/README.md +2 -2
  3. package/babel.config.js +1 -0
  4. package/dist/into-stream.umd.js +2 -2
  5. package/dist/into-stream.umd.js.map +1 -1
  6. package/dist/json-stream-stringify.umd.js +2 -2
  7. package/dist/json-stream-stringify.umd.js.map +1 -1
  8. package/dist/through.umd.js +2 -2
  9. package/dist/through.umd.js.map +1 -1
  10. package/dist/w-json-stream.umd.js +2 -2
  11. package/dist/w-json-stream.umd.js.map +1 -1
  12. package/dist/w-json-stream.wk.umd.js +1 -1
  13. package/docs/WJsonStream.mjs.html +5 -2
  14. package/docs/examples/ex-large-webworker.html +2 -2
  15. package/docs/examples/ex-large.html +3 -3
  16. package/docs/examples/ex-small-stream.html +2 -2
  17. package/docs/examples/ex-small.html +2 -2
  18. package/docs/examples/ex-stream-createParseStream.html +2 -2
  19. package/docs/examples/ex-stream-createParseStreamWithFilter.html +3 -3
  20. package/docs/examples/ex-stream-createStringifyStream.html +2 -2
  21. package/docs/global.html +62 -52
  22. package/docs/index.html +5 -2
  23. package/docs/scripts/collapse.js +19 -0
  24. package/docs/scripts/commonNav.js +28 -0
  25. package/docs/scripts/search.js +16 -0
  26. package/docs/styles/jsdoc.css +13 -2
  27. package/docs/styles/prettify.css +1 -0
  28. package/examples/ex-large-webworker.html +1 -1
  29. package/examples/ex-large.html +2 -2
  30. package/examples/ex-small-stream.html +1 -1
  31. package/examples/ex-small.html +1 -1
  32. package/examples/ex-stream-createParseStream.html +1 -1
  33. package/examples/ex-stream-createParseStreamWithFilter.html +1 -1
  34. package/examples/ex-stream-createStringifyStream.html +1 -1
  35. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * through v1.0.16
2
+ * through v1.0.18
3
3
  * (c) 2018-2021 yuda-lyu(semisphere)
4
4
  * Released under the MIT License.
5
5
  */
6
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).through=t()}(this,(function(){"use strict";function e(){}function t(){t.init.call(this)}function n(e){return void 0===e._maxListeners?t.defaultMaxListeners:e._maxListeners}function r(e,t,n){if(t)e.call(n);else for(var r=e.length,i=l(e,r),o=0;o<r;++o)i[o].call(n)}function i(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=l(e,i),s=0;s<i;++s)o[s].call(n,r)}function o(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,s=l(e,o),a=0;a<o;++a)s[a].call(n,r,i)}function s(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var s=e.length,a=l(e,s),u=0;u<s;++u)a[u].call(n,r,i,o)}function a(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=l(e,i),s=0;s<i;++s)o[s].apply(n,r)}function u(t,r,i,o){var s,a,u,f;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",r,i.listener?i.listener:i),a=t._events),u=a[r]):(a=t._events=new e,t._eventsCount=0),u){if("function"==typeof u?u=a[r]=o?[i,u]:[u,i]:o?u.unshift(i):u.push(i),!u.warned&&(s=n(t))&&s>0&&u.length>s){u.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+r+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=r,h.count=u.length,f=h,"function"==typeof console.warn?console.warn(f):console.log(f)}}else u=a[r]=i,++t._eventsCount;return t}function f(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function h(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function l(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}e.prototype=Object.create(null),t.EventEmitter=t,t.usingDomains=!1,t.prototype.domain=void 0,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this.domain=null,t.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new e,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},t.prototype.getMaxListeners=function(){return n(this)},t.prototype.emit=function(e){var t,n,u,f,h,l,c,d="error"===e;if(l=this._events)d=d&&null==l.error;else if(!d)return!1;if(c=this.domain,d){if(t=arguments[1],!c){if(t instanceof Error)throw t;var p=new Error('Uncaught, unspecified "error" event. ('+t+")");throw p.context=t,p}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=c,t.domainThrown=!1,c.emit("error",t),!1}if(!(n=l[e]))return!1;var g="function"==typeof n;switch(u=arguments.length){case 1:r(n,g,this);break;case 2:i(n,g,this,arguments[1]);break;case 3:o(n,g,this,arguments[1],arguments[2]);break;case 4:s(n,g,this,arguments[1],arguments[2],arguments[3]);break;default:for(f=new Array(u-1),h=1;h<u;h++)f[h-1]=arguments[h];a(n,g,this,f)}return!0},t.prototype.addListener=function(e,t){return u(this,e,t,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(e,t){return u(this,e,t,!0)},t.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,f(this,e,t)),this},t.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,f(this,e,t)),this},t.prototype.removeListener=function(t,n){var r,i,o,s,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===n||r.listener&&r.listener===n)0==--this._eventsCount?this._events=new e:(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if("function"!=typeof r){for(o=-1,s=r.length;s-- >0;)if(r[s]===n||r[s].listener&&r[s].listener===n){a=r[s].listener,o=s;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new e,this;delete i[t]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(r,o);i.removeListener&&this.emit("removeListener",t,a||n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new e,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new e:delete r[t]),this;if(0===arguments.length){for(var i,o=Object.keys(r),s=0;s<o.length;++s)"removeListener"!==(i=o[s])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=new e,this._eventsCount=0,this}if("function"==typeof(n=r[t]))this.removeListener(t,n);else if(n)do{this.removeListener(t,n[n.length-1])}while(n[0]);return this},t.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},t.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},t.prototype.listenerCount=h,t.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var d="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p=[],g=[],y="undefined"!=typeof Uint8Array?Uint8Array:Array,w=!1;function v(){w=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)p[t]=e[t],g[e.charCodeAt(t)]=t;g["-".charCodeAt(0)]=62,g["_".charCodeAt(0)]=63}function b(e,t,n){for(var r,i,o=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(p[(i=r)>>18&63]+p[i>>12&63]+p[i>>6&63]+p[63&i]);return o.join("")}function m(e){var t;w||v();for(var n=e.length,r=n%3,i="",o=[],s=16383,a=0,u=n-r;a<u;a+=s)o.push(b(e,a,a+s>u?u:a+s));return 1===r?(t=e[n-1],i+=p[t>>2],i+=p[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=p[t>>10],i+=p[t>>4&63],i+=p[t<<2&63],i+="="),o.push(i),o.join("")}function _(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,f=u>>1,h=-7,l=n?i-1:0,c=n?-1:1,d=e[t+l];for(l+=c,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=c,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+l],l+=c,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=f}return(d?-1:1)*s*Math.pow(2,o-r)}function E(e,t,n,r,i,o){var s,a,u,f=8*o-i-1,h=(1<<f)-1,l=h>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(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+l>=1?c/u:c*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-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}var R={}.toString,S=Array.isArray||function(e){return"[object Array]"==R.call(e)};function A(){return T.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function L(e,t){if(A()<t)throw new RangeError("Invalid typed array length");return T.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=T.prototype:(null===e&&(e=new T(t)),e.length=t),e}function T(e,t,n){if(!(T.TYPED_ARRAY_SUPPORT||this instanceof T))return new T(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return x(this,e)}return k(this,e,t,n)}function k(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);T.TYPED_ARRAY_SUPPORT?(e=t).__proto__=T.prototype:e=C(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!T.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|O(t,n),i=(e=L(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(B(t)){var n=0|P(t.length);return 0===(e=L(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?L(e,0):C(e,t);if("Buffer"===t.type&&S(t.data))return C(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function M(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function x(e,t){if(M(t),e=L(e,t<0?0:0|P(t)),!T.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function C(e,t){var n=t.length<0?0:0|P(t.length);e=L(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function P(e){if(e>=A())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A().toString(16)+" bytes");return 0|e}function B(e){return!(null==e||!e._isBuffer)}function O(e,t){if(B(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return ae(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ue(e).length;default:if(r)return ae(e).length;t=(""+t).toLowerCase(),r=!0}}function U(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return V(this,t,n);case"utf8":case"utf-8":return $(this,t,n);case"ascii":return G(this,t,n);case"latin1":case"binary":return Z(this,t,n);case"base64":return H(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function j(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function D(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=T.from(t,r)),B(t))return 0===t.length?-1:I(e,t,n,r,i);if("number"==typeof t)return t&=255,T.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):I(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function I(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,c=0;c<u;c++)if(f(e,o+c)!==f(t,c)){l=!1;break}if(l)return o}return-1}function Y(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function z(e,t,n,r){return fe(ae(t,e.length-n),e,n,r)}function q(e,t,n,r){return fe(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function N(e,t,n,r){return q(e,t,n,r)}function W(e,t,n,r){return fe(ue(t),e,n,r)}function F(e,t,n,r){return fe(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function H(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function $(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,f=e[i],h=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=n)switch(l){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=l}return function(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=J));return n}(r)}T.TYPED_ARRAY_SUPPORT=void 0===d.TYPED_ARRAY_SUPPORT||d.TYPED_ARRAY_SUPPORT,T.poolSize=8192,T._augment=function(e){return e.__proto__=T.prototype,e},T.from=function(e,t,n){return k(null,e,t,n)},T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array),T.alloc=function(e,t,n){return function(e,t,n,r){return M(t),t<=0?L(e,t):void 0!==n?"string"==typeof r?L(e,t).fill(n,r):L(e,t).fill(n):L(e,t)}(null,e,t,n)},T.allocUnsafe=function(e){return x(null,e)},T.allocUnsafeSlow=function(e){return x(null,e)},T.isBuffer=function(e){return null!=e&&(!!e._isBuffer||he(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&he(e.slice(0,0))}(e))},T.compare=function(e,t){if(!B(e)||!B(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},T.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},T.concat=function(e,t){if(!S(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return T.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=T.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!B(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},T.byteLength=O,T.prototype._isBuffer=!0,T.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)j(this,t,t+1);return this},T.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)j(this,t,t+3),j(this,t+1,t+2);return this},T.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)j(this,t,t+7),j(this,t+1,t+6),j(this,t+2,t+5),j(this,t+3,t+4);return this},T.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?$(this,0,e):U.apply(this,arguments)},T.prototype.equals=function(e){if(!B(e))throw new TypeError("Argument must be a Buffer");return this===e||0===T.compare(this,e)},T.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},T.prototype.compare=function(e,t,n,r,i){if(!B(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),f=e.slice(t,n),h=0;h<a;++h)if(u[h]!==f[h]){o=u[h],s=f[h];break}return o<s?-1:s<o?1:0},T.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},T.prototype.indexOf=function(e,t,n){return D(this,e,t,n,!0)},T.prototype.lastIndexOf=function(e,t,n){return D(this,e,t,n,!1)},T.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Y(this,e,t,n);case"utf8":case"utf-8":return z(this,e,t,n);case"ascii":return q(this,e,t,n);case"latin1":case"binary":return N(this,e,t,n);case"base64":return W(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;function G(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function Z(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function V(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=se(e[o]);return i}function K(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 Q(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function X(e,t,n,r,i,o){if(!B(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function ee(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function te(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function ne(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function re(e,t,n,r,i){return i||ne(e,0,n,4),E(e,t,n,r,23,4),n+4}function ie(e,t,n,r,i){return i||ne(e,0,n,8),E(e,t,n,r,52,8),n+8}T.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),T.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=T.prototype;else{var i=t-e;n=new T(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},T.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||Q(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},T.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||Q(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},T.prototype.readUInt8=function(e,t){return t||Q(e,1,this.length),this[e]},T.prototype.readUInt16LE=function(e,t){return t||Q(e,2,this.length),this[e]|this[e+1]<<8},T.prototype.readUInt16BE=function(e,t){return t||Q(e,2,this.length),this[e]<<8|this[e+1]},T.prototype.readUInt32LE=function(e,t){return t||Q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},T.prototype.readUInt32BE=function(e,t){return t||Q(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},T.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||Q(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},T.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||Q(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},T.prototype.readInt8=function(e,t){return t||Q(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},T.prototype.readInt16LE=function(e,t){t||Q(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},T.prototype.readInt16BE=function(e,t){t||Q(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},T.prototype.readInt32LE=function(e,t){return t||Q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},T.prototype.readInt32BE=function(e,t){return t||Q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},T.prototype.readFloatLE=function(e,t){return t||Q(e,4,this.length),_(this,e,!0,23,4)},T.prototype.readFloatBE=function(e,t){return t||Q(e,4,this.length),_(this,e,!1,23,4)},T.prototype.readDoubleLE=function(e,t){return t||Q(e,8,this.length),_(this,e,!0,52,8)},T.prototype.readDoubleBE=function(e,t){return t||Q(e,8,this.length),_(this,e,!1,52,8)},T.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||X(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},T.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||X(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},T.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,1,255,0),T.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},T.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ee(this,e,t,!0),t+2},T.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ee(this,e,t,!1),t+2},T.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):te(this,e,t,!0),t+4},T.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):te(this,e,t,!1),t+4},T.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);X(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},T.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);X(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},T.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,1,127,-128),T.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},T.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):ee(this,e,t,!0),t+2},T.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):ee(this,e,t,!1),t+2},T.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,4,2147483647,-2147483648),T.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):te(this,e,t,!0),t+4},T.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||X(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),T.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):te(this,e,t,!1),t+4},T.prototype.writeFloatLE=function(e,t,n){return re(this,e,t,!0,n)},T.prototype.writeFloatBE=function(e,t,n){return re(this,e,t,!1,n)},T.prototype.writeDoubleLE=function(e,t,n){return ie(this,e,t,!0,n)},T.prototype.writeDoubleBE=function(e,t,n){return ie(this,e,t,!1,n)},T.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!T.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},T.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!T.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=B(e)?e:ae(new T(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var oe=/[^+\/0-9A-Za-z-_]/g;function se(e){return e<16?"0"+e.toString(16):e.toString(16)}function ae(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function ue(e){return function(e){var t,n,r,i,o,s;w||v();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,s=new y(3*a/4-o),r=o>0?a-4:a;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=g[e.charCodeAt(t)]<<18|g[e.charCodeAt(t+1)]<<12|g[e.charCodeAt(t+2)]<<6|g[e.charCodeAt(t+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=g[e.charCodeAt(t)]<<2|g[e.charCodeAt(t+1)]>>4,s[u++]=255&i):1===o&&(i=g[e.charCodeAt(t)]<<10|g[e.charCodeAt(t+1)]<<4|g[e.charCodeAt(t+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(oe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function fe(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function he(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function le(){throw new Error("setTimeout has not been defined")}function ce(){throw new Error("clearTimeout has not been defined")}var de=le,pe=ce;function ge(e){if(de===setTimeout)return setTimeout(e,0);if((de===le||!de)&&setTimeout)return de=setTimeout,setTimeout(e,0);try{return de(e,0)}catch(t){try{return de.call(null,e,0)}catch(t){return de.call(this,e,0)}}}"function"==typeof d.setTimeout&&(de=setTimeout),"function"==typeof d.clearTimeout&&(pe=clearTimeout);var ye,we=[],ve=!1,be=-1;function me(){ve&&ye&&(ve=!1,ye.length?we=ye.concat(we):be=-1,we.length&&_e())}function _e(){if(!ve){var e=ge(me);ve=!0;for(var t=we.length;t;){for(ye=we,we=[];++be<t;)ye&&ye[be].run();be=-1,t=we.length}ye=null,ve=!1,function(e){if(pe===clearTimeout)return clearTimeout(e);if((pe===ce||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(e);try{pe(e)}catch(t){try{return pe.call(null,e)}catch(t){return pe.call(this,e)}}}(e)}}function Ee(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];we.push(new Re(e,t)),1!==we.length||ve||ge(_e)}function Re(e,t){this.fun=e,this.array=t}Re.prototype.run=function(){this.fun.apply(null,this.array)};function Se(){}var Ae=Se,Le=Se,Te=Se,ke=Se,Me=Se,xe=Se,Ce=Se;var Pe=d.performance||{},Be=Pe.now||Pe.mozNow||Pe.msNow||Pe.oNow||Pe.webkitNow||function(){return(new Date).getTime()};var Oe=new Date;var Ue={nextTick:Ee,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ae,addListener:Le,once:Te,off:ke,removeListener:Me,removeAllListeners:xe,emit:Ce,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Be.call(Pe),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Oe)/1e3}},je="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},De=/%[sdj%]/g;function Ie(e){if(!Ve(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(Ne(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(De,(function(e){if("%%"===e)return"%";if(n>=i)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(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])Ze(s)||!Xe(s)?o+=" "+s:o+=" "+Ne(s);return o}function Ye(e,t){if(Ke(d.process))return function(){return Ye(e,t).apply(this,arguments)};if(!0===Ue.noDeprecation)return e;var n=!1;return function(){if(!n){if(Ue.throwDeprecation)throw new Error(t);Ue.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var ze,qe={};function Ne(e,t){var n={seen:[],stylize:Fe};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Ge(t)?n.showHidden=t:t&&it(n,t),Ke(n.showHidden)&&(n.showHidden=!1),Ke(n.depth)&&(n.depth=2),Ke(n.colors)&&(n.colors=!1),Ke(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=We),He(n,e,n.depth)}function We(e,t){var n=Ne.styles[t];return n?"["+Ne.colors[n][0]+"m"+e+"["+Ne.colors[n][1]+"m":e}function Fe(e,t){return e}function He(e,t,n){if(e.customInspect&&t&&nt(t.inspect)&&t.inspect!==Ne&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Ve(r)||(r=He(e,r,n)),r}var i=function(e,t){if(Ke(t))return e.stylize("undefined","undefined");if(Ve(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(r=t,"number"==typeof r)return e.stylize(""+t,"number");var r;if(Ge(t))return e.stylize(""+t,"boolean");if(Ze(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),tt(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return $e(t);if(0===o.length){if(nt(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(Qe(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(et(t))return e.stylize(Date.prototype.toString.call(t),"date");if(tt(t))return $e(t)}var u,f,h="",l=!1,c=["{","}"];(u=t,Array.isArray(u)&&(l=!0,c=["[","]"]),nt(t))&&(h=" [Function"+(t.name?": "+t.name:"")+"]");return Qe(t)&&(h=" "+RegExp.prototype.toString.call(t)),et(t)&&(h=" "+Date.prototype.toUTCString.call(t)),tt(t)&&(h=" "+$e(t)),0!==o.length||l&&0!=t.length?n<0?Qe(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=l?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)ot(t,String(s))?o.push(Je(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(Je(e,t,n,r,i,!0))})),o}(e,t,n,s,o):o.map((function(r){return Je(e,t,n,s,r,l)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(f,h,c)):c[0]+h+c[1]}function $e(e){return"["+Error.prototype.toString.call(e)+"]"}function Je(e,t,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),ot(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=Ze(n)?He(e,u.value,null):He(e,u.value,n-1)).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")),Ke(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).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 Ge(e){return"boolean"==typeof e}function Ze(e){return null===e}function Ve(e){return"string"==typeof e}function Ke(e){return void 0===e}function Qe(e){return Xe(e)&&"[object RegExp]"===rt(e)}function Xe(e){return"object"===c(e)&&null!==e}function et(e){return Xe(e)&&"[object Date]"===rt(e)}function tt(e){return Xe(e)&&("[object Error]"===rt(e)||e instanceof Error)}function nt(e){return"function"==typeof e}function rt(e){return Object.prototype.toString.call(e)}function it(e,t){if(!t||!Xe(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function ot(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function st(){this.head=null,this.tail=null,this.length=0}Ne.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]},Ne.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},st.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},st.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},st.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},st.prototype.clear=function(){this.head=this.tail=null,this.length=0},st.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},st.prototype.concat=function(e){if(0===this.length)return T.alloc(0);if(1===this.length)return this.head.data;for(var t=T.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var at=T.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}};function ut(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!at(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ht;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=lt;break;default:return void(this.write=ft)}this.charBuffer=new T(6),this.charReceived=0,this.charLength=0}function ft(e){return e.toString(this.encoding)}function ht(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function lt(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}ut.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if((i=t.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},ut.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(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},ut.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},pt.ReadableState=dt;var ct=function(e){if(Ke(ze)&&(ze=Ue.env.NODE_DEBUG||""),e=e.toUpperCase(),!qe[e])if(new RegExp("\\b"+e+"\\b","i").test(ze)){qe[e]=function(){var t=Ie.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else qe[e]=function(){};return qe[e]}("stream");function dt(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Nt&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new st,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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new ut(e.encoding),this.encoding=e.encoding)}function pt(e){if(!(this instanceof pt))return new pt(e);this._readableState=new dt(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),t.call(this)}function gt(e,t,n,r,i){var o=function(e,t){var n=null;T.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,vt(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&vt(e))),function(e,t){t.readingMore||(t.readingMore=!0,Ee(mt,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}je(pt,t),pt.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=T.from(e,t),t=""),gt(this,n,e,t,!1)},pt.prototype.unshift=function(e){return gt(this,this._readableState,e,"",!0)},pt.prototype.isPaused=function(){return!1===this._readableState.flowing},pt.prototype.setEncoding=function(e){return this._readableState.decoder=new ut(e),this._readableState.encoding=e,this};var yt=8388608;function wt(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=yt?e=yt:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function vt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(ct("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ee(bt,e):bt(e))}function bt(e){ct("emit readable"),e.emit("readable"),Rt(e)}function mt(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(ct("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function _t(e){ct("readable nexttick read 0"),e.read(0)}function Et(e,t){t.reading||(ct("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Rt(e),t.flowing&&!t.reading&&e.read(0)}function Rt(e){var t=e._readableState;for(ct("flow",t.flowing);t.flowing&&null!==e.read(););}function St(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=T.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0===(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function At(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ee(Lt,t,e))}function Lt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Tt(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function kt(){}function Mt(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function xt(e,t){Object.defineProperty(this,"buffer",{get:Ye((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Nt&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?Ee(i,r):i(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=Ut(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Ot(e,n),r?Ee(Bt,e,n,o,i):Bt(e,n,o,i)}}(t,e)},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 It(this)}function Ct(e){if(!(this instanceof Ct||this instanceof Nt))return new Ct(e);this._writableState=new xt(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),t.call(this)}function Pt(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function Bt(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),Dt(e,t)}function Ot(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;Pt(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new It(t)}else{for(;n;){var a=n.chunk,u=n.encoding,f=n.callback;if(Pt(e,t,!1,t.objectMode?1:a.length,a,u,f),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function Ut(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function jt(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Dt(e,t){var n=Ut(t);return n&&(0===t.pendingcb?(jt(e,t),t.finished=!0,e.emit("finish")):jt(e,t)),n}function It(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}pt.prototype.read=function(e){ct("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return ct("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?At(this):vt(this),null;if(0===(e=wt(e,t))&&t.ended)return 0===t.length&&At(this),null;var r,i=t.needReadable;return ct("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&ct("length less than watermark",i=!0),t.ended||t.reading?ct("reading or ended",i=!1):i&&(ct("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=wt(n,t))),null===(r=e>0?St(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&At(this)),null!==r&&this.emit("data",r),r},pt.prototype._read=function(e){this.emit("error",new Error("not implemented"))},pt.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,ct("pipe count=%d opts=%j",r.pipesCount,t);var i=!t||!1!==t.end?s:f;function o(e){ct("onunpipe"),e===n&&f()}function s(){ct("onend"),e.end()}r.endEmitted?Ee(i):n.once("end",i),e.on("unpipe",o);var a=function(e){return function(){var t=e._readableState;ct("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Rt(e))}}(n);e.on("drain",a);var u=!1;function f(){ct("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",a),e.removeListener("error",c),e.removeListener("unpipe",o),n.removeListener("end",s),n.removeListener("end",f),n.removeListener("data",l),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var h=!1;function l(t){ct("ondata"),h=!1,!1!==e.write(t)||h||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==Tt(r.pipes,e))&&!u&&(ct("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function c(t){var n;ct("onerror",t),g(),e.removeListener("error",c),0===(n="error",e.listeners(n).length)&&e.emit("error",t)}function d(){e.removeListener("finish",p),g()}function p(){ct("onfinish"),e.removeListener("close",d),g()}function g(){ct("unpipe"),n.unpipe(e)}return n.on("data",l),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",c),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(ct("pipe resume"),n.resume()),e},pt.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=Tt(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},pt.prototype.on=function(e,n){var r=t.prototype.on.call(this,e,n);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&vt(this):Ee(_t,this))}return r},pt.prototype.addListener=pt.prototype.on,pt.prototype.resume=function(){var e=this._readableState;return e.flowing||(ct("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ee(Et,e,t))}(this,e)),this},pt.prototype.pause=function(){return ct("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(ct("pause"),this._readableState.flowing=!1,this.emit("pause")),this},pt.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(ct("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){(ct("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){ct("wrapped _read",t),n&&(n=!1,e.resume())},r},pt._fromList=St,Ct.WritableState=xt,je(Ct,t),xt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Ct.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Ct.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),T.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=kt),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),Ee(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):T.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ee(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=T.from(t,n));return t}(t,n,r),T.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new Mt(n,r,i),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Pt(e,t,!1,o,n,r,i);return s}(this,r,e,t,n)),i},Ct.prototype.cork=function(){this._writableState.corked++},Ct.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Ot(this,e))},Ct.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Ct.prototype._write=function(e,t,n){n(new Error("not implemented"))},Ct.prototype._writev=null,Ct.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),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,Dt(e,t),n&&(t.finished?Ee(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},je(Nt,pt);for(var Yt=Object.keys(Ct.prototype),zt=0;zt<Yt.length;zt++){var qt=Yt[zt];Nt.prototype[qt]||(Nt.prototype[qt]=Ct.prototype[qt])}function Nt(e){if(!(this instanceof Nt))return new Nt(e);pt.call(this,e),Ct.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Wt)}function Wt(){this.allowHalfOpen||this._writableState.ended||Ee(Ft,this)}function Ft(e){e.end()}function Ht(e){this.afterTransform=function(t,n){return function(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&&e.push(n);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function $t(e){if(!(this instanceof $t))return new $t(e);Nt.call(this,e),this._transformState=new Ht(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Jt(t,e)})):Jt(t)}))}function Jt(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=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)}function Gt(e){if(!(this instanceof Gt))return new Gt(e);$t.call(this,e)}function Zt(){t.call(this)}function Vt(e,t,n){e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};var r=!1,i=!1,o=[],s=!1,a=new Zt;function u(){for(;o.length&&!a.paused;){var e=o.shift();if(null===e)return a.emit("end");a.emit("data",e)}}function f(){a.writable=!1,t.call(a),!a.readable&&a.autoDestroy&&a.destroy()}return a.readable=a.writable=!0,a.paused=!1,a.autoDestroy=!(n&&!1===n.autoDestroy),a.write=function(t){return e.call(this,t),!a.paused},a.queue=a.push=function(e){return s||(null===e&&(s=!0),o.push(e),u()),a},a.on("end",(function(){a.readable=!1,!a.writable&&a.autoDestroy&&Ue.nextTick((function(){a.destroy()}))})),a.end=function(e){if(!r)return r=!0,arguments.length&&a.write(e),f(),a},a.destroy=function(){if(!i)return i=!0,r=!0,o.length=0,a.writable=a.readable=!1,a.emit("close"),a},a.pause=function(){if(!a.paused)return a.paused=!0,a},a.resume=function(){return a.paused&&(a.paused=!1,a.emit("resume")),u(),a.paused||a.emit("drain"),a},a}return je($t,Nt),$t.prototype.push=function(e,t){return this._transformState.needTransform=!1,Nt.prototype.push.call(this,e,t)},$t.prototype._transform=function(e,t,n){throw new Error("Not implemented")},$t.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)}},$t.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},je(Gt,$t),Gt.prototype._transform=function(e,t,n){n(null,e)},je(Zt,t),Zt.Readable=pt,Zt.Writable=Ct,Zt.Duplex=Nt,Zt.Transform=$t,Zt.PassThrough=Gt,Zt.Stream=Zt,Zt.prototype.pipe=function(e,n){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||n&&!1===n.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(h(),0===t.listenerCount(this,"error"))throw e}function h(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",h),r.removeListener("close",h),e.removeListener("close",h)}return r.on("error",f),e.on("error",f),r.on("end",h),r.on("close",h),e.on("close",h),e.emit("pipe",r),e},Vt.through=Vt,Vt}));
6
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).through=t()}(this,(function(){"use strict";function e(){}function t(){t.init.call(this)}function n(e){return void 0===e._maxListeners?t.defaultMaxListeners:e._maxListeners}function r(t,r,i,o){var s,a,u,f;if("function"!=typeof i)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",r,i.listener?i.listener:i),a=t._events),u=a[r]):(a=t._events=new e,t._eventsCount=0),u){if("function"==typeof u?u=a[r]=o?[i,u]:[u,i]:o?u.unshift(i):u.push(i),!u.warned&&(s=n(t))&&s>0&&u.length>s){u.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+r+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=r,h.count=u.length,f=h,"function"==typeof console.warn?console.warn(f):console.log(f)}}else u=a[r]=i,++t._eventsCount;return t}function i(e,t,n){var r=!1;function i(){e.removeListener(t,i),r||(r=!0,n.apply(e,arguments))}return i.listener=n,i}function o(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function s(e,t){for(var n=new Array(t);t--;)n[t]=e[t];return n}e.prototype=Object.create(null),t.EventEmitter=t,t.usingDomains=!1,t.prototype.domain=void 0,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.init=function(){this.domain=null,t.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new e,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},t.prototype.getMaxListeners=function(){return n(this)},t.prototype.emit=function(e){var t,n,r,i,o,a,u,f="error"===e;if(a=this._events)f=f&&null==a.error;else if(!f)return!1;if(u=this.domain,f){if(t=arguments[1],!u){if(t instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=u,t.domainThrown=!1,u.emit("error",t),!1}if(!(n=a[e]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,i=s(e,r),o=0;o<r;++o)i[o].call(n)}(n,l,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var i=e.length,o=s(e,i),a=0;a<i;++a)o[a].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(e,t,n,r,i){if(t)e.call(n,r,i);else for(var o=e.length,a=s(e,o),u=0;u<o;++u)a[u].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,i,o){if(t)e.call(n,r,i,o);else for(var a=e.length,u=s(e,a),f=0;f<a;++f)u[f].call(n,r,i,o)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];!function(e,t,n,r){if(t)e.apply(n,r);else for(var i=e.length,o=s(e,i),a=0;a<i;++a)o[a].apply(n,r)}(n,l,this,i)}return!0},t.prototype.addListener=function(e,t){return r(this,e,t,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(e,t){return r(this,e,t,!0)},t.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,i(this,e,t)),this},t.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,i(this,e,t)),this},t.prototype.removeListener=function(t,n){var r,i,o,s,a;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===n||r.listener&&r.listener===n)0==--this._eventsCount?this._events=new e:(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||n));else if("function"!=typeof r){for(o=-1,s=r.length;s-- >0;)if(r[s]===n||r[s].listener&&r[s].listener===n){a=r[s].listener,o=s;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new e,this;delete i[t]}else!function(e,t){for(var n=t,r=n+1,i=e.length;r<i;n+=1,r+=1)e[n]=e[r];e.pop()}(r,o);i.removeListener&&this.emit("removeListener",t,a||n)}return this},t.prototype.removeAllListeners=function(t){var n,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new e,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new e:delete r[t]),this;if(0===arguments.length){for(var i,o=Object.keys(r),s=0;s<o.length;++s)"removeListener"!==(i=o[s])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=new e,this._eventsCount=0,this}if("function"==typeof(n=r[t]))this.removeListener(t,n);else if(n)do{this.removeListener(t,n[n.length-1])}while(n[0]);return this},t.prototype.listeners=function(e){var t,n=this._events;return n&&(t=n[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(t):[]},t.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):o.call(e,t)},t.prototype.listenerCount=o,t.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var a="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u=[],f=[],h="undefined"!=typeof Uint8Array?Uint8Array:Array,l=!1;function c(){l=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,n=e.length;t<n;++t)u[t]=e[t],f[e.charCodeAt(t)]=t;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63}function d(e,t,n){for(var r,i,o=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(u[(i=r)>>18&63]+u[i>>12&63]+u[i>>6&63]+u[63&i]);return o.join("")}function p(e){var t;l||c();for(var n=e.length,r=n%3,i="",o=[],s=16383,a=0,f=n-r;a<f;a+=s)o.push(d(e,a,a+s>f?f:a+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}function g(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,f=u>>1,h=-7,l=n?i-1:0,c=n?-1:1,d=e[t+l];for(l+=c,o=d&(1<<-h)-1,d>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=c,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+l],l+=c,h-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=f}return(d?-1:1)*s*Math.pow(2,o-r)}function w(e,t,n,r,i,o){var s,a,u,f=8*o-i-1,h=(1<<f)-1,l=h>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(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+l>=1?c/u:c*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-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}var y={}.toString,v=Array.isArray||function(e){return"[object Array]"==y.call(e)};function b(){return _.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function m(e,t){if(b()<t)throw new RangeError("Invalid typed array length");return _.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=_.prototype:(null===e&&(e=new _(t)),e.length=t),e}function _(e,t,n){if(!(_.TYPED_ARRAY_SUPPORT||this instanceof _))return new _(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return S(this,e)}return E(this,e,t,n)}function E(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);_.TYPED_ARRAY_SUPPORT?(e=t).__proto__=_.prototype:e=A(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!_.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|k(t,n);e=m(e,r);var i=e.write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(T(t)){var n=0|L(t.length);return 0===(e=m(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?m(e,0):A(e,t);if("Buffer"===t.type&&v(t.data))return A(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function R(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function S(e,t){if(R(t),e=m(e,t<0?0:0|L(t)),!_.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function A(e,t){var n=t.length<0?0:0|L(t.length);e=m(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function L(e){if(e>=b())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b().toString(16)+" bytes");return 0|e}function T(e){return!(null==e||!e._isBuffer)}function k(e,t){if(T(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return te(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ne(e).length;default:if(r)return te(e).length;t=(""+t).toLowerCase(),r=!0}}function M(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return F(this,t,n);case"utf8":case"utf-8":return z(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return W(this,t,n);case"base64":return Y(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function C(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=_.from(t,r)),T(t))return 0===t.length?-1:P(e,t,n,r,i);if("number"==typeof t)return t&=255,_.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):P(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function P(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(f(e,o)===f(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,c=0;c<u;c++)if(f(e,o+c)!==f(t,c)){l=!1;break}if(l)return o}return-1}function B(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function O(e,t,n,r){return re(te(t,e.length-n),e,n,r)}function U(e,t,n,r){return re(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function j(e,t,n,r){return U(e,t,n,r)}function D(e,t,n,r){return re(ne(t),e,n,r)}function I(e,t,n,r){return re(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(n=e.charCodeAt(s))>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function Y(e,t,n){return 0===t&&n===e.length?p(e):p(e.slice(t,n))}function z(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,f=e[i],h=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=n)switch(l){case 1:f<128&&(h=f);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&f)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=l}return function(e){var t=e.length;if(t<=q)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=q));return n}(r)}_.TYPED_ARRAY_SUPPORT=void 0===a.TYPED_ARRAY_SUPPORT||a.TYPED_ARRAY_SUPPORT,b(),_.poolSize=8192,_._augment=function(e){return e.__proto__=_.prototype,e},_.from=function(e,t,n){return E(null,e,t,n)},_.TYPED_ARRAY_SUPPORT&&(_.prototype.__proto__=Uint8Array.prototype,_.__proto__=Uint8Array),_.alloc=function(e,t,n){return function(e,t,n,r){return R(t),t<=0?m(e,t):void 0!==n?"string"==typeof r?m(e,t).fill(n,r):m(e,t).fill(n):m(e,t)}(null,e,t,n)},_.allocUnsafe=function(e){return S(null,e)},_.allocUnsafeSlow=function(e){return S(null,e)},_.isBuffer=function(e){return null!=e&&(!!e._isBuffer||ie(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ie(e.slice(0,0))}(e))},_.compare=function(e,t){if(!T(e)||!T(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},_.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},_.concat=function(e,t){if(!v(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return _.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=_.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!T(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},_.byteLength=k,_.prototype._isBuffer=!0,_.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)x(this,t,t+1);return this},_.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},_.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},_.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?z(this,0,e):M.apply(this,arguments)},_.prototype.equals=function(e){if(!T(e))throw new TypeError("Argument must be a Buffer");return this===e||0===_.compare(this,e)},_.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},_.prototype.compare=function(e,t,n,r,i){if(!T(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),u=this.slice(r,i),f=e.slice(t,n),h=0;h<a;++h)if(u[h]!==f[h]){o=u[h],s=f[h];break}return o<s?-1:s<o?1:0},_.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},_.prototype.indexOf=function(e,t,n){return C(this,e,t,n,!0)},_.prototype.lastIndexOf=function(e,t,n){return C(this,e,t,n,!1)},_.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return B(this,e,t,n);case"utf8":case"utf-8":return O(this,e,t,n);case"ascii":return U(this,e,t,n);case"latin1":case"binary":return j(this,e,t,n);case"base64":return D(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var q=4096;function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function W(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function F(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=ee(e[o]);return i}function H(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 $(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,i,o){if(!T(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function G(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function Z(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function V(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function K(e,t,n,r,i){return i||V(e,0,n,4),w(e,t,n,r,23,4),n+4}function Q(e,t,n,r,i){return i||V(e,0,n,8),w(e,t,n,r,52,8),n+8}_.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),_.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=_.prototype;else{var i=t-e;n=new _(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},_.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},_.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},_.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]},_.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8},_.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]},_.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},_.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},_.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},_.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},_.prototype.readInt8=function(e,t){return t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},_.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},_.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},_.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},_.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},_.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),g(this,e,!0,23,4)},_.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),g(this,e,!1,23,4)},_.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),g(this,e,!0,52,8)},_.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),g(this,e,!1,52,8)},_.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||J(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},_.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||J(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},_.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,1,255,0),_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},_.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},_.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},_.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Z(this,e,t,!0),t+4},_.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Z(this,e,t,!1),t+4},_.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);J(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},_.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);J(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},_.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,1,127,-128),_.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},_.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):G(this,e,t,!0),t+2},_.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):G(this,e,t,!1),t+2},_.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,2147483647,-2147483648),_.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Z(this,e,t,!0),t+4},_.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),_.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Z(this,e,t,!1),t+4},_.prototype.writeFloatLE=function(e,t,n){return K(this,e,t,!0,n)},_.prototype.writeFloatBE=function(e,t,n){return K(this,e,t,!1,n)},_.prototype.writeDoubleLE=function(e,t,n){return Q(this,e,t,!0,n)},_.prototype.writeDoubleBE=function(e,t,n){return Q(this,e,t,!1,n)},_.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!_.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},_.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!_.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=T(e)?e:te(new _(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var X=/[^+\/0-9A-Za-z-_]/g;function ee(e){return e<16?"0"+e.toString(16):e.toString(16)}function te(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function ne(e){return function(e){var t,n,r,i,o,s;l||c();var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,s=new h(3*a/4-o),r=o>0?a-4:a;var u=0;for(t=0,n=0;t<r;t+=4,n+=3)i=f[e.charCodeAt(t)]<<18|f[e.charCodeAt(t+1)]<<12|f[e.charCodeAt(t+2)]<<6|f[e.charCodeAt(t+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=f[e.charCodeAt(t)]<<2|f[e.charCodeAt(t+1)]>>4,s[u++]=255&i):1===o&&(i=f[e.charCodeAt(t)]<<10|f[e.charCodeAt(t+1)]<<4|f[e.charCodeAt(t+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function re(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function ie(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function oe(){throw new Error("setTimeout has not been defined")}function se(){throw new Error("clearTimeout has not been defined")}var ae=oe,ue=se;function fe(e){if(ae===setTimeout)return setTimeout(e,0);if((ae===oe||!ae)&&setTimeout)return ae=setTimeout,setTimeout(e,0);try{return ae(e,0)}catch(t){try{return ae.call(null,e,0)}catch(t){return ae.call(this,e,0)}}}"function"==typeof a.setTimeout&&(ae=setTimeout),"function"==typeof a.clearTimeout&&(ue=clearTimeout);var he,le=[],ce=!1,de=-1;function pe(){ce&&he&&(ce=!1,he.length?le=he.concat(le):de=-1,le.length&&ge())}function ge(){if(!ce){var e=fe(pe);ce=!0;for(var t=le.length;t;){for(he=le,le=[];++de<t;)he&&he[de].run();de=-1,t=le.length}he=null,ce=!1,function(e){if(ue===clearTimeout)return clearTimeout(e);if((ue===se||!ue)&&clearTimeout)return ue=clearTimeout,clearTimeout(e);try{return ue(e)}catch(t){try{return ue.call(null,e)}catch(t){return ue.call(this,e)}}}(e)}}function we(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];le.push(new ye(e,t)),1!==le.length||ce||fe(ge)}function ye(e,t){this.fun=e,this.array=t}ye.prototype.run=function(){this.fun.apply(null,this.array)};function ve(){}var be=ve,me=ve,_e=ve,Ee=ve,Re=ve,Se=ve,Ae=ve;var Le=a.performance||{},Te=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return(new Date).getTime()};var ke=new Date;var Me={nextTick:we,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:be,addListener:me,once:_e,off:Ee,removeListener:Re,removeAllListeners:Se,emit:Ae,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Te.call(Le),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-ke)/1e3}},xe="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},Ce=/%[sdj%]/g;function Pe(e){if(!Fe(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(je(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,o=String(e).replace(Ce,(function(e){if("%%"===e)return"%";if(n>=i)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(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])We(s)||!Je(s)?o+=" "+s:o+=" "+je(s);return o}function Be(e,t){if(He(a.process))return function(){return Be(e,t).apply(this,arguments)};if(!0===Me.noDeprecation)return e;var n=!1;return function(){if(!n){if(Me.throwDeprecation)throw new Error(t);Me.traceDeprecation?console.trace(t):console.error(t),n=!0}return e.apply(this,arguments)}}var Oe,Ue={};function je(e,t){var n={seen:[],stylize:Ie};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),Ne(t)?n.showHidden=t:t&&function(e,t){if(!t||!Je(t))return e;var n=Object.keys(t),r=n.length;for(;r--;)e[n[r]]=t[n[r]]}(n,t),He(n.showHidden)&&(n.showHidden=!1),He(n.depth)&&(n.depth=2),He(n.colors)&&(n.colors=!1),He(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=De),Ye(n,e,n.depth)}function De(e,t){var n=je.styles[t];return n?"["+je.colors[n][0]+"m"+e+"["+je.colors[n][1]+"m":e}function Ie(e,t){return e}function Ye(e,t,n){if(e.customInspect&&t&&Ve(t.inspect)&&t.inspect!==je&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(n,e);return Fe(r)||(r=Ye(e,r,n)),r}var i=function(e,t){if(He(t))return e.stylize("undefined","undefined");if(Fe(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(r=t,"number"==typeof r)return e.stylize(""+t,"number");var r;if(Ne(t))return e.stylize(""+t,"boolean");if(We(t))return e.stylize("null","null")}(e,t);if(i)return i;var o=Object.keys(t),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),Ze(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return ze(t);if(0===o.length){if(Ve(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if($e(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Ge(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Ze(t))return ze(t)}var u,f,h="",l=!1,c=["{","}"];(u=t,Array.isArray(u)&&(l=!0,c=["[","]"]),Ve(t))&&(h=" [Function"+(t.name?": "+t.name:"")+"]");return $e(t)&&(h=" "+RegExp.prototype.toString.call(t)),Ge(t)&&(h=" "+Date.prototype.toUTCString.call(t)),Ze(t)&&(h=" "+ze(t)),0!==o.length||l&&0!=t.length?n<0?$e(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),f=l?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)Qe(t,String(s))?o.push(qe(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(qe(e,t,n,r,i,!0))})),o}(e,t,n,s,o):o.map((function(r){return qe(e,t,n,s,r,l)})),e.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(f,h,c)):c[0]+h+c[1]}function ze(e){return"["+Error.prototype.toString.call(e)+"]"}function qe(e,t,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),Qe(r,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=We(n)?Ye(e,u.value,null):Ye(e,u.value,n-1)).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")),He(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).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 Ne(e){return"boolean"==typeof e}function We(e){return null===e}function Fe(e){return"string"==typeof e}function He(e){return void 0===e}function $e(e){return Je(e)&&"[object RegExp]"===Ke(e)}function Je(e){return"object"==typeof e&&null!==e}function Ge(e){return Je(e)&&"[object Date]"===Ke(e)}function Ze(e){return Je(e)&&("[object Error]"===Ke(e)||e instanceof Error)}function Ve(e){return"function"==typeof e}function Ke(e){return Object.prototype.toString.call(e)}function Qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xe(){this.head=null,this.tail=null,this.length=0}je.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]},je.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Xe.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Xe.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Xe.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Xe.prototype.clear=function(){this.head=this.tail=null,this.length=0},Xe.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},Xe.prototype.concat=function(e){if(0===this.length)return _.alloc(0);if(1===this.length)return this.head.data;for(var t=_.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t};var et=_.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}};function tt(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!et(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=rt;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=it;break;default:return void(this.write=nt)}this.charBuffer=new _(6),this.charReceived=0,this.charLength=0}function nt(e){return e.toString(this.encoding)}function rt(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function it(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}tt.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((i=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived);var i;r=(t+=e.toString(this.encoding,0,r)).length-1;if((i=t.charCodeAt(r))>=55296&&i<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,r)}return t},tt.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(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},tt.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},at.ReadableState=st;var ot=function(e){if(He(Oe)&&(Oe=Me.env.NODE_DEBUG||""),e=e.toUpperCase(),!Ue[e])if(new RegExp("\\b"+e+"\\b","i").test(Oe)){Ue[e]=function(){var t=Pe.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else Ue[e]=function(){};return Ue[e]}("stream");function st(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Ut&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.buffer=new Xe,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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new tt(e.encoding),this.encoding=e.encoding)}function at(e){if(!(this instanceof at))return new at(e);this._readableState=new st(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),t.call(this)}function ut(e,t,n,r,i){var o=function(e,t){var n=null;_.isBuffer(t)||"string"==typeof t||null==t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,lt(e)}(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var s=new Error("stream.push() after EOF");e.emit("error",s)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else{var u;!t.decoder||i||r||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&lt(e))),function(e,t){t.readingMore||(t.readingMore=!0,we(dt,e,t))}(e,t)}else i||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}xe(at,t),at.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||"string"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=_.from(e,t),t=""),ut(this,n,e,t,!1)},at.prototype.unshift=function(e){return ut(this,this._readableState,e,"",!0)},at.prototype.isPaused=function(){return!1===this._readableState.flowing},at.prototype.setEncoding=function(e){return this._readableState.decoder=new tt(e),this._readableState.encoding=e,this};var ft=8388608;function ht(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=ft?e=ft:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function lt(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(ot("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?we(ct,e):ct(e))}function ct(e){ot("emit readable"),e.emit("readable"),wt(e)}function dt(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(ot("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function pt(e){ot("readable nexttick read 0"),e.read(0)}function gt(e,t){t.reading||(ot("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),wt(e),t.flowing&&!t.reading&&e.read(0)}function wt(e){var t=e._readableState;for(ot("flow",t.flowing);t.flowing&&null!==e.read(););}function yt(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=_.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0===(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function vt(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,we(bt,t,e))}function bt(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function mt(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function _t(){}function Et(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function Rt(e,t){Object.defineProperty(this,"buffer",{get:Be((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Ut&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,r=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?we(i,r):i(r);e._writableState.errorEmitted=!0,e.emit("error",r)}(e,n,r,t,i);else{var o=kt(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||Tt(e,n),r?we(Lt,e,n,o,i):Lt(e,n,o,i)}}(t,e)},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 Ct(this)}function St(e){if(!(this instanceof St||this instanceof Ut))return new St(e);this._writableState=new Rt(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),t.call(this)}function At(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function Lt(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),xt(e,t)}function Tt(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0;n;)i[s]=n,n=n.next,s+=1;At(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new Ct(t)}else{for(;n;){var a=n.chunk,u=n.encoding,f=n.callback;if(At(e,t,!1,t.objectMode?1:a.length,a,u,f),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function kt(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Mt(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function xt(e,t){var n=kt(t);return n&&(0===t.pendingcb?(Mt(e,t),t.finished=!0,e.emit("finish")):Mt(e,t)),n}function Ct(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}at.prototype.read=function(e){ot("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return ot("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?vt(this):lt(this),null;if(0===(e=ht(e,t))&&t.ended)return 0===t.length&&vt(this),null;var r,i=t.needReadable;return ot("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&ot("length less than watermark",i=!0),t.ended||t.reading?ot("reading or ended",i=!1):i&&(ot("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ht(n,t))),null===(r=e>0?yt(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&vt(this)),null!==r&&this.emit("data",r),r},at.prototype._read=function(e){this.emit("error",new Error("not implemented"))},at.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,ot("pipe count=%d opts=%j",r.pipesCount,t);var i=!t||!1!==t.end?s:f;function o(e){ot("onunpipe"),e===n&&f()}function s(){ot("onend"),e.end()}r.endEmitted?we(i):n.once("end",i),e.on("unpipe",o);var a=function(e){return function(){var t=e._readableState;ot("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,wt(e))}}(n);e.on("drain",a);var u=!1;function f(){ot("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",a),e.removeListener("error",c),e.removeListener("unpipe",o),n.removeListener("end",s),n.removeListener("end",f),n.removeListener("data",l),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||a()}var h=!1;function l(t){ot("ondata"),h=!1,!1!==e.write(t)||h||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==mt(r.pipes,e))&&!u&&(ot("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,h=!0),n.pause())}function c(t){var n;ot("onerror",t),g(),e.removeListener("error",c),0===(n="error",e.listeners(n).length)&&e.emit("error",t)}function d(){e.removeListener("finish",p),g()}function p(){ot("onfinish"),e.removeListener("close",d),g()}function g(){ot("unpipe"),n.unpipe(e)}return n.on("data",l),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",c),e.once("close",d),e.once("finish",p),e.emit("pipe",n),r.flowing||(ot("pipe resume"),n.resume()),e},at.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}var o=mt(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this)),this},at.prototype.on=function(e,n){var r=t.prototype.on.call(this,e,n);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var i=this._readableState;i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&lt(this):we(pt,this))}return r},at.prototype.addListener=at.prototype.on,at.prototype.resume=function(){var e=this._readableState;return e.flowing||(ot("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,we(gt,e,t))}(this,e)),this},at.prototype.pause=function(){return ot("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(ot("pause"),this._readableState.flowing=!1,this.emit("pause")),this},at.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;for(var i in e.on("end",(function(){if(ot("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)})),e.on("data",(function(i){(ot("wrapped data"),t.decoder&&(i=t.decoder.write(i)),t.objectMode&&null==i)||(t.objectMode||i&&i.length)&&(r.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,r.emit.bind(r,t))})),r._read=function(t){ot("wrapped _read",t),n&&(n=!1,e.resume())},r},at._fromList=yt,St.WritableState=Rt,xe(St,t),Rt.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},St.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},St.prototype.write=function(e,t,n){var r=this._writableState,i=!1;return"function"==typeof t&&(n=t,t=null),_.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=_t),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),we(t,n)}(this,n):function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):_.isBuffer(n)||"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),we(r,o),i=!1),i}(this,r,e,n)&&(r.pendingcb++,i=function(e,t,n,r,i){n=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=_.from(t,n));return t}(t,n,r),_.isBuffer(n)&&(r="buffer");var o=t.objectMode?1:n.length;t.length+=o;var s=t.length<t.highWaterMark;s||(t.needDrain=!0);if(t.writing||t.corked){var a=t.lastBufferedRequest;t.lastBufferedRequest=new Et(n,r,i),a?a.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else At(e,t,!1,o,n,r,i);return s}(this,r,e,t,n)),i},St.prototype.cork=function(){this._writableState.corked++},St.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Tt(this,e))},St.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},St.prototype._write=function(e,t,n){n(new Error("not implemented"))},St.prototype._writev=null,St.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),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,xt(e,t),n&&(t.finished?we(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},xe(Ut,at);for(var Pt=Object.keys(St.prototype),Bt=0;Bt<Pt.length;Bt++){var Ot=Pt[Bt];Ut.prototype[Ot]||(Ut.prototype[Ot]=St.prototype[Ot])}function Ut(e){if(!(this instanceof Ut))return new Ut(e);at.call(this,e),St.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",jt)}function jt(){this.allowHalfOpen||this._writableState.ended||we(Dt,this)}function Dt(e){e.end()}function It(e){this.afterTransform=function(t,n){return function(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&&e.push(n);i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function Yt(e){if(!(this instanceof Yt))return new Yt(e);Ut.call(this,e),this._transformState=new It(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){zt(t,e)})):zt(t)}))}function zt(e,t){if(t)return e.emit("error",t);var n=e._writableState,r=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)}function qt(e){if(!(this instanceof qt))return new qt(e);Yt.call(this,e)}function Nt(){t.call(this)}function Wt(e,t,n){e=e||function(e){this.queue(e)},t=t||function(){this.queue(null)};let r=!1,i=!1,o=[],s=!1,a=new Nt;function u(){for(;o.length&&!a.paused;){let e=o.shift();if(null===e)return a.emit("end");a.emit("data",e)}}return a.readable=a.writable=!0,a.paused=!1,a.autoDestroy=!(n&&!1===n.autoDestroy),a.write=function(t){return e.call(this,t),!a.paused},a.queue=a.push=function(e){return s||(null===e&&(s=!0),o.push(e),u()),a},a.on("end",(function(){a.readable=!1,!a.writable&&a.autoDestroy&&Me.nextTick((function(){a.destroy()}))})),a.end=function(e){if(!r)return r=!0,arguments.length&&a.write(e),a.writable=!1,t.call(a),!a.readable&&a.autoDestroy&&a.destroy(),a},a.destroy=function(){if(!i)return i=!0,r=!0,o.length=0,a.writable=a.readable=!1,a.emit("close"),a},a.pause=function(){if(!a.paused)return a.paused=!0,a},a.resume=function(){return a.paused&&(a.paused=!1,a.emit("resume")),u(),a.paused||a.emit("drain"),a},a}return xe(Yt,Ut),Yt.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ut.prototype.push.call(this,e,t)},Yt.prototype._transform=function(e,t,n){throw new Error("Not implemented")},Yt.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)}},Yt.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},xe(qt,Yt),qt.prototype._transform=function(e,t,n){n(null,e)},xe(Nt,t),Nt.Readable=at,Nt.Writable=St,Nt.Duplex=Ut,Nt.Transform=Yt,Nt.PassThrough=qt,Nt.Stream=Nt,Nt.prototype.pipe=function(e,n){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||n&&!1===n.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(h(),0===t.listenerCount(this,"error"))throw e}function h(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",h),r.removeListener("close",h),e.removeListener("close",h)}return r.on("error",f),e.on("error",f),r.on("end",h),r.on("close",h),e.on("close",h),e.emit("pipe",r),e},Wt.through=Wt,Wt}));
7
7
  //# sourceMappingURL=through.umd.js.map