!function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var r=e.slice(1),n=t[e[0]];return function(t,e,i){n.apply(this,[t,e,i].concat(r))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,r){(function(n){"use strict";var i=r(1),o=r(227),s=r(228),a=r(42),u=r(230)(i),f=r(120),c={api:i,auth:o,broadcast:s,config:a,formatter:u,utils:f};"undefined"!=typeof window&&(window.steem=c),"undefined"!=typeof n&&(n.steem=c),e=t.exports=c}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r._setTransport(t),r._setLogger(t),r.options=t,r}return s(e,t),u(e,[{key:"_setTransport",value:function(t){if(t.url.match("^((http|https)?://)"))t.uri=t.url,t.transport="http",this._transportType=t.transport,this.options=t,this.transport=new _.default.http(t);else if(t.url.match("^((ws|wss)?://)"))t.websocket=t.url,t.transport="ws",this._transportType=t.transport,this.options=t,this.transport=new _.default.ws(t);else if(t.transport)if(this.transport&&this._transportType!==t.transport&&this.transport.stop(),this._transportType=t.transport,"string"==typeof t.transport){if(!_.default[t.transport])throw new TypeError("Invalid `transport`, valid values are `http`, `ws` or a class");this.transport=new _.default[t.transport](t)}else this.transport=new t.transport(t);else this.transport=new _.default.ws(t)}},{key:"_setLogger",value:function(t){if(t.hasOwnProperty("logger"))switch(a(t.logger)){case"function":this.__logger={log:t.logger};break;case"object":if("function"!=typeof t.logger.log)throw new Error("setOptions({logger:{}}) must have a property .log of type function");this.__logger=t.logger;break;case"undefined":if(this.__logger)break;default:this.__logger=!1}}},{key:"log",value:function(t){if(this.__logger)if(arguments.length>1&&"function"==typeof this.__logger[t]){var e=Array.prototype.slice.call(arguments,1);this.__logger[t].apply(this.__logger,e)}else this.__logger.log.apply(this.__logger,arguments)}},{key:"start",value:function(){return this.transport.start()}},{key:"stop",value:function(){return this.transport.stop()}},{key:"send",value:function(t,e,r){var n=r;if(this.__logger){var i=Math.random(),o=this;this.log("xmit:"+i+":",e),n=function(t,e){t?o.log("error","rsp:"+i+":\n\n",t,e):o.log("rsp:"+i+":",e),r&&r.apply(o,arguments)}}return this.transport.send(t,e,n)}},{key:"setOptions",value:function(t){Object.assign(this.options,t),this._setLogger(t),this._setTransport(this.options),this.transport.setOptions(this.options)}},{key:"setWebSocket",value:function(t){this.setOptions({websocket:t})}},{key:"setUri",value:function(t){this.setOptions({uri:t})}},{key:"streamBlockNumber",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;"function"==typeof t&&(r=t,t="head");var i="",o=!0,s=function s(){o&&e.getDynamicGlobalPropertiesAsync().then(function(e){var o="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(o!==i)if(i)for(var a=i;a0&&void 0!==arguments[0]?arguments[0]:"head",r=arguments[1];"function"==typeof e&&(r=e,e="head");var n="",i="",o=this.streamBlockNumber(e,function(e,s){return e?(o(),void r(e)):(n=s,void(n!==i&&(i=n,t.getBlock(n,r))))});return o}},{key:"streamTransactions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=arguments[1];"function"==typeof t&&(e=t,t="head");var r=this.streamBlock(t,function(t,n){return t?(r(),void e(t)):void(n&&n.transactions&&n.transactions.forEach(function(t){e(null,t)}))});return r}},{key:"streamOperations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",e=arguments[1];"function"==typeof t&&(e=t,t="head");var r=this.streamTransactions(t,function(t,n){return t?(r(),void e(t)):void n.operations.forEach(function(t){e(null,t)})});return r}}]),e}(c.default);y.default.forEach(function(t){var e=t.method_name||(0,m.camelCase)(t.method),r=t.params||[];E.prototype[e+"With"]=function(e,n){var i=r.map(function(t){return e[t]});return this.send(t.api,{method:t.method,params:i},n)},E.prototype[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],s=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){i=a;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=r(4)();o.noConflict=n,t.exports=o},function(t,e,r){(function(e){"use strict";t.exports=function(){function n(){}function i(t,e){if(null==t||t.constructor!==o)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new m("expecting a function but got "+d.classString(e))}function o(t){t!==w&&i(this,t),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(t),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function s(t){this.promise._resolveCallback(t)}function a(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var f,c=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},h=function(){return new o.PromiseInspection(this._target())},l=function(t){return o.reject(new m(t))},p={},d=r(6);f=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(o,"_getDomain",f);var v=r(7),y=r(8),g=new y;v.defineProperty(o,"_async",{value:g});var _=r(13),m=o.TypeError=_.TypeError;o.RangeError=_.RangeError;var b=o.CancellationError=_.CancellationError;o.TimeoutError=_.TimeoutError,o.OperationalError=_.OperationalError,o.RejectionError=_.OperationalError,o.AggregateError=_.AggregateError;var w=function(){},E={},k={},T=r(14)(o,w),B=r(15)(o,w,T,l,n),S=r(16)(o),x=S.create,A=r(17)(o,S),I=(A.CapturedTrace,r(18)(o,T,k)),O=r(19)(k),j=r(20),C=d.errorObj,R=d.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(r+=", "+d.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var r=this._then(t,e,void 0,void 0,void 0);r._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?l("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,E,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new B(this).promise()},o.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},o.getNewLibraryCopy=t.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=R(t)(j(e,r));return n===C&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new B(t).promise()},o.cast=function(t){var e=T(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+d.classString(t));return g.setScheduler(t)},o.prototype._then=function(t,e,r,n,i){var s=void 0!==i,a=s?i:new o(w),u=this._target(),c=u._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&c)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var h=f();if(0!==(50397184&c)){var l,p,v=u._settlePromiseCtx;0!==(33554432&c)?(p=u._rejectionHandler0,l=t):0!==(16777216&c)?(p=u._fulfillmentHandler0,l=e,u._unsetRejectionIsUnhandled()):(v=u._settlePromiseLateCancellationObserver,p=new b("late cancellation observer"),u._attachExtraTrace(p),l=e),g.invoke(v,u,{handler:null===h?l:"function"==typeof l&&d.domainBind(h,l),promise:a,receiver:n,value:p})}else u._addCallbacks(t,e,a,n,h);return a},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==p)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=p),this._addCallbacks(e,r,n,i,null)},o.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=p),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:d.domainBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:d.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(c(),!1);var r=T(t,this);if(!(r instanceof o))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(c());var i=n._bitField;if(0===(50397184&i)){var s=this._length();s>0&&n._migrateCallback0(this);for(var a=1;a>>16)){if(t===this){var r=c();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?g.fatalError(t,d.isNode):void((65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var r=1;r0){if(0!==(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){A.deprecated("Promise.defer","new Promise");var t=new o(w);return{promise:t,resolve:s,reject:a}},d.notEnumerableProp(o,"_makeSelfResolutionError",c),r(21)(o,w,T,l,A),r(22)(o,w,T,A),r(23)(o,B,l,A),r(24)(o),r(25)(o),r(26)(o,B,T,w,g,f),o.Promise=o,o.version="3.5.0",r(27)(o,B,l,T,w,A),r(28)(o),r(29)(o,l,T,x,w,A),r(30)(o,w,A),r(31)(o,l,w,T,n,A),r(32)(o),r(33)(o,w),r(34)(o,B,T,l),r(35)(o,w,T,l),r(36)(o,B,l,T,w,A),r(37)(o,B,A),r(38)(o,B,l),r(39)(o,w),r(40)(o,w),r(41)(o),d.toFastProperties(o),d.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),A.setBounds(y.firstLineError,d.lastLineError),o}}).call(e,r(5))},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){v&&p&&(v=!1,p.length?d=p.concat(d):y=-1,d.length&&a())}function a(){if(!v){var t=i(s);v=!0;for(var e=d.length;e;){for(p=d,d=[];++y1)for(var r=1;r1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=L.test(t+"")&&x.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function d(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function v(t){return U.test(t)}function y(t,e,r){for(var n=new Array(t),i=0;i10||t[0]>0}(),q.isNode&&q.toFastProperties(n);try{throw new Error}catch(t){q.lastLineError=t}t.exports=q}).call(e,function(){return this}(),r(5))},function(t,e){var r=function(){"use strict";return void 0===this}();if(r)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var n={}.hasOwnProperty,i={}.toString,o={}.constructor.prototype,s=function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e},a=function(t,e){return{value:t[e]}},u=function(t,e,r){return t[e]=r.value,t},f=function(t){return t},c=function(t){try{return Object(t).constructor.prototype}catch(t){return o}},h=function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}};t.exports={isArray:h,keys:s,names:s,defineProperty:u,getDescriptor:a,freeze:f,getPrototypeOf:c,isES5:r,propertyIsWritable:function(){return!0}}}},function(t,e,r){(function(e){"use strict";function n(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new f(16),this._normalQueue=new f(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=u}function i(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function o(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(t){a=t}var u=r(9),f=r(12),c=r(6);n.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},n.prototype.hasCustomScheduler=function(){return this._customScheduler},n.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},n.prototype.disableTrampolineIfNecessary=function(){c.hasDevTools&&(this._trampolineEnabled=!1)},n.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},n.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},n.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},c.hasDevTools?(n.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?i.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},n.prototype.invoke=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},n.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(n.prototype.invokeLater=i,n.prototype.invoke=o,n.prototype.settlePromises=s),n.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},n.prototype._drainQueues=function(){ this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},n.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},n.prototype._reset=function(){this._isTickUsed=!1},t.exports=n,t.exports.firstLineError=a}).call(e,r(5))},function(t,e,r){(function(e,n,i){"use strict";var o,s=r(6),a=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},u=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var f=e.setImmediate,c=n.nextTick;o=s.isRecentNode?function(t){f.call(e,t)}:function(t){c.call(n,t)}}else if("function"==typeof u&&"function"==typeof u.resolve){var h=u.resolve();o=function(t){h.then(t)}}else o="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof i?function(t){i(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:a:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});i.observe(n,e);var o=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),o()}}();t.exports=o}).call(e,function(){return this}(),r(5),r(10).setImmediate)},function(t,e,r){function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(11),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e,r){(function(t,e){!function(t,r){"use strict";function n(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},function(t,e,r){(function(e){"use strict";t.exports=function(t,n){function i(t,e){return{promise:e}}function o(){return!1}function s(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+N.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function a(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?N.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function f(t){this._onCancelField=t}function c(){this._cancellationParent=void 0,this._onCancelField=void 0}function h(t,e){if(0!==(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function l(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function d(){this._trace=new C(this._peekContext())}function v(t,e){if(M(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=T(t);N.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),N.notEnumerableProp(t,"__stackCleaned__",!0)}}}function y(t,e,r,n,i){if(void 0===t&&null!==e&&Z){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&n._bitField))return;r&&(r+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),u=E(a),f=u.length-1;f>=0;--f){var c=u[f];if(!z.test(c)){var h=c.match(V);h&&(o="at "+h[1]+":"+h[2]+":"+h[3]+" ");break}}if(u.length>0)for(var l=u[0],f=0;f0&&(s="\n"+a[f-1]);break}}var p="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(p,!0,e)}}function g(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),_(r)}function _(e,r,n){if(st.warnings){var i,o=new D(e);if(r)n._attachExtraTrace(o);else if(st.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=T(o);o.stack=s.message+"\n"+s.stack.join("\n")}et("warning",o)||B(o,"",!0)}}function m(t,e){for(var r=0;r=0;--a)if(n[a]===o){s=a;break}for(var a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}function E(t){for(var e=[],r=0;r0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}function T(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?k(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:E(e)}}function B(t,e,r){if("undefined"!=typeof console){var n;if(N.isObject(t)){var i=t.stack;n=e+W(i,t)}else n=e+String(t);"function"==typeof U?U(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function S(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){P.throwLater(t)}"unhandledRejection"===t?et(t,r,n)||i||B(r,"Unhandled rejection "):et(t,n)}function x(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():N.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+A(e)+">, no stack trace)"}function A(t){var e=41;return t.length=a||(nt=function(t){if(q.test(t))return!0;var e=O(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}}function C(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,C),e>32&&this.uncycle()}var R,L,U,F=t._getDomain,P=t._async,D=r(13).Warning,N=r(6),M=N.canAttachTrace,q=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,z=/\((?:timers\.js):\d+:\d+\)/,V=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,W=null,Y=!1,G=!(0==N.env("BLUEBIRD_DEBUG")||!N.env("BLUEBIRD_DEBUG")&&"development"!==N.env("NODE_ENV")),$=!(0==N.env("BLUEBIRD_WARNINGS")||!G&&!N.env("BLUEBIRD_WARNINGS")),X=!(0==N.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!N.env("BLUEBIRD_LONG_STACK_TRACES")),Z=0!=N.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&($||!!N.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),P.invokeLater(this._notifyUnhandledRejection,this,void 0))},t.prototype._notifyUnhandledRejectionIsHandled=function(){S("rejectionHandled",R,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),S("unhandledRejection",L,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return _(t,e,r||this)},t.onPossiblyUnhandledRejection=function(t){var e=F();L="function"==typeof t?null===e?t:N.domainBind(e,t):void 0},t.onUnhandledRejectionHandled=function(t){var e=F();R="function"==typeof t?null===e?t:N.domainBind(e,t):void 0};var K=function(){};t.longStackTraces=function(){if(P.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!st.longStackTraces&&I()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace;st.longStackTraces=!0,K=function(){if(P.haveItemsQueued()&&!st.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),P.enableTrampoline(),st.longStackTraces=!1},t.prototype._captureStackTrace=d,t.prototype._attachExtraTrace=v,n.activateLongStackTraces(),P.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return st.longStackTraces&&I()};var Q=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!N.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!N.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),N.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!N.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),J=function(){return N.isNode?function(){return e.emit.apply(e,arguments)}:N.global?function(t){var e="on"+t.toLowerCase(),r=N.global[e];return!!r&&(r.apply(N.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:i},et=function(t){var e=!1;try{e=J.apply(null,arguments)}catch(t){P.throwLater(t),e=!0}var r=!1;try{r=Q(t,tt[t].apply(null,arguments))}catch(t){P.throwLater(t),r=!0}return r||e};t.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&K()),"warnings"in e){var r=e.warnings;st.warnings=!!r,Z=st.warnings,N.isObject(r)&&"wForgottenReturn"in r&&(Z=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!st.cancellation){if(P.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=c,t.prototype._propagateFrom=h,t.prototype._onCancel=u,t.prototype._setOnCancel=f,t.prototype._attachCancellationCallback=a,t.prototype._execute=s,rt=h,st.cancellation=!0}return"monitoring"in e&&(e.monitoring&&!st.monitoring?(st.monitoring=!0,t.prototype._fireEvent=et):!e.monitoring&&st.monitoring&&(st.monitoring=!1,t.prototype._fireEvent=o)),t},t.prototype._fireEvent=o,t.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(t){},t.prototype._attachCancellationCallback=function(t){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var rt=l,nt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;N.inherits(C,Error),n.CapturedTrace=C,C.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;a=0;--c)e[c]._length=f,f++;return}}}},C.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=T(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(E(i.stack.split("\n"))),i=i._parent;w(n),b(n),N.notEnumerableProp(t,"stack",m(r,n)),N.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():x(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=t,W=e;var r=Error.captureStackTrace;return nt=function(t){return q.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,W=e,Y=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(W=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?x(e):e.toString()},null):(H=t,W=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(U=function(t){console.warn(t)},N.isNode&&e.stderr.isTTY?U=function(t,e){var r=e?"":"";console.warn(r+t+"\n")}:N.isNode||"string"!=typeof(new Error).stack||(U=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var st={warnings:$,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&t.longStackTraces(),{longStackTraces:function(){return st.longStackTraces},warnings:function(){return st.warnings},cancellation:function(){return st.cancellation},monitoring:function(){return st.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return p},checkForgottenReturns:y,setBounds:j,warn:_,deprecated:g,CapturedTrace:C,fireDomEvent:Q,fireGlobalEvent:J}}}).call(e,r(5))},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function o(t){this.finallyHandler=t}function s(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return f.call(this,this.promise._target()._settledValue())}function u(t){if(!s(this,t))return l.e=t,l}function f(r){var i=this.promise,f=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?f.call(i._boundValue()):f.call(i._boundValue(),r);if(c===n)return c;if(void 0!==c){i._setReturnedNonUndefined();var p=e(c,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new h("late cancellation observer");return i._attachExtraTrace(d),l.e=d,l}p.isPending()&&p._attachCancellationCallback(new o(this))}return p._then(a,u,void 0,this,void 0)}}}return i.isRejected()?(s(this),l.e=r,l):(s(this),r)}var c=r(6),h=t.CancellationError,l=c.errorObj,p=r(19)(n);return i.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){s(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new i(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,f,f)},t.prototype.tap=function(t){return this._passThrough(t,1,f)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,f);var n,i=new Array(r-1),o=0;for(n=0;n1){o.deprecated("calling Promise.try with more than 1 argument");var f=arguments[1],c=arguments[2];u=s.isArray(f)?a(r).apply(c,f):a(r).call(c,f)}else u=a(r)();var h=n._popContext();return o.checkForgottenReturns(u,h,"Promise.try",n),n._resolveFromSyncValue(u),n},t.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},function(t,e){"use strict";t.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var f=r(o),c=new t(e);c._propagateFrom(this,1);var h=this._target();if(c._setBoundTo(f),f instanceof t){var l={promiseRejectionQueued:!1,promise:c,target:h,bindingPromise:f};h._then(e,s,void 0,c,l),f._then(a,u,void 0,c,l),c._setOnCancel(f)}else c._resolveCallback(h);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o=r(6),s=o.tryCatch,a=o.errorObj,u=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r0&&"function"==typeof arguments[o]&&(r=arguments[o],o<=8&&f)){var c=new t(i);c._captureStackTrace();for(var h=v[o-1],l=new h(r),p=y,d=0;d=1?s:0,new a(e,r,s,o).promise()}var f=t._getDomain,c=r(6),h=c.tryCatch,l=c.errorObj,p=t._async;c.inherits(a,e),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var f=this._promise,c=this._callback,p=f._boundValue();f._pushContext();var d=h(c).call(p,e,r,o),v=f._popContext();if(s.checkForgottenReturns(d,v,null!==a?"Promise.filter":"Promise.map",f),d===l)return this._reject(d.e),!0;var y=i(d,this._promise);if(y instanceof t){y=y._target();var g=y._bitField;if(0===(50397184&g))return u>=1&&this._inFlight++,n[r]=y,y._proxy(this,(r+1)*-1),!1;if(0===(33554432&g))return 0!==(16777216&g)?(this._reject(y._reason()),!0):(this._cancel(),!0);d=y._value()}n[r]=d}var _=++this._totalResolved;return _>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight512){for(var i=Object.keys(r),o=0;o<256;++o)delete r[i[o]];r[" size"]=i.length-256}}return n};u=function(t){return v(t,p,i)},f=function(t){return v(t,d,o)},t.prototype.call=function(t){for(var e=arguments.length,r=new Array(Math.max(e-1,0)),i=1;i=f)return c._fulfill();var o=u(e[s++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(t){return a(t)}if(o instanceof t)return o._then(i,a,null,null,null)}i()}var s=0,f=e.length,c=new t(o);return i(),c}function c(t,e,r){this._data=t,this._promise=e,this._context=r}function h(t,e,r){this.constructor$(t,e,r)}function l(t){return c.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function p(t){this.length=t,this.promise=null,this[t-1]=null}var d=r(6),v=r(13).TypeError,y=r(6).inherits,g=d.errorObj,_=d.tryCatch,m={};c.prototype.data=function(){return this._data},c.prototype.promise=function(){return this._promise},c.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},c.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==m?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},c.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},y(h,c),h.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},p.prototype._resultCancelled=function(){for(var e=this.length,r=0;r0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new h(t,this,i());throw new v}}},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=r(6),u=t.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var f=function(t){return c(+this).thenReturn(t)},c=t.delay=function(r,o){var s,a;return void 0!==o?(s=t.resolve(o)._then(f,null,null,r,void 0),n.cancellation()&&o instanceof t&&s._setOnCancel(o)):(s=new t(e),a=setTimeout(function(){s._fulfill()},+r),n.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};t.prototype.delay=function(t){return c(t,this)};var h=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),a.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};t.prototype.timeout=function(t,e){t=+t;var r,a,u=new i(setTimeout(function(){r.isPending()&&h(r,e,a)},t));return n.cancellation()?(a=this.then(),r=a._then(o,s,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,s,void 0,u,void 0),r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){function a(e,r,n){for(var o=0;o=r;--n)e.push(n);for(var n=t+1;n<=3;++n)e.push(n);return e},S=function(t){return p.filledRange(t,"_arg","")},x=function(t){return p.filledRange(Math.max(t,3),"_arg","")},A=function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0};h=function(r,n,i,o,s,a){function u(t){var e,r=S(t).join(", "),i=t>0?", ":"";return e=g?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===n?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n",e.replace("{{args}}",r).replace(", ",i)}function f(){for(var t="",e=0;e=this._length){var n;if(this._isMap)n=l(this._values);else{n={};for(var i=this.length(),o=0,s=this.length();o>1},t.prototype.props=function(){return s(this)},t.props=function(t){return s(t)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){function o(r,o){var u=n(r);if(u instanceof t)return a(u);if(r=s.asArray(r),null===r)return i("expecting an array or an iterable object but got "+s.classString(r));var f=new t(e);void 0!==o&&f._propagateFrom(o,3);for(var c=f._fulfill,h=f._reject,l=0,p=r.length;l=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var s=r(6),a=r(13).RangeError,u=r(13).AggregateError,f=s.isArray,c={};s.inherits(i,e),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=f(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(c),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return o(t,e)},t.prototype.some=function(t){return o(this,t)},t._SomePromiseArray=i}},function(t,e){"use strict";t.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},function(t,e){"use strict";t.exports=function(t,e){function r(){return o(this)}function n(t,r){return i(t,r,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},function(t,e){"use strict";t.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var r=0;r-1&&t%1==0&&t-1&&t%1==0&&t<=n}var n=9007199254740991;t.exports=r},function(t,e){function r(t){return function(e){return t(e)}}t.exports=r},function(t,e,r){(function(t){var n=r(58),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i,a=s&&n.process,u=function(){try{return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(e,r(64)(t))},function(t,e,r){function n(t){if(!i(t))return o(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}var i=r(73),o=r(74),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},function(t,e){function r(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||n;return t===r}var n=Object.prototype;t.exports=r},function(t,e,r){var n=r(75),i=n(Object.keys,Object);t.exports=i},function(t,e){function r(t,e){return function(r){return t(e(r))}}t.exports=r},function(t,e,r){function n(t){return null!=t&&o(t.length)&&!i(t)}var i=r(77),o=r(69);t.exports=n},function(t,e,r){function n(t){if(!o(t))return!1;var e=i(t);return e==a||e==u||e==s||e==f}var i=r(55),o=r(78),s="[object AsyncFunction]",a="[object Function]",u="[object GeneratorFunction]",f="[object Proxy]";t.exports=n},function(t,e){function r(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=r},function(t,e,r){function n(t,e){return function(r,n){if(null==r)return r;if(!i(r))return t(r,n);for(var o=r.length,s=e?o:-1,a=Object(r);(e?s--:++s-1?e:t}function v(t,e){e=e||{};var r=e.body;if(t instanceof v){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new s(t.headers)),this.method=t.method,this.mode=t.mode,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new s(e.headers)),this.method=d(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function y(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}}),e}function g(t){var e=new s;return t.split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}}),e}function _(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new s(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var m={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(m.arrayBuffer)var b=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],w=function(t){return t&&DataView.prototype.isPrototypeOf(t)},E=ArrayBuffer.isView||function(t){return t&&b.indexOf(Object.prototype.toString.call(t))>-1};s.prototype.append=function(t,e){t=n(t),e=i(e);var r=this.map[t];this.map[t]=r?r+","+e:e},s.prototype.delete=function(t){delete this.map[n(t)]},s.prototype.get=function(t){return t=n(t),this.has(t)?this.map[t]:null},s.prototype.has=function(t){return this.map.hasOwnProperty(n(t))},s.prototype.set=function(t,e){this.map[n(t)]=i(e)},s.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},s.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),o(t)},s.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),o(t)},s.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),o(t)},m.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},p.call(v.prototype),p.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},_.error=function(){var t=new _(null,{status:0,statusText:""});return t.type="error",t};var T=[301,302,303,307,308];_.redirect=function(t,e){if(T.indexOf(e)===-1)throw new RangeError("Invalid status code");return new _(null,{status:e,headers:{location:t}})},t.Headers=s,t.Request=v,t.Response=_,t.fetch=function(t,n){return new e(function(e,i){var o=new v(t,n),s=new r;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:g(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var r="response"in s?s.response:s.responseText;e(new _(r,t))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.open(o.method,o.url,!0),"include"===o.credentials&&(s.withCredentials=!0),"responseType"in s&&m.blob&&(s.responseType="blob"),o.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof t?t:this),{fetch:t.fetch,Headers:t.Headers,Request:t.Request,Response:t.Response}}()}n=function(){return o}.call(e,r,e,t),!(void 0!==n&&(t.exports=n))}("undefined"==typeof self?this:self)},function(t,e,r){(function(n){function i(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,n)}}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof n&&"env"in n&&(t=n.env.DEBUG),t}function f(){try{return window.localStorage}catch(t){}}e=t.exports=r(88),e.log=s,e.formatArgs=o,e.save=a,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:f(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,r(5))},function(t,e,r){function n(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}function i(t){function r(){if(r.enabled){var t=r,n=+new Date,i=n-(f||n);t.diff=i,t.prev=f,t.curr=n,f=n;for(var o=new Array(arguments.length),s=0;s100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"days":case"day":case"d":return r*f;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function n(t){return t>=f?Math.round(t/f)+"d":t>=u?Math.round(t/u)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function i(t){return o(t,f,"day")||o(t,u,"hour")||o(t,a,"minute")||o(t,s,"second")||t+" ms"}function o(t,e,r){if(!(t0)return r(t);if("number"===o&&isNaN(t)===!1)return e.long?i(t):n(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.options=t,r.id=0,r}return s(e,t),a(e,[{key:"setOptions",value:function(t){var e=this;(0,p.default)(t,function(t,r){e.options[r]=t}),this.stop()}},{key:"listenTo",value:function(t,e,r){return t.addEventListener?t.addEventListener(e,r):t.on(e,r),function(){t.removeEventListener?t.removeEventListener(e,r):t.removeListener(e,r)}}},{key:"send",value:function(){}},{key:"start",value:function(){}},{key:"stop",value:function(){}}]),e}(h.default);e.default=d,f.default.promisifyAll(d.prototype)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),(0,h.default)(t,b);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.apiIds=t.apiIds,r.inFlight=0,r.currentP=f.default.fulfilled(),r.isOpen=!1,r.releases=[],r.requests={},r.requestsTime={},r.apiIdsP={},r}return s(e,t),a(e,[{key:"start",value:function(){var t=this;if(this.startP)return this.startP;var e=new f.default(function(r,n){if(e===t.startP){var i=t.options.websocket;t.ws=new _(i);var o=t.listenTo(t.ws,"open",function(){m("Opened WS connection with",i),t.isOpen=!0,o(),r()}),s=t.listenTo(t.ws,"close",function(){m("Closed WS connection with",i),t.isOpen=!1,delete t.ws,t.stop(),e.isPending()&&n(new Error("The WS connection was closed before this operation was made"))}),a=t.listenTo(t.ws,"message",function(e){m("Received message",e.data);var r=JSON.parse(e.data),n=r.id,i=t.requests[n];i||m("Steem.onMessage: unknown request ",n),delete t.requests[n],t.onMessage(r,i)});t.releases=t.releases.concat([o,s,a])}});return this.startP=e,this.getApiIds(),e}},{key:"stop",value:function(){m("Stopping..."),this.ws&&this.ws.close(),this.apiIdsP={},delete this.startP,delete this.ws,this.releases.forEach(function(t){return t()}),this.releases=[]}},{key:"getApiIds",value:function(t,e){var r=this;if(!e&&t&&this.apiIdsP[t])return this.apiIdsP[t];var n=t?[t]:Object.keys(this.apiIds);return n.forEach(function(t){r.apiIdsP[t]=r.sendAsync("login_api",{method:"get_api_by_name",params:[t]}).then(function(e){null!=e&&(r.apiIds[t]=e)})}),t?this.apiIdsP[t]:f.default.props(this.apiIdsP)}},{key:"send",value:function(t,e,r){var n=this;m("Steem::send",t,e);var i=e.id||this.id++,o=this.start(),s="login_api"===t&&"get_api_by_name"===e.method?f.default.fulfilled():this.getApiIds(t);return m("login_api"===t&&"get_api_by_name"===e.method?"Sending setup message":"Going to wait for setup messages to resolve"),this.currentP=f.default.join(o,s).then(function(){return new f.default(function(r,o){if(!n.ws)return void o(new Error("The WS connection was closed while this request was pending"));var s=JSON.stringify({id:i,method:"call",params:[n.apiIds[t],e.method,e.params]});m("Sending message",s),n.requests[i]={api:t,data:e,resolve:r,reject:o,start_time:Date.now()},n.ws.send(s)})}).nodeify(r),this.currentP}},{key:"onMessage",value:function(t,e){var r=e.api,n=e.data,i=e.resolve,o=e.reject,s=e.start_time;m("-- Steem.onMessage -->",t.id);var a=t.error;if(a){var u=new Error((a.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return u.payload=t,void o(u)}"login_api"===r&&"login"===n.method&&(m("network_broadcast_api API ID depends on the WS' session. Triggering a refresh..."),this.getApiIds("network_broadcast_api",!0)),m("Resolved",r,n,"->",t),this.emit("track-performance",n.method,Date.now()-s),delete this.requests[t.id],i(t.result)}}]),e}(g.default);e.default=w},function(t,e,r){var n=r(93),i=r(94),o=r(107),s=r(117),a=o(function(t){return t.push(void 0,s),n(i,void 0,t)});t.exports=a},function(t,e){function r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}t.exports=r},function(t,e,r){var n=r(95),i=r(106),o=r(114),s=i(function(t,e,r,i){n(e,o(e),t,i)});t.exports=s},function(t,e,r){function n(t,e,r,n){var s=!r;r||(r={});for(var a=-1,u=e.length;++a1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,a&&o(r[0],r[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++n0){if(++e>=n)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var n=800,i=16,o=Date.now;t.exports=r},function(t,e,r){function n(t,e,r){if(!a(r))return!1;var n=typeof e;return!!("number"==n?o(r)&&s(e,r.length):"string"==n&&e in r)&&i(r[e],t)}var i=r(105),o=r(76),s=r(66),a=r(78);t.exports=n},function(t,e,r){function n(t){return s(t)?i(t,!0):o(t)}var i=r(51),o=r(115),s=r(76);t.exports=n},function(t,e,r){function n(t){if(!i(t))return s(t);var e=o(t),r=[];for(var n in t)("constructor"!=n||!e&&u.call(t,n))&&r.push(n);return r}var i=r(78),o=r(73),s=r(116),a=Object.prototype,u=a.hasOwnProperty;t.exports=n},function(t,e){function r(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}t.exports=r},function(t,e,r){function n(t,e,r,n){return void 0===t||i(t,o[r])&&!s.call(n,r)?e:t}var i=r(105),o=Object.prototype,s=o.hasOwnProperty;t.exports=n},function(t,e){(function(e){t.exports=!1;try{t.exports="[object process]"===Object.prototype.toString.call(e.process)}catch(t){}}).call(e,function(){return this}())},function(t,e){},function(t,e){"use strict";function r(t){return t.replace(i,function(t,e){return e.toUpperCase()})}function n(t){var e=void 0,r=void 0,n=void 0,i=void 0;if(i="Account name should ",!t)return i+"not be empty.";var o=t.length;if(o<3)return i+"be longer.";if(o>16)return i+"be shorter.";/\./.test(t)&&(i="Each account segment should ");var s=t.split(".");for(e=0,n=s.length;e=3))return i+"be longer"}return null}Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=r,e.validateAccountName=n;var i=/_([a-z])/g},function(t,e,r){"use strict";t.exports={Address:r(122),Aes:r(173),PrivateKey:r(209),PublicKey:r(199),Signature:r(210),brainKey:r(214),key_utils:r(215),hash:r(131),ecc_config:r(42)}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:s.get("address_prefix"),r=a.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+u.encode(n)}}],[{key:"fromBuffer",value:function(e){var r=a.sha512(e),n=a.ripemd160(r);return new t(n)}},{key:"fromString",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.get("address_prefix"),i=r.slice(0,n.length);o.equal(n,i,"Expecting key to begin with "+n+", instead got "+i);var f=r.slice(n.length);f=new e(u.decode(f),"binary");var c=f.slice(-4);f=f.slice(0,-4);var h=a.ripemd160(f);return h=h.slice(0,4),o.deepEqual(c,h,"Checksum did not match"),new t(f)}},{key:"fromPublic",value:function(r){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=a.sha256(r.toBuffer(n)),s=a.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var f=e.concat([u,s]),c=a.sha256(f);c=a.sha256(c);var h=e.concat([f,c.slice(0,4)]);return new t(a.ripemd160(h))}}]),t}();t.exports=f}).call(e,r(123).Buffer)},function(t,e,r){(function(t){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function y(t){return+t!=t&&(t=0),s.alloc(+t)}function g(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(t).length;default:if(n)return W(t).length;e=(""+e).toLowerCase(),n=!0}}function _(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return j(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var f;if(i){var c=-1;for(f=r;fa&&(r=a-u),f=r;f>=0;f--){for(var h=!0,l=0;li&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,f,c,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],f=t[i+2],128===(192&u)&&128===(192&f)&&(h=(15&o)<<12|(63&u)<<6|63&f,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],f=t[i+2],c=t[i+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(h=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&c,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return O(n)}function O(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function F(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function P(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function N(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(t,e,r,n,i){return i||N(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(t,e,r,n,23,4),r+4}function q(t,e,r,n,i){return i||N(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(t,e,r,n,52,8),r+8}function z(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function W(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Y(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function $(t){return K.toByteArray(z(t))}function X(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Z(t){return t!==t}var K=r(124),Q=r(125),J=r(126);e.Buffer=s,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),e.kMaxLength=i(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return a(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return f(null,t,e,r)},s.allocUnsafe=function(t){return c(null,t)},s.allocUnsafeSlow=function(t){return c(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,a=r-e,u=Math.min(o,a),f=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return k(this,t,e,r);case"ascii":return T(this,t,e,r);case"latin1":case"binary":return B(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||U(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),Q.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),Q.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),Q.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),Q.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;F(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);F(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);F(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||F(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return q(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return q(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,s,a=t.length;o=r(t),s=new c(3*a/4-o),n=o>0?a-4:a;var u=0;for(e=0;e>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=f[t.charCodeAt(e)]<<2|f[t.charCodeAt(e+1)]>>4,s[u++]=255&i):1===o&&(i=f[t.charCodeAt(e)]<<10|f[t.charCodeAt(e+1)]<<4|f[t.charCodeAt(e+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function s(t,e,r){for(var n,i=[],s=e;sc?c:f+a));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=a;for(var u=[],f=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=h.length;l>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*v}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(e){"use strict";function n(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i=0;a--)if(u[a]!==f[a])return!1;for(a=u.length-1;a>=0;a--)if(s=u[a],!p(t[s],e[s],r,n))return!1;return!0}function y(t,e,r){p(t,e,!0)&&h(t,e,r,"notDeepStrictEqual",y)}function g(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&e.call({},t)===!0}function _(t){var e;try{t()}catch(t){e=t}return e}function m(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=_(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&h(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!t&&b.isError(i),a=!t&&i&&!r;if((s&&o&&g(i,r)||a)&&h(i,r,"Got unwanted exception"+n),t&&i&&r&&!g(i,r)||!t&&i)throw i}var b=r(128),w=Object.prototype.hasOwnProperty,E=Array.prototype.slice,k=function(){return"foo"===function(){}.name}(),T=t.exports=l,B=/\s*function\s+([^\(\s]*)\s*/;T.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var e=t.stackStartFunction||h;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=a(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},b.inherits(T.AssertionError,Error),T.fail=h,T.ok=l,T.equal=function(t,e,r){t!=e&&h(t,e,r,"==",T.equal)},T.notEqual=function(t,e,r){t==e&&h(t,e,r,"!=",T.notEqual)},T.deepEqual=function(t,e,r){p(t,e,!1)||h(t,e,r,"deepEqual",T.deepEqual)},T.deepStrictEqual=function(t,e,r){p(t,e,!0)||h(t,e,r,"deepStrictEqual",T.deepStrictEqual)},T.notDeepEqual=function(t,e,r){p(t,e,!1)&&h(t,e,r,"notDeepEqual",T.notDeepEqual)},T.notDeepStrictEqual=y,T.strictEqual=function(t,e,r){t!==e&&h(t,e,r,"===",T.strictEqual)},T.notStrictEqual=function(t,e,r){t===e&&h(t,e,r,"!==",T.notStrictEqual)},T.throws=function(t,e,r){m(!0,t,e,r)},T.doesNotThrow=function(t,e,r){m(!1,t,e,r)},T.ifError=function(t){if(t)throw t};var S=Object.keys||function(t){var e=[];for(var r in t)w.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),v(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function s(t,e){return t}function a(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var o=f(t,r);if(o)return o;var s=Object.keys(r),v=a(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),B(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(r);if(0===s.length){if(S(r)){var y=r.name?": "+r.name:"";return t.stylize("[Function"+y+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(B(r))return c(r)}var g="",_=!1,b=["{","}"];if(d(r)&&(_=!0,b=["[","]"]),S(r)){var w=r.name?": "+r.name:"";g=" [Function"+w+"]"}if(E(r)&&(g=" "+RegExp.prototype.toString.call(r)),T(r)&&(g=" "+Date.prototype.toUTCString.call(r)),B(r)&&(g=" "+c(r)),0===s.length&&(!_||0==r.length))return b[0]+g+b[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var k;return k=_?h(t,r,n,v,s):s.map(function(e){return l(t,r,n,v,e,_)}),t.seen.pop(),p(k,g,b)}function f(t,e){if(w(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return _(e)?t.stylize(""+e,"number"):v(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;s-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function v(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return null==t}function _(t){return"number"==typeof t}function m(t){return"string"==typeof t}function b(t){return"symbol"==typeof t}function w(t){return void 0===t}function E(t){return k(t)&&"[object RegExp]"===A(t)}function k(t){return"object"==typeof t&&null!==t}function T(t){return k(t)&&"[object Date]"===A(t)}function B(t){return k(t)&&("[object Error]"===A(t)||t instanceof Error)}function S(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function A(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}function O(){var t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var C=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),a=n[r];r>5]|=128<>>9<<4)+14]=e;for(var r=1732584193,n=-271733879,i=-1732584194,c=271733878,h=0;h>16)+(e>>16)+(r>>16);return n<<16|65535&r}function c(t,e){return t<>>32-e}var h=r(135);t.exports=function(t){return h(t,n)}},function(t,e,r){(function(e){"use strict";function r(t){if(t.length%n!==0){var r=t.length+(n-t.length%n);t=e.concat([t,i],r)}for(var o=new Array(t.length>>>2),s=0,a=0;s>>32-e}function o(t,e,r,n,o,s,a,u){return i(t+(e^r^n)+s+a|0,u)+o|0}function s(t,e,r,n,o,s,a,u){return i(t+(e&r|~e&n)+s+a|0,u)+o|0}function a(t,e,r,n,o,s,a,u){return i(t+((e|~r)^n)+s+a|0,u)+o|0}function u(t,e,r,n,o,s,a,u){return i(t+(e&n|r&~n)+s+a|0,u)+o|0}function f(t,e,r,n,o,s,a,u){return i(t+(e^(r|~n))+s+a|0,u)+o|0}var c=r(133),h=r(137);c(n,h),n.prototype._update=function(){for(var t=new Array(16),e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,c=this._c,h=this._d,l=this._e;r=o(r,n,c,h,l,t[0],0,11),c=i(c,10),l=o(l,r,n,c,h,t[1],0,14),n=i(n,10),h=o(h,l,r,n,c,t[2],0,15),r=i(r,10),c=o(c,h,l,r,n,t[3],0,12),l=i(l,10),n=o(n,c,h,l,r,t[4],0,5),h=i(h,10),r=o(r,n,c,h,l,t[5],0,8),c=i(c,10),l=o(l,r,n,c,h,t[6],0,7),n=i(n,10),h=o(h,l,r,n,c,t[7],0,9),r=i(r,10),c=o(c,h,l,r,n,t[8],0,11),l=i(l,10),n=o(n,c,h,l,r,t[9],0,13),h=i(h,10),r=o(r,n,c,h,l,t[10],0,14),c=i(c,10),l=o(l,r,n,c,h,t[11],0,15),n=i(n,10),h=o(h,l,r,n,c,t[12],0,6),r=i(r,10),c=o(c,h,l,r,n,t[13],0,7),l=i(l,10),n=o(n,c,h,l,r,t[14],0,9),h=i(h,10),r=o(r,n,c,h,l,t[15],0,8),c=i(c,10),l=s(l,r,n,c,h,t[7],1518500249,7),n=i(n,10),h=s(h,l,r,n,c,t[4],1518500249,6),r=i(r,10),c=s(c,h,l,r,n,t[13],1518500249,8),l=i(l,10),n=s(n,c,h,l,r,t[1],1518500249,13),h=i(h,10),r=s(r,n,c,h,l,t[10],1518500249,11),c=i(c,10),l=s(l,r,n,c,h,t[6],1518500249,9),n=i(n,10),h=s(h,l,r,n,c,t[15],1518500249,7),r=i(r,10),c=s(c,h,l,r,n,t[3],1518500249,15),l=i(l,10),n=s(n,c,h,l,r,t[12],1518500249,7),h=i(h,10),r=s(r,n,c,h,l,t[0],1518500249,12),c=i(c,10),l=s(l,r,n,c,h,t[9],1518500249,15),n=i(n,10),h=s(h,l,r,n,c,t[5],1518500249,9),r=i(r,10),c=s(c,h,l,r,n,t[2],1518500249,11),l=i(l,10),n=s(n,c,h,l,r,t[14],1518500249,7),h=i(h,10),r=s(r,n,c,h,l,t[11],1518500249,13),c=i(c,10),l=s(l,r,n,c,h,t[8],1518500249,12),n=i(n,10),h=a(h,l,r,n,c,t[3],1859775393,11),r=i(r,10),c=a(c,h,l,r,n,t[10],1859775393,13),l=i(l,10),n=a(n,c,h,l,r,t[14],1859775393,6),h=i(h,10),r=a(r,n,c,h,l,t[4],1859775393,7),c=i(c,10),l=a(l,r,n,c,h,t[9],1859775393,14),n=i(n,10),h=a(h,l,r,n,c,t[15],1859775393,9),r=i(r,10),c=a(c,h,l,r,n,t[8],1859775393,13),l=i(l,10),n=a(n,c,h,l,r,t[1],1859775393,15),h=i(h,10),r=a(r,n,c,h,l,t[2],1859775393,14),c=i(c,10),l=a(l,r,n,c,h,t[7],1859775393,8),n=i(n,10),h=a(h,l,r,n,c,t[0],1859775393,13),r=i(r,10),c=a(c,h,l,r,n,t[6],1859775393,6),l=i(l,10),n=a(n,c,h,l,r,t[13],1859775393,5),h=i(h,10),r=a(r,n,c,h,l,t[11],1859775393,12),c=i(c,10),l=a(l,r,n,c,h,t[5],1859775393,7),n=i(n,10),h=a(h,l,r,n,c,t[12],1859775393,5),r=i(r,10),c=u(c,h,l,r,n,t[1],2400959708,11),l=i(l,10),n=u(n,c,h,l,r,t[9],2400959708,12),h=i(h,10),r=u(r,n,c,h,l,t[11],2400959708,14),c=i(c,10),l=u(l,r,n,c,h,t[10],2400959708,15),n=i(n,10),h=u(h,l,r,n,c,t[0],2400959708,14),r=i(r,10),c=u(c,h,l,r,n,t[8],2400959708,15),l=i(l,10),n=u(n,c,h,l,r,t[12],2400959708,9),h=i(h,10),r=u(r,n,c,h,l,t[4],2400959708,8),c=i(c,10),l=u(l,r,n,c,h,t[13],2400959708,9),n=i(n,10),h=u(h,l,r,n,c,t[3],2400959708,14),r=i(r,10),c=u(c,h,l,r,n,t[7],2400959708,5),l=i(l,10),n=u(n,c,h,l,r,t[15],2400959708,6),h=i(h,10),r=u(r,n,c,h,l,t[14],2400959708,8),c=i(c,10),l=u(l,r,n,c,h,t[5],2400959708,6),n=i(n,10),h=u(h,l,r,n,c,t[6],2400959708,5),r=i(r,10),c=u(c,h,l,r,n,t[2],2400959708,12),l=i(l,10),n=f(n,c,h,l,r,t[4],2840853838,9),h=i(h,10),r=f(r,n,c,h,l,t[0],2840853838,15),c=i(c,10),l=f(l,r,n,c,h,t[5],2840853838,5),n=i(n,10),h=f(h,l,r,n,c,t[9],2840853838,11),r=i(r,10),c=f(c,h,l,r,n,t[7],2840853838,6),l=i(l,10),n=f(n,c,h,l,r,t[12],2840853838,8),h=i(h,10),r=f(r,n,c,h,l,t[2],2840853838,13),c=i(c,10),l=f(l,r,n,c,h,t[10],2840853838,12),n=i(n,10),h=f(h,l,r,n,c,t[14],2840853838,5),r=i(r,10),c=f(c,h,l,r,n,t[1],2840853838,12),l=i(l,10),n=f(n,c,h,l,r,t[3],2840853838,13),h=i(h,10),r=f(r,n,c,h,l,t[8],2840853838,14),c=i(c,10),l=f(l,r,n,c,h,t[11],2840853838,11),n=i(n,10),h=f(h,l,r,n,c,t[6],2840853838,8),r=i(r,10),c=f(c,h,l,r,n,t[15],2840853838,5),l=i(l,10),n=f(n,c,h,l,r,t[13],2840853838,6),h=i(h,10);var p=this._a,d=this._b,v=this._c,y=this._d,g=this._e;p=f(p,d,v,y,g,t[5],1352829926,8),v=i(v,10),g=f(g,p,d,v,y,t[14],1352829926,9),d=i(d,10),y=f(y,g,p,d,v,t[7],1352829926,9),p=i(p,10),v=f(v,y,g,p,d,t[0],1352829926,11),g=i(g,10),d=f(d,v,y,g,p,t[9],1352829926,13),y=i(y,10),p=f(p,d,v,y,g,t[2],1352829926,15),v=i(v,10),g=f(g,p,d,v,y,t[11],1352829926,15),d=i(d,10),y=f(y,g,p,d,v,t[4],1352829926,5),p=i(p,10),v=f(v,y,g,p,d,t[13],1352829926,7),g=i(g,10),d=f(d,v,y,g,p,t[6],1352829926,7),y=i(y,10),p=f(p,d,v,y,g,t[15],1352829926,8),v=i(v,10),g=f(g,p,d,v,y,t[8],1352829926,11),d=i(d,10),y=f(y,g,p,d,v,t[1],1352829926,14),p=i(p,10),v=f(v,y,g,p,d,t[10],1352829926,14),g=i(g,10),d=f(d,v,y,g,p,t[3],1352829926,12),y=i(y,10),p=f(p,d,v,y,g,t[12],1352829926,6),v=i(v,10),g=u(g,p,d,v,y,t[6],1548603684,9),d=i(d,10),y=u(y,g,p,d,v,t[11],1548603684,13),p=i(p,10),v=u(v,y,g,p,d,t[3],1548603684,15),g=i(g,10),d=u(d,v,y,g,p,t[7],1548603684,7),y=i(y,10),p=u(p,d,v,y,g,t[0],1548603684,12),v=i(v,10),g=u(g,p,d,v,y,t[13],1548603684,8),d=i(d,10),y=u(y,g,p,d,v,t[5],1548603684,9),p=i(p,10),v=u(v,y,g,p,d,t[10],1548603684,11),g=i(g,10),d=u(d,v,y,g,p,t[14],1548603684,7),y=i(y,10),p=u(p,d,v,y,g,t[15],1548603684,7),v=i(v,10),g=u(g,p,d,v,y,t[8],1548603684,12),d=i(d,10),y=u(y,g,p,d,v,t[12],1548603684,7),p=i(p,10),v=u(v,y,g,p,d,t[4],1548603684,6),g=i(g,10),d=u(d,v,y,g,p,t[9],1548603684,15),y=i(y,10),p=u(p,d,v,y,g,t[1],1548603684,13),v=i(v,10),g=u(g,p,d,v,y,t[2],1548603684,11),d=i(d,10),y=a(y,g,p,d,v,t[15],1836072691,9),p=i(p,10),v=a(v,y,g,p,d,t[5],1836072691,7),g=i(g,10),d=a(d,v,y,g,p,t[1],1836072691,15),y=i(y,10),p=a(p,d,v,y,g,t[3],1836072691,11),v=i(v,10),g=a(g,p,d,v,y,t[7],1836072691,8),d=i(d,10),y=a(y,g,p,d,v,t[14],1836072691,6),p=i(p,10),v=a(v,y,g,p,d,t[6],1836072691,6),g=i(g,10),d=a(d,v,y,g,p,t[9],1836072691,14),y=i(y,10),p=a(p,d,v,y,g,t[11],1836072691,12),v=i(v,10),g=a(g,p,d,v,y,t[8],1836072691,13),d=i(d,10),y=a(y,g,p,d,v,t[12],1836072691,5),p=i(p,10),v=a(v,y,g,p,d,t[2],1836072691,14),g=i(g,10),d=a(d,v,y,g,p,t[10],1836072691,13),y=i(y,10),p=a(p,d,v,y,g,t[0],1836072691,13),v=i(v,10),g=a(g,p,d,v,y,t[4],1836072691,7),d=i(d,10),y=a(y,g,p,d,v,t[13],1836072691,5),p=i(p,10),v=s(v,y,g,p,d,t[8],2053994217,15),g=i(g,10),d=s(d,v,y,g,p,t[6],2053994217,5),y=i(y,10),p=s(p,d,v,y,g,t[4],2053994217,8),v=i(v,10),g=s(g,p,d,v,y,t[1],2053994217,11),d=i(d,10),y=s(y,g,p,d,v,t[3],2053994217,14),p=i(p,10),v=s(v,y,g,p,d,t[11],2053994217,14),g=i(g,10),d=s(d,v,y,g,p,t[15],2053994217,6),y=i(y,10),p=s(p,d,v,y,g,t[0],2053994217,14),v=i(v,10),g=s(g,p,d,v,y,t[5],2053994217,6),d=i(d,10),y=s(y,g,p,d,v,t[12],2053994217,9),p=i(p,10),v=s(v,y,g,p,d,t[2],2053994217,12),g=i(g,10),d=s(d,v,y,g,p,t[13],2053994217,9),y=i(y,10),p=s(p,d,v,y,g,t[9],2053994217,12),v=i(v,10),g=s(g,p,d,v,y,t[7],2053994217,5),d=i(d,10),y=s(y,g,p,d,v,t[10],2053994217,15),p=i(p,10),v=s(v,y,g,p,d,t[14],2053994217,8),g=i(g,10),d=o(d,v,y,g,p,t[12],0,8),y=i(y,10),p=o(p,d,v,y,g,t[15],0,5),v=i(v,10),g=o(g,p,d,v,y,t[10],0,12),d=i(d,10),y=o(y,g,p,d,v,t[4],0,9),p=i(p,10),v=o(v,y,g,p,d,t[1],0,12),g=i(g,10),d=o(d,v,y,g,p,t[5],0,5),y=i(y,10),p=o(p,d,v,y,g,t[8],0,14),v=i(v,10),g=o(g,p,d,v,y,t[7],0,6),d=i(d,10),y=o(y,g,p,d,v,t[6],0,8),p=i(p,10),v=o(v,y,g,p,d,t[2],0,13),g=i(g,10),d=o(d,v,y,g,p,t[13],0,6),y=i(y,10),p=o(p,d,v,y,g,t[14],0,5),v=i(v,10),g=o(g,p,d,v,y,t[0],0,15),d=i(d,10),y=o(y,g,p,d,v,t[3],0,13),p=i(p,10),v=o(v,y,g,p,d,t[9],0,11),g=i(g,10),d=o(d,v,y,g,p,t[11],0,11),y=i(y,10);var _=this._b+c+y|0;this._b=this._c+h+g|0,this._c=this._d+l+p|0,this._d=this._e+r+d|0,this._e=this._a+n+v|0,this._a=_},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){(function(e){"use strict";function n(t){i.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var i=r(138).Transform,o=r(133);o(n,i),n.prototype._transform=function(t,r,n){var i=null;try{"buffer"!==r&&(t=new e(t,r)),this.update(t)}catch(t){i=t}n(i)},n.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},n.prototype.update=function(t,r){if(!e.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");e.isBuffer(t)||(t=new e(t,r||"binary"));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++s)this._length[s]+=a,a=this._length[s]/4294967296|0,a>0&&(this._length[s]-=4294967296*a);return this},n.prototype._update=function(t){throw new Error("_update is not implemented")},n.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();return void 0!==t&&(e=e.toString(t)),e},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(2).EventEmitter,o=r(133);o(n,i),n.Readable=r(139),n.Writable=r(155),n.Duplex=r(156),n.Transform=r(157),n.PassThrough=r(158),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&f.pause&&f.pause()}function n(){f.readable&&f.resume&&f.resume()}function o(){c||(c=!0,t.end())}function s(){c||(c=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){f.removeListener("data",r),t.removeListener("drain",n),f.removeListener("end",o),f.removeListener("close",s),f.removeListener("error",a),t.removeListener("error",a),f.removeListener("end",u),f.removeListener("close",u),t.removeListener("close",u)}var f=this;f.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(f.on("end",o),f.on("close",s));var c=!1;return f.on("error",a),t.on("error",a),f.on("end",u),f.on("close",u),t.on("close",u),t.emit("pipe",f),t}},function(t,e,r){e=t.exports=r(140),e.Stream=e,e.Readable=e,e.Writable=r(150),e.Duplex=r(149),e.Transform=r(153),e.PassThrough=r(154)},function(t,e,r){(function(e,n){"use strict";function i(t){return P.from(t)}function o(t){return P.isBuffer(t)||t instanceof D}function s(t,e,r){return"function"==typeof t.prependListener?t.prependListener(e,r):void(t._events&&t._events[e]?L(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r))}function a(t,e){R=R||r(149),t=t||{},this.objectMode=!!t.objectMode,e instanceof R&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new V,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(z||(z=r(152).StringDecoder),this.decoder=new z(t.encoding),this.encoding=t.encoding)}function u(t){return R=R||r(149),this instanceof u?(this._readableState=new a(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),void F.call(this)):new u(t)}function f(t,e,r,n,o){var s=t._readableState;if(null===e)s.reading=!1,v(t,s);else{var a;o||(a=h(s,e)),a?t.emit("error",a):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===P.prototype||(e=i(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):c(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?c(t,s,e,!1):_(t,s)):c(t,s,e,!1))):n||(s.reading=!1)}return l(s)}function c(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&y(t)),_(t,e)}function h(t,e){var r;return o(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(t){return!t.ended&&(t.needReadable||t.length=Y?t=Y:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function d(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=p(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function v(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,y(t)}}function y(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(q("emitReadable",e.flowing),e.emittedReadable=!0, e.sync?C(g,t):g(t))}function g(t){q("emit readable"),t.emit("readable"),T(t)}function _(t,e){e.readingMore||(e.readingMore=!0,C(m,t,e))}function m(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=S(t,e.buffer,e.decoder),r}function S(t,e,r){var n;return to.length?o.length:t;if(i+=s===o.length?o:o.slice(0,t),t-=s,0===t){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}function A(t,e){var r=P.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),t-=s,0===t){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}function I(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,C(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return q("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):y(this),null;if(t=d(t,e),0===t&&e.ended)return 0===e.length&&I(this),null;var n=e.needReadable;q("need readable",n),(0===e.length||e.length-t0?B(t,e):null,null===i?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&I(this)),null!==i&&this.emit("data",i),i},u.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(t,e){function r(t,e){q("onunpipe"),t===l&&e&&e.hasUnpiped===!1&&(e.hasUnpiped=!0,o())}function i(){q("onend"),t.end()}function o(){q("cleanup"),t.removeListener("close",f),t.removeListener("finish",c),t.removeListener("drain",y),t.removeListener("error",u),t.removeListener("unpipe",r),l.removeListener("end",i),l.removeListener("end",h),l.removeListener("data",a),g=!0,!p.awaitDrain||t._writableState&&!t._writableState.needDrain||y()}function a(e){q("ondata"),_=!1;var r=t.write(e);!1!==r||_||((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&j(p.pipes,t)!==-1)&&!g&&(q("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,_=!0),l.pause())}function u(e){q("onerror",e),h(),t.removeListener("error",u),0===U(t,"error")&&t.emit("error",e)}function f(){t.removeListener("finish",c),h()}function c(){q("onfinish"),t.removeListener("close",f),h()}function h(){q("unpipe"),l.unpipe(t)}var l=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,q("pipe count=%d opts=%j",p.pipesCount,e);var d=(!e||e.end!==!1)&&t!==n.stdout&&t!==n.stderr,v=d?i:h;p.endEmitted?C(v):l.once("end",v),t.on("unpipe",r);var y=b(l);t.on("drain",y);var g=!1,_=!1;return l.on("data",a),s(t,"error",u),t.once("close",f),t.once("finish",c),t.emit("pipe",l),p.flowing||(q("pipe resume"),l.resume()),t},u.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;oZ)throw new RangeError("Invalid typed array length");var r=new Uint8Array(e);return r.__proto__=t.prototype,r}function t(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return u(t)}return o(t,e,r)}function o(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return W(t)?h(t,e,r):"string"==typeof t?f(t,e):l(t)}function s(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,e,r){return s(t),t<=0?i(t):void 0!==e?"string"==typeof r?i(t).fill(e,r):i(t).fill(e):i(t)}function u(t){return s(t),i(t<0?0:0|p(t))}function f(e,r){if("string"==typeof r&&""!==r||(r="utf8"),!t.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(e,r),o=i(n),s=o.write(e,r);return s!==n&&(o=o.slice(0,s)),o}function c(t){for(var e=t.length<0?0:0|p(t.length),r=i(e),n=0;n=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|t}function d(e){return+e!=e&&(e=0),t.alloc(+e)}function v(e,r){if(t.isBuffer(e))return e.length;if(Y(e)||W(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return M(e).length;r=(""+r).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,G(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:m(e,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):m(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}var f;if(i){var c=-1;for(f=r;fa&&(r=a-u),f=r;f>=0;f--){for(var h=!0,l=0;li&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=r){var u,f,c,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&o)<<6|63&u,h>127&&(s=h));break;case 3:u=t[i+1],f=t[i+2],128===(192&u)&&128===(192&f)&&(h=(15&o)<<12|(63&u)<<6|63&f,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=t[i+1],f=t[i+2],c=t[i+3],128===(192&u)&&128===(192&f)&&128===(192&c)&&(h=(15&o)<<18|(63&u)<<12|(63&f)<<6|63&c,h>65535&&h<1114112&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return A(n)}function A(t){var e=t.length;if(e<=K)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function L(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||re.length)throw new RangeError("Index out of range")}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return e=+e,r>>>=0,i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function D(t){if(t=t.trim().replace(Q,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function V(t){return $.toByteArray(D(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function W(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function Y(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function G(t){return t!==t}var $=r(124),X=r(125);e.Buffer=t,e.SlowBuffer=d,e.INSPECT_MAX_BYTES=50;var Z=2147483647;e.kMaxLength=Z,t.TYPED_ARRAY_SUPPORT=n(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(t,e,r){return o(t,e,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(t,e,r){return a(t,e,r)},t.allocUnsafe=function(t){return u(t)},t.allocUnsafeSlow=function(t){return u(t)},t.isBuffer=function(t){return null!=t&&t._isBuffer===!0},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,s=Math.min(n,i);o0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var s=o-i,a=n-r,u=Math.min(s,a),f=this.slice(i,o),c=e.slice(r,n),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;L(this,t,e,r,i,0)}var o=1,s=0;for(this[e]=255&t;++s>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;L(this,t,e,r,i,0)}var o=r-1,s=1;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=t/s&255;return e+r},t.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},t.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},t.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},t.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},t.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},t.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},t.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},t.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},t.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var s;if("number"==typeof e)for(s=r;s0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return o.alloc(0);if(1===this.length)return this.head.data;for(var e=o.allocUnsafe(t>>>0),r=this.head,n=0;r;)i(r.data,e,n),n+=r.data.length,r=r.next;return e},t}()},function(t,e,r){"use strict";function n(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?void(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||s(o,this,t)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),void this._destroy(t||null,function(t){!e&&t?(s(o,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}))}function i(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(t,e){t.emit("error",e)}var s=r(141);t.exports={destroy:n,undestroy:i}},function(t,e,r){"use strict";function n(t){return this instanceof n?(f.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(t){t.end()}var s=r(141),a=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=n;var u=r(145);u.inherits=r(133);var f=r(140),c=r(150);u.inherits(n,f);for(var h=a(c.prototype),l=0;l-1?n:A;c.WritableState=f;var j=r(145);j.inherits=r(133);var C={deprecate:r(151)},R=r(142),L=r(143).Buffer,U=i.Uint8Array||function(){},F=r(148);j.inherits(c,R),f.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(f.prototype,"buffer",{get:C.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(t){return!!P.call(this,t)||t&&t._writableState instanceof f}})):P=function(t){return t instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=a(t)&&!n.objectMode;return o&&!L.isBuffer(t)&&(t=s(t)),"function"==typeof e&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=u),n.ended?h(this,r):(o||l(this,n,t,r))&&(n.pendingcb++,i=d(this,n,o,t,e,r)),i},c.prototype.cork=function(){var t=this._writableState;t.corked++},c.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},c.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},c.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||S(this,n,r)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),c.prototype.destroy=F.destroy,c.prototype._undestroy=F.undestroy,c.prototype._destroy=function(t,e){this.end(),e(t)}}).call(e,r(5),r(10).setImmediate,function(){return this}())},function(t,e){(function(e){function r(t,e){function r(){if(!i){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),i=!0}return t.apply(this,arguments)}if(n("noDeprecation"))return t;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(e,function(){return this}())},function(t,e,r){"use strict";function n(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function i(t){var e=n(t);if("string"!=typeof e&&(_.isEncoding===m||!m(t)))throw new Error("Unknown encoding: "+t);return e||t}function o(t){this.encoding=i(t);var e;switch(this.encoding){case"utf16le":this.text=l,this.end=p,e=4;break;case"utf8":this.fillLast=f,e=4;break;case"base64":this.text=d,this.end=v,e=3;break;default:return this.write=y,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=_.allocUnsafe(e)}function s(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:-1}function a(t,e,r){var n=e.length-1;if(n=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0))}function u(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"�".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"�".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"�".repeat(r+2)}}function f(t){var e=this.lastTotal-this.lastNeed,r=u(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){var r=a(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�".repeat(this.lastTotal-this.lastNeed):e}function l(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function p(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function d(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function v(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function y(t){return t.toString(this.encoding)}function g(t){return t&&t.length?this.write(t):""}var _=r(143).Buffer,m=_.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),void 0===e)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>>27}function o(t){return t<<30|t>>>2}function s(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var a=r(133),u=r(161),f=[1518500249,1859775393,-1894007588,-899497514],c=new Array(80);a(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,a=0|this._c,u=0|this._d,c=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=e[h-3]^e[h-8]^e[h-14]^e[h-16];for(var l=0;l<80;++l){var p=~~(l/20),d=i(r)+s(p,n,a,u)+c+e[l]+f[p]|0;c=u,u=a,a=o(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=u+this._d|0,this._e=c+this._e|0},n.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){(function(e){function r(t,r){this._block=new e(t),this._finalSize=r,this._blockSize=t,this._len=0,this._s=0}r.prototype.update=function(t,r){"string"==typeof t&&(r=r||"utf8",t=new e(t,r));for(var n=this._len+=t.length,i=this._s||0,o=0,s=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var r=this._update(this._block)||this._hash();return t?r.toString(t):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(e,r(123).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=h,f.call(this,64,56)}function i(t){return t<<1|t>>>31}function o(t){return t<<5|t>>>27}function s(t){return t<<30|t>>>2}function a(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}var u=r(133),f=r(161),c=[1518500249,1859775393,-1894007588,-899497514],h=new Array(80);u(n,f),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,u=0|this._c,f=0|this._d,h=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=i(e[l-3]^e[l-8]^e[l-14]^e[l-16]);for(var p=0;p<80;++p){var d=~~(p/20),v=o(r)+a(d,n,u,f)+h+e[p]+c[d]|0;h=f,f=u,u=s(n),n=r,r=v}this._a=r+this._a|0,this._b=n+this._b|0,this._c=u+this._c|0,this._d=f+this._d|0,this._e=h+this._e|0},n.prototype._hash=function(){var t=new e(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=a,s.call(this,64,56)}var i=r(133),o=r(164),s=r(161),a=new Array(64);i(n,o),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var t=new e(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=p,h.call(this,64,56)}function i(t,e,r){return r^t&(e^r)}function o(t,e,r){return t&e|r&(t|e)}function s(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function a(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function u(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function f(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}var c=r(133),h=r(161),l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],p=new Array(64);c(n,h),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,c=0|this._c,h=0|this._d,p=0|this._e,d=0|this._f,v=0|this._g,y=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=f(e[g-2])+e[g-7]+u(e[g-15])+e[g-16]|0;for(var _=0;_<64;++_){var m=y+a(p)+i(p,d,v)+l[_]+e[_]|0,b=s(r)+o(r,n,c)|0;y=v,v=d,d=p,p=h+m|0,h=c,c=n,n=r,r=m+b|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=c+this._c|0,this._d=h+this._d|0,this._e=p+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=y+this._h|0},n.prototype._hash=function(){var t=new e(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=a,s.call(this,128,112)}var i=r(133),o=r(166),s=r(161),a=new Array(160);i(n,o),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){function t(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,n+4)}var r=new e(48);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),r},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){(function(e){function n(){this.init(),this._w=y,d.call(this,128,112)}function i(t,e,r){return r^t&(e^r)}function o(t,e,r){return t&e|r&(t|e)}function s(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function a(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function u(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function c(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function h(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function l(t,e){return t>>>0>>0?1:0}var p=r(133),d=r(161),v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],y=new Array(160);p(n,d),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,p=0|this._ch,d=0|this._dh,y=0|this._eh,g=0|this._fh,_=0|this._gh,m=0|this._hh,b=0|this._al,w=0|this._bl,E=0|this._cl,k=0|this._dl,T=0|this._el,B=0|this._fl,S=0|this._gl,x=0|this._hl,A=0;A<32;A+=2)e[A]=t.readInt32BE(4*A),e[A+1]=t.readInt32BE(4*A+4);for(;A<160;A+=2){var I=e[A-30],O=e[A-30+1],j=u(I,O),C=f(O,I);I=e[A-4],O=e[A-4+1];var R=c(I,O),L=h(O,I),U=e[A-14],F=e[A-14+1],P=e[A-32],D=e[A-32+1],N=C+F|0,M=j+U+l(N,C)|0;N=N+L|0,M=M+R+l(N,L)|0,N=N+D|0,M=M+P+l(N,D)|0,e[A]=M,e[A+1]=N}for(var q=0;q<160;q+=2){M=e[q],N=e[q+1];var z=o(r,n,p),V=o(b,w,E),H=s(r,b),W=s(b,r),Y=a(y,T),G=a(T,y),$=v[q],X=v[q+1],Z=i(y,g,_),K=i(T,B,S),Q=x+G|0,J=m+Y+l(Q,x)|0;Q=Q+K|0,J=J+Z+l(Q,K)|0,Q=Q+X|0,J=J+$+l(Q,X)|0,Q=Q+N|0,J=J+M+l(Q,N)|0;var tt=W+V|0,et=H+z+l(tt,W)|0;m=_,x=S,_=g,S=B,g=y,B=T,T=k+Q|0,y=d+J+l(T,k)|0,d=p,k=E,p=n,E=w,n=r,w=b,b=Q+tt|0,r=J+et+l(b,Q)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+E|0,this._dl=this._dl+k|0,this._el=this._el+T|0,this._fl=this._fl+B|0,this._gl=this._gl+S|0,this._hl=this._hl+x|0,this._ah=this._ah+r+l(this._al,b)|0,this._bh=this._bh+n+l(this._bl,w)|0,this._ch=this._ch+p+l(this._cl,E)|0,this._dh=this._dh+d+l(this._dl,k)|0,this._eh=this._eh+y+l(this._el,T)|0,this._fh=this._fh+g+l(this._fl,B)|0,this._gh=this._gh+_+l(this._gl,S)|0,this._hh=this._hh+m+l(this._hl,x)|0},n.prototype._hash=function(){function t(t,e,n){r.writeInt32BE(t,n),r.writeInt32BE(e,n+4)}var r=new e(64);return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),r},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){function n(t){o.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}var i=r(143).Buffer,o=r(138).Transform,s=r(168).StringDecoder,a=r(133);a(n,o),n.prototype.update=function(t,e,r){"string"==typeof t&&(t=i.from(t,e));var n=this._update(t);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},n.prototype.setAutoPadding=function(){},n.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},n.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},n.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},n.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},n.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},n.prototype._finalOrDigest=function(t){var e=this.__final()||i.alloc(0);return t&&(e=this._toString(e,t,!0)),e},n.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new s(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=n},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=r(144).Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},f=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};f.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},f.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},f.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){"use strict";function n(t,e){s.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;if(this._alg=t,this._key=e,e.length>r){var n="rmd160"===t?new f:c(t);e=n.update(e).digest()}else e.lengthu?e=t(e):e.length0;)r.push(o%s),o=o/s|0}for(var a="",u=0;0===e[u]&&u=0;--f)a+=t[r[f]];return a}function r(t){if(0===t.length)return n.allocUnsafe(0);for(var e=[0],r=0;r>=8;for(;f>0;)e.push(255&f),f>>=8}for(var c=0;t[c]===a&&c3&&void 0!==arguments[3]?arguments[3]:f();return s(t,e,n,r)}function o(t,e,r,n,i){return s(t,e,r,n,i).message}function s(e,r,n,i,o){if(e=S(e),!e)throw new TypeError("private_key is required");if(r=x(r),!r)throw new TypeError("public_key is required");if(n=A(n),!n)throw new TypeError("nonce is required");if(!t.isBuffer(i)){if("string"!=typeof i)throw new TypeError("message should be buffer or string");i=new t(i,"binary")}if(o&&"number"!=typeof o)throw new TypeError("checksum should be a number");var s=e.get_shared_secret(r),f=new p.default(p.default.DEFAULT_CAPACITY,p.default.LITTLE_ENDIAN);f.writeUint64(n),f.append(s.toString("binary"),"binary"),f=new t(f.copy(0,f.offset).toBinary(),"binary");var c=k.default.sha512(f),h=c.slice(32,48),l=c.slice(0,32),d=k.default.sha256(c);d=d.slice(0,4);var v=p.default.fromBinary(d.toString("binary"),p.default.DEFAULT_CAPACITY,p.default.LITTLE_ENDIAN);if(d=v.readUint32(),o){if(d!==o)throw new Error("Invalid key");i=a(i,l,h)}else i=u(i,l,h);return{nonce:n,message:i,checksum:d}}function a(e,r,n){(0,g.default)(e,"Missing cipher text"),e=I(e);var i=v.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}function u(e,r,n){ (0,g.default)(e,"Missing plain text"),e=I(e);var i=v.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}function f(){if(null===B){var t=h.default.randomUint8Array(2);B=parseInt(t[0]<<8|t[1],10)}var e=T.fromNumber(Date.now()),r=++B%65535;return e=e.shiftLeft(16).or(T.fromNumber(r)),e.toString()}Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=i,e.decrypt=o;var c=r(174),h=n(c),l=r(176),p=n(l),d=r(179),v=n(d),y=r(127),g=n(y),_=r(199),m=n(_),b=r(209),w=n(b),E=r(131),k=n(E),T=p.default.Long,B=null,S=function(t){return t?t.d?t:w.default.fromWif(t):t},x=function(t){return t?t.Q?t:m.default.fromString(t):t},A=function(t){return t?T.isLong(t)?t:T.fromString(t):t},I=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,r(123).Buffer)},function(t,e,r){var n,i;(function(o,s){!function(a){"use strict";function u(t,e){if(e=e||{type:"Array"},"undefined"!=typeof o&&"number"==typeof o.pid)return f(t,e);var r=window.crypto||window.msCrypto;if(!r)throw new Error("Your browser does not support window.crypto.");return c(t,e)}function f(t,e){var n=r(175),i=n.randomBytes(t);switch(e.type){case"Array":return[].slice.call(i);case"Buffer":return i;case"Uint8Array":for(var o=new Uint8Array(t),s=0;s1024&&(e.push(u.apply(String,t)),t.length=0),void Array.prototype.push.apply(t,arguments))}}function n(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,c=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+h],h+=l,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)}function i(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*v}var o=function(t,e,r){if("undefined"==typeof t&&(t=o.DEFAULT_CAPACITY),"undefined"==typeof e&&(e=o.DEFAULT_ENDIAN),"undefined"==typeof r&&(r=o.DEFAULT_NOASSERT),!r){if(t|=0,t<0)throw RangeError("Illegal capacity");e=!!e,r=!!r}this.buffer=0===t?a:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=e,this.noAssert=r};o.VERSION="5.0.1",o.LITTLE_ENDIAN=!0,o.BIG_ENDIAN=!1,o.DEFAULT_CAPACITY=16,o.DEFAULT_ENDIAN=o.BIG_ENDIAN,o.DEFAULT_NOASSERT=!1,o.Long=t||null;var s=o.prototype;s.__isByteBuffer__,Object.defineProperty(s,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var a=new ArrayBuffer(0),u=String.fromCharCode;o.accessor=function(){return Uint8Array},o.allocate=function(t,e,r){return new o(t,e,r)},o.concat=function(t,e,r,n){"boolean"!=typeof e&&"string"==typeof e||(n=r,r=e,e=void 0);for(var i,s=0,a=0,u=t.length;a0&&(s+=i);if(0===s)return new o(0,r,n);var f,c=new o(s,r,n);for(a=0;a0&&(i.buffer=t.buffer,i.offset=t.byteOffset,i.limit=t.byteOffset+t.byteLength,i.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)i=new o(0,r,n),t.byteLength>0&&(i.buffer=t,i.offset=0,i.limit=t.byteLength,i.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");i=new o(t.length,r,n),i.limit=t.length;for(var a=0;a>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,s=o>>3,a=0;for(e+=this.writeVarint32(o,e);s--;)n=1&!!t[a++]|(1&!!t[a++])<<1|(1&!!t[a++])<<2|(1&!!t[a++])<<3|(1&!!t[a++])<<4|(1&!!t[a++])<<5|(1&!!t[a++])<<6|(1&!!t[a++])<<7,this.writeByte(n,e++);if(a>3,s=0,a=[];for(t+=n.length;o--;)r=this.readByte(t++),a[s++]=!!(1&r),a[s++]=!!(2&r),a[s++]=!!(4&r),a[s++]=!!(8&r),a[s++]=!!(16&r),a[s++]=!!(32&r),a[s++]=!!(64&r),a[s++]=!!(128&r);if(s>u++&1)}return e&&(this.offset=t),a},s.readBytes=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var n=this.slice(e,e+t);return r&&(this.offset+=t),n},s.writeBytes=s.append,s.writeInt8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},s.writeByte=s.writeInt8,s.readInt8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128===(128&r)&&(r=-(255-r+1)),e&&(this.offset+=1),r},s.readByte=s.readInt8,s.writeUint8=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},s.writeUInt8=s.writeUint8,s.readUint8=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return e&&(this.offset+=1),r},s.readUInt8=s.readUint8,s.writeInt16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},s.writeShort=s.writeInt16,s.readInt16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),32768===(32768&r)&&(r=-(65535-r+1)),e&&(this.offset+=2),r},s.readShort=s.readInt16,s.writeUint16=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},s.writeUInt16=s.writeUint16,s.readUint16=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),e&&(this.offset+=2),r},s.readUInt16=s.readUint16,s.writeInt32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},s.writeInt=s.writeInt32,s.readInt32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),r|=0,e&&(this.offset+=4),r},s.readInt=s.readInt32,s.writeUint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},s.writeUInt32=s.writeUint32,s.readUint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),e&&(this.offset+=4),r},s.readUInt32=s.readUint32,t&&(s.writeInt64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},s.writeLong=s.writeInt64,s.readInt64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!1);return r&&(this.offset+=8),o},s.readLong=s.readInt64,s.writeUint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,s=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=s>>>24&255,this.view[r+2]=s>>>16&255,this.view[r+1]=s>>>8&255,this.view[r]=255&s):(this.view[r]=s>>>24&255,this.view[r+1]=s>>>16&255,this.view[r+2]=s>>>8&255,this.view[r+3]=255&s,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},s.writeUInt64=s.writeUint64,s.readUint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!0);return r&&(this.offset+=8),o},s.readUInt64=s.readUint64),s.writeFloat32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,i(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},s.writeFloat=s.writeFloat32,s.readFloat32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},s.readFloat=s.readFloat32,s.writeFloat64=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=8,i(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},s.writeDouble=s.writeFloat64,s.readFloat64=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=n(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},s.readDouble=s.readFloat64,o.MAX_VARINT32_BYTES=5,o.calculateVarint32=function(t){return t>>>=0,t<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},o.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},o.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},s.writeVarint32=function(t,e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=o.calculateVarint32(t);e+=i;var s=this.buffer.byteLength;for(e>s&&this.resize((s*=2)>e?s:e),e-=i,t>>>=0;t>=128;)n=127&t|128,this.view[e++]=n,t>>>=7;return this.view[e++]=t,r?(this.offset=e,this):i},s.writeVarint32ZigZag=function(t,e){return this.writeVarint32(o.zigZagEncode32(t),e)},s.readVarint32=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}r=this.view[t++],n<5&&(i|=(127&r)<<7*n),++n}while(0!==(128&r));return i|=0,e?(this.offset=t,i):{value:i,length:n}},s.readVarint32ZigZag=function(t){var e=this.readVarint32(t);return"object"==typeof e?e.value=o.zigZagDecode32(e.value):e=o.zigZagDecode32(e),e},t&&(o.MAX_VARINT64_BYTES=10,o.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var r=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},o.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},o.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},s.writeVarint64=function(e,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):e.unsigned!==!1&&(e=e.toSigned());var i=o.calculateVarint64(e),s=e.toInt()>>>0,a=e.shiftRightUnsigned(28).toInt()>>>0,u=e.shiftRightUnsigned(56).toInt()>>>0;r+=i;var f=this.buffer.byteLength;switch(r>f&&this.resize((f*=2)>r?f:r),r-=i,i){case 10:this.view[r+9]=u>>>7&1;case 9:this.view[r+8]=9!==i?128|u:127&u;case 8:this.view[r+7]=8!==i?a>>>21|128:a>>>21&127;case 7:this.view[r+6]=7!==i?a>>>14|128:a>>>14&127;case 6:this.view[r+5]=6!==i?a>>>7|128:a>>>7&127;case 5:this.view[r+4]=5!==i?128|a:127&a;case 4:this.view[r+3]=4!==i?s>>>21|128:s>>>21&127;case 3:this.view[r+2]=3!==i?s>>>14|128:s>>>14&127;case 2:this.view[r+1]=2!==i?s>>>7|128:s>>>7&127;case 1:this.view[r]=1!==i?128|s:127&s}return n?(this.offset+=i,this):i},s.writeVarint64ZigZag=function(t,e){return this.writeVarint64(o.zigZagEncode64(t),e)},s.readVarint64=function(e){var r="undefined"==typeof e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: "+e+" (not an integer)");if(e>>>=0,e<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,s=0,a=0;if(a=this.view[e++],i=127&a,128&a&&(a=this.view[e++],i|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],i|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],i|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<7,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<14,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],o|=(127&a)<<21,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],s=127&a,(128&a||this.noAssert&&"undefined"==typeof a)&&(a=this.view[e++],s|=(127&a)<<7,128&a||this.noAssert&&"undefined"==typeof a))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|s<<24,!1);return r?(this.offset=e,u):{value:u,length:e-n}},s.readVarint64ZigZag=function(e){var r=this.readVarint64(e);return r&&r.value instanceof t?r.value=o.zigZagDecode64(r.value):r=o.zigZagDecode64(r),r}),s.writeCString=function(t,r){var n="undefined"==typeof r;n&&(r=this.offset);var i,o=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(i=0;i>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}o=c.calculateUTF16asUTF8(e(t))[1],r+=o+1;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=o+1,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),this.view[r++]=0,n?(this.offset=r,this):o},s.readCString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n,i=t,o=-1;return c.decodeUTF8toUTF16(function(){if(0===o)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return o=this.view[t++],0===o?null:o}.bind(this),n=r(),!0),e?(this.offset=t,n()):{string:n(),length:t-i}},s.writeIString=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],r+=4+i;var s=this.buffer.byteLength;if(r>s&&this.resize((s*=2)>r?s:r),r-=4+i,this.littleEndian?(this.view[r+3]=i>>>24&255,this.view[r+2]=i>>>16&255,this.view[r+1]=i>>>8&255,this.view[r]=255&i):(this.view[r]=i>>>24&255,this.view[r+1]=i>>>16&255,this.view[r+2]=i>>>8&255,this.view[r+3]=255&i),r+=4,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==o+4+i)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+4+i));return n?(this.offset=r,this):r-o},s.readIString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),i=this.readUTF8String(n,o.METRICS_BYTES,t+=4);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},o.METRICS_CHARS="c",o.METRICS_BYTES="b",s.writeUTF8String=function(t,r){var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=r;i=c.calculateUTF16asUTF8(e(t))[1],r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),n?(this.offset=r,this):r-o},s.writeString=s.writeUTF8String,o.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(e(t))[0]},o.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(e(t))[1]},o.calculateString=o.calculateUTF8Bytes,s.readUTF8String=function(t,e,n){"number"==typeof e&&(n=e,e=void 0);var i="undefined"==typeof n;if(i&&(n=this.offset),"undefined"==typeof e&&(e=o.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!==0)throw TypeError("Illegal offset: "+n+" (not an integer)");if(n>>>=0,n<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var s,a=0,u=n;if(e===o.METRICS_CHARS){if(s=r(),c.decodeUTF8(function(){return a>>=0,n<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(c.decodeUTF8toUTF16(function(){return n>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,a=r;i=c.calculateUTF16asUTF8(e(t),this.noAssert)[1],s=o.calculateVarint32(i),r+=s+i;var u=this.buffer.byteLength;if(r>u&&this.resize((u*=2)>r?u:r),r-=s+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(e(t),function(t){this.view[r++]=t}.bind(this)),r!==a+i+s)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+s));return n?(this.offset=r,this):r-a},s.readVString=function(t){var e="undefined"==typeof t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal offset: "+t+" (not an integer)");if(t>>>=0,t<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),i=this.readUTF8String(n.value,o.METRICS_BYTES,t+=n.length);return t+=i.length,e?(this.offset=t,i.string):{string:i.string,length:t-r}},s.append=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;r+=i;var s=this.buffer.byteLength;return r>s&&this.resize((s*=2)>r?s:r),r-=i,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=i,n&&(this.offset+=i),this},s.appendTo=function(t,e){return t.append(this,e),this},s.assert=function(t){return this.noAssert=!t,this},s.capacity=function(){return this.buffer.byteLength},s.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},s.clone=function(t){var e=new o(0,this.littleEndian,this.noAssert);return t?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},s.compact=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer"); if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var r=e-t;if(0===r)return this.buffer=a,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(r),i=new Uint8Array(n);return i.set(this.view.subarray(t,e)),this.buffer=n,this.view=i,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},s.copy=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(t===e)return new o(0,this.littleEndian,this.noAssert);var r=e-t,n=new o(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,e),n},s.copyTo=function(t,e,r,n){var i,s;if(!this.noAssert&&!o.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(s="undefined"==typeof e)?t.offset:0|e,r=(i="undefined"==typeof r)?this.offset:0|r,n="undefined"==typeof n?this.limit:0|n,e<0||e>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var a=n-r;return 0===a?t:(t.ensureCapacity(e+a),t.view.set(this.view.subarray(r,n),e),i&&(this.offset+=a),s&&(t.offset+=a),this)},s.ensureCapacity=function(t){var e=this.buffer.byteLength;return et?e:t):this},s.fill=function(t,e,r){var n="undefined"==typeof e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),"undefined"==typeof e&&(e=this.offset),"undefined"==typeof r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e>=r)return this;for(;e>>=0,t<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},s.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},s.LE=function(t){return this.littleEndian="undefined"==typeof t||!!t,this},s.BE=function(t){return this.littleEndian="undefined"!=typeof t&&!t,this},s.prepend=function(t,e,r){"number"!=typeof e&&"string"==typeof e||(r=e,e=void 0);var n="undefined"==typeof r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!==0)throw TypeError("Illegal offset: "+r+" (not an integer)");if(r>>>=0,r<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof o||(t=o.wrap(t,e));var i=t.limit-t.offset;if(i<=0)return this;var s=i-r;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(r,this.buffer.byteLength),i),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,r+=s}else{new Uint8Array(this.buffer)}return this.view.set(t.view.subarray(t.offset,t.limit),r-i),t.offset=t.limit,n&&(this.offset-=i),this},s.prependTo=function(t,e){return t.prepend(this,e),this},s.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},s.remaining=function(){return this.limit-this.offset},s.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},s.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if(t|=0,t<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},s.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},s.slice=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=t,r.limit=e,r},s.toBuffer=function(t){var e=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!==0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!==0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(!t&&0===e&&r===this.buffer.byteLength)return this.buffer;if(e===r)return a;var n=new ArrayBuffer(r-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,r),0),n},s.toArrayBuffer=s.toBuffer,s.toString=function(t,e,r){if("undefined"==typeof t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(t="utf8",e=t,r=e),t){case"utf8":return this.toUTF8(e,r);case"base64":return this.toBase64(e,r);case"hex":return this.toHex(e,r);case"binary":return this.toBinary(e,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var f=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n>2&63]),i=(3&n)<<4,null!==(n=t())?(i|=n>>4&15,r(e[63&(i|n>>4&15)]),i=(15&n)<<2,null!==(n=t())?(r(e[63&(i|n>>6&3)]),r(e[63&n])):(r(e[63&i]),r(61))):(r(e[63&i]),r(61),r(61))},t.decode=function(t,e){function n(t){throw Error("Illegal character code: "+t)}for(var i,o,s;null!==(i=t());)if(o=r[i],"undefined"==typeof o&&n(i),null!==(i=t())&&(s=r[i],"undefined"==typeof s&&n(i),e(o<<2>>>0|(48&s)>>4),null!==(i=t()))){if(o=r[i],"undefined"==typeof o){if(61===i)break;n(i)}if(e((15&s)<<4>>>0|(60&o)>>2),null!==(i=t())){if(s=r[i],"undefined"==typeof s){if(61===i)break;n(i)}e((3&o)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)},t}();s.toBase64=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),t|=0,e|=0,t<0||e>this.capacity||t>e)throw RangeError("begin, end");var n;return f.encode(function(){return tthis.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},o.fromBinary=function(t,e){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,i=t.length,s=new o(i,e);n255)throw RangeError("illegal char code: "+r);s.view[n++]=r}return s.limit=i,s},s.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16===0&&r!==n){for(;i.length<51;)i+=" ";s+=i+o+"\n",i=o=""}i+=r===this.offset&&r===this.limit?r===this.markedOffset?"!":"|":r===this.offset?r===this.markedOffset?"[":"<":r===this.limit?r===this.markedOffset?"]":">":r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},o.fromDebug=function(t,e,r){for(var n,i,s=t.length,a=new o((s+1)/3|0,e,r),u=0,f=0,c=!1,h=!1,l=!1,p=!1,d=!1;u":if(!r){if(p){d=!0;break}p=!0}a.limit=f,c=!1;break;case"'":if(!r){if(l){d=!0;break}l=!0}a.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!r&&c){d=!0;break}if(i=parseInt(n+t.charAt(u++),16),!r&&(isNaN(i)||i<0||i>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[f++]=i,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!r){if(!h||!p)throw TypeError("Illegal str: Missing offset or limit");if(f>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var r,n=new Array(e-t);t255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=n}return s.limit=u,s};var c=function(){var t={};return t.MAX_CODEPOINT=1114111,t.encodeUTF8=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<128?e(127&r):r<2048?(e(r>>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},t.decodeUTF8=function(t,e){for(var r,n,i,o,s=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(0===(128&r))e(r);else if(192===(224&r))null===(n=t())&&s([r,n]),e((31&r)<<6|63&n);else if(224===(240&r))(null===(n=t())||null===(i=t()))&&s([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!==(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(o=t()))&&s([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},t.UTF16toUTF8=function(t,e){for(var r,n=null;;){if(null===(r=null!==n?n:t()))break;r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r)}null!==n&&e(n)},t.UTF8toUTF16=function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(r-=65536,e((r>>10)+55296),e(r%1024+56320)),r=null},t.encodeUTF16toUTF8=function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},t.decodeUTF8toUTF16=function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},t.calculateCodePoint=function(t){return t<128?1:t<2048?2:t<65536?3:4},t.calculateUTF8=function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},t.calculateUTF16asUTF8=function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(t){++r,n+=t<128?1:t<2048?2:t<65536?3:4}),[r,n]},t}();return s.toUTF8=function(t,e){if("undefined"==typeof t&&(t=this.offset),"undefined"==typeof e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!==0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!==0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var n;try{c.decodeUTF8toUTF16(function(){return t>>=0,(o=0<=t&&t<256)&&(n=u[t])?n:(r=i(t,(0|t)<0?-1:0,!0),o&&(u[t]=r),r)):(t|=0,(o=-128<=t&&t<128)&&(n=a[t])?n:(r=i(t,t<0?-1:0,!1),o&&(a[t]=r),r))}function n(t,e){if(isNaN(t)||!isFinite(t))return e?y:v;if(e){if(t<0)return y;if(t>=l)return w}else{if(t<=-p)return E;if(t+1>=p)return b}return t<0?n(-t,e).neg():i(t%h|0,t/h|0,e)}function i(e,r,n){return new t(e,r,n)}function o(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return v;if("number"==typeof e?(r=e,e=!1):e=!!e,r=r||10,r<2||360)throw Error("interior hyphen");if(0===i)return o(t.substring(1),e,r).neg();for(var s=n(f(r,8)),a=v,u=0;u>>0:this.low},k.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},k.toString=function(t){if(t=t||10,t<2||36>>0,h=c.toString(t);if(s=u,s.isZero())return h+a;for(;h.length<6;)h="0"+h;a=""+h+a}},k.getHighBits=function(){return this.high},k.getHighBitsUnsigned=function(){return this.high>>>0},k.getLowBits=function(){return this.low},k.getLowBitsUnsigned=function(){return this.low>>>0},k.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<=0},k.isOdd=function(){return 1===(1&this.low)},k.isEven=function(){return 0===(1&this.low)},k.equals=function(t){return e(t)||(t=s(t)),(this.unsigned===t.unsigned||this.high>>>31!==1||t.high>>>31!==1)&&(this.high===t.high&&this.low===t.low)},k.eq=k.equals,k.notEquals=function(t){return!this.eq(t)},k.neq=k.notEquals,k.lessThan=function(t){return this.comp(t)<0},k.lt=k.lessThan,k.lessThanOrEqual=function(t){return this.comp(t)<=0},k.lte=k.lessThanOrEqual,k.greaterThan=function(t){return this.comp(t)>0},k.gt=k.greaterThan,k.greaterThanOrEqual=function(t){return this.comp(t)>=0},k.gte=k.greaterThanOrEqual,k.compare=function(t){if(e(t)||(t=s(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},k.comp=k.compare,k.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(g)},k.neg=k.negate,k.add=function(t){e(t)||(t=s(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,a=65535&this.low,u=t.high>>>16,f=65535&t.high,c=t.low>>>16,h=65535&t.low,l=0,p=0,d=0,v=0;return v+=a+h,d+=v>>>16,v&=65535,d+=o+c,p+=d>>>16,d&=65535,p+=n+f,l+=p>>>16,p&=65535,l+=r+u,l&=65535,i(d<<16|v,l<<16|p,this.unsigned)},k.subtract=function(t){return e(t)||(t=s(t)),this.add(t.neg())},k.sub=k.subtract,k.multiply=function(t){if(this.isZero())return v;if(e(t)||(t=s(t)),t.isZero())return v;if(this.eq(E))return t.isOdd()?E:v;if(t.eq(E))return this.isOdd()?E:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(d)&&t.lt(d))return n(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,o=65535&this.high,a=this.low>>>16,u=65535&this.low,f=t.high>>>16,c=65535&t.high,h=t.low>>>16,l=65535&t.low,p=0,y=0,g=0,_=0;return _+=u*l,g+=_>>>16,_&=65535,g+=a*l,y+=g>>>16,g&=65535,g+=u*h,y+=g>>>16,g&=65535,y+=o*l,p+=y>>>16,y&=65535,y+=a*h,p+=y>>>16,y&=65535,y+=u*c,p+=y>>>16,y&=65535,p+=r*l+o*h+a*c+u*f,p&=65535,i(g<<16|_,p<<16|y,this.unsigned)},k.mul=k.multiply,k.divide=function(t){if(e(t)||(t=s(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?y:v;var r,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return y;if(t.gt(this.shru(1)))return _;o=y}else{if(this.eq(E)){if(t.eq(g)||t.eq(m))return E;if(t.eq(E))return g;var a=this.shr(1);return r=a.div(t).shl(1),r.eq(v)?t.isNegative()?g:m:(i=this.sub(t.mul(r)),o=r.add(i.div(t)))}if(t.eq(E))return this.unsigned?y:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=v}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var u=Math.ceil(Math.log(r)/Math.LN2),c=u<=48?1:f(2,u-48),h=n(r),l=h.mul(t);l.isNegative()||l.gt(i);)r-=c,h=n(r,this.unsigned),l=h.mul(t);h.isZero()&&(h=g),o=o.add(h),i=i.sub(l)}return o},k.div=k.divide,k.modulo=function(t){return e(t)||(t=s(t)),this.sub(this.div(t).mul(t))},k.mod=k.modulo,k.not=function(){return i(~this.low,~this.high,this.unsigned)},k.and=function(t){return e(t)||(t=s(t)),i(this.low&t.low,this.high&t.high,this.unsigned)},k.or=function(t){return e(t)||(t=s(t)),i(this.low|t.low,this.high|t.high,this.unsigned)},k.xor=function(t){return e(t)||(t=s(t)),i(this.low^t.low,this.high^t.high,this.unsigned)},k.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0===(t&=63)?this:t<32?i(this.low<>>32-t,this.unsigned):i(0,this.low<>>t|this.high<<32-t,this.high>>t,this.unsigned):i(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},k.shr=k.shiftRight,k.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),t&=63,0===t)return this;var r=this.high;if(t<32){var n=this.low;return i(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?i(r,0,this.unsigned):i(r>>>t-32,0,this.unsigned)},k.shru=k.shiftRightUnsigned,k.toSigned=function(){return this.unsigned?i(this.low,this.high,!1):this},k.toUnsigned=function(){return this.unsigned?this:i(this.low,this.high,!0)},k.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},k.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},k.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t})}).call(e,r(64)(t))},function(t,e,r){function n(){return Object.keys(s)}var i=r(180),o=r(198),s=r(190);e.createCipher=e.Cipher=i.createCipher,e.createCipheriv=e.Cipheriv=i.createCipheriv,e.createDecipher=e.Decipher=o.createDecipher,e.createDecipheriv=e.Decipheriv=o.createDecipheriv,e.listCiphers=e.getCiphers=n},function(t,e,r){function n(t,e,r){h.call(this),this._cache=new i,this._cipher=new l.AES(e),this._prev=f.from(r),this._mode=t,this._autopadding=!0}function i(){this.cache=f.allocUnsafe(0)}function o(t,e,r){var i=a[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=f.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=f.from(r)),r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new c(i.module,e,r):"auth"===i.type?new u(i.module,e,r):new n(i.module,e,r)}function s(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=p(e,!1,r.key,r.iv);return o(t,n.key,n.iv)}var a=r(181),u=r(191),f=r(143).Buffer,c=r(194),h=r(167),l=r(192),p=r(195),d=r(133);d(n,h),n.prototype._update=function(t){this._cache.add(t);for(var e,r,n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return f.concat(n)};var v=f.alloc(16,16);n.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(v))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},i.prototype.add=function(t){this.cache=f.concat([this.cache,t])},i.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},i.prototype.flush=function(){for(var t=16-this.cache.length,e=f.allocUnsafe(t),r=-1;++r>a%8,t._prev=i(t._prev,r?o:s);return f}function i(t,e){var r=t.length,n=-1,i=o.allocUnsafe(t.length);for(t=o.concat([t,o.from([e])]);++n>7;return i}var o=r(143).Buffer;e.encrypt=function(t,e,r){for(var i=e.length,s=o.allocUnsafe(i),a=-1;++a>>24]^c[d>>>16&255]^h[v>>>8&255]^l[255&y]^e[g++],s=f[d>>>24]^c[v>>>16&255]^h[y>>>8&255]^l[255&p]^e[g++],a=f[v>>>24]^c[y>>>16&255]^h[p>>>8&255]^l[255&d]^e[g++],u=f[y>>>24]^c[p>>>16&255]^h[d>>>8&255]^l[255&v]^e[g++],p=o,d=s,v=a,y=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[v>>>8&255]<<8|n[255&y])^e[g++],s=(n[d>>>24]<<24|n[v>>>16&255]<<16|n[y>>>8&255]<<8|n[255&p])^e[g++],a=(n[v>>>24]<<24|n[y>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[g++],u=(n[y>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&v])^e[g++],o>>>=0,s>>>=0,a>>>=0,u>>>=0,[o,s,a,u]}function s(t){this._key=n(t),this._reset()}var a=r(143).Buffer,u=[0,1,2,4,8,16,32,64,128,27,54],f=function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var f=a^a<<1^a<<2^a<<3^a<<4;f=f>>>8^255&f^99,r[s]=f,n[f]=s;var c=t[s],h=t[c],l=t[h],p=257*t[f]^16843008*f;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*l^65537*h^257*c^16843008*s,o[0][f]=p<<24|p>>>8,o[1][f]=p<<16|p>>>16,o[2][f]=p<<8|p>>>24,o[3][f]=p,0===s?s=a=1:(s=c^t[t[t[l^c]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize, s.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,s=f.SBOX[s>>>24]<<24|f.SBOX[s>>>16&255]<<16|f.SBOX[s>>>8&255]<<8|f.SBOX[255&s],s^=u[o/e|0]<<24):e>6&&o%e===4&&(s=f.SBOX[s>>>24]<<24|f.SBOX[s>>>16&255]<<16|f.SBOX[s>>>8&255]<<8|f.SBOX[255&s]),i[o]=i[o-e]^s}for(var a=[],c=0;c>>24]]^f.INV_SUB_MIX[1][f.SBOX[l>>>16&255]]^f.INV_SUB_MIX[2][f.SBOX[l>>>8&255]]^f.INV_SUB_MIX[3][f.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=a},s.prototype.encryptBlockRaw=function(t){return t=n(t),o(t,this._keySchedule,f.SUB_MIX,f.SBOX,this._nRounds)},s.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=a.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},s.prototype.decryptBlock=function(t){t=n(t);var e=t[1];t[1]=t[3],t[3]=e;var r=o(t,this._invKeySchedule,f.INV_SUB_MIX,f.INV_SBOX,this._nRounds),i=a.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},s.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},t.exports.AES=s},function(t,e,r){function n(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function i(t){var e=s.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function o(t){this.h=t,this.state=s.alloc(16,0),this.cache=s.allocUnsafe(0)}var s=r(143).Buffer,a=s.alloc(16,0);o.prototype.ghash=function(t){for(var e=-1;++e0;t--)o[t]=o[t]>>>1|(1&o[t-1])<<31;o[0]=o[0]>>>1,r&&(o[0]=o[0]^225<<24)}this.state=i(s)},o.prototype.update=function(t){this.cache=s.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},o.prototype.final=function(t,e){return this.cache.length&&this.ghash(s.concat([this.cache,a],16)),this.ghash(i([0,t,0,e])),this.state},t.exports=o},function(t,e,r){function n(t,e,r,n){s.call(this),this._cipher=new i.AES(e),this._prev=o.from(r),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=n,this._mode=t}var i=r(192),o=r(143).Buffer,s=r(167),a=r(133);a(n,s),n.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},n.prototype._final=function(){this._cipher.scrub()},t.exports=n},function(t,e,r){function n(t,e,r,n){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=i.alloc(s),u=i.alloc(n||0),f=i.alloc(0);s>0||n>0;){var c=new o;c.update(f),c.update(t),e&&c.update(e),f=c.digest();var h=0;if(s>0){var l=a.length-s;h=Math.min(s,f.length),f.copy(a,l,0,h),s-=h}if(h0){var p=u.length-n,d=Math.min(n,f.length-h);f.copy(u,p,h,h+d),n-=d}}return f.fill(0),{key:a,iv:u}}var i=r(143).Buffer,o=r(196);t.exports=n},function(t,e,r){(function(e){"use strict";function n(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function i(t,e){return t<>>32-e}function o(t,e,r,n,o,s,a){return i(t+(e&r|~e&n)+o+s|0,a)+e|0}function s(t,e,r,n,o,s,a){return i(t+(e&n|r&~n)+o+s|0,a)+e|0}function a(t,e,r,n,o,s,a){return i(t+(e^r^n)+o+s|0,a)+e|0}function u(t,e,r,n,o,s,a){return i(t+(r^(e|~n))+o+s|0,a)+e|0}var f=r(133),c=r(197),h=new Array(16);f(n,c),n.prototype._update=function(){for(var t=h,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,f=this._d;r=o(r,n,i,f,t[0],3614090360,7),f=o(f,r,n,i,t[1],3905402710,12),i=o(i,f,r,n,t[2],606105819,17),n=o(n,i,f,r,t[3],3250441966,22),r=o(r,n,i,f,t[4],4118548399,7),f=o(f,r,n,i,t[5],1200080426,12),i=o(i,f,r,n,t[6],2821735955,17),n=o(n,i,f,r,t[7],4249261313,22),r=o(r,n,i,f,t[8],1770035416,7),f=o(f,r,n,i,t[9],2336552879,12),i=o(i,f,r,n,t[10],4294925233,17),n=o(n,i,f,r,t[11],2304563134,22),r=o(r,n,i,f,t[12],1804603682,7),f=o(f,r,n,i,t[13],4254626195,12),i=o(i,f,r,n,t[14],2792965006,17),n=o(n,i,f,r,t[15],1236535329,22),r=s(r,n,i,f,t[1],4129170786,5),f=s(f,r,n,i,t[6],3225465664,9),i=s(i,f,r,n,t[11],643717713,14),n=s(n,i,f,r,t[0],3921069994,20),r=s(r,n,i,f,t[5],3593408605,5),f=s(f,r,n,i,t[10],38016083,9),i=s(i,f,r,n,t[15],3634488961,14),n=s(n,i,f,r,t[4],3889429448,20),r=s(r,n,i,f,t[9],568446438,5),f=s(f,r,n,i,t[14],3275163606,9),i=s(i,f,r,n,t[3],4107603335,14),n=s(n,i,f,r,t[8],1163531501,20),r=s(r,n,i,f,t[13],2850285829,5),f=s(f,r,n,i,t[2],4243563512,9),i=s(i,f,r,n,t[7],1735328473,14),n=s(n,i,f,r,t[12],2368359562,20),r=a(r,n,i,f,t[5],4294588738,4),f=a(f,r,n,i,t[8],2272392833,11),i=a(i,f,r,n,t[11],1839030562,16),n=a(n,i,f,r,t[14],4259657740,23),r=a(r,n,i,f,t[1],2763975236,4),f=a(f,r,n,i,t[4],1272893353,11),i=a(i,f,r,n,t[7],4139469664,16),n=a(n,i,f,r,t[10],3200236656,23),r=a(r,n,i,f,t[13],681279174,4),f=a(f,r,n,i,t[0],3936430074,11),i=a(i,f,r,n,t[3],3572445317,16),n=a(n,i,f,r,t[6],76029189,23),r=a(r,n,i,f,t[9],3654602809,4),f=a(f,r,n,i,t[12],3873151461,11),i=a(i,f,r,n,t[15],530742520,16),n=a(n,i,f,r,t[2],3299628645,23),r=u(r,n,i,f,t[0],4096336452,6),f=u(f,r,n,i,t[7],1126891415,10),i=u(i,f,r,n,t[14],2878612391,15),n=u(n,i,f,r,t[5],4237533241,21),r=u(r,n,i,f,t[12],1700485571,6),f=u(f,r,n,i,t[3],2399980690,10),i=u(i,f,r,n,t[10],4293915773,15),n=u(n,i,f,r,t[1],2240044497,21),r=u(r,n,i,f,t[8],1873313359,6),f=u(f,r,n,i,t[15],4264355552,10),i=u(i,f,r,n,t[6],2734768916,15),n=u(n,i,f,r,t[13],1309151649,21),r=u(r,n,i,f,t[4],4149444226,6),f=u(f,r,n,i,t[11],3174756917,10),i=u(i,f,r,n,t[2],718787259,15),n=u(n,i,f,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+f|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=new e(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){"use strict";function n(t,e){if(!o.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}function i(t){s.call(this),this._block=o.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var o=r(143).Buffer,s=r(138).Transform,a=r(133);a(i,s),i.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},i.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},i.prototype.update=function(t,e){if(n(t,"Data"),this._finalized)throw new Error("Digest already called");o.isBuffer(t)||(t=o.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var s=this._blockOffset;s0;++a)this._length[a]+=u,u=this._length[a]/4294967296|0,u>0&&(this._length[a]-=4294967296*u);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i},function(t,e,r){function n(t,e,r){l.call(this),this._cache=new i,this._last=void 0,this._cipher=new p.AES(e),this._prev=f.from(r),this._mode=t,this._autopadding=!0}function i(){this.cache=f.allocUnsafe(0)}function o(t){for(var e=t[15],r=-1;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=a,e.createDecipheriv=s},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:this.Q.compressed;return this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=s.Point.decodeFrom(a,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=f.sha512(t);return f.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix");if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=f.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return this.pubdata=u.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.get("address_prefix"),r=this.toBuffer(),n=f.sha512(r),i=f.ripemd160(n),o=f.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+u.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=f.sha256(t),n=f.ripemd160(r);n=e.concat([new e([56]),n]);var i=f.sha256(n);return i=f.sha256(i),n=e.concat([n,i.slice(0,4)]),u.encode(n)}},{key:"child",value:function(r){h(e.isBuffer(r),"Buffer required: offset"),h.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=f.sha256(r);var n=o.fromBuffer(r);if(n.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=l.multiply(n),s=this.Q.add(i);if(a.isInfinity(s))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(s)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(r){return t.fromBuffer(new e(r,"binary"))}},{key:"fromBuffer",value:function(e){return new t(s.Point.decodeFrom(a,e))}},{key:"fromPoint",value:function(e){return new t(e)}},{key:"fromString",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix");try{return t.fromStringOrThrow(e,r)}catch(t){return null}}},{key:"fromStringOrThrow",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.get("address_prefix"),i=r.slice(0,n.length);h.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length),r=new e(u.decode(r),"binary");var o=r.slice(-4);r=r.slice(0,-4);var s=f.ripemd160(r);return s=s.slice(0,4),h.deepEqual(o,s,"Checksum did not match"),t.fromBuffer(r)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"fromStringHex",value:function(r){return t.fromString(new e(r,"hex"))}}]),t}();t.exports=d}).call(e,r(123).Buffer)},function(t,e,r){var n=r(201);r(203),t.exports=n},function(t,e,r){function n(t,e,r){return this instanceof n?void(null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))):new n(t,e,r)}function i(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i}function o(t){return oe.charAt(t)}function s(t,e){var r=se[t.charCodeAt(e)];return null==r?-1:r}function a(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function u(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+ee:this.t=0}function f(t){var e=new n;return e.fromInt(t),e}function c(t,e){var r,i=this;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void i.fromRadix(t,e);r=2}i.t=0,i.s=0;for(var o=t.length,a=!1,u=0;--o>=0;){var f=8==r?255&t[o]:s(t,o);f<0?"-"==t.charAt(o)&&(a=!0):(a=!1,0==u?i[i.t++]=f:u+r>i.DB?(i[i.t-1]|=(f&(1<>i.DB-u):i[i.t-1]|=f<=i.DB&&(u-=i.DB))}8==r&&0!=(128&t[0])&&(i.s=-1,u>0&&(i[i.t-1]|=(1<0&&this[this.t-1]==t;)--this.t}function l(t){var e=this;if(e.s<0)return"-"+e.negate().toString(t);var r;if(16==t)r=4;else if(8==t)r=3;else if(2==t)r=1;else if(32==t)r=5;else{if(4!=t)return e.toRadix(t);r=2}var n,i=(1<0)for(f>f)>0&&(s=!0,a=o(n));u>=0;)f>(f+=e.DB-r)):(n=e[u]>>(f-=r)&i,f<=0&&(f+=e.DB,--u)),n>0&&(s=!0),s&&(a+=o(n));return s?a:"0"}function p(){var t=new n;return n.ZERO.subTo(this,t),t}function d(){return this.s<0?this.negate():this}function v(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(e=r-t.t,0!=e)return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0}function y(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function g(){return this.t<=0?0:this.DB*(this.t-1)+y(this[this.t-1]^this.s&this.DM)}function _(){return this.bitLength()>>3}function m(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s}function b(t,e){for(var r=t;r=0;--r)e[r+a+1]=n[r]>>o|u,u=(n[r]&s)<=0;--r)e[r]=0;e[a]=u,e.t=n.t+a+1,e.s=n.s,e.clamp()}function E(t,e){var r=this;e.s=r.s;var n=Math.floor(t/r.DB);if(n>=r.t)return void(e.t=0);var i=t%r.DB,o=r.DB-i,s=(1<>i;for(var a=n+1;a>i;i>0&&(e[r.t-n-1]|=(r.s&s)<>=r.DB;if(t.t>=r.DB;i+=r.s}else{for(i+=r.s;n>=r.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=r.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()}function T(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()}function S(t,e,r){var i=this,o=t.abs();if(!(o.t<=0)){var s=i.abs();if(s.t0?(o.lShiftTo(c,a),s.lShiftTo(c,r)):(o.copyTo(a),s.copyTo(r));var h=a.t,l=a[h-1];if(0!=l){var p=l*(1<1?a[h-2]>>i.F2:0),d=i.FV/p,v=(1<=0&&(r[r.t++]=1,r.subTo(b,r)),n.ONE.dlShiftTo(h,b),b.subTo(a,a);a.t=0;){var w=r[--_]==l?i.DM:Math.floor(r[_]*d+(r[_-1]+g)*v);if((r[_]+=a.am(0,w,r,m,0,h))0&&r.rShiftTo(c,r),u<0&&n.ZERO.subTo(r,r)}}}function x(t){var e=new n;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e}function A(t){this.m=t}function I(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function O(t){return t}function j(t){t.divRemTo(this.m,null,t)}function C(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function R(t,e){t.squareTo(e),this.reduce(e)}function L(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function U(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}function P(t){var e=new n;return t.copyTo(e),this.reduce(e),e}function D(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t[r]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function N(t,e){t.squareTo(e),this.reduce(e)}function M(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function q(){return 0==(this.t>0?1&this[0]:this.s)}function z(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=y(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<0)e.mulTo(i,o,r);else{var a=r;r=i,i=a}return e.revert(r)}function V(t,e){var r;return r=t<256||e.isEven()?new A(e):new U(e),this.exp(t,r)}function H(){var t=new n;return this.copyTo(t),t}function W(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function G(){return 0==this.t?this.s:this[0]<<16>>16}function $(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function X(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function Z(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=f(r),o=new n,s=new n,a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a}function K(t,e){var r=this;r.fromInt(0),null==e&&(e=10);for(var i=r.chunkSize(e),o=Math.pow(e,i),a=!1,u=0,f=0,c=0;c=i&&(r.dMultiply(o),r.dAddOffset(f,0),u=0,f=0))}u>0&&(r.dMultiply(Math.pow(e,u)),r.dAddOffset(f,0)),a&&n.ZERO.subTo(r,r)}function Q(t,e,r){var i=this;if("number"==typeof e)if(t<2)i.fromInt(1);else for(i.fromNumber(t,r),i.testBit(t-1)||i.bitwiseTo(n.ONE.shiftLeft(t-1),st,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(e);)i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(n.ONE.shiftLeft(t-1),i);else{var o=new Array,s=7&t;o.length=(t>>3)+1,e.nextBytes(o),s>0?o[0]&=(1<0)for(i>i)!=(t.s&t.DM)>>i&&(r[o++]=n|t.s<=0;)i<8?(n=(t[e]&(1<>(i+=t.DB-8)):(n=t[e]>>(i-=8)&255,i<=0&&(i+=t.DB,--e)),0!=(128&n)&&(n|=-256),0===o&&(128&t.s)!=(128&n)&&++o,(o>0||n!=t.s)&&(r[o++]=n);return r}function tt(t){return 0==this.compareTo(t)}function et(t){return this.compareTo(t)<0?this:t}function rt(t){return this.compareTo(t)>0?this:t}function nt(t,e,r){var n,i,o=this,s=Math.min(t.t,o.t);for(n=0;n>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function yt(){for(var t=0;t=this.t?0!=this.s:0!=(this[e]&1<>=r.DB;if(t.t>=r.DB;i+=r.s}else{for(i+=r.s;n>=r.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=r.DV+i),e.t=n,e.clamp()}function Bt(t){var e=new n;return this.addTo(t,e),e}function St(t){var e=new n;return this.subTo(t,e),e}function xt(t){var e=new n;return this.multiplyTo(t,e),e}function At(){var t=new n;return this.squareTo(t),t}function It(t){var e=new n;return this.divRemTo(t,e,null),e}function Ot(t){var e=new n;return this.divRemTo(t,null,e),e}function jt(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)}function Ct(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Rt(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Lt(){}function Ut(t){return t}function Ft(t,e,r){t.multiplyTo(e,r)}function Pt(t,e){t.squareTo(e)}function Dt(t){return this.exp(t,new Lt)}function Nt(t,e,r){var n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n=0;)r[n]=0;for(n=Math.max(e-this.t,0);n2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=new n;return t.copyTo(e),this.reduce(e),e}function Vt(t){return t}function Ht(t){var e=this;for(t.drShiftTo(e.m.t-1,e.r2),t.t>e.m.t+1&&(t.t=e.m.t+1,t.clamp()),e.mu.multiplyUpperTo(e.r2,e.m.t+1,e.q3),e.m.multiplyLowerTo(e.q3,e.m.t+1,e.r2);t.compareTo(e.r2)<0;)t.dAddOffset(1,e.m.t+1);for(t.subTo(e.r2,t);t.compareTo(e.m)>=0;)t.subTo(e.m,t)}function Wt(t,e){t.squareTo(e),this.reduce(e)}function Yt(t,e,r){t.multiplyTo(e,r),this.reduce(r)}function Gt(t,e){var r,i,o=t.bitLength(),s=f(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new A(e):e.isEven()?new qt(e):new U(e);var a=new Array,u=3,c=r-1,h=(1<1){var l=new n;for(i.sqrTo(a[1],l);u<=h;)a[u]=new n,i.mulTo(l,a[u-2],a[u]),u+=2}var p,d,v=t.t-1,g=!0,_=new n;for(o=y(t[v])-1;v>=0;){for(o>=c?p=t[v]>>o-c&h:(p=(t[v]&(1<0&&(p|=t[v-1]>>this.DB+o-c)),u=r;0==(1&p);)p>>=1,--u;if((o-=u)<0&&(o+=this.DB,--v),g)a[p].copyTo(s),g=!1;else{for(;u>1;)i.sqrTo(s,_),i.sqrTo(_,s),u-=2;u>0?i.sqrTo(s,_):(d=s,s=_,_=d),i.mulTo(_,a[p],s)}for(;v>=0&&0==(t[v]&1<0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r}function Xt(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r}function Zt(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=f(1),s=f(0),a=f(0),u=f(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;u.compareTo(t)>=0;)u.subTo(t,u);for(;u.signum()<0;)u.addTo(t,u);return u}function Kt(t){var e,r=this.abs();if(1==r.t&&r[0]<=ae[ae.length-1]){for(e=0;e>1,t>ae.length&&(t=ae.length);for(var o,s=new n(null),a=[],u=0;u0;--o){var a=r.testBit(o),u=e.testBit(o);i=i.twice(),a!==u&&(i=i.add(a?this:n))}return i},n.prototype.multiplyTwo=function(t,e,r){for(var n=Math.max(t.bitLength(),r.bitLength())-1,i=this.curve.infinity,o=this.add(e);n>=0;){var s=t.testBit(n),a=r.testBit(n);i=i.twice(),s?i=a?i.add(o):i.add(this):a&&(i=i.add(e)),--n}return i},n.prototype.getEncoded=function(t){if(null==t&&(t=this.compressed),this.curve.isInfinity(this))return new e("00","hex");var r,n=this.affineX,i=this.affineY,o=this.curve.pLength;return t?(r=new e(1+o),r.writeUInt8(i.isEven()?2:3,0)):(r=new e(1+o+o),r.writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},n.decodeFrom=function(t,e){var r,s=e.readUInt8(0),a=4!==s,u=Math.floor((t.p.bitLength()+7)/8),f=o.fromBuffer(e.slice(1,1+u));if(a){i.equal(e.length,u+1,"Invalid sequence length"),i(2===s||3===s,"Invalid sequence tag");var c=3===s;r=t.pointFromX(c,f)}else{i.equal(e.length,1+u+u,"Invalid sequence length");var h=o.fromBuffer(e.slice(1+u));r=n.fromAffine(t,f,h)}return r.compressed=a,r},n.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=n}).call(e,r(123).Buffer)},function(t,e,r){function n(t,e,r,n,i,a,u){this.p=t,this.a=e,this.b=r,this.G=s.fromAffine(this,n,i),this.n=a,this.h=u,this.infinity=new s(this,null,null,o.ZERO),this.pOverFour=t.add(o.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}var i=r(127),o=r(200),s=r(205);n.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p),n=r.modPow(this.pOverFour,this.p),i=n;return n.isEven()^!t&&(i=this.p.subtract(i)),s.fromAffine(this,e,i)},n.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},n.prototype.isOnCurve=function(t){if(this.isInfinity(t))return!0;var e=t.affineX,r=t.affineY,n=this.a,i=this.b,o=this.p;if(e.signum()<0||e.compareTo(o)>=0)return!1;if(r.signum()<0||r.compareTo(o)>=0)return!1;var s=r.square().mod(o),a=e.pow(3).add(n.multiply(e)).add(i).mod(o);return s.equals(a)},n.prototype.validate=function(t){i(!this.isInfinity(t),"Point is at infinity"),i(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return i(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=n},function(t,e,r){function n(t){var e=o[t];if(!e)return null;var r=new i(e.p,16),n=new i(e.a,16),a=new i(e.b,16),u=new i(e.n,16),f=new i(e.h,16),c=new i(e.Gx,16),h=new i(e.Gy,16);return new s(r,n,a,c,h,u,f)}var i=r(200),o=r(208),s=r(206);t.exports=n},function(t,e){t.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(n);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new t(i)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toPublicKey",value:function(){return this.toPublic()}}],[{key:"fromBuffer",value:function(r){if(!e.isBuffer(r))throw new Error("Expecting paramter to be a Buffer type");if(32!==r.length&&console.log("WARN: Expecting 32 bytes, instead got "+r.length+", stack trace:",(new Error).stack),0===r.length)throw new Error("Empty buffer");return new t(u.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(h.sha256(e))}},{key:"isWif",value:function(t){try{return this.fromWif(t),!0}catch(t){return!1}}},{key:"fromWif",value:function(r){var n=new e(f.decode(r)),i=n.readUInt8(0);c.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.slice(-4),a=h.sha256(o);if(a=h.sha256(a),a=a.slice(0,4),s.toString()!==a.toString())throw new Error("Invalid WIF key (checksum miss-match)");return o=o.slice(1),t.fromBuffer(o)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}}]),t}();t.exports=d;var v=function(t){return null==t?t:t.Q?t:l.fromStringOrThrow(t)}}).call(e,r(123).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=function(){function t(t,e){for(var r=0;r=0||!i(p);)a=c.HmacSHA256(e.concat([u,new e([0])]),a),u=c.HmacSHA256(u,a),u=c.HmacSHA256(u,a),p=l.fromBuffer(u);return p}function i(t,e,r,i){var o,s,a=l.fromBuffer(e),u=t.n,f=t.G,c=(n(t,e,r,function(e){var n=f.multiply(e);return!t.isInfinity(n)&&(o=n.affineX.mod(u),0!==o.signum()&&(s=e.modInverse(u).multiply(a.add(r.multiply(o))).mod(u),0!==s.signum()))},i),u.shiftRight(1));return s.compareTo(c)>0&&(s=u.subtract(s)),new p(o,s)}function o(t,e,r,n){var i=t.n,o=t.G,s=r.r,a=r.s;if(s.signum()<=0||s.compareTo(i)>=0)return!1;if(a.signum()<=0||a.compareTo(i)>=0)return!1;var u=a.modInverse(i),f=e.multiply(u).mod(i),c=s.multiply(u).mod(i),h=o.multiplyTwo(f,n,c);if(t.isInfinity(h))return!1;var l=h.affineX,p=l.mod(i);return p.equals(s)}function s(t,e,r,n){var i=l.fromBuffer(e);return o(t,i,r,n)}function a(t,e,r,n){f.strictEqual(3&n,n,"Recovery param is more than two bits");var i=t.n,o=t.G,s=r.r,a=r.s;f(s.signum()>0&&s.compareTo(i)<0,"Invalid r value"),f(a.signum()>0&&a.compareTo(i)<0,"Invalid s value");var u=1&n,c=n>>1,h=c?s.add(i):s,l=t.pointFromX(u,h),p=l.multiply(i);f(t.isInfinity(p),"nR is not a valid curve point");var d=e.negate().mod(i),v=s.modInverse(i),y=l.multiplyTwo(a,o,d).multiply(v);return t.validate(y),y}function u(t,e,r,n){for(var i=0;i<4;i++){var o=a(t,e,r,i);if(o.equals(n))return i}throw new Error("Unable to find valid recovery factor")}var f=r(127),c=r(131),h=r(212),l=r(200),p=r(213);t.exports={calcPubKeyRecoveryParam:u,deterministicGenerateK:n,recoverPubKey:a,sign:i,verify:s,verifyRaw:o}}).call(e,r(123).Buffer)},function(t,e,r){(function(e){"use strict";function r(t){var e=t.toString().match(/function (.*?)\(/);return e?e[1]:null}t.exports=function(t,n){switch(t){case"Array":if(Array.isArray(n))return;break;case"Boolean":if("boolean"==typeof n)return;break;case"Buffer":if(e.isBuffer(n))return;break;case"Number":if("number"==typeof n)return;break;case"String":if("string"==typeof n)return;break;default:if(r(n.constructor)===r(t))return}throw new TypeError("Expected "+(r(t)||t)+", got "+n)}}).call(e,r(123).Buffer)},function(t,e,r){(function(e){"use strict";function n(t,e){o(s,t),o(s,e),this.r=t,this.s=e}var i=r(127),o=r(212),s=r(200);n.parseCompact=function(t){i.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;i.equal(e,7&e,"Invalid signature parameter");var r=!!(4&e);e&=3;var o=s.fromBuffer(t.slice(1,33)),a=s.fromBuffer(t.slice(33));return{compressed:r,i:e,signature:new n(o,a)}},n.fromDER=function(t){i.equal(t.readUInt8(0),48,"Not a DER sequence"),i.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),i.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);i(e>0,"R length is zero");var r=4+e;i.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var o=t.readUInt8(r+1);i(o>0,"S length is zero");var a=t.slice(4,r),u=t.slice(r+2);r+=2+o,e>1&&0===a.readUInt8(0)&&i(128&a.readUInt8(1),"R value excessively padded"),o>1&&0===u.readUInt8(0)&&i(128&u.readUInt8(1),"S value excessively padded"),i.equal(r,t.length,"Invalid DER encoding");var f=s.fromDERInteger(a),c=s.fromDERInteger(u);return i(f.signum()>=0,"R value is negative"),i(c.signum()>=0,"S value is negative"),new n(f,c)},n.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=e&-129;return i(r>0&&r<4,"Invalid hashType"),{signature:n.fromDER(t.slice(0,-1)),hashType:e}},n.prototype.toCompact=function(t,r){r&&(t+=4),t+=27;var n=new e(65);return n.writeUInt8(t,0),this.r.toBuffer(32).copy(n,1),this.s.toBuffer(32).copy(n,33),n},n.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),n=n.concat(t),n.push(2,r.length),n=n.concat(r),n.unshift(48,n.length),new e(n)},n.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=n}).call(e,r(123).Buffer)},function(t,e){"use strict";function r(t){if("string"!=typeof t)throw new Error("string required for brain_key");return t=t.trim(),t.split(/[\t\n\v\f\r ]+/).join(" ")}Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=r},function(t,e,r){(function(e){"use strict";var n=r(209),i=r(131),o=r(174),s=250,a=0,u=0,f=o.randomBuffer(101);t.exports={addEntropy:function(){u++;for(var t=arguments.length,e=Array(t),r=0;r9007199254740991&&(f[l]=0)}}catch(t){i=!0,o=t}finally{try{!n&&c.return&&c.return()}finally{if(i)throw o}}},random32ByteBuffer:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();if("string"!=typeof t)throw new Error("string required for entropy");if(t.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var r=Date.now();Date.now()-r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{use_default:!1,annotate:!1},r={},n=null;try{if(!this.types)return r;for(var n,i=this.keys,o=0;of?1:uo.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(r){var n=r.toBuffer();return void e.append(n.toString("binary"),"binary")}return n=t.fixed_data(e,33),o.PublicKey.fromBuffer(n)}}},{key:"ripemd160",value:function(e,r){if(e)return r?void t.fixed_data(e,20,r):t.fixed_data(e,20)}},{key:"time_point_sec",value:function(t,e){return e?(e=Math.ceil(e/1e3),void t.writeInt32(e)):(e=t.readInt32(),new Date(1e3*e))}}]),t}();t.exports=s}).call(e,r(123).Buffer)},function(t,e,r){(function(e,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=r(121),a=r(221),u=r(222),f=r(224),c=r(219),h=r(223),l={};t.exports=l;var p=e.env.npm_config__graphene_serializer_hex_dump;l.asset={fromByteBuffer:function(t){var e=t.readInt64(),r=t.readUint8(),i=t.copy(t.offset,t.offset+7),o=new n(i.toBinary(),"binary").toString().replace(/\x00/g,"");t.skip(7);var s=(0,a.fromImpliedDecimal)(e,r);return s+" "+o},appendByteBuffer:function(t,e){if(e=e.trim(),!/^[0-9]+\.?[0-9]* [A-Za-z0-9]+$/.test(e))throw new Error("Expecting amount like '99.000 SYMBOL', instead got '"+e+"'");var r=e.split(" "),n=o(r,2),i=n[0],s=n[1];if(s.length>6)throw new Error("Symbols are not longer than 6 characters "+s+"-"+s.length);t.writeInt64(u.to_long(i.replace(".","")));var a=i.indexOf("."),f=a===-1?0:i.length-a-1;t.writeUint8(f),t.append(s.toUpperCase(),"binary");for(var c=0;c<7-s.length;c++)t.writeUint8(0)},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0.000 STEEM":t}},l.uint8={fromByteBuffer:function(t){return t.readUint8()},appendByteBuffer:function(t,e){u.require_range(0,255,e,"uint8 "+e),t.writeUint8(e)},fromObject:function(t){return u.require_range(0,255,t,"uint8 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(0,255,t,"uint8 "+t),parseInt(t))}},l.uint16={fromByteBuffer:function(t){return t.readUint16()},appendByteBuffer:function(t,e){u.require_range(0,65535,e,"uint16 "+e),t.writeUint16(e)},fromObject:function(t){return u.require_range(0,65535,t,"uint16 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},l.uint32={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){u.require_range(0,4294967295,e,"uint32 "+e),t.writeUint32(e)},fromObject:function(t){return u.require_range(0,4294967295,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(0,4294967295,t,"uint32 "+t),parseInt(t))}};var d=-1*Math.pow(2,31),v=Math.pow(2,31)-1;l.varint32={fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(t,e){u.require_range(d,v,e,"uint32 "+e),t.writeVarint32(e)},fromObject:function(t){return u.require_range(d,v,t,"uint32 "+t),t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:(u.require_range(d,v,t,"uint32 "+t),parseInt(t))}},l.int16={fromByteBuffer:function(t){return t.readInt16()},appendByteBuffer:function(t,e){t.writeInt16(e)},fromObject:function(t){return t},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?0:parseInt(t)}},l.int64={fromByteBuffer:function(t){return t.readInt64()},appendByteBuffer:function(t,e){u.required(e),t.writeInt64(u.to_long(e))},fromObject:function(t){return u.required(t),u.to_long(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":(u.required(t),u.to_long(t).toString())}},l.uint64={fromByteBuffer:function(t){return t.readUint64()},appendByteBuffer:function(t,e){t.writeUint64(u.to_long(u.unsigned(e)))},fromObject:function(t){return u.to_long(u.unsigned(t))},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0":u.to_long(t).toString()}},l.string={fromByteBuffer:function(t){return new n(t.readVString(),"utf8")},appendByteBuffer:function(t,e){u.required(e),t.writeVString(e.toString())},fromObject:function(t){return u.required(t),new n(t,"utf8")},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"":t.toString("utf8")}},l.string_binary={fromByteBuffer:function(t){var e,r=t.readVarint32();return e=t.copy(t.offset,t.offset+r),t.skip(r),new n(e.toBinary(),"binary")},appendByteBuffer:function(t,e){t.writeVarint32(e.length),t.append(e.toString("binary"),"binary")},fromObject:function(t){return u.required(t),new n(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"":t.toString()}},l.bytes=function(t){return{fromByteBuffer:function(e){if(void 0===t){var r,i=e.readVarint32();return r=e.copy(e.offset,e.offset+i),e.skip(i),new n(r.toBinary(),"binary")}return r=e.copy(e.offset,e.offset+t),e.skip(t),new n(r.toBinary(),"binary")},appendByteBuffer:function(e,r){u.required(r),"string"==typeof r&&(r=new n(r,"hex")),void 0===t&&e.writeVarint32(r.length),e.append(r.toString("binary"),"binary")},fromObject:function(t){return u.required(t),n.isBuffer(t)?t:new n(t,"hex")},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e){var n=function(t){return new Array(t).join("00")};return n(t)}return u.required(e),e.toString("hex")}}},l.bool={fromByteBuffer:function(t){return 1===t.readUint8()},appendByteBuffer:function(t,e){t.writeUint8(JSON.parse(e)?1:0)},fromObject:function(t){return!!JSON.parse(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(!e.use_default||void 0!==t)&&!!JSON.parse(t)}},l.void={fromByteBuffer:function(t){throw new Error("(void) undefined type")},appendByteBuffer:function(t,e){throw new Error("(void) undefined type")},fromObject:function(t){throw new Error("(void) undefined type")},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.use_default||void 0!==t)throw new Error("(void) undefined type")}},l.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();p&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0r;01&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e)return[t.toObject(e,r)];u.required(e),e=m(e,t);for(var n,i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if(e.use_default&&void 0===t)return new Date(0).toISOString().split(".")[0];if(u.required(t),"string"==typeof t)return t;if(t.getTime)return t.toISOString().split(".")[0];var r=parseInt(t);return u.require_range(0,4294967295,r,"uint32 "+t), new Date(1e3*r).toISOString().split(".")[0]}},l.set=function(t){return{validate:function(e){for(var r,n={},o=0;o=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return m(e,t)},fromByteBuffer:function(e){var r=e.readVarint32();return p&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0r;01&&void 0!==arguments[1]?arguments[1]:{};return r.use_default&&void 0===e?[t.toObject(e,r)]:(e||(e=[]),this.validate(function(){for(var n,i=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:{},i=h.object_type[e];return n.use_default&&void 0===r?t+"."+i+".0":(u.required(r),void 0!==r.resolve&&(r=r.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(r)&&(r=u.get_instance(t,e,r)),t+"."+i+"."+r)}}};l.protocol_id_type=function(t){return u.required(t,"name"),y(h.reserved_spaces.protocol_ids,t)},l.object_id_type={fromByteBuffer:function(t){return f.fromByteBuffer(t)},appendByteBuffer:function(t,e){u.required(e),void 0!==e.resolve&&(e=e.resolve),e=f.fromString(e),e.appendByteBuffer(t)},fromObject:function(t){return u.required(t),void 0!==t.resolve&&(t=t.resolve),f.fromString(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0.0.0":(u.required(t),void 0!==t.resolve&&(t=t.resolve),t=f.fromString(t),t.toString())}},l.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(t){var e=t.readUint32();return{type:e&this.TYPE,id:e&this.ID}},appendByteBuffer:function(t,e){u.required(e),"string"===e&&(e=l.vote_id.fromObject(e));var r=e.id<<8|e.type;t.writeUint32(r)},fromObject:function(t){if(u.required(t,"(type vote_id)"),"object"===("undefined"==typeof t?"undefined":i(t)))return u.required(t.type,"type"),u.required(t.id,"id"),t;u.require_test(/^[0-9]+:[0-9]+$/,t,"vote_id format "+t);var e=t.split(":"),r=o(e,2),n=r[0],s=r[1];return u.require_range(0,255,n,"vote type "+t),u.require_range(0,16777215,s,"vote id "+t),{type:n,id:s}},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?"0:0":(u.required(t),"string"==typeof t&&(t=l.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==("undefined"==typeof t?"undefined":i(t))&&(t=l.vote_id.fromObject(t)),"object"!==("undefined"==typeof e?"undefined":i(e))&&(e=l.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},l.optional=function(t){return u.required(t,"st_operation"),{fromByteBuffer:function(e){if(1===e.readUint8())return t.fromByteBuffer(e)},appendByteBuffer:function(e,r){null!==r&&void 0!==r?(e.writeUint8(1),t.appendByteBuffer(e,r)):e.writeUint8(0)},fromObject:function(e){if(void 0!==e)return t.fromObject(e)},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){return r.use_default||void 0!==e?t.toObject(e,r):void 0}();return r.annotate&&("object"===("undefined"==typeof n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},l.static_variant=function(t){return{nosort:!0,st_operations:t,opTypeId:function(t){var e=0,r=void 0;if("number"==typeof t)r=t;else{var n=!0,i=!1,o=void 0;try{for(var s,a=this.st_operations[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var u=s.value;if(u.operation_name===t){r=e;break}e++}}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}return r},fromByteBuffer:function(t){var e=t.readVarint32(),r=this.st_operations[e];return p&&console.error("static_variant id 0x"+e.toString(16)+" ("+e+")"),u.required(r,"operation "+e),[e,r.fromByteBuffer(t)]},appendByteBuffer:function(t,e){u.required(e);var r=this.opTypeId(e[0]),n=this.st_operations[r];u.required(n,"operation "+r),t.writeVarint32(r),n.appendByteBuffer(t,e[1])},fromObject:function(t){u.required(t);var e=this.opTypeId(t[0]),r=this.st_operations[e];return u.required(r,"operation "+e),[e,r.fromObject(t[1])]},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.use_default&&void 0===t)return[this.st_operations[0].operation_name,this.st_operations[0].toObject(void 0,e)];u.required(t);var r=this.opTypeId(t[0]),n=this.st_operations[r];return u.required(n,"operation "+r),[n.operation_name,n.toObject(t[1],e)]},compare:function(t,e){return g(this.opTypeId(t[0]),this.opTypeId(e[0]))}}},l.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},o=0;o=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return m(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0i;01&&void 0!==arguments[1]?arguments[1]:{};if(n.use_default&&void 0===r)return[[t.toObject(void 0,n),e.toObject(void 0,n)]];u.required(r),r=this.validate(r);for(var i,o=[],s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?s.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(u.required(t),t.toString())},compare:function(t,e){return 1*g(t.toString(),e.toString())}},l.address={_to_address:function(t){return u.required(t),t.addy?t:s.Address.fromString(t)},fromByteBuffer:function(t){return new s.Address(c.ripemd160(t))},appendByteBuffer:function(t,e){c.ripemd160(t,l.address._to_address(e).toBuffer())},fromObject:function(t){return l.address._to_address(t)},toObject:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.use_default&&void 0===t?s.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":l.address._to_address(t).toString()},compare:function(t,e){return-1*g(t.toString(),e.toString())}};var g=function(t,e){return t>e?1:t=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))throw new Error("value required "+e+" "+t);return t},require_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!m.isLong(t))throw new Error("Long value required "+e+" "+t);return t},string:function(t){if(i(t))return t;if("string"!=typeof t)throw new Error("string required: "+t);return t},number:function(t){if(i(t))return t;if("number"!=typeof t)throw new Error("number required: "+t);return t},whole_number:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if(/\./.test(t))throw new Error("whole number required "+e+" "+t);return t},unsigned:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if(/-/.test(t))throw new Error("unsigned required "+e+" "+t);return t},is_digits:o=function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;n.no_overflow53(t,e);var r=function(){return"number"==typeof t?t:parseInt(t)}();return r},to_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:m.isLong(t)?t:(n.no_overflow64(t,e),"number"==typeof t&&(t=""+t),m.fromString(t))},to_string:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(t))return t;if("string"==typeof t)return t;if("number"==typeof t)return n.no_overflow53(t,e),""+t;if(m.isLong(t))return t.toString();throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":_(t))+") "+t},require_test:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(e))return e;if(!t.test(e))throw new Error("unmatched "+t+" "+r+" "+e);return e},require_match:a=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(e))return e;var n=e.match(t);if(null===n)throw new Error("unmatched "+t+" "+r+" "+e);return n},require_range:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;s(r);if(re)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;var o=b.object_type[e];if(!o)throw new Error("Unknown object type: "+e+", "+n+", "+r);var s=new RegExp(t+"."+o+".[0-9]+$");if(!s.test(r))throw new Error("Expecting "+e+" in format "+(t+"."+o+".[0-9]+ ")+("instead of "+r+" "+n+" "+r));return r},get_instance:c=function(t,e,r,n){return i(r)?r:(f(t,e,r,n),s(r.split(".")[2]))},require_relative_type:h=function(t,e,r){return f(0,t,e,r),e},get_relative_instance:l=function(t,e,r){return i(e)?e:(f(0,t,e,r),s(e.split(".")[2]))},require_protocol_type:p=function(t,e,r){return f(1,t,e,r),e},get_protocol_instance:d=function(t,e,r){return i(e)?e:(f(1,t,e,r),s(e.split(".")[2]))},get_protocol_type:v=function(t,e){if(i(t))return t;u(t,e);var r=t.split(".");return s(r[1])},get_protocol_type_name:function(t,e){if(i(t))return t;var r=v(t,e);return Object.keys(b.object_type)[r]},require_implementation_type:y=function(t,e,r){return f(2,t,e,r),e},get_implementation_instance:g=function(t,e,r){return i(e)?e:(f(2,t,e,r),s(e.split(".")[2]))},no_overflow53:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("number"!=typeof t){if("string"!=typeof t){if(m.isLong(t))return void n.no_overflow53(t.toInt(),e);throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":_(t))+") "+t}parseInt(t);if(t>w||tw||t1&&void 0!==arguments[1]?arguments[1]:"";if(!m.isLong(t)){if(void 0!==t.t&&void 0!==t.s)return void n.no_overflow64(t.toString(),e);if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+("undefined"==typeof t?"undefined":_(t))+") "+t;if(t>w||t2&&void 0!==arguments[2]?arguments[2]:["owner","active","posting","memo"],n={};return r.forEach(function(r){n[r]=this.toWif(t,e,r),n[r+"Pubkey"]=this.wifToPublic(n[r])}.bind(this)),n},d.isWif=function(t){var r=!1;try{var n=new e(i.decode(t)),o=n.slice(0,-4),s=n.slice(-4),a=p.sha256(o);a=p.sha256(a),a=a.slice(0,4),s.toString()==a.toString()&&(r=!0)}catch(t){}return r},d.toWif=function(t,r,n){var o=t+n+r,s=o.trim().split(/[\t\n\v\f\r ]+/).join(" "),a=p.sha256(s),u=e.concat([new e([128]),a]),f=p.sha256(u);f=p.sha256(f),f=f.slice(0,4);var c=e.concat([u,f]);return i.encode(c)},d.wifIsValid=function(t,e){return this.wifToPublic(t)==e},d.wifToPublic=function(t){var e=h.fromWif(t);return e=e.toPublic().toString()},d.isPubkey=function(t,e){return null!=l.fromString(t,e)},d.signTransaction=function(t,r){var n=[];t.signatures&&(n=[].concat(t.signatures));var i=new e(u.get("chain_id"),"hex"),o=v.toBuffer(t);for(var s in r){var a=c.signBuffer(e.concat([i,o]),r[s]);n.push(a.toBuffer())}return y.toObject(Object.assign(t,{signatures:n}))},t.exports=d}).call(e,r(123).Buffer)},function(t,e,r){(function(n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=r(3),a=i(s),u=r(87),f=i(u),c=r(229),h=i(c),l=r(230),p=i(l),d=r(266),v=i(d),y=r(1),g=i(y),_=r(227),m=i(_),b=r(120),w=(0,f.default)("steem:broadcast"),E=function(){},k=(0,p.default)(g.default),T={};T.send=function(t,e,r){var n=T._prepareTransaction(t).then(function(t){return w("Signing transaction (transaction, transaction.operations)",t,t.operations),a.default.join(t,m.default.signTransaction(t,e))}).spread(function(t,e){return w("Broadcasting transaction (transaction, transaction.operations)",t,t.operations),g.default.broadcastTransactionSynchronousAsync(e).then(function(t){return Object.assign({},t,e)})});n.nodeify(r||E)},T._prepareTransaction=function(t){var e=g.default.getDynamicGlobalPropertiesAsync();return e.then(function(e){var r=new Date(e.time+"Z"),i=e.head_block_number-3&65535;return g.default.getBlockAsync(e.head_block_number-2).then(function(e){var o=e.previous;return Object.assign({ref_block_num:i,ref_block_prefix:new n(o,"hex").readUInt32LE(4),expiration:new Date(r.getTime()+6e4)},t)})})},v.default.forEach(function(t){var e=(0,b.camelCase)(t.operation),r=t.params||[],n=r.indexOf("parent_permlink")!==-1&&r.indexOf("parent_permlink")!==-1;T[e+"With"]=function(r,i,o){w('Sending operation "'+e+'" with',{options:i,callback:o});var s={};return t.roles&&t.roles.length&&(s[t.roles[0]]=r),T.send({extensions:[],operations:[[t.operation,Object.assign({},i,null!=i.json_metadata?{json_metadata:B(i.json_metadata)}:{},n&&null==i.permlink?{permlink:k.commentPermlink(i.parent_author,i.parent_permlink)}:{})]]},s,o)},T[e]=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{},a=i.gprops,u=i.feed_price,f=i.open_orders,c=i.savings_withdraws,h=i.vesting_steem,l=[],p=e.name,d=1e3,v=void 0,y=void 0;return h&&u||(a&&u?h=r(e,a):l.push(t.getStateAsync("/@{username}").then(function(t){a=t.props,u=t.feed_price,h=r(e,a)}))),f?v=n(f,d):l.push(t.getOpenOrdersAsync(p).then(function(t){v=n(t,d)})),c?y=o(c):l.push(t.getSavingsWithdrawFromAsync(p).then(function(t){y=o(t)})),Promise.all(l).then(function(){var t=void 0,r=u,n=r.base,i=r.quote;/ SBD$/.test(n)&&/ STEEM$/.test(i)&&(t=parseFloat(n.split(" ")[0]));var o=e.savings_balance,a=e.savings_sbd_balance,f=parseFloat(e.balance.split(" ")[0]),c=parseFloat(o.split(" ")[0]),l=parseFloat(e.sbd_balance),p=parseFloat(a.split(" ")[0]),d=0,g=(new Date).getTime();(e.other_history||[]).reduce(function(t,e){if("convert"!==(0,s.default)(e,[1,"op",0],""))return t;var r=new Date((0,s.default)(e,[1,"timestamp"])).getTime(),n=r+3024e5;if(n-1}var i=r(251);t.exports=n},function(t,e,r){function n(t,e){var r=this.__data__,n=i(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var i=r(251);t.exports=n},function(t,e,r){var n=r(99),i=r(57),o=n(i,"Map");t.exports=o},function(t,e,r){function n(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}var i=r(257);t.exports=n},function(t,e,r){function n(t,e){var r=t.__data__;return i(e)?r["string"==typeof e?"string":"hash"]:r.map}var i=r(258);t.exports=n},function(t,e){function r(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}t.exports=r},function(t,e,r){function n(t){return i(this,t).get(t)}var i=r(257);t.exports=n},function(t,e,r){function n(t){return i(this,t).has(t)}var i=r(257);t.exports=n},function(t,e,r){function n(t,e){var r=i(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var i=r(257);t.exports=n},function(t,e,r){function n(t){return null==t?"":i(t)}var i=r(263);t.exports=n},function(t,e,r){function n(t){if("string"==typeof t)return t;if(s(t))return o(t,n)+"";if(a(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}var i=r(56),o=r(264),s=r(62),a=r(235),u=1/0,f=i?i.prototype:void 0,c=f?f.toString:void 0;t.exports=n},function(t,e){function r(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r