UNPKG

salesforce-mc-connector

Version:

Biblioteca genérica para integração com Data Extensions do Salesforce Marketing Cloud

1 lines 438 kB
!function(e,p){"object"==typeof exports&&"undefined"!=typeof module?module.exports=p():"function"==typeof define&&define.amd?define(p):(e="undefined"!=typeof globalThis?globalThis:e||self).SalesforceConnector=p()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};return function(p){p.exports=function(){var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d={exports:{}};return function(e){e.exports=function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==p?p:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d={exports:{}};return function(p){p.exports=function(){var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e){if(e.__esModule)return e;var p=e.default;if("function"==typeof p){var a=function e(){return this instanceof e?Reflect.construct(p,arguments,this.constructor):p.apply(this,arguments)};a.prototype=p.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach((function(p){var d=Object.getOwnPropertyDescriptor(e,p);Object.defineProperty(a,p,d.get?d:{enumerable:!0,get:function(){return e[p]}})})),a}var t,i={exports:{}};function r(){}function l(){l.init.call(this)}function m(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function n(e,p,a,d){var t,i,l,n;if("function"!=typeof a)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",p,a.listener?a.listener:a),i=e._events),l=i[p]):(i=e._events=new r,e._eventsCount=0),l){if("function"==typeof l?l=i[p]=d?[a,l]:[l,a]:d?l.unshift(a):l.push(a),!l.warned&&(t=m(e))&&t>0&&l.length>t){l.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+p+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=e,o.type=p,o.count=l.length,n=o,"function"==typeof console.warn?console.warn(n):console.log(n)}}else l=i[p]=a,++e._eventsCount;return e}function o(e,p,a){var d=!1;function t(){e.removeListener(p,t),d||(d=!0,a.apply(e,arguments))}return t.listener=a,t}function s(e){var p=this._events;if(p){var a=p[e];if("function"==typeof a)return 1;if(a)return a.length}return 0}function u(e,p){for(var a=new Array(p);p--;)a[p]=e[p];return a}r.prototype=Object.create(null),l.EventEmitter=l,l.usingDomains=!1,l.prototype.domain=void 0,l.prototype._events=void 0,l.prototype._maxListeners=void 0,l.defaultMaxListeners=10,l.init=function(){this.domain=null,l.usingDomains&&(!t.active||this instanceof t.Domain||(this.domain=t.active)),this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new r,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},l.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},l.prototype.getMaxListeners=function(){return m(this)},l.prototype.emit=function(e){var p,a,d,t,i,r,l,m="error"===e;if(r=this._events)m=m&&null==r.error;else if(!m)return!1;if(l=this.domain,m){if(p=arguments[1],!l){if(p instanceof Error)throw p;var n=new Error('Uncaught, unspecified "error" event. ('+p+")");throw n.context=p,n}return p||(p=new Error('Uncaught, unspecified "error" event')),p.domainEmitter=this,p.domain=l,p.domainThrown=!1,l.emit("error",p),!1}if(!(a=r[e]))return!1;var o="function"==typeof a;switch(d=arguments.length){case 1:!function(e,p,a){if(p)e.call(a);else for(var d=e.length,t=u(e,d),i=0;i<d;++i)t[i].call(a)}(a,o,this);break;case 2:!function(e,p,a,d){if(p)e.call(a,d);else for(var t=e.length,i=u(e,t),r=0;r<t;++r)i[r].call(a,d)}(a,o,this,arguments[1]);break;case 3:!function(e,p,a,d,t){if(p)e.call(a,d,t);else for(var i=e.length,r=u(e,i),l=0;l<i;++l)r[l].call(a,d,t)}(a,o,this,arguments[1],arguments[2]);break;case 4:!function(e,p,a,d,t,i){if(p)e.call(a,d,t,i);else for(var r=e.length,l=u(e,r),m=0;m<r;++m)l[m].call(a,d,t,i)}(a,o,this,arguments[1],arguments[2],arguments[3]);break;default:for(t=new Array(d-1),i=1;i<d;i++)t[i-1]=arguments[i];!function(e,p,a,d){if(p)e.apply(a,d);else for(var t=e.length,i=u(e,t),r=0;r<t;++r)i[r].apply(a,d)}(a,o,this,t)}return!0},l.prototype.addListener=function(e,p){return n(this,e,p,!1)},l.prototype.on=l.prototype.addListener,l.prototype.prependListener=function(e,p){return n(this,e,p,!0)},l.prototype.once=function(e,p){if("function"!=typeof p)throw new TypeError('"listener" argument must be a function');return this.on(e,o(this,e,p)),this},l.prototype.prependOnceListener=function(e,p){if("function"!=typeof p)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,o(this,e,p)),this},l.prototype.removeListener=function(e,p){var a,d,t,i,l;if("function"!=typeof p)throw new TypeError('"listener" argument must be a function');if(!(d=this._events))return this;if(!(a=d[e]))return this;if(a===p||a.listener&&a.listener===p)0==--this._eventsCount?this._events=new r:(delete d[e],d.removeListener&&this.emit("removeListener",e,a.listener||p));else if("function"!=typeof a){for(t=-1,i=a.length;i-- >0;)if(a[i]===p||a[i].listener&&a[i].listener===p){l=a[i].listener,t=i;break}if(t<0)return this;if(1===a.length){if(a[0]=void 0,0==--this._eventsCount)return this._events=new r,this;delete d[e]}else!function(e,p){for(var a=p,d=a+1,t=e.length;d<t;a+=1,d+=1)e[a]=e[d];e.pop()}(a,t);d.removeListener&&this.emit("removeListener",e,l||p)}return this},l.prototype.off=function(e,p){return this.removeListener(e,p)},l.prototype.removeAllListeners=function(e){var p,a;if(!(a=this._events))return this;if(!a.removeListener)return 0===arguments.length?(this._events=new r,this._eventsCount=0):a[e]&&(0==--this._eventsCount?this._events=new r:delete a[e]),this;if(0===arguments.length){for(var d,t=Object.keys(a),i=0;i<t.length;++i)"removeListener"!==(d=t[i])&&this.removeAllListeners(d);return this.removeAllListeners("removeListener"),this._events=new r,this._eventsCount=0,this}if("function"==typeof(p=a[e]))this.removeListener(e,p);else if(p)do{this.removeListener(e,p[p.length-1])}while(p[0]);return this},l.prototype.listeners=function(e){var p,a=this._events;return a&&(p=a[e])?"function"==typeof p?[p.listener||p]:function(e){for(var p=new Array(e.length),a=0;a<p.length;++a)p[a]=e[a].listener||e[a];return p}(p):[]},l.listenerCount=function(e,p){return"function"==typeof e.listenerCount?e.listenerCount(p):s.call(e,p)},l.prototype.listenerCount=s,l.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var h=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},f=[],c=[],v="undefined"!=typeof Uint8Array?Uint8Array:Array,w=!1;function _(){w=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0;p<64;++p)f[p]=e[p],c[e.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63}function g(e,p,a){for(var d,t,i=[],r=p;r<a;r+=3)d=(e[r]<<16)+(e[r+1]<<8)+e[r+2],i.push(f[(t=d)>>18&63]+f[t>>12&63]+f[t>>6&63]+f[63&t]);return i.join("")}function b(e){var p;w||_();for(var a=e.length,d=a%3,t="",i=[],r=16383,l=0,m=a-d;l<m;l+=r)i.push(g(e,l,l+r>m?m:l+r));return 1===d?(p=e[a-1],t+=f[p>>2],t+=f[p<<4&63],t+="=="):2===d&&(p=(e[a-2]<<8)+e[a-1],t+=f[p>>10],t+=f[p>>4&63],t+=f[p<<2&63],t+="="),i.push(t),i.join("")}function y(e,p,a,d,t){var i,r,l=8*t-d-1,m=(1<<l)-1,n=m>>1,o=-7,s=a?t-1:0,u=a?-1:1,h=e[p+s];for(s+=u,i=h&(1<<-o)-1,h>>=-o,o+=l;o>0;i=256*i+e[p+s],s+=u,o-=8);for(r=i&(1<<-o)-1,i>>=-o,o+=d;o>0;r=256*r+e[p+s],s+=u,o-=8);if(0===i)i=1-n;else{if(i===m)return r?NaN:1/0*(h?-1:1);r+=Math.pow(2,d),i-=n}return(h?-1:1)*r*Math.pow(2,i-d)}function N(e,p,a,d,t,i){var r,l,m,n=8*i-t-1,o=(1<<n)-1,s=o>>1,u=23===t?Math.pow(2,-24)-Math.pow(2,-77):0,h=d?0:i-1,f=d?1:-1,c=p<0||0===p&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(l=isNaN(p)?1:0,r=o):(r=Math.floor(Math.log(p)/Math.LN2),p*(m=Math.pow(2,-r))<1&&(r--,m*=2),(p+=r+s>=1?u/m:u*Math.pow(2,1-s))*m>=2&&(r++,m/=2),r+s>=o?(l=0,r=o):r+s>=1?(l=(p*m-1)*Math.pow(2,t),r+=s):(l=p*Math.pow(2,s-1)*Math.pow(2,t),r=0));t>=8;e[a+h]=255&l,h+=f,l/=256,t-=8);for(r=r<<t|l,n+=t;n>0;e[a+h]=255&r,h+=f,r/=256,n-=8);e[a+h-f]|=128*c}var S={}.toString,D=Array.isArray||function(e){return"[object Array]"==S.call(e)};function T(){return V.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function E(e,p){if(T()<p)throw new RangeError("Invalid typed array length");return V.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(p)).__proto__=V.prototype:(null===e&&(e=new V(p)),e.length=p),e}function V(e,p,a){if(!(V.TYPED_ARRAY_SUPPORT||this instanceof V))return new V(e,p,a);if("number"==typeof e){if("string"==typeof p)throw new Error("If encoding is specified then the first argument must be a string");return R(this,e)}return A(this,e,p,a)}function A(e,p,a,d){if("number"==typeof p)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&p instanceof ArrayBuffer?function(e,p,a,d){if(p.byteLength,a<0||p.byteLength<a)throw new RangeError("'offset' is out of bounds");if(p.byteLength<a+(d||0))throw new RangeError("'length' is out of bounds");return p=void 0===a&&void 0===d?new Uint8Array(p):void 0===d?new Uint8Array(p,a):new Uint8Array(p,a,d),V.TYPED_ARRAY_SUPPORT?(e=p).__proto__=V.prototype:e=x(e,p),e}(e,p,a,d):"string"==typeof p?function(e,p,a){if("string"==typeof a&&""!==a||(a="utf8"),!V.isEncoding(a))throw new TypeError('"encoding" must be a valid string encoding');var d=0|L(p,a),t=(e=E(e,d)).write(p,a);return t!==d&&(e=e.slice(0,t)),e}(e,p,a):function(e,p){if(O(p)){var a=0|C(p.length);return 0===(e=E(e,a)).length||p.copy(e,0,0,a),e}if(p){if("undefined"!=typeof ArrayBuffer&&p.buffer instanceof ArrayBuffer||"length"in p)return"number"!=typeof p.length||(d=p.length)!=d?E(e,0):x(e,p);if("Buffer"===p.type&&D(p.data))return x(e,p.data)}var d;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,p)}function k(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 R(e,p){if(k(p),e=E(e,p<0?0:0|C(p)),!V.TYPED_ARRAY_SUPPORT)for(var a=0;a<p;++a)e[a]=0;return e}function x(e,p){var a=p.length<0?0:0|C(p.length);e=E(e,a);for(var d=0;d<a;d+=1)e[d]=255&p[d];return e}function C(e){if(e>=T())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+T().toString(16)+" bytes");return 0|e}function O(e){return!(null==e||!e._isBuffer)}function L(e,p){if(O(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 a=e.length;if(0===a)return 0;for(var d=!1;;)switch(p){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":case void 0:return le(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*a;case"hex":return a>>>1;case"base64":return me(e).length;default:if(d)return le(e).length;p=(""+p).toLowerCase(),d=!0}}function B(e,p,a){var d=!1;if((void 0===p||p<0)&&(p=0),p>this.length)return"";if((void 0===a||a>this.length)&&(a=this.length),a<=0)return"";if((a>>>=0)<=(p>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return G(this,p,a);case"utf8":case"utf-8":return $(this,p,a);case"ascii":return K(this,p,a);case"latin1":case"binary":return W(this,p,a);case"base64":return H(this,p,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,p,a);default:if(d)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),d=!0}}function U(e,p,a){var d=e[p];e[p]=e[a],e[a]=d}function P(e,p,a,d,t){if(0===e.length)return-1;if("string"==typeof a?(d=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),a=+a,isNaN(a)&&(a=t?0:e.length-1),a<0&&(a=e.length+a),a>=e.length){if(t)return-1;a=e.length-1}else if(a<0){if(!t)return-1;a=0}if("string"==typeof p&&(p=V.from(p,d)),O(p))return 0===p.length?-1:z(e,p,a,d,t);if("number"==typeof p)return p&=255,V.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?t?Uint8Array.prototype.indexOf.call(e,p,a):Uint8Array.prototype.lastIndexOf.call(e,p,a):z(e,[p],a,d,t);throw new TypeError("val must be string, number or Buffer")}function z(e,p,a,d,t){var i,r=1,l=e.length,m=p.length;if(void 0!==d&&("ucs2"===(d=String(d).toLowerCase())||"ucs-2"===d||"utf16le"===d||"utf-16le"===d)){if(e.length<2||p.length<2)return-1;r=2,l/=2,m/=2,a/=2}function n(e,p){return 1===r?e[p]:e.readUInt16BE(p*r)}if(t){var o=-1;for(i=a;i<l;i++)if(n(e,i)===n(p,-1===o?0:i-o)){if(-1===o&&(o=i),i-o+1===m)return o*r}else-1!==o&&(i-=i-o),o=-1}else for(a+m>l&&(a=l-m),i=a;i>=0;i--){for(var s=!0,u=0;u<m;u++)if(n(e,i+u)!==n(p,u)){s=!1;break}if(s)return i}return-1}function F(e,p,a,d){a=Number(a)||0;var t=e.length-a;d?(d=Number(d))>t&&(d=t):d=t;var i=p.length;if(i%2!=0)throw new TypeError("Invalid hex string");d>i/2&&(d=i/2);for(var r=0;r<d;++r){var l=parseInt(p.substr(2*r,2),16);if(isNaN(l))return r;e[a+r]=l}return r}function I(e,p,a,d){return ne(le(p,e.length-a),e,a,d)}function M(e,p,a,d){return ne(function(e){for(var p=[],a=0;a<e.length;++a)p.push(255&e.charCodeAt(a));return p}(p),e,a,d)}function j(e,p,a,d){return M(e,p,a,d)}function q(e,p,a,d){return ne(me(p),e,a,d)}function Z(e,p,a,d){return ne(function(e,p){for(var a,d,t,i=[],r=0;r<e.length&&!((p-=2)<0);++r)d=(a=e.charCodeAt(r))>>8,t=a%256,i.push(t),i.push(d);return i}(p,e.length-a),e,a,d)}function H(e,p,a){return 0===p&&a===e.length?b(e):b(e.slice(p,a))}function $(e,p,a){a=Math.min(e.length,a);for(var d=[],t=p;t<a;){var i,r,l,m,n=e[t],o=null,s=n>239?4:n>223?3:n>191?2:1;if(t+s<=a)switch(s){case 1:n<128&&(o=n);break;case 2:128==(192&(i=e[t+1]))&&(m=(31&n)<<6|63&i)>127&&(o=m);break;case 3:i=e[t+1],r=e[t+2],128==(192&i)&&128==(192&r)&&(m=(15&n)<<12|(63&i)<<6|63&r)>2047&&(m<55296||m>57343)&&(o=m);break;case 4:i=e[t+1],r=e[t+2],l=e[t+3],128==(192&i)&&128==(192&r)&&128==(192&l)&&(m=(15&n)<<18|(63&i)<<12|(63&r)<<6|63&l)>65535&&m<1114112&&(o=m)}null===o?(o=65533,s=1):o>65535&&(o-=65536,d.push(o>>>10&1023|55296),o=56320|1023&o),d.push(o),t+=s}return function(e){var p=e.length;if(p<=Y)return String.fromCharCode.apply(String,e);for(var a="",d=0;d<p;)a+=String.fromCharCode.apply(String,e.slice(d,d+=Y));return a}(d)}V.TYPED_ARRAY_SUPPORT=void 0===h.TYPED_ARRAY_SUPPORT||h.TYPED_ARRAY_SUPPORT,T(),V.poolSize=8192,V._augment=function(e){return e.__proto__=V.prototype,e},V.from=function(e,p,a){return A(null,e,p,a)},V.TYPED_ARRAY_SUPPORT&&(V.prototype.__proto__=Uint8Array.prototype,V.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&V[Symbol.species]),V.alloc=function(e,p,a){return function(e,p,a,d){return k(p),p<=0?E(e,p):void 0!==a?"string"==typeof d?E(e,p).fill(a,d):E(e,p).fill(a):E(e,p)}(null,e,p,a)},V.allocUnsafe=function(e){return R(null,e)},V.allocUnsafeSlow=function(e){return R(null,e)},V.isBuffer=oe,V.compare=function(e,p){if(!O(e)||!O(p))throw new TypeError("Arguments must be Buffers");if(e===p)return 0;for(var a=e.length,d=p.length,t=0,i=Math.min(a,d);t<i;++t)if(e[t]!==p[t]){a=e[t],d=p[t];break}return a<d?-1:d<a?1:0},V.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}},V.concat=function(e,p){if(!D(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return V.alloc(0);var a;if(void 0===p)for(p=0,a=0;a<e.length;++a)p+=e[a].length;var d=V.allocUnsafe(p),t=0;for(a=0;a<e.length;++a){var i=e[a];if(!O(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(d,t),t+=i.length}return d},V.byteLength=L,V.prototype._isBuffer=!0,V.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 p=0;p<e;p+=2)U(this,p,p+1);return this},V.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 p=0;p<e;p+=4)U(this,p,p+3),U(this,p+1,p+2);return this},V.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 p=0;p<e;p+=8)U(this,p,p+7),U(this,p+1,p+6),U(this,p+2,p+5),U(this,p+3,p+4);return this},V.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?$(this,0,e):B.apply(this,arguments)},V.prototype.equals=function(e){if(!O(e))throw new TypeError("Argument must be a Buffer");return this===e||0===V.compare(this,e)},V.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+">"},V.prototype.compare=function(e,p,a,d,t){if(!O(e))throw new TypeError("Argument must be a Buffer");if(void 0===p&&(p=0),void 0===a&&(a=e?e.length:0),void 0===d&&(d=0),void 0===t&&(t=this.length),p<0||a>e.length||d<0||t>this.length)throw new RangeError("out of range index");if(d>=t&&p>=a)return 0;if(d>=t)return-1;if(p>=a)return 1;if(this===e)return 0;for(var i=(t>>>=0)-(d>>>=0),r=(a>>>=0)-(p>>>=0),l=Math.min(i,r),m=this.slice(d,t),n=e.slice(p,a),o=0;o<l;++o)if(m[o]!==n[o]){i=m[o],r=n[o];break}return i<r?-1:r<i?1:0},V.prototype.includes=function(e,p,a){return-1!==this.indexOf(e,p,a)},V.prototype.indexOf=function(e,p,a){return P(this,e,p,a,!0)},V.prototype.lastIndexOf=function(e,p,a){return P(this,e,p,a,!1)},V.prototype.write=function(e,p,a,d){if(void 0===p)d="utf8",a=this.length,p=0;else if(void 0===a&&"string"==typeof p)d=p,a=this.length,p=0;else{if(!isFinite(p))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");p|=0,isFinite(a)?(a|=0,void 0===d&&(d="utf8")):(d=a,a=void 0)}var t=this.length-p;if((void 0===a||a>t)&&(a=t),e.length>0&&(a<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");d||(d="utf8");for(var i=!1;;)switch(d){case"hex":return F(this,e,p,a);case"utf8":case"utf-8":return I(this,e,p,a);case"ascii":return M(this,e,p,a);case"latin1":case"binary":return j(this,e,p,a);case"base64":return q(this,e,p,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Z(this,e,p,a);default:if(i)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),i=!0}},V.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Y=4096;function K(e,p,a){var d="";a=Math.min(e.length,a);for(var t=p;t<a;++t)d+=String.fromCharCode(127&e[t]);return d}function W(e,p,a){var d="";a=Math.min(e.length,a);for(var t=p;t<a;++t)d+=String.fromCharCode(e[t]);return d}function G(e,p,a){var d=e.length;(!p||p<0)&&(p=0),(!a||a<0||a>d)&&(a=d);for(var t="",i=p;i<a;++i)t+=re(e[i]);return t}function X(e,p,a){for(var d=e.slice(p,a),t="",i=0;i<d.length;i+=2)t+=String.fromCharCode(d[i]+256*d[i+1]);return t}function J(e,p,a){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+p>a)throw new RangeError("Trying to access beyond buffer length")}function Q(e,p,a,d,t,i){if(!O(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>t||p<i)throw new RangeError('"value" argument is out of bounds');if(a+d>e.length)throw new RangeError("Index out of range")}function ee(e,p,a,d){p<0&&(p=65535+p+1);for(var t=0,i=Math.min(e.length-a,2);t<i;++t)e[a+t]=(p&255<<8*(d?t:1-t))>>>8*(d?t:1-t)}function pe(e,p,a,d){p<0&&(p=4294967295+p+1);for(var t=0,i=Math.min(e.length-a,4);t<i;++t)e[a+t]=p>>>8*(d?t:3-t)&255}function ae(e,p,a,d,t,i){if(a+d>e.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("Index out of range")}function de(e,p,a,d,t){return t||ae(e,0,a,4),N(e,p,a,d,23,4),a+4}function te(e,p,a,d,t){return t||ae(e,0,a,8),N(e,p,a,d,52,8),a+8}V.prototype.slice=function(e,p){var a,d=this.length;if((e=~~e)<0?(e+=d)<0&&(e=0):e>d&&(e=d),(p=void 0===p?d:~~p)<0?(p+=d)<0&&(p=0):p>d&&(p=d),p<e&&(p=e),V.TYPED_ARRAY_SUPPORT)(a=this.subarray(e,p)).__proto__=V.prototype;else{var t=p-e;a=new V(t,void 0);for(var i=0;i<t;++i)a[i]=this[i+e]}return a},V.prototype.readUIntLE=function(e,p,a){e|=0,p|=0,a||J(e,p,this.length);for(var d=this[e],t=1,i=0;++i<p&&(t*=256);)d+=this[e+i]*t;return d},V.prototype.readUIntBE=function(e,p,a){e|=0,p|=0,a||J(e,p,this.length);for(var d=this[e+--p],t=1;p>0&&(t*=256);)d+=this[e+--p]*t;return d},V.prototype.readUInt8=function(e,p){return p||J(e,1,this.length),this[e]},V.prototype.readUInt16LE=function(e,p){return p||J(e,2,this.length),this[e]|this[e+1]<<8},V.prototype.readUInt16BE=function(e,p){return p||J(e,2,this.length),this[e]<<8|this[e+1]},V.prototype.readUInt32LE=function(e,p){return p||J(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},V.prototype.readUInt32BE=function(e,p){return p||J(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},V.prototype.readIntLE=function(e,p,a){e|=0,p|=0,a||J(e,p,this.length);for(var d=this[e],t=1,i=0;++i<p&&(t*=256);)d+=this[e+i]*t;return d>=(t*=128)&&(d-=Math.pow(2,8*p)),d},V.prototype.readIntBE=function(e,p,a){e|=0,p|=0,a||J(e,p,this.length);for(var d=p,t=1,i=this[e+--d];d>0&&(t*=256);)i+=this[e+--d]*t;return i>=(t*=128)&&(i-=Math.pow(2,8*p)),i},V.prototype.readInt8=function(e,p){return p||J(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},V.prototype.readInt16LE=function(e,p){p||J(e,2,this.length);var a=this[e]|this[e+1]<<8;return 32768&a?4294901760|a:a},V.prototype.readInt16BE=function(e,p){p||J(e,2,this.length);var a=this[e+1]|this[e]<<8;return 32768&a?4294901760|a:a},V.prototype.readInt32LE=function(e,p){return p||J(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},V.prototype.readInt32BE=function(e,p){return p||J(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},V.prototype.readFloatLE=function(e,p){return p||J(e,4,this.length),y(this,e,!0,23,4)},V.prototype.readFloatBE=function(e,p){return p||J(e,4,this.length),y(this,e,!1,23,4)},V.prototype.readDoubleLE=function(e,p){return p||J(e,8,this.length),y(this,e,!0,52,8)},V.prototype.readDoubleBE=function(e,p){return p||J(e,8,this.length),y(this,e,!1,52,8)},V.prototype.writeUIntLE=function(e,p,a,d){e=+e,p|=0,a|=0,d||Q(this,e,p,a,Math.pow(2,8*a)-1,0);var t=1,i=0;for(this[p]=255&e;++i<a&&(t*=256);)this[p+i]=e/t&255;return p+a},V.prototype.writeUIntBE=function(e,p,a,d){e=+e,p|=0,a|=0,d||Q(this,e,p,a,Math.pow(2,8*a)-1,0);var t=a-1,i=1;for(this[p+t]=255&e;--t>=0&&(i*=256);)this[p+t]=e/i&255;return p+a},V.prototype.writeUInt8=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,1,255,0),V.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[p]=255&e,p+1},V.prototype.writeUInt16LE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,2,65535,0),V.TYPED_ARRAY_SUPPORT?(this[p]=255&e,this[p+1]=e>>>8):ee(this,e,p,!0),p+2},V.prototype.writeUInt16BE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,2,65535,0),V.TYPED_ARRAY_SUPPORT?(this[p]=e>>>8,this[p+1]=255&e):ee(this,e,p,!1),p+2},V.prototype.writeUInt32LE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,4,4294967295,0),V.TYPED_ARRAY_SUPPORT?(this[p+3]=e>>>24,this[p+2]=e>>>16,this[p+1]=e>>>8,this[p]=255&e):pe(this,e,p,!0),p+4},V.prototype.writeUInt32BE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,4,4294967295,0),V.TYPED_ARRAY_SUPPORT?(this[p]=e>>>24,this[p+1]=e>>>16,this[p+2]=e>>>8,this[p+3]=255&e):pe(this,e,p,!1),p+4},V.prototype.writeIntLE=function(e,p,a,d){if(e=+e,p|=0,!d){var t=Math.pow(2,8*a-1);Q(this,e,p,a,t-1,-t)}var i=0,r=1,l=0;for(this[p]=255&e;++i<a&&(r*=256);)e<0&&0===l&&0!==this[p+i-1]&&(l=1),this[p+i]=(e/r|0)-l&255;return p+a},V.prototype.writeIntBE=function(e,p,a,d){if(e=+e,p|=0,!d){var t=Math.pow(2,8*a-1);Q(this,e,p,a,t-1,-t)}var i=a-1,r=1,l=0;for(this[p+i]=255&e;--i>=0&&(r*=256);)e<0&&0===l&&0!==this[p+i+1]&&(l=1),this[p+i]=(e/r|0)-l&255;return p+a},V.prototype.writeInt8=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,1,127,-128),V.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[p]=255&e,p+1},V.prototype.writeInt16LE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,2,32767,-32768),V.TYPED_ARRAY_SUPPORT?(this[p]=255&e,this[p+1]=e>>>8):ee(this,e,p,!0),p+2},V.prototype.writeInt16BE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,2,32767,-32768),V.TYPED_ARRAY_SUPPORT?(this[p]=e>>>8,this[p+1]=255&e):ee(this,e,p,!1),p+2},V.prototype.writeInt32LE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,4,2147483647,-2147483648),V.TYPED_ARRAY_SUPPORT?(this[p]=255&e,this[p+1]=e>>>8,this[p+2]=e>>>16,this[p+3]=e>>>24):pe(this,e,p,!0),p+4},V.prototype.writeInt32BE=function(e,p,a){return e=+e,p|=0,a||Q(this,e,p,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),V.TYPED_ARRAY_SUPPORT?(this[p]=e>>>24,this[p+1]=e>>>16,this[p+2]=e>>>8,this[p+3]=255&e):pe(this,e,p,!1),p+4},V.prototype.writeFloatLE=function(e,p,a){return de(this,e,p,!0,a)},V.prototype.writeFloatBE=function(e,p,a){return de(this,e,p,!1,a)},V.prototype.writeDoubleLE=function(e,p,a){return te(this,e,p,!0,a)},V.prototype.writeDoubleBE=function(e,p,a){return te(this,e,p,!1,a)},V.prototype.copy=function(e,p,a,d){if(a||(a=0),d||0===d||(d=this.length),p>=e.length&&(p=e.length),p||(p=0),d>0&&d<a&&(d=a),d===a)return 0;if(0===e.length||0===this.length)return 0;if(p<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("sourceStart out of bounds");if(d<0)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),e.length-p<d-a&&(d=e.length-p+a);var t,i=d-a;if(this===e&&a<p&&p<d)for(t=i-1;t>=0;--t)e[t+p]=this[t+a];else if(i<1e3||!V.TYPED_ARRAY_SUPPORT)for(t=0;t<i;++t)e[t+p]=this[t+a];else Uint8Array.prototype.set.call(e,this.subarray(a,a+i),p);return i},V.prototype.fill=function(e,p,a,d){if("string"==typeof e){if("string"==typeof p?(d=p,p=0,a=this.length):"string"==typeof a&&(d=a,a=this.length),1===e.length){var t=e.charCodeAt(0);t<256&&(e=t)}if(void 0!==d&&"string"!=typeof d)throw new TypeError("encoding must be a string");if("string"==typeof d&&!V.isEncoding(d))throw new TypeError("Unknown encoding: "+d)}else"number"==typeof e&&(e&=255);if(p<0||this.length<p||this.length<a)throw new RangeError("Out of range index");if(a<=p)return this;var i;if(p>>>=0,a=void 0===a?this.length:a>>>0,e||(e=0),"number"==typeof e)for(i=p;i<a;++i)this[i]=e;else{var r=O(e)?e:le(new V(e,d).toString()),l=r.length;for(i=0;i<a-p;++i)this[i+p]=r[i%l]}return this};var ie=/[^+\/0-9A-Za-z-_]/g;function re(e){return e<16?"0"+e.toString(16):e.toString(16)}function le(e,p){var a;p=p||1/0;for(var d=e.length,t=null,i=[],r=0;r<d;++r){if((a=e.charCodeAt(r))>55295&&a<57344){if(!t){if(a>56319){(p-=3)>-1&&i.push(239,191,189);continue}if(r+1===d){(p-=3)>-1&&i.push(239,191,189);continue}t=a;continue}if(a<56320){(p-=3)>-1&&i.push(239,191,189),t=a;continue}a=65536+(t-55296<<10|a-56320)}else t&&(p-=3)>-1&&i.push(239,191,189);if(t=null,a<128){if((p-=1)<0)break;i.push(a)}else if(a<2048){if((p-=2)<0)break;i.push(a>>6|192,63&a|128)}else if(a<65536){if((p-=3)<0)break;i.push(a>>12|224,a>>6&63|128,63&a|128)}else{if(!(a<1114112))throw new Error("Invalid code point");if((p-=4)<0)break;i.push(a>>18|240,a>>12&63|128,a>>6&63|128,63&a|128)}}return i}function me(e){return function(e){var p,a,d,t,i,r;w||_();var l=e.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[l-2]?2:"="===e[l-1]?1:0,r=new v(3*l/4-i),d=i>0?l-4:l;var m=0;for(p=0,a=0;p<d;p+=4,a+=3)t=c[e.charCodeAt(p)]<<18|c[e.charCodeAt(p+1)]<<12|c[e.charCodeAt(p+2)]<<6|c[e.charCodeAt(p+3)],r[m++]=t>>16&255,r[m++]=t>>8&255,r[m++]=255&t;return 2===i?(t=c[e.charCodeAt(p)]<<2|c[e.charCodeAt(p+1)]>>4,r[m++]=255&t):1===i&&(t=c[e.charCodeAt(p)]<<10|c[e.charCodeAt(p+1)]<<4|c[e.charCodeAt(p+2)]>>2,r[m++]=t>>8&255,r[m++]=255&t),r}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ie,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function ne(e,p,a,d){for(var t=0;t<d&&!(t+a>=p.length||t>=e.length);++t)p[t+a]=e[t];return t}function oe(e){return null!=e&&(!!e._isBuffer||se(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&se(e.slice(0,0))}(e))}function se(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function ue(){throw new Error("setTimeout has not been defined")}function he(){throw new Error("clearTimeout has not been defined")}var fe=ue,ce=he;function ve(e){if(fe===setTimeout)return setTimeout(e,0);if((fe===ue||!fe)&&setTimeout)return fe=setTimeout,setTimeout(e,0);try{return fe(e,0)}catch(p){try{return fe.call(null,e,0)}catch(p){return fe.call(this,e,0)}}}"function"==typeof h.setTimeout&&(fe=setTimeout),"function"==typeof h.clearTimeout&&(ce=clearTimeout);var we,_e=[],ge=!1,be=-1;function ye(){ge&&we&&(ge=!1,we.length?_e=we.concat(_e):be=-1,_e.length&&Ne())}function Ne(){if(!ge){var e=ve(ye);ge=!0;for(var p=_e.length;p;){for(we=_e,_e=[];++be<p;)we&&we[be].run();be=-1,p=_e.length}we=null,ge=!1,function(e){if(ce===clearTimeout)return clearTimeout(e);if((ce===he||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(e);try{return ce(e)}catch(p){try{return ce.call(null,e)}catch(p){return ce.call(this,e)}}}(e)}}function Se(e){var p=new Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)p[a-1]=arguments[a];_e.push(new De(e,p)),1!==_e.length||ge||ve(Ne)}function De(e,p){this.fun=e,this.array=p}function Te(){}De.prototype.run=function(){this.fun.apply(null,this.array)};var Ee,Ve=Te,Ae=Te,ke=Te,Re=Te,xe=Te,Ce=Te,Oe=Te,Le=h.performance||{},Be=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return(new Date).getTime()},Ue=new Date,Pe={nextTick:Se,title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Ve,addListener:Ae,once:ke,off:Re,removeListener:xe,removeAllListeners:Ce,emit:Oe,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 p=.001*Be.call(Le),a=Math.floor(p),d=Math.floor(p%1*1e9);return e&&(a-=e[0],(d-=e[1])<0&&(a--,d+=1e9)),[a,d]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Ue)/1e3}};Ee="function"==typeof Object.create?function(e,p){e.super_=p,e.prototype=Object.create(p.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,p){e.super_=p;var a=function(){};a.prototype=p.prototype,e.prototype=new a,e.prototype.constructor=e};var ze=/%[sdj%]/g;function Fe(e){if(!Xe(e)){for(var p=[],a=0;a<arguments.length;a++)p.push(qe(arguments[a]));return p.join(" ")}a=1;for(var d=arguments,t=d.length,i=String(e).replace(ze,(function(e){if("%%"===e)return"%";if(a>=t)return e;switch(e){case"%s":return String(d[a++]);case"%d":return Number(d[a++]);case"%j":try{return JSON.stringify(d[a++])}catch(e){return"[Circular]"}default:return e}})),r=d[a];a<t;r=d[++a])Ge(r)||!ep(r)?i+=" "+r:i+=" "+qe(r);return i}function Ie(e,p){if(Je(h.process))return function(){return Ie(e,p).apply(this,arguments)};if(!0===Pe.noDeprecation)return e;var a=!1;return function(){if(!a){if(Pe.throwDeprecation)throw new Error(p);Pe.traceDeprecation?console.trace(p):console.error(p),a=!0}return e.apply(this,arguments)}}var Me,je={};function qe(e,p){var a={seen:[],stylize:He};return arguments.length>=3&&(a.depth=arguments[2]),arguments.length>=4&&(a.colors=arguments[3]),We(p)?a.showHidden=p:p&&function(e,p){if(!p||!ep(p))return e;for(var a=Object.keys(p),d=a.length;d--;)e[a[d]]=p[a[d]]}(a,p),Je(a.showHidden)&&(a.showHidden=!1),Je(a.depth)&&(a.depth=2),Je(a.colors)&&(a.colors=!1),Je(a.customInspect)&&(a.customInspect=!0),a.colors&&(a.stylize=Ze),$e(a,e,a.depth)}function Ze(e,p){var a=qe.styles[p];return a?"["+qe.colors[a][0]+"m"+e+"["+qe.colors[a][1]+"m":e}function He(e,p){return e}function $e(e,p,a){if(e.customInspect&&p&&dp(p.inspect)&&p.inspect!==qe&&(!p.constructor||p.constructor.prototype!==p)){var d=p.inspect(a,e);return Xe(d)||(d=$e(e,d,a)),d}var t=function(e,p){if(Je(p))return e.stylize("undefined","undefined");if(Xe(p)){var a="'"+JSON.stringify(p).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(a,"string")}return"number"==typeof p?e.stylize(""+p,"number"):We(p)?e.stylize(""+p,"boolean"):Ge(p)?e.stylize("null","null"):void 0}(e,p);if(t)return t;var i=Object.keys(p),r=function(e){var p={};return e.forEach((function(e,a){p[e]=!0})),p}(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(p)),ap(p)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Ye(p);if(0===i.length){if(dp(p)){var l=p.name?": "+p.name:"";return e.stylize("[Function"+l+"]","special")}if(Qe(p))return e.stylize(RegExp.prototype.toString.call(p),"regexp");if(pp(p))return e.stylize(Date.prototype.toString.call(p),"date");if(ap(p))return Ye(p)}var m,n,o="",s=!1,u=["{","}"];return m=p,Array.isArray(m)&&(s=!0,u=["[","]"]),dp(p)&&(o=" [Function"+(p.name?": "+p.name:"")+"]"),Qe(p)&&(o=" "+RegExp.prototype.toString.call(p)),pp(p)&&(o=" "+Date.prototype.toUTCString.call(p)),ap(p)&&(o=" "+Ye(p)),0!==i.length||s&&0!=p.length?a<0?Qe(p)?e.stylize(RegExp.prototype.toString.call(p),"regexp"):e.stylize("[Object]","special"):(e.seen.push(p),n=s?function(e,p,a,d,t){for(var i=[],r=0,l=p.length;r<l;++r)ip(p,String(r))?i.push(Ke(e,p,a,d,String(r),!0)):i.push("");return t.forEach((function(t){t.match(/^\d+$/)||i.push(Ke(e,p,a,d,t,!0))})),i}(e,p,a,r,i):i.map((function(d){return Ke(e,p,a,r,d,s)})),e.seen.pop(),function(e,p,a){var d=e.reduce((function(e,p){return p.indexOf("\n"),e+p.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return d>60?a[0]+(""===p?"":p+"\n ")+" "+e.join(",\n ")+" "+a[1]:a[0]+p+" "+e.join(", ")+" "+a[1]}(n,o,u)):u[0]+o+u[1]}function Ye(e){return"["+Error.prototype.toString.call(e)+"]"}function Ke(e,p,a,d,t,i){var r,l,m;if((m=Object.getOwnPropertyDescriptor(p,t)||{value:p[t]}).get?l=m.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):m.set&&(l=e.stylize("[Setter]","special")),ip(d,t)||(r="["+t+"]"),l||(e.seen.indexOf(m.value)<0?(l=Ge(a)?$e(e,m.value,null):$e(e,m.value,a-1)).indexOf("\n")>-1&&(l=i?l.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+l.split("\n").map((function(e){return" "+e})).join("\n")):l=e.stylize("[Circular]","special")),Je(r)){if(i&&t.match(/^\d+$/))return l;(r=JSON.stringify(""+t)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=e.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=e.stylize(r,"string"))}return r+": "+l}function We(e){return"boolean"==typeof e}function Ge(e){return null===e}function Xe(e){return"string"==typeof e}function Je(e){return void 0===e}function Qe(e){return ep(e)&&"[object RegExp]"===tp(e)}function ep(e){return"object"==typeof e&&null!==e}function pp(e){return ep(e)&&"[object Date]"===tp(e)}function ap(e){return ep(e)&&("[object Error]"===tp(e)||e instanceof Error)}function dp(e){return"function"==typeof e}function tp(e){return Object.prototype.toString.call(e)}function ip(e,p){return Object.prototype.hasOwnProperty.call(e,p)}function rp(){this.head=null,this.tail=null,this.length=0}qe.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]},qe.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},rp.prototype.push=function(e){var p={data:e,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length},rp.prototype.unshift=function(e){var p={data:e,next:this.head};0===this.length&&(this.tail=p),this.head=p,++this.length},rp.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}},rp.prototype.clear=function(){this.head=this.tail=null,this.length=0},rp.prototype.join=function(e){if(0===this.length)return"";for(var p=this.head,a=""+p.data;p=p.next;)a+=e+p.data;return a},rp.prototype.concat=function(e){if(0===this.length)return V.alloc(0);if(1===this.length)return this.head.data;for(var p=V.allocUnsafe(e>>>0),a=this.head,d=0;a;)a.data.copy(p,d),d+=a.data.length,a=a.next;return p};var lp=V.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 mp(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!lp(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=op;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=sp;break;default:return void(this.write=np)}this.charBuffer=new V(6),this.charReceived=0,this.charLength=0}function np(e){return e.toString(this.encoding)}function op(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function sp(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}mp.prototype.write=function(e){for(var p="";this.charLength;){var a=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,a),this.charReceived+=a,this.charReceived<this.charLength)return"";if(e=e.slice(a,e.length),!((d=(p=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(p.length-1))>=55296&&d<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return p;break}this.charLength+=this.surrogateSize,p=""}this.detectIncompleteChar(e);var d,t=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,t),t-=this.charReceived),t=(p+=e.toString(this.encoding,0,t)).length-1,(d=p.charCodeAt(t))>=55296&&d<=56319){var i=this.surrogateSize;return this.charLength+=i,this.charReceived+=i,this.charBuffer.copy(this.charBuffer,i,0,i),e.copy(this.charBuffer,0,0,i),p.substring(0,t)}return p},mp.prototype.detectIncompleteChar=function(e){for(var p=e.length>=3?3:e.length;p>0;p--){var a=e[e.length-p];if(1==p&&a>>5==6){this.charLength=2;break}if(p<=2&&a>>4==14){this.charLength=3;break}if(p<=3&&a>>3==30){this.charLength=4;break}}this.charReceived=p},mp.prototype.end=function(e){var p="";if(e&&e.length&&(p=this.write(e)),this.charReceived){var a=this.charReceived,d=this.charBuffer,t=this.encoding;p+=d.slice(0,a).toString(t)}return p},fp.ReadableState=hp;var up=function(e){return Je(Me)&&(Me=Pe.env.NODE_DEBUG||""),e=e.toUpperCase(),je[e]||(new RegExp("\\b"+e+"\\b","i").test(Me)?je[e]=function(){var p=Fe.apply(null,arguments);console.error("%s %d: %s",e,0,p)}:je[e]=function(){}),je[e]}("stream");function hp(e,p){e=e||{},this.objectMode=!!e.objectMode,p instanceof jp&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var a=e.highWaterMark,d=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:d,this.highWaterMark=~~this.highWaterMark,this.buffer=new rp,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 mp(e.encoding),this.encoding=e.encoding)}function fp(e){if(!(this instanceof fp))return new fp(e);this._readableState=new hp(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),l.call(this)}function cp(e,p,a,d,t){var i=function(e,p){var a=null;return V.isBuffer(p)||"string"==typeof p||null==p||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a}(p,a);if(i)e.emit("error",i);else if(null===a)p.reading=!1,function(e,p){if(!p.ended){if(p.decoder){var a=p.decoder.end();a&&a.length&&(p.buffer.push(a),p.length+=p.objectMode?1:a.length)}p.ended=!0,_p(e)}}(e,p);else if(p.objectMode||a&&a.length>0)if(p.ended&&!t){var r=new Error("stream.push() after EOF");e.emit("error",r)}else if(p.endEmitted&&t){var l=new Error("stream.unshift() after end event");e.emit("error",l)}else{var m;!p.decoder||t||d||(a=p.decoder.write(a),m=!p.objectMode&&0===a.length),t||(p.reading=!1),m||(p.flowing&&0===p.length&&!p.sync?(e.emit("data",a),e.read(0)):(p.length+=p.objectMode?1:a.length,t?p.buffer.unshift(a):p.buffer.push(a),p.needReadable&&_p(e))),function(e,p){p.readingMore||(p.readingMore=!0,Se(bp,e,p))}(e,p)}else t||(p.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(p)}Ee(fp,l),fp.prototype.push=function(e,p){var a=this._readableState;return a.objectMode||"string"!=typeof e||(p=p||a.defaultEncoding)!==a.encoding&&(e=V.from(e,p),p=""),cp(this,a,e,p,!1)},fp.prototype.unshift=function(e){return cp(this,this._readableState,e,"",!0)},fp.prototype.isPaused=function(){return!1===this._readableState.flowing},fp.prototype.setEncoding=function(e){return this._readableState.decoder=new mp(e),this._readableState.encoding=e,this};var vp=8388608;function wp(e,p){return e<=0||0===p.length&&p.ended?0:p.objectMode?1:e!=e?p.flowing&&p.length?p.buffer.head.data.length:p.length:(e>p.highWaterMark&&(p.highWaterMark=function(e){return e>=vp?e=vp:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=p.length?e:p.ended?p.length:(p.needReadable=!0,0))}function _p(e){var p=e._readableState;p.needReadable=!1,p.emittedReadable||(up("emitReadable",p.flowing),p.emittedReadable=!0,p.sync?Se(gp,e):gp(e))}function gp(e){up("emit readable"),e.emit("readable"),Sp(e)}function bp(e,p){for(var a=p.length;!p.reading&&!p.flowing&&!p.ended&&p.length<p.highWaterMark&&(up("maybeReadMore read 0"),e.read(0),a!==p.length);)a=p.length;p.readingMore=!1}function yp(e){up("readable nexttick read 0"),e.read(0)}function Np(e,p){p.reading||(up("resume read 0"),e.read(0)),p.resumeScheduled=!1,p.awaitDrain=0,e.emit("resume"),Sp(e),p.flowing&&!p.reading&&e.read(0)}function Sp(e){var p=e._readableState;for(up("flow",p.flowing);p.flowing&&null!==e.read(););}function Dp(e,p){return 0===p.length?null:(p.objectMode?a=p.buffer.shift():!e||e>=p.length?(a=p.decoder?p.buffer.join(""):1===p.buffer.length?p.buffer.head.data:p.buffer.concat(p.length),p.buffer.clear()):a=function(e,p,a){var d;return e<p.head.data.length?(d=p.head.data.slice(0,e),p.head.data=p.head.data.slice(e)):d=e===p.head.data.length?p.shift():a?function(e,p){var a=p.head,d=1,t=a.data;for(e-=t.length;a=a.next;){var i=a.data,r=e>i.length?i.length:e;if(r===i.length?t+=i:t+=i.slice(0,e),0==(e-=r)){r===i.length?(++d,a.next?p.head=a.next:p.head=p.tail=null):(p.head=a,a.data=i.slice(r));break}++d}return p.length-=d,t}(e,p):function(e,p){var a=V.allocUnsafe(e),d=p.head,t=1;for(d.data.copy(a),e-=d.data.length;d=d.next;){var i=d.data,r=e>i.length?i.length:e;if(i.copy(a,a.length-e,0,r),0==(e-=r)){r===i.length?(++t,d.next?p.head=d.next:p.head=p.tail=null):(p.head=d,d.data=i.slice(r));break}++t}return p.length-=t,a}(e,p),d}(e,p.buffer,p.decoder),a);var a}function Tp(e){var p=e._readableState;if(p.length>0)throw new Error('"endReadable()" called on non-empty stream');p.endEmitted||(p.ended=!0,Se(Ep,p,e))}function Ep(e,p){e.endEmitted||0!==e.length||(e.endEmitted=!0,p.readable=!1,p.emit("end"))}function Vp(e,p){for(var a=0,d=e.length;a<d;a++)if(e[a]===p)return a;return-1}function Ap(){}function kp(e,p,a){this.chunk=e,this.encoding=p,this.callback=a,this.next=null}function Rp(e,p){Object.defineProperty(this,"buffer",{get:Ie((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,p instanceof jp&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var a=e.highWaterMark,d=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:d,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var t=!1===e.decodeStrings;this.decodeStrings=!t,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,p){var a=e._writableState,d=a.sync,t=a.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(a),p)!function(e,p,a,d,t){--p.pendingcb,a?Se(t,d):t(d),e._writableState.errorEmitted=!0,e.emit("error",d)}(e,a,d,p,t);else{var i=Bp(a);i||a.corked||a.bufferProcessing||!a.bufferedRequest||Lp(e,a),d?Se(Op,e,a,i,t):Op(e,a,i,t)}}(p,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 zp(this)}function xp(e){if(!(this instanceof xp||this instanceof jp))return new xp(e);this._writableState=new Rp(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),l.call(this)}function Cp(e,p,a,d,t,i,r){p.writelen=d,p.writecb=r,p.writing=!0,p.sync=!0,a?e._writev(t,p.onwrite):e._write(t,i,p.onwrite),p.sync=!1}function Op(e,p,a,d){a||function(e,p){0===p.length&&p.needDrain&&(p.needDrain=!1,e.emit("drain"))}(e,p),p.pendingcb--,d(),Pp(e,p)}function Lp(e,p){p.bufferProcessing=!0;var a=p.bufferedRequest;if(e._writev&&a&&a.next){var d=p.bufferedRequestCount,t=new Array(d),i=p.corkedRequestsFree;i.entry=a;for(var r=0;a;)t[r]=a,a=a.next,r+=1;Cp(e,p,!0,p.length,t,"",i.finish),p.pendingcb++,p.lastBufferedRequest=null,i.next?(p.corkedRequestsFree=i.next,i.next=null):p.corkedRequestsFree=new zp(p)}else{for(;a;){var l=a.chunk,m=a.encoding,n=a.callback;if(Cp(e,p,!1,p.objectMode?1:l.length,l,m,n),a=a.next,p.writing)break}null===a&&(p.lastBufferedRequest=null)}p.bufferedRequestCount=0,p.bufferedRequest=a,p.bufferProcessing=!1}function Bp(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function Up(e,p){p.prefinished||(p.prefinished=!0,e.emit("prefinish"))}function Pp(e,p){var a=Bp(p);return a&&(0===p.pendingcb?(Up(e,p),p.finished=!0,e.emit("finish")):Up(e,p)),a}function zp(e){var p=this;this.next=null,this.entry=null,this.finish=function(a){var d=p.entry;for(p.entry=null;d;){var t=d.callback;e.pendingcb--,t(a),d=d.next}e.corkedRequestsFree?e.corkedRequestsFree.next=p:e.corkedRequestsFree=p}}fp.prototype.read=function(e){up("read",e),e=parseInt(e,10);var p=this._readableState,a=e;if(0!==e&&(p.emittedReadable=!1),0===e&&p.needReadable&&(p.length>=p.highWaterMark||p.ended))return up("read: emitReadable",p.length,p.ended),0===p.length&&p.ended?Tp(this):_p(this),null;if(0===(e=wp(e,p))&&p.ended)return 0===p.length&&Tp(this),null;var d,t=p.needReadable;return up("need readable",t),(0===p.length||p.length-e<p.highWaterMark)&&up("length less than watermark",t=!0),p.ended||p.reading?up("reading or ended",t=!1):t&&(up("do read"),p.reading=!0,p.sync=!0,0===p.length&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(e=wp(a,p))),null===(d=e>0?Dp(e,p):null)?(p.needReadable=!0,e=0):p.length-=e,0===p.length&&(p.ended||(p.needReadable=!0),a!==e&&p.ended&&Tp(this)),null!==d&&this.emit("data",d),d},fp.prototype._read=function(e){this.emit("error",new Error("not implemented"))},fp.prototype.pipe=function(e,p){var a=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,up("pipe count=%d opts=%j",d.pipesCount,p);var t=p&&!1===p.end?n:r;function i(e){up("onunpipe"),e===a&&n()}function r(){up("onend"),e.end()}d.endEmitted?Se(t):a.once("end",t),e.on("unpipe",i);var l=function(e){return function(){var p=e._readableState;up("pipeOnDrain",p.awaitDrain),p.awaitDrain&&p.awaitDrain--,0===p.awaitDrain&&e.listeners("data").length&&(p.flowing=!0,Sp(e))}}(a);e.on("drain",l);var m=!1;function n(){up("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",u),e.removeListener("unpipe",i),a.removeListener("end",r),a.removeListener("end",n),a.removeListener("data",s),m=!0,!d.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}var o=!1;function s(p){up("ondata"),o=!1,!1!==e.write(p)||o||((1===d.pipesCount&&d.pipes===e||d.pipesCount>1&&-1!==Vp(d.pipes,e))&&!m&&(up("false write response, pause",a._readableState.awaitDrain),a._readableState.awaitDrain++,o=!0),a.pause())}function u(p){var a;up("onerror",p),c(),e.removeListener("error",u),0===(a="error",e.listeners(a).length)&&e.emit("error",p)}function h(){e.removeListener("finish",f),c()}function f(){up("onfinish"),e.removeListener("close",h),c()}function c(){up("unpipe"),a.unpipe(e)}return a.on("data",s),function(e,p,a){if("function"==typeof e.prependListener)return e.prependListener(p,a);e._events&&e._events[p]?Array.isArray(e._events[p])?e._events[p].unshift(a):e._events[p]=[a,e._events[p]]:e.on(p,a)}(e,"error",u),e.once("close",h),e.once("finish",f),e.emit("pipe",a),d.flowing||(up("pipe resume"),a.resume()),e},fp.prototype.unpipe=function(e){var p=this._readableState;if(0===p.pipesCount)return this;if(1===p.pipesCount)return e&&e!==p.pipes||(e||(e=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,e&&e.emit("unpipe",this)),this;if(!e){var a=p.pipes,d=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var t=0;t<d;t++)a[t].emit("unpipe",this);ret